func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void process_lock(void) { lock_mutex(&thread_mutex); }
0
[ "CWE-59", "CWE-61" ]
lxc
72cf81f6a3404e35028567db2c99a90406e9c6e6
60,722,914,267,360,830,000,000,000,000,000,000,000
4
CVE-2015-1331: lxclock: use /run/lxc/lock rather than /run/lock/lxc This prevents an unprivileged user to use LXC to create arbitrary file on the filesystem. Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
static void* _events_thread(void *arg) { // Thread to manage events for all opened display windows Display *const dpy = cimg::X11_attr().display; XEvent event; pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,0); pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,0); if (!arg) for ( ; ; ) { ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
307,020,421,221,676,340,000,000,000,000,000,000,000
22
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
mark_bsp_online (void) { #ifdef CONFIG_SMP /* If we register an early console, allow CPU 0 to printk */ cpu_set(smp_processor_id(), cpu_online_map); #endif }
0
[ "CWE-119", "CWE-787" ]
linux
4dcc29e1574d88f4465ba865ed82800032f76418
138,638,945,725,777,750,000,000,000,000,000,000,000
7
[IA64] Workaround for RSE issue Problem: An application violating the architectural rules regarding operation dependencies and having specific Register Stack Engine (RSE) state at the time of the violation, may result in an illegal operation fault and invalid RSE state. Such faults may initiate a cascade of repeated ...
int init_dummy_netdev(struct net_device *dev) { /* Clear everything. Note we don't initialize spinlocks * are they aren't supposed to be taken by any of the * NAPI code and this dummy netdev is supposed to be * only ever used for NAPI polls */ memset(dev, 0, sizeof(struct net_device)); /* make sure we BUG i...
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
97,241,448,354,864,630,000,000,000,000,000,000,000
26
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
static int serdes_probe(struct platform_device *pdev) { struct phy_provider *provider; struct serdes_ctrl *ctrl; unsigned int i; int ret; ctrl = devm_kzalloc(&pdev->dev, sizeof(*ctrl), GFP_KERNEL); if (!ctrl) return -ENOMEM; ctrl->dev = &pdev->dev; ctrl->regs = syscon_node_to_regmap(pdev->dev.parent->of_nod...
0
[ "CWE-125" ]
linux
6acb47d1a318e5b3b7115354ebc4ea060c59d3a1
222,083,392,642,760,760,000,000,000,000,000,000,000
29
phy: ocelot-serdes: fix out-of-bounds read Currently, there is an out-of-bounds read on array ctrl->phys, once variable i reaches the maximum array size of SERDES_MAX in the for loop. Fix this by changing the condition in the for loop from i <= SERDES_MAX to i < SERDES_MAX. Addresses-Coverity-ID: 1473966 ("Out-of-bo...
intrusive_ptr<Expression> ExpressionMap::parse(ExpressionContext* const expCtx, BSONElement expr, const VariablesParseState& vpsIn) { verify(expr.fieldNameStringData() == "$map"); uassert(16878, "$map only supports an...
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
291,776,300,724,939,000,000,000,000,000,000,000,000
47
SERVER-49404 Enforce additional checks in $arrayToObject
void CLASS xtrans_interpolate(int passes) { int c, d, f, g, h, i, v, ng, row, col, top, left, mrow, mcol; int val, ndir, pass, hm[8], avg[4], color[3][8]; static const short orth[12] = {1, 0, 0, 1, -1, 0, 0, -1, 1, 0, 0, 1}, patt[2][16] = {{0, 1, 0, -1, 2, 0, -1, 0, 1, 1, 1, -1, 0, 0, 0, 0}, ...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
288,712,713,990,514,620,000,000,000,000,000,000,000
278
Secunia SA75000 advisory: several buffer overruns
*/ u16 __skb_tx_hash(const struct net_device *dev, struct sk_buff *skb, unsigned int num_tx_queues) { u32 hash; u16 qoffset = 0; u16 qcount = num_tx_queues; if (skb_rx_queue_recorded(skb)) { hash = skb_get_rx_queue(skb); while (unlikely(hash >= num_tx_queues)) hash -= num_tx_queues; return hash; } ...
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
311,098,559,599,077,700,000,000,000,000,000,000,000
23
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
static inline LineContribType * _gdContributionsAlloc(unsigned int line_length, unsigned int windows_size) { unsigned int u = 0; LineContribType *res; res = (LineContribType *) gdMalloc(sizeof(LineContribType)); if (!res) { return NULL; } res->WindowSize = windows_size; res->LineLength = line_length;...
0
[ "CWE-119" ]
php-src
4bb422343f29f06b7081323844d9b52e1a71e4a5
17,917,144,919,110,570,000,000,000,000,000,000,000
18
Fix bug #70976: fix boundary check on gdImageRotateInterpolated
static enum si_sm_result start_next_msg(struct smi_info *smi_info) { int rv; if (!smi_info->waiting_msg) { smi_info->curr_msg = NULL; rv = SI_SM_IDLE; } else { int err; smi_info->curr_msg = smi_info->waiting_msg; smi_info->waiting_msg = NULL; debug_timestamp("Start2"); err = atomic_notif...
0
[ "CWE-416" ]
linux
401e7e88d4ef80188ffa07095ac00456f901b8c4
85,561,049,529,472,820,000,000,000,000,000,000,000
31
ipmi_si: fix use-after-free of resource->name When we excute the following commands, we got oops rmmod ipmi_si cat /proc/ioports [ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478 [ 1623.482382] Mem abort info: [ 1623.482383] ESR = 0x96000007 [ 1623.482385] Exception class =...
static struct bpf_ringbuf *bpf_ringbuf_area_alloc(size_t data_sz, int numa_node) { const gfp_t flags = GFP_KERNEL_ACCOUNT | __GFP_RETRY_MAYFAIL | __GFP_NOWARN | __GFP_ZERO; int nr_meta_pages = RINGBUF_PGOFF + RINGBUF_POS_PAGES; int nr_data_pages = data_sz >> PAGE_SHIFT; int nr_pages = nr_meta_pages + nr_data...
0
[ "CWE-787" ]
bpf
4b81ccebaeee885ab1aa1438133f2991e3a2b6ea
182,292,084,297,052,100,000,000,000,000,000,000,000
59
bpf, ringbuf: Deny reserve of buffers larger than ringbuf A BPF program might try to reserve a buffer larger than the ringbuf size. If the consumer pointer is way ahead of the producer, that would be successfully reserved, allowing the BPF program to read or write out of the ringbuf allocated area. Reported-by: Ryota...
static bool xennet_handle_rx(struct netfront_queue *queue, unsigned int *eoi) { unsigned int work_queued; unsigned long flags; if (unlikely(queue->info->broken)) return false; spin_lock_irqsave(&queue->rx_cons_lock, flags); work_queued = XEN_RING_NR_UNCONSUMED_RESPONSES(&queue->rx); if (work_queued > queue->r...
0
[]
linux
f63c2c2032c2e3caad9add3b82cc6e91c376fd26
125,091,719,362,021,570,000,000,000,000,000,000,000
29
xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses() The commit referenced below moved the invocation past the "next" label, without any explanation. In fact this allows misbehaving backends undue control over the domain the frontend runs in, as earlier detected errors require the skb to not ...
static int airo_get_essid(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { struct airo_info *local = dev->ml_priv; StatusRid status_rid; /* Card status info */ readStatusRid(local, &status_rid, 1); /* Note : if dwrq->flags != 0, we should * get the rele...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
172,031,828,843,849,670,000,000,000,000,000,000,000
23
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static bool css_visible(struct cgroup_subsys_state *css) { struct cgroup_subsys *ss = css->ss; struct cgroup *cgrp = css->cgroup; if (cgroup_control(cgrp) & (1 << ss->id)) return true; if (!(cgroup_ss_mask(cgrp) & (1 << ss->id))) return false; return cgroup_on_dfl(cgrp) && ss->implicit_on_dfl; }
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
175,621,369,346,917,700,000,000,000,000,000,000,000
11
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
static inline ktime_t skb_get_ktime(const struct sk_buff *skb) { return skb->tstamp;
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
14,049,357,601,126,490,000,000,000,000,000,000,000
4
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
WandPrivate MagickBooleanType CLIListOperatorImages(MagickCLI *cli_wand, const char *option,const char *arg1n,const char *arg2n) { const char /* percent escaped versions of the args */ *arg1, *arg2; Image *new_images; MagickStatusType status; ssize_t parse; #define _image_info (...
1
[ "CWE-399", "CWE-401" ]
ImageMagick
5f21230b657ccd65452dd3d94c5b5401ba691a2d
145,029,681,855,403,500,000,000,000,000,000,000,000
893
https://github.com/ImageMagick/ImageMagick/issues/1616
DU_putStringDOElement(DcmItem *obj, DcmTagKey t, const char *s) { OFCondition ec = EC_Normal; DcmElement *e = NULL; DcmTag tag(t); ec = DcmItem::newDicomElement(e, tag); if (ec == EC_Normal && s != NULL) { ec = e->putString(s); } if (ec == EC_Normal) { ec = obj->insert(e, OF...
0
[ "CWE-476", "CWE-787" ]
dcmtk
5c14bf53fb42ceca12bbcc0016e8704b1580920d
118,706,239,760,853,750,000,000,000,000,000,000,000
16
Fixed possible NULL pointer dereference. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and patch.
STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx) { return ctx->chain; }
0
[]
openssl
d65b8b2162f33ac0d53dace588a0847ed827626c
257,700,511,810,596,860,000,000,000,000,000,000,000
4
Backport OCSP fixes.
static void FVMenuGenerateTTC(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) { FontView *fv = (FontView *) GDrawGetUserData(gw); _FVMenuGenerate(fv,gf_ttc); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
105,386,319,890,463,560,000,000,000,000,000,000,000
5
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
ofputil_pull_queue_get_config_reply14(struct ofpbuf *msg, struct ofputil_queue_config *queue) { struct ofp14_queue_desc *oqd14 = ofpbuf_try_pull(msg, sizeof *oqd14); if (!oqd14) { return OFPERR_OFPBRC_BAD_LEN; } enum ofperr error = ofputil_port_from_ofp11(oq...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
328,312,606,066,784,180,000,000,000,000,000,000,000
52
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) { struct inet_connection_sock *icsk = inet_csk(sk); struct tcp_sock *tp = tcp_sk(sk); u32 prior_snd_una = tp->snd_una; u32 ack_seq = TCP_SKB_CB(skb)->seq; u32 ack = TCP_SKB_CB(skb)->ack_seq; bool is_dupack = false; u32 prior_in_flight, prio...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
297,346,298,908,613,300,000,000,000,000,000,000,000
151
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
const char* Image::typeName(uint16_t tag) const { //! List of TIFF image tags const char* result = NULL; switch (tag ) { case Exiv2::unsignedByte : result = "BYTE" ; break; case Exiv2::asciiString : result = "ASCII" ; break; case Exiv...
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
216,596,599,017,240,070,000,000,000,000,000,000,000
22
Fix https://github.com/Exiv2/exiv2/issues/55
create_principal_2_svc(cprinc_arg *arg, struct svc_req *rqstp) { static generic_ret ret; char *prime_arg; gss_buffer_desc client_name, service_name; OM_uint32 minor_stat; kadm5_server_handle_t handle; restriction_t ...
1
[ "CWE-119", "CWE-772", "CWE-401" ]
krb5
83ed75feba32e46f736fcce0d96a0445f29b96c2
290,495,141,563,277,160,000,000,000,000,000,000,000
59
Fix leaks in kadmin server stubs [CVE-2015-8631] In each kadmind server stub, initialize the client_name and server_name variables, and release them in the cleanup handler. Many of the stubs will otherwise leak the client and server name if krb5_unparse_name() fails. Also make sure to free the prime_arg variables in...
static int ip_vs_dst_event(struct notifier_block *this, unsigned long event, void *ptr) { struct net_device *dev = ptr; struct net *net = dev_net(dev); struct netns_ipvs *ipvs = net_ipvs(net); struct ip_vs_service *svc; struct ip_vs_dest *dest; unsigned int idx; if (event != NETDEV_UNREGISTER || !ipvs) ...
0
[ "CWE-200" ]
linux
2d8a041b7bfe1097af21441cb77d6af95f4f4680
7,154,017,756,153,070,000,000,000,000,000,000,000
43
ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT) If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is not set, __ip_vs_get_timeouts() does not fully initialize the structure that gets copied to userland and that for leaks up to 12 bytes of kernel stack. Add an explicit memset(0) before passing...
static int fts3RowidMethod(sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid){ Fts3Cursor *pCsr = (Fts3Cursor *) pCursor; *pRowid = pCsr->iPrevId; return SQLITE_OK; }
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
148,285,240,496,249,600,000,000,000,000,000,000,000
5
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
static int compat_copy_entries_to_user(unsigned int total_size, struct xt_table *table, void __user *userptr) { struct xt_counters *counters; const struct xt_table_info *private = table->private; void __user *pos; unsigned int size; int ret = 0; unsigned int i = 0; struct arpt_entry *iter; ...
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
149,758,553,784,586,630,000,000,000,000,000,000,000
27
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static int hva_to_pfn_remapped(struct vm_area_struct *vma, unsigned long addr, bool *async, bool write_fault, bool *writable, kvm_pfn_t *p_pfn) { kvm_pfn_t pfn; pte_t *ptep; spinlock_t *ptl; int r; r = follow_pte(vma->vm_mm, addr, &ptep, &ptl); if (r) { /* * get_user_pages fail...
1
[ "CWE-119" ]
linux
f8be156be163a052a067306417cd0ff679068c97
260,764,785,426,289,040,000,000,000,000,000,000,000
57
KVM: do not allow mapping valid but non-reference-counted pages It's possible to create a region which maps valid but non-refcounted pages (e.g., tail pages of non-compound higher order allocations). These host pages can then be returned by gfn_to_page, gfn_to_pfn, etc., family of APIs, which take a reference to the p...
static int complete_hypercall_exit(struct kvm_vcpu *vcpu) { u64 ret = vcpu->run->hypercall.ret; if (!is_64_bit_mode(vcpu)) ret = (u32)ret; kvm_rax_write(vcpu, ret); ++vcpu->stat.hypercalls; return kvm_skip_emulated_instruction(vcpu); }
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
337,303,817,809,449,400,000,000,000,000,000,000,000
10
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
reassemble_pkcs11_name(pkinit_identity_opts *idopts) { struct k5buf buf; int n = 0; char *ret; krb5int_buf_init_dynamic(&buf); krb5int_buf_add(&buf, "PKCS11:"); n = 0; if (idopts->p11_module_name != NULL) { krb5int_buf_add_fmt(&buf, "%smodule_name=%s", n+...
0
[ "CWE-476" ]
krb5
f249555301940c6df3a2cdda13b56b5674eebc2e
262,293,477,589,368,440,000,000,000,000,000,000,000
41
PKINIT null pointer deref [CVE-2013-1415] Don't dereference a null pointer when cleaning up. The KDC plugin for PKINIT can dereference a null pointer when a malformed packet causes processing to terminate early, leading to a crash of the KDC process. An attacker would need to have a valid PKINIT certificate or have ...
ds_fgetstr (FILE *f, dynamic_string *s, char eos) { int next_ch; /* Initialize. */ s->ds_idx = 0; /* Read the input string. */ while ((next_ch = getc (f)) != eos && next_ch != EOF) { ds_resize (s); s->ds_string[s->ds_idx++] = next_ch; } ds_resize (s); s->ds_string[s->ds_idx] = '\0'...
0
[ "CWE-190" ]
cpio
dd96882877721703e19272fe25034560b794061b
38,898,591,507,161,365,000,000,000,000,000,000,000
21
Rewrite dynamic string support. * src/dstring.c (ds_init): Take a single argument. (ds_free): New function. (ds_resize): Take a single argument. Use x2nrealloc to expand the storage. (ds_reset,ds_append,ds_concat,ds_endswith): New function. (ds_fgetstr): Rewrite. In particular, this fixes integer overflow. * src/dst...
getauthkeys( const char *keyfile ) { int len; len = strlen(keyfile); if (!len) return; #ifndef SYS_WINNT key_file_name = erealloc(key_file_name, len + 1); memcpy(key_file_name, keyfile, len + 1); #else key_file_name = erealloc(key_file_name, _MAX_PATH); if (len + 1 > _MAX_PATH) return; if (!ExpandEnvir...
0
[ "CWE-20" ]
ntp
52e977d79a0c4ace997e5c74af429844da2f27be
284,976,771,403,659,400,000,000,000,000,000,000,000
27
[Bug 1773] openssl not detected during ./configure. [Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL.
static inline bool cpu_has_vmx_invept_individual_addr(void) { return vmx_capability.ept & VMX_EPT_EXTENT_INDIVIDUAL_BIT; }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
116,635,954,329,430,270,000,000,000,000,000,000,000
4
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
static void svm_set_dr7(struct kvm_vcpu *vcpu, unsigned long value) { struct vcpu_svm *svm = to_svm(vcpu); svm->vmcb->save.dr7 = value; }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
714,925,668,332,204,700,000,000,000,000,000,000
6
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
int __vma_adjust(struct vm_area_struct *vma, unsigned long start, unsigned long end, pgoff_t pgoff, struct vm_area_struct *insert, struct vm_area_struct *expand) { struct mm_struct *mm = vma->vm_mm; struct vm_area_struct *next = vma->vm_next, *orig_vma = vma; struct address_space *mapping = NULL; struct rb_root_c...
0
[ "CWE-787" ]
linux
dcde237319e626d1ec3c9d8b7613032f0fd4663a
252,041,551,823,415,870,000,000,000,000,000,000,000
286
mm: Avoid creating virtual address aliases in brk()/mmap()/mremap() Currently the arm64 kernel ignores the top address byte passed to brk(), mmap() and mremap(). When the user is not aware of the 56-bit address limit or relies on the kernel to return an error, untagging such pointers has the potential to create addres...
static int mov_write_amr_tag(AVIOContext *pb, MOVTrack *track) { avio_wb32(pb, 0x11); /* size */ if (track->mode == MODE_MOV) ffio_wfourcc(pb, "samr"); else ffio_wfourcc(pb, "damr"); ffio_wfourcc(pb, "FFMP"); avio_w8(pb, 0); /* decoder version */ avio_wb16(pb, 0x81FF); /...
0
[ "CWE-369" ]
FFmpeg
2c0e98a0b478284bdff6d7a4062522605a8beae5
207,856,327,289,616,700,000,000,000,000,000,000,000
13
avformat/movenc: Write version 2 of audio atom if channels is not known The version 1 needs the channel count and would divide by 0 Fixes: division by 0 Fixes: fpe_movenc.c_1108_1.ogg Fixes: fpe_movenc.c_1108_2.ogg Fixes: fpe_movenc.c_1108_3.wav Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg> Signed-off-by: Michael N...
CImgDisplay& set_wheel(const int amplitude) { _wheel+=amplitude; _is_event = amplitude?true:false; if (amplitude) { #if cimg_display==1 pthread_cond_broadcast(&cimg::X11_attr().wait_event); #elif cimg_display==2 SetEvent(cimg::Win32_attr().wait_event); #endif } return *...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
43,854,886,505,678,820,000,000,000,000,000,000,000
12
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
MagickExport MagickBooleanType LevelizeImage(Image *image, const double black_point,const double white_point,const double gamma, ExceptionInfo *exception) { #define LevelizeImageTag "Levelize/Image" #define LevelizeValue(x) ClampToQuantum(((MagickRealType) gamma_pow((double) \ (QuantumScale*(x)),gamma))*(white_p...
0
[ "CWE-399", "CWE-119", "CWE-787" ]
ImageMagick
d4fc44b58a14f76b1ac997517d742ee12c9dc5d3
173,919,210,655,227,860,000,000,000,000,000,000,000
107
https://github.com/ImageMagick/ImageMagick/issues/1611
void lj_debug_shortname(char *out, GCstr *str) { const char *src = strdata(str); if (*src == '=') { strncpy(out, src+1, LUA_IDSIZE); /* Remove first char. */ out[LUA_IDSIZE-1] = '\0'; /* Ensures null termination. */ } else if (*src == '@') { /* Output "source", or "...source". */ size_t len = str->...
0
[ "CWE-125" ]
LuaJIT
e296f56b825c688c3530a981dc6b495d972f3d01
115,096,193,067,808,240,000,000,000,000,000,000,000
29
Call error function on rethrow after trace exit.
unsigned char *ziplistPush(unsigned char *zl, unsigned char *s, unsigned int slen, int where) { unsigned char *p; p = (where == ZIPLIST_HEAD) ? ZIPLIST_ENTRY_HEAD(zl) : ZIPLIST_ENTRY_END(zl); return __ziplistInsert(zl,p,s,slen); }
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
145,501,692,271,121,890,000,000,000,000,000,000,000
5
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
gx_default_finish_copydevice(gx_device *dev, const gx_device *from_dev) { /* Only allow copying the prototype. */ return (from_dev->memory ? gs_note_error(gs_error_rangecheck) : 0); }
0
[]
ghostpdl
c9b362ba908ca4b1d7c72663a33229588012d7d9
191,207,713,382,638,300,000,000,000,000,000,000,000
5
Bug 699670: disallow copying of the epo device The erasepage optimisation (epo) subclass device shouldn't be allowed to be copied because the subclass private data, child and parent pointers end up being shared between the original device and the copy. Add an epo_finish_copydevice which NULLs the three offending poin...
static int sev_bind_asid(struct kvm *kvm, unsigned int handle, int *error) { struct sev_data_activate activate; int asid = sev_get_asid(kvm); int ret; /* activate ASID on the given handle */ activate.handle = handle; activate.asid = asid; ret = sev_guest_activate(&activate, error); return ret; }
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
177,384,489,187,239,730,000,000,000,000,000,000,000
13
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
static int kvm_suspend(void) { if (kvm_usage_count) hardware_disable_nolock(NULL); return 0; }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
29,330,972,236,247,665,000,000,000,000,000,000,000
6
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
static int asn1_template_ex_d2i(ASN1_VALUE **val, const unsigned char **in, long inlen, const ASN1_TEMPLATE *tt, char opt, ASN1_TLC *ctx) { int flags, aclass; int ret; long len; const unsigned char *p, *q; ...
1
[ "CWE-674" ]
openssl
9310d45087ae546e27e61ddf8f6367f29848220d
254,972,946,955,520,200,000,000,000,000,000,000,000
71
Limit ASN.1 constructed types recursive definition depth Constructed types with a recursive definition (such as can be found in PKCS7) could eventually exceed the stack given malicious input with excessive recursion. Therefore we limit the stack depth. CVE-2018-0739 Credit to OSSFuzz for finding this issue. Reviewe...
tor_tls_block_renegotiation(tor_tls_t *tls) { tls->ssl->s3->flags &= ~SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION; }
0
[ "CWE-264" ]
tor
638fdedcf16cf7d6f7c586d36f7ef335c1c9714f
139,178,907,909,782,020,000,000,000,000,000,000,000
4
Don't send a certificate chain on outgoing TLS connections from non-relays
static int hung_up_tty_fasync(int fd, struct file *file, int on) { return -ENOTTY; }
0
[ "CWE-416" ]
linux
c8bcd9c5be24fb9e6132e97da5a35e55a83e36b9
20,409,527,456,920,976,000,000,000,000,000,000,000
4
tty: Fix ->session locking Currently, locking of ->session is very inconsistent; most places protect it using the legacy tty mutex, but disassociate_ctty(), __do_SAK(), tiocspgrp() and tiocgsid() don't. Two of the writers hold the ctrl_lock (because they already need it for ->pgrp), but __proc_set_tty() doesn't do tha...
static void fill_note(struct memelfnote *note, const char *name, int type, unsigned int sz, void *data) { note->name = name; note->type = type; note->datasz = sz; note->data = data; return; }
0
[ "CWE-284", "CWE-264" ]
linux
4e7c22d447bb6d7e37bfe39ff658486ae78e8d77
205,692,927,558,639,800,000,000,000,000,000,000,000
9
x86, mm/ASLR: Fix stack randomization on 64-bit systems The issue is that the stack for processes is not properly randomized on 64 bit architectures due to an integer overflow. The affected function is randomize_stack_top() in file "fs/binfmt_elf.c": static unsigned long randomize_stack_top(unsigned long stack_top...
MOBI_RET mobi_build_opf_metadata(OPF *opf, const MOBIData *m, const MOBIRawml *rawml) { if (m == NULL) { debug_print("%s\n", "Initialization failed"); return MOBI_INIT_FAILED; } opf->metadata = calloc(1, sizeof(OPFmetadata)); if (opf->metadata == NULL) { debug_print("%s\n", "Mem...
1
[ "CWE-476" ]
libmobi
c0699c8693c47f14a2e57dec7292e862ac7adf9c
14,842,093,683,861,977,000,000,000,000,000,000,000
108
Fix undefined behavior when passing null to strdup
static void JPEGErrorHandler(j_common_ptr jpeg_info) { char message[JMSG_LENGTH_MAX]; ErrorManager *error_manager; ExceptionInfo *exception; Image *image; *message='\0'; error_manager=(ErrorManager *) jpeg_info->client_data; image=error_manager->image; exception=error_manager->except...
0
[ "CWE-416" ]
ImageMagick
39f226a9c137f547e12afde972eeba7551124493
175,933,707,950,437,930,000,000,000,000,000,000,000
30
https://github.com/ImageMagick/ImageMagick/issues/1641
void compute_thread_mem(const char * arg, size_t * mem_init, size_t * thread_mem_init, bool *needs_huge_pages, bool *avx2upgrade) { if (strcmp(arg, "-hugepages") == 0) { *needs_huge_pages = true; } if ( s...
0
[ "CWE-399", "CWE-190" ]
lepton
6a5ceefac1162783fffd9506a3de39c85c725761
110,840,795,377,297,880,000,000,000,000,000,000,000
30
fix #111
SSLNetVConnection::sslContextSet(void *ctx) { bool zret = true; if (ssl) { SSL_set_SSL_CTX(ssl, static_cast<SSL_CTX *>(ctx)); } else { zret = false; } return zret; }
0
[ "CWE-284" ]
trafficserver
d3f36f79820ea10c26573c742b1bbc370c351716
230,586,682,028,263,100,000,000,000,000,000,000,000
10
Bug fix in origin connection handling (#8731) Co-authored-by: Takuya Kitano <tkitano@yahoo-corp.jp>
static int bnx2x_prev_unload(struct bnx2x *bp) { int time_counter = 10; u32 rc, fw, hw_lock_reg, hw_lock_val; BNX2X_DEV_INFO("Entering Previous Unload Flow\n"); /* clear hw from errors which may have resulted from an interrupted * dmae transaction. */ bnx2x_clean_pglue_errors(bp); /* Release previously held...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
231,576,207,281,026,700,000,000,000,000,000,000,000
82
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
mono_gc_is_finalizer_internal_thread (MonoInternalThread *thread) { return thread == gc_thread; }
0
[ "CWE-399", "CWE-264" ]
mono
8eb1189099e02372fd45ca1c67230eccf1edddc0
331,382,057,095,309,650,000,000,000,000,000,000,000
4
Implement a reference queue API. * gc.c: A reference queue allows one to queue callbcks for when objects are collected. It allows for safe cleanup of objects that can only be done when it is effectively collected. The major difference with regular finalization is that the collector makes sure the object was col...
static int process_dummy_ref(const char *line) { struct object_id oid; const char *name; if (parse_oid_hex(line, &oid, &name)) return 0; if (*name != ' ') return 0; name++; return oideq(&null_oid, &oid) && !strcmp(name, "capabilities^{}"); }
0
[]
git
a02ea577174ab8ed18f847cf1693f213e0b9c473
219,987,529,002,083,240,000,000,000,000,000,000,000
13
git_connect_git(): forbid newlines in host and path When we connect to a git:// server, we send an initial request that looks something like: 002dgit-upload-pack repo.git\0host=example.com If the repo path contains a newline, then it's included literally, and we get: 002egit-upload-pack repo .git\0host=exampl...
compileCharDef (FileInfo * nested, TranslationTableOpcode opcode, TranslationTableCharacterAttributes attributes) { CharsString ruleChars; CharsString ruleDots; TranslationTableCharacter *character; TranslationTableCharacter *cell; TranslationTableCharacter *otherCell; TranslationTableCharacterAttribute...
0
[]
liblouis
dc97ef791a4fae9da11592c79f9f79e010596e0c
19,731,933,944,660,432,000,000,000,000,000,000,000
51
Merge branch 'table_resolver'
static void CompressRangeFit(const size_t count, const DDSVector4* points, const ssize_t *map, const DDSVector3 principle, const DDSVector4 metric, DDSVector3 *start, DDSVector3 *end, unsigned char *indices) { float d, bestDist, max, min, val; DDSVector3 codes[4], grid, gridrc...
0
[ "CWE-20", "CWE-617" ]
ImageMagick
0c5b1e430a83ef793a7334bbbee408cf3c628699
264,664,397,219,177,000,000,000,000,000,000,000,000
103
Added check to prevent image being 0x0 (reported in #489).
ves_icall_System_Array_GetLongLength (MonoArray *this, gint32 dimension) { gint32 rank = ((MonoObject *)this)->vtable->klass->rank; MONO_ARCH_SAVE_REGS; if ((dimension < 0) || (dimension >= rank)) mono_raise_exception (mono_get_exception_index_out_of_range ()); if (this->bounds == NULL) return this->max_le...
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
100,869,113,480,535,030,000,000,000,000,000,000,000
14
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
amgtar_backup( application_argument_t *argument) { int dumpin; char *cmd = NULL; char *qdisk; char *incrname; char line[32768]; amregex_t *rp; off_t dump_size = -1; char *type; char startchr; int dataf = 1; int me...
1
[ "CWE-264" ]
amanda
4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7
178,122,728,442,521,830,000,000,000,000,000,000,000
199
* Add a /etc/amanda-security.conf file git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0
QPDFObjectHandle::getPageImages() { // Note: this code doesn't handle inherited resources. If this // page dictionary doesn't have a /Resources key or has one whose // value is null or an empty dictionary, you are supposed to walk // up the page tree until you find a /Resources dictionary. As of /...
0
[ "CWE-399", "CWE-674" ]
qpdf
b4d6cf6836ce025ba1811b7bbec52680c7204223
250,349,000,740,837,120,000,000,000,000,000,000,000
45
Limit depth of nesting in direct objects (fixes #202) This fixes CVE-2018-9918.
int af_alg_accept(struct sock *sk, struct socket *newsock, bool kern) { struct alg_sock *ask = alg_sk(sk); const struct af_alg_type *type; struct sock *sk2; unsigned int nokey; int err; lock_sock(sk); type = ask->type; err = -EINVAL; if (!type) goto unlock; sk2 = sk_alloc(sock_net(sk), PF_ALG, GFP_KERNEL...
0
[ "CWE-416" ]
linux
9060cb719e61b685ec0102574e10337fa5f445ea
214,446,173,420,556,700,000,000,000,000,000,000,000
55
net: crypto set sk to NULL when af_alg_release. KASAN has found use-after-free in sockfs_setattr. The existed commit 6d8c50dcb029 ("socket: close race condition between sock_close() and sockfs_setattr()") is to fix this simillar issue, but it seems to ignore that crypto module forgets to set the sk to NULL after af_al...
constexpr bool mul(stdx::type_identity_t<T> a, stdx::type_identity_t<T> b, T* r) { #ifdef _MSC_VER return !SafeMultiply(a, b, *r); #else return __builtin_mul_overflow(a, b, r); #endif }
0
[ "CWE-190" ]
mongo
21d8699ed6c517b45e1613e20231cd8eba894985
165,441,006,747,624,130,000,000,000,000,000,000,000
7
SERVER-43699 $mod should not overflow for large negative values
xmlFACompareAtoms(xmlRegAtomPtr atom1, xmlRegAtomPtr atom2, int deep) { int ret = 1; if (atom1 == atom2) return(1); if ((atom1 == NULL) || (atom2 == NULL)) return(0); if ((atom1->type == XML_REGEXP_ANYCHAR) || (atom2->type == XML_REGEXP_ANYCHAR)) return(1); if (atom1->type > atom2->typ...
0
[ "CWE-119" ]
libxml2
cbb271655cadeb8dbb258a64701d9a3a0c4835b4
275,117,774,681,782,260,000,000,000,000,000,000,000
77
Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711> * xmlregexp.c: (xmlFAParseCharRange): Only advance to the next character if there is no error. Advancing to the next character in case of an error while parsing regexp leads to an out of bounds access.
static void tcp_v6_clear_md5_list (struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); int i; if (tp->md5sig_info->entries6) { for (i = 0; i < tp->md5sig_info->entries6; i++) kfree(tp->md5sig_info->keys6[i].base.key); tp->md5sig_info->entries6 = 0; tcp_free_md5sig_pool(); } kfree(tp->md5sig_info->keys6...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
175,363,032,505,294,150,000,000,000,000,000,000,000
27
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
static BOOL printer_config_valid(const char* path) { if (!path) return FALSE; if (!PathFileExistsA(path)) return FALSE; return TRUE; }
0
[ "CWE-125" ]
FreeRDP
6b485b146a1b9d6ce72dfd7b5f36456c166e7a16
107,247,271,549,145,620,000,000,000,000,000,000,000
10
Fixed oob read in irp_write and similar
void nmhd_box_del(GF_Box *s) { GF_MPEGMediaHeaderBox *ptr = (GF_MPEGMediaHeaderBox *)s; if (ptr == NULL) return; gf_free(ptr); }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
67,567,738,289,653,240,000,000,000,000,000,000,000
6
fixed #1587
onig_callout_tag_table_free(void* table) { CalloutTagTable* t = (CalloutTagTable* )table; if (IS_NOT_NULL(t)) { int r = callout_tag_table_clear(t); if (r != 0) return r; onig_st_free_table(t); } return 0; }
0
[ "CWE-400", "CWE-399", "CWE-674" ]
oniguruma
4097828d7cc87589864fecf452f2cd46c5f37180
53,830,802,120,077,080,000,000,000,000,000,000,000
13
fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves.
static inline void writer_print_rational(WriterContext *wctx, const char *key, AVRational q, char sep) { AVBPrint buf; av_bprint_init(&buf, 0, AV_BPRINT_SIZE_AUTOMATIC); av_bprintf(&buf, "%d%c%d", q.num, sep, q.den); writer_print_string(wctx, key, buf.str, 0); }
0
[ "CWE-476" ]
FFmpeg
837cb4325b712ff1aab531bf41668933f61d75d2
119,558,241,137,654,350,000,000,000,000,000,000,000
8
ffprobe: Fix null pointer dereference with color primaries Found-by: AD-lab of venustech Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static void tcp_clamp_window(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); struct inet_connection_sock *icsk = inet_csk(sk); struct net *net = sock_net(sk); icsk->icsk_ack.quick = 0; if (sk->sk_rcvbuf < net->ipv4.sysctl_tcp_rmem[2] && !(sk->sk_userlocks & SOCK_RCVBUF_LOCK) && !tcp_under_memory_p...
0
[ "CWE-190" ]
net
3b4929f65b0d8249f19a50245cd88ed1a2f78cff
183,312,459,629,673,220,000,000,000,000,000,000,000
18
tcp: limit payload size of sacked skbs Jonathan Looney reported that TCP can trigger the following crash in tcp_shifted_skb() : BUG_ON(tcp_skb_pcount(skb) < pcount); This can happen if the remote peer has advertized the smallest MSS that linux TCP accepts : 48 An skb can hold 17 fragments, and each fragment can ho...
mrb_class_path(mrb_state *mrb, struct RClass *c) { mrb_value path; mrb_sym nsym = MRB_SYM(__classname__); path = mrb_obj_iv_get(mrb, (struct RObject*)c, nsym); if (mrb_nil_p(path)) { /* no name (yet) */ return mrb_class_find_path(mrb, c); } else if (mrb_symbol_p(path)) { /* toplevel class/modul...
0
[ "CWE-787" ]
mruby
b1d0296a937fe278239bdfac840a3fd0e93b3ee9
40,552,997,643,124,353,000,000,000,000,000,000,000
16
class.c: clear method cache after `remove_method`.
static int php_snmp_read_max_oids(php_snmp_object *snmp_object, zval *retval) { if (snmp_object->max_oids > 0) { ZVAL_LONG(retval, snmp_object->max_oids); } else { ZVAL_NULL(retval); } return SUCCESS; }
0
[ "CWE-20" ]
php-src
6e25966544fb1d2f3d7596e060ce9c9269bbdcf8
337,004,913,767,181,280,000,000,000,000,000,000,000
9
Fixed bug #71704 php_snmp_error() Format String Vulnerability
rsvg_filter_primitive_blend_render (RsvgFilterPrimitive * self, RsvgFilterContext * ctx) { RsvgIRect boundarys; RsvgFilterPrimitiveBlend *upself; GdkPixbuf *output; GdkPixbuf *in; GdkPixbuf *in2; upself = (RsvgFilterPrimitiveBlend *) self; boundarys = rsvg_filter_primitive_get_bounds (sel...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
39,051,545,163,654,106,000,000,000,000,000,000,000
28
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
dwg_obj_is_3dsolid (const Dwg_Object *obj) { const Dwg_Object_Type type = obj->fixedtype; return (obj->supertype == DWG_SUPERTYPE_OBJECT && (type == DWG_TYPE_ACSH_BREP_CLASS || type == DWG_TYPE_ASSOCASMBODYACTIONPARAM)) || (obj->supertype == DWG_SUPERTYPE_ENTITY && (type == DWG_TYPE_...
0
[ "CWE-787" ]
libredwg
ecf5183d8b3b286afe2a30021353b7116e0208dd
175,407,405,226,469,540,000,000,000,000,000,000,000
19
dwg_section_wtype: fix fuzzing overflow with illegal and overlong section names. Fixes GH #349, #352 section names cannot be longer than 24
int CertManager::CopyCaCert(const x509* x) { TaoCrypt::Source source(x->get_buffer(), x->get_length()); TaoCrypt::CertDecoder cert(source, true, &signers_, verifyNone_, TaoCrypt::CertDecoder::CA); if (!cert.GetError().What()) { const TaoCrypt::PublicKey& key = cert.Ge...
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
283,665,298,984,632,000,000,000,000,000,000,000,000
14
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
int fuse_readdir(struct file *file, struct dir_context *ctx) { struct fuse_file *ff = file->private_data; struct inode *inode = file_inode(file); int err; if (is_bad_inode(inode)) return -EIO; mutex_lock(&ff->readdir.lock); err = UNCACHED; if (ff->open_flags & FOPEN_CACHE_DIR) err = fuse_readdir_cached(fi...
1
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
139,544,299,391,102,720,000,000,000,000,000,000,000
21
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
mem_log_init(const char* prog_name, const char *banner) { size_t log_name_len; char *log_name; if (__test_bit(LOG_CONSOLE_BIT, &debug)) { log_op = stderr; return; } if (log_op) fclose(log_op); log_name_len = 5 + strlen(prog_name) + 5 + 7 + 4 + 1; /* "/tmp/" + prog_name + "_mem." + PID + ".log" + '\0" */ ...
1
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
263,636,839,726,576,960,000,000,000,000,000,000,000
45
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
static int parse_audio_mixer_unit(struct mixer_build *state, int unitid, void *raw_desc) { struct uac_mixer_unit_descriptor *desc = raw_desc; struct usb_audio_term iterm; int input_pins, num_ins, num_outs; int pin, ich, err; err = uac_mixer_unit_get_channels(state, desc); if (err < 0) { usb_audio_err(sta...
0
[ "CWE-125" ]
linux
f4351a199cc120ff9d59e06d02e8657d08e6cc46
144,369,552,748,937,220,000,000,000,000,000,000,000
51
ALSA: usb-audio: Avoid access before bLength check in build_audio_procunit() The parser for the processing unit reads bNrInPins field before the bLength sanity check, which may lead to an out-of-bound access when a malformed descriptor is given. Fix it by assignment after the bLength check. Cc: <stable@vger.kernel.o...
static int movl_rdisp_reg(RAnal* anal, RAnalOp* op, ut16 code){ op->type = R_ANAL_OP_TYPE_LOAD; op->dst = anal_fill_ai_rg (anal, GET_TARGET_REG(code)); op->src[0] = anal_fill_reg_disp_mem (anal, GET_SOURCE_REG(code), code&0x0F, LONG_SIZE); return op->size; }
0
[ "CWE-125" ]
radare2
77c47cf873dd55b396da60baa2ca83bbd39e4add
247,217,316,574,164,840,000,000,000,000,000,000,000
6
Fix #9903 - oobread in RAnal.sh
proto_tree_create_root(packet_info *pinfo) { proto_node *pnode; /* Initialize the proto_node */ pnode = g_slice_new(proto_tree); PROTO_NODE_INIT(pnode); pnode->parent = NULL; PNODE_FINFO(pnode) = NULL; pnode->tree_data = g_slice_new(tree_data_t); /* Make sure we can access pinfo everywhere */ pnode->tree_dat...
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
303,183,871,042,804,330,000,000,000,000,000,000,000
31
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
static void send_capabilities(VirtioPort *vport, uint32_t request) { VDAgentAnnounceCapabilities *caps; uint32_t size; size = sizeof(*caps) + VD_AGENT_CAPS_BYTES; caps = g_malloc0(size); caps->request = request; VD_AGENT_SET_CAPABILITY(caps->caps, VD_AGENT_CAP_MOUSE_STATE); VD_AGENT_SET...
0
[ "CWE-770" ]
spice-vd_agent
1a8b93ca6ac0b690339ab7f0afc6fc45d198d332
327,550,157,610,776,020,000,000,000,000,000,000,000
28
Avoids unchecked file transfer IDs allocation and usage Avoid agents allocating file transfers. The "active_xfers" entries are now inserted when client start sending files. Also different agents cannot mess with other agent transfers as a transfer is bound to a single agent. This issue was reported by SUSE security t...
~RGWDeleteLC() override { free(data); }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
147,423,910,453,139,700,000,000,000,000,000,000,000
3
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
void CZNC::InitDirs(const CString& sArgvPath, const CString& sDataDir) { // If the bin was not ran from the current directory, we need to add that // dir onto our cwd CString::size_type uPos = sArgvPath.rfind('/'); if (uPos == CString::npos) m_sCurPath = "./"; else m_sCurPath = CDir:...
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
20,281,605,384,800,956,000,000,000,000,000,000,000
20
Don't crash if user specified invalid encoding. This is CVE-2019-9917
static void rb_time_set(rb_time_t *t, u64 val) { local64_set(&t->time, val); }
0
[ "CWE-362" ]
linux
bbeb97464eefc65f506084fd9f18f21653e01137
302,660,701,191,953,270,000,000,000,000,000,000,000
4
tracing: Fix race in trace_open and buffer resize call Below race can come, if trace_open and resize of cpu buffer is running parallely on different cpus CPUX CPUY ring_buffer_resize atomic_read(&buffer->resize_disabled) tracing_open tracing_reset_online_cpus ring_buffer_...
bool __blk_mq_tag_busy(struct blk_mq_hw_ctx *hctx) { if (!test_bit(BLK_MQ_S_TAG_ACTIVE, &hctx->state) && !test_and_set_bit(BLK_MQ_S_TAG_ACTIVE, &hctx->state)) atomic_inc(&hctx->tags->active_queues); return true; }
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
109,158,425,431,057,670,000,000,000,000,000,000,000
8
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
uint32_t pcnet_bcr_readw(PCNetState *s, uint32_t rap) { uint32_t val; rap &= 127; switch (rap) { case BCR_LNKST: case BCR_LED1: case BCR_LED2: case BCR_LED3: val = s->bcr[rap] & ~0x8000; val |= (val & 0x017f & s->lnkst) ? 0x8000 : 0; break; default: val = ...
0
[]
qemu
837f21aacf5a714c23ddaadbbc5212f9b661e3f7
219,692,232,778,352,500,000,000,000,000,000,000,000
21
net: pcnet: add check to validate receive data size(CVE-2015-7504) In loopback mode, pcnet_receive routine appends CRC code to the receive buffer. If the data size given is same as the buffer size, the appended CRC code overwrites 4 bytes after s->buffer. Added a check to avoid that. Reported by: Qinghao Tang <luodal...
SPL_METHOD(SplObjectStorage, next) { spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC); if (zend_parse_parameters_none() == FAILURE) { return; } zend_hash_move_forward_ex(&intern->storage, &intern->pos); intern->index++; } /* }}} */
0
[ "CWE-416" ]
php-src
c2e197e4efc663ca55f393bf0e799848842286f3
7,543,889,042,063,017,000,000,000,000,000,000,000
11
Fix bug #70168 - Use After Free Vulnerability in unserialize() with SplObjectStorage
int http_res_set_status(unsigned int status, struct ist reason, struct stream *s) { struct htx *htx = htxbuf(&s->res.buf); char *res; chunk_reset(&trash); res = ultoa_o(status, trash.area, trash.size); trash.data = res - trash.area; /* Do we have a custom reason format string? */ if (!isttest(reason)) { cons...
0
[ "CWE-703", "CWE-835" ]
haproxy
bfb15ab34ead85f64cd6da0e9fb418c9cd14cee8
216,340,388,134,425,840,000,000,000,000,000,000,000
19
BUG/MAJOR: http/htx: prevent unbounded loop in http_manage_server_side_cookies Ensure calls to http_find_header() terminate. If a "Set-Cookie2" header is found then the while(1) loop in http_manage_server_side_cookies() will never terminate, resulting in the watchdog firing and the process terminating via SIGABRT. Th...
yum_repo_path(LrYumRepo *repo, const char *type) { assert(repo); for (GSList *elem = repo->paths; elem; elem = g_slist_next(elem)) { LrYumRepoPath *yumrepopath = elem->data; assert(yumrepopath); if (!strcmp(yumrepopath->type, type)) return yumrepopath->path; } return...
0
[ "CWE-22" ]
librepo
7daea2a2429a54dad68b1de9b37a5f65c5cf2600
69,266,026,049,519,150,000,000,000,000,000,000,000
12
Validate path read from repomd.xml (RhBug:1868639) = changelog = msg: Validate path read from repomd.xml type: security resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1868639
static time_t gf_mktime_utc(struct tm *tm) { static const time_t kTimeMax = ~(1L << (sizeof(time_t) * CHAR_BIT - 1)); static const time_t kTimeMin = (1L << (sizeof(time_t) * CHAR_BIT - 1)); time64_t result = timegm64(tm); if (result < kTimeMin || result > kTimeMax) return -1; return result; }
0
[ "CWE-787" ]
gpac
f3698bb1bce62402805c3fda96551a23101a32f9
28,402,457,110,933,740,000,000,000,000,000,000,000
9
fix buffer overrun in gf_bin128_parse closes #1204 closes #1205
ecma_free_symbol_list (jmem_cpointer_t symbol_list_cp) /**< symbol list */ { while (symbol_list_cp != JMEM_CP_NULL) { ecma_lit_storage_item_t *symbol_list_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_lit_storage_item_t, symbol_list_cp); for (int i = 0; i < ECMA_LIT_STORAGE_VALUE_COUNT; i++) { if (symbo...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
98,244,637,643,849,900,000,000,000,000,000,000,000
23
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
evdev_accel_config_get_default_profile(struct libinput_device *libinput_device) { struct evdev_device *device = evdev_device(libinput_device); if (!device->pointer.filter) return LIBINPUT_CONFIG_ACCEL_PROFILE_NONE; /* No device has a flat profile as default */ return LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE; }
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
196,148,648,393,114,500,000,000,000,000,000,000,000
10
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
xmlTreeNSListLookupByPrefix(xmlNsPtr nsList, const xmlChar *prefix) { if (nsList == NULL) return (NULL); { xmlNsPtr ns; ns = nsList; do { if ((prefix == ns->prefix) || xmlStrEqual(prefix, ns->prefix)) { return (ns); } ns = ns->next; } while (ns != NULL); } return (NULL); }
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
88,331,775,284,473,570,000,000,000,000,000,000,000
17
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...
bool InstanceKlass::verify_itable_index(int i) { int method_count = klassItable::method_count_for_interface(this); assert(i >= 0 && i < method_count, "index out of bounds"); return true; }
0
[]
jdk17u
f8eb9abe034f7c6bea4da05a9ea42017b3f80730
141,008,812,534,731,180,000,000,000,000,000,000,000
5
8270386: Better verification of scan methods Reviewed-by: coleenp Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
int write_to_dir(const char *dir, const char *name, const unsigned char *buffer, const size_t len) { char path[FILENAME_MAX]; int n = snprintf(path, sizeof(path), "%s%c%s", dir, separator, name); if (n < 0) { printf("Creating file name failed\n"); return ERROR; } if ((size_t) n >= si...
0
[ "CWE-476" ]
libmobi
c0699c8693c47f14a2e57dec7292e862ac7adf9c
175,139,734,503,926,300,000,000,000,000,000,000,000
13
Fix undefined behavior when passing null to strdup
static int ia5ncasecmp(const char *s1, const char *s2, size_t n) { for (; n > 0; n--, s1++, s2++) { if (*s1 != *s2) { unsigned char c1 = (unsigned char)*s1, c2 = (unsigned char)*s2; /* Convert to lower case */ if (c1 >= 0x41 /* A */ && c1 <= 0x5A /* Z */) ...
1
[ "CWE-125" ]
openssl
8393de42498f8be75cf0353f5c9f906a43a748d2
185,003,558,381,062,540,000,000,000,000,000,000,000
28
Fix the name constraints code to not assume NUL terminated strings ASN.1 strings may not be NUL terminated. Don't assume they are. CVE-2021-3712 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org>
CreateFileUploadErrMsg(char* reason, unsigned int reasonLen) { FileTransferMsg fileUploadErrMsg; int length = sz_rfbFileUploadCancelMsg + reasonLen; rfbFileUploadCancelMsg *pFDF = NULL; char *pFollow = NULL; char *pData = (char*) calloc(length, sizeof(char)); memset(&fileUploadErrMsg, 0, sizeof(FileTransferMsg)...
0
[ "CWE-416" ]
libvncserver
73cb96fec028a576a5a24417b57723b55854ad7b
109,208,071,550,163,830,000,000,000,000,000,000,000
27
tightvnc-filetransfer: wait for download thread end in CloseUndoneFileDownload() ...and use it when deregistering the file transfer extension. Closes #242
static int parallels_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVParallelsState *s = bs->opaque; int i; struct parallels_header ph; int ret; bs->read_only = 1; // no write support yet ret = bdrv_pread(bs->file, 0, &ph, sizeof(ph)); if...
1
[ "CWE-190" ]
qemu
afbcc40bee4ef51731102d7d4b499ee12fc182e1
334,611,132,469,020,100,000,000,000,000,000,000,000
44
parallels: Fix catalog size integer overflow (CVE-2014-0143) The first test case would cause a huge memory allocation, leading to a qemu abort; the second one to a too small malloc() for the catalog (smaller than s->catalog_size), which causes a read-only out-of-bounds array access and on big endian hosts an endianess...
static char *cover_definer_clause(const char *stmt_str, size_t stmt_length, const char *definer_version_str, uint definer_version_length, const char *stmt_version_str, ...
0
[ "CWE-319" ]
mysql-server
0002e1380d5f8c113b6bce91f2cf3f75136fd7c7
111,708,288,294,535,620,000,000,000,000,000,000,000
41
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec)
static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) { struct inode *inode = file->f_path.dentry->d_inode; loff_t len, vma_len; int ret; struct hstate *h = hstate_file(file); /* * vma address alignment (but not the pgoff alignment) has * already been checked by prepare_hugepage_range....
0
[ "CWE-399" ]
linux
90481622d75715bfcb68501280a917dbfe516029
230,244,352,525,980,500,000,000,000,000,000,000,000
44
hugepages: fix use after free bug in "quota" handling hugetlbfs_{get,put}_quota() are badly named. They don't interact with the general quota handling code, and they don't much resemble its behaviour. Rather than being about maintaining limits on on-disk block usage by particular users, they are instead about maintai...
static int ffs_sb_fill(struct super_block *sb, void *_data, int silent) { struct ffs_sb_fill_data *data = _data; struct inode *inode; struct ffs_data *ffs = data->ffs_data; ENTER(); ffs->sb = sb; data->ffs_data = NULL; sb->s_fs_info = ffs; sb->s_blocksize = PAGE_SIZE; sb->s_blo...
0
[ "CWE-416", "CWE-362" ]
linux
38740a5b87d53ceb89eb2c970150f6e94e00373a
212,475,278,229,832,900,000,000,000,000,000,000,000
34
usb: gadget: f_fs: Fix use-after-free When using asynchronous read or write operations on the USB endpoints the issuer of the IO request is notified by calling the ki_complete() callback of the submitted kiocb when the URB has been completed. Calling this ki_complete() callback will free kiocb. Make sure that the str...
setbit_wc (wint_t wc, charclass c) { abort (); /*NOTREACHED*/ return false; }
0
[ "CWE-189" ]
grep
cbbc1a45b9f843c811905c97c90a5d31f8e6c189
168,361,209,999,067,380,000,000,000,000,000,000,000
6
grep: fix some core dumps with long lines etc. These problems mostly occur because the code attempts to stuff sizes into int or into unsigned int; this doesn't work on most 64-bit hosts and the errors can lead to core dumps. * NEWS: Document this. * src/dfa.c (token): Typedef to ptrdiff_t, since the enum's range could...
lpr_inherit_res_contents(fz_context *ctx, pdf_obj *res, pdf_obj *dict, pdf_obj *text) { pdf_obj *o, *r; int i, n; /* If the parent node doesn't have an entry of this type, give up. */ o = pdf_dict_get(ctx, dict, text); if (!o) return; /* If the resources dict we are building doesn't have an entry of this * ...
0
[ "CWE-119" ]
mupdf
520cc26d18c9ee245b56e9e91f9d4fcae02be5f0
177,021,181,907,428,060,000,000,000,000,000,000,000
42
Bug 689699: Avoid buffer overrun. When cleaning a pdf file, various lists (of pdf_xref_len length) are defined early on. If we trigger a repair during the clean, this can cause pdf_xref_len to increase causing an overrun. Fix this by watching for changes in the length, and checking accesses to the list for validity....