func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
cr_tknzr_parse_escape (CRTknzr * a_this, guint32 * a_esc_code, CRParsingLocation *a_location) { enum CRStatus status = CR_OK; guint32 cur_char = 0; CRInputPos init_pos; guchar next_chars[2]; g_return_val_if_fail (a_this && PRIVATE (a_this) ...
0
[ "CWE-119" ]
libcroco
9ad72875e9f08e4c519ef63d44cdbd94aa9504f7
22,088,833,217,033,276,000,000,000,000,000,000,000
50
tknzr: support only max long rgb values This fixes a possible out of bound when reading rgbs which are longer than the support MAXLONG
attrhash_init (void) { attrhash = hash_create (attrhash_key_make, attrhash_cmp); }
0
[]
quagga
8794e8d229dc9fe29ea31424883433d4880ef408
338,497,655,342,300,600,000,000,000,000,000,000,000
4
bgpd: Fix regression in args consolidation, total should be inited from args * bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args.
ves_icall_Type_GetNestedType (MonoReflectionType *type, MonoString *name, guint32 bflags) { MonoDomain *domain; MonoClass *klass; MonoClass *nested; char *str; gpointer iter; MONO_ARCH_SAVE_REGS; if (name == NULL) mono_raise_exception (mono_get_exception_argument_null ("name")); domain = ((MonoObject *)...
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
165,476,773,882,893,100,000,000,000,000,000,000,000
57
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
static int ZEND_FASTCALL ZEND_CASE_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); int switch_expr_is_overloaded=0; zend_free_op free_op2; if (IS_CV==IS_VAR) { if (EX_T(opline->op1.u.var).var.ptr_ptr) { PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr); } else { switch_expr_is_ov...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
116,121,966,022,910,630,000,000,000,000,000,000,000
31
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static int selinux_netlink_send(struct sock *sk, struct sk_buff *skb) { int err = 0; u32 perm; struct nlmsghdr *nlh; struct sk_security_struct *sksec = sk->sk_security; if (skb->len < NLMSG_HDRLEN) { err = -EINVAL; goto out; } nlh = nlmsg_hdr(skb); err = selinux_nlmsg_lookup(sksec->sclass, nlh->nlmsg_type...
1
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
290,160,736,736,752,750,000,000,000,000,000,000,000
37
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
parse_ipqos(const char *cp) { u_int i; char *ep; long val; if (cp == NULL) return -1; for (i = 0; ipqos[i].name != NULL; i++) { if (strcasecmp(cp, ipqos[i].name) == 0) return ipqos[i].value; } /* Try parsing as an integer */ val = strtol(cp, &ep, 0); if (*cp == '\0' || *ep != '\0' || val < 0 || val > 2...
0
[]
openssh-portable
f3cbe43e28fe71427d41cfe3a17125b972710455
272,244,314,852,819,400,000,000,000,000,000,000,000
18
upstream: need initgroups() before setresgid(); reported by anton@, ok deraadt@ OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce
static void js_dumpproperty(js_State *J, js_Property *node) { minify = 0; if (node->left->level) js_dumpproperty(J, node->left); printf("\t%s: ", node->name); js_dumpvalue(J, node->value); printf(",\n"); if (node->right->level) js_dumpproperty(J, node->right); }
0
[ "CWE-476" ]
mujs
f5b3c703e18725e380b83427004632e744f85a6f
208,045,144,506,710,820,000,000,000,000,000,000,000
11
Issue #161: Cope with empty programs in mujs-pp.
static void scalar_min_max_and(struct bpf_reg_state *dst_reg, struct bpf_reg_state *src_reg) { bool src_known = tnum_is_const(src_reg->var_off); bool dst_known = tnum_is_const(dst_reg->var_off); s64 smin_val = src_reg->smin_value; u64 umax_val = src_reg->umax_value; if (src_known && dst_known) { __mar...
0
[]
linux
9b00f1b78809309163dda2d044d9e94a3c0248a3
224,952,343,232,342,460,000,000,000,000,000,000,000
34
bpf: Fix truncation handling for mod32 dst reg wrt zero Recently noticed that when mod32 with a known src reg of 0 is performed, then the dst register is 32-bit truncated in verifier: 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (b7) r0 = 0 1: R0_w=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 1: (b7) r1 = -1 2: R0_w=inv...
static int manager_connect_rtnl(Manager *m) { int fd, r; assert(m); fd = systemd_netlink_fd(); if (fd < 0) r = sd_netlink_open(&m->rtnl); else r = sd_netlink_open_fd(&m->rtnl, fd); if (r < 0) return r; r = sd_netl...
0
[ "CWE-120" ]
systemd
f5a8c43f39937d97c9ed75e3fe8621945b42b0db
284,403,259,142,573,980,000,000,000,000,000,000,000
47
networkd: IPv6 router discovery - follow IPv6AcceptRouterAdvertisemnt= The previous behavior: When DHCPv6 was enabled, router discover was performed first, and then DHCPv6 was enabled only if the relevant flags were passed in the Router Advertisement message. Moreover, router discovery was performed even if AcceptRout...
dns_cache_lookup(struct module_env* env, uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint16_t flags, struct regional* region, struct regional* scratch, int no_partial) { struct lruhash_entry* e; struct query_info k; hashvalue_type h; time_t now = *env->now; struct ub_packed_rrset_key* rrse...
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
316,691,055,445,084,700,000,000,000,000,000,000,000
164
- CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. - CVE-2020-12663 Malformed answers from upstream name servers can be used to make Unbound unresponsive.
static int reconnect(void) { /* purecov: begin tested */ if (opt_reconnect) { put_info("No connection. Trying to reconnect...",INFO_INFO); (void) com_connect((String *) 0, 0); if (opt_rehash) com_rehash(NULL, NULL); } if (!connected) return put_info("Can't connect to the server\n",INFO_E...
0
[]
server
383007c75d6ef5043fa5781956a6a02b24e2b79e
231,756,851,414,107,250,000,000,000,000,000,000,000
17
mysql cli: fix USE command quoting * use proper sql quoting rules for USE, while preserving as much of historical behavior as possible * short commands (\u) behave as before
static bool stacksafe(struct bpf_func_state *old, struct bpf_func_state *cur, struct idpair *idmap) { int i, spi; /* walk slots of the explored stack and ignore any additional * slots in the current stack, since explored(safe) state * didn't use them */ for (i = 0; i < old->allocated_stack; i+...
0
[ "CWE-703", "CWE-189" ]
linux
979d63d50c0c0f7bc537bf821e056cc9fe5abd38
310,381,048,998,414,470,000,000,000,000,000,000,000
64
bpf: prevent out of bounds speculation on pointer arithmetic Jann reported that the original commit back in b2157399cc98 ("bpf: prevent out-of-bounds speculation") was not sufficient to stop CPU from speculating out of bounds memory access: While b2157399cc98 only focussed on masking array map access for unprivileged ...
subOpSCP(T_ASC_Association **subAssoc) { T_DIMSE_Message msg; T_ASC_PresentationContextID presID; if (!ASC_dataWaiting(*subAssoc, 0)) /* just in case */ return DIMSE_NODATAAVAILABLE; OFCondition cond = DIMSE_receiveCommand(*subAssoc, opt_blockMode, opt_dimse_timeout, &presID, &msg, NULL); ...
0
[ "CWE-264" ]
dcmtk
beaf5a5c24101daeeafa48c375120b16197c9e95
182,030,095,590,649,500,000,000,000,000,000,000,000
58
Make sure to handle setuid() return code properly. In some tools the return value of setuid() is not checked. In the worst case this could lead to privilege escalation since the process does not give up its root privileges and continue as root.
virtual my_decimal *val_decimal(Hybrid_type *val, my_decimal *buf) const { int2my_decimal(E_DEC_FATAL_ERROR, val->integer, 0, &val->dec_buf[2]); return &val->dec_buf[2]; }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
224,032,277,653,003,420,000,000,000,000,000,000,000
5
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
void LibRaw::parse_x3f() { x3f_t *x3f = x3f_new_from_file(libraw_internal_data.internal_data.input); if(!x3f) return; _x3f_data = x3f; x3f_header_t *H = NULL; x3f_directory_section_t *DS = NULL; H = &x3f->header; // Parse RAW size from RAW section x3f_directory_entry_t *DE = x3f_get_raw(x3f); ...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
337,364,027,967,448,240,000,000,000,000,000,000,000
143
fixed two more problems found by fuzzer
static void unix_peek_fds(struct scm_cookie *scm, struct sk_buff *skb) { scm->fp = scm_fp_dup(UNIXCB(skb).fp); /* * Garbage collection of unix sockets starts by selecting a set of * candidate sockets which have reference only from being in flight * (total_refs == inflight_refs). This condition is checked once...
0
[ "CWE-362" ]
linux
cbcf01128d0a92e131bd09f1688fe032480b65ca
155,742,457,866,999,480,000,000,000,000,000,000,000
46
af_unix: fix garbage collect vs MSG_PEEK unix_gc() assumes that candidate sockets can never gain an external reference (i.e. be installed into an fd) while the unix_gc_lock is held. Except for MSG_PEEK this is guaranteed by modifying inflight count under the unix_gc_lock. MSG_PEEK does not touch any variable protec...
static void pobject(int d, js_Ast *list) { pc('{'); if (list) { nl(); in(d+1); } while (list) { js_Ast *kv = list->a; assert(list->type == AST_LIST); switch (kv->type) { default: break; case EXP_PROP_VAL: pexpi(d+1, COMMA, kv->a); pc(':'); sp(); pexpi(d+1, COMMA, kv->b); break; case EXP_...
0
[ "CWE-476" ]
mujs
f5b3c703e18725e380b83427004632e744f85a6f
218,270,394,450,879,380,000,000,000,000,000,000,000
46
Issue #161: Cope with empty programs in mujs-pp.
GF_Err ainf_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_AssetInformationBox *ptr = (GF_AssetInformationBox *) s; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u32(bs, ptr->profile_version); if (ptr->APID) gf_bs_write_data(bs, ptr->APID, (u32) strlen(ptr->APID) ); gf_bs_...
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
40,398,323,328,986,560,000,000,000,000,000,000,000
13
fixed #2255
static __u16 sctp_ulpq_renege_order(struct sctp_ulpq *ulpq, __u16 needed) { __u16 freed = 0; __u32 tsn; struct sk_buff *skb; struct sctp_ulpevent *event; struct sctp_tsnmap *tsnmap; tsnmap = &ulpq->asoc->peer.tsn_map; while ((skb = __skb_dequeue_tail(&ulpq->lobby)) != NULL) { freed += skb_headlen(skb); eve...
0
[]
linux-2.6
672e7cca17ed6036a1756ed34cf20dbd72d5e5f6
197,772,294,825,443,160,000,000,000,000,000,000,000
23
[SCTP]: Prevent possible infinite recursion with multiple bundled DATA. There is a rare situation that causes lksctp to go into infinite recursion and crash the system. The trigger is a packet that contains at least the first two DATA fragments of a message bundled together. The recursion is triggered when the user d...
static inline void put_tpel_pixels_mc02_c(uint8_t *dst, const uint8_t *src, int stride, int width, int height){ int i,j; for (i=0; i < height; i++) { for (j=0; j < width; j++) { dst[j] = (683*(src[j] + 2*src[j+stride] + 1)) >> 11; } src += stride; dst += stride; } }
0
[ "CWE-703", "CWE-189" ]
FFmpeg
454a11a1c9c686c78aa97954306fb63453299760
19,827,835,724,358,314,000,000,000,000,000,000,000
10
avcodec/dsputil: fix signedness in sizeof() comparissions Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static void iriap_watchdog_timer_expired(void *data) { struct iriap_cb *self = (struct iriap_cb *) data; IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == IAS_MAGIC, return;); /* iriap_close(self); */ }
0
[]
linux-2.6
d370af0ef7951188daeb15bae75db7ba57c67846
255,938,190,408,572,900,000,000,000,000,000,000,000
9
irda: validate peer name and attribute lengths Length fields provided by a peer for names and attributes may be longer than the destination array sizes. Validate lengths to prevent stack buffer overflows. Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com> Cc: stable@kernel.org Signed-off-by: David S. Miller <da...
SPL_METHOD(SplDoublyLinkedList, valid) { spl_dllist_object *intern = (spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (zend_parse_parameters_none() == FAILURE) { return; } RETURN_BOOL(intern->traverse_pointer != NULL); }
1
[ "CWE-416" ]
php-src
863bf294feb9ad425eadb94f288bc7f18673089d
277,450,256,872,016,560,000,000,000,000,000,000,000
10
Fixed bug #70169 (Use After Free Vulnerability in unserialize() with SplDoublyLinkedList)
int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev) { struct device_node *np = p->dev->of_node; int state, ret; char *propname; struct property *prop; const char *statename; const __be32 *list; int size, config; phandle phandle; struct device_node *np_config; /* CONFIG_OF enabled, p->dev no...
0
[ "CWE-125" ]
linux
be4c60b563edee3712d392aaeb0943a768df7023
119,951,342,564,490,230,000,000,000,000,000,000,000
86
pinctrl: devicetree: Avoid taking direct reference to device name string When populating the pinctrl mapping table entries for a device, the 'dev_name' field for each entry is initialised to point directly at the string returned by 'dev_name()' for the device and subsequently used by 'create_pinctrl()' when looking up...
static int usb_8dev_wait_cmd_msg(struct usb_8dev_priv *priv, u8 *msg, int size, int *actual_length) { return usb_bulk_msg(priv->udev, usb_rcvbulkpipe(priv->udev, USB_8DEV_ENDP_CMD_RX), msg, size, actual_length, USB_8DEV_CMD_TIMEOUT); }
0
[ "CWE-415" ]
linux
3d3925ff6433f98992685a9679613a2cc97f3ce2
212,171,350,120,927,430,000,000,000,000,000,000,000
7
can: usb_8dev: usb_8dev_start_xmit(): fix double dev_kfree_skb() in error path There is no need to call dev_kfree_skb() when usb_submit_urb() fails because can_put_echo_skb() deletes original skb and can_free_echo_skb() deletes the cloned skb. Fixes: 0024d8ad1639 ("can: usb_8dev: Add support for USB2CAN interface fro...
pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) { pgd_t *pgd; pud_t *pud; pmd_t *pmd; pte_t *pte = NULL; pgd = pgd_offset(mm, addr); if (!pgd_none(*pgd)) { pud = pud_offset(pgd, addr); if (!pud_none(*pud)) { pmd = pmd_offset(pud, addr); if (!pmd_none(*pmd)) { if (is_hugetlb_pmd(*pm...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
293,235,955,413,869,400,000,000,000,000,000,000,000
23
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static int vm_stat_get(void *_offset, u64 *val) { unsigned offset = (long)_offset; struct kvm *kvm; u64 tmp_val; *val = 0; mutex_lock(&kvm_lock); list_for_each_entry(kvm, &vm_list, vm_list) { kvm_get_stat_per_vm(kvm, offset, &tmp_val); *val += tmp_val; } mutex_unlock(&kvm_lock); return 0;
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
183,749,233,642,864,130,000,000,000,000,000,000,000
15
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 void spl_filesystem_tree_it_rewind(zend_object_iterator *iter) { spl_filesystem_iterator *iterator = (spl_filesystem_iterator *)iter; spl_filesystem_object *object = spl_filesystem_iterator_to_object(iterator); object->u.dir.index = 0; if (object->u.dir.dirp) { php_stream_rewinddir(object->u.dir.dirp)...
0
[ "CWE-74" ]
php-src
a5a15965da23c8e97657278fc8dfbf1dfb20c016
77,822,528,608,394,940,000,000,000,000,000,000,000
17
Fix #78863: DirectoryIterator class silently truncates after a null byte Since the constructor of DirectoryIterator and friends is supposed to accepts paths (i.e. strings without NUL bytes), we must not accept arbitrary strings.
static void encode_getfattr(struct xdr_stream *xdr, const u32* bitmask, struct compound_hdr *hdr) { encode_getattr(xdr, nfs4_fattr_bitmap, bitmask, ARRAY_SIZE(nfs4_fattr_bitmap), hdr); }
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
329,104,622,253,858,200,000,000,000,000,000,000,000
5
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
int kvm_read_guest_offset_cached(struct kvm *kvm, struct gfn_to_hva_cache *ghc, void *data, unsigned int offset, unsigned long len) { struct kvm_memslots *slots = kvm_memslots(kvm); int r; gpa_t gpa = ghc->gpa + offset; BUG_ON(len + offset > ghc->len); if (slots->generation != ghc->generation) { if (...
0
[ "CWE-401" ]
linux
f65886606c2d3b562716de030706dfe1bea4ed5e
264,761,070,425,815,500,000,000,000,000,000,000,000
27
KVM: fix memory leak in kvm_io_bus_unregister_dev() when kmalloc() fails in kvm_io_bus_unregister_dev(), before removing the bus, we should iterate over all other devices linked to it and call kvm_iodevice_destructor() for them Fixes: 90db10434b16 ("KVM: kvm_io_bus_unregister_dev() should never fail") Cc: stable@vger...
static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len) { int i; uint16_t limit; VncDisplay *vd = vs->vd; if (data[0] > 3) { update_displaychangelistener(&vd->dcl, VNC_REFRESH_INTERVAL_BASE); } switch (data[0]) { case VNC_MSG_CLIENT_SET_PIXEL_FORMAT: if (len...
1
[ "CWE-703", "CWE-835" ]
qemu
f9a70e79391f6d7c2a912d785239ee8effc1922d
134,241,989,503,304,130,000,000,000,000,000,000,000
140
ui/vnc: limit client_cut_text msg payload size currently a malicious client could define a payload size of 2^32 - 1 bytes and send up to that size of data to the vnc server. The server would allocated that amount of memory which could easily create an out of memory condition. This patch limits the payload size to 1MB...
static void SFS_AddString(ScriptParser *parser, char *str) { char *new_str; if (!str) return; if (strlen(parser->string) + strlen(str) >= parser->length) { parser->length = (u32) ( strlen(parser->string) + strlen(str) + PARSER_STEP_ALLOC ); new_str = (char *)gf_malloc(sizeof(char)*parser->length); strcpy(new_s...
0
[ "CWE-476" ]
gpac
4e7736d7ec7bf64026daa611da951993bb42fdaf
190,537,699,684,186,120,000,000,000,000,000,000,000
13
fixed #2238
hb_set_set (hb_set_t *set, const hb_set_t *other) { if (unlikely (hb_object_is_immutable (set))) return; set->set (*other); }
1
[ "CWE-787" ]
harfbuzz
d3e09bf4654fe5478b6dbf2b26ebab6271317d81
89,517,365,990,408,790,000,000,000,000,000,000,000
8
[set] Make all operators null-safe again Changed my mind. Also for hb_map_clear(). Part of https://github.com/harfbuzz/harfbuzz/pull/3162
datetime_to_date(VALUE self) { get_d1a(self); if (simple_dat_p(adat)) { VALUE new = d_lite_s_alloc_simple(cDate); { get_d1b(new); bdat->s = adat->s; bdat->s.jd = m_local_jd(adat); return new; } } else { VALUE new = d_lite_s_alloc_simple(cDate); { get_d1b(new); copy_co...
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
188,199,416,530,176,970,000,000,000,000,000,000,000
24
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
bool Item_func_group_concat::add() { if (always_null) return 0; copy_fields(tmp_table_param); if (copy_funcs(tmp_table_param->items_to_copy, table->in_use)) return TRUE; size_t row_str_len= 0; StringBuffer<MAX_FIELD_WIDTH> buf; String *res; for (uint i= 0; i < arg_count_field; i++) { Item *...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
207,393,617,448,131,400,000,000,000,000,000,000,000
66
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
static int x25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { struct sock *sk = sock->sk; struct sockaddr_x25 *addr = (struct sockaddr_x25 *)uaddr; int len, i, rc = 0; if (addr_len != sizeof(struct sockaddr_x25) || addr->sx25_family != AF_X25 || strnlen(addr->sx25_addr.x25_addr, X25_AD...
0
[]
net
7781607938c8371d4c2b243527430241c62e39c2
259,839,467,690,217,400,000,000,000,000,000,000,000
38
net/x25: Fix null-ptr-deref caused by x25_disconnect When the link layer is terminating, x25->neighbour will be set to NULL in x25_disconnect(). As a result, it could cause null-ptr-deref bugs in x25_sendmsg(),x25_recvmsg() and x25_connect(). One of the bugs is shown below. (Thread 1) | (Thread 2...
void ndpi_check_flow_func(struct ndpi_detection_module_struct *ndpi_str, struct ndpi_flow_struct *flow, NDPI_SELECTION_BITMASK_PROTOCOL_SIZE *ndpi_selection_packet) { if(flow->packet.tcp != NULL) check_ndpi_tcp_flow_func(ndpi_str, flow, ndpi_selection_packet); else if(flow->packet.udp ...
0
[ "CWE-416", "CWE-787" ]
nDPI
6a9f5e4f7c3fd5ddab3e6727b071904d76773952
246,221,631,063,878,800,000,000,000,000,000,000,000
9
Fixed use after free caused by dangling pointer * This fix also improved RCE Injection detection Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
static int domore_getsock(struct connectdata *conn, curl_socket_t *socks, int numsocks) { if(conn && conn->handler->domore_getsock) return conn->handler->domore_getsock(conn, socks, numsocks); return GETSOCK_BLANK; }
0
[ "CWE-416" ]
curl
75dc096e01ef1e21b6c57690d99371dedb2c0b80
53,528,171,438,129,360,000,000,000,000,000,000,000
8
curl_multi_cleanup: clear connection pointer for easy handles CVE-2016-5421 Bug: https://curl.haxx.se/docs/adv_20160803C.html Reported-by: Marcelo Echeverria and Fernando Muñoz
static void lan9118_writew(void *opaque, hwaddr offset, uint32_t val) { lan9118_state *s = (lan9118_state *)opaque; offset &= 0xff; if (s->write_word_prev_offset != (offset & ~0x3)) { /* New offset, reset word counter */ s->write_word_n = 0; s->write_word_...
0
[ "CWE-835" ]
qemu
37cee01784ff0df13e5209517e1b3594a5e792d1
331,270,887,129,209,700,000,000,000,000,000,000,000
26
lan9118: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.co...
aiptek_set_report(struct aiptek *aiptek, unsigned char report_type, unsigned char report_id, void *buffer, int size) { return usb_control_msg(aiptek->usbdev, usb_sndctrlpipe(aiptek->usbdev, 0), USB_REQ_SET_REPORT, USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_OUT, (repo...
0
[ "CWE-476", "CWE-401" ]
linux
8e20cf2bce122ce9262d6034ee5d5b76fbb92f96
25,307,916,270,392,826,000,000,000,000,000,000,000
11
Input: aiptek - fix crash on detecting device without endpoints The aiptek driver crashes in aiptek_probe() when a specially crafted USB device without endpoints is detected. This fix adds a check that the device has proper configuration expected by the driver. Also an error return value is changed to more matching on...
tcf_action_get_1(struct nlattr *nla, struct nlmsghdr *n, u32 portid) { struct nlattr *tb[TCA_ACT_MAX + 1]; struct tc_action *a; int index; int err; err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL); if (err < 0) goto err_out; err = -EINVAL; if (tb[TCA_ACT_INDEX] == NULL || nla_len(tb[TCA_ACT_INDEX]) <...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
325,325,392,202,562,200,000,000,000,000,000,000,000
40
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
static void mutt_srandom (void) { struct timeval tv; unsigned seed; gettimeofday(&tv, NULL); /* POSIX.1-2008 states that seed is 'unsigned' without specifying its width. * Use as many of the lower order bits from the current time of day as the seed. * If the upper bound is truncated, that is fine. */ ...
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
253,158,079,581,763,750,000,000,000,000,000,000,000
13
use a 64-bit random value in temporary filenames. closes #3158
void ioat_kobject_add(struct ioatdma_device *device, struct kobj_type *type) { struct dma_device *dma = &device->common; struct dma_chan *c; list_for_each_entry(c, &dma->channels, device_node) { struct ioat_chan_common *chan = to_chan_common(c); struct kobject *parent = &c->dev->device.kobj; int err; err =...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
307,737,653,467,716,650,000,000,000,000,000,000,000
19
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...
void* inPlaceSerialize_Polygon(SGeometry * ge, std::vector<int>& pnc, int ring_count, size_t seek_begin, void * serializeBegin) { int8_t header = PLATFORM_HEADER; uint32_t t = ge->get_axisCount() == 2 ? wkbPolygon: ge->get_axisCount() == 3 ? wkbPolygon25D: wkbNo...
0
[ "CWE-787" ]
gdal
767e3a56144f676ca738ef8f700e0e56035bd05a
13,625,400,326,723,750,000,000,000,000,000,000,000
41
netCDF: avoid buffer overflow. master only. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15143. Credit to OSS Fuzz
dump_ct_seq_adj(struct sk_buff *skb, const struct nf_ct_seqadj *seq, int type) { struct nlattr *nest_parms; nest_parms = nla_nest_start(skb, type); if (!nest_parms) goto nla_put_failure; if (nla_put_be32(skb, CTA_SEQADJ_CORRECTION_POS, htonl(seq->correction_pos)) || nla_put_be32(skb, CTA_SEQADJ_OFFSET_...
0
[ "CWE-120" ]
linux
1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6
136,846,055,457,139,520,000,000,000,000,000,000,000
23
netfilter: ctnetlink: add a range check for l3/l4 protonum The indexes to the nf_nat_l[34]protos arrays come from userspace. So check the tuple's family, e.g. l3num, when creating the conntrack in order to prevent an OOB memory access during setup. Here is an example kernel panic on 4.14.180 when userspace passes in ...
ofputil_protocols_to_version_bitmap(enum ofputil_protocol protocols) { uint32_t bitmap = 0; for (; protocols; protocols = zero_rightmost_1bit(protocols)) { enum ofputil_protocol protocol = rightmost_1bit(protocols); bitmap |= 1u << ofputil_protocol_to_ofp_version(protocol); } return b...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
240,345,982,514,020,460,000,000,000,000,000,000,000
12
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 void destroy_swap_extents(struct swap_info_struct *sis) { while (!list_empty(&sis->first_swap_extent.list)) { struct swap_extent *se; se = list_entry(sis->first_swap_extent.list.next, struct swap_extent, list); list_del(&se->list); kfree(se); } }
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
309,460,215,002,457,000,000,000,000,000,000,000,000
11
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
void csync_file_flush(const char *filename) { SQL("Removing file from dirty db", "delete from dirty where filename ='%s'", url_encode(filename)); }
0
[ "CWE-703" ]
csync2
416f1de878ef97e27e27508914f7ba8599a0be22
118,398,781,529,156,440,000,000,000,000,000,000,000
6
fail HELLO command when SSL is required
get_eligible_guards(const or_options_t *options, guard_selection_t *gs, int *n_guards_out) { /* Construct eligible_guards as GUARDS - SAMPLED_GUARDS */ smartlist_t *eligible_guards = smartlist_new(); int n_guards = 0; // total size of "GUARDS" if (gs->type == GS_TYPE_BRI...
0
[ "CWE-200" ]
tor
665baf5ed5c6186d973c46cdea165c0548027350
228,530,791,714,287,430,000,000,000,000,000,000,000
52
Consider the exit family when applying guard restrictions. When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code ...
static BrotliDecoderErrorCode DecodeContextMap(uint32_t context_map_size, uint32_t* num_htrees, uint8_t** context_map_arg, BrotliDecoderState* s) { BrotliBitReader* br = &s->br;...
0
[ "CWE-120" ]
brotli
223d80cfbec8fd346e32906c732c8ede21f0cea6
91,316,023,845,412,760,000,000,000,000,000,000,000
126
Update (#826) * IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB * simplify max Huffman table size calculation * eliminate symbol duplicates (static arrays in .h files) * minor combing in research/ code
sequence_options(Oid relid) { HeapTuple pgstuple; Form_pg_sequence pgsform; List *options = NIL; pgstuple = SearchSysCache1(SEQRELID, relid); if (!HeapTupleIsValid(pgstuple)) elog(ERROR, "cache lookup failed for sequence %u", relid); pgsform = (Form_pg_sequence) GETSTRUCT(pgstuple); /* Use makeFloat() for...
0
[ "CWE-94" ]
postgres
7e92f78abe80e4b30e648a40073abb59057e21f8
191,324,770,456,268,160,000,000,000,000,000,000,000
29
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
unsigned lodepng_is_palette_type(const LodePNGColorMode* info) { return info->colortype == LCT_PALETTE; }
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
257,574,147,003,981,370,000,000,000,000,000,000,000
4
Fixed #5645: realloc return handling
inline bool ReduceSumImpl(const In* input_data, const int* input_dims, const int* output_dims, const int input_num_dims, const int output_num_dims, const int* axis, const int num_axis, int* input_iter, Out* output_da...
0
[ "CWE-119", "CWE-787" ]
tensorflow
2d88f470dea2671b430884260f3626b1fe99830a
39,929,886,510,372,660,000,000,000,000,000,000,000
13
[tflite] Ensure `ResolveAxis` properly handles negative inputs. In Python, a list `l` of length `n` allows indexing with negative indices, `l[i]`. The only constraint is that `n + i` becomes positive. Code in `ResolveAxis` assumes the constraints and only checks it using a `DCHECK`. But the macro is a no-op in non-deb...
static int nf_tables_dump_flowtable_start(struct netlink_callback *cb) { const struct nlattr * const *nla = cb->data; struct nft_flowtable_filter *filter = NULL; if (nla[NFTA_FLOWTABLE_TABLE]) { filter = kzalloc(sizeof(*filter), GFP_ATOMIC); if (!filter) return -ENOMEM; filter->table = nla_strdup(nla[NFTA...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
63,841,636,270,055,040,000,000,000,000,000,000,000
21
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
snmp_vrrp_handler(__attribute__((unused)) vector_t *strvec) { global_data->enable_snmp_vrrp = true; }
0
[ "CWE-200" ]
keepalived
c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067
301,400,072,377,306,560,000,000,000,000,000,000,000
4
Add command line and configuration option to set umask Issue #1048 identified that files created by keepalived are created with mode 0666. This commit changes the default to 0644, and also allows the umask to be specified in the configuration or as a command line option. Signed-off-by: Quentin Armitage <quentin@armit...
static int opfisubr(RAsm *a, ut8 *data, const Opcode *op) { int l = 0; switch (op->operands_count) { case 1: if ( op->operands[0].type & OT_MEMORY ) { if ( op->operands[0].type & OT_DWORD ) { data[l++] = 0xda; data[l++] = 0x28 | op->operands[0].regs[0]; } else if ( op->operands[0].type & OT_WORD ) { ...
0
[ "CWE-119", "CWE-125", "CWE-787" ]
radare2
9b46d38dd3c4de6048a488b655c7319f845af185
2,424,409,609,744,167,000,000,000,000,000,000,000
23
Fix #12372 and #12373 - Crash in x86 assembler (#12380) 0 ,0,[bP-bL-bP-bL-bL-r-bL-bP-bL-bL- mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx-- leA ,0,[bP-bL-bL-bP-bL-bP-bL-60@bL- leA ,0,[bP-bL-r-bP-bL-bP-bL-60@bL- mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx--
ZEND_METHOD(CURLFile, getMimeType) { curlfile_get_property("mime", INTERNAL_FUNCTION_PARAM_PASSTHRU); }
0
[ "CWE-416" ]
php-src
0e6fe3a4c96be2d3e88389a5776f878021b4c59f
219,658,230,073,003,180,000,000,000,000,000,000,000
4
Fix bug #73147: Use After Free in PHP7 unserialize()
static void unix_copy_addr(struct msghdr *msg, struct sock *sk) { struct unix_address *addr = smp_load_acquire(&unix_sk(sk)->addr); if (addr) { msg->msg_namelen = addr->len; memcpy(msg->msg_name, addr->name, addr->len); } }
0
[ "CWE-362" ]
linux
cbcf01128d0a92e131bd09f1688fe032480b65ca
204,528,208,053,010,270,000,000,000,000,000,000,000
9
af_unix: fix garbage collect vs MSG_PEEK unix_gc() assumes that candidate sockets can never gain an external reference (i.e. be installed into an fd) while the unix_gc_lock is held. Except for MSG_PEEK this is guaranteed by modifying inflight count under the unix_gc_lock. MSG_PEEK does not touch any variable protec...
relpTcpSetPermittedPeers(relpTcp_t __attribute__((unused)) *pThis, relpPermittedPeers_t __attribute__((unused)) *pPeers) { ENTER_RELPFUNC; #ifdef ENABLE_TLS int i; relpTcpFreePermittedPeers(pThis); if(pPeers->nmemb != 0) { if((pThis->permittedPeers.peer = malloc(sizeof(tcpPermittedPeerEntry_t) * pPeers->nmemb...
0
[ "CWE-787" ]
librelp
2cfe657672636aa5d7d2a14cfcb0a6ab9d1f00cf
211,258,358,754,492,100,000,000,000,000,000,000,000
28
unify error message generation
static void ifstat (LexState *ls, int line) { /* ifstat -> IF cond THEN block {ELSEIF cond THEN block} [ELSE block] END */ FuncState *fs = ls->fs; int escapelist = NO_JUMP; /* exit list for finished parts */ test_then_block(ls, &escapelist); /* IF cond THEN block */ while (ls->t.token == TK_ELSEIF) test...
0
[ "CWE-125" ]
lua
1f3c6f4534c6411313361697d98d1145a1f030fa
130,619,683,169,783,170,000,000,000,000,000,000,000
12
Bug: Lua can generate wrong code when _ENV is <const>
void SendMessage(v8::Isolate* isolate, gin_helper::ErrorThrower thrower, bool internal, const std::string& channel, v8::Local<v8::Value> arguments) { if (!electron_browser_remote_) { thrower.ThrowError(kIPCMethodCalledAfterContextRe...
1
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
46,785,751,028,299,200,000,000,000,000,000,000,000
15
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
intrusive_ptr<Expression> ExpressionDateFromString::optimize() { _dateString = _dateString->optimize(); if (_timeZone) { _timeZone = _timeZone->optimize(); } if (ExpressionConstant::allNullOrConstant({_dateString, _timeZone})) { // Everything is a constant, so we can turn into a constan...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
46,833,808,103,659,040,000,000,000,000,000,000,000
12
SERVER-38070 fix infinite loop in agg expression
assignment (string, flags) const char *string; int flags; { register unsigned char c; register int newi, indx; c = string[indx = 0]; #if defined (ARRAY_VARS) if ((legal_variable_starter (c) == 0) && (flags == 0 || c != '[')) /* ] */ #else if (legal_variable_starter (c) == 0) #endif return (0);...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
327,072,305,663,948,900,000,000,000,000,000,000,000
48
bash-4.4-rc2 release
void ciEnv::dump_replay_data(int compile_id) { static char buffer[O_BUFLEN]; int ret = jio_snprintf(buffer, O_BUFLEN, "replay_pid%p_compid%d.log", os::current_process_id(), compile_id); if (ret > 0) { int fd = os::open(buffer, O_RDWR | O_CREAT | O_TRUNC, 0666); if (fd != -1) { FILE* replay_data_file...
0
[]
jdk17u
8be0fc09f0ba2dd1dbfd6627456fa929d5574b04
315,064,474,979,238,230,000,000,000,000,000,000,000
17
8281859: Improve class compilation Reviewed-by: mbaesken Backport-of: 3ac62a66efd05d0842076dd4cfbea0e53b12630f
static void io_attempt_cancel(struct io_ring_ctx *ctx, struct io_kiocb *req) { enum io_wq_cancel cret; /* cancel this particular work, if it's running */ cret = io_wq_cancel_work(ctx->io_wq, &req->work); if (cret != IO_WQ_CANCEL_NOTFOUND) return; /* find links that hold this pending, cancel those */ cret = io...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
214,388,145,708,971,370,000,000,000,000,000,000,000
21
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
SaltTextAway(XtermWidget xw, int which, CELL *cellc, CELL *cell) { TScreen *screen = TScreenOf(xw); SelectedCells *scp; int i; int eol; int need = 0; size_t have = 0; Char *line; Char *lp; CELL first = *cellc; CELL last = *cell; if (which < 0 || which >= MA...
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
51,955,570,393,642,120,000,000,000,000,000,000,000
102
snapshot of project "xterm", label xterm-365d
static size_t pull_ucs2(char *dest, const void *src, size_t dest_len, size_t src_len, int flags) { size_t size = 0; if (ucs2_align(NULL, src, flags)) { src = (const void *)((const char *)src + 1); if (src_len > 0) src_len--; } if (flags & STR_TERMINATE) { if (src_len == (size_t)-1) { src_len = utf16_l...
0
[ "CWE-200" ]
samba
ba5dbda6d0174a59d221c45cca52ecd232820d48
36,874,785,061,083,067,000,000,000,000,000,000,000
29
CVE-2015-5330: Fix handling of unicode near string endings Until now next_codepoint_ext() and next_codepoint_handle_ext() were using strnlen(str, 5) to determine how much string they should try to decode. This ended up looking past the end of the string when it was not null terminated and the final character looked li...
long MemIo::tell() const { return p_->idx_; }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
313,371,379,387,896,780,000,000,000,000,000,000,000
4
Fix https://github.com/Exiv2/exiv2/issues/55
static int rgbvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps) { os_ptr op = osp; int i; if (num_comps < 3) return_error(gs_error_stackunderflow); op -= 2; for (i=0;i<3;i++) { if (!r_has_type(op, t_integer) && !r_has_type(op, t_real)) return_error(gs...
0
[]
ghostpdl
b326a71659b7837d3acde954b18bda1a6f5e9498
86,551,879,392,945,530,000,000,000,000,000,000,000
25
Bug 699655: Properly check the return value.... ...when getting a value from a dictionary
NodeInfo() : NodeInfo(-1) {}
0
[ "CWE-125", "CWE-369", "CWE-908" ]
tensorflow
0cc38aaa4064fd9e79101994ce9872c6d91f816b
311,499,846,850,306,850,000,000,000,000,000,000,000
1
Prevent unitialized memory access in `GraphConstructor::MakeEdge` The `MakeEdge` implementation assumes that there exists an output at `output_index` of `src` node and an input at `input_index` of `dst` node. However, if this is not the case this results in accessing data out of bounds. Because we are accessing an arr...
void handler::unbind_psi() { /* Notify the instrumentation that this table is not owned by this thread any more. */ PSI_CALL_unbind_table(m_psi); }
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
321,691,092,656,713,470,000,000,000,000,000,000,000
8
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
static int cap_sb_check_sb(struct vfsmount *mnt, struct path *path) { return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
18,605,094,690,625,710,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
bool Discovered_table_list::add_table(const char *tname, size_t tlen) { /* TODO Check with_temps and filter out temp tables. Implement the check, when we'll have at least one affected engine (with custom discover_table_names() method, that calls add_table() directly). Note: avoid comparing the same na...
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
49,676,206,960,752,710,000,000,000,000,000,000,000
17
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
std::wstring GetUniqueTempDirectoryPrefix() { wchar_t tmpdir[MAX_PATH + 1]; if (GetTempPath(MAX_PATH + 1, tmpdir) == 0) throw Win32Exception("Cannot create temporary directory"); std::wstring dir(tmpdir); dir += L"Update-"; return dir; }
0
[ "CWE-426", "CWE-401" ]
winsparkle
bb454857348245a7397f9e4fbb3a902f4ac25913
94,781,866,324,177,160,000,000,000,000,000,000,000
10
Verify UpdateTempDir isn't maliciously modified Don't just delete the stored updates temporary directory on launch, but validate the registry key to ensure it is in an expected location and follows WinSparkle's naming convention. This is to prevent malicious users from modifying this registry key and forcing the host ...
void parse_revision_opt(struct rev_info *revs, struct parse_opt_ctx_t *ctx, const struct option *options, const char * const usagestr[]) { int n = handle_revision_opt(revs, ctx->argc, ctx->argv, &ctx->cpidx, ctx->out); if (n <= 0) { error("unknown option `%s'", ctx->argv[0]); usage_with_options(usag...
0
[]
git
a937b37e766479c8e780b17cce9c4b252fd97e40
230,614,610,998,993,520,000,000,000,000,000,000,000
13
revision: quit pruning diff more quickly when possible When the revision traversal machinery is given a pathspec, we must compute the parent-diff for each commit to determine which ones are TREESAME. We set the QUICK diff flag to avoid looking at more entries than we need; we really just care whether there are any cha...
TEST(HeaderDataConstructorTest, ContainsMatchSpecifier) { const std::string yaml = R"EOF( name: test-header contains_match: somevalueinside )EOF"; HeaderUtility::HeaderData header_data = HeaderUtility::HeaderData(parseHeaderMatcherFromYaml(yaml)); EXPECT_EQ("test-header", header_data.name_.get()); EXP...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
187,932,528,604,547,960,000,000,000,000,000,000,000
13
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
static void clear_tables(JOIN *join, table_map *cleared_tables) { /* must clear only the non-const tables as const tables are not re-calculated. */ for (uint i= 0 ; i < join->table_count ; i++) { TABLE *table= join->table[i]; if (table->null_row) continue; // ...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
33,012,938,012,591,435,000,000,000,000,000,000,000
29
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
MagickExport MagickBooleanType QuantizeImage(const QuantizeInfo *quantize_info, Image *image) { CubeInfo *cube_info; MagickBooleanType status; size_t depth, maximum_colors; assert(quantize_info != (const QuantizeInfo *) NULL); assert(quantize_info->signature == MagickCoreSignature); ass...
0
[ "CWE-190" ]
ImageMagick6
d5df600d43c8706df513a3273d09aee6f54a9233
117,407,807,569,904,710,000,000,000,000,000,000,000
77
https://github.com/ImageMagick/ImageMagick/issues/1754
destroy_oc( XOC oc) { Display *dpy = oc->core.om->core.display; XOCGenericPart *gen = XOC_GENERIC(oc); if (gen->mbs_to_cs) _XlcCloseConverter(gen->mbs_to_cs); if (gen->wcs_to_cs) _XlcCloseConverter(gen->wcs_to_cs); if (gen->utf8_to_cs) _XlcCloseConverter(gen->utf8_to_cs); /* For VW/UDC st...
0
[ "CWE-190" ]
libx11
acdaaadcb3d85c61fd43669fc5dddf0f8c3f911d
162,047,614,989,544,070,000,000,000,000,000,000,000
34
Fix an integer overflow in init_om() CVE-2020-14363 This can lead to a double free later, as reported by Jayden Rivers. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
void libxsmm_sparse_csr_reader( libxsmm_generated_code* io_generated_code, const char* i_csr_file_in, unsigned int** o_row_idx, unsigned int** o_column_idx, doubl...
1
[ "CWE-119", "CWE-787" ]
libxsmm
151481489192e6d1997f8bde52c5c425ea41741d
283,180,474,909,835,640,000,000,000,000,000,000,000
122
Issue #287: made CSR/CSC readers more robust against invalid input (case #1).
static int kexts_sort_vaddr_func(const void *a, const void *b) { RKext *A = (RKext *) a; RKext *B = (RKext *) b; int vaddr_compare = A->vaddr - B->vaddr; if (vaddr_compare == 0) { return A->text_range.size - B->text_range.size; } return vaddr_compare; }
0
[ "CWE-476" ]
radare2
feaa4e7f7399c51ee6f52deb84dc3f795b4035d6
120,231,508,996,775,270,000,000,000,000,000,000,000
9
Fix null deref in xnu.kernelcache ##crash * Reported by @xshad3 via huntr.dev
is_printer(gx_device_printer *pdev) { return (strlen(pdev->fname) == 0 || strcmp(pdev->fname, "PRN") == 0); }
0
[]
ghostpdl
4fcbece468706e0e89ed2856729b2ccacbc112be
3,143,635,625,314,338,400,000,000,000,000,000,000
4
Avoid some devices dying due to inappropriate resolutions.
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { const auto* params = reinterpret_cast<const TfLiteGatherParams*>(node->builtin_data); const TfLiteTensor* input; TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTensor, &input)); const TfLiteTensor* positions; TF_LITE_ENSURE_OK(c...
1
[ "CWE-703", "CWE-125" ]
tensorflow
eb921122119a6b6e470ee98b89e65d721663179d
160,741,082,237,820,170,000,000,000,000,000,000,000
65
Prevent heap OOB read in TFLite's `gather.cc`. Passing negative indices is illegal but there was a missing check so that resulted in OOB accesses. PiperOrigin-RevId: 387231300 Change-Id: I3111b54b2f232638d795be17efc46abe4ede6bf8
QPDFWriter::forcePDFVersion(std::string const& version, int extension_level) { this->m->forced_pdf_version = version; this->m->forced_extension_level = extension_level; }
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
196,478,893,905,802,330,000,000,000,000,000,000,000
6
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
static int vcpu_stat_get(void *_offset, u64 *val) { unsigned offset = (long)_offset; struct kvm *kvm; u64 tmp_val; *val = 0; mutex_lock(&kvm_lock); list_for_each_entry(kvm, &vm_list, vm_list) { kvm_get_stat_per_vcpu(kvm, offset, &tmp_val); *val += tmp_val; } mutex_unlock(&kvm_lock); return 0;
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
325,540,937,144,441,700,000,000,000,000,000,000,000
15
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 sctp_getsockopt_local_addrs(struct sock *sk, int len, char __user *optval, int __user *optlen) { struct sctp_bind_addr *bp; struct sctp_association *asoc; int cnt = 0; struct sctp_getaddrs getaddrs; struct sctp_sockaddr_entry *addr; void __user *to; union sctp_addr temp; struct sctp_sock *...
0
[ "CWE-362", "CWE-703" ]
linux
2d45a02d0166caf2627fe91897c6ffc3b19514c4
106,596,782,653,693,020,000,000,000,000,000,000,000
98
sctp: fix ASCONF list handling ->auto_asconf_splist is per namespace and mangled by functions like sctp_setsockopt_auto_asconf() which doesn't guarantee any serialization. Also, the call to inet_sk_copy_descendant() was backuping ->auto_asconf_list through the copy but was not honoring ->do_auto_asconf, which could l...
static int obj_trust(int id, X509 *x, int flags) { ASN1_OBJECT *obj; int i; X509_CERT_AUX *ax; ax = x->aux; if (!ax) return X509_TRUST_UNTRUSTED; if (ax->reject) { for (i = 0; i < sk_ASN1_OBJECT_num(ax->reject); i++) { obj = sk_ASN1_OBJECT_value(ax->reject, i); ...
1
[]
openssl
3342dcea7a633e579e1971dfd16ff3fc14dc3936
294,468,115,528,517,070,000,000,000,000,000,000,000
24
Reject when explicit trust EKU are set and none match. Returning untrusted is enough for for full chains that end in self-signed roots, because when explicit trust is specified it suppresses the default blanket trust of self-signed objects. But for partial chains, this is not enough, because absent a similar trust-se...
static void mon_identify_lost_members(struct tipc_peer *peer, struct tipc_mon_domain *dom_bef, int applied_bef) { struct tipc_peer *member = peer; struct tipc_mon_domain *dom_aft = peer->domain; int applied_aft = peer->applied; int i; for (i = 0; i < applied_bef; i++) { member = peer_nxt(mem...
0
[ "CWE-787" ]
linux
9aa422ad326634b76309e8ff342c246800621216
180,853,134,903,499,040,000,000,000,000,000,000,000
31
tipc: improve size validations for received domain records The function tipc_mon_rcv() allows a node to receive and process domain_record structs from peer nodes to track their views of the network topology. This patch verifies that the number of members in a received domain record does not exceed the limit defined b...
TEST_F(HttpConnectionManagerImplTest, 100ContinueResponse) { proxy_100_continue_ = true; setup(false, "envoy-custom-server", false); // Store the basic request encoder during filter chain setup. std::shared_ptr<MockStreamDecoderFilter> filter(new NiceMock<MockStreamDecoderFilter>()); EXPECT_CALL(*filter, de...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
108,219,768,785,032,820,000,000,000,000,000,000,000
55
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
gboolean avdtp_stream_has_capabilities(struct avdtp_stream *stream, GSList *caps) { for (; caps; caps = g_slist_next(caps)) { struct avdtp_service_capability *cap = caps->data; if (!avdtp_stream_has_capability(stream, cap)) return FALSE; } return TRUE; }
0
[ "CWE-703" ]
bluez
7a80d2096f1b7125085e21448112aa02f49f5e9a
31,348,139,331,759,650,000,000,000,000,000,000,000
12
avdtp: Fix accepting invalid/malformed capabilities Check if capabilities are valid before attempting to copy them.
TEST_F(RouterTest, AutoHostRewriteEnabled) { NiceMock<Http::MockRequestEncoder> encoder; std::string req_host{"foo.bar.com"}; Http::TestRequestHeaderMapImpl incoming_headers; HttpTestUtility::addDefaultHeaders(incoming_headers); incoming_headers.setHost(req_host); cm_.thread_local_cluster_.conn_pool_.host...
0
[ "CWE-703" ]
envoy
18871dbfb168d3512a10c78dd267ff7c03f564c6
251,770,306,217,488,320,000,000,000,000,000,000,000
41
[1.18] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
static int check_svme_pa(struct x86_emulate_ctxt *ctxt) { u64 rax = reg_read(ctxt, VCPU_REGS_RAX); /* Valid physical address? */ if (rax & 0xffff000000000000ULL) return emulate_gp(ctxt, 0); return check_svme(ctxt); }
0
[]
kvm
d1442d85cc30ea75f7d399474ca738e0bc96f715
146,067,546,836,751,870,000,000,000,000,000,000,000
10
KVM: x86: Handle errors when RIP is set during far jumps Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not handle this case, and may result in failed vm-entry once the assignment is done. The tricky part of doing so is that loading the new CS affects the VMCS/VMCB state, so if we fail during...
int usb_get_status(struct usb_device *dev, int type, int target, void *data) { int ret; __le16 *status = kmalloc(sizeof(*status), GFP_KERNEL); if (!status) return -ENOMEM; ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), USB_REQ_GET_STATUS, USB_DIR_IN | type, 0, target, status, sizeof(*status), USB_CTRL_...
0
[ "CWE-119", "CWE-787" ]
linux
2e1c42391ff2556387b3cb6308b24f6f65619feb
288,605,645,725,997,180,000,000,000,000,000,000,000
21
USB: core: harden cdc_parse_cdc_header Andrey Konovalov reported a possible out-of-bounds problem for the cdc_parse_cdc_header function. He writes: It looks like cdc_parse_cdc_header() doesn't validate buflen before accessing buffer[1], buffer[2] and so on. The only check present is while (buflen > 0). So fix thi...
static int get_importer(struct transport *transport, struct child_process *fastimport) { struct child_process *helper = get_helper(transport); struct helper_data *data = transport->data; int cat_blob_fd, code; child_process_init(fastimport); fastimport->in = helper->out; argv_array_push(&fastimport->args, "fast-i...
0
[]
git
68061e3470210703cb15594194718d35094afdc0
33,066,196,549,731,172,000,000,000,000,000,000,000
20
fast-import: disallow "feature export-marks" by default The fast-import stream command "feature export-marks=<path>" lets the stream write marks to an arbitrary path. This may be surprising if you are running fast-import against an untrusted input (which otherwise cannot do anything except update Git objects and refs)...
gdk_pixbuf_load_finish (GLoadableIcon *icon, GAsyncResult *res, char **type, GError **error) { g_return_val_if_fail (g_task_is_valid (res, icon), NULL); if (!g_task_propagate_pointer (G_TASK (res), error)) return NULL; ...
0
[]
gdk-pixbuf
deb78d971c4bcb9e3ccbb71e7925bc6baa707188
272,162,732,526,763,350,000,000,000,000,000,000,000
12
Use g_try_malloc_n where it makes sense This lets us avoid some manual overflow checks.
static int rsync_xal_compare_names(const void *x1, const void *x2) { const rsync_xa *xa1 = x1; const rsync_xa *xa2 = x2; return strcmp(xa1->name, xa2->name); }
0
[ "CWE-125" ]
rsync
47a63d90e71d3e19e0e96052bb8c6b9cb140ecc1
278,340,725,004,570,900,000,000,000,000,000,000,000
6
Enforce trailing \0 when receiving xattr name values. Fixes bug 13112.
zmq::curve_server_t::curve_server_t (session_base_t *session_, const std::string &peer_address_, const options_t &options_) : mechanism_t (options_), session (session_), peer_address (peer_address_), state (expect_hello), cn_n...
0
[]
libzmq
0900a489213d74feb86fc0b343308fe7884a2a3c
11,886,585,969,884,448,000,000,000,000,000,000,000
27
Problem: curve messages can be replayed Solution: ensure message short nonces are strictly increasing and validate them
static inline u16 socket_type_to_security_class(int family, int type, int protocol) { int extsockclass = selinux_policycap_extsockclass(); switch (family) { case PF_UNIX: switch (type) { case SOCK_STREAM: case SOCK_SEQPACKET: return SECCLASS_UNIX_STREAM_SOCKET; case SOCK_DGRAM: case SOCK_RAW: return...
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
38,634,455,110,488,694,000,000,000,000,000,000,000
151
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
static xmlNodePtr to_xml_long(encodeTypePtr type, zval *data, int style, xmlNodePtr parent TSRMLS_DC) { xmlNodePtr ret; ret = xmlNewNode(NULL, BAD_CAST("BOGUS")); xmlAddChild(parent, ret); FIND_ZVAL_NULL(data, ret, style); if (Z_TYPE_P(data) == IS_DOUBLE) { char s[256]; snprintf(s, sizeof(s), "%0.0F",floor(...
0
[ "CWE-19" ]
php-src
c8eaca013a3922e8383def6158ece2b63f6ec483
253,739,538,785,388,900,000,000,000,000,000,000,000
30
Added type checks
Malloc_t Perl_realloc (Malloc_t where, MEM_SIZE nbytes) { #ifdef PERL_IMPLICIT_SYS dTHX; #endif return (Malloc_t)PerlMem_realloc(where, nbytes); }
0
[ "CWE-119", "CWE-703", "CWE-787" ]
perl5
34716e2a6ee2af96078d62b065b7785c001194be
186,726,552,652,771,700,000,000,000,000,000,000,000
7
Perl_my_setenv(); handle integer wrap RT #133204 Wean this function off int/I32 and onto UV/Size_t. Also, replace all malloc-ish calls with a wrapper that does overflow checks, In particular, it was doing (nlen + vlen + 2) which could wrap when the combined length of the environment variable name and value exceeded ...
int mutt_is_text_part (BODY *b) { int t = b->type; char *s = b->subtype; if ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b)) return 0; if (t == TYPETEXT) return 1; if (t == TYPEMESSAGE) { if (!ascii_strcasecmp ("delivery-status", s)) return 1; } if ((WithCrypto & A...
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
254,881,208,150,987,160,000,000,000,000,000,000,000
25
use a 64-bit random value in temporary filenames. closes #3158