func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
PHP_FUNCTION(ldap_next_attribute) { zval *link, *result_entry; ldap_linkdata *ld; ldap_resultentry *resultentry; char *attribute; long dummy_ber; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr|l", &link, &result_entry, &dummy_ber) != SUCCESS) { return; } ZEND_FETCH_RESOURCE(ld, ldap_linkdata *, &l...
0
[ "CWE-476" ]
php-src
49782c54994ecca2ef2a061063bd5a7079c43527
323,074,403,492,651,170,000,000,000,000,000,000,000
35
Fix bug #76248 - Malicious LDAP-Server Response causes Crash
static void fm10k_reset_msix_capability(struct fm10k_intfc *interface) { pci_disable_msix(interface->pdev); kfree(interface->msix_entries); interface->msix_entries = NULL; }
0
[ "CWE-476" ]
linux
01ca667133d019edc9f0a1f70a272447c84ec41f
159,537,457,351,195,200,000,000,000,000,000,000,000
6
fm10k: Fix a potential NULL pointer dereference Syzkaller report this: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN PTI CPU: 0 PID: 4378 Comm: syz-executor.0 Tainted: G C 5.0.0+ #5 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),...
void ntlm_encrypt_random_session_key(NTLM_CONTEXT* context) { /* In NTLMv2, EncryptedRandomSessionKey is the ExportedSessionKey RC4-encrypted with the * KeyExchangeKey */ ntlm_rc4k(context->KeyExchangeKey, 16, context->RandomSessionKey, context->EncryptedRandomSessionKey); }
0
[ "CWE-125" ]
FreeRDP
c098f21fdaadca57ff649eee1674f6cc321a2ec4
134,007,781,328,248,070,000,000,000,000,000,000,000
7
Fixed oob read in ntlm_read_ntlm_v2_response
cifs_prune_tlinks(struct work_struct *work) { struct cifs_sb_info *cifs_sb = container_of(work, struct cifs_sb_info, prune_tlinks.work); struct rb_root *root = &cifs_sb->tlink_tree; struct rb_node *node = rb_first(root); struct rb_node *tmp; struct tcon_link *tlink; /* * Because we drop the spinlock ...
0
[ "CWE-703", "CWE-189" ]
linux
1fc29bacedeabb278080e31bb9c1ecb49f143c3b
299,559,081,566,858,440,000,000,000,000,000,000,000
41
cifs: fix off-by-one bug in build_unc_path_to_root commit 839db3d10a (cifs: fix up handling of prefixpath= option) changed the code such that the vol->prepath no longer contained a leading delimiter and then fixed up the places that accessed that field to account for that change. One spot in build_unc_path_to_root wa...
static void string_init(char** out) { *out = NULL; string_resize(out, 0); }
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
313,397,581,505,729,900,000,000,000,000,000,000,000
5
Fixed #5645: realloc return handling
void beginFetchPhase() { beginFetchPhaseNoYield(); _lock.unlock(); }
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
176,979,753,938,739,700,000,000,000,000,000,000,000
4
SERVER-38984 Validate unique User ID on UserCache hit
void CMSEXPORT cmsSetEncodedICCversion(cmsHPROFILE hProfile, cmsUInt32Number Version) { _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; Icc -> Version = Version; }
0
[]
Little-CMS
d2d902b9a03583ae482c782b2f243f7e5268a47d
256,049,332,226,632,580,000,000,000,000,000,000,000
5
>Changes from Richard Hughes
static void free_old_query(MYSQL *mysql) { if (mysql->fields) ma_free_root(&mysql->field_alloc,MYF(0)); ma_init_alloc_root(&mysql->field_alloc,8192,0); /* Assume rowlength < 8192 */ mysql->fields=0; mysql->field_count=0; /* For API */ mysql->info= 0; return; }
0
[]
mariadb-connector-c
27b2f3d1f1550dfaee0f63a331a406ab31c1b37e
195,053,718,545,900,700,000,000,000,000,000,000,000
10
various checks for corrupted packets in the protocol also: check the return value of unpack_fields()
inline bool ResolveAxis(const int num_dims, const int* axis, const int64_t num_axis, int* out_axis, int* out_num_axis) { *out_num_axis = 0; // Just in case. // Short-circuit axis resolution for scalars; the axis will go unused. if (num_dims == 0) { return true;...
1
[ "CWE-119", "CWE-787" ]
tensorflow
2d88f470dea2671b430884260f3626b1fe99830a
254,607,079,160,467,300,000,000,000,000,000,000,000
29
[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 void free_cgroup_settings(struct lxc_list *result) { struct lxc_list *iterator, *next; lxc_list_for_each_safe(iterator, result, next) { lxc_list_del(iterator); free(iterator); } free(result); }
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
284,150,002,624,460,230,000,000,000,000,000,000,000
10
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
nextval_internal(Oid relid, bool check_permissions) { SeqTable elm; Relation seqrel; Buffer buf; Page page; HeapTuple pgstuple; Form_pg_sequence pgsform; HeapTupleData seqdatatuple; Form_pg_sequence_data seq; int64 incby, maxv, minv, cache, log, fetch, last; int64 result, next,...
0
[ "CWE-94" ]
postgres
cc7e0feba51b4aeb0adf9bdac659f83e9986b90d
101,450,569,457,459,650,000,000,000,000,000,000,000
241
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...
int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b) { int result = -1; if (!a || !b || a->type != b->type) return -1; switch (a->type) { case V_ASN1_OBJECT: result = OBJ_cmp(a->value.object, b->value.object); break; case V_ASN1_NULL: result = 0; /*...
1
[ "CWE-17" ]
openssl
c3c7fb07dc975dc3c9de0eddb7d8fd79fc9c67c1
132,587,920,907,143,820,000,000,000,000,000,000,000
44
Fix ASN1_TYPE_cmp Fix segmentation violation when ASN1_TYPE_cmp is passed a boolean type. This can be triggered during certificate verification so could be a DoS attack against a client or a server enabling client authentication. CVE-2015-0286 Reviewed-by: Richard Levitte <levitte@openssl.org>
static int __io_uring_add_tctx_node(struct io_ring_ctx *ctx) { struct io_uring_task *tctx = current->io_uring; struct io_tctx_node *node; int ret; if (unlikely(!tctx)) { ret = io_uring_alloc_task_context(current, ctx); if (unlikely(ret)) return ret; tctx = current->io_uring; } if (!xa_load(&tctx->xa, (...
0
[ "CWE-125" ]
linux
89c2b3b74918200e46699338d7bcc19b1ea12110
20,678,336,180,016,537,000,000,000,000,000,000,000
33
io_uring: reexpand under-reexpanded iters [ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900 [ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task syz-executor.0/828 [ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted 5.14.0-rc3-next-20210730 #1 [ 74.216525] Hardware n...
void vrend_set_blend_color(struct vrend_context *ctx, struct pipe_blend_color *color) { ctx->sub->blend_color = *color; glBlendColor(color->color[0], color->color[1], color->color[2], color->color[3]); }
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
331,328,251,803,893,370,000,000,000,000,000,000,000
7
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
QPDFWriter::unparseObject(QPDFObjectHandle object, int level, int flags) { unparseObject(object, level, flags, 0, false); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
244,874,923,032,954,660,000,000,000,000,000,000,000
4
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
void dump_word_flags (flags) int flags; { int f; f = flags; fprintf (stderr, "%d -> ", f); if (f & W_ARRAYIND) { f &= ~W_ARRAYIND; fprintf (stderr, "W_ARRAYIND%s", f ? "|" : ""); } if (f & W_ASSIGNASSOC) { f &= ~W_ASSIGNASSOC; fprintf (stderr, "W_ASSIGNASSOC%s", f ? "...
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
181,830,195,845,349,350,000,000,000,000,000,000,000
151
Bash-4.4 patch 7
bash_servicename_completion_function (text, state) const char *text; int state; { #if defined (__WIN32__) || defined (__OPENNT) || !defined (HAVE_GETSERVENT) return ((char *)NULL); #else static char *sname = (char *)NULL; static struct servent *srvent; static int snamelen; char *value; char **alis...
0
[ "CWE-273", "CWE-787" ]
bash
951bdaad7a18cc0dc1036bba86b18b90874d39ff
175,483,993,862,090,780,000,000,000,000,000,000,000
53
commit bash-20190628 snapshot
static const char *wsgi_set_accept_mutex(cmd_parms *cmd, void *mconfig, const char *arg) { const char *error = NULL; WSGIServerConfig *sconfig = NULL; error = ap_check_cmd_context(cmd, GLOBAL_ONLY); if (error != NULL) return error; sconfig = ap_get_...
0
[ "CWE-254" ]
mod_wsgi
545354a80b9cc20d8b6916ca30542eab36c3b8bd
241,706,887,709,600,350,000,000,000,000,000,000,000
54
When there is any sort of error in setting up daemon process group, kill the process rather than risk running in an unexpected state.
static inline void __thread_clear_has_fpu(struct task_struct *tsk) { tsk->thread.fpu.has_fpu = 0; this_cpu_write(fpu_owner_task, NULL); }
0
[ "CWE-284", "CWE-264" ]
linux
26bef1318adc1b3a530ecc807ef99346db2aa8b0
253,771,162,254,362,720,000,000,000,000,000,000,000
5
x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround Before we do an EMMS in the AMD FXSAVE information leak workaround we need to clear any pending exceptions, otherwise we trap with a floating-point exception inside this code. Reported-by: halfdog <me@halfdog.net> Tested-by: Borislav Petkov <bp@suse.de> Link: h...
static int p54u_write(struct p54u_priv *priv, struct net2280_reg_write *buf, enum net2280_op_type type, __le32 addr, __le32 val) { unsigned int ep; int alen; if (type & 0x0800) ep = usb_sndbulkpipe(priv->udev, P54U_PIPE_DEV); else ep = usb_sndbulkpipe(priv->udev, P54U_PIPE_BRG); buf->...
0
[ "CWE-416" ]
linux
6e41e2257f1094acc37618bf6c856115374c6922
14,780,598,448,352,048,000,000,000,000,000,000,000
19
p54usb: Fix race between disconnect and firmware loading The syzbot fuzzer found a bug in the p54 USB wireless driver. The issue involves a race between disconnect and the firmware-loader callback routine, and it has several aspects. One big problem is that when the firmware can't be loaded, the callback routine tri...
bool Segment::SetChunking(bool chunking, const char* filename) { if (chunk_count_ > 0) return false; if (chunking) { if (!filename) return false; // Check if we are being set to what is already set. if (chunking_ && !strcmp(filename, chunking_base_name_)) return true; const size_t...
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
174,720,454,177,998,230,000,000,000,000,000,000,000
78
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
charactersSplit(void *ctx, const xmlChar *ch, int len) { xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx; if (ctxt == NULL) return; if ((ctxt->user_sax != NULL) && (ctxt->user_sax->characters != NULL)) ctxt->user_sax->characters(ctxt->user_data, ch, len); if (ctxt->ctxt != NULL) xmlSchema...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
213,310,475,189,874,630,000,000,000,000,000,000,000
10
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
UnicodeString::operator=(const UnicodeString &src) { return copyFrom(src); }
0
[ "CWE-190", "CWE-787" ]
icu
b7d08bc04a4296982fcef8b6b8a354a9e4e7afca
228,366,260,647,610,670,000,000,000,000,000,000,000
3
ICU-20958 Prevent SEGV_MAPERR in append See #971
static void ipv6_cleanup_mibs(struct net *net) { free_percpu(net->mib.udp_stats_in6); free_percpu(net->mib.udplite_stats_in6); free_percpu(net->mib.ipv6_statistics); free_percpu(net->mib.icmpv6_statistics); kfree(net->mib.icmpv6msg_statistics); }
0
[]
net
79462ad02e861803b3840cc782248c7359451cd9
140,135,804,627,518,870,000,000,000,000,000,000,000
8
net: add validation for the socket syscall protocol argument 郭永刚 reported that one could simply crash the kernel as root by using a simple program: int socket_fd; struct sockaddr_in addr; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_family = 10; socket_fd = socket(10,3,0x40000000); connect(s...
gc_gray_counts(mrb_state *mrb, mrb_gc *gc, struct RBasic *obj) { size_t children = 0; switch (obj->tt) { case MRB_TT_ICLASS: children++; break; case MRB_TT_CLASS: case MRB_TT_SCLASS: case MRB_TT_MODULE: { struct RClass *c = (struct RClass*)obj; children += mrb_gc_mark_iv_size(mrb,...
0
[ "CWE-415" ]
mruby
97319697c8f9f6ff27b32589947e1918e3015503
262,156,648,040,300,100,000,000,000,000,000,000,000
82
Cancel 9cdf439 Should not free the pointer in `realloc` since it can cause use-after-free problem.
static void move_huge_pte(struct vm_area_struct *vma, unsigned long old_addr, unsigned long new_addr, pte_t *src_pte) { struct hstate *h = hstate_vma(vma); struct mm_struct *mm = vma->vm_mm; pte_t *dst_pte, pte; spinlock_t *src_ptl, *dst_ptl; dst_pte = huge_pte_offset(mm, new_addr, huge_page_size(h)); dst_p...
0
[]
linux
a4a118f2eead1d6c49e00765de89878288d4b890
174,300,563,361,060,740,000,000,000,000,000,000,000
26
hugetlbfs: flush TLBs correctly after huge_pmd_unshare When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB flush is missing. This TLB flush must be performed before releasing the i_mmap_rwsem, in order to prevent an unshared PMDs page from being released and reused before the TLB flush took place...
static int tun_validate(struct nlattr *tb[], struct nlattr *data[], struct netlink_ext_ack *extack) { return -EINVAL; }
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
282,241,349,918,217,900,000,000,000,000,000,000,000
5
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 struct file *io_file_get_normal(struct io_kiocb *req, int fd) { struct file *file = fget(fd); trace_io_uring_file_get(req->ctx, req, req->cqe.user_data, fd); /* we don't allow fixed io_uring files */ if (file && file->f_op == &io_uring_fops) req->flags |= REQ_F_INFLIGHT; return file;
1
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
258,309,030,585,213,600,000,000,000,000,000,000,000
11
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
int manager_new(SystemdRunningAs running_as, Manager **_m) { Manager *m; int r; assert(_m); assert(running_as >= 0); assert(running_as < _SYSTEMD_RUNNING_AS_MAX); m = new0(Manager, 1); if (!m) return -ENOMEM; #ifdef ENABLE_EFI if (detect...
1
[]
systemd
5ba6985b6c8ef85a8bcfeb1b65239c863436e75b
240,634,556,218,161,430,000,000,000,000,000,000,000
96
core: allow PIDs to be watched by two units at the same time In some cases it is interesting to map a PID to two units at the same time. For example, when a user logs in via a getty, which is reexeced to /sbin/login that binary will be explicitly referenced as main pid of the getty service, as well as implicitly refer...
static struct sk_buff *xfrm_policy_netlink(struct sk_buff *in_skb, struct xfrm_policy *xp, int dir, u32 seq) { struct xfrm_dump_info info; struct sk_buff *skb; int err; skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); if (!skb) return ERR_PTR(-ENOMEM); info.in_skb = in_skb; info.out_skb = skb; ...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
171,559,731,012,159,000,000,000,000,000,000,000,000
25
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. ...
bool CheckCommandLineArguments(int argc, base::CommandLine::CharType** argv) { DCHECK(std::is_sorted(std::begin(kBlacklist), std::end(kBlacklist), [](const char* a, const char* b) { return base::StringPiece(a) < base::StringPiece(b); })) ...
0
[ "CWE-78", "CWE-200" ]
electron
ce361a12e355f9e1e99c989f1ea056c9e502dbe7
107,553,721,475,248,050,000,000,000,000,000,000,000
25
Use case-insensitive switch comparisons
static int imap_mbox_close(struct Mailbox *m) { if (!m) return -1; struct ImapAccountData *adata = imap_adata_get(m); struct ImapMboxData *mdata = imap_mdata_get(m); /* Check to see if the mailbox is actually open */ if (!adata || !mdata) return 0; /* imap_mbox_open_append() borrows the struct Im...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
223,368,062,005,792,900,000,000,000,000,000,000,000
41
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
static int __init stop_trace_on_warning(char *str) { if ((strcmp(str, "=0") != 0 && strcmp(str, "=off") != 0)) __disable_trace_on_warning = 1; return 1; }
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
73,588,085,347,900,010,000,000,000,000,000,000,000
6
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
PackLinuxElf32::check_pt_dynamic(Elf32_Phdr const *const phdr) { unsigned t = get_te32(&phdr->p_offset), s = sizeof(Elf32_Dyn) + t; unsigned vaddr = get_te32(&phdr->p_vaddr); unsigned filesz = get_te32(&phdr->p_filesz), memsz = get_te32(&phdr->p_memsz); if (s < t || file_size < (off_t)s || (3 & t) ...
0
[ "CWE-415" ]
upx
d9288213ec156dffc435566b9d393d23e87c6914
194,385,838,502,741,800,000,000,000,000,000,000,000
18
More checking of PT_DYNAMIC and its contents. https://github.com/upx/upx/issues/206 modified: p_lx_elf.cpp
void Grego::timeToFields(UDate time, int32_t& year, int32_t& month, int32_t& dom, int32_t& dow, int32_t& doy, int32_t& mid) { double millisInDay; double day = ClockMath::floorDivide((double)time, (double)U_MILLIS_PER_DAY, millisInDay); mid = (int32_t)millisInDay; dayToFields(day,...
0
[ "CWE-190" ]
icu
71dd84d4ffd6600a70e5bca56a22b957e6642bd4
122,121,001,385,764,070,000,000,000,000,000,000,000
7
ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J X-SVN-Rev: 40654
njs_typed_array_compare_u8(const void *a, const void *b, void *c) { return *((const uint8_t *) a) - *((const uint8_t *) b); }
0
[ "CWE-703" ]
njs
5c6130a2a0b4c41ab415f6b8992aa323636338b9
119,101,240,290,043,620,000,000,000,000,000,000,000
4
Fixed Array.prototype.fill() for typed-arrays. This closes #478 issue on Github.
PHP_FUNCTION(getimagesizefromstring) { php_getimagesize_from_any(INTERNAL_FUNCTION_PARAM_PASSTHRU, FROM_DATA); }
0
[]
php-src
87829c09a1d9e39bee994460d7ccf19dd20eda14
131,667,162,651,372,450,000,000,000,000,000,000,000
4
Fix #70052: getimagesize() fails for very large and very small WBMP Very large WBMP (width or height greater than 2**31-1) cause an overflow and circumvent the size limitation of 2048x2048 px. Very small WBMP (less than 12 bytes) cause a read error and are not recognized. This patch fixes both bugs.
static void snd_usbmidi_output_trigger(struct snd_rawmidi_substream *substream, int up) { struct usbmidi_out_port *port = (struct usbmidi_out_port *)substream->runtime->private_data; port->active = up; if (up) { if (port->ep->umidi->disconnected) { /* gobble up remaining bytes to prevent wait in ...
0
[ "CWE-703" ]
linux
07d86ca93db7e5cdf4743564d98292042ec21af7
88,834,852,937,102,100,000,000,000,000,000,000,000
18
ALSA: usb-audio: avoid freeing umidi object twice The 'umidi' object will be free'd on the error path by snd_usbmidi_free() when tearing down the rawmidi interface. So we shouldn't try to free it in snd_usbmidi_create() after having registered the rawmidi interface. Found by KASAN. Signed-off-by: Andrey Konovalov <a...
static inline void fl6_sock_release(struct ip6_flowlabel *fl) { if (fl) atomic_dec(&fl->users); }
0
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
249,291,268,758,135,830,000,000,000,000,000,000,000
5
ipv6: add complete rcu protection around np->opt This patch addresses multiple problems : UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions while socket is not locked : Other threads can change np->opt concurrently. Dmitry posted a syzkaller (http://github.com/google/syzkaller) program desmonstrating use-a...
UTI_GetRandomBytesUrandom(void *buf, unsigned int len) { static FILE *f = NULL; if (!f) f = UTI_OpenFile(NULL, DEV_URANDOM, NULL, 'R', 0); if (fread(buf, 1, len, f) != len) LOG_FATAL("Can't read from %s", DEV_URANDOM); }
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
78,656,475,336,383,600,000,000,000,000,000,000,000
9
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
HIDDEN void *brotli_init() { BrotliEncoderState *brotli = BrotliEncoderCreateInstance(NULL, NULL, NULL); if (brotli) { BrotliEncoderSetParameter(brotli, BROTLI_PARAM_MODE, BROTLI_DEFAULT_MODE); BrotliEncoderSetParameter(brotli, BROTLI_PARAM_QUALITY, ...
0
[]
cyrus-imapd
602f12ed2af0a49ac4a58affbfea57d0fc23dea5
166,624,337,736,829,550,000,000,000,000,000,000,000
17
httpd.c: only allow reuse of auth creds on a persistent connection against a backend server in a Murder
static void tcp_data_queue(struct sock *sk, struct sk_buff *skb) { struct tcp_sock *tp = tcp_sk(sk); int eaten = -1; bool fragstolen = false; if (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq) goto drop; skb_dst_drop(skb); __skb_pull(skb, tcp_hdr(skb)->doff * 4); tcp_ecn_accept_cwr(tp, skb); tp->rx_opt...
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
336,350,316,723,738,200,000,000,000,000,000,000,000
118
tcp: fix zero cwnd in tcp_cwnd_reduction Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode conditionally") introduced a bug that cwnd may become 0 when both inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead to a div-by-zero if the connection starts another cwnd reduction phase by set...
void del_aubio_onset (aubio_onset_t *o) { if (o->spectral_whitening) del_aubio_spectral_whitening(o->spectral_whitening); if (o->od) del_aubio_specdesc(o->od); if (o->pp) del_aubio_peakpicker(o->pp); if (o->pv) del_aubio_pvoc(o->pv); if (o->desc) del_fvec(o->desc); if (o->fftgrain) d...
0
[]
aubio
e4e0861cffbc8d3a53dcd18f9ae85797690d67c7
181,832,751,064,288,980,000,000,000,000,000,000,000
16
[onset] safer deletion method
struct device *tty_register_device(struct tty_driver *driver, unsigned index, struct device *device) { char name[64]; dev_t dev = MKDEV(driver->major, driver->minor_start) + index; if (index >= driver->num) { printk(KERN_ERR "Attempt to register invalid tty line number " " (%d).\n", index); retu...
0
[ "CWE-703" ]
linux
c290f8358acaeffd8e0c551ddcc24d1206143376
76,209,941,232,546,100,000,000,000,000,000,000,000
19
TTY: drop driver reference in tty_open fail path When tty_driver_lookup_tty fails in tty_open, we forget to drop a reference to the tty driver. This was added by commit 4a2b5fddd5 (Move tty lookup/reopen to caller). Fix that by adding tty_driver_kref_put to the fail path. I will refactor the code later. This is for ...
HttpStateData::httpTimeout(const CommTimeoutCbParams &) { debugs(11, 4, serverConnection << ": '" << entry->url() << "'"); if (entry->store_status == STORE_PENDING) { fwd->fail(new ErrorState(ERR_READ_TIMEOUT, Http::scGatewayTimeout, fwd->request)); } closeServer(); mustStop("HttpStateData...
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
58,648,645,829,686,740,000,000,000,000,000,000,000
11
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
static int inet6_create(struct net *net, struct socket *sock, int protocol) { struct inet_sock *inet; struct ipv6_pinfo *np; struct sock *sk; struct list_head *p; struct inet_protosw *answer; struct proto *answer_prot; unsigned char answer_flags; char answer_no_check; int try_loading_module = 0; int err; if...
1
[]
linux-2.6
2e761e0532a784816e7e822dbaaece8c5d4be14d
198,015,324,672,372,700,000,000,000,000,000,000,000
157
ipv6 netns: init net is used to set bindv6only for new sock The bindv6only is tuned via sysctl. It is already on a struct net and per-net sysctls allow for its modification (ipv6_sysctl_net_init). Despite this the value configured in the init net is used for the rest of them. Signed-off-by: Pavel Emelyanov <xemul@op...
read_yin_anydata(struct lys_module *module, struct lys_node *parent, struct lyxml_elem *yin, LYS_NODE type, int options, struct unres_schema *unres) { struct ly_ctx *ctx = module->ctx; struct lys_node *retval; struct lys_node_anydata *anyxml; struct lyxml_elem *sub, *next; const cha...
0
[ "CWE-252" ]
libyang
a3917d95d516e3de267d3cfa5d4d3715a90e8777
190,407,262,843,483,600,000,000,000,000,000,000,000
158
yin parser BUGFIX invalid memory access ... in case there were some unresolved extensions. Fixes #1454 Fixes #1455
Http2Stream* Http2Stream::New(Http2Session* session, int32_t id, nghttp2_headers_category category, int options) { Local<Object> obj; if (!session->env() ->http2stream_constructor_template() ->NewInstance...
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
122,002,457,835,400,950,000,000,000,000,000,000,000
13
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
json_parse_close_object(struct json_parser *parser, enum json_type *type_r) { if (json_parse_denest(parser) == 0) return 0; *type_r = JSON_TYPE_OBJECT_END; return 1; }
0
[]
core
973769d74433de3c56c4ffdf4f343cb35d98e4f7
108,736,291,082,587,080,000,000,000,000,000,000,000
7
lib: json - Escape invalid UTF-8 as unicode bytes This prevents dovecot from crashing if invalid UTF-8 input is given.
ofpacts_check_consistency(struct ofpact ofpacts[], size_t ofpacts_len, enum ofputil_protocol needed_protocols, struct ofpact_check_params *cp) { enum ofperr error = ofpacts_check(ofpacts, ofpacts_len, cp); if (!error && needed_protocols & ~cp->usable_protocols...
0
[ "CWE-416" ]
ovs
77cccc74deede443e8b9102299efc869a52b65b2
92,042,156,696,485,450,000,000,000,000,000,000,000
10
ofp-actions: Fix use-after-free while decoding RAW_ENCAP. While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate ofpbuf if there is no enough space left. However, function 'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap' structure leading to write-after-free and incorrect decoding. ==3...
void RequestParser::Init(Request* request, ViewMatcher view_matcher) { assert(view_matcher); Parser::Init(request); request_ = request; view_matcher_ = view_matcher; }
0
[ "CWE-22" ]
webcc
55a45fd5039061d5cc62e9f1b9d1f7e97a15143f
30,607,197,822,438,850,000,000,000,000,000,000,000
8
fix static file serving security issue; fix url path encoding issue
e_ews_connection_remove_delegate (EEwsConnection *cnc, gint pri, const gchar *mail_id, const GSList *delegate_ids, /* EwsUserId * */ GCancellable *cancellable, ...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
250,810,593,073,580,530,000,000,000,000,000,000,000
62
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
dns_message_gettsig(dns_message_t *msg, dns_name_t **owner) { /* * Get the TSIG record and owner for 'msg'. */ REQUIRE(DNS_MESSAGE_VALID(msg)); REQUIRE(owner == NULL || *owner == NULL); if (owner != NULL) *owner = msg->tsigname; return (msg->tsig); }
0
[ "CWE-617" ]
bind9
6ed167ad0a647dff20c8cb08c944a7967df2d415
292,084,412,328,233,670,000,000,000,000,000,000,000
13
Always keep a copy of the message this allows it to be available even when dns_message_parse() returns a error.
static u32 map_id_range_down(struct uid_gid_map *map, u32 id, u32 count) { unsigned idx, extents; u32 first, last, id2; id2 = id + count - 1; /* Find the matching extent */ extents = map->nr_extents; smp_read_barrier_depends(); for (idx = 0; idx < extents; idx++) { first = map->extent[idx].first; last = fi...
0
[ "CWE-284", "CWE-264" ]
linux
e3211c120a85b792978bcb4be7b2886df18d27f0
295,384,860,473,017,700,000,000,000,000,000,000,000
25
userns: Check uid_map's opener's fsuid, not the current fsuid Signed-off-by: Andy Lutomirski <luto@amacapital.net>
static int io_close(struct io_kiocb *req, bool force_nonblock, struct io_comp_state *cs) { struct io_close *close = &req->close; int ret; /* might be already done during nonblock submission */ if (!close->put_file) { ret = __close_fd_get_file(close->fd, &close->put_file); if (ret < 0) return (ret == -...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
257,209,138,745,700,830,000,000,000,000,000,000,000
31
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...
view_as_radio_action (GtkAction *action, GtkRadioAction *current, gpointer data) { FrWindow *window = data; fr_window_set_list_mode (window, gtk_radio_action_get_current_value (current)); }
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
43,415,312,510,904,270,000,000,000,000,000,000,000
7
libarchive: sanitize filenames before extracting
VP8ComponentDecoder::~VP8ComponentDecoder() { }
0
[ "CWE-1187" ]
lepton
82167c144a322cc956da45407f6dce8d4303d346
232,426,559,973,991,570,000,000,000,000,000,000,000
2
fix #87 : always check that threads_required set up the appropriate number of threads---fire off nop functions on unused threads for consistency
archive_read_support_format_iso9660(struct archive *_a) { struct archive_read *a = (struct archive_read *)_a; struct iso9660 *iso9660; int r; archive_check_magic(_a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_NEW, "archive_read_support_format_iso9660"); iso9660 = (struct iso9660 *)calloc(1, sizeof(*iso9660)); if (i...
0
[ "CWE-125" ]
libarchive
f9569c086ff29259c73790db9cbf39fe8fb9d862
223,777,133,963,393,600,000,000,000,000,000,000,000
44
iso9660: validate directory record length
cdf_print_property_name(char *buf, size_t bufsiz, uint32_t p) { size_t i; for (i = 0; i < __arraycount(vn); i++) if (vn[i].v == p) return snprintf(buf, bufsiz, "%s", vn[i].n); return snprintf(buf, bufsiz, "%#x", p); }
0
[ "CWE-787" ]
file
46a8443f76cec4b41ec736eca396984c74664f84
132,852,771,920,451,280,000,000,000,000,000,000,000
9
Limit the number of elements in a vector (found by oss-fuzz)
ins_eol(int c) { int i; if (echeck_abbr(c + ABBR_OFF)) return OK; if (stop_arrow() == FAIL) return FAIL; undisplay_dollar(); /* * Strange Vi behaviour: In Replace mode, typing a NL will not delete the * character under the cursor. Only push a NUL on the replace stack, * nothi...
0
[]
vim
98a336dd497d3422e7efeef9f24cc9e25aeb8a49
319,509,331,323,165,280,000,000,000,000,000,000,000
51
patch 8.2.0133: invalid memory access with search command Problem: Invalid memory access with search command. Solution: When :normal runs out of characters in bracketed paste mode break out of the loop.(closes #5511)
static u32 gf_m2ts_reframe_reset(GF_M2TS_Demuxer *ts, GF_M2TS_PES *pes, Bool same_pts, unsigned char *data, u32 data_len, GF_M2TS_PESHeader *pes_hdr) { if (pes->pck_data) { gf_free(pes->pck_data); pes->pck_data = NULL; } pes->pck_data_len = pes->pck_alloc_len = 0; if (pes->prev_data) { gf_free(pes->prev_data)...
0
[ "CWE-416", "CWE-125" ]
gpac
1ab4860609f2e7a35634930571e7d0531297e090
136,159,342,048,788,160,000,000,000,000,000,000,000
19
fixed potential crash on PMT IOD parse - cf #1268 #1269
static inline struct sem_array *sem_obtain_lock(struct ipc_namespace *ns, int id, struct sembuf *sops, int nsops, int *locknum) { struct kern_ipc_perm *ipcp; struct sem_array *sma; rcu_read_lock(); ipcp = ipc_obtain_object(&sem_ids(ns), id); if (IS_ERR(ipcp)) { sma = ERR_CAST(ipcp); goto err; } sma = co...
0
[ "CWE-703", "CWE-189" ]
linux
6062a8dc0517bce23e3c2f7d2fea5e22411269a3
230,503,018,339,005,600,000,000,000,000,000,000,000
28
ipc,sem: fine grained locking for semtimedop Introduce finer grained locking for semtimedop, to handle the common case of a program wanting to manipulate one semaphore from an array with multiple semaphores. If the call is a semop manipulating just one semaphore in an array with multiple semaphores, only take the loc...
unsigned CLASS pana_bits (int nbits) { #ifndef LIBRAW_NOTHREADS #define buf tls->pana_bits.buf #define vbits tls->pana_bits.vbits #else static uchar buf[0x4000]; static int vbits; #endif int byte; if (!nbits) return vbits=0; if (!vbits) { fread (buf+load_flags, 1, 0x4000-load_flags, ifp); fread (b...
0
[ "CWE-703" ]
LibRaw
11909cc59e712e09b508dda729b99aeaac2b29ad
124,551,314,106,536,030,000,000,000,000,000,000,000
24
cumulated data checks patch
gen_hash(codegen_scope *s, node *tree, int val, int limit) { int slimit = GEN_VAL_STACK_MAX; if (cursp() >= GEN_LIT_ARY_MAX) slimit = INT16_MAX; int len = 0; mrb_bool update = FALSE; while (tree) { if (nint(tree->car->car->car) == NODE_KW_REST_ARGS) { if (val && len > 0) { pop_n(len*2); ...
0
[ "CWE-415", "CWE-122" ]
mruby
38b164ace7d6ae1c367883a3d67d7f559783faad
84,168,077,197,943,390,000,000,000,000,000,000,000
65
codegen.c: fix a bug in `gen_values()`. - Fix limit handling that fails 15 arguments method calls. - Fix too early argument packing in arrays.
void __f_unlock_pos(struct file *f) { mutex_unlock(&f->f_pos_lock); }
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
317,589,263,599,240,600,000,000,000,000,000,000,000
4
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...
static BOOL update_recv_orders(rdpUpdate* update, wStream* s) { UINT16 numberOrders; if (Stream_GetRemainingLength(s) < 6) { WLog_ERR(TAG, "Stream_GetRemainingLength(s) < 6"); return FALSE; } Stream_Seek_UINT16(s); /* pad2OctetsA (2 bytes) */ Stream_Read_UINT16(s, numberOrders); /* numberOrders (2 bytes) */...
0
[ "CWE-119", "CWE-787" ]
FreeRDP
445a5a42c500ceb80f8fa7f2c11f3682538033f3
170,398,455,308,652,600,000,000,000,000,000,000,000
27
Fixed CVE-2018-8786 Thanks to Eyal Itkin from Check Point Software Technologies.
static FormInfo * AddFormInfo(char *value, char *contenttype, FormInfo *parent_form_info) { FormInfo *form_info; form_info = calloc(1, sizeof(struct FormInfo)); if(form_info) { if(value) form_info->value = value; if(contenttype) form_...
0
[ "CWE-200" ]
curl
b3875606925536f82fc61f3114ac42f29eaf6945
170,776,963,935,003,980,000,000,000,000,000,000,000
26
curl_easy_duphandle: CURLOPT_COPYPOSTFIELDS read out of bounds When duplicating a handle, the data to post was duplicated using strdup() when it could be binary and contain zeroes and it was not even zero terminated! This caused read out of bounds crashes/segfaults. Since the lib/strdup.c file no longer is easily sha...
Status InferenceContext::Multiply(DimensionHandle first, DimensionOrConstant second, DimensionHandle* out) { const int64_t first_value = Value(first); const int64_t second_value = Value(second); // Special cases. if (first_value == 0) { *ou...
0
[ "CWE-190" ]
tensorflow
acd56b8bcb72b163c834ae4f18469047b001fadf
79,712,097,080,586,020,000,000,000,000,000,000,000
28
Fix security vulnerability with SpaceToBatchNDOp. PiperOrigin-RevId: 445527615
} static void kvm_mmu_notifier_change_pte(struct mmu_notifier *mn, struct mm_struct *mm, unsigned long address, pte_t pte) { struct kvm *kvm = mmu_notifier_to_kvm(mn); trace_kvm_set_spte_hva(address); /* * .change_pte() must be surrounded by .invalidate_range_{start,end}(). * If mmu_notifier_cou...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
211,393,711,057,572,160,000,000,000,000,000,000,000
22
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...
void __dev_kfree_skb_irq(struct sk_buff *skb, enum skb_free_reason reason) { unsigned long flags; if (unlikely(!skb)) return; if (likely(refcount_read(&skb->users) == 1)) { smp_rmb(); refcount_set(&skb->users, 0); } else if (likely(!refcount_dec_and_test(&skb->users))) { return; } get_kfree_skb_cb(skb)...
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
166,414,624,661,900,150,000,000,000,000,000,000,000
20
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...
int redisBufferWrite(redisContext *c, int *done) { /* Return early when the context has seen an error. */ if (c->err) return REDIS_ERR; if (hi_sdslen(c->obuf) > 0) { ssize_t nwritten = c->funcs->write(c); if (nwritten < 0) { return REDIS_ERR; } else if (nwritten...
0
[ "CWE-190", "CWE-680" ]
redis
0215324a66af949be39b34be2d55143232c1cb71
279,761,442,412,003,340,000,000,000,000,000,000,000
28
Fix redis-cli / redis-sential overflow on some platforms (CVE-2021-32762) (#9587) The redis-cli command line tool and redis-sentinel service may be vulnerable to integer overflow when parsing specially crafted large multi-bulk network replies. This is a result of a vulnerability in the underlying hiredis library wh...
static void scrub_parity_bio_endio(struct bio *bio) { struct scrub_parity *sparity = (struct scrub_parity *)bio->bi_private; struct btrfs_fs_info *fs_info = sparity->sctx->fs_info; if (bio->bi_status) bitmap_or(sparity->ebitmap, sparity->ebitmap, sparity->dbitmap, sparity->nsectors); bio_put(bio); btrfs_...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
182,682,348,727,364,660,000,000,000,000,000,000,000
15
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
runInputModules(void) { modInfo_t *pMod; BEGINfunc /* loop through all modules and activate them (brr...) */ pMod = module.GetNxtType(NULL, eMOD_IN); while(pMod != NULL) { if(pMod->mod.im.bCanRun) { /* activate here */ thrdCreate(pMod->mod.im.runInput, pMod->mod.im.afterRun); } pMod = module.GetNxtType...
0
[ "CWE-119" ]
rsyslog
1ca6cc236d1dabf1633238b873fb1c057e52f95e
198,918,805,419,358,740,000,000,000,000,000,000,000
18
bugfix: off-by-one(two) bug in legacy syslog parser
get2c(FILE *fd) { int c, n; n = getc(fd); if (n == EOF) return -1; c = getc(fd); if (c == EOF) return -1; return (n << 8) + c; }
0
[ "CWE-120" ]
vim
7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97
230,088,103,810,399,340,000,000,000,000,000,000,000
10
patch 8.2.4969: changing text in Visual mode may cause invalid memory access Problem: Changing text in Visual mode may cause invalid memory access. Solution: Check the Visual position after making a change.
static bool set_mode(struct btd_adapter *adapter, uint16_t opcode, uint8_t mode) { struct mgmt_mode cp; uint32_t setting = 0; memset(&cp, 0, sizeof(cp)); cp.val = mode; switch (opcode) { case MGMT_OP_SET_POWERED: setting = MGMT_SETTING_POWERED; break; case MGMT_OP_SET_CONNECTABLE: setting = MGMT_S...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
255,643,447,236,300,000,000,000,000,000,000,000,000
41
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
static void _exchange_nodes(RRBNode *node_a, RRBNode *node_b) { if (!node_a || !node_b) { return; } RRBNode node_a_tmp, node_b_tmp; memcpy (&node_a_tmp, node_a, sizeof (RRBNode)); memcpy (&node_b_tmp, node_b, sizeof (RRBNode)); node_a->link[0] = node_b_tmp.link[0]; node_a->link[1] = node_b_tmp.link[1]; node_a...
0
[ "CWE-416", "CWE-703" ]
radare2
14189710859c27981adb4c2c2aed2863c1859ec5
274,377,384,650,966,200,000,000,000,000,000,000,000
68
Redo minor cleanup in new_rbtree
display_event (session *sess, int event, char **args, unsigned int stripcolor_args, time_t timestamp) { char o[4096]; format_event (sess, event, args, o, sizeof (o), stripcolor_args); if (o[0]) PrintTextTimeStamp (sess, o, timestamp); }
0
[ "CWE-22" ]
hexchat
15600f405f2d5bda6ccf0dd73957395716e0d4d3
181,047,718,081,527,400,000,000,000,000,000,000,000
8
Sanitize network name for scrollback files This prevents using invalid chars on Windows or creating directories
static int inflate_get_next_window(STATE_PARAM_ONLY) { gunzip_outbuf_count = 0; while (1) { int ret; if (need_another_block) { if (end_reached) { calculate_gunzip_crc(PASS_STATE_ONLY); end_reached = 0; /* NB: need_another_block is still set */ return 0; /* Last block */ } method = infla...
0
[ "CWE-476" ]
busybox
1de25a6e87e0e627aa34298105a3d17c60a1f44e
33,624,956,389,501,055,000,000,000,000,000,000,000
37
unzip: test for bad archive SEGVing function old new delta huft_build 1296 1300 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
static gboolean avrcp_get_capabilities_resp(struct avctp *conn, uint8_t code, uint8_t subunit, uint8_t transaction, uint8_t *operands, size_t operand_count, void *user_data) { struct avrcp *session = user_data; struct avrcp_header *pdu = (void *) operands; uint16_t events = 0; uint8_t count; if (co...
0
[ "CWE-200" ]
bluez
e2b0f0d8d63e1223bb714a9efb37e2257818268b
240,986,612,055,780,860,000,000,000,000,000,000,000
66
avrcp: Fix not checking if params_len match number of received bytes This makes sure the number of bytes in the params_len matches the remaining bytes received so the code don't end up accessing invalid memory.
static bool update_last_insert_id(THD *thd, set_var *var) { if (!var->value) { my_error(ER_NO_DEFAULT, MYF(0), var->var->name.str); return true; } thd->first_successful_insert_id_in_prev_stmt= var->save_result.ulonglong_value; return false; }
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
45,758,825,276,170,120,000,000,000,000,000,000,000
11
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
static int get_fixed_user(const ExecContext *c, const char **user, uid_t *uid, gid_t *gid, const char **home, const char **shell) { int r; const char *name; assert(c); if (!c->user) return 0; /* Note that we d...
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
108,823,979,318,208,300,000,000,000,000,000,000,000
22
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
static int pb0100_stop(struct sd *sd) { struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; int err; err = stv06xx_write_sensor(sd, PB_ABORTFRAME, 1); if (err < 0) goto out; /* Set bit 1 to zero */ err = stv06xx_write_sensor(sd, PB_CONTROL, BIT(5)|BIT(3)); gspca_dbg(gspca_dev, D_STREAM, "Halting stream\n...
0
[ "CWE-476" ]
linux
485b06aadb933190f4bc44e006076bc27a23f205
971,560,295,949,549,100,000,000,000,000,000,000
17
media: stv06xx: add missing descriptor sanity checks Make sure to check that we have two alternate settings and at least one endpoint before accessing the second altsetting structure and dereferencing the endpoint arrays. This specifically avoids dereferencing NULL-pointers or corrupting memory when a device does not...
void Http2Session::New(const FunctionCallbackInfo<Value>& args) { Environment* env = Environment::GetCurrent(args); CHECK(args.IsConstructCall()); int val = args[0]->IntegerValue(env->context()).ToChecked(); nghttp2_session_type type = static_cast<nghttp2_session_type>(val); Http2Session* session = new Http2S...
0
[]
node
ce22d6f9178507c7a41b04ac4097b9ea902049e3
67,203,557,664,166,880,000,000,000,000,000,000,000
9
http2: add altsvc support Add support for sending and receiving ALTSVC frames. PR-URL: https://github.com/nodejs/node/pull/17917 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
int ssh_bind_accept_fd(ssh_bind sshbind, ssh_session session, socket_t fd){ int i, rc; if (session == NULL){ ssh_set_error(sshbind, SSH_FATAL,"session is null"); return SSH_ERROR; } session->server = 1; session->version = 2; /* copy options */ for (i = 0; i < 10; ++i) { ...
1
[ "CWE-310" ]
libssh
e99246246b4061f7e71463f8806b9dcad65affa0
155,342,663,606,614,950,000,000,000,000,000,000,000
79
security: fix for vulnerability CVE-2014-0017 When accepting a new connection, a forking server based on libssh forks and the child process handles the request. The RAND_bytes() function of openssl doesn't reset its state after the fork, but simply adds the current process id (getpid) to the PRNG state, which is not g...
TEST(FormatterTest, Precision) { char format_str[BUFFER_SIZE]; safe_sprintf(format_str, "{0:.%u", UINT_MAX); increment(format_str + 4); EXPECT_THROW_MSG(format(format_str, 0), FormatError, "number is too big"); std::size_t size = std::strlen(format_str); format_str[size] = '}'; format_str[size + 1] = 0; ...
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
273,233,882,592,531,720,000,000,000,000,000,000,000
58
Fix segfault on complex pointer formatting (#642)
void res_close(void) { __res_iclose(NULL); }
0
[ "CWE-79" ]
uclibc-ng
0f822af0445e5348ce7b7bd8ce1204244f31d174
195,585,965,613,252,970,000,000,000,000,000,000,000
4
libc/inet/resolv.c: add __hnbad to check DNS entries for validity… … using the same rules glibc does also call __hnbad in some places to check answers
vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg, int main_fd __rte_unused) { struct virtio_net *dev = *pdev; struct vhost_iotlb_msg *imsg = &msg->payload.iotlb; uint16_t i; uint64_t vva, len; if (validate_msg_fds(msg, 0) != 0) return RTE_VHOST_MSG_RESULT_ERR; switch (imsg->type) { ...
0
[ "CWE-190" ]
dpdk
3ae4beb079ce242240c34376a066bbccd0c0b23e
68,179,914,775,899,850,000,000,000,000,000,000,000
47
vhost: check log mmap offset and size overflow vhost_user_set_log_base() is a message handler that is called to handle the VHOST_USER_SET_LOG_BASE message. Its payload contains a 64 bit size and offset. Both are added up and used as a size when calling mmap(). There is no integer overflow check. If an integer overflo...
mrb_define_alias_id(mrb_state *mrb, struct RClass *klass, mrb_sym a, mrb_sym b) { mrb_alias_method(mrb, klass, a, b); }
0
[ "CWE-787" ]
mruby
b1d0296a937fe278239bdfac840a3fd0e93b3ee9
183,185,616,238,003,470,000,000,000,000,000,000,000
4
class.c: clear method cache after `remove_method`.
ContextImpl(Http::RequestHeaderMap& headers, Tracing::Span& parent_span, Verifier::Callbacks* callback) : headers_(headers), parent_span_(parent_span), callback_(callback) {}
0
[ "CWE-303", "CWE-703" ]
envoy
ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a
282,295,813,882,647,830,000,000,000,000,000,000,000
3
jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194) [jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ...
void ElectronBrowserHandlerImpl::MessageHost( const std::string& channel, blink::CloneableMessage arguments) { api::WebContents* api_web_contents = api::WebContents::From(web_contents()); if (api_web_contents) { api_web_contents->MessageHost(channel, std::move(arguments), ...
1
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
331,698,047,342,542,220,000,000,000,000,000,000,000
9
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 ...
void __perf_event_task_sched_out(struct task_struct *task, struct task_struct *next) { int ctxn; for_each_task_context_nr(ctxn) perf_event_context_sched_out(task, ctxn, next); /* * if cgroup events exist on this CPU, then we need * to check if we have to switch out PMU state. * cgroup event are system...
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
263,790,195,566,166,380,000,000,000,000,000,000,000
16
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
PackOpenBSDElf32x86::buildLoader(const Filter *ft) { unsigned char tmp[sizeof(stub_i386_openbsd_elf_fold)]; memcpy(tmp, stub_i386_openbsd_elf_fold, sizeof(stub_i386_openbsd_elf_fold)); checkPatch(NULL, 0, 0, 0); // reset if (opt->o_unix.is_ptinterp) { unsigned j; for (j = 0; j < sizeof(...
0
[ "CWE-476" ]
upx
ef336dbcc6dc8344482f8cf6c909ae96c3286317
283,441,061,038,433,050,000,000,000,000,000,000,000
21
Protect against bad crafted input. https://github.com/upx/upx/issues/128 modified: p_lx_elf.cpp
Statement_Ptr Expand::operator()(For_Ptr f) { std::string variable(f->variable()); Expression_Obj low = f->lower_bound()->perform(&eval); if (low->concrete_type() != Expression::NUMBER) { traces.push_back(Backtrace(low->pstate())); throw Exception::TypeMismatch(traces, *low, "integer"); ...
0
[ "CWE-476" ]
libsass
0bc35e3d26922229d5a3e3308860cf0fcee5d1cf
181,481,273,229,377,100,000,000,000,000,000,000,000
52
Fix segfault on empty custom properties Originally reported in sass/sassc#225 Fixes sass/sassc#225 Spec sass/sass-spec#1249
int __init ecryptfs_init_kthread(void) { int rc = 0; mutex_init(&ecryptfs_kthread_ctl.mux); init_waitqueue_head(&ecryptfs_kthread_ctl.wait); INIT_LIST_HEAD(&ecryptfs_kthread_ctl.req_list); ecryptfs_kthread = kthread_run(&ecryptfs_threadfn, NULL, "ecryptfs-kthread"); if (IS_ERR(ecryptfs_kthread)) { r...
0
[ "CWE-119", "CWE-787" ]
linux
2f36db71009304b3f0b95afacd8eba1f9f046b87
255,424,929,351,191,470,000,000,000,000,000,000,000
16
ecryptfs: forbid opening files without mmap handler This prevents users from triggering a stack overflow through a recursive invocation of pagefault handling that involves mapping procfs files into virtual memory. Signed-off-by: Jann Horn <jannh@google.com> Acked-by: Tyler Hicks <tyhicks@canonical.com> Cc: stable@vge...
bool split(DataPair & d) { char * p = d.value; char * end = p + d.value.size; d.key.str = p; while (p != end) { ++p; if ((*p == ' ' || *p == '\t') && *(p-1) != '\\') break; } d.key.size = p - d.key.str; *p = 0; if (p != end) { ++p; while (p != end && (*p == ...
0
[ "CWE-125" ]
aspell
80fa26c74279fced8d778351cff19d1d8f44fe4e
225,592,954,678,581,200,000,000,000,000,000,000,000
19
Fix various bugs found by OSS-Fuze.
bool Item_func_regex::fix_fields(THD *thd, Item **ref) { re.set_recursion_limit(thd); return Item_bool_func::fix_fields(thd, ref); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
70,739,830,756,685,460,000,000,000,000,000,000,000
5
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
String *Item_copy_int::val_str(String *str) { if (null_value) return (String *) 0; str->set(cached_value, &my_charset_bin); return str; }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
263,134,503,621,556,440,000,000,000,000,000,000,000
8
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
PHP_FUNCTION(pow) { zval *zbase, *zexp; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/z/", &zbase, &zexp) == FAILURE) { return; } pow_function(return_value, zbase, zexp TSRMLS_CC); }
0
[]
php-src
0d822f6df946764f3f0348b82efae2e1eaa83aa0
21,712,083,925,336,295,000,000,000,000,000,000,000
10
Bug #71201 round() segfault on 64-bit builds
void wsrep_plugins_post_init() { THD *thd; I_List_iterator<THD> it(threads); while ((thd= it++)) { if (IF_WSREP(thd->wsrep_applier,1)) { // Save options_bits as it will get overwritten in plugin_thdvar_init() ulonglong option_bits_saved= thd->variables.option_bits; plugin_thdvar_init...
0
[ "CWE-416" ]
server
c05fd700970ad45735caed3a6f9930d4ce19a3bd
258,750,941,669,527,470,000,000,000,000,000,000,000
21
MDEV-26323 use-after-poison issue of MariaDB server
static void fetch_result_bin(MYSQL_BIND *param, MYSQL_FIELD *field __attribute__((unused)), uchar **row) { ulong length= net_field_length(row); ulong copy_length= min(length, param->buffer_length); memcpy(param->buffer, (char *)*row, copy_length); *param...
0
[]
mysql-server
3d8134d2c9b74bc8883ffe2ef59c168361223837
179,934,695,662,540,700,000,000,000,000,000,000,000
11
Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE() Description: If mysql_stmt_close() encountered error, it recorded error in prepared statement but then frees memory assigned to prepared statement. If mysql_stmt_error() is used to get error information, it will resu...