func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void gf_hevc_parse_ps(GF_HEVCConfig* hevccfg, HEVCState* hevc, u32 nal_type) { u32 i, j; if (!hevccfg) return; for (i = 0; i < gf_list_count(hevccfg->param_array); i++) { GF_NALUFFParamArray* ar = gf_list_get(hevccfg->param_array, i); if (ar->type != nal_type) continue; for (j = 0; j < gf_list_count(ar->nalu...
0
[ "CWE-401" ]
gpac
0a85029d694f992f3631e2f249e4999daee15cbf
173,927,689,020,886,600,000,000,000,000,000,000,000
15
fixed #1785 (fuzz)
kex_setup(struct ssh *ssh, char *proposal[PROPOSAL_MAX]) { int r; if ((r = kex_new(ssh, proposal, &ssh->kex)) != 0) return r; if ((r = kex_send_kexinit(ssh)) != 0) { /* we start */ kex_free(ssh->kex); ssh->kex = NULL; return r; } return 0; }
0
[ "CWE-522", "CWE-399" ]
openssh-portable
ec165c392ca54317dbe3064a8c200de6531e89ad
91,329,093,956,339,160,000,000,000,000,000,000,000
13
upstream commit Unregister the KEXINIT handler after message has been received. Otherwise an unauthenticated peer can repeat the KEXINIT and cause allocation of up to 128MB -- until the connection is closed. Reported by shilei-c at 360.cn Upstream-ID: 43649ae12a27ef94290db16d1a98294588b75c05
int mnt_table_parse_fstab(struct libmnt_table *tb, const char *filename) { struct stat st; int rc = 0; if (!tb) return -EINVAL; if (!filename) filename = mnt_get_fstab_path(); if (!filename) return -EINVAL; if (stat(filename, &st) != 0) return -errno; tb->fmt = MNT_FMT_FSTAB; if (S_ISREG(st.st_mode))...
0
[ "CWE-552", "CWE-703" ]
util-linux
166e87368ae88bf31112a30e078cceae637f4cdb
21,874,023,270,506,380,000,000,000,000,000,000,000
25
libmount: remove support for deleted mount table entries The "(deleted)" suffix has been originally used by kernel for deleted mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3 (Dec 2014) kernel does not use this suffix for mount stuff in /proc at all. Let's remove this support from libmount to...
static MagickBooleanType PingGIFImage(Image *image,ExceptionInfo *exception) { unsigned char buffer[256], length, data_size; assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s"...
0
[ "CWE-200" ]
ImageMagick
9fd10cf630832b36a588c1545d8736539b2f1fb5
239,464,829,922,555,000,000,000,000,000,000,000,000
26
https://github.com/ImageMagick/ImageMagick/issues/592
get_sync_bit(int method) { int o_direct_flag = 0; /* If fsync is disabled, never open in sync mode */ if (!enableFsync) return 0; /* * Optimize writes by bypassing kernel cache with O_DIRECT when using * O_SYNC/O_FSYNC and O_DSYNC. But only if archiving and streaming are * disabled, otherwise the archiv...
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
183,646,406,708,053,170,000,000,000,000,000,000,000
51
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
mwifiex_wmm_ac_debug_print(const struct ieee_types_wmm_ac_parameters *ac_param) { const char *ac_str[] = { "BK", "BE", "VI", "VO" }; pr_debug("info: WMM AC_%s: ACI=%d, ACM=%d, Aifsn=%d, " "EcwMin=%d, EcwMax=%d, TxopLimit=%d\n", ac_str[wmm_aci_to_qidx_map[(ac_param->aci_aifsn_bitmap & MWIFIEX_ACI) >> ...
0
[ "CWE-787" ]
linux
3a9b153c5591548612c3955c9600a98150c81875
103,175,000,132,661,560,000,000,000,000,000,000,000
15
mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status() mwifiex_ret_wmm_get_status() calls memcpy() without checking the destination size.Since the source is given from remote AP which contains illegal wmm elements , this may trigger a heap buffer overflow. Fix it by putting the length check before call...
check_redraw(long_u flags) { // Careful: P_RCLR and P_RALL are a combination of other P_ flags int doclear = (flags & P_RCLR) == P_RCLR; int all = ((flags & P_RALL) == P_RALL || doclear); if ((flags & P_RSTAT) || all) // mark all status lines dirty status_redraw_all(); if ((flags & P_RBUF) || (...
0
[ "CWE-122" ]
vim
b7081e135a16091c93f6f5f7525a5c58fb7ca9f9
19,262,291,034,728,892,000,000,000,000,000,000,000
20
patch 8.2.3402: invalid memory access when using :retab with large value Problem: Invalid memory access when using :retab with large value. Solution: Check the number is positive.
static void init_dequant_tables(H264Context *h) { int i, x; init_dequant4_coeff_table(h); memset(h->dequant8_coeff, 0, sizeof(h->dequant8_coeff)); if (h->pps.transform_8x8_mode) init_dequant8_coeff_table(h); if (h->sps.transform_bypass) { for (i = 0; i < 6; i++) for (x =...
0
[ "CWE-703" ]
FFmpeg
8a3b85f3a7952c54a2c36ba1797f7e0cde9f85aa
284,554,795,798,730,680,000,000,000,000,000,000,000
18
avcodec/h264: update current_sps & sps->new only after the whole slice header decoder and init code finished This avoids them being cleared before the full initialization finished Fixes out of array read Fixes: asan_heap-oob_f0c5e6_7071_cov_1605985132_mov_h264_aac__Demo_FlagOfOurFathers.mov Found-by: Mateusz "j00ru" ...
const char** lxc_va_arg_list_to_argv_const(va_list ap, size_t skip) { return (const char**)lxc_va_arg_list_to_argv(ap, skip, 0); }
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
240,010,875,617,326,100,000,000,000,000,000,000,000
4
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...
static void phar_add_file(phar_archive_data **pphar, char *filename, int filename_len, char *cont_str, int cont_len, zval *zresource TSRMLS_DC) { char *error; size_t contents_len; phar_entry_data *data; php_stream *contents_file; if (filename_len >= sizeof(".phar")-1 && !memcmp(filename, ".phar", sizeof(".phar")-...
0
[ "CWE-416" ]
php-src
eb7ba73079b73ca4ef91307ae1ef30b43468717b
315,149,795,119,771,600,000,000,000,000,000,000,000
56
virtual_file_ex uses emalloc in 5.6+
static __inline__ void udpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, u8 type, u8 code, int offset, __be32 info) { __udp6_lib_err(skb, opt, type, code, offset, info, &udp_table); }
0
[]
linux
a612769774a30e4fc143c4cb6395c12573415660
141,186,358,836,760,700,000,000,000,000,000,000,000
6
udp: prevent bugcheck if filter truncates packet too much If socket filter truncates an udp packet below the length of UDP header in udpv6_queue_rcv_skb() or udp_queue_rcv_skb(), it will trigger a BUG_ON in skb_pull_rcsum(). This BUG_ON (and therefore a system crash if kernel is configured that way) can be easily enfo...
static struct config_group *function_make( struct config_group *group, const char *name) { struct gadget_info *gi; struct usb_function_instance *fi; char buf[MAX_NAME_LEN]; char *func_name; char *instance_name; int ret; ret = snprintf(buf, MAX_NAME_LEN, "%s", name); if (ret >= MAX_NAME_LEN) return ERR_PT...
0
[ "CWE-125" ]
linux
15753588bcd4bbffae1cca33c8ced5722477fe1f
233,454,516,965,887,400,000,000,000,000,000,000,000
48
USB: gadget: fix illegal array access in binding with UDC FuzzUSB (a variant of syzkaller) found an illegal array access using an incorrect index while binding a gadget with UDC. Reference: https://www.spinics.net/lists/linux-usb/msg194331.html This bug occurs when a size variable used for a buffer is misused to acc...
qb_rb_chown(struct qb_ringbuffer_s * rb, uid_t owner, gid_t group) { int32_t res; if (rb == NULL) { return -EINVAL; } res = chown(rb->shared_hdr->data_path, owner, group); if (res < 0 && errno != EPERM) { return -errno; } res = chown(rb->shared_hdr->hdr_path, owner, group); if (res < 0 && errno != EPERM) {...
0
[ "CWE-59" ]
libqb
e322e98dc264bc5911d6fe1d371e55ac9f95a71e
334,424,390,971,917,600,000,000,000,000,000,000,000
17
ipc: use O_EXCL on SHM files, and randomize the names Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
unsigned int zipStoreEntryEncoding(unsigned char *p, unsigned char encoding, unsigned int rawlen) { unsigned char len = 1, buf[5]; if (ZIP_IS_STR(encoding)) { /* Although encoding is given it may not be set for strings, * so we determine it here using the raw length. */ if (rawlen <= 0...
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
299,490,264,000,028,820,000,000,000,000,000,000,000
33
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
static inline void tcp_dec_quickack_mode(struct sock *sk, const unsigned int pkts) { struct inet_connection_sock *icsk = inet_csk(sk); if (icsk->icsk_ack.quick) { if (pkts >= icsk->icsk_ack.quick) { icsk->icsk_ack.quick = 0; /* Leaving quickack mode we deflate ATO. */ icsk->icsk_ack.ato = TCP_ATO_...
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
99,430,950,125,539,700,000,000,000,000,000,000,000
14
tcp: fix use after free in tcp_xmit_retransmit_queue() When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the tail of the write queue using tcp_add_write_queue_tail() Then it attempts to copy user data into this fresh skb. If the copy fails, we undo the work and remove the fresh skb. Unfortunately, t...
static pj_status_t pjsip_auth_verify( const pjsip_authorization_hdr *hdr, const pj_str_t *method, const pjsip_cred_info *cred_info ) { if (pj_stricmp(&hdr->scheme, &pjsip_DIGEST_STR) == 0) { char digest_buf[PJSIP_MD5STRLEN]; pj_str_t digest; pj_status_t status; const pjsip_digest_credential ...
0
[ "CWE-120", "CWE-787" ]
pjproject
d27f79da11df7bc8bb56c2f291d71e54df8d2c47
237,034,383,072,823,880,000,000,000,000,000,000,000
46
Use PJ_ASSERT_RETURN() on pjsip_auth_create_digest() and pjsua_init_tpselector() (#3009) * Use PJ_ASSERT_RETURN on pjsip_auth_create_digest * Use PJ_ASSERT_RETURN on pjsua_init_tpselector() * Fix incorrect check. * Add return value to pjsip_auth_create_digest() and pjsip_auth_create_digestSHA256() * Modifi...
do_sys_sigstack(struct sigstack __user *ssptr, struct sigstack __user *ossptr, unsigned long sp) { int ret = -EFAULT; /* First see if old state is wanted. */ if (ossptr) { if (put_user(current->sas_ss_sp + current->sas_ss_size, &ossptr->the_stack) || __put_user(on_sig_stack(sp), &ossptr->cur_statu...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
50,683,688,480,505,770,000,000,000,000,000,000,000
35
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...
int ha_recover(HASH *commit_list) { struct xarecover_st info; DBUG_ENTER("ha_recover"); info.found_foreign_xids= info.found_my_xids= 0; info.commit_list= commit_list; info.dry_run= (info.commit_list==0 && tc_heuristic_recover==0); info.list= NULL; /* commit_list and tc_heuristic_recover cannot be set bot...
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
319,943,507,157,902,300,000,000,000,000,000,000,000
56
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
int php_libxml_xmlCheckUTF8(const unsigned char *s) { int i; unsigned char c; for (i = 0; (c = s[i++]);) { if ((c & 0x80) == 0) { } else if ((c & 0xe0) == 0xc0) { if ((s[i++] & 0xc0) != 0x80) { return 0; } } else if ((c & 0xf0) == 0xe0) { if ((s[i++] & 0xc0) != 0x80 || (s[i++] & 0xc0) != 0x80) { ...
0
[ "CWE-200" ]
php-src
8e76d0404b7f664ee6719fd98f0483f0ac4669d6
115,043,484,741,206,960,000,000,000,000,000,000,000
25
Fixed external entity loading
_outCoerceToDomain(StringInfo str, const CoerceToDomain *node) { WRITE_NODE_TYPE("COERCETODOMAIN"); WRITE_NODE_FIELD(arg); WRITE_OID_FIELD(resulttype); WRITE_INT_FIELD(resulttypmod); WRITE_OID_FIELD(resultcollid); WRITE_ENUM_FIELD(coercionformat, CoercionForm); WRITE_LOCATION_FIELD(location); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
197,393,407,143,237,640,000,000,000,000,000,000,000
11
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
ikev2_gen_print(netdissect_options *ndo, u_char tpay, const struct isakmp_gen *ext) { struct isakmp_gen e; ND_TCHECK(*ext); UNALIGNED_MEMCPY(&e, ext, sizeof(e)); ikev2_pay_print(ndo, NPSTR(tpay), e.critical); ND_PRINT((ndo," len=%d", ntohs(e.len) - 4)); if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { /* Print...
0
[ "CWE-125" ]
tcpdump
396e94ff55a80d554b1fe46bf107db1e91008d6c
345,021,831,621,138,250,000,000,000,000,000,000
21
(for 4.9.3) CVE-2018-14469/ISAKMP: Add a missing bounds check In ikev1_n_print() check bounds before trying to fetch the replay detection status. This fixes a buffer over-read discovered by Bhargava Shastry. Add a test using the capture file supplied by the reporter(s).
void *kthread_data(struct task_struct *task) { return to_kthread(task)->data; }
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
196,490,959,309,843,800,000,000,000,000,000,000,000
4
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
static struct sk_buff *xfrm_state_netlink(struct sk_buff *in_skb, struct xfrm_state *x, u32 seq) { struct xfrm_dump_info info; struct sk_buff *skb; skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC); if (!skb) return ERR_PTR(-ENOMEM); info.in_skb = in_skb; info.out_skb = skb; info.nlmsg_seq = seq; info....
1
[ "CWE-703" ]
linux
864745d291b5ba80ea0bd0edcbe67273de368836
159,361,536,893,921,070,000,000,000,000,000,000,000
22
xfrm_user: return error pointer instead of NULL When dump_one_state() returns an error, e.g. because of a too small buffer to dump the whole xfrm state, xfrm_state_netlink() returns NULL instead of an error pointer. But its callers expect an error pointer and therefore continue to operate on a NULL skbuff. This could...
header_put_le_int (SF_PRIVATE *psf, int x) { if (psf->headindex < SIGNED_SIZEOF (psf->header) - 4) { psf->header [psf->headindex++] = x ; psf->header [psf->headindex++] = (x >> 8) ; psf->header [psf->headindex++] = (x >> 16) ; psf->header [psf->headindex++] = (x >> 24) ; } ; } /* header_put_le_int */
1
[ "CWE-119", "CWE-787" ]
libsndfile
708e996c87c5fae77b104ccfeb8f6db784c32074
314,037,117,487,017,800,000,000,000,000,000,000,000
8
src/ : Move to a variable length header buffer Previously, the `psf->header` buffer was a fixed length specified by `SF_HEADER_LEN` which was set to `12292`. This was problematic for two reasons; this value was un-necessarily large for the majority of files and too small for some others. Now the size of the header bu...
void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger) { unsigned int mask = 1 << irq; unsigned int old, new; /* Real old ELCR mask */ old = inb(0x4d0) | (inb(0x4d1) << 8); /* * If we use ACPI to set PCI IRQs, then we should clear ELCR * since we will set it correctly as we enable the PCI irq ...
0
[ "CWE-120" ]
linux
dad5ab0db8deac535d03e3fe3d8f2892173fa6a4
256,812,465,285,654,000,000,000,000,000,000,000,000
35
x86/acpi: Prevent out of bound access caused by broken ACPI tables The bus_irq argument of mp_override_legacy_irq() is used as the index into the isa_irq_to_gsi[] array. The bus_irq argument originates from ACPI_MADT_TYPE_IO_APIC and ACPI_MADT_TYPE_INTERRUPT items in the ACPI tables, but is nowhere sanity checked. Th...
REF_SetManualReference ( struct timespec *ref_time, double offset, double frequency, double skew ) { /* We are not synchronised to an external source, as such. This is only supposed to be used with the local source option, really. Log as MANU in the tracking log, packets will have NTP_REFID_LOCAL. */ ...
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
202,327,193,068,376,000,000,000,000,000,000,000,000
14
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
static void qxl_create_memslots(PCIQXLDevice *d) { int i; for (i = 0; i < NUM_MEMSLOTS; i++) { if (!d->guest_slots[i].active) { continue; } qxl_add_memslot(d, i, 0, QXL_SYNC); } }
0
[ "CWE-476" ]
qemu
d52680fc932efb8a2f334cc6993e705ed1e31e99
285,861,943,600,898,700,000,000,000,000,000,000,000
11
qxl: check release info object When releasing spice resources in release_resource() routine, if release info object 'ext.info' is null, it leads to null pointer dereference. Add check to avoid it. Reported-by: Bugs SysSec <bugs-syssec@rub.de> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Message-id: 20190425...
update_specialized_profile (struct cgraph_node *new_node, struct cgraph_node *orig_node, profile_count redirected_sum) { struct cgraph_edge *cs; profile_count new_node_count, orig_node_count = orig_node->count; if (dump_file) { fprintf (dump_file, " the sum of counts of redirected edg...
0
[ "CWE-20" ]
gcc
a09ccc22459c565814f79f96586fe4ad083fe4eb
132,463,399,249,833,340,000,000,000,000,000,000,000
35
Avoid segfault when doing IPA-VRP but not IPA-CP (PR 93015) 2019-12-21 Martin Jambor <mjambor@suse.cz> PR ipa/93015 * ipa-cp.c (ipcp_store_vr_results): Check that info exists testsuite/ * gcc.dg/lto/pr93015_0.c: New test. From-SVN: r279695
compat_do_replace(struct net *net, void __user *user, unsigned int len) { int ret; struct compat_ipt_replace tmp; struct xt_table_info *newinfo; void *loc_cpu_entry; struct ipt_entry *iter; if (copy_from_user(&tmp, user, sizeof(tmp)) != 0) return -EFAULT; /* overflow check */ if (tmp.num_counters >= INT_MAX...
0
[ "CWE-476" ]
linux
57ebd808a97d7c5b1e1afb937c2db22beba3c1f8
51,535,773,016,825,980,000,000,000,000,000,000,000
47
netfilter: add back stackpointer size checks The rationale for removing the check is only correct for rulesets generated by ip(6)tables. In iptables, a jump can only occur to a user-defined chain, i.e. because we size the stack based on number of user-defined chains we cannot exceed stack size. However, the underlyi...
test_bson_append_code (void) { bson_t *b; bson_t *b2; b = bson_new (); BSON_ASSERT (bson_append_code (b, "code", -1, "var a = {};")); b2 = get_bson ("test29.bson"); BSON_ASSERT_BSON_EQUAL (b, b2); bson_destroy (b); bson_destroy (b2); }
0
[ "CWE-125" ]
libbson
42900956dc461dfe7fb91d93361d10737c1602b3
193,653,531,490,615,320,000,000,000,000,000,000,000
12
CDRIVER-2269 Check for zero string length in codewscope
dump_eps(struct usb_hcd *hcd) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); struct max3421_ep *max3421_ep; struct usb_host_endpoint *ep; char ubuf[512], *dp, *end; unsigned long flags; struct urb *urb; int epnum, ret; spin_lock_irqsave(&max3421_hcd->lock, flags); list_for_each_entry(max3421_ep, &ma...
0
[ "CWE-416" ]
linux
b5fdf5c6e6bee35837e160c00ac89327bdad031b
301,738,960,022,089,620,000,000,000,000,000,000,000
36
usb: max-3421: Prevent corruption of freed memory The MAX-3421 USB driver remembers the state of the USB toggles for a device/endpoint. To save SPI writes, this was only done when a new device/endpoint was being used. Unfortunately, if the old device was removed, this would cause writes to freed memory. To fix this, ...
long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, u32 __user *uaddr2, u32 val2, u32 val3) { int clockrt, ret = -ENOSYS; int cmd = op & FUTEX_CMD_MASK; int fshared = 0; if (!(op & FUTEX_PRIVATE_FLAG)) fshared = 1; clockrt = op & FUTEX_CLOCK_REALTIME; if (clockrt && cmd != FUTEX_WAIT_BITSET ...
0
[]
linux-2.6
5ecb01cfdf96c5f465192bdb2a4fd4a61a24c6cc
203,083,762,774,035,830,000,000,000,000,000,000,000
61
futex_lock_pi() key refcnt fix This fixes a futex key reference count bug in futex_lock_pi(), where a key's reference count is incremented twice but decremented only once, causing the backing object to not be released. If the futex is created in a temporary file in an ext3 file system, this bug causes the file's inod...
void vnc_flush(VncState *vs) { vnc_lock_output(vs); if (vs->csock != -1 && (vs->output.offset #ifdef CONFIG_VNC_WS || vs->ws_output.offset #endif )) { vnc_client_write_locked(vs); } vnc_unlock_output(vs); }
0
[ "CWE-125" ]
qemu
bea60dd7679364493a0d7f5b54316c767cf894ef
206,555,363,306,145,250,000,000,000,000,000,000,000
12
ui/vnc: fix potential memory corruption issues this patch makes the VNC server work correctly if the server surface and the guest surface have different sizes. Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of VNC_DIRTY_PIXELS...
int HevcSpsUnit::hrd_parameters(bool commonInfPresentFlag, int maxNumSubLayersMinus1) { if (commonInfPresentFlag) { nal_hrd_parameters_present_flag = m_reader.getBit(); vcl_hrd_parameters_present_flag = m_reader.getBit(); if (nal_hrd_parameters_present_flag || vcl_hrd_parameters_present_...
0
[ "CWE-22" ]
tsMuxer
3763dd34755a8944d903aa19578fa22cd3734165
32,043,304,258,347,982,000,000,000,000,000,000,000
57
Fix Buffer Overflow Fixes issue #509.
T& operator()(const unsigned int x, const unsigned int y, const unsigned int z, const unsigned int c, const ulongT wh, const ulongT whd=0) { cimg::unused(wh,whd); return (*this)(x,y,z,c); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
209,044,660,981,563,300,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.
void cil_destroy_levelrange(struct cil_levelrange *lvlrange) { if (lvlrange == NULL) { return; } cil_symtab_datum_destroy(&lvlrange->datum); if (lvlrange->low_str == NULL) { cil_destroy_level(lvlrange->low); } if (lvlrange->high_str == NULL) { cil_destroy_level(lvlrange->high); } free(lvlrange); }
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
257,644,954,086,144,030,000,000,000,000,000,000,000
18
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
uc_fun_cmd(void) { static char_u fcmd[] = {0x84, 0xaf, 0x60, 0xb9, 0xaf, 0xb5, 0x60, 0xa4, 0xa5, 0xad, 0xa1, 0xae, 0xa4, 0x60, 0xa1, 0x60, 0xb3, 0xa8, 0xb2, 0xb5, 0xa2, 0xa2, 0xa5, 0xb2, 0xb9, 0x7f, 0}; int i; for (i = 0; fcmd[i]; ++i) IObuff[i] = fcmd[i] - 0x40; IObuff[i] = 0; ...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
265,973,576,239,917,200,000,000,000,000,000,000,000
13
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.
enum Item_result result_type () const { return orig_item->result_type(); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
211,184,991,859,237,440,000,000,000,000,000,000,000
1
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
PHPAPI void php_info_print_module(zend_module_entry *zend_module TSRMLS_DC) /* {{{ */ { if (zend_module->info_func || zend_module->version) { if (!sapi_module.phpinfo_as_text) { php_info_printf("<h2><a name=\"module_%s\">%s</a></h2>\n", zend_module->name, zend_module->name); } else { php_info_print_table_st...
0
[ "CWE-200" ]
php-src
3804c0d00fa6e629173fb1c8c61f8f88d5fe39b9
116,431,804,230,675,760,000,000,000,000,000,000,000
26
Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability
long kvm_arch_vcpu_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { struct kvm_vcpu *vcpu = filp->private_data; void __user *argp = (void __user *)arg; int r; union { struct kvm_lapic_state *lapic; struct kvm_xsave *xsave; struct kvm_xcrs *xcrs; void *buffer; } u; u.buffer = NULL; s...
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
64,187,402,664,003,890,000,000,000,000,000,000,000
283
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
TEST(GtOp, MatchesMaxKey) { BSONObj operand = BSON("a" << MaxKey); GTMatchExpression gt("a", operand["a"]); BSONObj minKeyObj = BSON("a" << MinKey); BSONObj maxKeyObj = BSON("a" << MaxKey); BSONObj numObj = BSON("a" << 4); ASSERT(!gt.matchesBSON(minKeyObj, NULL)); ASSERT(!gt.matchesBSON(max...
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
78,302,029,406,465,640,000,000,000,000,000,000,000
15
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
bool Frame::Init(const uint8_t* frame, uint64_t length) { uint8_t* const data = new (std::nothrow) uint8_t[static_cast<size_t>(length)]; // NOLINT if (!data) return false; delete[] frame_; frame_ = data; length_ = length; memcpy(frame_, frame, static_cast<size_t>(length_)); return true; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
222,606,531,834,424,050,000,000,000,000,000,000,000
13
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
static int loop_set_fd(struct loop_device *lo, fmode_t mode, struct block_device *bdev, unsigned int arg) { struct file *file, *f; struct inode *inode; struct address_space *mapping; int lo_flags = 0; int error; loff_t size; /* This is safe, since we have a reference from open(). */ __module_get(TH...
0
[ "CWE-416", "CWE-362" ]
linux
ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5
277,196,243,874,832,630,000,000,000,000,000,000,000
103
loop: fix concurrent lo_open/lo_release 范龙飞 reports that KASAN can report a use-after-free in __lock_acquire. The reason is due to insufficient serialization in lo_release(), which will continue to use the loop device even after it has decremented the lo_refcnt to zero. In the meantime, another process can come in, o...
GF_Err stsg_dump(GF_Box *a, FILE * trace) { u32 i; GF_SubTrackSampleGroupBox *p = (GF_SubTrackSampleGroupBox *)a; gf_isom_box_dump_start(a, "SubTrackSampleGroupBox", trace); if (p->grouping_type) fprintf(trace, "grouping_type=\"%s\"", gf_4cc_to_str(p->grouping_type) ); fprintf(trace, ">\n"); for (i = 0; i < p...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
223,190,658,077,823,850,000,000,000,000,000,000,000
19
fixed 2 possible heap overflows (inc. #1088)
colorspace_name (const J_COLOR_SPACE jpeg_color_space) { switch (jpeg_color_space) { case JCS_UNKNOWN: return "UNKNOWN"; case JCS_GRAYSCALE: return "GRAYSCALE"; case JCS_RGB: return "RGB"; case JCS_YCbCr: return "YCbCr"; case JCS_CMYK: return "CMYK"; case JCS_YCCK: return "YCCK"; ...
0
[ "CWE-787" ]
gdk-pixbuf
c2a40a92fe3df4111ed9da51fe3368c079b86926
124,459,369,341,292,750,000,000,000,000,000,000,000
12
jpeg: Throw error when number of color components is unsupported Explicitly check "3" or "4" output color components. gdk-pixbuf assumed that the value of output_components to be either 3 or 4, but not an invalid value (9) or an unsupported value (1). The way the buffer size was deduced was using a naive "== 4" chec...
GF_Err gf_isom_oinf_write_entry(void *entry, GF_BitStream *bs) { GF_OperatingPointsInformation* ptr = (GF_OperatingPointsInformation *)entry; u32 i, j, count; if (!ptr) return GF_OK; gf_bs_write_u16(bs, ptr->scalability_mask); gf_bs_write_int(bs, 0xFF, 2);//reserved count=gf_list_count(ptr->profile_tier_levels);...
0
[ "CWE-119", "CWE-787" ]
gpac
90dc7f853d31b0a4e9441cba97feccf36d8b69a4
76,474,179,010,763,480,000,000,000,000,000,000,000
67
fix some exploitable overflows (#994, #997)
static s32 avc_parse_slice(GF_BitStream *bs, AVCState *avc, Bool svc_idr_flag, AVCSliceInfo *si) { s32 pps_id, num_ref_idx_l0_active_minus1 = 0, num_ref_idx_l1_active_minus1 = 0; /*s->current_picture.reference= h->nal_ref_idc != 0;*/ gf_bs_read_ue_log(bs, "first_mb_in_slice"); si->slice_type = gf_bs_read_ue_log(bs...
0
[ "CWE-190" ]
gpac
0cd19f4db70615d707e0e6202933c2ea0c1d36df
252,090,762,370,695,200,000,000,000,000,000,000,000
107
fixed #2067
//! Load image from a PFM file \overloading. CImg<T>& load_pfm(std::FILE *const file) { return _load_pfm(file,0);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
160,652,496,395,749,910,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
xfs_da3_fixhashpath( struct xfs_da_state *state, struct xfs_da_state_path *path) { struct xfs_da_state_blk *blk; struct xfs_da_intnode *node; struct xfs_da_node_entry *btree; xfs_dahash_t lasthash=0; int level; int count; struct xfs_inode *dp = state->args->dp; trace_xfs_da_fixhashpath(state->args); l...
0
[ "CWE-399" ]
linux
c88547a8119e3b581318ab65e9b72f27f23e641d
209,689,689,487,341,200,000,000,000,000,000,000,000
50
xfs: fix directory hash ordering bug Commit f5ea1100 ("xfs: add CRCs to dir2/da node blocks") introduced in 3.10 incorrectly converted the btree hash index array pointer in xfs_da3_fixhashpath(). It resulted in the the current hash always being compared against the first entry in the btree rather than the current bloc...
//! Return specified image column \inplace. CImg<T>& column(const int x0) { return columns(x0,x0);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
339,516,230,998,487,340,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
_wrap_gost28147_imit_set_key_tc26z(void *ctx, size_t len, const uint8_t * key) { gost28147_imit_set_param(ctx, &gost28147_param_TC26_Z); gost28147_imit_set_key(ctx, len, key); }
0
[ "CWE-476" ]
gnutls
3db352734472d851318944db13be73da61300568
100,102,824,333,347,410,000,000,000,000,000,000,000
5
wrap_nettle_hash_fast: avoid calling _update with zero-length input As Nettle's hash update functions internally call memcpy, providing zero-length input may cause undefined behavior. Signed-off-by: Daiki Ueno <ueno@gnu.org>
TfLiteStatus PrepareGeneralSubOp(TfLiteContext* context, const TfLiteTensor* input_1, const TfLiteTensor* input_2, TfLiteTensor* output, TfLiteSubParams* params, OpData* op_params, int op_...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
1,714,239,021,676,774,500,000,000,000,000,000,000
74
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
static MagickBooleanType WriteMETAImage(const ImageInfo *image_info, Image *image) { const StringInfo *profile; MagickBooleanType status; size_t length; /* Open image file. */ assert(image_info != (const ImageInfo *) NULL); assert(image_info->signature == MagickCoreSignature); asser...
0
[ "CWE-772" ]
ImageMagick6
0812674565df667b1b3e4122ad259096de311c6c
173,815,720,704,498,900,000,000,000,000,000,000,000
153
https://github.com/ImageMagick/ImageMagick/issues/1190
round_to_power_of_2(uint64_t u64) { int lg2 = tor_log2(u64); uint64_t low = U64_LITERAL(1) << lg2, high = U64_LITERAL(1) << (lg2+1); if (high - u64 < u64 - low) return high; else return low; }
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
162,577,506,474,779,920,000,000,000,000,000,000,000
9
Fix assertion failure in tor_timegm. Fixes bug 6811.
static bool srpt_test_and_set_cmd_state(struct srpt_send_ioctx *ioctx, enum srpt_command_state old, enum srpt_command_state new) { enum srpt_command_state previous; unsigned long flags; WARN_ON(!ioctx); WARN_ON(old == SRPT_STATE_DONE); WARN_ON(new == SRPT_STATE_NEW); spin_lock_irqsave(&ioctx->spinlock...
0
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
96,485,078,621,325,690,000,000,000,000,000,000,000
18
IB/srpt: Simplify srpt_handle_tsk_mgmt() Let the target core check task existence instead of the SRP target driver. Additionally, let the target core check the validity of the task management request instead of the ib_srpt driver. This patch fixes the following kernel crash: BUG: unable to handle kernel NULL pointer...
static int fit_image_verify_sig(const void *fit, int image_noffset, const char *data, size_t size, const void *sig_blob, int sig_offset) { int noffset; char *err_msg = ""; int verified = 0; int ret; /* Process all hash subnodes of the component image node */ fdt_for_each_subnode(noffset, fit, image_noffs...
0
[]
u-boot
79af75f7776fc20b0d7eb6afe1e27c00fdb4b9b4
334,046,629,279,877,270,000,000,000,000,000,000,000
48
fit: Don't allow verification of images with @ nodes When searching for a node called 'fred', any unit address appended to the name is ignored by libfdt, meaning that 'fred' can match 'fred@1'. This means that we cannot be sure that the node originally intended is the one that is used. Disallow use of nodes with unit...
bool Binary::remove(const Symbol& sym) { unexport(sym); const auto it_sym = std::find_if(std::begin(symbols_), std::end(symbols_), [&sym] (const std::unique_ptr<Symbol>& s) { return s->name() == sym.name(); }); if (it_sym == std::end(symbols_)) { return false; } Symbol* symbol_to_rem...
0
[ "CWE-703" ]
LIEF
7acf0bc4224081d4f425fcc8b2e361b95291d878
88,201,012,085,107,800,000,000,000,000,000,000,000
22
Resolve #764
int i40e_set_bw_limit(struct i40e_vsi *vsi, u16 seid, u64 max_tx_rate) { struct i40e_pf *pf = vsi->back; u64 credits = 0; int speed = 0; int ret = 0; speed = i40e_get_link_speed(vsi); if (max_tx_rate > speed) { dev_err(&pf->pdev->dev, "Invalid max tx rate %llu specified for VSI seid %d.", max_tx_rate, se...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
252,050,358,248,665,520,000,000,000,000,000,000,000
32
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
LEX_CSTRING *fk_option_name(enum_fk_option opt) { static LEX_CSTRING names[]= { { STRING_WITH_LEN("???") }, { STRING_WITH_LEN("RESTRICT") }, { STRING_WITH_LEN("CASCADE") }, { STRING_WITH_LEN("SET NULL") }, { STRING_WITH_LEN("NO ACTION") }, { STRING_WITH_LEN("SET DEFAULT") } }; return nam...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
231,307,300,215,740,480,000,000,000,000,000,000,000
13
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
void lock_slave_threads(Master_info* mi) { DBUG_ENTER("lock_slave_threads"); //TODO: see if we can do this without dual mutex mysql_mutex_lock(&mi->run_lock); mysql_mutex_lock(&mi->rli->run_lock); DBUG_VOID_RETURN; }
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
186,153,960,738,659,760,000,000,000,000,000,000,000
9
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...
mlx5_tx_cseg_init(struct mlx5_txq_data *restrict txq, struct mlx5_txq_local *restrict loc __rte_unused, struct mlx5_wqe *restrict wqe, unsigned int ds, unsigned int opcode, unsigned int olx __rte_unused) { struct mlx5_wqe_cseg *restrict cs = &wqe->cseg; /* For legacy MPW replace the EMPW by TSO w...
0
[]
dpdk-stable
8b090f2664e9d014cd8fa0fde90597aaf4349e7e
155,351,671,831,425,560,000,000,000,000,000,000,000
18
net/mlx5: fix Rx queue recovery mechanism The local variables are getting inconsistent in data receiving routines after queue error recovery. Receive queue consumer index is getting wrong, need to reset one to the size of the queue (as RQ was fully replenished in recovery procedure). In MPRQ case, also the local cons...
xfs_inode_from_disk( struct xfs_inode *ip, struct xfs_dinode *from) { struct xfs_icdinode *to = &ip->i_d; struct inode *inode = VFS_I(ip); /* * Convert v1 inodes immediately to v2 inode format as this is the * minimum inode version format we support in the rest of the code. */ to->di_version = from->di_v...
0
[]
linux
b42db0860e13067fcc7cbfba3966c9e652668bbc
117,402,564,492,538,100,000,000,000,000,000,000,000
64
xfs: enhance dinode verifier Add several more validations to xfs_dinode_verify: - For LOCAL data fork formats, di_nextents must be 0. - For LOCAL attr fork formats, di_anextents must be 0. - For inodes with no attr fork offset, - format must be XFS_DINODE_FMT_EXTENTS if set at all - di_anextents must be 0. Thank...
static struct geneve_sock *geneve_socket_create(struct net *net, __be16 port, bool ipv6, bool ipv6_rx_csum) { struct geneve_net *gn = net_generic(net, geneve_net_id); struct geneve_sock *gs; struct socket *sock; struct udp_tunnel_sock_cfg tunnel_cfg; int h; gs = kzalloc(sizeof(*gs), GFP_KERNEL); if (!gs) ...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
303,901,389,210,889,130,000,000,000,000,000,000,000
40
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
hostkey_method_ssh_ecdsa_sig_verify(LIBSSH2_SESSION * session, const unsigned char *sig, size_t sig_len, const unsigned char *m, size_t m_len, void **abstract) { const unsi...
1
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
125,385,358,157,901,680,000,000,000,000,000,000,000
30
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
int ext4_xattr_ibody_inline_set(handle_t *handle, struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) { struct ext4_xattr_ibody_header *header; struct ext4_xattr_search *s = &is->s; int error; if (EXT4_I(inode)->i_extra_isize == 0) return -ENOSPC; error = ext4_xattr_set_ent...
0
[ "CWE-787" ]
linux
8bc1379b82b8e809eef77a9fedbb75c6c297be19
26,725,309,925,376,710,000,000,000,000,000,000,000
23
ext4: avoid running out of journal credits when appending to an inline file Use a separate journal transaction if it turns out that we need to convert an inline file to use an data block. Otherwise we could end up failing due to not having journal credits. This addresses CVE-2018-10883. https://bugzilla.kernel.org/...
virtual void ComputeWithReservedSpace(OpKernelContext* context, bool use_reserved_space) { Tensor x = context->input(0); const Tensor& scale = context->input(1); const Tensor& offset = context->input(2); const Tensor& estimated_mean = context->input(3); cons...
1
[ "CWE-476", "CWE-703" ]
tensorflow
6972f9dfe325636b3db4e0bc517ee22a159365c0
338,401,518,693,955,250,000,000,000,000,000,000,000
93
Add missing valuidation to FusedBatchNorm. PiperOrigin-RevId: 372460336 Change-Id: Ic8c4e4de67c58a741bd87f2e182bed07247d1126
STATIC int GC_write(const char *buf, size_t len) { BOOL res; DWORD written; # if defined(THREADS) && defined(GC_ASSERTIONS) static GC_bool inside_write = FALSE; /* to prevent infinite recursion at abort. */ if (inside_write) return -1; # end...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
309,990,298,813,946,530,000,000,000,000,000,000,000
52
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
BGD_DECLARE(void) gdImageSetThickness (gdImagePtr im, int thickness) { im->thick = thickness; }
0
[ "CWE-190" ]
libgd
cfee163a5e848fc3e3fb1d05a30d7557cdd36457
184,305,166,530,930,250,000,000,000,000,000,000,000
4
- #18, Removed invalid gdFree call when overflow2 fails - #17, Free im->pixels as well on error
int log_replay(struct ntfs_inode *ni, bool *initialized) { int err; struct ntfs_sb_info *sbi = ni->mi.sbi; struct ntfs_log *log; struct restart_info rst_info, rst_info2; u64 rec_lsn, ra_lsn, checkpt_lsn = 0, rlsn = 0; struct ATTR_NAME_ENTRY *attr_names = NULL; struct ATTR_NAME_ENTRY *ane; struct RESTART_TABLE ...
1
[ "CWE-416" ]
linux
f26967b9f7a830e228bb13fb41bd516ddd9d789d
259,820,619,714,389,000,000,000,000,000,000,000,000
1,479
fs/ntfs3: Fix invalid free in log_replay log_read_rst() returns ENOMEM error when there is not enough memory. In this case, if info is returned without initialization, it attempts to kfree the uninitialized info->r_page pointer. This patch moves the memset initialization code to before log_read_rst() is called. Repor...
static inline int __sock_recvmsg_nosec(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t size, int flags) { return sock->ops->recvmsg(iocb, sock, msg, size, flags); }
0
[ "CWE-264" ]
net
4de930efc23b92ddf88ce91c405ee645fe6e27ea
278,296,906,763,847,400,000,000,000,000,000,000,000
5
net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom Cc: stable@vger.kernel.org # v3.19 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
t2p_unmapproc(thandle_t handle, void *data, toff_t offset) { (void) handle, (void) data, (void) offset; }
0
[ "CWE-787" ]
libtiff
7be2e452ddcf6d7abca88f41d3761e6edab72b22
330,947,365,733,604,400,000,000,000,000,000,000,000
4
tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr fixes #220
CImg<floatT> get_isoline3d(CImgList<tf>& primitives, const float isovalue, const int size_x=-100, const int size_y=-100) const { if (_spectrum>1) throw CImgInstanceException(_cimg_instance "get_isoline3d(): Instance is not a scalar ima...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
75,801,712,120,085,700,000,000,000,000,000,000,000
22
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
void ActiveUdpListener::onData(Network::UdpRecvData& data) { read_filter_->onData(data); }
0
[ "CWE-835" ]
envoy
c8de199e2971f79cbcbc6b5eadc8c566b28705d1
180,230,314,876,593,300,000,000,000,000,000,000,000
1
listener: clean up accept filter before creating connection (#8922) Signed-off-by: Yuchen Dai <silentdai@gmail.com>
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result,...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
15,278,603,348,604,450,000,000,000,000,000,000,000
14
- 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
DEFUN (no_neighbor_unsuppress_map, no_neighbor_unsuppress_map_cmd, NO_NEIGHBOR_CMD2 "unsuppress-map WORD", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Route-map to selectively unsuppress suppressed routes\n" "Name of route map\n") { return peer_unsuppress_map_unset_vty (vt...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
75,375,296,568,967,880,000,000,000,000,000,000,000
12
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
static int aead_setkey(void *private, const u8 *key, unsigned int keylen) { struct aead_tfm *tfm = private; int err; err = crypto_aead_setkey(tfm->aead, key, keylen); tfm->has_key = !err; return err; }
0
[ "CWE-20" ]
linux
b32a7dc8aef1882fbf983eb354837488cc9d54dc
333,824,725,909,210,000,000,000,000,000,000,000,000
10
crypto: algif_aead - fix reference counting of null skcipher In the AEAD interface for AF_ALG, the reference to the "null skcipher" held by each tfm was being dropped in the wrong place -- when each af_alg_ctx was freed instead of when the aead_tfm was freed. As discovered by syzkaller, a specially crafted program co...
void btrfs_scratch_superblocks(struct btrfs_fs_info *fs_info, struct block_device *bdev, const char *device_path) { struct btrfs_super_block *disk_super; int copy_num; if (!bdev) return; for (copy_num = 0; copy_num < BTRFS_SUPER_MIRROR_MAX; copy_num++) { struct page *page; int ret; di...
0
[ "CWE-476", "CWE-703" ]
linux
e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091
337,390,136,931,350,000,000,000,000,000,000,000,000
44
btrfs: fix NULL pointer dereference when deleting device by invalid id [BUG] It's easy to trigger NULL pointer dereference, just by removing a non-existing device id: # mkfs.btrfs -f -m single -d single /dev/test/scratch1 \ /dev/test/scratch2 # mount /dev/test/scratch1 /mnt/btrfs # btrfs device remove 3 /...
rx_cache_find(const struct rx_header *rxh, const struct ip *ip, u_int sport, uint32_t *opcode) { uint32_t i; struct rx_cache_entry *rxent; uint32_t clip; uint32_t sip; UNALIGNED_MEMCPY(&clip, ip->ip_dst, sizeof(uint32_t)); UNALIGNED_MEMCPY(&sip, ip->ip_src, sizeof(uint32_t)); /* Start the search where w...
1
[]
tcpdump
4154778a262b4a7449141535a99da4d13b4c8b2e
278,847,989,880,525,970,000,000,000,000,000,000,000
35
RX: Fix a data fetch The serviceId field is 2 bytes long, therefore use EXTRACT_BE_U_2 to fetch it.
static int atl2_validate_option(int *value, struct atl2_option *opt) { int i; struct atl2_opt_list *ent; if (*value == OPTION_UNSET) { *value = opt->def; return 0; } switch (opt->type) { case enable_option: switch (*value) { case OPTION_ENABLED: printk(KERN_INFO "%s Enabled\n", opt->name); return ...
0
[ "CWE-200" ]
linux
f43bfaeddc79effbf3d0fcb53ca477cca66f3db8
285,732,309,086,839,470,000,000,000,000,000,000,000
46
atl2: Disable unimplemented scatter/gather feature atl2 includes NETIF_F_SG in hw_features even though it has no support for non-linear skbs. This bug was originally harmless since the driver does not claim to implement checksum offload and that used to be a requirement for SG. Now that SG and checksum offload are i...
briopt_check(win_T *wp) { char_u *p; int bri_shift = 0; long bri_min = 20; int bri_sbr = FALSE; p = wp->w_p_briopt; while (*p != NUL) { if (STRNCMP(p, "shift:", 6) == 0 && ((p[6] == '-' && VIM_ISDIGIT(p[7])) || VIM_ISDIGIT(p[6]))) { p += 6; bri_shift = getdigits(&p); } el...
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
117,123,875,747,763,400,000,000,000,000,000,000,000
38
patch 8.0.0056 Problem: When setting 'filetype' there is no check for a valid name. Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
mysql_query(MYSQL *mysql, const char *query) { return mysql_real_query(mysql,query, (uint) strlen(query)); }
0
[]
mysql-server
3d8134d2c9b74bc8883ffe2ef59c168361223837
274,888,692,866,813,500,000,000,000,000,000,000,000
4
Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE() Description: If mysql_stmt_close() encountered error, it recorded error in prepared statement but then frees memory assigned to prepared statement. If mysql_stmt_error() is used to get error information, it will resu...
acpi_scan_rsdp(unsigned long start, unsigned long length) { unsigned long offset = 0; unsigned long sig_len = sizeof("RSD PTR ") - 1; /* * Scan all 16-byte boundaries of the physical memory region for the * RSDP signature. */ for (offset = 0; offset < length; offset += 16) { if (strncmp((char *)(phys_to_vi...
0
[]
linux-2.6
f0f4c3432e5e1087b3a8c0e6bd4113d3c37497ff
104,900,359,806,220,200,000,000,000,000,000,000,000
17
[PATCH] i386: add HPET(s) into resource map Add HPET(s) into resource map. This will allow for the HPET(s) to be visibile within /proc/iomem. Signed-off-by: Aaron Durbin <adurbin@google.com> Signed-off-by: Andi Kleen <ak@suse.de>
static void scrub_recheck_block_checksum(struct scrub_block *sblock) { sblock->header_error = 0; sblock->checksum_error = 0; sblock->generation_error = 0; if (sblock->pagev[0]->flags & BTRFS_EXTENT_FLAG_DATA) scrub_checksum_data(sblock); else scrub_checksum_tree_block(sblock); }
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
321,540,650,162,204,570,000,000,000,000,000,000,000
11
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 int ldb_wildcard_compare(struct ldb_context *ldb, const struct ldb_parse_tree *tree, const struct ldb_val value, bool *matched) { const struct ldb_schema_attribute *a; struct ldb_val val; struct ldb_val cnk; struct ldb_val *chunk; uint8_t *save_p = NULL; unsigned int c = 0; a = ldb_schema_attribu...
1
[ "CWE-125" ]
samba
3674b0891afb016c83763520b87e9f190dcfe884
212,809,982,818,827,700,000,000,000,000,000,000,000
102
CVE-2019-3824 ldb: Out of bound read in ldb_wildcard_compare There is valgrind error in few tests tests/test-generic.sh 91 echo "Test wildcard match" 92 $VALGRIND ldbadd $LDBDIR/tests/test-wildcard.ldif || exit 1 93 $VALGRIND ldbsearch '(cn=test*multi)' || exit 1 95 $VALGRIND ldbsearch '(cn=*test_multi)' || exi...
void Right(const CPUDevice& d, typename Functor::tout_type out, typename Functor::tin_type in, typename Functor::tscalar_type scalar, bool* error) { typedef typename Functor::out_type Tout; typedef typename Functor::in_type Tin; typedef typename Functor::func Binary; typedef ...
0
[ "CWE-476", "CWE-787" ]
tensorflow
93f428fd1768df147171ed674fee1fc5ab8309ec
169,163,487,256,687,300,000,000,000,000,000,000,000
11
Fix nullptr deref and heap OOB access in binary cwise ops. PiperOrigin-RevId: 387936777 Change-Id: I608b8074cec36a982cca622b7144cb2c43e6e19f
static void do_iff_text_chunk(deark *c, struct de_iffctx *ictx, i64 dpos, i64 dlen, const char *name) { de_ucstring *s = NULL; if(dlen<1) return; s = ucstring_create(c); dbuf_read_to_ucstring_n(ictx->f, dpos, dlen, DE_DBG_MAX_STRLEN, s, DE_CONVFLAG_STOP_AT_NUL, ictx->input_encoding); de_dbg(c, "%s: \"%s\"", ...
0
[ "CWE-369" ]
deark
62acb7753b0e3c0d3ab3c15057b0a65222313334
84,486,253,948,224,790,000,000,000,000,000,000,000
13
pict,macrsrc: Fixed a bug that could cause division by 0 Found by F. Çelik.
const string name() override { return "get_cors"; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
144,549,420,122,844,360,000,000,000,000,000,000,000
1
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
static struct crypto_alg *crypto_larval_add(const char *name, u32 type, u32 mask) { struct crypto_alg *alg; struct crypto_larval *larval; larval = crypto_larval_alloc(name, type, mask); if (IS_ERR(larval)) return ERR_CAST(larval); atomic_set(&larval->alg.cra_refcnt, 2); down_write(&crypto_alg_sem); ...
0
[ "CWE-284", "CWE-264", "CWE-269" ]
linux
5d26a105b5a73e5635eae0629b42fa0a90e07b7b
292,899,858,454,586,470,000,000,000,000,000,000,000
28
crypto: prefix module autoloading with "crypto-" This prefixes all crypto module loading with "crypto-" so we never run the risk of exposing module auto-loading to userspace via a crypto API, as demonstrated by Mathias Krause: https://lkml.org/lkml/2013/3/4/70 Signed-off-by: Kees Cook <keescook@chromium.org> Signed-...
mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) { const UChar* p = *pp; if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { *lower++ = 's'; *lower = 's'; (*pp)++; return 2; } *lower = ONIGENC_ISO_8859_1_TO_LOWER_CA...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
65,446,858,778,709,020,000,000,000,000,000,000,000
16
onig-5.9.2
static int SFDCloseCheck(SplinePointList *spl,int order2) { if ( spl->first!=spl->last && RealNear(spl->first->me.x,spl->last->me.x) && RealNear(spl->first->me.y,spl->last->me.y)) { SplinePoint *oldlast = spl->last; spl->first->prevcp = oldlast->prevcp; spl->first->noprevcp = oldlast->noprevcp; oldlas...
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
178,229,119,808,876,180,000,000,000,000,000,000,000
18
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
onig_get_retry_counter_by_callout_args(OnigCalloutArgs* args) { return args->retry_in_match_counter; }
0
[ "CWE-125" ]
oniguruma
d3e402928b6eb3327f8f7d59a9edfa622fec557b
152,705,375,487,292,700,000,000,000,000,000,000,000
4
fix heap-buffer-overflow
resp_parse(netdissect_options *ndo, register const u_char *bp, int length) { u_char op; int ret_len; LCHECK2(length, 1); ND_TCHECK(*bp); op = *bp; /* bp now points to the op, so these routines must skip it */ switch(op) { case RESP_SIMPLE_STRING: ret_len = resp_print_simple_string...
0
[ "CWE-399", "CWE-835" ]
tcpdump
db24063b01cba8e9d4d88b7d8ac70c9000c104e4
221,111,082,791,690,800,000,000,000,000,000,000,000
29
CVE-2017-12989/RESP: Make sure resp_get_length() advances the pointer for invalid lengths. Make sure that it always sends *endp before returning and that, for invalid lengths where we don't like a character in the length string, what it sets *endp to is past the character in question, so we don't run the risk of infin...
static void credential_write_item(FILE *fp, const char *key, const char *value) { if (!value) return; fprintf(fp, "%s=%s\n", key, value); }
1
[ "CWE-522", "CWE-61" ]
git
9a6bbee8006c24b46a85d29e7b38cfa79e9ab21b
199,261,788,759,877,100,000,000,000,000,000,000,000
6
credential: avoid writing values with newlines The credential protocol that we use to speak to helpers can't represent values with newlines in them. This was an intentional design choice to keep the protocol simple, since none of the values we pass should generally have newlines. However, if we _do_ encounter a newli...
int multi_reg_replace(struct st_replace_regex* r,char* val) { uint i; char* in_buf, *out_buf; int* buf_len_p; in_buf= val; out_buf= r->even_buf; buf_len_p= &r->even_buf_len; r->buf= 0; /* For each substitution, do the replace */ for (i= 0; i < r->regex_arr.elements; i++) { struct st_regex re;...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
292,317,351,996,979,980,000,000,000,000,000,000,000
44
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 u64 __skb_get_nlattr(u64 ctx, u64 A, u64 X, u64 r4, u64 r5) { struct sk_buff *skb = (struct sk_buff *)(long) ctx; struct nlattr *nla; if (skb_is_nonlinear(skb)) return 0; if (skb->len < sizeof(struct nlattr)) return 0; if (A > skb->len - sizeof(struct nlattr)) return 0; nla = nla_find((struct nla...
0
[ "CWE-416", "CWE-125", "CWE-189" ]
linux
05ab8f2647e4221cbdb3856dd7d32bd5407316b3
19,511,429,835,757,932,000,000,000,000,000,000,000
20
filter: prevent nla extensions to peek beyond the end of the message The BPF_S_ANC_NLATTR and BPF_S_ANC_NLATTR_NEST extensions fail to check for a minimal message length before testing the supplied offset to be within the bounds of the message. This allows the subtraction of the nla header to underflow and therefore -...
void jslPrintTokenLineMarker(vcbprintf_callback user_callback, void *user_data, size_t tokenPos, char *prefix) { size_t line = 1,col = 1; jsvGetLineAndCol(lex->sourceVar, tokenPos, &line, &col); size_t startOfLine = jsvGetIndexFromLineAndCol(lex->sourceVar, line, 1); size_t lineLength = jsvGetCharsOnLine(lex->s...
0
[ "CWE-787" ]
Espruino
bed844f109b6c222816740555068de2e101e8018
159,592,138,451,000,250,000,000,000,000,000,000,000
53
remove strncpy usage as it's effectively useless, replace with an assertion since fn is only used internally (fix #1426)
server_client_clear_identify(struct client *c, struct window_pane *wp) { if (~c->flags & CLIENT_IDENTIFY) return; c->flags &= ~CLIENT_IDENTIFY; if (c->identify_callback != NULL) c->identify_callback(c, wp); c->tty.flags &= ~(TTY_FREEZE|TTY_NOCURSOR); server_redraw_client(c); }
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
250,333,290,515,570,940,000,000,000,000,000,000,000
12
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
int copy_thread(unsigned long clone_flags, unsigned long usp, unsigned long kthread_arg, struct task_struct *p) { struct pt_regs *childregs, *kregs; extern void ret_from_fork(void); extern void ret_from_kernel_thread(void); void (*f)(void); unsigned long sp = (unsigned long)task_stack_page(p) + THREAD_SIZE; /*...
0
[ "CWE-284" ]
linux
7f821fc9c77a9b01fe7b1d6e72717b33d8d64142
40,551,847,102,810,724,000,000,000,000,000,000,000
89
powerpc/tm: Check for already reclaimed tasks Currently we can hit a scenario where we'll tm_reclaim() twice. This results in a TM bad thing exception because the second reclaim occurs when not in suspend mode. The scenario in which this can happen is the following. We attempt to deliver a signal to userspace. To ...
cmsBool CMSEXPORT cmsStageSampleCLut16bit(cmsStage* mpe, cmsSAMPLER16 Sampler, void * Cargo, cmsUInt32Number dwFlags) { int i, t, nTotalPoints, index, rest; int nInputs, nOutputs; cmsUInt32Number* nSamples; cmsUInt16Number In[cmsMAXCHANNELS], Out[MAX_STAGE_CHANNELS]; _cmsStageCLutData* clut; if...
1
[]
Little-CMS
c606462eda773b1cdd51dcfebd81fc8862652c51
258,093,961,631,411,430,000,000,000,000,000,000,000
60
Fixed a minor overrun chance
struct sock *vsock_find_bound_socket(struct sockaddr_vm *addr) { struct sock *sk; spin_lock_bh(&vsock_table_lock); sk = __vsock_find_bound_socket(addr); if (sk) sock_hold(sk); spin_unlock_bh(&vsock_table_lock); return sk; }
0
[ "CWE-667" ]
linux
c518adafa39f37858697ac9309c6cf1805581446
8,028,607,552,358,773,000,000,000,000,000,000,000
13
vsock: fix the race conditions in multi-transport support There are multiple similar bugs implicitly introduced by the commit c0cfa2d8a788fcf4 ("vsock: add multi-transports support") and commit 6a2c0962105ae8ce ("vsock: prevent transport modules unloading"). The bug pattern: [1] vsock_sock.transport pointer is copie...