func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
recursive_boxed_constraint_type_check (VerifyContext *ctx, MonoType *type, MonoClass *constraint_class, int recursion_level) { MonoType *constraint_type = &constraint_class->byval_arg; if (recursion_level <= 0) return FALSE; if (verify_type_compatibility_full (ctx, type, mono_type_get_type_byval (constraint_type)...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
87,924,120,372,163,930,000,000,000,000,000,000,000
21
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
htmlcharactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len) { unsigned char output[40]; int inlen = len, outlen = 30; htmlEncodeEntities(output, &outlen, ch, &inlen, 0); output[outlen] = 0; fprintf(SAXdebug, "SAX.characters(%s, %d)\n", output, len); }
0
[ "CWE-125" ]
libxml2
a820dbeac29d330bae4be05d9ecd939ad6b4aa33
123,638,575,390,301,500,000,000,000,000,000,000,000
10
Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605> Reviewed by David Kilzer. * HTMLparser.c: (htmlParseName): Add bounds check. (htmlParseNameComplex): Ditto. * result/HTML/758605.html: Added. * result/HTML/758605.html.err: Added. * result/HTML/758605.html.s...
mptctl_do_fw_download(MPT_ADAPTER *iocp, char __user *ufwbuf, size_t fwlen) { FWDownload_t *dlmsg; MPT_FRAME_HDR *mf; FWDownloadTCSGE_t *ptsge; MptSge_t *sgl, *sgIn; char *sgOut; struct buflist *buflist; struct buflist *bl; dma_addr_t sgl_dma; int ret; int numfrags = 0; int maxfrags; int ...
0
[ "CWE-362", "CWE-369" ]
linux
28d76df18f0ad5bcf5fa48510b225f0ed262a99b
504,564,490,950,595,460,000,000,000,000,000,000
211
scsi: mptfusion: Fix double fetch bug in ioctl Tom Hatskevich reported that we look up "iocp" then, in the called functions we do a second copy_from_user() and look it up again. The problem that could cause is: drivers/message/fusion/mptctl.c 674 /* All of these commands require an interrupt or 675 ...
int linenoiseHistorySave(const char* filename) { FILE* fp = fopen(filename, "wt"); if (fp == NULL) { return -1; } for (int j = 0; j < historyLen; ++j) { if (history[j][0] != '\0') { fprintf(fp, "%s\n", history[j]); } } fclose(fp); return 0; }
1
[ "CWE-200" ]
mongo
035cf2afc04988b22cb67f4ebfd77e9b344cb6e0
178,347,086,034,084,700,000,000,000,000,000,000,000
14
SERVER-25335 avoid group and other permissions when creating .dbshell history file
static RList *create_cache_bins(RBinFile *bf, RDyldCache *cache) { RList *bins = r_list_newf ((RListFree)free_bin); if (!bins) { return NULL; } char *target_libs = NULL; RList *target_lib_names = NULL; int *deps = NULL; target_libs = r_sys_getenv ("R_DYLDCACHE_FILTER"); if (target_libs) { target_lib_names ...
1
[ "CWE-787" ]
radare2
c84b7232626badd075caf3ae29661b609164bac6
260,772,577,031,726,000,000,000,000,000,000,000,000
167
Fix heap buffer overflow in dyldcache parser ##crash * Reported by: Lazymio via huntr.dev * Reproducer: dyldovf
static u32 tcm_loop_get_default_depth(struct se_portal_group *se_tpg) { return 1; }
0
[ "CWE-119", "CWE-787" ]
linux
12f09ccb4612734a53e47ed5302e0479c10a50f8
123,541,777,076,910,460,000,000,000,000,000,000,000
4
loopback: off by one in tcm_loop_make_naa_tpg() This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result in memory corruption. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
inherit_event(struct perf_event *parent_event, struct task_struct *parent, struct perf_event_context *parent_ctx, struct task_struct *child, struct perf_event *group_leader, struct perf_event_context *child_ctx) { enum perf_event_active_state parent_state = parent_event->state; stru...
0
[ "CWE-284", "CWE-264" ]
linux
f63a8daa5812afef4f06c962351687e1ff9ccb2b
18,922,788,820,090,225,000,000,000,000,000,000,000
84
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of ...
struct page *agp_generic_alloc_page(struct agp_bridge_data *bridge) { struct page * page; page = alloc_page(GFP_KERNEL | GFP_DMA32 | __GFP_ZERO); if (page == NULL) return NULL; map_page_into_agp(page); get_page(page); atomic_inc(&agp_bridge->current_memory_agp); return page; }
0
[ "CWE-190" ]
linux-2.6
194b3da873fd334ef183806db751473512af29ce
238,085,080,266,505,700,000,000,000,000,000,000,000
14
agp: fix arbitrary kernel memory writes pg_start is copied from userspace on AGPIOC_BIND and AGPIOC_UNBIND ioctl cmds of agp_ioctl() and passed to agpioc_bind_wrap(). As said in the comment, (pg_start + mem->page_count) may wrap in case of AGPIOC_BIND, and it is not checked at all in case of AGPIOC_UNBIND. As a resu...
static void btrfs_close_one_device(struct btrfs_device *device) { struct btrfs_fs_devices *fs_devices = device->fs_devices; struct btrfs_device *new_device; struct rcu_string *name; if (device->bdev) fs_devices->open_devices--; if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state) && device->devid !...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
82,955,206,969,127,550,000,000,000,000,000,000,000
36
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...
static void gfar_process_frame(struct net_device *ndev, struct sk_buff *skb) { struct gfar_private *priv = netdev_priv(ndev); struct rxfcb *fcb = NULL; /* fcb is at the beginning if exists */ fcb = (struct rxfcb *)skb->data; /* Remove the FCB from the skb * Remove the padded bytes, if there are any */ if (p...
0
[]
linux
d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f
157,115,785,328,047,650,000,000,000,000,000,000,000
41
gianfar: fix jumbo packets+napi+rx overrun crash When using jumbo packets and overrunning rx queue with napi enabled, the following sequence is observed in gfar_add_rx_frag: | lstatus | | skb | t | lstatus, size, flags | first | len, data_len, *...
lq850_print_page(gx_device_printer *pdev, gp_file *prn_stream) { char lq850_init_string [] = "\033@\033P\033l\000\r\033\053\001\033Q"; return dot24_print_page(pdev, prn_stream, lq850_init_string, sizeof(lq850_init_string)); }
0
[ "CWE-369" ]
ghostpdl
eaba1d97b62831b42c51840cc8ee2bc4576c942e
142,346,199,180,630,930,000,000,000,000,000,000,000
6
Bug 701828: make dot24_print_page() return error instead of divide by zero. Fixes: ./sanbin/gs -dBATCH -dNOPAUSE -dSAFER -r2 -sOutputFile=tmp -sDEVICE=necp6 ../bug-701828.pdf
static long do_wait(struct wait_opts *wo) { struct task_struct *tsk; int retval; trace_sched_process_wait(wo->wo_pid); init_waitqueue_func_entry(&wo->child_wait, child_wait_callback); wo->child_wait.private = current; add_wait_queue(&current->signal->wait_chldexit, &wo->child_wait); repeat: /* * If there is ...
0
[ "CWE-20", "CWE-703", "CWE-400" ]
linux
b69f2292063d2caf37ca9aec7d63ded203701bf3
215,325,314,403,266,380,000,000,000,000,000,000,000
53
block: Fix io_context leak after failure of clone with CLONE_IO With CLONE_IO, parent's io_context->nr_tasks is incremented, but never decremented whenever copy_process() fails afterwards, which prevents exit_io_context() from calling IO schedulers exit functions. Give a task_struct to exit_io_context(), and call exi...
static void ext4_dx_csum_set(struct inode *inode, struct ext4_dir_entry *dirent) { struct dx_countlimit *c; struct dx_tail *t; int count_offset, limit, count; if (!ext4_has_metadata_csum(inode->i_sb)) return; c = get_dx_countlimit(inode, dirent, &count_offset); if (!c) { EXT4_ERROR_INODE(inode, "dir seems c...
0
[ "CWE-125" ]
linux
5872331b3d91820e14716632ebb56b1399b34fe1
108,019,985,619,551,110,000,000,000,000,000,000,000
25
ext4: fix potential negative array index in do_split() If for any reason a directory passed to do_split() does not have enough active entries to exceed half the size of the block, we can end up iterating over all "count" entries without finding a split point. In this case, count == move, and split will be zero, and w...
static void __update_clear_spte_fast(u64 *sptep, u64 spte) { union split_spte *ssptep, sspte; ssptep = (union split_spte *)sptep; sspte = (union split_spte)spte; WRITE_ONCE(ssptep->spte_low, sspte.spte_low); /* * If we map the spte from present to nonpresent, we should clear * present bit firstly to avoid v...
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
34,551,376,273,428,440,000,000,000,000,000,000,000
18
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start) { struct pglist_data *pgdat; unsigned long zones_size[MAX_NR_ZONES] = {0}; unsigned long zholes_size[MAX_NR_ZONES] = {0}; unsigned long start_pfn = start >> PAGE_SHIFT; pgdat = arch_alloc_nodedata(nid); if (!pgdat) return NULL; arch_refresh_nodedat...
0
[]
linux-2.6
08dff7b7d629807dbb1f398c68dd9cd58dd657a1
39,495,906,079,975,633,000,000,000,000,000,000,000
28
mm/hotplug: correctly add new zone to all other nodes' zone lists When online_pages() is called to add new memory to an empty zone, it rebuilds all zone lists by calling build_all_zonelists(). But there's a bug which prevents the new zone to be added to other nodes' zone lists. online_pages() { build_all_zonelists(...
UnicodeString::char32At(int32_t offset) const { int32_t len = length(); if((uint32_t)offset < (uint32_t)len) { const UChar *array = getArrayStart(); UChar32 c; U16_GET(array, 0, offset, len, c); return c; } else { return kInvalidUChar; } }
0
[ "CWE-190", "CWE-787" ]
icu
b7d08bc04a4296982fcef8b6b8a354a9e4e7afca
46,911,442,910,059,910,000,000,000,000,000,000,000
12
ICU-20958 Prevent SEGV_MAPERR in append See #971
check_symlinks_fsobj(char *path, int *error_number, struct archive_string *error_string, int flags) { #if !defined(HAVE_LSTAT) /* Platform doesn't have lstat, so we can't look for symlinks. */ (void)a; /* UNUSED */ (void)path; /* UNUSED */ (void)error_number; /* UNUSED */ (void)error_string; /* UNUSED */ (void)fl...
0
[ "CWE-20", "CWE-476" ]
libarchive
dfd6b54ce33960e420fb206d8872fb759b577ad9
71,800,755,002,070,240,000,000,000,000,000,000,000
194
Fixes for Issue #745 and Issue #746 from Doran Moppert.
static int bn2binpad(unsigned char *to, size_t tolen, BIGNUM *b) { size_t blen; blen = BN_num_bytes(b); /* If BIGNUM length greater than buffer, mask to get rightmost * bytes. NB: modifies b but this doesn't matter for our purposes. */ if (blen > tolen) { BN_mask_bits(b, tolen << 3); /* Update length bec...
1
[]
openssl
200f249b8c3b6439e0200d01caadc24806f1a983
271,992,352,835,707,370,000,000,000,000,000,000,000
26
Remove Dual EC DRBG from FIPS module.
tight_filter_gradient24(VncState *vs, uint8_t *buf, int w, int h) { uint32_t *buf32; uint32_t pix32; int shift[3]; int *prev; int here[3], upper[3], left[3], upperleft[3]; int prediction; int x, y, c; buf32 = (uint32_t *)buf; memset(vs->tight.gradient.buffer, 0, w * 3 * sizeof(int))...
0
[ "CWE-125" ]
qemu
9f64916da20eea67121d544698676295bbb105a7
78,458,381,544,485,370,000,000,000,000,000,000,000
50
pixman/vnc: use pixman images in vnc. The vnc code uses *three* DisplaySurfaces: First is the surface of the actual QemuConsole, usually the guest screen, but could also be a text console (monitor/serial reachable via Ctrl-Alt-<nr> keys). This is left as-is. Second is the current server's view of the screen content...
void CurlIo::CurlImpl::writeRemote(const byte* data, size_t size, long from, long to) { std::string scriptPath(getEnv(envHTTPPOST)); if (scriptPath == "") { throw Error(1, "Please set the path of the server script to handle http post data to EXIV2_HTTP_POST environmental variable.");...
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
197,049,513,248,913,740,000,000,000,000,000,000,000
52
Fix https://github.com/Exiv2/exiv2/issues/55
ext4_xattr_set(struct inode *inode, int name_index, const char *name, const void *value, size_t value_len, int flags) { handle_t *handle; int error, retries = 0; int credits = ext4_jbd2_credits_xattr(inode); retry: handle = ext4_journal_start(inode, EXT4_HT_XATTR, credits); if (IS_ERR(handle)) { error =...
0
[ "CWE-241", "CWE-19" ]
linux
82939d7999dfc1f1998c4b1c12e2f19edbdff272
124,225,969,767,512,430,000,000,000,000,000,000,000
26
ext4: convert to mbcache2 The conversion is generally straightforward. The only tricky part is that xattr block corresponding to found mbcache entry can get freed before we get buffer lock for that block. So we have to check whether the entry is still valid after getting buffer lock. Signed-off-by: Jan Kara <jack@sus...
static int xfrm_dump_policy_done(struct netlink_callback *cb) { struct xfrm_policy_walk *walk = (struct xfrm_policy_walk *)cb->args; struct net *net = sock_net(cb->skb->sk); xfrm_policy_walk_done(walk, net); return 0; }
0
[ "CWE-125" ]
linux
b805d78d300bcf2c83d6df7da0c818b0fee41427
75,601,274,674,014,380,000,000,000,000,000,000,000
8
xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink UBSAN report this: UBSAN: Undefined behaviour in net/xfrm/xfrm_policy.c:1289:24 index 6 is out of range for type 'unsigned int [6]' CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.162-514.55.6.9.x86_64+ #13 Hardware name: QEMU Standard PC (i440FX + P...
void mark_tree_uninteresting(struct tree *tree) { struct object *obj = &tree->object; if (!tree) return; if (obj->flags & UNINTERESTING) return; obj->flags |= UNINTERESTING; mark_tree_contents_uninteresting(tree); }
0
[ "CWE-119", "CWE-787" ]
git
34fa79a6cde56d6d428ab0d3160cb094ebad3305
324,473,870,038,199,830,000,000,000,000,000,000,000
11
prefer memcpy to strcpy When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy than strcpy, as it makes it more obvious that we are not going to overflow the buffer (because the size we pass matches the size in the allocation). This also eliminates calls to st...
int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm, pte_t *dst_pte, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { int vm_shared = dst_vma->vm_flags & VM_SHARED; struct hstate *h = hstate_vma(dst_vma); pte_t _dst_pte; spin...
1
[ "CWE-703" ]
linux
5af10dfd0afc559bb4b0f7e3e8227a1578333995
208,616,599,368,884,150,000,000,000,000,000,000,000
98
userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page before returning in case of errors. The error returned was -EEXIST by running UFFDIO_COPY on a non-hole offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that t...
verify_destination (CommonJob *job, GFile *dest, char **dest_fs_id, goffset required_size) { GFileInfo *info, *fsinfo; GError *error; guint64 free_size; guint64 size_difference; char *primary, *secondary, *details; int re...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
14,261,128,763,182,269,000,000,000,000,000,000,000
195
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
static int snd_pcm_pre_start(struct snd_pcm_substream *substream, snd_pcm_state_t state) { struct snd_pcm_runtime *runtime = substream->runtime; if (runtime->status->state != SNDRV_PCM_STATE_PREPARED) return -EBADFD; if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && !snd_pcm_playback_data(substrea...
0
[ "CWE-125" ]
linux
92ee3c60ec9fe64404dc035e7c41277d74aa26cb
190,348,296,642,246,530,000,000,000,000,000,000,000
13
ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Currently we have neither proper check nor protection against the concurrent calls of PCM hw_params and hw_free ioctls, which may result in a UAF. Since the existing PCM stream lock can't be used for protecting the whole ioctl operations, we need a new...
dir_split_resource_into_fingerprint_pairs(const char *res, smartlist_t *pairs_out) { smartlist_t *pairs_tmp = smartlist_create(); smartlist_t *pairs_result = smartlist_create(); smartlist_split_string(pairs_tmp, res, "+", 0, 0); if (smartlist_len(pairs_tmp)) { char...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
223,897,807,415,280,440,000,000,000,000,000,000,000
43
Fix assertion failure in tor_timegm. Fixes bug 6811.
int ssl_cipher_get_evp(const SSL_SESSION *s, const EVP_CIPHER **enc, const EVP_MD **md, int *mac_pkey_type, int *mac_secret_size,SSL_COMP **comp) { int i; const SSL_CIPHER *c; c=s->cipher; if (c == NULL) return(0); if (comp != NULL) { SSL_COMP ctmp; #ifndef OPENSSL_NO_COMP load_builtin_compressions()...
0
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
209,485,070,590,803,600,000,000,000,000,000,000,000
119
Add SRP support.
ex_z(exarg_T *eap) { char_u *x; long bigness; char_u *kind; int minus = 0; linenr_T start, end, curs, i; int j; linenr_T lnum = eap->line2; /* Vi compatible: ":z!" uses display height, without a count uses * 'scroll' */ if (eap->forceit) bigness = curwin->w_height; else ...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
99,915,781,821,945,350,000,000,000,000,000,000,000
132
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
void setTypeConvert(robj *setobj, int enc) { setTypeIterator *si; serverAssertWithInfo(NULL,setobj,setobj->type == OBJ_SET && setobj->encoding == OBJ_ENCODING_INTSET); if (enc == OBJ_ENCODING_HT) { int64_t intele; dict *d = dictCreate(&setDictType,NULL); ...
0
[ "CWE-190" ]
redis
a30d367a71b7017581cf1ca104242a3c644dec0f
251,011,576,787,573,180,000,000,000,000,000,000,000
28
Fix Integer overflow issue with intsets (CVE-2021-32687) The vulnerability involves changing the default set-max-intset-entries configuration parameter to a very large value and constructing specially crafted commands to manipulate sets
static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) /* {{{ */ { char *filename; int filename_len; zval *group; gid_t gid; int ret; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz/", &filename, &filename_len, &group) == FAILURE) { RETURN_FALSE; } if (strlen(filename) != filename_le...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
184,286,054,779,207,900,000,000,000,000,000,000,000
73
- 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
void machine_power_off(void) { machine_shutdown(); if (pm_power_off) pm_power_off(); }
0
[ "CWE-284", "CWE-264" ]
linux
a4780adeefd042482f624f5e0d577bf9cdcbb760
299,625,984,911,479,350,000,000,000,000,000,000,000
6
ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to prevent it from being used as a covert channel between two tasks. There are more and more applications coming to Windows RT, Wine could support them, but mostly they ...
bool ConnectionImpl::maybeDirectDispatch(Buffer::Instance& data) { if (!handling_upgrade_) { // Only direct dispatch for Upgrade requests. return false; } ENVOY_CONN_LOG(trace, "direct-dispatched {} bytes", connection_, data.length()); onBody(data); data.drain(data.length()); return true; }
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
274,698,072,870,891,560,000,000,000,000,000,000,000
11
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
static void *xt_mttg_seq_start(struct seq_file *seq, loff_t *pos, bool is_target) { struct nf_mttg_trav *trav = seq->private; unsigned int j; trav->class = MTTG_TRAV_INIT; for (j = 0; j < *pos; ++j) if (xt_mttg_seq_next(seq, NULL, NULL, is_target) == NULL) return NULL; return trav; }
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
319,419,990,149,245,130,000,000,000,000,000,000,000
12
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static void io_cqring_add_event(struct io_kiocb *req, long res, long cflags) { struct io_ring_ctx *ctx = req->ctx; unsigned long flags; spin_lock_irqsave(&ctx->completion_lock, flags); __io_cqring_fill_event(req, res, cflags); io_commit_cqring(ctx); spin_unlock_irqrestore(&ctx->completion_lock, flags); io_cqri...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
277,752,981,201,957,000,000,000,000,000,000,000,000
12
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...
parse_SET_L4_DST_PORT(char *arg, struct ofpbuf *ofpacts, enum ofputil_protocol *usable_protocols OVS_UNUSED) { return str_to_u16(arg, "destination port", &ofpact_put_SET_L4_DST_PORT(ofpacts)->port); }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
241,303,948,608,177,400,000,000,000,000,000,000,000
6
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static struct dentry * real_lookup(struct dentry * parent, struct qstr * name, struct nameidata *nd) { struct dentry * result; struct inode *dir = parent->d_inode; mutex_lock(&dir->i_mutex); /* * First re-do the cached lookup just in case it was created * while we waited for the directory semaphore.. * * F...
0
[ "CWE-120" ]
linux-2.6
d70b67c8bc72ee23b55381bd6a884f4796692f77
165,492,615,886,804,020,000,000,000,000,000,000,000
55
[patch] vfs: fix lookup on deleted directory Lookup can install a child dentry for a deleted directory. This keeps the directory dentry alive, and the inode pinned in the cache and on disk, even after all external references have gone away. This isn't a big problem normally, since memory pressure or umount will clea...
reset (int fd, char const *file, struct stats *stats) { if (! pagesize) { pagesize = getpagesize (); if (pagesize == 0 || 2 * pagesize + 1 <= pagesize) abort (); bufalloc = ALIGN_TO (INITIAL_BUFSIZE, pagesize) + pagesize + 1; buffer = xmalloc (bufalloc); } bufbeg = buflim = ...
0
[ "CWE-189" ]
grep
8fcf61523644df42e1905c81bed26838e0b04f91
20,801,712,186,695,181,000,000,000,000,000,000,000
31
grep: fix integer-overflow issues in main program * NEWS: Document this. * bootstrap.conf (gnulib_modules): Add inttypes, xstrtoimax. Remove xstrtoumax. * src/main.c: Include <inttypes.h>, for INTMAX_MAX, PRIdMAX. (context_length_arg, prtext, grepbuf, grep, grepfile) (get_nondigit_option, main): Use intmax_t, not int,...
void readField(folly::Optional<T>& data, FieldType /* fieldType */) { data = folly::Optional<T>(readRaw<T>()); }
0
[ "CWE-400", "CWE-522", "CWE-674" ]
mcrouter
97e033b3bb0cb16b61bf49f0dc7f311a3e0edd1b
196,773,838,200,527,260,000,000,000,000,000,000,000
3
Attempt to make CarbonProtocolReader::skip tail recursive Reviewed By: edenzik Differential Revision: D17967570 fbshipit-source-id: fdc32e190a521349c7c8f4d6081902fa18eb0284
int lxc_strmunmap(void *addr, size_t length) { return munmap(addr, length + 1); }
0
[ "CWE-417" ]
lxc
5eb45428b312e978fb9e294dde16efb14dd9fa4d
132,769,430,410,137,750,000,000,000,000,000,000,000
4
CVE 2018-6556: verify netns fd in lxc-user-nic Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
static ssize_t cgroup_release_agent_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off) { struct cgroup *cgrp; BUILD_BUG_ON(sizeof(cgrp->root->release_agent_path) < PATH_MAX); cgrp = cgroup_kn_lock_live(of->kn, false); if (!cgrp) return -ENODEV; spin_lock(&release_agent_path_lock); ...
1
[ "CWE-287", "CWE-269" ]
linux
24f6008564183aa120d07c03d9289519c2fe02af
40,479,071,972,421,042,000,000,000,000,000,000,000
17
cgroup-v1: Require capabilities to set release_agent The cgroup release_agent is called with call_usermodehelper. The function call_usermodehelper starts the release_agent with a full set fo capabilities. Therefore require capabilities when setting the release_agaent. Reported-by: Tabitha Sable <tabitha.c.sable@gmai...
local char *justname(char *path) { char *p; p = strrchr(path, '/'); return p == NULL ? path : p + 1; }
0
[ "CWE-703", "CWE-22" ]
pigz
fdad1406b3ec809f4954ff7cdf9e99eb18c2458f
321,160,620,182,582,100,000,000,000,000,000,000,000
7
When decompressing with -N or -NT, strip any path from header name. This uses the path of the compressed file combined with the name from the header as the name of the decompressed output file. Any path information in the header name is stripped. This avoids a possible vulnerability where absolute or descending path...
void iwl_pcie_d3_complete_suspend(struct iwl_trans *trans, bool test, bool reset) { iwl_disable_interrupts(trans); /* * in testing mode, the host stays awake and the * hardware won't be reset (not even partially) */ if (test) return; iwl_pcie_disable_ict(trans); iwl_pcie_synchronize_irqs(trans); ...
0
[ "CWE-476" ]
linux
8188a18ee2e48c9a7461139838048363bfce3fef
106,358,997,184,975,950,000,000,000,000,000,000,000
32
iwlwifi: pcie: fix rb_allocator workqueue allocation We don't handle failures in the rb_allocator workqueue allocation correctly. To fix that, move the code earlier so the cleanup is easier and we don't have to undo all the interrupt allocations in this case. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Sig...
static inline int put_v4l2_input32(struct v4l2_input __user *kp, struct v4l2_input32 __user *up) { if (copy_in_user(up, kp, sizeof(*up))) return -EFAULT; return 0; }
0
[ "CWE-787" ]
linux
a1dfb4c48cc1e64eeb7800a27c66a6f7e88d075a
160,963,174,887,815,100,000,000,000,000,000,000,000
7
media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic The 32-bit compat v4l2 ioctl handling is implemented based on its 64-bit equivalent. It converts 32-bit data structures into its 64-bit equivalents and needs to provide the data to the 64-bit ioctl in user space memory which is commonly allocated using compat...
static int init_ssl_connection(SSL *con) { int i; const char *str; X509 *peer; long verify_error; MS_STATIC char buf[BUFSIZ]; #if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG) const unsigned char *next_proto_neg; unsigned next_proto_neg_len; #endif #ifndef OPENSSL_NO_KRB5 char *client_princ;...
0
[]
openssl
4817504d069b4c5082161b02a22116ad75f822b1
118,951,553,815,580,080,000,000,000,000,000,000,000
126
PR: 2658 Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Reviewed by: steve Support for TLS/DTLS heartbeats.
void cfg80211_rx_unprot_mlme_mgmt(struct net_device *dev, const u8 *buf, size_t len) { struct wireless_dev *wdev = dev->ieee80211_ptr; struct wiphy *wiphy = wdev->wiphy; struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); const struct ieee80211_mgmt *mgmt = (void *)buf; u32 cmd; if (WARN_ON(len...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
299,105,649,305,936,300,000,000,000,000,000,000,000
21
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
get_text_gray_cmyk_row(j_compress_ptr cinfo, cjpeg_source_ptr sinfo) /* This version is for reading text-format PGM files with any maxval and converting to CMYK */ { ppm_source_ptr source = (ppm_source_ptr)sinfo; FILE *infile = source->pub.input_file; register JSAMPROW ptr; register JSAMPLE *rescale = source...
0
[ "CWE-200", "CWE-125" ]
libjpeg-turbo
9c78a04df4e44ef6487eee99c4258397f4fdca55
73,154,618,019,023,570,000,000,000,000,000,000,000
27
cjpeg: Fix OOB read caused by malformed 8-bit BMP ... in which one or more of the color indices is out of range for the number of palette entries. Fix partly borrowed from jpeg-9c. This commit also adopts Guido's JERR_PPM_OUTOFRANGE enum value in lieu of our project-specific JERR_PPM_TOOLARGE enum value. Fixes #258
floorLog2 (int x) { // // For x > 0, floorLog2(y) returns floor(log(x)/log(2)). // int y = 0; while (x > 1) { y += 1; x >>= 1; } return y; }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
237,768,803,355,141,930,000,000,000,000,000,000,000
16
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
qf_goto_cwindow(qf_info_T *qi, int resize, int sz, int vertsplit) { win_T *win; win = qf_find_win(qi); if (win == NULL) return FAIL; win_goto(win); if (resize) { if (vertsplit) { if (sz != win->w_width) win_setwidth(sz); } else if (sz != win->w_height && win->w_height + wi...
0
[ "CWE-416" ]
vim
4f1b083be43f351bc107541e7b0c9655a5d2c0bb
737,457,683,653,792,300,000,000,000,000,000,000
23
patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any.
inbound_foundip (session *sess, char *ip, const message_tags_data *tags_data) { struct hostent *HostAddr; HostAddr = gethostbyname (ip); if (HostAddr) { prefs.dcc_ip = ((struct in_addr *) HostAddr->h_addr)->s_addr; EMIT_SIGNAL_TIMESTAMP (XP_TE_FOUNDIP, sess->server->server_session, inet_ntoa (*((str...
0
[ "CWE-22" ]
hexchat
4e061a43b3453a9856d34250c3913175c45afe9d
6,566,794,412,765,470,000,000,000,000,000,000,000
13
Clean up handling CAP LS
static inline void timer_base_lock_expiry(struct timer_base *base) { spin_lock(&base->expiry_lock); }
0
[ "CWE-200", "CWE-330" ]
linux
f227e3ec3b5cad859ad15666874405e8c1bbc1d4
106,094,914,232,200,220,000,000,000,000,000,000,000
4
random32: update the net random state on interrupt and activity This modifies the first 32 bits out of the 128 bits of a random CPU's net_rand_state on interrupt or CPU activity to complicate remote observations that could lead to guessing the network RNG's internal state. Note that depending on some network devices'...
message_send_paused(const char *const jid) { xmpp_ctx_t * const ctx = connection_get_ctx(); xmpp_stanza_t *stanza = stanza_create_chat_state(ctx, jid, STANZA_NAME_PAUSED); _send_message_stanza(stanza); xmpp_stanza_release(stanza); }
0
[ "CWE-20", "CWE-346" ]
profanity
8e75437a7e43d4c55e861691f74892e666e29b0b
150,567,803,468,736,940,000,000,000,000,000,000,000
7
Add carbons from check
static int io_statx_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; if (sqe->ioprio || sqe->buf_index) return -EINVAL; if (req->flags & REQ_F_FIXED_FILE) return -EBADF; req->statx.dfd = READ_ONCE(sqe->fd); req->statx.mask = RE...
0
[ "CWE-416" ]
linux
6d816e088c359866f9867057e04f244c608c42fe
181,809,110,477,922,500,000,000,000,000,000,000,000
17
io_uring: hold 'ctx' reference around task_work queue + execute We're holding the request reference, but we need to go one higher to ensure that the ctx remains valid after the request has finished. If the ring is closed with pending task_work inflight, and the given io_kiocb finishes sync during issue, then we need a...
static irqreturn_t fsl_hv_state_change_thread(int irq, void *data) { struct doorbell_isr *dbisr = data; blocking_notifier_call_chain(&failover_subscribers, dbisr->partition, NULL); return IRQ_HANDLED; }
0
[ "CWE-190" ]
linux
6a024330650e24556b8a18cc654ad00cfecf6c6c
171,171,332,959,261,580,000,000,000,000,000,000,000
9
drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl The "param.count" value is a u64 thatcomes from the user. The code later in the function assumes that param.count is at least one and if it's not then it leads to an Oops when we dereference the ZERO_SIZE_PTR. Also the addition can have an integer over...
get_quote_count(const char *line) { int quote_count= 0; const char *quote= line; while ((quote= strpbrk(quote, "'`\"")) != NULL) { quote_count++; quote++; } return quote_count; }
0
[]
mysql-server
20addb05e58fdf822896f490fcaaf2ec5ed4bcb5
336,611,062,137,766,060,000,000,000,000,000,000,000
12
Bug# 25998635: Client does not escape the USE statement When there are quotes in the USE statement, the mysql client does not correctly escape them. The USE statement is processed line by line from the client's parser, and cannot handle multi-line commands as the server. The fix is to escape the USE parameters whene...
void bio_endio(struct bio *bio) { again: if (!bio_remaining_done(bio)) return; if (!bio_integrity_endio(bio)) return; /* * Need to have a real endio function for chained bios, otherwise * various corner cases will break (like stacking block devices that * save/restore bi_end_io) - however, we want to avoi...
0
[ "CWE-772", "CWE-787" ]
linux
95d78c28b5a85bacbc29b8dba7c04babb9b0d467
206,625,537,155,934,960,000,000,000,000,000,000,000
33
fix unbalanced page refcounting in bio_map_user_iov bio_map_user_iov and bio_unmap_user do unbalanced pages refcounting if IO vector has small consecutive buffers belonging to the same page. bio_add_pc_page merges them into one, but the page reference is never dropped. Cc: stable@vger.kernel.org Signed-off-by: Vitaly...
static int csnmp_read_host(user_data_t *ud) { host_definition_t *host; int status; int success; int i; host = ud->data; if (host->interval == 0) host->interval = plugin_get_interval(); if (host->sess_handle == NULL) csnmp_host_open_session(host); if (host->sess_handle == NULL) return (-1...
0
[ "CWE-415" ]
collectd
d16c24542b2f96a194d43a73c2e5778822b9cb47
84,773,867,460,263,020,000,000,000,000,000,000,000
35
snmp plugin: Fix double free of request PDU snmp_sess_synch_response() always frees request PDU, in both case of request error and success. If error condition occurs inside of `while (status == 0)` loop, double free of `req` happens. Issue: #2291 Signed-off-by: Florian Forster <octo@collectd.org>
const sslHashes& SSL::getHashes() const { return hashes_; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
222,190,237,215,806,840,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
setup_worker_server (GdmSession *self) { GDBusAuthObserver *observer; GDBusServer *server; GError *error = NULL; g_debug ("GdmSession: Creating D-Bus server for worker for session"); observer = g_dbus_auth_observer_new (); g_signal_connect_object (observer, ...
0
[]
gdm
5ac224602f1d603aac5eaa72e1760d3e33a26f0a
52,001,911,995,685,750,000,000,000,000,000,000,000
36
session: disconnect signals from worker proxy when conversation is freed We don't want an outstanding reference on the worker proxy to lead to signal handlers getting dispatched after the conversation is freed. https://bugzilla.gnome.org/show_bug.cgi?id=758032
inline void LegacyDepthwiseConvImpl( const DepthwiseParams& params, const RuntimeShape& input_shape, const uint8* input_data, const RuntimeShape& filter_shape, const uint8* filter_data, const RuntimeShape& bias_shape, const int32* bias_data, const RuntimeShape& output_shape, uint8* output_data, int ...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
230,670,885,554,931,930,000,000,000,000,000,000,000
12
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
add_color_map (const gint32 image_id, PSDimage *img_a) { GimpParasite *parasite; if (img_a->color_map_len) { if (img_a->color_mode != PSD_DUOTONE) gimp_image_set_colormap (image_id, img_a->color_map, img_a->color_map_entries); else { /* Add parasite fo...
0
[ "CWE-190" ]
gimp
88eccea84aa375197cc04a2a0e2e29debb56bfa5
240,690,494,077,533,340,000,000,000,000,000,000,000
23
Harden the PSD plugin against integer overflows. Issues discovered by Stefan Cornelius, Secunia Research, advisory SA37232 and CVE identifier CVE-2009-3909. Fixes bug #600741. (cherry picked from commit 9cc8d78ff33b7a36852b74e64b427489cad44d0e)
GF_Err gf_m4a_parse_program_config_element(GF_BitStream *bs, GF_M4ADecSpecInfo *cfg) { u32 i; cfg->program_config_element_present = 1; cfg->cpe_channels = 0; cfg->element_instance_tag = gf_bs_read_int_log(bs, 4, "element_instance_tag"); cfg->object_type = gf_bs_read_int_log(bs, 2, "object_type"); cfg->sampling_...
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
148,473,498,396,659,620,000,000,000,000,000,000,000
64
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
void ImapModelOpenConnectionTest::testOk() { QCoreApplication::processEvents(); QCoreApplication::processEvents(); QVERIFY(SOCK->writtenStuff().isEmpty()); SOCK->fakeReading( "* OK foo\r\n" ); QVERIFY( completedSpy->isEmpty() ); QCoreApplication::processEvents(); QCoreApplication::processEve...
0
[ "CWE-200" ]
trojita
25fffa3e25cbad85bbca804193ad336b090a9ce1
19,500,556,497,286,180,000,000,000,000,000,000,000
28
IMAP: refuse to work when STARTTLS is required but server sends PREAUTH Oops, we cannot send STARTTLS when the connection is already authenticated. This is serious enough to warrant an error; an attacker might be going after a plaintext of a message we're going to APPEND, etc. Thanks to Arnt Gulbrandsen on the imap-p...
TEST_F(RouterTest, InternalRedirectKeepsFragmentWithOveride) { TestScopedRuntime scoped_runtime; Runtime::LoaderSingleton::getExisting()->mergeValues( {{"envoy.reloadable_features.http_reject_path_with_fragment", "false"}}); enableRedirects(); default_request_headers_.setForwardedProto("http"); sendRequ...
0
[ "CWE-703" ]
envoy
18871dbfb168d3512a10c78dd267ff7c03f564c6
11,655,301,498,255,832,000,000,000,000,000,000,000
21
[1.18] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
device_create_groups_vargs(struct class *class, struct device *parent, dev_t devt, void *drvdata, const struct attribute_group **groups, const char *fmt, va_list args) { struct device *dev = NULL; int retval = -ENODEV; if (class == NULL || IS_ERR(class)) goto error; dev = kzalloc(sizeof(*dev),...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
220,676,932,706,061,650,000,000,000,000,000,000,000
39
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
Value ExpressionRegex::serialize(bool explain) const { return Value( Document{{_opName, Document{{"input", _input->serialize(explain)}, {"regex", _regex->serialize(explain)}, {"options", _options ? _options->serialize(explain) : Value()...
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
20,151,900,829,397,368,000,000,000,000,000,000,000
7
SERVER-49404 Enforce additional checks in $arrayToObject
static int handle_cr(struct kvm_vcpu *vcpu) { unsigned long exit_qualification, val; int cr; int reg; int err; int ret; exit_qualification = vmx_get_exit_qual(vcpu); cr = exit_qualification & 15; reg = (exit_qualification >> 8) & 15; switch ((exit_qualification >> 4) & 3) { case 0: /* mov to cr */ val = kv...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
213,401,518,191,575,000,000,000,000,000,000,000,000
79
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
ofpacts_verify(const struct ofpact ofpacts[], size_t ofpacts_len, uint32_t allowed_ovsinsts, enum ofpact_type outer_action) { const struct ofpact *a; enum ovs_instruction_type inst; inst = OVSINST_OFPIT13_METER; OFPACT_FOR_EACH (a, ofpacts, ofpacts_len) { enum ovs_instruction_typ...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
290,231,337,420,686,900,000,000,000,000,000,000,000
59
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
test_client_auth_request_none (TestConnection *test, gconstpointer data) { GIOStream *connection; GError *error = NULL; test->database = g_tls_file_database_new (tls_test_file_path ("ca-roots.pem"), &error); g_assert_no_error (error); g_assert_nonnull (test->database); /* ...
0
[ "CWE-295" ]
glib-networking
29513946809590c4912550f6f8620468f9836d94
334,634,986,837,167,400,000,000,000,000,000,000,000
34
Return bad identity error if identity is unset When the server-identity property of GTlsClientConnection is unset, the documentation sasy we need to fail the certificate verification with G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise, it's easy for applications to fail to specify server identity....
TestCheckedArrayByteSink(char* outbuf, int32_t capacity) : CheckedArrayByteSink(outbuf, capacity), calledFlush(FALSE) {}
0
[ "CWE-190", "CWE-787" ]
icu
b7d08bc04a4296982fcef8b6b8a354a9e4e7afca
287,686,556,034,331,580,000,000,000,000,000,000,000
2
ICU-20958 Prevent SEGV_MAPERR in append See #971
socket_ref_state_set (AtkObject *accessible) { char *child_name, *child_path; AtkSocket *socket = ATK_SOCKET (accessible); int count = 0; int j; int v; DBusMessage *message, *reply; DBusMessageIter iter, iter_array; AtkStateSet *set; set = atk_state_set_new (); if (!socket->embedded_plug_id) r...
0
[]
at-spi2-atk
e4f3eee2e137cd34cd427875365f458c65458164
239,064,092,287,275,400,000,000,000,000,000,000,000
57
Use XDG_RUNTIME_DIR to hold sockets, and do not make a world-writable dir If we use XDG_RUNTIME_DIR, then the directory should be owned by the appropriate user, so it should not need to be world-writable. Hopefully this won't break accessibility for administrative apps on some distro. https://bugzilla.gnome.org/show_...
TEST_P(RBACIntegrationTest, Allowed) { useAccessLog("%RESPONSE_CODE_DETAILS%"); config_helper_.addFilter(RBAC_CONFIG); initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); auto response = codec_client_->makeRequestWithBody( Http::TestRequestHeaderMapImpl{ {":method", "GET"},...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
244,966,856,226,339,350,000,000,000,000,000,000,000
24
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 int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; MOVStreamContext *sc; int entries, i, j; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams-1]; sc = st->priv_data; avio_rb32(pb); // version + flags entries = avio_rb...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
689e59b7ffed34eba6159dcc78e87133862e3746
323,212,882,257,690,800,000,000,000,000,000,000,000
107
mov: reset dref_count on realloc to keep values consistent. This fixes a potential crash. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data) { bool pr = false; switch (msr) { case MSR_EFER: return set_efer(vcpu, data); case MSR_K7_HWCR: data &= ~(u64)0x40; /* ignore flush filter disable */ data &= ~(u64)0x100; /* ignore ignne emulation enable */ data &= ~(u64)0x8; /* ignore TLB ca...
0
[]
linux
6d1068b3a98519247d8ba4ec85cd40ac136dbdf9
106,363,673,182,494,820,000,000,000,000,000,000,000
213
KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461) On hosts without the XSAVE support unprivileged local user can trigger oops similar to the one below by setting X86_CR4_OSXSAVE bit in guest cr4 register using KVM_SET_SREGS ioctl and later issuing KVM_RUN ioctl. invalid opcode: 0000 [#2]...
static int wc_BuildEd448KeyDer(ed448_key* key, byte* output, word32 inLen, int pubOut) { byte algoArray[MAX_ALGO_SZ]; byte ver[MAX_VERSION_SZ]; byte seq[MAX_SEQ_SZ]; int ret; word32 idx = 0, seqSz, verSz, algoSz, privSz, pubSz = 0; if (key == NULL || outp...
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
181,760,056,919,349,070,000,000,000,000,000,000,000
52
OCSP: improve handling of OCSP no check extension
auto operator()(Args && ... args) const -> decltype(format(str, std::forward<Args>(args)...)) { return format(str, std::forward<Args>(args)...); }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
148,139,970,660,657,350,000,000,000,000,000,000,000
4
Fix segfault on complex pointer formatting (#642)
static int cdrom_ioctl_select_speed(struct cdrom_device_info *cdi, unsigned long arg) { cd_dbg(CD_DO_IOCTL, "entering CDROM_SELECT_SPEED\n"); if (!CDROM_CAN(CDC_SELECT_SPEED)) return -ENOSYS; return cdi->ops->select_speed(cdi, arg); }
0
[ "CWE-119", "CWE-787" ]
linux
9de4ee40547fd315d4a0ed1dd15a2fa3559ad707
129,397,736,209,676,610,000,000,000,000,000,000,000
9
cdrom: information leak in cdrom_ioctl_media_changed() This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned long. The way the check is written now, if one of the high 32 bits is set then we could read outside the info->slots[] array. This bug is pretty old and it predates git. Reviewed-by: Christ...
static void clear_empty_dir(struct ctl_dir *dir) { dir->header.ctl_table[0].child = NULL; }
0
[ "CWE-20", "CWE-399" ]
linux
93362fa47fe98b62e4a34ab408c4a418432e7939
338,238,023,951,604,980,000,000,000,000,000,000,000
5
sysctl: Drop reference added by grab_header in proc_sys_readdir Fixes CVE-2016-9191, proc_sys_readdir doesn't drop reference added by grab_header when return from !dir_emit_dots path. It can cause any path called unregister_sysctl_table will wait forever. The calltrace of CVE-2016-9191: [ 5535.960522] Call Trace: [ ...
static CImg<T> tensor(const T& a0) { return matrix(a0); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
331,343,315,270,139,300,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void rbd_acknowledge_notify_result(struct rbd_device *rbd_dev, u64 notify_id, u64 cookie, s32 result) { dout("%s rbd_dev %p result %d\n", __func__, rbd_dev, result); __rbd_acknowledge_notify(rbd_dev, notify_id, cookie, &result); }
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
261,590,273,624,828,640,000,000,000,000,000,000,000
6
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
static void rt6_bind_peer(struct rt6_info *rt, int create) { struct inet_peer_base *base; struct inet_peer *peer; base = inetpeer_base_ptr(rt->_rt6i_peer); if (!base) return; peer = inet_getpeer_v6(base, &rt->rt6i_dst.addr, create); if (peer) { if (!rt6_set_peer(rt, peer)) inet_putpeer(peer); } }
0
[ "CWE-119" ]
net
c88507fbad8055297c1d1e21e599f46960cbee39
314,600,691,366,779,630,000,000,000,000,000,000,000
15
ipv6: don't set DST_NOCOUNT for remotely added routes DST_NOCOUNT should only be used if an authorized user adds routes locally. In case of routes which are added on behalf of router advertisments this flag must not get used as it allows an unlimited number of routes getting added remotely. Signed-off-by: Sabrina Dub...
htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) { xmlOutputBufferPtr buf; xmlCharEncodingHandlerPtr handler = NULL; const char *encoding; xmlInitParser(); if ((mem == NULL) || (size == NULL)) return; if (cur == NULL) { *mem = NULL; *size = 0; return; ...
0
[ "CWE-79" ]
libxml2
c1ba6f54d32b707ca6d91cb3257ce9de82876b6f
204,678,918,475,111,950,000,000,000,000,000,000,000
56
Revert "Do not URI escape in server side includes" This reverts commit 960f0e275616cadc29671a218d7fb9b69eb35588. This commit introduced - an infinite loop, found by OSS-Fuzz, which could be easily fixed. - an algorithm with quadratic runtime - a security issue, see https://bugzilla.gnome.org/show_bug.cgi?id=769760...
static int bpf_hash_map_seq_show(struct seq_file *seq, void *v) { return __bpf_hash_map_seq_show(seq, v); }
0
[ "CWE-787" ]
bpf
c4eb1f403243fc7bbb7de644db8587c03de36da6
284,631,449,068,577,800,000,000,000,000,000,000,000
4
bpf: Fix integer overflow involving bucket_size In __htab_map_lookup_and_delete_batch(), hash buckets are iterated over to count the number of elements in each bucket (bucket_size). If bucket_size is large enough, the multiplication to calculate kvmalloc() size could overflow, resulting in out-of-bounds write as repor...
xdr_krb5_octet(XDR *xdrs, krb5_octet *objp) { if (!xdr_u_char(xdrs, objp)) return (FALSE); return (TRUE); }
0
[ "CWE-703" ]
krb5
a197e92349a4aa2141b5dff12e9dd44c2a2166e3
325,577,344,039,648,770,000,000,000,000,000,000,000
6
Fix kadm5/gssrpc XDR double free [CVE-2014-9421] [MITKRB5-SA-2015-001] In auth_gssapi_unwrap_data(), do not free partial deserialization results upon failure to deserialize. This responsibility belongs to the callers, svctcp_getargs() and svcudp_getargs(); doing it in the unwrap function results in freeing the result...
static int SRP_user_pwd_set_sv(SRP_user_pwd *vinfo, const char *s, const char *v) { unsigned char tmp[MAX_LEN]; int len; if (strlen(s) > MAX_LEN || strlen(v) > MAX_LEN) return 0; len = t_fromb64(tmp, v); if (NULL == (vinfo->v = BN_bin2bn(tmp, len, NULL))) ...
0
[ "CWE-399" ]
openssl
380f18ed5f140e0ae1b68f3ab8f4f7c395658d9e
63,539,124,865,455,845,000,000,000,000,000,000,000
14
CVE-2016-0798: avoid memory leak in SRP The SRP user database lookup method SRP_VBASE_get_by_user had confusing memory management semantics; the returned pointer was sometimes newly allocated, and sometimes owned by the callee. The calling code has no way of distinguishing these two cases. Specifically, SRP servers t...
test_headers_bad (Test *test, gconstpointer data) { GHashTable *headers; headers = web_socket_util_new_headers (); /* Bad version */ g_hash_table_insert (headers, g_strdup ("Cookie"), g_strdup ("CockpitAuth=v=1;k=blah")); if (cockpit_auth_check_cookie (test->auth, "/cockpit", headers)) ...
1
[]
cockpit
c51f6177576d7e12614c64d316cf0b67addd17c9
64,534,851,171,630,770,000,000,000,000,000,000,000
20
ws: Fix bug parsing invalid base64 headers The len parameter to g_base64_decode_inplace() is a inout parameter, and needs to be initialized. Lets just use the simpler g_base64_decode() function. This fixes a segfault. Closes #10819
static OPJ_BYTE * opj_jp2_write_colr(opj_jp2_t *jp2, OPJ_UINT32 * p_nb_bytes_written ) { /* room for 8 bytes for box 3 for common data and variable upon profile*/ OPJ_UINT32 l_colr_size = 11; OPJ_BYTE * l_colr_data, * l_current_colr_pt...
0
[ "CWE-20" ]
openjpeg
4edb8c83374f52cd6a8f2c7c875e8ffacccb5fa5
153,261,204,552,851,750,000,000,000,000,000,000,000
66
Add support for generation of PLT markers in encoder * -PLT switch added to opj_compress * Add a opj_encoder_set_extra_options() function that accepts a PLT=YES option, and could be expanded later for other uses. ------- Testing with a Sentinel2 10m band, T36JTT_20160914T074612_B02.jp2, coming from S2A_MSIL1C_20...
static bool sync_mmio_spte(struct kvm_vcpu *vcpu, u64 *sptep, gfn_t gfn, unsigned int access) { if (unlikely(is_mmio_spte(*sptep))) { if (gfn != get_mmio_spte_gfn(*sptep)) { mmu_spte_clear_no_track(sptep); return true; } mark_mmio_spte(vcpu, sptep, gfn, access); return true; } return false; }
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
29,855,839,524,862,060,000,000,000,000,000,000,000
15
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
static int vcmp(struct mg_str s1, const char *s2) { // LOG(LL_INFO, ("->%.*s<->%s<- %d %d %d", (int) s1.len, s1.ptr, s2, //(int) s1.len, strncmp(s1.ptr, s2, s1.len), mg_vcmp(&s1, s2))); return mg_vcmp(&s1, s2) == 0; }
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
164,917,214,768,770,980,000,000,000,000,000,000,000
5
Protect against the directory traversal in mg_upload()
PHP_FUNCTION(openssl_private_decrypt) { zval **key, *crypted; EVP_PKEY *pkey; int cryptedlen; unsigned char *cryptedbuf = NULL; unsigned char *crypttemp; int successful = 0; long padding = RSA_PKCS1_PADDING; long keyresource = -1; char * data; int data_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_C...
0
[ "CWE-200" ]
php-src
270a406ac94b5fc5cc9ef59fc61e3b4b95648a3e
221,612,067,843,119,240,000,000,000,000,000,000,000
62
Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only
uint64_t length() const override { return size_; }
0
[ "CWE-401" ]
envoy
5eba69a1f375413fb93fab4173f9c393ac8c2818
254,496,505,168,163,900,000,000,000,000,000,000,000
1
[buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144) Signed-off-by: antonio <avd@google.com>
int git_index_set_caps(git_index *index, int caps) { unsigned int old_ignore_case; assert(index); old_ignore_case = index->ignore_case; if (caps == GIT_INDEXCAP_FROM_OWNER) { git_repository *repo = INDEX_OWNER(index); int val; if (!repo) return create_index_error( -1, "cannot access repository to s...
0
[ "CWE-415", "CWE-190" ]
libgit2
3db1af1f370295ad5355b8f64b865a2a357bcac0
336,049,593,969,769,940,000,000,000,000,000,000,000
35
index: error out on unreasonable prefix-compressed path lengths When computing the complete path length from the encoded prefix-compressed path, we end up just allocating the complete path without ever checking what the encoded path length actually is. This can easily lead to a denial of service by just encoding an un...
const char *MACH0_(get_os)(struct MACH0_(obj_t) * bin) { if (bin) { switch (bin->os) { case 1: return "macos"; case 2: return "ios"; case 3: return "watchos"; case 4: return "tvos"; } } return "darwin"; }
0
[ "CWE-787" ]
rizin
348b1447d1452f978b69631d6de5b08dd3bdf79d
191,548,780,803,580,840,000,000,000,000,000,000,000
11
fix #2956 - oob write in mach0.c
static int auth_server_input_done(struct auth_server_connection *conn) { if (array_count(&conn->available_auth_mechs) == 0) { i_error("BUG: Authentication server returned no mechanisms"); return -1; } if (conn->cookie == NULL) { i_error("BUG: Authentication server didn't send a cookie"); return -1; } time...
0
[]
core
a9b135760aea6d1790d447d351c56b78889dac22
11,819,917,078,706,325,000,000,000,000,000,000,000
20
lib-auth: Remove request after abort Otherwise the request will still stay in hash table and get dereferenced when all requests are aborted causing an attempt to access free'd memory. Found by Apollon Oikonomopoulos <apoikos@debian.org> Broken in 1a29ed2f96da1be22fa5a4d96c7583aa81b8b060
static int build_sadinfo(struct sk_buff *skb, struct net *net, u32 pid, u32 seq, u32 flags) { struct xfrmk_sadinfo si; struct xfrmu_sadhinfo sh; struct nlmsghdr *nlh; int err; u32 *f; nlh = nlmsg_put(skb, pid, seq, XFRM_MSG_NEWSADINFO, sizeof(u32), 0); if (nlh == NULL) /* shouldn't really happen ... */ re...
0
[ "CWE-200" ]
linux
1f86840f897717f86d523a13e99a447e6a5d2fa5
10,647,489,033,546,172,000,000,000,000,000,000,000
30
xfrm_user: fix info leak in copy_to_user_tmpl() The memory used for the template copy is a local stack variable. As struct xfrm_user_tmpl contains multiple holes added by the compiler for alignment, not initializing the memory will lead to leaking stack bytes to userland. Add an explicit memset(0) to avoid the info le...
Tfloat __distance_eikonal(const CImg<Tfloat>& res, const Tfloat P, const int x=0, const int y=0, const int z=0) const { const Tfloat M = (Tfloat)cimg::type<T>::max(); T T1 = (T)std::min(x - 1>=0?res(x - 1,y,z):M,x + 1<width()?res(x + 1,y,z):M); Tfloat root = 0; ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
334,970,538,104,193,500,000,000,000,000,000,000,000
31
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
struct virtio_net_hdr *vmxnet_tx_pkt_get_vhdr(struct VmxnetTxPkt *pkt) { assert(pkt); return &pkt->virt_hdr; }
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
60,264,235,311,063,700,000,000,000,000,000,000,000
5
net/vmxnet3: Refine l2 header validation Validation of l2 header length assumed minimal packet size as eth_header + 2 * vlan_header regardless of the actual protocol. This caused crash for valid non-IP packets shorter than 22 bytes, as 'tx_pkt->packet_type' hasn't been assigned for such packets, and 'vmxnet3_on_tx_do...
int security_quotactl(int cmds, int type, int id, struct super_block *sb) { return security_ops->quotactl(cmds, type, id, sb); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
122,447,804,532,817,360,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...
void ip_cleanup(Slirp *slirp) { udp_cleanup(slirp); tcp_cleanup(slirp); icmp_cleanup(slirp); }
0
[ "CWE-787" ]
libslirp
126c04acbabd7ad32c2b018fe10dfac2a3bc1210
129,387,115,945,912,480,000,000,000,000,000,000,000
6
Fix heap overflow in ip_reass on big packet input When the first fragment does not fit in the preallocated buffer, q will already be pointing to the ext buffer, so we mustn't try to update it. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
jas_iccprof_t *jas_iccprof_load(jas_stream_t *in) { jas_iccprof_t *prof; int numtags; long curoff; long reloff; long prevoff; jas_iccsig_t type; jas_iccattrval_t *attrval; jas_iccattrval_t *prevattrval; jas_icctagtabent_t *tagtabent; int i; int len; prof = 0; attrval = 0; if (!(prof = jas_iccprof_create...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
90,680,570,879,911,600,000,000,000,000,000,000,000
102
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...