func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
compute_box_blur_width (double radius) { double width; width = radius * 3 * sqrt (2 * G_PI) / 4; return (gint) (width + 0.5); }
0
[]
librsvg
a51919f7e1ca9c535390a746fbf6e28c8402dc61
277,570,363,736,699,600,000,000,000,000,000,000,000
7
rsvg: Add rsvg_acquire_node() This function does proper recursion checks when looking up resources from URLs and thereby helps avoiding infinite loops when cyclic references span multiple types of elements.
static void print_qualifiers(BIO *out, STACK_OF(POLICYQUALINFO) *quals, int indent) { POLICYQUALINFO *qualinfo; int i; for (i = 0; i < sk_POLICYQUALINFO_num(quals); i++) { qualinfo = sk_POLICYQUALINFO_value(quals, i); switch (OBJ_obj2nid(qualinfo->pqualid)) { ...
1
[ "CWE-125" ]
openssl
5f54e57406ca17731b9ade3afd561d3c652e07f2
162,380,754,794,248,300,000,000,000,000,000,000,000
27
Fix POLICYINFO printing to not assume NUL terminated strings ASN.1 strings may not be NUL terminated. Don't assume they are. CVE-2021-3712 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org>
io_thread_init_command(Master_info *mi, const char *query, int allowed_error, MYSQL_RES **master_res= NULL, MYSQL_ROW *master_row= NULL) { DBUG_ENTER("io_thread_init_command"); DBUG_PRINT("info", ("IO thread initialization command: '%s'", query)); MYSQL *mysql= mi->my...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
214,534,887,980,314,650,000,000,000,000,000,000,000
56
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
iperf_set_test_socket_bufsize(struct iperf_test *ipt, int socket_bufsize) { ipt->settings->socket_bufsize = socket_bufsize; }
0
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
168,626,348,094,723,020,000,000,000,000,000,000,000
4
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
static ssize_t shadow_copy2_getxattr(vfs_handle_struct *handle, const char *fname, const char *aname, void *value, size_t size) { time_t timestamp; char *stripped; ssize_t ret; int saved_errno; char *conv; if (!shadow_copy2_strip_snapshot(talloc_tos(), handle, fname, &timestamp, &stripped...
0
[ "CWE-200" ]
samba
675fd8d771f9d43e354dba53ddd9b5483ae0a1d7
208,619,974,894,165,940,000,000,000,000,000,000,000
29
CVE-2015-5299: s3-shadow-copy2: fix missing access check on snapdir Fix originally from <partha@exablox.com> https://bugzilla.samba.org/show_bug.cgi?id=11529 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
static void handle_rx(struct vhost_net *net) { struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX]; struct vhost_virtqueue *vq = &nvq->vq; unsigned uninitialized_var(in), log; struct vhost_log *vq_log; struct msghdr msg = { .msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, /* FIXME: get and h...
1
[ "CWE-20", "CWE-787" ]
linux
d8316f3991d207fe32881a9ac20241be8fa2bad0
116,987,039,205,117,420,000,000,000,000,000,000,000
108
vhost: fix total length when packets are too short When mergeable buffers are disabled, and the incoming packet is too large for the rx buffer, get_rx_bufs returns success. This was intentional in order for make recvmsg truncate the packet and then handle_rx would detect err != sock_len and drop it. Unfortunately we...
quit_response_cancel (void) { response_cancel (); gtk_main_quit (); return FALSE; }
0
[ "CWE-362" ]
gnome-screensaver
ab08cc93f2dc6223c8c00bfa1ca4f2d89069dbe0
335,359,259,850,611,330,000,000,000,000,000,000,000
6
Work around x errors by asking dialog to die on cancel Basically, what is happening is that gnome-screensaver-dialog exits after the 5th failed attempt at unlocking the screen, but before the shake animation finishes. If the timing is slightly unlucky, this results in gnome-screensaver accessing X resources that have ...
int _yr_re_fiber_split( RE_FIBER_LIST* fiber_list, RE_FIBER_POOL* fiber_pool, RE_FIBER* fiber, RE_FIBER** new_fiber) { int32_t i; FAIL_ON_ERROR(_yr_re_fiber_create(fiber_pool, new_fiber)); (*new_fiber)->sp = fiber->sp; (*new_fiber)->ip = fiber->ip; (*new_fiber)->rc = fiber->rc; for (i = 0...
0
[ "CWE-125" ]
yara
83d799804648c2a0895d40a19835d9b757c6fa4e
154,839,914,799,944,700,000,000,000,000,000,000,000
33
Fix issue #646 (#648) * Fix issue #646 and some edge cases with wide regexps using \b and \B * Rename function IS_WORD_CHAR to _yr_re_is_word_char
static int remove_recursively(const char * path) { DIR *d = opendir(path); size_t path_len = strlen(path); int r = -1; size_t len; char *buf; if (d) { struct dirent *p; r = 0; while ((r==0) && (p=readdir(d))) { /* Skip the names "." and ".." as we don't want to recurse on them. */ ...
0
[ "CWE-476" ]
ntopng
01f47e04fd7c8d54399c9e465f823f0017069f8f
38,859,911,846,200,020,000,000,000,000,000,000,000
44
Security fix: prevents empty host from being used
static void exif_iif_add_buffer(image_info_type *image_info, int section_index, char *name, int length, char *value TSRMLS_DC) { image_info_data *info_data; image_info_data *list; if (value) { list = safe_erealloc(image_info->info_list[section_index].list, (image_info->info_list[section_index].count+1), sizeof(...
0
[ "CWE-119" ]
php-src
ddb207e7fa2e9adeba021a1303c3781efda5409b
73,691,749,757,688,280,000,000,000,000,000,000,000
20
Fix bug #68113 (Heap corruption in exif_thumbnail())
RPVector *r_bin_wasm_get_types(RBinWasmObj *bin) { r_return_val_if_fail (bin && bin->g_sections, NULL); return bin->g_types? bin->g_types: parse_unique_subsec_vec_by_id (bin, R_BIN_WASM_SECTION_TYPE); }
0
[ "CWE-787" ]
radare2
b4ca66f5d4363d68a6379e5706353b3bde5104a4
122,206,294,775,900,500,000,000,000,000,000,000,000
4
Fix #20336 - wasm bin parser ##crash
brcmf_cfg80211_sched_scan_start(struct wiphy *wiphy, struct net_device *ndev, struct cfg80211_sched_scan_request *request) { struct brcmf_if *ifp = netdev_priv(ndev); struct brcmf_cfg80211_info *cfg = wiphy_priv(wiphy); struct brcmf_pno_net_param_le pfn; int i; int ret = 0; brcmf_dbg(SCAN, "Enter n_match...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
330,415,683,553,765,040,000,000,000,000,000,000,000
87
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap() User-space can choose to omit NL80211_ATTR_SSID and only provide raw IE TLV data. When doing so it can provide SSID IE with length exceeding the allowed size. The driver further processes this IE copying it into a local variable without checking the...
static void prepare_vmcs12(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12, u32 exit_reason, u32 exit_intr_info, unsigned long exit_qualification) { /* update guest state fields: */ vmcs12->guest_cr0 = vmcs12_guest_cr0(vcpu, vmcs12); vmcs12->guest_cr4 = vmcs12_guest_cr4(vcpu, vmcs12); vmcs12->guest_rsp = ...
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
22,371,835,413,611,370,000,000,000,000,000,000,000
138
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
static inline void native_store_gdt(struct desc_ptr *dtr) { asm volatile("sgdt %0":"=m" (*dtr)); }
0
[ "CWE-119" ]
linux-2.6
5ac37f87ff18843aabab84cf75b2f8504c2d81fe
248,974,016,667,785,650,000,000,000,000,000,000,000
4
x86: fix ldt limit for 64 bit Fix size of LDT entries. On x86-64, ldt_desc is a double-sized descriptor. Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
static int __iommu_remove_mapping(struct device *dev, dma_addr_t iova, size_t size) { struct dma_iommu_mapping *mapping = dev->archdata.mapping; /* * add optional in-page offset from iova to size and align * result to page size */ size = PAGE_ALIGN((iova & ~PAGE_MASK) + size); iova &= PAGE_MASK; iommu_unma...
0
[ "CWE-284", "CWE-264" ]
linux
0ea1ec713f04bdfac343c9702b21cd3a7c711826
257,991,369,449,313,670,000,000,000,000,000,000,000
15
ARM: dma-mapping: don't allow DMA mappings to be marked executable DMA mapping permissions were being derived from pgprot_kernel directly without using PAGE_KERNEL. This causes them to be marked with executable permission, which is not what we want. Fix this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk...
static void _perf_event_enable(struct perf_event *event) { struct perf_event_context *ctx = event->ctx; struct task_struct *task = ctx->task; if (!task) { /* * Enable the event on the cpu that it's on */ cpu_function_call(event->cpu, __perf_event_enable, event); return; } raw_spin_lock_irq(&ctx->lock...
0
[ "CWE-284", "CWE-264" ]
linux
f63a8daa5812afef4f06c962351687e1ff9ccb2b
150,569,732,910,092,760,000,000,000,000,000,000,000
56
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 ...
static void _GTextFieldReplace(GTextField *gt, const unichar_t *str) { unichar_t *old = gt->oldtext; unichar_t *new = malloc((u_strlen(gt->text)-(gt->sel_end-gt->sel_start) + u_strlen(str)+1)*sizeof(unichar_t)); gt->oldtext = gt->text; gt->sel_oldstart = gt->sel_start; gt->sel_oldend = gt->sel_end;...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
105,390,430,836,590,200,000,000,000,000,000,000,000
19
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
void * pvPortMalloc( size_t xWantedSize ) { void * pvReturn = NULL; static uint8_t * pucAlignedHeap = NULL; /* Ensure that blocks are always aligned to the required number of bytes. */ #if ( portBYTE_ALIGNMENT != 1 ) { if( xWantedSize & portBYTE_ALIGNMENT_MASK ) ...
1
[ "CWE-200", "CWE-119" ]
FreeRTOS-Kernel
c7a9a01c94987082b223d3e59969ede64363da63
267,641,896,482,212,160,000,000,000,000,000,000,000
50
Improve heap2 bounds checking (#224) * Improve heap bounds checking in pvPortMalloc
ZEND_API zval* ZEND_FASTCALL zend_hash_minmax(const HashTable *ht, compare_func_t compar, uint32_t flag) { uint32_t idx; Bucket *p, *res; IS_CONSISTENT(ht); if (ht->nNumOfElements == 0 ) { return NULL; } idx = 0; while (1) { if (idx == ht->nNumUsed) { return NULL; } if (Z_TYPE(ht->arData[idx].val) ...
0
[ "CWE-190" ]
php-src
4cc0286f2f3780abc6084bcdae5dce595daa3c12
55,825,852,574,900,600,000,000,000,000,000,000,000
36
Fix #73832 - leave the table in a safe state if the size is too big.
void nntp_bcache_update(struct NntpData *nntp_data) { mutt_bcache_list(nntp_data->bcache, nntp_bcache_delete, nntp_data); }
0
[ "CWE-119", "CWE-787" ]
neomutt
6296f7153f0c9d5e5cd3aaf08f9731e56621bdd3
160,606,818,737,100,390,000,000,000,000,000,000,000
4
Set length modifiers for group and desc nntp_add_group parses a line controlled by the connected nntp server. Restrict the maximum lengths read into the stack buffers group, and desc.
quit( struct parse *pcmd, FILE *fp ) { if (havehost) closesocket(sockfd); /* cleanliness next to godliness */ exit(0); }
0
[ "CWE-20" ]
ntp
07a5b8141e354a998a52994c3c9cd547927e56ce
131,300,589,830,956,660,000,000,000,000,000,000,000
9
[TALOS-CAN-0063] avoid buffer overrun in ntpq
void fastd_receive_unknown_free(void) { size_t i; for (i = 0; i < UNKNOWN_TABLES; i++) free(ctx.unknown_handshakes[i]); }
0
[ "CWE-617", "CWE-119", "CWE-284" ]
fastd
737925113363b6130879729cdff9ccc46c33eaea
155,689,497,157,253,260,000,000,000,000,000,000,000
5
receive: fix buffer leak when receiving invalid packets For fastd versions before v20, this was just a memory leak (which could still be used for DoS, as it's remotely triggerable). With the new buffer management of fastd v20, this will trigger an assertion failure instead as soon as the buffer pool is empty.
static void *shmem_follow_link(struct dentry *dentry, struct nameidata *nd) { struct page *page = NULL; int res = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ, NULL); nd_set_link(nd, res ? ERR_PTR(res) : kmap(page)); if (page) unlock_page(page); return page; }
0
[ "CWE-400" ]
linux-2.6
14fcc23fdc78e9d32372553ccf21758a9bd56fa1
114,492,484,713,598,650,000,000,000,000,000,000,000
9
tmpfs: fix kernel BUG in shmem_delete_inode SuSE's insserve initscript ordering program hits kernel BUG at mm/shmem.c:814 on 2.6.26. It's using posix_fadvise on directories, and the shmem_readpage method added in 2.6.23 is letting POSIX_FADV_WILLNEED allocate useless pages to a tmpfs directory, incrementing i_blocks ...
itc_type_find (GstTypeFind * tf, gpointer unused) { DataScanCtx c = { 0, NULL, 0 }; guint8 magic[8] = { 0x00, 0x00, 0x01, 0x1C, 0x69, 0x74, 0x63, 0x68 }; guint8 preamble[4] = { 0x00, 0x00, 0x00, 0x02 }; guint8 artwork_marker[8] = { 0x00, 0x00, 0x00, 0x00, 0x61, 0x72, 0x74, 0x77 }; GstTypeFindProbability itc_p...
0
[ "CWE-125" ]
gst-plugins-base
2fdccfd64fc609e44e9c4b8eed5bfdc0ab9c9095
86,239,662,756,234,600,000,000,000,000,000,000,000
55
typefind: bounds check windows ico detection Fixes out of bounds read https://bugzilla.gnome.org/show_bug.cgi?id=774902
void PSOutputDev::writePSName(char *s) { char *p; char c; p = s; while ((c = *p++)) { if (c <= (char)0x20 || c >= (char)0x7f || c == '(' || c == ')' || c == '<' || c == '>' || c == '[' || c == ']' || c == '{' || c == '}' || c == '/' || c == '%' || c == '\\') { writePSFmt("#{0:02x}", c & 0xff); ...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
216,109,906,098,973,570,000,000,000,000,000,000,000
16
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
int MMDB_aget_value(MMDB_entry_s *const start, MMDB_entry_data_s *const entry_data, const char *const *const path) { MMDB_s *mmdb = start->mmdb; uint32_t offset = start->offset; memset(entry_data, 0, sizeof(MMDB_entry_data_s)); DEBUG_NL; DEBUG_MSG("looking up...
0
[]
libmaxminddb
51255f113fe3c7b63ffe957636a7656a3ff9d1ff
64,600,433,368,027,090,000,000,000,000,000,000,000
56
Fix several segfaults from missing bounds checks These were found using afl-fuzz. There are several more similar failure that warrant investigation. If we want to add tests, I have several corrupt databases we could add, but these are trivially reproducible when using the existing test databases as input to afl-fuzz.
static inline void clear_bss_descriptor(struct bss_descriptor *bss) { /* Don't blow away ->list, just BSS data */ memset(bss, 0, offsetof(struct bss_descriptor, list)); }
0
[ "CWE-119" ]
linux-2.6
48735d8d8bd701b1e0cd3d49c21e5e385ddcb077
266,694,280,160,941,470,000,000,000,000,000,000,000
5
libertas: fix buffer overrun If somebody sends an invalid beacon/probe response, that can trash the whole BSS descriptor. The descriptor is, luckily, large enough so that it cannot scribble past the end of it; it's well above 400 bytes long. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: stable@kernel.o...
static unsigned long slice_find_area_bottomup(struct mm_struct *mm, unsigned long len, struct slice_mask available, int psize, unsigned long high_limit) { int pshift = max_t(int, mmu_psize_defs[psize].shift, PAGE_SHIFT); unsigned long addr, found, next_end; struct vm_unmapped_area_in...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
339,590,158,781,797,800,000,000,000,000,000,000,000
45
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static void free_smi_msg_list(struct list_head *q) { struct ipmi_smi_msg *msg, *msg2; list_for_each_entry_safe(msg, msg2, q, link) { list_del(&msg->link); ipmi_free_smi_msg(msg); } }
0
[ "CWE-416", "CWE-284" ]
linux
77f8269606bf95fcb232ee86f6da80886f1dfae8
191,055,239,268,844,430,000,000,000,000,000,000,000
9
ipmi: fix use-after-free of user->release_barrier.rda When we do the following test, we got oops in ipmi_msghandler driver while((1)) do service ipmievd restart & service ipmievd restart done --------------------------------------------------------------- [ 294.230186] Unable to handle kernel paging request at virt...
GF_Err gf_isom_hevc_set_inband_config(GF_ISOFile *the_file, u32 trackNumber, u32 DescriptionIndex, Bool keep_xps) { return gf_isom_hevc_config_update_ex(the_file, trackNumber, DescriptionIndex, NULL, GF_ISOM_HVCC_SET_INBAND, keep_xps); }
0
[ "CWE-401" ]
gpac
0a85029d694f992f3631e2f249e4999daee15cbf
72,803,011,321,351,800,000,000,000,000,000,000,000
4
fixed #1785 (fuzz)
static int sctp_getsockopt_default_prinfo(struct sock *sk, int len, char __user *optval, int __user *optlen) { struct sctp_default_prinfo info; struct sctp_association *asoc; int retval = -EFAULT; if (len < sizeof(info)) { retval = -EINVAL; goto out; } len = sizeof(info); if (copy_from_user(&...
0
[ "CWE-617", "CWE-362" ]
linux
2dcab598484185dea7ec22219c76dcdd59e3cb90
53,702,284,275,865,370,000,000,000,000,000,000,000
42
sctp: avoid BUG_ON on sctp_wait_for_sndbuf Alexander Popov reported that an application may trigger a BUG_ON in sctp_wait_for_sndbuf if the socket tx buffer is full, a thread is waiting on it to queue more data and meanwhile another thread peels off the association being used by the first thread. This patch replaces ...
int mp_unpack_full(lua_State *L, int limit, int offset) { size_t len; const char *s; mp_cur c; int cnt; /* Number of objects unpacked */ int decode_all = (!limit && !offset); s = luaL_checklstring(L,1,&len); /* if no match, exits */ if (offset < 0 || limit < 0) /* requesting negative off o...
1
[ "CWE-119", "CWE-787" ]
redis
5ccb6f7a791bf3490357b00a898885759d98bab0
226,390,211,612,254,000,000,000,000,000,000,000,000
52
Security: more cmsgpack fixes by @soloestoy. @soloestoy sent me this additional fixes, after searching for similar problems to the one reported in mp_pack(). I'm committing the changes because it was not possible during to make a public PR to protect Redis users and give Redis providers some time to patch their system...
static int rtnetlink_event(struct notifier_block *this, unsigned long event, void *ptr) { struct net_device *dev = netdev_notifier_info_to_dev(ptr); switch (event) { case NETDEV_REBOOT: case NETDEV_CHANGEMTU: case NETDEV_CHANGEADDR: case NETDEV_CHANGENAME: case NETDEV_FEAT_CHANGE: case NETDEV_BONDING_FAILOVER:...
0
[ "CWE-476" ]
linux
f428fe4a04cc339166c8bbd489789760de3a0cee
45,472,273,683,781,560,000,000,000,000,000,000,000
26
rtnetlink: give a user socket to get_target_net() This function is used from two places: rtnl_dump_ifinfo and rtnl_getlink. In rtnl_getlink(), we give a request skb into get_target_net(), but in rtnl_dump_ifinfo, we give a response skb into get_target_net(). The problem here is that NETLINK_CB() isn't initialized for ...
static void fm10k_update_itr(struct fm10k_ring_container *ring_container) { unsigned int avg_wire_size, packets, itr_round; /* Only update ITR if we are using adaptive setting */ if (!ITR_IS_ADAPTIVE(ring_container->itr)) goto clear_counts; packets = ring_container->total_packets; if (!packets) goto clear_co...
0
[ "CWE-476" ]
linux
01ca667133d019edc9f0a1f70a272447c84ec41f
218,201,102,113,300,240,000,000,000,000,000,000,000
60
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),...
free_refs_data(Image *img) { free(img->refs); img->refs = NULL; img->refcnt = 0; img->refcap = 0; }
0
[ "CWE-787" ]
kitty
82c137878c2b99100a3cdc1c0f0efea069313901
108,788,549,779,997,900,000,000,000,000,000,000,000
4
Graphics protocol: Dont return filename in the error message when opening file fails, since filenames can contain control characters Fixes #3128
static char *socket_http_get_recursive(const char *url, int *code, int *rlen, ut32 redirections) { if (code) { *code = 0; } if (rlen) { *rlen = 0; } char *curl_env = r_sys_getenv ("R2_CURL"); if (!R_STR_ISEMPTY (curl_env) && atoi (curl_env)) { int len; char *escaped_url = r_str_escape_sh (url); char *co...
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
108,392,738,544,011,660,000,000,000,000,000,000,000
90
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
int gnutls_x509_ext_export_aia(gnutls_x509_aia_t aia, gnutls_datum_t * ext) { int ret, result; ASN1_TYPE c2 = ASN1_TYPE_EMPTY; unsigned int i; ret = asn1_create_element(_gnutls_get_pkix(), "PKIX1.AuthorityInfoAccessSyntax", &c2); if (ret != ASN1_SUCCESS) { gnutls_assert(); return _gnutls_asn2...
0
[]
gnutls
d6972be33264ecc49a86cd0958209cd7363af1e9
218,377,086,775,288,200,000,000,000,000,000,000,000
56
eliminated double-free in the parsing of dist points Reported by Robert Święcki.
test_weeknum(int from, int to, int f, double sg) { int j; fprintf(stderr, "test_weeknum: %d...%d (%d) - %.0f\n", from, to, to - from, sg); for (j = from; j <= to; j++) { int y, w, d, rj, ns; c_jd_to_weeknum(j, f, sg, &y, &w, &d); c_weeknum_to_jd(y, w, d, f, sg, &rj, &ns); if (j != rj) { fpri...
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
33,365,550,573,425,906,000,000,000,000,000,000,000
18
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
static int crypto_nivaead_default(struct crypto_alg *alg, u32 type, u32 mask) { struct rtattr *tb[3]; struct { struct rtattr attr; struct crypto_attr_type data; } ptype; struct { struct rtattr attr; struct crypto_attr_alg data; } palg; struct crypto_template *tmpl; struct crypto_instance *inst; struct c...
0
[ "CWE-310" ]
linux
9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6
129,906,069,780,198,390,000,000,000,000,000,000,000
73
crypto: user - fix info leaks in report API Three errors resulting in kernel memory disclosure: 1/ The structures used for the netlink based crypto algorithm report API are located on the stack. As snprintf() does not fill the remainder of the buffer with null bytes, those stack bytes will be disclosed to users of th...
static gint compare_expire(gconstpointer a, gconstpointer b) { const struct dhcp_lease *lease1 = a; const struct dhcp_lease *lease2 = b; return lease2->expire - lease1->expire; }
0
[]
connman
58d397ba74873384aee449690a9070bacd5676fa
39,351,947,982,530,406,000,000,000,000,000,000,000
7
gdhcp: Avoid reading invalid data in dhcp_get_option
RList *r_bin_le_get_libs(r_bin_le_obj_t *bin) { RList *l = r_list_newf ((RListFree)free); if (!l) { return NULL; } LE_image_header *h = bin->header; ut64 offset = (ut64)h->impmod + bin->headerOff; ut64 end = offset + h->impproc - h->impmod; while (offset < end) { char *name = __read_nonnull_str_at (bin->buf,...
0
[ "CWE-252" ]
radare2
d7ea20fb2e1433ebece9f004d87ad8f2377af23d
155,604,771,221,758,130,000,000,000,000,000,000,000
17
Fix #18923 - Fix resource exhaustion bug in LE binary (#18926)
void wasm_obj_free(RBinWasmObj *bin) { if (bin) { r_buf_free (bin->buf); r_list_free (bin->g_sections); r_pvector_free (bin->g_types); r_pvector_free (bin->g_imports); r_pvector_free (bin->g_funcs); r_pvector_free (bin->g_tables); r_pvector_free (bin->g_memories); r_pvector_free (bin->g_globals); r_p...
0
[ "CWE-787" ]
radare2
b4ca66f5d4363d68a6379e5706353b3bde5104a4
270,434,175,603,150,930,000,000,000,000,000,000,000
18
Fix #20336 - wasm bin parser ##crash
static void vmx_save_host_state(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); int i; if (vmx->host_state.loaded) return; vmx->host_state.loaded = 1; /* * Set host fs and gs selectors. Unfortunately, 22.2.3 does not * allow segment selectors with cpl > 0 or ti == 1. */ vmx->host_state.ld...
0
[ "CWE-20" ]
linux
bfd0a56b90005f8c8a004baf407ad90045c2b11e
138,088,489,924,996,110,000,000,000,000,000,000,000
54
nEPT: Nested INVEPT If we let L1 use EPT, we should probably also support the INVEPT instruction. In our current nested EPT implementation, when L1 changes its EPT table for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in the course of this modification already calls INVEPT. But if last level of sh...
DECODE_JSON(ExtensionObject) { ALLOW_NULL; CHECK_OBJECT; /* Search for Encoding */ size_t searchEncodingResult = 0; status ret = lookAheadForKey(UA_JSONKEY_ENCODING, ctx, parseCtx, &searchEncodingResult); /* If no encoding found it is structure encoding */ if(ret != UA_STATUSCODE_GOOD)...
0
[ "CWE-703", "CWE-787" ]
open62541
c800e2987b10bb3af6ef644b515b5d6392f8861d
239,877,374,248,034,330,000,000,000,000,000,000,000
149
fix(json): Check max recursion depth in more places
R_API wchar_t* r_str_mb_to_wc_l(const char *buf, int len) { wchar_t *res_buf = NULL; size_t sz; bool fail = true; if (!buf || len <= 0) { return NULL; } sz = mbstowcs (NULL, buf, len); if (sz == (size_t)-1) { goto err_r_str_mb_to_wc; } res_buf = (wchar_t *)calloc (1, (sz + 1) * sizeof (wchar_t)); if (!re...
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
94,868,956,090,127,750,000,000,000,000,000,000,000
27
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception) { #define ThrowPNMException(exception,message) \ { \ if (comment_info.comment != (char *) NULL) \ comment_info.comment=DestroyString(comment_info.comment); \ ThrowReaderException((exception),(message)); \ } char format; ...
0
[ "CWE-119", "CWE-787" ]
ImageMagick6
cb5ec7d98195aa74d5ed299b38eff2a68122f3fa
143,513,773,471,566,990,000,000,000,000,000,000,000
1,166
https://github.com/ImageMagick/ImageMagick/issues/1612
static int nfs_init_server(struct nfs_server *server, const struct nfs_mount_data *data) { struct nfs_client *clp; int error, nfsvers = 2; dprintk("--> nfs_init_server()\n"); #ifdef CONFIG_NFS_V3 if (data->flags & NFS_MOUNT_VER3) nfsvers = 3; #endif /* Allocate or find a client reference we can use */ clp = ...
1
[ "CWE-20" ]
linux-2.6
54af3bb543c071769141387a42deaaab5074da55
116,871,658,680,555,200,000,000,000,000,000,000,000
69
NFS: Fix an Oops in encode_lookup() It doesn't look as if the NFS file name limit is being initialised correctly in the struct nfs_server. Make sure that we limit whatever is being set in nfs_probe_fsinfo() and nfs_init_server(). Also ensure that readdirplus and nfs4_path_walk respect our file name limits. Signed-of...
static int do_linear_fault(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, pte_t *page_table, pmd_t *pmd, unsigned int flags, pte_t orig_pte) { pgoff_t pgoff = (((address & PAGE_MASK) - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff; pte_unmap(page_table); return __do_fault(mm, vma, a...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
177,638,665,582,251,220,000,000,000,000,000,000,000
10
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
modify_contact_rename_handler (LDAPOp *op, LDAPMessage *res) { LDAPModifyOp *modify_op = (LDAPModifyOp *) op; EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (op->backend); gchar *ldap_error_msg = NULL; gint ldap_error; LDAPMod **ldap_mods; gboolean differences; gint modify_contact_msgi...
0
[]
evolution-data-server
34bad61738e2127736947ac50e0c7969cc944972
249,069,500,087,090,960,000,000,000,000,000,000,000
153
Bug 796174 - strcat() considered unsafe for buffer overflow
static int ser_to_dev(int ser, dev_t *dev_no) { if (ser < 0 || ser > (255 - 64)) { pr_err("speakup: Invalid ser param. Must be between 0 and 191 inclusive.\n"); return -EINVAL; } *dev_no = MKDEV(4, (64 + ser)); return 0; }
0
[ "CWE-362", "CWE-763" ]
linux
d4122754442799187d5d537a9c039a49a67e57f1
26,819,908,792,649,517,000,000,000,000,000,000,000
10
speakup: Do not let the line discipline be used several times Speakup has only one speakup_tty variable to store the tty it is managing. This makes sense since its codebase currently assumes that there is only one user who controls the screen reading. That however means that we have to forbid using the line disciplin...
NDIS_STATUS ParaNdis_FinishSpecificInitialization(PARANDIS_ADAPTER *pContext) { NDIS_STATUS status = NDIS_STATUS_SUCCESS; NET_BUFFER_LIST_POOL_PARAMETERS PoolParams; NDIS_MINIPORT_INTERRUPT_CHARACTERISTICS mic; DEBUG_ENTRY(0); NdisZeroMemory(&mic, sizeof(mic)); mic.Header.Type = NDIS_OBJECT_TYP...
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
6,065,173,519,896,257,000,000,000,000,000,000,000
96
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
void setRecordTtl(const std::chrono::seconds& ttl) { record_ttl_ = ttl; }
0
[ "CWE-400" ]
envoy
542f84c66e9f6479bc31c6f53157c60472b25240
5,599,555,749,717,216,000,000,000,000,000,000,000
1
overload: Runtime configurable global connection limits (#147) Signed-off-by: Tony Allen <tony@allen.gg>
void setExperimentalSettings(QuicServerConnectionState& conn) { conn.lossState.reorderingThreshold = std::numeric_limits<decltype(conn.lossState.reorderingThreshold)>::max(); }
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
50,874,907,498,806,690,000,000,000,000,000,000,000
4
Close connection if we derive an extra 1-rtt write cipher Summary: Fixes CVE-2021-24029 Reviewed By: mjoras, lnicco Differential Revision: D26613890 fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945
static int sctp_getsockopt_hmac_ident(struct sock *sk, int len, char __user *optval, int __user *optlen) { struct sctp_hmacalgo __user *p = (void __user *)optval; struct sctp_hmac_algo_param *hmacs; __u16 data_len = 0; u32 num_idents; if (!sctp_auth_enable) return -EACCES; hmacs = sctp_sk(sk)->ep->au...
0
[]
linux-2.6
5e739d1752aca4e8f3e794d431503bfca3162df4
143,569,549,659,727,820,000,000,000,000,000,000,000
28
sctp: fix potential panics in the SCTP-AUTH API. All of the SCTP-AUTH socket options could cause a panic if the extension is disabled and the API is envoked. Additionally, there were some additional assumptions that certain pointers would always be valid which may not always be the case. This patch hardens the API a...
static void kvmgt_put_vfio_device(void *vgpu) { if (WARN_ON(!((struct intel_vgpu *)vgpu)->vdev.vfio_device)) return; vfio_device_put(((struct intel_vgpu *)vgpu)->vdev.vfio_device); }
0
[ "CWE-20" ]
linux
51b00d8509dc69c98740da2ad07308b630d3eb7d
208,859,654,568,311,100,000,000,000,000,000,000,000
7
drm/i915/gvt: Fix mmap range check This is to fix missed mmap range check on vGPU bar2 region and only allow to map vGPU allocated GMADDR range, which means user space should support sparse mmap to get proper offset for mmap vGPU aperture. And this takes care of actual pgoff in mmap request as original code always doe...
static int shutdown_veth(struct lxc_handler *handler, struct lxc_netdev *netdev) { char *veth1; int err; if (netdev->priv.veth_attr.pair) veth1 = netdev->priv.veth_attr.pair; else veth1 = netdev->priv.veth_attr.veth1; if (netdev->downscript) { err = run_script(handler->name, "net", netdev->downscript, ...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
332,071,050,922,870,450,000,000,000,000,000,000,000
18
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...
set_mouse_topline(win_T *wp) { orig_topline = wp->w_topline; # ifdef FEAT_DIFF orig_topfill = wp->w_topfill; # endif }
0
[ "CWE-125", "CWE-787" ]
vim
e178af5a586ea023622d460779fdcabbbfac0908
41,724,941,187,475,720,000,000,000,000,000,000,000
7
patch 8.2.5160: accessing invalid memory after changing terminal size Problem: Accessing invalid memory after changing terminal size. Solution: Adjust cmdline_row and msg_row to the value of Rows.
PGTYPEStimestamp_from_asc(char *str, char **endptr) { timestamp result; #ifdef HAVE_INT64_TIMESTAMP int64 noresult = 0; #else double noresult = 0.0; #endif fsec_t fsec; struct tm tt, *tm = &tt; int dtype; int nf; char *field[MAXDATEFIELDS]; int ftype[MAXDATEFIELDS]; char lowstr[MAXDATELEN ...
1
[ "CWE-416", "CWE-119" ]
postgres
4318daecc959886d001a6e79c6ea853e8b1dfb4b
325,193,846,501,532,700,000,000,000,000,000,000,000
73
Fix handling of wide datetime input/output. Many server functions use the MAXDATELEN constant to size a buffer for parsing or displaying a datetime value. It was much too small for the longest possible interval output and slightly too small for certain valid timestamp input, particularly input with a long timezone na...
STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp) { stbi__context s; stbi__start_mem(&s,buffer,len); return stbi__info_main(&s,x,y,comp); }
0
[ "CWE-787" ]
stb
5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40
288,973,013,594,247,100,000,000,000,000,000,000,000
6
stb_image: Reject fractional JPEG component subsampling ratios The component resamplers are not written to support this and I've never seen it happen in a real (non-crafted) JPEG file so I'm fine rejecting this as outright corrupt. Fixes issue #1178.
static void ahci_reg_init(AHCIState *s) { int i; s->control_regs.cap = (s->ports - 1) | (AHCI_NUM_COMMAND_SLOTS << 8) | (AHCI_SUPPORTED_SPEED_GEN1 << AHCI_SUPPORTED_SPEED) | HOST_CAP_NCQ | HOST_CAP_AHCI; s->control_regs.impl = (...
0
[ "CWE-399" ]
qemu
3251bdcf1c67427d964517053c3d185b46e618e8
238,641,736,894,910,950,000,000,000,000,000,000,000
17
ide: Correct handling of malformed/short PRDTs This impacts both BMDMA and AHCI HBA interfaces for IDE. Currently, we confuse the difference between a PRDT having "0 bytes" and a PRDT having "0 complete sectors." When we receive an incomplete sector, inconsistent error checking leads to an infinite loop wherein the c...
static void read_revisions_from_stdin(struct rev_info *revs, struct cmdline_pathspec *prune) { struct strbuf sb; int seen_dashdash = 0; int save_warning; save_warning = warn_on_object_refname_ambiguity; warn_on_object_refname_ambiguity = 0; strbuf_init(&sb, 1000); while (strbuf_getwholeline(&sb, stdi...
0
[ "CWE-119", "CWE-787" ]
git
34fa79a6cde56d6d428ab0d3160cb094ebad3305
293,814,719,858,528,400,000,000,000,000,000,000,000
34
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...
static int _mysql_commit_txn(void *conn, const sasl_utils_t *utils) { return _mysql_exec(conn, "COMMIT", NULL, 0, NULL, utils); }
0
[ "CWE-89" ]
cyrus-sasl
9eff746c9daecbcc0041b09a5a51ba30738cdcbc
288,480,641,635,596,180,000,000,000,000,000,000,000
4
CVE-2022-24407 Escape password for SQL insert/update commands. Signed-off-by: Klaus Espenlaub <klaus@espenlaub.com>
static void ide_atapi_cmd_read_dma_cb(void *opaque, int ret) { IDEState *s = opaque; int data_offset, n; if (ret < 0) { if (ide_handle_rw_error(s, -ret, ide_dma_cmd_to_retry(s->dma_cmd))) { if (s->bus->error_status) { s->bus->dma->aiocb = NULL; return; ...
0
[ "CWE-125" ]
qemu
813212288970c39b1800f63e83ac6e96588095c6
87,769,128,997,591,080,000,000,000,000,000,000,000
73
ide: atapi: assert that the buffer pointer is in range A case was reported where s->io_buffer_index can be out of range. The report skimped on the details but it seems to be triggered by s->lba == -1 on the READ/READ CD paths (e.g. by sending an ATAPI command with LBA = 0xFFFFFFFF). For now paper over it with asserti...
aucmd_restbuf( aco_save_T *aco) // structure holding saved values { int dummy; win_T *save_curwin; if (aco->use_aucmd_win) { --curbuf->b_nwindows; // Find "aucmd_win", it can't be closed, but it may be in another tab // page. Do not trigger autocommands here. block_autocmds(); if (curwi...
0
[ "CWE-122", "CWE-787" ]
vim
5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089
294,349,244,149,800,900,000,000,000,000,000,000,000
123
patch 9.0.0061: ml_get error with nested autocommand Problem: ml_get error with nested autocommand. Solution: Also check line numbers for a nested autocommand. (closes #10761)
static int cma_init_conn_qp(struct rdma_id_private *id_priv, struct ib_qp *qp) { struct ib_qp_attr qp_attr; int qp_attr_mask, ret; qp_attr.qp_state = IB_QPS_INIT; ret = rdma_init_qp_attr(&id_priv->id, &qp_attr, &qp_attr_mask); if (ret) return ret; return ib_modify_qp(qp, &qp_attr, qp_attr_mask); }
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
175,073,478,322,982,600,000,000,000,000,000,000,000
12
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
static void shrink_ple_window(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); struct vmcb_control_area *control = &svm->vmcb->control; int old = control->pause_filter_count; control->pause_filter_count = __shrink_ple_window(old, pause_filter_count, pause_filter_count_shrink, ...
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
234,562,199,489,655,430,000,000,000,000,000,000,000
17
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
static int setup_netfront_split(struct netfront_queue *queue) { int err; err = xenbus_alloc_evtchn(queue->info->xbdev, &queue->tx_evtchn); if (err < 0) goto fail; err = xenbus_alloc_evtchn(queue->info->xbdev, &queue->rx_evtchn); if (err < 0) goto alloc_rx_evtchn_fail; snprintf(queue->tx_irq_name, sizeof(que...
0
[]
linux
f63c2c2032c2e3caad9add3b82cc6e91c376fd26
62,020,820,702,061,740,000,000,000,000,000,000,000
43
xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses() The commit referenced below moved the invocation past the "next" label, without any explanation. In fact this allows misbehaving backends undue control over the domain the frontend runs in, as earlier detected errors require the skb to not ...
VAR* var_from_env(const char *name, const char *def_val) { const char *tmp; VAR *v; if (!(tmp = getenv(name))) tmp = def_val; v = var_init(0, name, strlen(name), tmp, strlen(tmp)); my_hash_insert(&var_hash, (uchar*)v); return v; }
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
104,422,058,768,856,210,000,000,000,000,000,000,000
11
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static int build_audio_procunit(struct mixer_build *state, int unitid, void *raw_desc, struct procunit_info *list, char *name) { struct uac_processing_unit_descriptor *desc = raw_desc; int num_ins = desc->bNrInPins; struct usb_mixer_elem_info *cval; struct snd_kcontrol *kctl; int i, err, nameid, type, len;...
1
[ "CWE-125" ]
linux
f4351a199cc120ff9d59e06d02e8657d08e6cc46
167,516,714,831,142,730,000,000,000,000,000,000,000
150
ALSA: usb-audio: Avoid access before bLength check in build_audio_procunit() The parser for the processing unit reads bNrInPins field before the bLength sanity check, which may lead to an out-of-bound access when a malformed descriptor is given. Fix it by assignment after the bLength check. Cc: <stable@vger.kernel.o...
int unit_stop(Unit *u) { UnitActiveState state; Unit *following; assert(u); state = unit_active_state(u); if (UNIT_IS_INACTIVE_OR_FAILED(state)) return -EALREADY; if ((following = unit_following(u))) { log_debug_unit(u->id, "Redirecting ...
0
[]
systemd
5ba6985b6c8ef85a8bcfeb1b65239c863436e75b
177,764,762,867,379,280,000,000,000,000,000,000,000
26
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...
bool Predicant_to_list_comparator::alloc_comparators(THD *thd, uint nargs) { size_t nbytes= sizeof(Predicant_to_value_comparator) * nargs; if (!(m_comparators= (Predicant_to_value_comparator *) thd->alloc(nbytes))) return true; memset(m_comparators, 0, nbytes); return false; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
125,821,132,308,218,370,000,000,000,000,000,000,000
8
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 ...
static void flat_print_int(WriterContext *wctx, const char *key, long long int value) { printf("%s%s=%lld\n", wctx->section_pbuf[wctx->level].str, key, value); }
0
[ "CWE-476" ]
FFmpeg
837cb4325b712ff1aab531bf41668933f61d75d2
332,170,398,768,729,700,000,000,000,000,000,000,000
4
ffprobe: Fix null pointer dereference with color primaries Found-by: AD-lab of venustech Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static RzList *entries(RzBinFile *bf) { if (!bf) { return NULL; } LuacBinInfo *bin_info_obj = GET_INTERNAL_BIN_INFO_OBJ(bf); if (!bin_info_obj) { return NULL; } return bin_info_obj->entry_list; }
1
[ "CWE-200", "CWE-787" ]
rizin
05bbd147caccc60162d6fba9baaaf24befa281cd
3,339,740,345,189,327,600,000,000,000,000,000,000
11
Fix oob read on _luac_build_info and luac memleaks
set_bound_node_opt_info(OptNode* opt, MinMaxLen* plen) { mml_copy(&(opt->sb.mm), plen); mml_copy(&(opt->spr.mm), plen); mml_copy(&(opt->map.mm), plen); }
0
[ "CWE-787" ]
oniguruma
cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0
73,436,386,748,309,580,000,000,000,000,000,000,000
6
#207: Out-of-bounds write
MagickExport Image *SeparateImage(const Image *image, const ChannelType channel_type,ExceptionInfo *exception) { #define GetChannelBit(mask,bit) (((size_t) (mask) >> (size_t) (bit)) & 0x01) #define SeparateImageTag "Separate/Image" CacheView *image_view, *separate_view; Image *separate_image; M...
0
[ "CWE-416" ]
ImageMagick
a47e7a994766b92b10d4a87df8c1c890c8b170f3
149,180,868,841,131,060,000,000,000,000,000,000,000
115
https://github.com/ImageMagick/ImageMagick/issues/1724
static inline void SetPixelL(const Image *restrict image,const Quantum L, Quantum *restrict pixel) { if (image->channel_map[LPixelChannel].traits != UndefinedPixelTrait) pixel[image->channel_map[LPixelChannel].offset]=L; }
0
[ "CWE-119", "CWE-787" ]
ImageMagick
450bd716ed3b9186dd10f9e60f630a3d9eeea2a4
233,418,085,121,755,420,000,000,000,000,000,000,000
6
find_link_ref(struct link_ref **references, uint8_t *name, size_t length) { unsigned int hash = hash_link_ref(name, length); struct link_ref *ref = NULL; ref = references[hash % REF_TABLE_SIZE]; while (ref != NULL) { if (ref->id == hash) return ref; ref = ref->next; } return NULL; }
0
[]
redcarpet
e5a10516d07114d582d13b9125b733008c61c242
318,179,644,235,667,740,000,000,000,000,000,000,000
16
Avoid rewinding previous inline when auto-linking When a bit like "_foo_1@bar.com" is processed, first the emphasis is rendered, then the 1 is output verbatim. When the `@` is encountered, Redcarpet tries to find the "local part" of the address and stops when it encounters an invalid char (i.e. here the `!`). The pro...
static void netif_free_rx_queues(struct net_device *dev) { unsigned int i, count = dev->num_rx_queues; /* netif_alloc_rx_queues alloc failed, resources have been unreg'ed */ if (!dev->_rx) return; for (i = 0; i < count; i++) xdp_rxq_info_unreg(&dev->_rx[i].xdp_rxq); kvfree(dev->_rx);
0
[ "CWE-416" ]
linux
a4270d6795b0580287453ea55974d948393e66ef
63,074,186,095,752,350,000,000,000,000,000,000,000
13
net-gro: fix use-after-free read in napi_gro_frags() If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might be freed and reused. Reading eth->h_proto at the en...
clear_hostname_list () { register int i; if (hostname_list_initialized == 0) return; for (i = 0; i < hostname_list_length; i++) free (hostname_list[i]); hostname_list_length = hostname_list_initialized = 0; }
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
152,859,667,815,408,580,000,000,000,000,000,000,000
10
Bash-4.4 patch 7
select_entry_guard_for_circuit(guard_selection_t *gs, guard_usage_t usage, const entry_guard_restriction_t *rst, unsigned *state_out) { const int need_descriptor = (usage == GUARD_USAGE_TRAFFIC); tor_assert(gs); tor_asser...
0
[ "CWE-200" ]
tor
665baf5ed5c6186d973c46cdea165c0548027350
161,264,033,072,488,800,000,000,000,000,000,000,000
95
Consider the exit family when applying guard restrictions. When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code ...
static inline bool ext4_encrypted_inode(struct inode *inode) { return ext4_test_inode_flag(inode, EXT4_INODE_ENCRYPT);
0
[ "CWE-787" ]
linux
c37e9e013469521d9adb932d17a1795c139b36db
145,149,920,984,093,560,000,000,000,000,000,000,000
4
ext4: add more inode number paranoia checks If there is a directory entry pointing to a system inode (such as a journal inode), complain and declare the file system to be corrupted. Also, if the superblock's first inode number field is too small, refuse to mount the file system. This addresses CVE-2018-10882. https...
~CImgDisplay() { assign(); delete[] _keys; delete[] _released_keys; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
88,041,028,270,659,200,000,000,000,000,000,000,000
5
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void io_rsrc_node_switch(struct io_ring_ctx *ctx, struct io_rsrc_data *data_to_kill) { WARN_ON_ONCE(!ctx->rsrc_backup_node); WARN_ON_ONCE(data_to_kill && !ctx->rsrc_node); if (data_to_kill) { struct io_rsrc_node *rsrc_node = ctx->rsrc_node; rsrc_node->rsrc_data = data_to_kill; io_rsrc_ref_lock(ct...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
252,102,489,337,426,800,000,000,000,000,000,000,000
24
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
proto_write_byte_array (p11_rpc_message *msg, CK_BYTE_PTR array, CK_ULONG len, CK_RV ret) { assert (msg != NULL); /* * When returning an byte array, in many cases we need to pass * an invalid array along with a length, which signifies CKR_BU...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
329,412,320,759,502,700,000,000,000,000,000,000,000
29
Check for arithmetic overflows before allocating
static int _iwl_trans_pcie_start_hw(struct iwl_trans *trans) { struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); int err; lockdep_assert_held(&trans_pcie->mutex); err = iwl_pcie_prepare_card_hw(trans); if (err) { IWL_ERR(trans, "Error while preparing HW: %d\n", err); return err; } err =...
0
[ "CWE-476" ]
linux
8188a18ee2e48c9a7461139838048363bfce3fef
69,802,161,060,567,470,000,000,000,000,000,000,000
38
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...
rfbTranslateNone(char *table, rfbPixelFormat *in, rfbPixelFormat *out, char *iptr, char *optr, int bytesBetweenInputLines, int width, int height) { int bytesPerOutputLine = width * (out->bitsPerPixel / 8); while (height > 0) { memcpy(optr, iptr, bytesPerOutputLine); ...
0
[]
libvncserver
53073c8d7e232151ea2ecd8a1243124121e10e2d
52,387,821,354,165,930,000,000,000,000,000,000,000
13
libvncserver: fix pointer aliasing/alignment issue Accessing byte-aligned data through uint16_t pointers can cause crashes on some platforms or reduce the performance. Therefore ensure a proper stack alignment.
static int dccp_feat_push_change(struct list_head *fn_list, u8 feat, u8 local, u8 mandatory, dccp_feat_val *fval) { struct dccp_feat_entry *new = dccp_feat_entry_new(fn_list, feat, local); if (new == NULL) return -ENOMEM; new->feat_num = feat; new->is_local = local; new->state = FEAT_INITIA...
0
[ "CWE-401" ]
linux
1d3ff0950e2b40dc861b1739029649d03f591820
278,169,493,919,800,800,000,000,000,000,000,000,000
18
dccp: Fix memleak in __feat_register_sp If dccp_feat_push_change fails, we forget free the mem which is alloced by kmemdup in dccp_feat_clone_sp_val. Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: e8ef967a54f4 ("dccp: Registration routines for changing feature values") Reviewed-by: Mukesh Ojha <mojha@codeaurora.o...
static int io_async_cancel_one(struct io_uring_task *tctx, struct io_cancel_data *cd) { enum io_wq_cancel cancel_ret; int ret = 0; bool all; if (!tctx || !tctx->io_wq) return -ENOENT; all = cd->flags & (IORING_ASYNC_CANCEL_ALL|IORING_ASYNC_CANCEL_ANY); cancel_ret = io_wq_cancel_cb(tctx->io_wq, io_ca...
0
[ "CWE-193" ]
linux
47abea041f897d64dbd5777f0cf7745148f85d75
123,439,136,291,978,250,000,000,000,000,000,000,000
26
io_uring: fix off-by-one in sync cancelation file check The passed in index should be validated against the number of registered files we have, it needs to be smaller than the index value to avoid going one beyond the end. Fixes: 78a861b94959 ("io_uring: add sync cancelation API through io_uring_register()") Reported...
int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb, const struct nlmsghdr *nlh, struct netlink_dump_control *control) { struct netlink_callback *cb; struct sock *sk; struct netlink_sock *nlk; int ret; refcount_inc(&skb->users); sk = netlink_lookup(sock_net(ssk), ssk->sk_protocol, NETLINK_CB(...
0
[ "CWE-200" ]
linux
93c647643b48f0131f02e45da3bd367d80443291
98,151,696,158,610,530,000,000,000,000,000,000,000
71
netlink: Add netns check on taps Currently, a nlmon link inside a child namespace can observe systemwide netlink activity. Filter the traffic so that nlmon can only sniff netlink messages from its own netns. Test case: vpnns -- bash -c "ip link add nlmon0 type nlmon; \ ip link set nlmon0 u...
DSA *DSAparams_dup(DSA *dsa) { return ASN1_item_dup(ASN1_ITEM_rptr(DSAparams), dsa); }
0
[ "CWE-310" ]
openssl
684400ce192dac51df3d3e92b61830a6ef90be3e
97,177,573,138,996,530,000,000,000,000,000,000,000
4
Fix various certificate fingerprint issues. By using non-DER or invalid encodings outside the signed portion of a certificate the fingerprint can be changed without breaking the signature. Although no details of the signed portion of the certificate can be changed this can cause problems with some applications: e.g. t...
ext4_ext_put_gap_in_cache(struct inode *inode, struct ext4_ext_path *path, ext4_lblk_t block) { int depth = ext_depth(inode); ext4_lblk_t len; ext4_lblk_t lblock; struct ext4_extent *ex; struct extent_status es; ex = path[depth].p_ext; if (ex == NULL) { /* there is no extent yet, so gap is [0;-] */ lblo...
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
209,026,241,472,768,870,000,000,000,000,000,000,000
49
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
if (ctx->check_main_role && !main_role_set) { GF_MPD_Descriptor *desc; desc = gf_mpd_descriptor_new(NULL, "urn:mpeg:dash:role:2011", "main"); gf_list_add(set->role, desc); } } static void rewrite_dep_ids(GF_DasherCtx *ctx, GF_DashStream *base_ds) { u32 i, count = gf_list_count(ctx->pids); for (i=0; i<count; ...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
286,355,107,080,191,980,000,000,000,000,000,000,000
14
fixed #2138
const wchar_t *LibRaw_bigfile_datastream::wfname() { return wfilename.size()>0?wfilename.c_str():NULL; }
0
[ "CWE-703" ]
LibRaw
11909cc59e712e09b508dda729b99aeaac2b29ad
289,477,738,562,036,170,000,000,000,000,000,000,000
4
cumulated data checks patch
static int parse_part_sign_sha256 (sockent_t *se, /* {{{ */ void **ret_buffer, size_t *ret_buffer_len, int flags) { static c_complain_t complain_no_users = C_COMPLAIN_INIT_STATIC; char *buffer; size_t buffer_len; size_t buffer_offset; size_t username_len; char *secret; part_signature_sha256_t pss; ...
0
[ "CWE-119", "CWE-787" ]
collectd
b589096f907052b3a4da2b9ccc9b0e2e888dfc18
2,111,180,598,815,970,600,000,000,000,000,000,000
132
network plugin: Fix heap overflow in parse_packet(). Emilien Gaspar has identified a heap overflow in parse_packet(), the function used by the network plugin to parse incoming network packets. This is a vulnerability in collectd, though the scope is not clear at this point. At the very least specially crafted network...
static inline void eventpoll_init_file(struct file *file) { INIT_LIST_HEAD(&file->f_ep_links); }
1
[]
linux-2.6
28d82dc1c4edbc352129f97f4ca22624d1fe61de
273,787,696,074,068,800,000,000,000,000,000,000,000
4
epoll: limit paths The current epoll code can be tickled to run basically indefinitely in both loop detection path check (on ep_insert()), and in the wakeup paths. The programs that tickle this behavior set up deeply linked networks of epoll file descriptors that cause the epoll algorithms to traverse them indefinitel...
void Item_func_group_concat::cleanup() { DBUG_ENTER("Item_func_group_concat::cleanup"); Item_sum::cleanup(); /* Free table and tree if they belong to this item (if item have not pointer to original item from which was made copy => it own its objects ) */ if (!original) { delete tmp_table_param;...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
320,377,613,532,561,820,000,000,000,000,000,000,000
48
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
mono_loader_lock_if_inited (void) { if (loader_lock_inited) mono_loader_lock (); }
0
[]
mono
8e890a3bf80a4620e417814dc14886b1bbd17625
169,559,412,662,811,700,000,000,000,000,000,000,000
5
Search for dllimported shared libs in the base directory, not cwd. * loader.c: we don't search the current directory anymore for shared libraries referenced in DllImport attributes, as it has a slight security risk. We search in the same directory where the referencing image was loaded from, instead. Fixes bug# 641915...
QPDF_BOOL qpdf_allow_modify_form(qpdf_data qpdf) { QTC::TC("qpdf", "qpdf-c called qpdf_allow_modify_form"); return qpdf->qpdf->allowModifyForm(); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
309,607,994,227,491,700,000,000,000,000,000,000,000
5
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 ...
int rdma_listen(struct rdma_cm_id *id, int backlog) { struct rdma_id_private *id_priv; int ret; id_priv = container_of(id, struct rdma_id_private, id); if (id_priv->state == RDMA_CM_IDLE) { id->route.addr.src_addr.ss_family = AF_INET; ret = rdma_bind_addr(id, cma_src_addr(id_priv)); if (ret) return ret; ...
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
330,599,404,861,044,920,000,000,000,000,000,000,000
48
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
cifs_echo_request(struct work_struct *work) { int rc; struct TCP_Server_Info *server = container_of(work, struct TCP_Server_Info, echo.work); /* * We cannot send an echo until the NEGOTIATE_PROTOCOL request is * done, which is indicated by maxBuf != 0. Also, no need to ping if * we got a response recentl...
0
[ "CWE-20" ]
linux
70945643722ffeac779d2529a348f99567fa5c33
157,822,495,609,566,970,000,000,000,000,000,000,000
23
cifs: always do is_path_accessible check in cifs_mount Currently, we skip doing the is_path_accessible check in cifs_mount if there is no prefixpath. I have a report of at least one server however that allows a TREE_CONNECT to a share that has a DFS referral at its root. The reporter in this case was using a UNC that ...