func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static inline struct scatterlist *esp_givreq_sg( struct crypto_aead *aead, struct aead_givcrypt_request *req) { return (void *)ALIGN((unsigned long)(req + 1) + crypto_aead_reqsize(aead), __alignof__(struct scatterlist)); }
0
[ "CWE-16" ]
linux-2.6
920fc941a9617f95ccb283037fe6f8a38d95bb69
128,347,238,732,029,010,000,000,000,000,000,000,000
7
[ESP]: Ensure IV is in linear part of the skb to avoid BUG() due to OOB access ESP does not account for the IV size when calling pskb_may_pull() to ensure everything it accesses directly is within the linear part of a potential fragment. This results in a BUG() being triggered when the both the IPv4 and IPv6 ESP stack...
static char *print_number( cJSON *item ) { char *str; double f, f2; int64_t i; str = (char*) cJSON_malloc( 64 ); if ( str ) { f = item->valuefloat; i = f; f2 = i; if ( f2 == f && item->valueint >= LLONG_MIN && item->valueint <= LLONG_MAX ) sprintf( str, "%lld", (long long) item->valueint ); else s...
1
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
101,557,844,851,504,330,000,000,000,000,000,000,000
18
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 zend_bool add_post_var(zval *arr, post_var_data_t *var, zend_bool eof) { char *ksep, *vsep, *val; size_t klen, vlen; size_t new_vlen; if (var->ptr >= var->end) { return 0; } vsep = memchr(var->ptr, '&', var->end - var->ptr); if (!vsep) { if (!eof) { return 0; } else { vsep = var->end; } }...
1
[ "CWE-400", "CWE-703" ]
php-src
a15bffd105ac28fd0dd9b596632dbf035238fda3
156,761,377,104,672,220,000,000,000,000,000,000,000
47
Fix bug #73807
SPL_METHOD(SplFileObject, rewind) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (zend_parse_parameters_none() == FAILURE) { return; } spl_filesystem_file_rewind(getThis(), intern TSRMLS_CC); } /* }}} */
0
[ "CWE-190" ]
php-src
7245bff300d3fa8bacbef7897ff080a6f1c23eba
320,008,711,605,102,700,000,000,000,000,000,000,000
10
Fix bug #72262 - do not overflow int
static int uniq_field_values(void *d, const char *key, const char *val) { apr_array_header_t *values; char *start; char *e; char **strpp; int i; values = (apr_array_header_t *)d; e = apr_pstrdup(values->pool, val); do { /* Find a non-empty fieldname */ while (*e == '...
0
[ "CWE-20" ]
httpd
a6027e56924bb6227c1fdbf6f91e7e2438338be6
221,769,336,251,537,950,000,000,000,000,000,000,000
45
Limit accepted chunk-size to 2^63-1 and be strict about chunk-ext authorized characters. Submitted by: Yann Ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1684513 13f79535-47bb-0310-9956-ffa450edef68
int64_t mg_sntp_parse(const unsigned char *buf, size_t len) { int64_t res = -1; int mode = len > 0 ? buf[0] & 7 : 0; if (len < 48) { LOG(LL_ERROR, ("%s", "corrupt packet")); } else if ((buf[0] & 0x38) >> 3 != 4) { LOG(LL_ERROR, ("%s", "wrong version")); } else if (mode != 4 && mode != 5) { LOG(LL_...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
169,853,215,785,461,600,000,000,000,000,000,000,000
21
Protect against the directory traversal in mg_upload()
TPML_TAGGED_PCR_PROPERTY_Marshal(TPML_TAGGED_PCR_PROPERTY *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; UINT32 i; written += UINT32_Marshal(&source->count, buffer, size); for (i = 0 ; i < source->count ; i++) { written += TPMS_TAGGED_PCR_SELECT_Marshal(&source->pcrProperty[i], buffer,...
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
101,041,488,822,167,210,000,000,000,000,000,000,000
11
tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks Add maxSize parameter to TPM2B_Marshal and assert on it checking the size of the data intended to be marshaled versus the maximum buffer size. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
R_API void r_bin_class_add_field(RBinFile *binfile, const char *classname, const char *name) { //TODO: add_field into class //eprintf ("TODO add field: %s \n", name); }
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
258,531,042,156,039,840,000,000,000,000,000,000,000
4
Fix #8748 - Fix oobread on string search
nfs4_label_init_security(struct inode *dir, struct dentry *dentry, struct iattr *sattr, struct nfs4_label *label) { int err; if (label == NULL) return NULL; if (nfs_server_capable(dir, NFS_CAP_SECURITY_LABEL) == 0) return NULL; err = security_dentry_init_security(dentry, sattr->ia_mode, &dentry->d_name,...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
7,773,319,165,568,458,000,000,000,000,000,000,000
18
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode, int sfcount, __be32 *psfsrc, int delta) { struct ip_mc_list *pmc; int isexclude; int i, err; if (!in_dev) return -ENODEV; rcu_read_lock(); for_each_pmc_rcu(in_dev, pmc) { if (*pmca == pmc->multiaddr) break; } if (!pmc) { ...
0
[ "CWE-399", "CWE-703", "CWE-369" ]
linux
a8c1f65c79cbbb2f7da782d4c9d15639a9b94b27
81,531,546,491,986,550,000,000,000,000,000,000,000
68
igmp: Avoid zero delay when receiving odd mixture of IGMP queries Commit 5b7c84066733c5dfb0e4016d939757b38de189e4 ('ipv4: correct IGMP behavior on v3 query during v2-compatibility mode') added yet another case for query parsing, which can result in max_delay = 0. Substitute a value of 1, as in the usual v3 case. Rep...
static int do_siocgstampns(struct net *net, struct socket *sock, unsigned int cmd, void __user *up) { mm_segment_t old_fs = get_fs(); struct timespec kts; int err; set_fs(KERNEL_DS); err = sock_do_ioctl(net, sock, cmd, (unsigned long)&kts); set_fs(old_fs); if (!err) err = compat_put_timespec(&kts, up); ...
0
[ "CWE-264" ]
net
4de930efc23b92ddf88ce91c405ee645fe6e27ea
33,428,312,306,392,950,000,000,000,000,000,000,000
15
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>
aspath_hash_alloc (void *arg) { const struct aspath *aspath = arg; struct aspath *new; /* Malformed AS path value. */ assert (aspath->str); if (! aspath->str) return NULL; /* New aspath structure is needed. */ new = XMALLOC (MTYPE_AS_PATH, sizeof (struct aspath)); /* Reuse segments and string rep...
0
[ "CWE-20" ]
quagga
7a42b78be9a4108d98833069a88e6fddb9285008
69,534,654,145,167,980,000,000,000,000,000,000,000
21
bgpd: Fix AS_PATH size calculation for long paths If you have an AS_PATH with more entries than what can be written into a single AS_SEGMENT_MAX it needs to be broken up. The code that noticed that the AS_PATH needs to be broken up was not correctly calculating the size of the resulting message. This patch addresses...
GF_Box *mp4s_box_new() { ISOM_DECL_BOX_ALLOC(GF_MPEGSampleEntryBox, GF_ISOM_BOX_TYPE_MP4S); gf_isom_sample_entry_init((GF_SampleEntryBox*)tmp); tmp->internal_type = GF_ISOM_SAMPLE_ENTRY_MP4S; return (GF_Box *)tmp; }
1
[ "CWE-476", "CWE-401" ]
gpac
328c6d682698fdb9878dbb4f282963d42c538c01
287,967,352,742,917,340,000,000,000,000,000,000,000
7
fixed #1756
static unsigned int xen_blkbk_unmap_prepare( struct xen_blkif_ring *ring, struct grant_page **pages, unsigned int num, struct gnttab_unmap_grant_ref *unmap_ops, struct page **unmap_pages) { unsigned int i, invcount = 0; for (i = 0; i < num; i++) { if (pages[i]->persistent_gnt != NULL) { put_persistent_gnt(...
0
[ "CWE-200" ]
linux
089bc0143f489bd3a4578bdff5f4ca68fb26f341
312,729,165,968,040,000,000,000,000,000,000,000,000
25
xen-blkback: don't leak stack data via response ring Rather than constructing a local structure instance on the stack, fill the fields directly on the shared ring, just like other backends do. Build on the fact that all response structure flavors are actually identical (the old code did make this assumption too). Thi...
static int udp_v6_push_pending_frames(struct sock *sk) { struct sk_buff *skb; struct udp_sock *up = udp_sk(sk); struct flowi6 fl6; int err = 0; if (up->pending == AF_INET) return udp_push_pending_frames(sk); /* ip6_finish_skb will release the cork, so make a copy of * fl6 here. */ fl6 = inet_sk(sk)->cor...
0
[]
linux
a612769774a30e4fc143c4cb6395c12573415660
208,462,650,865,554,420,000,000,000,000,000,000,000
26
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 int __sys_sendmsg(struct socket *sock, struct msghdr __user *msg, struct msghdr *msg_sys, unsigned flags, struct used_address *used_address) { struct compat_msghdr __user *msg_compat = (struct compat_msghdr __user *)msg; struct sockaddr_storage address; struct iovec iovstack[UIO_FASTIOV], *iov = ...
1
[ "CWE-476" ]
linux
bc909d9ddbf7778371e36a651d6e4194b1cc7d4c
171,580,529,665,940,900,000,000,000,000,000,000,000
115
sendmmsg/sendmsg: fix unsafe user pointer access Dereferencing a user pointer directly from kernel-space without going through the copy_from_user family of functions is a bad idea. Two of such usages can be found in the sendmsg code path called from sendmmsg, added by commit c71d8ebe7a4496fb7231151cb70a6baa0cb56f9a u...
int bnep_get_conninfo(struct bnep_conninfo *ci) { struct bnep_session *s; int err = 0; down_read(&bnep_session_sem); s = __bnep_get_session(ci->dst); if (s) __bnep_copy_ci(ci, s); else err = -ENOENT; up_read(&bnep_session_sem); return err; }
0
[ "CWE-20", "CWE-284" ]
linux
71bb99a02b32b4cc4265118e85f6035ca72923f0
163,302,941,623,553,060,000,000,000,000,000,000,000
16
Bluetooth: bnep: bnep_add_connection() should verify that it's dealing with l2cap socket same story as cmtp Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
ast_for_dotted_name(struct compiling *c, const node *n) { expr_ty e; identifier id; int lineno, col_offset; int i; node *ch; REQ(n, dotted_name); lineno = LINENO(n); col_offset = n->n_col_offset; ch = CHILD(n, 0); id = NEW_IDENTIFIER(ch); if (!id) return NULL; ...
0
[ "CWE-125" ]
cpython
a4d78362397fc3bced6ea80fbc7b5f4827aec55e
27,378,333,853,806,747,000,000,000,000,000,000,000
34
bpo-36495: Fix two out-of-bounds array reads (GH-12641) Research and fix by @bradlarsen.
__u32 secure_tcp_sequence_number(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport) { __u32 seq; __u32 hash[4]; struct keydata *keyptr = get_keyptr(); /* * Pick a unique starting offset for each TCP connection endpoints * (saddr, daddr, sport, dport). * Note that the words are placed into the st...
1
[ "CWE-703" ]
linux
6e5714eaf77d79ae1c8b47e3e040ff5411b717ec
153,524,571,962,904,360,000,000,000,000,000,000,000
34
net: Compute protocol sequence numbers and fragment IDs using MD5. Computers have become a lot faster since we compromised on the partial MD4 hash which we use currently for performance reasons. MD5 is a much safer choice, and is inline with both RFC1948 and other ISS generators (OpenBSD, Solaris, etc.) Furthermore,...
static int ext4_add_dirent_to_inline(handle_t *handle, struct ext4_filename *fname, struct inode *dir, struct inode *inode, struct ext4_iloc *iloc, void *inline_start, int inline_size) { int err; struct ext4_dir_entry_2 *de; err = ext4_find_dest_de(dir, inode, iloc->bh,...
0
[ "CWE-416" ]
linux
117166efb1ee8f13c38f9e96b258f16d4923f888
237,104,331,067,475,950,000,000,000,000,000,000,000
39
ext4: do not allow external inodes for inline data The inline data feature was implemented before we added support for external inodes for xattrs. It makes no sense to support that combination, but the problem is that there are a number of extended attribute checks that are skipped if e_value_inum is non-zero. Unfor...
nautilus_file_invalidate_extension_info (NautilusFile *file) { nautilus_file_invalidate_attributes (file, NAUTILUS_FILE_ATTRIBUTE_EXTENSION_INFO); }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
25,017,466,774,867,606,000,000,000,000,000,000,000
4
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
int task_cgroup_path(struct task_struct *task, char *buf, size_t buflen) { struct cgroup_root *root; struct cgroup *cgrp; int hierarchy_id = 1; int ret; mutex_lock(&cgroup_mutex); spin_lock_irq(&css_set_lock); root = idr_get_next(&cgroup_hierarchy_idr, &hierarchy_id); if (root) { cgrp = task_cgroup_from_ro...
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
112,544,094,984,420,200,000,000,000,000,000,000,000
24
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
static void xfrm_netlink_rcv(struct sk_buff *skb) { struct net *net = sock_net(skb->sk); mutex_lock(&net->xfrm.xfrm_cfg_mutex); netlink_rcv_skb(skb, &xfrm_user_rcv_msg); mutex_unlock(&net->xfrm.xfrm_cfg_mutex); }
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
106,029,634,940,812,550,000,000,000,000,000,000,000
8
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
static int enable_cpucache(struct kmem_cache *cachep, gfp_t gfp) { int err; int limit = 0; int shared = 0; int batchcount = 0; err = cache_random_seq_create(cachep, cachep->num, gfp); if (err) goto end; if (!is_root_cache(cachep)) { struct kmem_cache *root = memcg_root_cache(cachep); limit = root->limit;...
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
51,782,564,422,474,990,000,000,000,000,000,000,000
70
mm/slab.c: fix SLAB freelist randomization duplicate entries This patch fixes a bug in the freelist randomization code. When a high random number is used, the freelist will contain duplicate entries. It will result in different allocations sharing the same chunk. It will result in odd behaviours and crashes. It sh...
static int udp6_gro_complete(struct sk_buff *skb, int nhoff) { const struct ipv6hdr *ipv6h = ipv6_hdr(skb); struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); if (uh->check) { skb_shinfo(skb)->gso_type |= SKB_GSO_UDP_TUNNEL_CSUM; uh->check = ~udp_v6_check(skb->len - nhoff, &ipv6h->saddr, &ipv6h->d...
0
[ "CWE-125" ]
linux
2423496af35d94a87156b063ea5cedffc10a70a1
156,512,438,581,354,700,000,000,000,000,000,000,000
15
ipv6: Prevent overrun when parsing v6 header options The KASAN warning repoted below was discovered with a syzkaller program. The reproducer is basically: int s = socket(AF_INET6, SOCK_RAW, NEXTHDR_HOP); send(s, &one_byte_of_data, 1, MSG_MORE); send(s, &more_than_mtu_bytes_data, 2000, 0); The socket() call set...
do_notify_resume(struct pt_regs *regs, struct switch_stack *sw, unsigned long thread_info_flags, unsigned long r0, unsigned long r19) { if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) do_signal(regs, sw, r0, r19); if (thread_info_flags & _TIF_NOTIFY_RESUME) { clear_thread_flag(TIF_NOTIFY_...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
171,312,194,444,930,100,000,000,000,000,000,000,000
14
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...
HWB_Diff (int r1, int g1, int b1, int r2, int g2, int b2) { RGBType RGB1, RGB2; HWBType HWB1, HWB2; float diff; SETUP_RGB (RGB1, r1, g1, b1); SETUP_RGB (RGB2, r2, g2, b2); RGB_to_HWB (RGB1, &HWB1); RGB_to_HWB (RGB2, &HWB2); /* * I made this bit up; it seems to produce OK results, and it is certainly * mo...
0
[ "CWE-119", "CWE-787" ]
libgd
77f619d48259383628c3ec4654b1ad578e9eb40e
92,361,470,961,415,640,000,000,000,000,000,000,000
33
fix #215 gdImageFillToBorder stack-overflow when invalid color is used
set_integered_width(struct table *t, double *dwidth, short *iwidth) { int i, j, k, n, bcol, ecol, step; short *indexarray; char *fixed; double *mod; double sum = 0., x = 0.; struct table_cell *cell = &t->cell; int rulewidth = table_rule_width(t); indexarray = NewAtom_N(short, t->maxcol ...
0
[ "CWE-399", "CWE-835" ]
w3m
8354763b90490d4105695df52674d0fcef823e92
276,427,846,873,123,100,000,000,000,000,000,000,000
120
Prevent negative indent value in feed_table_block_tag() Bug-Debian: https://github.com/tats/w3m/issues/88
static int cma_disable_callback(struct rdma_id_private *id_priv, enum rdma_cm_state state) { mutex_lock(&id_priv->handler_mutex); if (id_priv->state != state) { mutex_unlock(&id_priv->handler_mutex); return -EINVAL; } return 0; }
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
203,901,762,773,586,560,000,000,000,000,000,000,000
10
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...
static void cgit_self_link(char *name, const char *title, const char *class) { if (!strcmp(ctx.qry.page, "repolist")) cgit_index_link(name, title, class, ctx.qry.search, ctx.qry.sort, ctx.qry.ofs, 1); else if (!strcmp(ctx.qry.page, "summary")) cgit_summary_link(name, title, class, ctx.qry.head); else if (!st...
0
[]
cgit
513b3863d999f91b47d7e9f26710390db55f9463
262,590,679,490,088,560,000,000,000,000,000,000,000
57
ui-shared: prevent malicious filename from injecting headers
bgp_dump_routes_attr (struct stream *s, struct attr *attr, struct prefix *prefix) { unsigned long cp; unsigned long len; size_t aspath_lenp; struct aspath *aspath; /* Remember current pointer. */ cp = stream_get_endp (s); /* Place holder of length. */ stream_putw (s, 0); /* O...
0
[]
quagga
8794e8d229dc9fe29ea31424883433d4880ef408
257,272,344,314,549,650,000,000,000,000,000,000,000
136
bgpd: Fix regression in args consolidation, total should be inited from args * bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args.
virDomainKeyWrapCipherDefParseXML(virDomainKeyWrapDefPtr keywrap, xmlNodePtr node) { int state_type; int name_type; g_autofree char *name = NULL; g_autofree char *state = NULL; if (!(name = virXMLPropString(node, "name"))) { virReportError(VIR_ERR_CONF_SYNT...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
154,618,830,792,700,390,000,000,000,000,000,000,000
63
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
static void rds_loop_conn_shutdown(struct rds_connection *conn) { }
0
[]
linux-2.6
6094628bfd94323fc1cea05ec2c6affd98c18f7f
200,581,093,649,334,570,000,000,000,000,000,000,000
3
rds: prevent BUG_ON triggering on congestion map updates Recently had this bug halt reported to me: kernel BUG at net/rds/send.c:329! Oops: Exception in kernel mode, sig: 5 [#1] SMP NR_CPUS=1024 NUMA pSeries Modules linked in: rds sunrpc ipv6 dm_mirror dm_region_hash dm_log ibmveth sg ext4 jbd2 mbcache sd_mod crc_t10...
static bool ignore_undef_symbol(Elf_Half emachine, const char *name) { /* * On x86, PIC code and Clang non-PIC code may have call foo@PLT. GNU as * before 2.37 produces an unreferenced _GLOBAL_OFFSET_TABLE_ on x86-64. * i386 has a similar problem but may not deserve a fix. * * If we ever have to ignore many ...
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
161,768,516,717,641,530,000,000,000,000,000,000,000
14
module: limit enabling module.sig_enforce Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying "module.sig_enforce=1" on the boot command line sets "sig_enforce". Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured. This patch makes the presence of /sys/module/module/parameters/s...
vte_sequence_handler_delete_lines (VteTerminal *terminal, GValueArray *params) { GValue *value; VteRowData *rowdata; VteScreen *screen; long param, end, row; int i; screen = terminal->pvt->screen; /* The default is one. */ param = 1; /* Extract any parameters. */ if ((params != NULL) && (params->n_values > 0...
0
[]
vte
58bc3a942f198a1a8788553ca72c19d7c1702b74
41,028,284,877,200,217,000,000,000,000,000,000,000
46
fix bug #548272 svn path=/trunk/; revision=2365
bool Magick::Image::strokeAntiAlias(void) const { return(constOptions()->strokeAntiAlias()); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
47,678,174,380,581,460,000,000,000,000,000,000,000
4
Added missing return to avoid use after free.
/* {{{ static PHP_INI_MH(OnUpdate_date_timezone) */ static PHP_INI_MH(OnUpdate_date_timezone) { if (OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC) == FAILURE) { return FAILURE; } DATEG(timezone_valid) = 0; if (stage == PHP_INI_STAGE_RUNTIME) { if (!timelib_timezo...
0
[]
php-src
c377f1a715476934133f3254d1e0d4bf3743e2d2
155,215,058,891,249,980,000,000,000,000,000,000,000
17
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
ieee80211_tdls_add_subband(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, u16 start, u16 end, u16 spacing) { u8 subband_cnt = 0, ch_cnt = 0; struct ieee80211_channel *ch; struct cfg80211_chan_def chandef; int i, subband_start; struct wiphy *wiphy = sdata->local->hw.wiphy; for (i = start; i...
0
[]
linux
79c92ca42b5a3e0ea172ea2ce8df8e125af237da
320,926,727,368,113,100,000,000,000,000,000,000,000
55
mac80211: handle deauthentication/disassociation from TDLS peer When receiving a deauthentication/disassociation frame from a TDLS peer, a station should not disconnect the current AP, but only disable the current TDLS link if it's enabled. Without this change, a TDLS issue can be reproduced by following the steps as...
static inline void vm_exit_controls_init(struct vcpu_vmx *vmx, u32 val) { vmcs_write32(VM_EXIT_CONTROLS, val); vmx->vm_exit_controls_shadow = val; }
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
298,068,195,394,246,100,000,000,000,000,000,000,000
5
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 void test_sqlmode() { MYSQL_STMT *stmt; MYSQL_BIND my_bind[2]; char c1[5], c2[5]; int rc; char query[MAX_TEST_QUERY_LENGTH]; myheader("test_sqlmode"); rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_piping"); myquery(rc); rc= mysql_query(mysql, "CREATE TABLE test_piping(name v...
0
[ "CWE-416" ]
mysql-server
4797ea0b772d5f4c5889bc552424132806f46e93
38,121,738,800,269,470,000,000,000,000,000,000,000
137
BUG#17512527: LIST HANDLING INCORRECT IN MYSQL_PRUNE_STMT_LIST() Analysis: --------- Invalid memory access maybe observed when using prepared statements if: a) The mysql client connection is lost after statement preparation is complete and b) There is at least one statement which is in initialized state but not ...
static int __cil_resolve_name_helper(struct cil_db *db, struct cil_tree_node *node, char *name, enum cil_sym_index sym_index, struct cil_symtab_datum **datum) { int rc = SEPOL_ERR; rc = __cil_resolve_name_with_parents(node, name, sym_index, datum); if (rc != SEPOL_OK) { rc = __cil_resolve_name_with_root(db, name,...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
196,332,496,528,845,340,000,000,000,000,000,000,000
10
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 ...
_vte_terminal_scroll_text (VteTerminal *terminal, int scroll_amount) { VteRowData *row, *old_row; long start, end, i; VteScreen *screen; screen = terminal->pvt->screen; if (screen->scrolling_restricted) { start = screen->insert_delta + screen->scrolling_region.start; end = screen->insert_delta + screen->scro...
0
[]
vte
58bc3a942f198a1a8788553ca72c19d7c1702b74
54,103,239,919,357,840,000,000,000,000,000,000,000
49
fix bug #548272 svn path=/trunk/; revision=2365
void sock_prot_inuse_add(struct net *net, struct proto *prot, int val) { __this_cpu_add(prot_inuse.val[prot->inuse_idx], val); }
0
[ "CWE-119", "CWE-787" ]
linux
b98b0bc8c431e3ceb4b26b0dfc8db509518fb290
58,917,911,867,466,860,000,000,000,000,000,000,000
4
net: avoid signed overflows for SO_{SND|RCV}BUFFORCE CAP_NET_ADMIN users should not be allowed to set negative sk_sndbuf or sk_rcvbuf values, as it can lead to various memory corruptions, crashes, OOM... Note that before commit 82981930125a ("net: cleanups in sock_setsockopt()"), the bug was even more serious, since ...
TIFFCheckpointDirectory(TIFF* tif) { int rc; /* Setup the strips arrays, if they haven't already been. */ if (tif->tif_dir.td_stripoffset == NULL) (void) TIFFSetupStrips(tif); rc = TIFFWriteDirectorySec(tif,TRUE,FALSE,NULL); (void) TIFFSetWriteOffset(tif, TIFFSeekFile(tif, 0, SEEK_END)); return rc; }
0
[ "CWE-617" ]
libtiff
de144fd228e4be8aa484c3caf3d814b6fa88c6d9
18,393,188,351,647,050,000,000,000,000,000,000,000
10
TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963
static int cpu_cache_sysfs_init(unsigned int cpu) { struct device *dev = get_cpu_device(cpu); if (per_cpu_cacheinfo(cpu) == NULL) return -ENOENT; per_cpu_cache_dev(cpu) = cpu_device_create(dev, NULL, NULL, "cache"); if (IS_ERR(per_cpu_cache_dev(cpu))) return PTR_ERR(per_cpu_cache_dev(cpu)); /* Allocate all ...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
164,222,852,030,675,660,000,000,000,000,000,000,000
23
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
static int regulator_check_current_limit(struct regulator_dev *rdev, int *min_uA, int *max_uA) { BUG_ON(*min_uA > *max_uA); if (!rdev->constraints) { rdev_err(rdev, "no constraints\n"); return -ENODEV; } if (!(rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_CURRENT)) { rdev_err(rdev, "operation not...
0
[ "CWE-416" ]
linux
60a2362f769cf549dc466134efe71c8bf9fbaaba
31,456,969,281,261,150,000,000,000,000,000,000,000
27
regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing After freeing pin from regulator_ena_gpio_free, loop can access the pin. So this patch fixes not to access pin after freeing. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
compile_unlet( lval_T *lvp, char_u *name_end, exarg_T *eap, int deep UNUSED, void *coookie) { cctx_T *cctx = coookie; char_u *p = lvp->ll_name; int cc = *name_end; int ret = OK; if (cctx->ctx_skip == SKIP_YES) return OK; *name_end = NUL; if (*p == '$') {...
0
[ "CWE-703", "CWE-122" ]
vim
d1d8f6bacb489036d0fd479c9dd3c0102c988889
251,063,647,728,299,620,000,000,000,000,000,000,000
62
patch 9.0.0211: invalid memory access when compiling :lockvar Problem: Invalid memory access when compiling :lockvar. Solution: Don't read past the end of the line.
Nef_polyhedron_2<T,Items,Mark> symmetric_difference( const Nef_polyhedron_2<T,Items,Mark>& N1) const /*{\Mop returns the symmectric difference |\Mvar - T| $\cup$ |T - \Mvar|. }*/ { Nef_polyhedron_2<T,Items,Mark> res(pm(),false); // empty, no frame Overlayer D(res.pm()); D.subdivide(pm(),N1.p...
0
[ "CWE-269" ]
cgal
618b409b0fbcef7cb536a4134ae3a424ef5aae45
167,660,982,008,268,380,000,000,000,000,000,000,000
12
Fix Nef_2 and Nef_S2 IO
xmlIOFTPMatch (const char *filename) { if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "ftp://", 6)) return(1); return(0); }
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
270,225,424,438,516,500,000,000,000,000,000,000,000
5
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
isoent_clone_tree(struct archive_write *a, struct isoent **nroot, struct isoent *root) { struct isoent *np, *xroot, *newent; np = root; xroot = NULL; do { newent = isoent_clone(np); if (newent == NULL) { archive_set_error(&a->archive, ENOMEM, "Can't allocate memory"); return (ARCHIVE_FATAL); ...
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
234,797,788,085,614,850,000,000,000,000,000,000,000
39
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
static int parse_CAggregSpec(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...) { proto_item *item; proto_tree *tree; va_list ap; guint32 type, ccAlias, idColumn; const char *txt; va_start(ap, fmt); txt = wmem_strdup_vprintf(wmem_packet_scope(), fmt, ap); va_end(ap)...
0
[ "CWE-770" ]
wireshark
b7a0650e061b5418ab4a8f72c6e4b00317aff623
228,498,674,960,348,630,000,000,000,000,000,000,000
46
MS-WSP: Don't allocate huge amounts of memory. Add a couple of memory allocation sanity checks, one of which fixes #17331.
testframe_deinit(struct module_env* env, struct cachedb_env* cachedb_env) { struct testframe_moddata* d = (struct testframe_moddata*) cachedb_env->backend_data; (void)env; verbose(VERB_ALGO, "testframe_deinit"); if(!d) return; lock_basic_destroy(&d->lock); free(d->stored_key); free(d->stored_data); free(d);...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
229,269,908,647,083,040,000,000,000,000,000,000,000
13
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
asn1_get_length(unsigned char **buffer, /* IO - Pointer in buffer */ unsigned char *bufend) /* I - End of buffer */ { unsigned length; /* Length */ length = **buffer; (*buffer) ++; if (length & 128) { int count; /* Number of bytes for length */ if ((count = length & 127) > sizeof(unsigned...
1
[ "CWE-120" ]
cups
f24e6cf6a39300ad0c3726a41a4aab51ad54c109
50,330,248,459,606,420,000,000,000,000,000,000,000
28
Fix multiple security/disclosure issues: - CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251) - Fixed IPP buffer overflow (rdar://50035411) - Fixed memory disclosure issue in the scheduler (rdar://51373853) - Fixed DoS issues in the scheduler (rdar://51373929)
static int smack_file_receive(struct file *file) { int may = 0; struct smk_audit_info ad; smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_TASK); smk_ad_setfield_u_fs_path(&ad, file->f_path); /* * This code relies on bitmasks. */ if (file->f_mode & FMODE_READ) may = MAY_READ; if (file->f_mode & FMODE_WRITE) ma...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
114,707,181,212,618,940,000,000,000,000,000,000,000
17
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...
http_ForceField(struct http *to, unsigned n, const char *t) { int i; CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); assert(n < HTTP_HDR_FIRST); assert(n == HTTP_HDR_METHOD || n == HTTP_HDR_PROTO); AN(t); /* NB: method names and protocol versions are case-sensitive. */ if (to->hd[n].b == NULL || strcmp(to->hd[n].b, t)) { ...
0
[ "CWE-703" ]
varnish-cache
c5fd097e5cce8b461c6443af02b3448baef2491d
230,880,137,082,713,370,000,000,000,000,000,000,000
19
Do not call http_hdr_flags() on pseudo-headers In http_EstimateWS(), all headers are passed to the http_isfiltered() function to calculate how many bytes is needed to serialize the entire struct http. http_isfiltered() will check the headers for whether they are going to be filtered out later and if so skip them. How...
static int input_device_connected(struct input_device *idev) { int err; if (idev->intr_io == NULL || idev->ctrl_io == NULL) return -ENOTCONN; err = hidp_add_connection(idev); if (err < 0) return err; btd_service_connecting_complete(idev->service, 0); return 0; }
0
[]
bluez
3cccdbab2324086588df4ccf5f892fb3ce1f1787
189,991,107,150,249,740,000,000,000,000,000,000,000
15
HID accepts bonded device connections only. This change adds a configuration for platforms to choose a more secure posture for the HID profile. While some older mice are known to not support pairing or encryption, some platform may choose a more secure posture by requiring the device to be bonded and require the con...
int yr_object_structure_set_member( YR_OBJECT* object, YR_OBJECT* member) { YR_STRUCTURE_MEMBER* sm; assert(object->type == OBJECT_TYPE_STRUCTURE); // Check if the object already have a member with the same identifier if (yr_object_lookup_field(object, member->identifier) != NULL) return ERROR_D...
0
[ "CWE-416" ]
yara
053e67e3ec81cc9268ce30eaf0d6663d8639ed1e
81,820,060,918,296,840,000,000,000,000,000,000,000
26
Fix issue #658
GF_Err trik_box_read(GF_Box *s,GF_BitStream *bs) { u32 i; GF_TrickPlayBox *ptr = (GF_TrickPlayBox *) s; ptr->entry_count = (u32) ptr->size; ptr->entries = (GF_TrickPlayBoxEntry *) gf_malloc(ptr->entry_count * sizeof(GF_TrickPlayBoxEntry) ); if (!ptr->entries) return GF_OUT_OF_MEM; for (i=0; i< ptr->entry_count;...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
180,584,354,143,467,140,000,000,000,000,000,000,000
14
fixed #1587
static inline u64 max_vruntime(u64 min_vruntime, u64 vruntime) { s64 delta = (s64)(vruntime - min_vruntime); if (delta > 0) min_vruntime = vruntime; return min_vruntime; }
0
[]
linux-2.6
6a6029b8cefe0ca7e82f27f3904dbedba3de4e06
140,414,417,186,229,150,000,000,000,000,000,000,000
8
sched: simplify sched_slice() Use the existing calc_delta_mine() calculation for sched_slice(). This saves a divide and simplifies the code because we share it with the other /cfs_rq->load users. It also improves code size: text data bss dec hex filename 42659 2740 144 45543 b1e...
static int opfxch(RAsm *a, ut8 *data, const Opcode *op) { int l = 0; switch (op->operands_count) { case 0: data[l++] = 0xd9; data[l++] = 0xc9; break; case 1: if (op->operands[0].type & OT_FPUREG & ~OT_REGALL) { data[l++] = 0xd9; data[l++] = 0xc8 | op->operands[0].reg; } else { return -1; } br...
0
[ "CWE-119", "CWE-125", "CWE-787" ]
radare2
9b46d38dd3c4de6048a488b655c7319f845af185
234,393,282,967,050,450,000,000,000,000,000,000,000
20
Fix #12372 and #12373 - Crash in x86 assembler (#12380) 0 ,0,[bP-bL-bP-bL-bL-r-bL-bP-bL-bL- mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx-- leA ,0,[bP-bL-bL-bP-bL-bP-bL-60@bL- leA ,0,[bP-bL-r-bP-bL-bP-bL-60@bL- mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx--
static int nfs41_test_stateid(struct nfs_server *server, nfs4_stateid *stateid) { struct nfs4_exception exception = { }; int err; do { err = nfs4_handle_exception(server, _nfs41_test_stateid(server, stateid), &exception); } while (exception.retry); return err; }
0
[ "CWE-703", "CWE-189" ]
linux
20e0fa98b751facf9a1101edaefbc19c82616a68
301,171,097,041,826,400,000,000,000,000,000,000,000
11
Fix length of buffer copied in __nfs4_get_acl_uncached _copy_from_pages() used to copy data from the temporary buffer to the user passed buffer is passed the wrong size parameter when copying data. res.acl_len contains both the bitmap and acl lenghts while acl_len contains the acl length after adjusting for the bitmap...
static inline __u32 tcp_max_tso_deferred_mss(const struct tcp_sock *tp) { return 3; }
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
293,831,202,530,883,150,000,000,000,000,000,000,000
4
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...
void smbd_notify_cancel_deleted(struct messaging_context *msg, void *private_data, uint32_t msg_type, struct server_id server_id, DATA_BLOB *data) { struct smbd_server_connection *sconn = talloc_get_type_abort( private_data, struct smbd_server_connection); struct file_id *fid; enum ndr_err_code ndr_err; ...
0
[ "CWE-266" ]
samba
5dd4c789c13035b805fdd2c3a9c38721657b05b3
259,599,546,524,105,800,000,000,000,000,000,000,000
28
s3: smbd: Ensure change notifies can't get set unless the directory handle is open for SEC_DIR_LIST. Remove knownfail entry. CVE-2020-14318 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14434 Signed-off-by: Jeremy Allison <jra@samba.org>
static int parse_lcid(tvbuff_t *tvb, int offset, proto_tree *parent_tree, const char *text) { proto_item *item; proto_tree *tree; guint32 lcid; lcid = tvb_get_letohl(tvb, offset); item = proto_tree_add_uint_format(parent_tree, hf_mswsp_lcid, tvb, offset, 4, lcid, "%s: 0x%x", text, lcid); tree = proto_item_add_su...
0
[ "CWE-770" ]
wireshark
b7a0650e061b5418ab4a8f72c6e4b00317aff623
38,089,835,287,321,916,000,000,000,000,000,000,000
15
MS-WSP: Don't allocate huge amounts of memory. Add a couple of memory allocation sanity checks, one of which fixes #17331.
int ecryptfs_init_crypto(void) { mutex_init(&key_tfm_list_mutex); INIT_LIST_HEAD(&key_tfm_list); return 0; }
0
[ "CWE-189" ]
linux-2.6
8faece5f906725c10e7a1f6caf84452abadbdc7b
246,630,441,276,286,880,000,000,000,000,000,000,000
6
eCryptfs: Allocate a variable number of pages for file headers When allocating the memory used to store the eCryptfs header contents, a single, zeroed page was being allocated with get_zeroed_page(). However, the size of an eCryptfs header is either PAGE_CACHE_SIZE or ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE (8192), whiche...
e_ews_connection_delete_items_in_chunks_sync (EEwsConnection *cnc, gint pri, const GSList *ids, EwsDeleteType delete_type, EwsSendMeetingCancellationsType send_cancels, EwsAffectedTaskOccurrencesType affected_tasks, GCancellable *cancellable, ...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
163,142,660,629,146,680,000,000,000,000,000,000,000
61
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
void set_preferences_dir(std::string path) { #ifdef _WIN32 if(path.empty()) { game_config::preferences_dir = get_cwd() + "/userdata"; } else if (path.size() > 2 && path[1] == ':') { //allow absolute path override game_config::preferences_dir = path; } else { BOOL (*SHGetSpecialFolderPath)(HWND, LPTSTR, int, ...
0
[ "CWE-200" ]
wesnoth
af61f9fdd15cd439da9e2fe5fa39d174c923eaae
156,869,862,947,085,370,000,000,000,000,000,000,000
94
fs: Use game data path to resolve ./ in the absence of a current_dir Fixes a file content disclosure bug (#22042) affecting functionality relying on the get_wml_location() function and not passing a non-empty value for the current_dir parameter. See <https://gna.org/bugs/?22042> for details. This is a candidate for ...
void MongoStatusInfo::Functions::stack::call(JSContext* cx, JS::CallArgs args) { JS::RootedObject thisv(cx, args.thisv().toObjectOrNull()); JS::RootedObject parent(cx); if (!JS_GetPrototype(cx, thisv, &parent)) { uasserted(ErrorCodes::JSInterpreterFailure, "Couldn't get prototype"); } Obje...
0
[]
mongo
c53b2f233687487ef70398153af3d8d34bbc21d1
13,860,395,157,128,290,000,000,000,000,000,000,000
35
SERVER-39481 don't expose a MongoStatus constructor in JS
static pj_bool_t logging_on_rx_msg(pjsip_rx_data *rdata) { char addr[PJ_INET6_ADDRSTRLEN+10]; pj_str_t input_str = pj_str(rdata->pkt_info.src_name); PJ_LOG(4,(THIS_FILE, "RX %d bytes %s from %s %s:\n" "%.*s\n" "--end msg--", rdata->msg_info.len, pjsip_rx_data_get_info(rdata), rdata->tp_...
0
[ "CWE-120", "CWE-787" ]
pjproject
d27f79da11df7bc8bb56c2f291d71e54df8d2c47
165,760,744,360,413,940,000,000,000,000,000,000,000
22
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...
static int pxa2xx_fir_is_empty(void *opaque) { PXA2xxFIrState *s = (PXA2xxFIrState *) opaque; return (s->rx_len < 64); }
0
[ "CWE-119" ]
qemu
caa881abe0e01f9931125a0977ec33c5343e4aa7
241,914,726,174,705,500,000,000,000,000,000,000,000
5
pxa2xx: avoid buffer overrun on incoming migration CVE-2013-4533 s->rx_level is read from the wire and used to determine how many bytes to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the length of s->rx_fifo[] the buffer can be overrun with arbitrary data from the wire. Fix this by validating rx_leve...
static bool is_spillable_regtype(enum bpf_reg_type type) { switch (type) { case PTR_TO_MAP_VALUE: case PTR_TO_MAP_VALUE_OR_NULL: case PTR_TO_STACK: case PTR_TO_CTX: case FRAME_PTR: case CONST_PTR_TO_MAP: return true; default: return false; } }
0
[ "CWE-200" ]
linux
a1b14d27ed0965838350f1377ff97c93ee383492
7,864,336,929,008,279,000,000,000,000,000,000,000
14
bpf: fix branch offset adjustment on backjumps after patching ctx expansion When ctx access is used, the kernel often needs to expand/rewrite instructions, so after that patching, branch offsets have to be adjusted for both forward and backward jumps in the new eBPF program, but for backward jumps it fails to account ...
PrioritizedChoice(std::vector<std::shared_ptr<Ope>> &&opes) : opes_(opes) {}
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
153,213,623,238,837,360,000,000,000,000,000,000,000
1
Fix #122
const char *Field_iterator_table_ref::get_table_name() { if (table_ref->view) return table_ref->view_name.str; if (table_ref->is_derived()) return table_ref->table->s->table_name.str; else if (table_ref->is_natural_join) return natural_join_it.column_ref()->table_name(); DBUG_ASSERT(!strcmp(table_r...
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
183,756,230,137,413,900,000,000,000,000,000,000,000
14
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
void __init __free_pages_bootmem(struct page *page, unsigned long pfn, unsigned int order) { if (early_page_uninitialised(pfn)) return; return __free_pages_boot_core(page, order); }
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
296,935,403,154,235,200,000,000,000,000,000,000,000
7
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
void Compute(OpKernelContext* context) override { const Tensor& input = context->input(0); // MatrixDiagPart and MatrixDiagPartV2 both use this OpKernel. // MatrixDiagPart only has one input, so we have to check the number of // inputs before reading additional parameters in MatrixDiagV2. int32_t...
0
[ "CWE-476", "CWE-125" ]
tensorflow
482da92095c4d48f8784b1f00dda4f81c28d2988
299,292,302,579,002,900,000,000,000,000,000,000,000
91
Ensure non-empty padding_value input to tf.raw_ops.MatrixDiagPartV2, if a padding_value is input PiperOrigin-RevId: 388314614 Change-Id: If0b51ad58d5d8543a6be6ce8f42ae4755c80d55f
static int selinux_cred_alloc_blank(struct cred *cred, gfp_t gfp) { struct task_security_struct *tsec; tsec = kzalloc(sizeof(struct task_security_struct), gfp); if (!tsec) return -ENOMEM; cred->security = tsec; return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
53,665,312,120,491,250,000,000,000,000,000,000,000
11
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...
static BOOL update_read_window_state_order(wStream* s, WINDOW_ORDER_INFO* orderInfo, WINDOW_STATE_ORDER* windowState) { UINT32 i; size_t size; RECTANGLE_16* newRect; if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_OWNER) { if (Stream_GetRemainingLength(s) < 4) return...
0
[ "CWE-125" ]
FreeRDP
6b2bc41935e53b0034fe5948aeeab4f32e80f30f
88,457,596,301,192,900,000,000,000,000,000,000,000
244
Fix #6010: Check length in read_icon_info
static CImg<T> get_load(const char *const filename) { return CImg<T>().load(filename); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
65,684,041,597,162,690,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void S_setup_eval_state(pTHX_ regmatch_info *const reginfo) { MAGIC *mg; regexp *const rex = ReANY(reginfo->prog); regmatch_info_aux_eval *eval_state = reginfo->info_aux_eval; eval_state->rex = rex; if (reginfo->sv) { /* Make $_ available to executed code. */ if (reginfo->sv...
0
[ "CWE-416" ]
perl5
22b433eff9a1ffa2454e18405a56650f07b385b5
137,366,960,554,498,970,000,000,000,000,000,000,000
67
PATCH [perl #123562] Regexp-matching "hangs" The regex engine got into an infinite loop because of the malformation. It is trying to back-up over a sequence of UTF-8 continuation bytes. But the character just before the sequence should be a start byte. If not, there is a malformation. I added a test to croak if that...
static int __init afiucv_init(void) { int err; if (MACHINE_IS_VM) { cpcmd("QUERY USERID", iucv_userid, sizeof(iucv_userid), &err); if (unlikely(err)) { WARN_ON(err); err = -EPROTONOSUPPORT; goto out; } pr_iucv = try_then_request_module(symbol_get(iucv_if), "iucv"); if (!pr_iucv) { printk(KERN_...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
162,032,363,898,752,830,000,000,000,000,000,000,000
47
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
void decrypt_message(SSL& ssl, input_buffer& input, uint sz) { input_buffer plain(sz); opaque* cipher = input.get_buffer() + input.get_current(); if (sanity_check_message(ssl, sz) != 0) { ssl.SetError(sanityCipher_error); return; } ssl.useCrypto().use_cipher().decrypt(plain.ge...
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
94,417,693,283,417,780,000,000,000,000,000,000,000
18
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
static int decode_tsw1(GetByteContext *gb, uint8_t *frame, int width, int height) { const uint8_t *frame_start = frame; const uint8_t *frame_end = frame + width * height; int mask = 0x10000, bitbuf = 0; int v, count, segments; unsigned offset; segments = bytestream2_get_le32(gb); offset ...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
f52fbf4f3ed02a7d872d8a102006f29b4421f360
136,655,548,633,142,950,000,000,000,000,000,000,000
41
avcodec/dfa: Fix off by 1 error Fixes out of array access Fixes: 1345/clusterfuzz-testcase-minimized-6062963045695488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static int vidioc_g_input(struct file *file, void *fh, unsigned int *i) { struct v4l2_loopback_device *dev = v4l2loopback_getdevice(file); if (!dev->announce_all_caps && !dev->ready_for_capture) return -ENOTTY; if (i) *i = 0; return 0; }
0
[ "CWE-787" ]
v4l2loopback
64a216af4c09c9ba9326057d7e78994271827eff
264,890,525,642,129,500,000,000,000,000,000,000,000
9
add explicit format specifier to printf() invocations CWE-134
static void pharobj_set_compression(HashTable *manifest, php_uint32 compress) /* {{{ */ { zend_hash_apply_with_argument(manifest, phar_set_compression, &compress); }
0
[ "CWE-20" ]
php-src
1e9b175204e3286d64dfd6c9f09151c31b5e099a
235,332,469,439,129,740,000,000,000,000,000,000,000
4
Fix bug #71860: Require valid paths for phar filenames
GF_Err gf_isom_remove_edits(GF_ISOFile *movie, u32 trackNumber) { GF_Err e; GF_TrackBox *trak; trak = gf_isom_get_track_from_file(movie, trackNumber); if (!trak) return GF_BAD_PARAM; e = CanAccessMovie(movie, GF_ISOM_OPEN_WRITE); if (e) return e; if (!trak->editBox || !trak->editBox->editList) return GF_OK; ...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
242,392,798,605,902,870,000,000,000,000,000,000,000
23
fixed #1706
bool OAuth2Filter::canSkipOAuth(Http::RequestHeaderMap& headers) const { // We can skip OAuth if the supplied HMAC cookie is valid. Apply the OAuth details as headers // if we successfully validate the cookie. validator_->setParams(headers, config_->tokenSecret()); if (validator_->isValid()) { config_->stat...
0
[ "CWE-416" ]
envoy
7ffda4e809dec74449ebc330cebb9d2f4ab61360
53,822,170,795,095,350,000,000,000,000,000,000,000
20
oauth2: do not blindly accept requests with a token in the Authorization headera (781) The logic was broken because it assumed an additional call would be performed to the auth server, which isn't the case. Per the filter documentation, a request is only considered subsequently authenticated if there's valid cookie th...
PHP_FUNCTION(imagerectangle) { zval *IM; long x1, y1, x2, y2, col; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlllll", &IM, &x1, &y1, &x2, &y2, &col) == FAILURE) { return; } ZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, "Image", le_gd); gdImageRectangle(im, x1, y1, x2, y2, col); RET...
0
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
24,126,417,279,508,320,000,000,000,000,000,000,000
14
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
source_level(void *cookie) { return ((source_cookie_T *)cookie)->level; }
0
[ "CWE-122" ]
vim
2bdad6126778f907c0b98002bfebf0e611a3f5db
132,399,401,406,633,960,000,000,000,000,000,000,000
4
patch 8.2.4647: "source" can read past end of copied line Problem: "source" can read past end of copied line. Solution: Add a terminating NUL.
normalize_dbname(const char *line, char *buff, uint buff_size) { MYSQL_RES *res= NULL; /* Send the "USE db" commmand to the server. */ if (mysql_query(&mysql, line)) return 1; /* Now, get the normalized database name and store it into the buff. */ if (!mysql_query(&mysql, "SELECT DATABASE()") ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
260,139,672,742,164,200,000,000,000,000,000,000,000
35
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...
int cipso_v4_req_setattr(struct request_sock *req, const struct cipso_v4_doi *doi_def, const struct netlbl_lsm_secattr *secattr) { int ret_val = -EPERM; unsigned char *buf = NULL; u32 buf_len; u32 opt_len; struct ip_options_rcu *opt = NULL; struct inet_request_sock *req_inet; /* We allocate the maximum ...
0
[ "CWE-119" ]
linux-2.6
89d7ae34cdda4195809a5a987f697a517a2a3177
208,494,789,660,775,880,000,000,000,000,000,000,000
54
cipso: don't follow a NULL pointer when setsockopt() is called As reported by Alan Cox, and verified by Lin Ming, when a user attempts to add a CIPSO option to a socket using the CIPSO_V4_TAG_LOCAL tag the kernel dies a terrible death when it attempts to follow a NULL pointer (the skb argument to cipso_v4_validate() i...
MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql) { MYSQL_RES *result; DBUG_ENTER("mysql_store_result"); if (!mysql->fields) DBUG_RETURN(0); if (mysql->status != MYSQL_STATUS_GET_RESULT) { set_mysql_error(mysql, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate); DBUG_RETURN(0); } mysql->status=M...
0
[ "CWE-254" ]
mysql-server
13380bf81f6bc20d39549f531f9acebdfb5a8c37
162,585,751,760,028,770,000,000,000,000,000,000,000
42
Bug #22295186: CERTIFICATE VALIDATION BUG IN MYSQL MAY ALLOW MITM
void set(CHARSET_INFO *collation_arg, Derivation derivation_arg, uint repertoire_arg) { collation= collation_arg; derivation= derivation_arg; repertoire= repertoire_arg; }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
163,523,314,417,892,140,000,000,000,000,000,000,000
8
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
xmlencode_print(const char *src, uint length) { if (!src) tee_fputs("NULL", PAGER); else { for (const char *p = src; length; p++, length--) { const char *t; if ((t = array_value(xmlmeta, *p))) tee_fputs(t, PAGER); else tee_putc(*p, PAGER); } } }
0
[ "CWE-295" ]
mysql-server
b3e9211e48a3fb586e88b0270a175d2348935424
96,055,908,656,600,380,000,000,000,000,000,000,000
16
WL#9072: Backport WL#8785 to 5.5
int ftrace_set_filter_ip(struct ftrace_ops *ops, unsigned long ip, int remove, int reset) { return ftrace_set_addr(ops, ip, remove, reset, 1); }
0
[ "CWE-703" ]
linux
6a76f8c0ab19f215af2a3442870eeb5f0e81998d
216,871,691,576,395,600,000,000,000,000,000,000,000
5
tracing: Fix possible NULL pointer dereferences Currently set_ftrace_pid and set_graph_function files use seq_lseek for their fops. However seq_open() is called only for FMODE_READ in the fops->open() so that if an user tries to seek one of those file when she open it for writing, it sees NULL seq_file and then panic...
static char **fill_envp(struct dhcp_packet *packet) { int envc; int i; char **envp, **curr; const char *opt_name; uint8_t *temp; uint8_t overload = 0; #define BITMAP unsigned #define BBITS (sizeof(BITMAP) * 8) #define BMASK(i) (1 << (i & (sizeof(BITMAP) * 8 - 1))) #define FOUND_OPTS(i) (found_opts[(unsigned)i / ...
0
[ "CWE-20" ]
busybox
7280d2017d8075267a12e469983e38277dcf0374
38,493,434,280,316,110,000,000,000,000,000,000,000
135
udhcpc: sanitize hostnames in incoming packets. Closes 3979. The following options are replaced with string "bad" if they contain malformed hostname: HOST_NAME, DOMAIN_NAME, NIS_DOMAIN, TFTP_SERVER_NAME function old new delta xmalloc_optname_optval ...
brcmf_configure_wpaie(struct brcmf_if *ifp, const struct brcmf_vs_tlv *wpa_ie, bool is_rsn_ie) { u32 auth = 0; /* d11 open authentication */ u16 count; s32 err = 0; s32 len; u32 i; u32 wsec; u32 pval = 0; u32 gval = 0; u32 wpa_auth = 0; u32 offset; u8 *data; u16 rsn_cap; u32 wme_bss_disable...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
39,452,241,091,659,413,000,000,000,000,000,000,000
237
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...
int cil_gen_category(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node) { enum cil_syntax syntax[] = { CIL_SYN_STRING, CIL_SYN_STRING, CIL_SYN_END }; int syntax_len = sizeof(syntax)/sizeof(*syntax); char *key = NULL; struct cil_cat *cat = NULL; int rc = SEPOL_ERR; if (...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
34,833,544,677,833,857,000,000,000,000,000,000,000
38
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 ...
get_funccal_local_var() { if (current_funccal == NULL || current_funccal->l_vars.dv_refcount == 0) return NULL; return &get_funccal()->l_vars_var; }
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
28,526,228,296,656,624,000,000,000,000,000,000,000
6
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq) { SCSIBus *bus = sreq->bus; VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus); VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s); VirtIOSCSIReq *req; uint32_t n; req = g_malloc(sizeof(*req)); qemu_get_be32s(f, &n); assert...
0
[ "CWE-119" ]
qemu
3c3ce981423e0d6c18af82ee62f1850c2cda5976
252,769,094,400,375,540,000,000,000,000,000,000,000
33
virtio-scsi: fix buffer overrun on invalid state load CVE-2013-4542 hw/scsi/scsi-bus.c invokes load_request. virtio_scsi_load_request does: qemu_get_buffer(f, (unsigned char *)&req->elem, sizeof(req->elem)); this probably can make elem invalid, for example, make in_num or out_num huge, then: virtio_scsi_p...
qemuProcessStartManagedPRDaemon(virDomainObjPtr vm) { qemuDomainObjPrivatePtr priv = vm->privateData; virQEMUDriverPtr driver = priv->driver; g_autoptr(virQEMUDriverConfig) cfg = NULL; int errfd = -1; g_autofree char *pidfile = NULL; g_autofree char *socketPath = NULL; pid_t cpid = -1; g...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
323,972,035,238,152,700,000,000,000,000,000,000,000
108
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...