func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) { TIFF* tif = img->tif; tileSeparateRoutine put = img->put.separate; unsigned char *buf; unsigned char *p0, *p1, *p2, *pa; uint32 row, y, nrow, rowstoread; tmsize_t pos; tmsize_t scanline; uint32 rowsperstrip, offset_row; uint32 imagewidth...
0
[ "CWE-20" ]
libtiff
48780b4fcc425cddc4ef8ffdf536f96a0d1b313b
185,028,065,811,032,400,000,000,000,000,000,000,000
127
* libtiff/tif_getimage.c: add explicit uint32 cast in putagreytile to avoid UndefinedBehaviorSanitizer warning. Patch by Nicolás Peña. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2658
decode_OFPAT_RAW_SET_TP_DST(ovs_be16 port, enum ofp_version ofp_version OVS_UNUSED, struct ofpbuf *out) { ofpact_put_SET_L4_DST_PORT(out)->port = ntohs(port); return 0; }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
318,494,258,304,123,340,000,000,000,000,000,000,000
7
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static unsigned long cpu_util_without(int cpu, struct task_struct *p) { struct cfs_rq *cfs_rq; unsigned int util; /* Task has no contribution or is new */ if (cpu != task_cpu(p) || !READ_ONCE(p->se.avg.last_update_time)) return cpu_util(cpu); cfs_rq = &cpu_rq(cpu)->cfs; util = READ_ONCE(cfs_rq->avg.util_avg);...
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
112,110,694,611,949,320,000,000,000,000,000,000,000
75
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
int platform_device_add_data(struct platform_device *pdev, const void *data, size_t size) { void *d = NULL; if (data) { d = kmemdup(data, size, GFP_KERNEL); if (!d) return -ENOMEM; } kfree(pdev->dev.platform_data); pdev->dev.platform_data = d; return 0; }
0
[ "CWE-362", "CWE-284" ]
linux
6265539776a0810b7ce6398c27866ddb9c6bd154
136,068,855,390,107,000,000,000,000,000,000,000,000
15
driver core: platform: fix race condition with driver_override The driver_override implementation is susceptible to race condition when different threads are reading vs storing a different driver override. Add locking to avoid race condition. Fixes: 3d713e0e382e ("driver core: platform: add device binding path 'drive...
static u32 ql_get_link_speed(struct ql3_adapter *qdev) { if (ql_is_fiber(qdev)) return SPEED_1000; else return ql_phy_get_speed(qdev); }
0
[ "CWE-401" ]
linux
1acb8f2a7a9f10543868ddd737e37424d5c36cf4
137,852,715,785,415,690,000,000,000,000,000,000,000
7
net: qlogic: Fix memory leak in ql_alloc_large_buffers In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb. This skb should be released if pci_dma_mapping_error fails. Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue...
mprint(struct magic_set *ms, struct magic *m) { uint64_t v; float vf; double vd; int64_t t = 0; char buf[128], tbuf[26]; union VALUETYPE *p = &ms->ms_value; switch (m->type) { case FILE_BYTE: v = file_signextend(ms, m, (uint64_t)p->b); switch (check_fmt(ms, m)) { case -1: return -1; case 1: ...
0
[ "CWE-399" ]
file
90018fe22ff8b74a22fcd142225b0a00f3f12677
328,209,176,411,183,740,000,000,000,000,000,000,000
273
bump recursion to 15, and allow it to be set from the command line.
int sqlite3WhereIsSorted(WhereInfo *pWInfo){ assert( pWInfo->wctrlFlags & (WHERE_GROUPBY|WHERE_DISTINCTBY) ); assert( pWInfo->wctrlFlags & WHERE_SORTBYGROUP ); return pWInfo->sorted; }
0
[ "CWE-129" ]
sqlite
effc07ec9c6e08d3bd17665f8800054770f8c643
216,559,854,207,352,250,000,000,000,000,000,000,000
5
Fix the whereKeyStats() routine (part of STAT4 processing only) so that it is able to cope with row-value comparisons against the primary key index of a WITHOUT ROWID table. [forum:/forumpost/3607259d3c|Forum post 3607259d3c]. FossilOrigin-Name: 2a6f761864a462de5c2d5bc666b82fb0b7e124a03443cd1482620dde344b34bb
TEST(DummyTest, ValueParameterizedTestsAreNotSupportedOnThisPlatform) {}
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
85,971,197,297,424,390,000,000,000,000,000,000,000
1
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static apr_status_t modsecurity_tx_cleanup(void *data) { modsec_rec *msr = (modsec_rec *)data; char *my_error_msg = NULL; if (msr == NULL) return APR_SUCCESS; /* Multipart processor cleanup. */ if (msr->mpd != NULL) multipart_cleanup(msr); /* XML processor cleanup. */ if (msr->xml...
0
[ "CWE-703", "CWE-264" ]
ModSecurity
f8d441cd25172fdfe5b613442fedfc0da3cc333d
177,836,944,392,737,700,000,000,000,000,000,000,000
26
Fix Chunked string case sensitive issue - CVE-2013-5705
asmlinkage long sys_setrlimit(unsigned int resource, struct rlimit __user *rlim) { struct rlimit new_rlim, *old_rlim; unsigned long it_prof_secs; int retval; if (resource >= RLIM_NLIMITS) return -EINVAL; if (copy_from_user(&new_rlim, rlim, sizeof(*rlim))) return -EFAULT; if (new_rlim.rlim_cur > new_rlim.rlim...
1
[ "CWE-20" ]
linux-2.6
9926e4c74300c4b31dee007298c6475d33369df0
53,303,886,230,877,640,000,000,000,000,000,000,000
63
CPU time limit patch / setrlimit(RLIMIT_CPU, 0) cheat fix As discovered here today, the change in Kernel 2.6.17 intended to inhibit users from setting RLIMIT_CPU to 0 (as that is equivalent to unlimited) by "cheating" and setting it to 1 in such a case, does not make a difference, as the check is done in the wrong pla...
void gitmodules_config_oid(const struct object_id *commit_oid) { struct strbuf rev = STRBUF_INIT; struct object_id oid; submodule_cache_check_init(the_repository); if (gitmodule_oid_from_commit(commit_oid, &oid, &rev)) { git_config_from_blob_oid(gitmodules_cb, rev.buf, &oid, the_repository); } strbuf_re...
0
[ "CWE-78" ]
git
e904deb89d9a9669a76a426182506a084d3f6308
203,580,479,893,046,040,000,000,000,000,000,000,000
15
submodule: reject submodule.update = !command in .gitmodules Since ac1fbbda2013 (submodule: do not copy unknown update mode from .gitmodules, 2013-12-02), Git has been careful to avoid copying [submodule "foo"] update = !run an arbitrary scary command from .gitmodules to a repository's local config, copying in th...
scd_genkey_cb_append_savedbytes (struct scd_genkey_parm_s *parm, const char *line) { gpg_error_t err = 0; char *p; if (!parm->savedbytes) { parm->savedbytes = xtrystrdup (line); if (!parm->savedbytes) err = gpg_error_from_syserror (); } else { ...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
29,156,433,475,251,170,000,000,000,000,000,000,000
27
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static struct iw_statistics *airo_get_wireless_stats(struct net_device *dev) { struct airo_info *local = dev->ml_priv; if (!test_bit(JOB_WSTATS, &local->jobs)) { /* Get stats out of the card if available */ if (down_trylock(&local->sem) != 0) { set_bit(JOB_WSTATS, &local->jobs); wake_up_interruptible(&loc...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
148,244,703,639,836,900,000,000,000,000,000,000,000
15
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
void elv_rqhash_reposition(struct request_queue *q, struct request *rq) { __elv_rqhash_del(rq); elv_rqhash_add(q, rq); }
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
68,174,451,606,772,270,000,000,000,000,000,000,000
5
block: free sched's request pool in blk_cleanup_queue In theory, IO scheduler belongs to request queue, and the request pool of sched tags belongs to the request queue too. However, the current tags allocation interfaces are re-used for both driver tags and sched tags, and driver tags is definitely host wide, and doe...
static void ptrace_link(struct task_struct *child, struct task_struct *new_parent) { __ptrace_link(child, new_parent, current_cred()); }
0
[ "CWE-264", "CWE-269" ]
linux
6994eefb0053799d2e07cd140df6c2ea106c41ee
30,600,149,164,045,676,000,000,000,000,000,000,000
4
ptrace: Fix ->ptracer_cred handling for PTRACE_TRACEME Fix two issues: When called for PTRACE_TRACEME, ptrace_link() would obtain an RCU reference to the parent's objective credentials, then give that pointer to get_cred(). However, the object lifetime rules for things like struct cred do not permit unconditionally ...
static inline int security_file_permission(struct file *file, int mask) { return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
336,605,257,162,704,880,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
void ndpi_set_detected_protocol(struct ndpi_detection_module_struct *ndpi_str, struct ndpi_flow_struct *flow, u_int16_t upper_detected_protocol, u_int16_t lower_detected_protocol) { struct ndpi_id_struct *src = flow->src, *dst = flow->dst; ndpi_int_change_protocol(ndpi_str, flow, up...
0
[ "CWE-416", "CWE-787" ]
nDPI
6a9f5e4f7c3fd5ddab3e6727b071904d76773952
245,910,393,210,377,000,000,000,000,000,000,000,000
20
Fixed use after free caused by dangling pointer * This fix also improved RCE Injection detection Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
static int check_chain_extensions(X509_STORE_CTX *ctx) { int i, must_be_ca, plen = 0; X509 *x; int proxy_path_length = 0; int purpose; int allow_proxy_certs; int num = sk_X509_num(ctx->chain); /*- * must_be_ca can have 1 of 3 values: * -1: we accept both CA and non-CA certificate...
1
[]
openssl
33cc5dde478ba5ad79f8fd4acd8737f0e60e236e
173,847,519,563,009,900,000,000,000,000,000,000,000
124
Compat self-signed trust with reject-only aux data When auxiliary data contains only reject entries, continue to trust self-signed objects just as when no auxiliary data is present. This makes it possible to reject specific uses without changing what's accepted (and thus overring the underlying EKU). Added new suppo...
static ssize_t show_crash_notes_size(struct device *dev, struct device_attribute *attr, char *buf) { ssize_t rc; rc = sysfs_emit(buf, "%zu\n", sizeof(note_buf_t)); return rc; }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
34,179,968,699,889,515,000,000,000,000,000,000,000
9
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 ulong stack_mask(struct x86_emulate_ctxt *ctxt) { u16 sel; struct desc_struct ss; if (ctxt->mode == X86EMUL_MODE_PROT64) return ~0UL; ctxt->ops->get_segment(ctxt, &sel, &ss, NULL, VCPU_SREG_SS); return ~0U >> ((ss.d ^ 1) * 16); /* d=0: 0xffff; d=1: 0xffffffff */ }
0
[]
kvm
d1442d85cc30ea75f7d399474ca738e0bc96f715
37,812,351,302,183,960,000,000,000,000,000,000,000
10
KVM: x86: Handle errors when RIP is set during far jumps Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not handle this case, and may result in failed vm-entry once the assignment is done. The tricky part of doing so is that loading the new CS affects the VMCS/VMCB state, so if we fail during...
int _gnutls_fips_perform_self_checks1(void) { int ret; _gnutls_switch_lib_state(LIB_STATE_SELFTEST); /* Tests the FIPS algorithms used by nettle internally. * In our case we test AES-CBC since nettle's AES is used by * the DRBG-AES. */ /* ciphers - one test per cipher */ ret = gnutls_cipher_self_test(0, G...
0
[ "CWE-20" ]
gnutls
b0a3048e56611a2deee4976aeba3b8c0740655a6
216,975,220,373,617,420,000,000,000,000,000,000,000
26
env: use secure_getenv when reading environment variables
static int local_open2(FsContext *fs_ctx, V9fsPath *dir_path, const char *name, int flags, FsCred *credp, V9fsFidOpenState *fs) { int fd = -1; int err = -1; int dirfd; if (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE && local_is_mapped_file_metadata(fs_ctx, name)) { ...
0
[ "CWE-732" ]
qemu
7a95434e0ca8a037fd8aa1a2e2461f92585eb77b
264,106,448,632,724,300,000,000,000,000,000,000,000
63
9pfs: local: forbid client access to metadata (CVE-2017-7493) When using the mapped-file security mode, we shouldn't let the client mess with the metadata. The current code already tries to hide the metadata dir from the client by skipping it in local_readdir(). But the client can still access or modify it through sev...
static int rsa_cms_encrypt(CMS_RecipientInfo *ri) { const EVP_MD *md, *mgf1md; RSA_OAEP_PARAMS *oaep = NULL; ASN1_STRING *os = NULL; X509_ALGOR *alg; EVP_PKEY_CTX *pkctx = CMS_RecipientInfo_get0_pkey_ctx(ri); int pad_mode = RSA_PKCS1_PADDING, rv = 0, labellen; unsigned char *label; CMS_R...
0
[]
openssl
4b22cce3812052fe64fc3f6d58d8cc884e3cb834
194,698,642,976,602,600,000,000,000,000,000,000,000
62
Reject invalid PSS parameters. Fix a bug where invalid PSS parameters are not rejected resulting in a NULL pointer exception. This can be triggered during certificate verification so could be a DoS attack against a client or a server enabling client authentication. Thanks to Brian Carpenter for reporting this issues....
static struct sg_table *mbochs_map_dmabuf(struct dma_buf_attachment *at, enum dma_data_direction direction) { struct mbochs_dmabuf *dmabuf = at->dmabuf->priv; struct device *dev = mdev_dev(dmabuf->mdev_state->mdev); struct sg_table *sg; dev_dbg(dev, "%s: %d\n", __func__, dmabuf->id); sg = kzalloc(sizeof(*...
0
[ "CWE-200", "CWE-401" ]
linux
de5494af4815a4c9328536c72741229b7de88e7f
280,207,694,817,950,000,000,000,000,000,000,000,000
27
vfio/mbochs: Fix missing error unwind of mbochs_used_mbytes Convert mbochs to use an atomic scheme for this like mtty was changed into. The atomic fixes various race conditions with probing. Add the missing error unwind. Also add the missing kfree of mdev_state->pages. Fixes: 681c1615f891 ("vfio/mbochs: Convert to us...
static UINT cliprdr_send_response_filecontents(wfClipboard* clipboard, UINT32 streamId, UINT32 size, BYTE* data) { CLIPRDR_FILE_CONTENTS_RESPONSE fileContentsResponse; if (!clipboard || !clipboard->context || !clipboard->context->ClientFileContentsResponse) return ERR...
0
[ "CWE-20" ]
FreeRDP
0d79670a28c0ab049af08613621aa0c267f977e9
228,860,249,609,032,230,000,000,000,000,000,000,000
15
Fixed missing input checks for file contents request reported by Valentino Ricotta (Thalium)
TEST_P(MessengerTest, MessageTest) { FakeDispatcher cli_dispatcher(false), srv_dispatcher(true); entity_addr_t bind_addr; bind_addr.parse("127.0.0.1"); Messenger::Policy p = Messenger::Policy::stateful_server(0); server_msgr->set_policy(entity_name_t::TYPE_CLIENT, p); p = Messenger::Policy::lossless_peer(0)...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
98,497,378,702,122,980,000,000,000,000,000,000,000
61
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static int ext4_journalled_write_end(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned copied, struct page *page, void *fsdata) { handle_t *handle = ext4_journal_current_handle(); struct inode *inode = mapping->host; int ret = 0, ret2; int partial = 0; unsigned from, ...
0
[ "CWE-399" ]
linux-2.6
06a279d636734da32bb62dd2f7b0ade666f65d7c
70,360,055,501,839,720,000,000,000,000,000,000,000
48
ext4: only use i_size_high for regular files Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intenti...
static GF_Err gf_m4v_parse_frame_mpeg12(GF_M4VParser *m4v, GF_M4VDecSpecInfo dsi, u8 *frame_type, u32 *time_inc, u64 *size, u64 *start, Bool *is_coded) { u8 go, hasVOP, firstObj, val; s32 o_type; if (!m4v || !size || !start || !frame_type) return GF_BAD_PARAM; *size = 0; firstObj = 1; hasVOP = 0; *is_coded = G...
0
[ "CWE-119", "CWE-787" ]
gpac
90dc7f853d31b0a4e9441cba97feccf36d8b69a4
292,805,870,820,702,600,000,000,000,000,000,000,000
69
fix some exploitable overflows (#994, #997)
static int cdrom_do_read_audio(unsigned int fd, unsigned int cmd, unsigned long arg) { struct cdrom_read_audio __user *cdread_audio; struct cdrom_read_audio32 __user *cdread_audio32; __u32 data; void __user *datap; cdread_audio = compat_alloc_user_space(sizeof(*cdread_audio)); cdread_audio32 = compat_ptr(arg); ...
0
[]
linux-2.6
188f83dfe0eeecd1427d0d255cc97dbf7ef6b4b7
215,115,475,429,266,400,000,000,000,000,000,000,000
24
[PATCH] BLOCK: Move the msdos device ioctl compat stuff to the msdos driver [try #6] Move the msdos device ioctl compat stuff from fs/compat_ioctl.c to the msdos driver so that the msdos header file doesn't need to be included. Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel...
int tty_alloc_file(struct file *file) { struct tty_file_private *priv; priv = kmalloc(sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; file->private_data = priv; return 0; }
0
[ "CWE-200", "CWE-362" ]
linux
5c17c861a357e9458001f021a7afa7aab9937439
141,738,029,118,681,770,000,000,000,000,000,000,000
12
tty: Fix unsafe ldisc reference via ioctl(TIOCGETD) ioctl(TIOCGETD) retrieves the line discipline id directly from the ldisc because the line discipline id (c_line) in termios is untrustworthy; userspace may have set termios via ioctl(TCSETS*) without actually changing the line discipline via ioctl(TIOCSETD). However...
void ProcessorGenerator::generate_factory() { string if_factory_name = if_name_ + "Factory"; // Generate the factory class definition f_header_ << template_header_ << "class " << factory_class_name_ << " : public ::apache::thrift::" << (style_ == "Cob" ? "async::TAsyncProcessorFactory" : "TProcessorF...
0
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
316,123,134,207,507,240,000,000,000,000,000,000,000
49
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
static zend_always_inline int add_function_fast(zval *result, zval *op1, zval *op2) /* {{{ */ { zend_uchar type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2)); if (EXPECTED(type_pair == TYPE_PAIR(IS_LONG, IS_LONG))) { fast_long_add_function(result, op1, op2); return SUCCESS; } else if (EXPECTED(type_pair == TYP...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
191,647,600,367,220,320,000,000,000,000,000,000,000
23
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
std::size_t IOBuf::computeChainCapacity() const { std::size_t fullCapacity = capacity_; for (IOBuf* current = next_; current != this; current = current->next_) { fullCapacity += current->capacity_; } return fullCapacity; }
0
[ "CWE-787" ]
folly
4f304af1411e68851bdd00ef6140e9de4616f7d3
314,405,510,243,818,650,000,000,000,000,000,000,000
7
[folly] Add additional overflow checks to IOBuf - CVE-2021-24036 Summary: As per title CVE-2021-24036 Reviewed By: jan Differential Revision: D27938605 fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c
NOEXPORT void engine_reset_list(void) { current_engine=-1; engine_initialized=1; }
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
272,692,144,686,464,770,000,000,000,000,000,000,000
4
stunnel-5.57
static struct vxlan_dev *vxlan_find_vni(struct net *net, int ifindex, __be32 vni, sa_family_t family, __be16 port, u32 flags) { struct vxlan_sock *vs; vs = vxlan_find_sock(net, family, port, flags, ifindex); if (!vs) return NULL; return vxlan_vs_find_vni(vs, ifindex, vni); }
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
332,494,504,153,583,880,000,000,000,000,000,000,000
12
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...
ip_vs_svc_hashkey(struct net *net, int af, unsigned int proto, const union nf_inet_addr *addr, __be16 port) { register unsigned int porth = ntohs(port); __be32 addr_fold = addr->ip; #ifdef CONFIG_IP_VS_IPV6 if (af == AF_INET6) addr_fold = addr->ip6[0]^addr->ip6[1]^ addr->ip6[2]^addr->ip6[3]; #endif ad...
0
[ "CWE-200" ]
linux
2d8a041b7bfe1097af21441cb77d6af95f4f4680
272,366,024,544,219,800,000,000,000,000,000,000,000
16
ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT) If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is not set, __ip_vs_get_timeouts() does not fully initialize the structure that gets copied to userland and that for leaks up to 12 bytes of kernel stack. Add an explicit memset(0) before passing...
string_copy_malloc(const uschar *s) { int len = Ustrlen(s) + 1; uschar *ss = store_malloc(len); memcpy(ss, s, len); return ss; }
0
[ "CWE-264" ]
exim
43ba2742c700d625dcdcdaf7bbadc2f72776854a
25,135,610,146,277,190,000,000,000,000,000,000,000
7
Fix CVE-2016-1531 Add keep_environment, add_environment. Change the working directory to "/" during the early startup phase. (cherry picked from commit bc3c7bb7d4aba3e563434e5627fe1f2176aa18c0) (cherry picked from commit 2b92b67bfc33efe05e6ff2ea3852731ac2273832) (cherry picked from commit 14b82c8b736c8ed24eda...
_dopr(char **sbuffer, char **buffer, size_t *maxlen, size_t *retlen, int *truncated, const char *format, va_list args) { char ch; LLONG value; LDOUBLE fvalue; char *strvalue; int min; int max; int state; int flags; int cflags; size_t currlen; state = DP_S_D...
1
[ "CWE-119" ]
openssl
578b956fe741bf8e84055547b1e83c28dd902c73
274,159,064,307,491,950,000,000,000,000,000,000,000
256
Fix memory issues in BIO_*printf functions The internal |fmtstr| function used in processing a "%s" format string in the BIO_*printf functions could overflow while calculating the length of a string and cause an OOB read when printing very long strings. Additionally the internal |doapr_outch| function can attempt to ...
mrb_gc_arena_shrink(mrb_state *mrb, int idx) { mrb_gc *gc = &mrb->gc; int capa = gc->arena_capa; if (idx < capa / 4) { capa >>= 2; if (capa < MRB_GC_ARENA_SIZE) { capa = MRB_GC_ARENA_SIZE; } if (capa != gc->arena_capa) { gc->arena = (struct RBasic**)mrb_realloc(mrb, gc->arena, sizeof(...
0
[ "CWE-416", "CWE-190" ]
mruby
1905091634a6a2925c911484434448e568330626
276,248,041,742,900,560,000,000,000,000,000,000,000
16
Check length of env stack before accessing upvar; fix #3995
kssl_krb5_auth_con_init(krb5_context CO, krb5_auth_context * pACO) { if (!krb5_loaded) load_krb5_dll(); if ( p_krb5_auth_con_init ) return(p_krb5_auth_con_init(CO,pACO)); else return KRB5KRB_ERR_GENERIC; }
0
[ "CWE-20" ]
openssl
cca1cd9a3447dd067503e4a85ebd1679ee78a48e
68,125,200,790,391,020,000,000,000,000,000,000,000
11
Submitted by: Tomas Hoger <thoger@redhat.com> Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL could be crashed if the relevant tables were not present (e.g. chrooted).
static int open_ioctl_fd(int dev_autofs_fd, const char *where, dev_t devid) { struct autofs_dev_ioctl *param; size_t l; assert(dev_autofs_fd >= 0); assert(where); l = sizeof(struct autofs_dev_ioctl) + strlen(where) + 1; param = alloca(l); init_autofs_dev_ioctl(...
0
[ "CWE-362" ]
systemd
e7d54bf58789545a9eb0b3964233defa0b007318
150,837,848,537,753,300,000,000,000,000,000,000,000
25
automount: ack automount requests even when already mounted (#5916) If a process accesses an autofs filesystem while systemd is in the middle of starting the mount unit on top of it, it is possible for the autofs_ptype_missing_direct request from the kernel to be received after the mount unit has been fully started...
ConnectClientToTcpAddr6(const char *hostname, int port) { rfbSocket sock = ConnectClientToTcpAddr6WithTimeout(hostname, port, DEFAULT_CONNECT_TIMEOUT); /* put socket back into blocking mode for compatibility reasons */ if (sock != RFB_INVALID_SOCKET) { SetBlocking(sock); } return sock; }
0
[ "CWE-703", "CWE-835" ]
libvncserver
57433015f856cc12753378254ce4f1c78f5d9c7b
68,807,498,100,019,360,000,000,000,000,000,000,000
9
libvncclient: handle half-open TCP connections When a connection is not reset properly at the TCP level (e.g. sudden power loss or process crash) the TCP connection becomes half-open and read() always returns -1 with errno = EAGAIN while select() always returns 0. This leads to an infinite loop and can be fixed by clo...
longlong Item_func_between::val_int_cmp_native() { THD *thd= current_thd; const Type_handler *h= m_comparator.type_handler(); NativeBuffer<STRING_BUFFER_USUAL_SIZE> value, a, b; if (val_native_with_conversion_from_item(thd, args[0], &value, h)) return 0; bool ra= args[1]->val_native_with_conversion(thd, &...
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
298,190,619,645,971,500,000,000,000,000,000,000,000
21
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
static void cgm_dbus_disconnect(void) { if (cgroup_manager) { dbus_connection_flush(cgroup_manager->connection); dbus_connection_close(cgroup_manager->connection); nih_free(cgroup_manager); } cgroup_manager = NULL; cgm_unlock(); }
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
202,081,379,628,047,040,000,000,000,000,000,000,000
10
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
static u32 __bpf_skb_min_len(const struct sk_buff *skb) { u32 min_len = skb_network_offset(skb); if (skb_transport_header_was_set(skb)) min_len = skb_transport_offset(skb); if (skb->ip_summed == CHECKSUM_PARTIAL) min_len = skb_checksum_start_offset(skb) + skb->csum_offset + sizeof(__sum16); return min_len...
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
179,975,060,459,959,740,000,000,000,000,000,000,000
11
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
CImg<T>& YCbCrtoRGB() { if (_spectrum!=3) throw CImgInstanceException(_cimg_instance "YCbCrtoRGB(): Instance is not a YCbCr image.", cimg_instance); T *p1 = data(0,0,0,0), *p2 = data(0,0,0,1), *p3 = data(0,0,0,2); con...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
60,699,045,318,645,850,000,000,000,000,000,000,000
23
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void gen_ldst_modrm(CPUX86State *env, DisasContext *s, int modrm, TCGMemOp ot, int reg, int is_store) { int mod, rm; mod = (modrm >> 6) & 3; rm = (modrm & 7) | REX_B(s); if (mod == 3) { if (is_store) { if (reg != OR_TMP0) gen_op_mov_...
0
[ "CWE-94" ]
qemu
30663fd26c0307e414622c7a8607fbc04f92ec14
298,207,457,209,337,800,000,000,000,000,000,000,000
30
tcg/i386: Check the size of instruction being translated This fixes the bug: 'user-to-root privesc inside VM via bad translation caching' reported by Jann Horn here: https://bugs.chromium.org/p/project-zero/issues/detail?id=1122 Reviewed-by: Richard Henderson <rth@twiddle.net> CC: Peter Maydell <peter.maydell@linaro....
void Statement::Work_Each(napi_env e, void* data) { STATEMENT_INIT(EachBaton); Async* async = baton->async; STATEMENT_MUTEX(mtx); int retrieved = 0; // Make sure that we also reset when there are no parameters. if (!baton->parameters.size()) { sqlite3_reset(stmt->_handle); } ...
0
[]
node-sqlite3
593c9d498be2510d286349134537e3bf89401c4a
161,110,131,708,858,900,000,000,000,000,000,000,000
42
bug: fix segfault of invalid toString() object (#1450) * bug: verify toString() returns valid data * test: faulty toString test
void ovs_unlock(void) { mutex_unlock(&ovs_mutex); }
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
331,528,534,756,658,840,000,000,000,000,000,000,000
4
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
sg_proc_init(void) { struct proc_dir_entry *p; p = proc_mkdir("scsi/sg", NULL); if (!p) return 1; proc_create("allow_dio", S_IRUGO | S_IWUSR, p, &adio_fops); proc_create_seq("debug", S_IRUGO, p, &debug_seq_ops); proc_create("def_reserved_size", S_IRUGO | S_IWUSR, p, &dressz_fops); proc_create_single("device_...
0
[ "CWE-732" ]
linux
26b5b874aff5659a7e26e5b1997e3df2c41fa7fd
220,833,505,219,228,900,000,000,000,000,000,000,000
17
scsi: sg: mitigate read/write abuse As Al Viro noted in commit 128394eff343 ("sg_write()/bsg_write() is not fit to be called under KERNEL_DS"), sg improperly accesses userspace memory outside the provided buffer, permitting kernel memory corruption via splice(). But it doesn't just do it on ->write(), also on ->read(...
static struct file *path_openat(struct nameidata *nd, const struct open_flags *op, unsigned flags) { struct file *file; int error; file = alloc_empty_file(op->open_flag, current_cred()); if (IS_ERR(file)) return file; if (unlikely(file->f_flags & __O_TMPFILE)) { error = do_tmpfile(nd, flags, op, file); }...
0
[ "CWE-416", "CWE-284" ]
linux
d0cb50185ae942b03c4327be322055d622dc79f6
95,938,511,353,486,860,000,000,000,000,000,000,000
38
do_last(): fetch directory ->i_mode and ->i_uid before it's too late may_create_in_sticky() call is done when we already have dropped the reference to dir. Fixes: 30aba6656f61e (namei: allow restricted O_CREAT of FIFOs and regular files) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
bool use_tcp_for_dns_lookups() const override { return true; }
0
[ "CWE-400" ]
envoy
542f84c66e9f6479bc31c6f53157c60472b25240
338,981,457,421,061,880,000,000,000,000,000,000,000
1
overload: Runtime configurable global connection limits (#147) Signed-off-by: Tony Allen <tony@allen.gg>
int btrfs_rm_device(struct btrfs_fs_info *fs_info, const char *device_path, u64 devid) { struct btrfs_device *device; struct btrfs_fs_devices *cur_devices; struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; u64 num_devices; int ret = 0; mutex_lock(&uuid_mutex); num_devices = btrfs_num_devices(fs_...
0
[ "CWE-476", "CWE-703" ]
linux
e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091
91,631,074,894,954,280,000,000,000,000,000,000,000
148
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 /...
execreg_line_continuation(char_u **lines, long *idx) { garray_T ga; long i = *idx; char_u *p; int cmd_start; int cmd_end = i; int j; char_u *str; ga_init2(&ga, sizeof(char_u), 400); // search backwards to find the first line of this command. // Any line not starting with \ o...
0
[ "CWE-122", "CWE-787" ]
vim
d25f003342aca9889067f2e839963dfeccf1fe05
164,960,516,692,482,600,000,000,000,000,000,000,000
49
patch 9.0.0011: reading beyond the end of the line with put command Problem: Reading beyond the end of the line with put command. Solution: Adjust the end mark position.
unquoted_glob_pattern_p (string) register char *string; { register int c; char *send; int open, bsquote; DECLARE_MBSTATE; open = bsquote = 0; send = string + strlen (string); while (c = *string++) { switch (c) { case '?': case '*': return (1); case '[': open++; continue; ...
1
[ "CWE-273", "CWE-787" ]
bash
951bdaad7a18cc0dc1036bba86b18b90874d39ff
75,881,117,753,756,810,000,000,000,000,000,000,000
67
commit bash-20190628 snapshot
ssize_t qemu_net_queue_send_iov(NetQueue *queue, NetClientState *sender, unsigned flags, const struct iovec *iov, int iovcnt, NetPacketSent *sent_cb) { ssiz...
0
[ "CWE-835" ]
qemu
705df5466c98f3efdd2b68d3b31dad86858acad7
218,316,478,977,208,600,000,000,000,000,000,000,000
24
net: introduce qemu_receive_packet() Some NIC supports loopback mode and this is done by calling nc->info->receive() directly which in fact suppresses the effort of reentrancy check that is done in qemu_net_queue_send(). Unfortunately we can't use qemu_net_queue_send() here since for loopback there's no sender as pee...
void kvm_apic_send_ipi(struct kvm_lapic *apic, u32 icr_low, u32 icr_high) { struct kvm_lapic_irq irq; /* KVM has no delay and should always clear the BUSY/PENDING flag. */ WARN_ON_ONCE(icr_low & APIC_ICR_BUSY); irq.vector = icr_low & APIC_VECTOR_MASK; irq.delivery_mode = icr_low & APIC_MODE_MASK; irq.dest_mode ...
0
[ "CWE-476" ]
linux
00b5f37189d24ac3ed46cb7f11742094778c46ce
154,355,674,829,967,120,000,000,000,000,000,000,000
23
KVM: x86: Avoid theoretical NULL pointer dereference in kvm_irq_delivery_to_apic_fast() When kvm_irq_delivery_to_apic_fast() is called with APIC_DEST_SELF shorthand, 'src' must not be NULL. Crash the VM with KVM_BUG_ON() instead of crashing the host. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <...
static void numa_migrate_preferred(struct task_struct *p) { unsigned long interval = HZ; /* This task has no NUMA fault statistics yet */ if (unlikely(p->numa_preferred_nid == -1 || !p->numa_faults)) return; /* Periodically retry migrating the task to the preferred node */ interval = min(interval, msecs_to_jif...
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
303,663,088,104,303,000,000,000,000,000,000,000,000
19
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
static int io_buffers_map_alloc(struct io_ring_ctx *ctx, unsigned int nr_args) { ctx->user_bufs = kcalloc(nr_args, sizeof(*ctx->user_bufs), GFP_KERNEL); return ctx->user_bufs ? 0 : -ENOMEM;
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
287,419,555,976,958,150,000,000,000,000,000,000,000
5
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
void* Init(TfLiteContext* context, const char* buffer, size_t length) { auto* op_data = new OpData(); context->AddTensors(context, kNumTemporaryTensors, &op_data->scratch_tensor_index); return op_data; }
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
49,549,314,285,151,100,000,000,000,000,000,000,000
6
[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...
bashline_set_event_hook () { rl_signal_event_hook = bash_event_hook; }
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
122,605,320,292,406,100,000,000,000,000,000,000,000
4
Bash-4.4 patch 7
struct device *device_create(struct class *class, struct device *parent, dev_t devt, void *drvdata, const char *fmt, ...) { va_list vargs; struct device *dev; va_start(vargs, fmt); dev = device_create_groups_vargs(class, parent, devt, drvdata, NULL, fmt, vargs); va_end(vargs); return dev; }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
256,371,193,353,715,170,000,000,000,000,000,000,000
12
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...
int lxc_attach(const char* name, const char* lxcpath, lxc_attach_exec_t exec_function, void* exec_payload, lxc_attach_options_t* options, pid_t* attached_process) { int ret, status; pid_t init_pid, pid, attached_pid, expected; struct lxc_proc_context_info *init_ctx; char* cwd; char* new_cwd; int ipc_sockets[2]; ...
0
[ "CWE-17" ]
lxc
5c3fcae78b63ac9dd56e36075903921bd9461f9e
150,718,179,593,518,660,000,000,000,000,000,000,000
288
CVE-2015-1334: Don't use the container's /proc during attach A user could otherwise over-mount /proc and prevent the apparmor profile or selinux label from being written which combined with a modified /bin/sh or other commonly used binary would lead to unconfined code execution. Reported-by: Roman Fiedler Signed-off-...
static const char* format(const bool val) { static const char* s[] = { "false", "true" }; return s[val?1:0]; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
208,449,302,277,833,680,000,000,000,000,000,000,000
1
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
bool Item_func_case::time_op(THD *thd, MYSQL_TIME *ltime) { DBUG_ASSERT(fixed == 1); Item *item= find_item(); if (!item) return (null_value= true); return (null_value= Time(thd, item).copy_to_mysql_time(ltime)); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
72,999,480,265,802,610,000,000,000,000,000,000,000
8
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
SanitizeMsg(smsg_t *pMsg) { DEFiRet; uchar *pszMsg; uchar *pDst; /* destination for copy job */ size_t lenMsg; size_t iSrc; size_t iDst; size_t iMaxLine; size_t maxDest; uchar pc; sbool bUpdatedLen = RSFALSE; uchar szSanBuf[32*1024]; /* buffer used for sanitizing a string */ assert(pMsg != NULL); assert(p...
0
[]
rsyslog
20f8237870eb5e971fa068e4dd4d296f1dbef329
143,084,036,208,225,460,000,000,000,000,000,000,000
191
core: fix potential misadressing in parser message sanitizer misadressing could happen when an oversize message made it to the sanitizer AND contained a control character in the oversize part of the message. Note that it is an error in itself that such an oversize message enters the system, but we harden the sanitizer...
static void Dispatch_dealloc(DispatchObject *self) { Py_DECREF(self->log); PyObject_Del(self); }
0
[ "CWE-264" ]
mod_wsgi
d9d5fea585b23991f76532a9b07de7fcd3b649f4
8,397,079,141,024,172,000,000,000,000,000,000,000
6
Local privilege escalation when using daemon mode. (CVE-2014-0240)
void Inspect::operator()(At_Root_Query_Ptr ae) { if (ae->feature()) { append_string("("); ae->feature()->perform(this); if (ae->value()) { append_colon_separator(); ae->value()->perform(this); } append_string(")"); } }
0
[ "CWE-476" ]
libsass
38f4c3699d06b64128bebc7cf1e8b3125be74dc4
207,231,566,362,840,160,000,000,000,000,000,000,000
12
Fix possible bug with handling empty reference combinators Fixes #2665
static int snd_seq_open(struct inode *inode, struct file *file) { int c, mode; /* client id */ struct snd_seq_client *client; struct snd_seq_user_client *user; int err; err = nonseekable_open(inode, file); if (err < 0) return err; if (mutex_lock_interruptible(&register_mutex)) return -ERESTARTSYS; clien...
0
[ "CWE-703" ]
linux
030e2c78d3a91dd0d27fef37e91950dde333eba1
95,257,782,701,770,340,000,000,000,000,000,000,000
56
ALSA: seq: Fix missing NULL check at remove_events ioctl snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear() unconditionally even if there is no FIFO assigned, and this leads to an Oops due to NULL dereference. The fix is just to add a proper NULL check. Reported-by: Dmitry Vyukov <dvyukov@google.com> Tested-by...
ar6000_open(struct net_device *dev) { unsigned long flags; struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); spin_lock_irqsave(&ar->arLock, flags); if(ar->arWlanState == WLAN_DISABLED) { ar->arWlanState = WLAN_ENABLED; } if( ar->arConnected || bypasswmi) { netif_c...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
39,057,758,480,960,036,000,000,000,000,000,000,000
22
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
char *reds_get_video_codec_fullname(RedVideoCodec *codec) { int i; const char *encoder_name = NULL; const char *codec_name = get_index_name(video_codec_names, codec->type); spice_assert(codec_name); for (i = 0; i < G_N_ELEMENTS(video_encoder_procs); i++) { if (video_encoder_procs[i] == cod...
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
280,108,425,739,174,460,000,000,000,000,000,000,000
18
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
static bool init_hdr(struct MACH0_(obj_t) * bin) { ut8 magicbytes[4] = { 0 }; ut8 machohdrbytes[sizeof(struct MACH0_(mach_header))] = { 0 }; int len; if (rz_buf_read_at(bin->b, 0 + bin->options.header_at, magicbytes, 4) < 1) { return false; } if (rz_read_le32(magicbytes) == 0xfeedface) { bin->big_endian = fa...
0
[ "CWE-787" ]
rizin
348b1447d1452f978b69631d6de5b08dd3bdf79d
229,643,782,285,103,680,000,000,000,000,000,000,000
42
fix #2956 - oob write in mach0.c
virtual ~select_result_sink() {};
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
67,199,771,312,967,670,000,000,000,000,000,000,000
1
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...
static void network_init(void) { #ifdef HAVE_SYS_UN_H struct sockaddr_un UNIXaddr; int arg; #endif DBUG_ENTER("network_init"); if (MYSQL_CALLBACK_ELSE(thread_scheduler, init, (), 0)) unireg_abort(1); /* purecov: inspected */ set_ports(); if (report_port == 0) { report_port= mysqld_port; } #...
0
[ "CWE-362" ]
server
347eeefbfc658c8531878218487d729f4e020805
29,213,780,633,487,140,000,000,000,000,000,000,000
114
don't use my_copystat in the server it was supposed to be used in command-line tools only. Different fix for 4e5473862e: Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
static int fts3DoclistCountDocids(char *aList, int nList){ int nDoc = 0; /* Return value */ if( aList ){ char *aEnd = &aList[nList]; /* Pointer to one byte after EOF */ char *p = aList; /* Cursor */ while( p<aEnd ){ nDoc++; while( (*p++)&0x80 ); /* Skip d...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
226,516,934,195,736,000,000,000,000,000,000,000,000
14
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
static void tcp_v4_send_ack(struct net *net, struct sk_buff *skb, u32 seq, u32 ack, u32 win, u32 tsval, u32 tsecr, int oif, struct tcp_md5sig_key *key, int reply_flags, u8 tos) { const struct tcphdr *th = tcp_hdr(skb); struct { struct tcphdr th; __be32 opt[(TCPOLEN_TSTAMP_ALIGNED >> 2)...
0
[ "CWE-284" ]
linux
ac6e780070e30e4c35bd395acfe9191e6268bdd3
130,420,655,186,938,430,000,000,000,000,000,000,000
73
tcp: take care of truncations done by sk_filter() With syzkaller help, Marco Grassi found a bug in TCP stack, crashing in tcp_collapse() Root cause is that sk_filter() can truncate the incoming skb, but TCP stack was not really expecting this to happen. It probably was expecting a simple DROP or ACCEPT behavior. We ...
int unit_add_name(Unit *u, const char *text) { _cleanup_free_ char *s = NULL, *i = NULL; UnitType t; int r; assert(u); assert(text); if (unit_name_is_valid(text, UNIT_NAME_TEMPLATE)) { if (!u->instance) return -EINVAL; ...
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
109,681,905,590,972,730,000,000,000,000,000,000,000
82
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...
void AbstractSqlMigrator::newQuery(const QString &query, QSqlDatabase db) { Q_ASSERT(!_query); _query = new QSqlQuery(db); _query->prepare(query); }
0
[ "CWE-89" ]
quassel
aa1008be162cb27da938cce93ba533f54d228869
280,465,512,266,366,930,000,000,000,000,000,000,000
6
Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL. Properly detects whether Qt performs slash escaping in SQL queries or not, and then configures PostgreSQL accordingly. This bug was a introduced due to a bugfix in Qt 4.8.5 disables slash escaping when binding queries: https://bugreports.qt-project.org/brows...
static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception) { BMPInfo bmp_info; Image *image; MagickBooleanType status; MagickOffsetType offset, start_position; MemoryInfo *pixel_info; Quantum index; register Quantum *q; register ssize_t i,...
0
[ "CWE-835" ]
ImageMagick
948f1c86d649a29df08a38d2ff8b91cdf3e92b82
122,659,065,606,648,580,000,000,000,000,000,000,000
968
https://github.com/ImageMagick/ImageMagick/issues/1337
static int __init init_nfs_fs(void) { int err; err = nfsiod_start(); if (err) goto out6; err = nfs_fs_proc_init(); if (err) goto out5; err = nfs_init_nfspagecache(); if (err) goto out4; err = nfs_init_inodecache(); if (err) goto out3; err = nfs_init_readpagecache(); if (err) goto out2; err =...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
297,965,077,381,307,830,000,000,000,000,000,000,000
58
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static void copy_picture_range(Picture **to, Picture **from, int count, H264Context *new_base, H264Context *old_base) { int i; for (i = 0; i < count; i++) { assert((IN_RANGE(from[i], old_base, sizeof(*old_base)) || IN_RANGE(f...
0
[ "CWE-703" ]
FFmpeg
29ffeef5e73b8f41ff3a3f2242d356759c66f91f
186,748,207,401,475,500,000,000,000,000,000,000,000
14
avcodec/h264: do not trust last_pic_droppable when marking pictures as done This simplifies the code and fixes a deadlock Fixes Ticket2927 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val) { VGACommonState *s = opaque; if (s->vbe_index <= VBE_DISPI_INDEX_NB) { #ifdef DEBUG_BOCHS_VBE printf("VBE: write index=0x%x val=0x%x\n", s->vbe_index, val); #endif switch(s->vbe_index) { case VBE_DISPI_INDEX_ID: ...
1
[ "CWE-200" ]
qemu
c1b886c45dc70f247300f549dce9833f3fa2def5
145,660,518,626,989,730,000,000,000,000,000,000,000
151
vbe: rework sanity checks Plug a bunch of holes in the bochs dispi interface parameter checking. Add a function doing verification on all registers. Call that unconditionally on every register write. That way we should catch everything, even changing one register affecting the valid range of another register. Some ...
run_shell (char const *shell, char const *command, char **additional_args, size_t n_additional_args) { size_t n_args = 1 + fast_startup + 2 * !!command + n_additional_args + 1; char const **args = xcalloc (n_args, sizeof *args); size_t argno = 1; if (simulate_login) { char *arg0; char *shel...
0
[ "CWE-362" ]
util-linux
dffab154d29a288aa171ff50263ecc8f2e14a891
37,586,294,325,930,510,000,000,000,000,000,000,000
37
su: properly clear child PID Reported-by: Tobias Stöckmann <tobias@stoeckmann.org> Signed-off-by: Karel Zak <kzak@redhat.com>
~Item_result_field() {} /* Required with gcc 2.95 */
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
291,418,928,433,465,740,000,000,000,000,000,000,000
1
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...
tty_clear_pane_area(struct tty *tty, const struct tty_ctx *ctx, u_int py, u_int ny, u_int px, u_int nx, u_int bg) { u_int i, j, x, y, rx, ry; if (tty_clamp_area(tty, ctx, px, py, nx, ny, &i, &j, &x, &y, &rx, &ry)) tty_clear_area(tty, ctx->wp, y, ry, x, rx, bg); }
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
273,741,185,888,710,630,000,000,000,000,000,000,000
8
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
static int handle_gid_request(struct ipa_extdom_ctx *ctx, enum request_types request_type, gid_t gid, const char *domain_name, struct berval **berval) { int ret; struct group grp; char *sid_str = NULL; enum sss_id_type id_type; size_t buf_l...
0
[ "CWE-19" ]
freeipa
c15a407cbfaed163a933ab137eed16387efe25d2
51,645,335,156,515,110,000,000,000,000,000,000,000
66
extdom: make nss buffer configurable The get*_r_wrapper() calls expect a maximum buffer size to avoid memory shortage if too many threads try to allocate buffers e.g. for large groups. With this patch this size can be configured by setting ipaExtdomMaxNssBufSize in the plugin config object cn=ipa_extdom_extop,cn=plugi...
SYSCALL_DEFINE2(rt_sigpending, sigset_t __user *, uset, size_t, sigsetsize) { sigset_t set; if (sigsetsize > sizeof(*uset)) return -EINVAL; do_sigpending(&set); if (copy_to_user(uset, &set, sigsetsize)) return -EFAULT; return 0; }
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
120,647,158,349,166,860,000,000,000,000,000,000,000
14
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
static void dummy_dev_destroy(void *a) { }
0
[ "CWE-20" ]
evince
d4139205b010ed06310d14284e63114e88ec6de2
284,446,406,284,592,150,000,000,000,000,000,000,000
3
backends: Fix several security issues in the dvi-backend. See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643.
static void vmx_set_idt(struct kvm_vcpu *vcpu, struct descriptor_table *dt) { vmcs_write32(GUEST_IDTR_LIMIT, dt->limit); vmcs_writel(GUEST_IDTR_BASE, dt->base); }
0
[ "CWE-20" ]
linux-2.6
16175a796d061833aacfbd9672235f2d2725df65
295,803,626,261,427,470,000,000,000,000,000,000,000
5
KVM: VMX: Don't allow uninhibited access to EFER on i386 vmx_set_msr() does not allow i386 guests to touch EFER, but they can still do so through the default: label in the switch. If they set EFER_LME, they can oops the host. Fix by having EFER access through the normal channel (which will check for EFER_LME) even o...
parse_exp(Node** np, OnigToken* tok, int term, UChar** src, UChar* end, ScanEnv* env) { int r, len, group = 0; Node* qn; Node** targetp; *np = NULL; if (tok->type == (enum TokenSyms )term) goto end_of_token; switch (tok->type) { case TK_ALT: case TK_EOT: end_of_token: *np = node_new_...
0
[ "CWE-476" ]
oniguruma
850bd9b0d8186eb1637722b46b12656814ab4ad2
322,183,210,684,891,650,000,000,000,000,000,000,000
365
fix #87: Read unknown address in onig_error_code_to_str()
static ssize_t fail_data_source_read_callback(nghttp2_session *session, int32_t stream_id, uint8_t *buf, size_t len, uint32_t *data_flags, nghttp2_data_source *source, ...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
283,824,870,274,169,700,000,000,000,000,000,000,000
15
Add nghttp2_option_set_max_outbound_ack
struct kvm *kvm_arch_create_vm(void) { struct kvm *kvm = kzalloc(sizeof(struct kvm), GFP_KERNEL); if (!kvm) return ERR_PTR(-ENOMEM); INIT_LIST_HEAD(&kvm->arch.active_mmu_pages); INIT_LIST_HEAD(&kvm->arch.assigned_dev_head); /* Reserve bit 0 of irq_sources_bitmap for userspace irq source */ set_bit(KVM_USERS...
0
[ "CWE-476" ]
linux-2.6
59839dfff5eabca01cc4e20b45797a60a80af8cb
174,067,283,288,197,370,000,000,000,000,000,000,000
17
KVM: x86: check for cr3 validity in ioctl_set_sregs Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity checking for the new cr3 value: "Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to the kernel. This will trigger a NULL pointer access in gfn_to_rmap() when userspace next tries...
void SSL_SESSION_free(SSL_SESSION *ss) { int i; if(ss == NULL) return; i=CRYPTO_add(&ss->references,-1,CRYPTO_LOCK_SSL_SESSION); #ifdef REF_PRINT REF_PRINT("SSL_SESSION",ss); #endif if (i > 0) return; #ifdef REF_CHECK if (i < 0) { fprintf(stderr,"SSL_SESSION_free, bad reference count\n"); abort(); /...
1
[]
openssl
36ca4ba63d083da6f9d4598f18f17a8c32c8eca2
162,177,058,551,612,730,000,000,000,000,000,000,000
40
Implement the Supported Point Formats Extension for ECC ciphersuites Submitted by: Douglas Stebila
static void php_sqlite_fetch_single(struct php_sqlite_result *res, zend_bool decode_binary, zval *return_value TSRMLS_DC) { const char **rowdata; char *decoded; int decoded_len; /* check range of the row */ if (res->curr_row >= res->nrows) { /* no more */ RETURN_FALSE; } if (res->buffered) { rowdata = (c...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
276,522,354,683,009,600,000,000,000,000,000,000,000
51
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
void cpu_exec_unrealizefn(CPUState *cpu) { }
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
23,027,629,765,511,990,000,000,000,000,000,000,000
3
Fix crash when mapping a big memory and calling uc_close
static HashTable *zend_generator_get_gc(zval *object, zval **table, int *n) /* {{{ */ { zend_generator *generator = (zend_generator*) Z_OBJ_P(object); zend_execute_data *execute_data = generator->execute_data; zend_op_array *op_array; zval *gc_buffer; uint32_t gc_buffer_size; if (!execute_data) { /* If the gen...
0
[]
php-src
83e2b9e2202da6cc25bdaac67a58022b90be88e7
241,483,441,283,048,900,000,000,000,000,000,000,000
84
Fixed bug #76946
static inline void bpf_flush_icache(void *start, void *end) { mm_segment_t old_fs = get_fs(); set_fs(KERNEL_DS); smp_wmb(); flush_icache_range((unsigned long)start, (unsigned long)end); set_fs(old_fs); }
0
[ "CWE-703", "CWE-189" ]
linux
a03ffcf873fe0f2565386ca8ef832144c42e67fa
116,461,368,453,385,080,000,000,000,000,000,000,000
9
net: bpf_jit: fix an off-one bug in x86_64 cond jump target x86 jump instruction size is 2 or 5 bytes (near/long jump), not 2 or 6 bytes. In case a conditional jump is followed by a long jump, conditional jump target is one byte past the start of target instruction. Signed-off-by: Markus Kötter <nepenthesdev@gmail.c...
imapx_weak_ref_new (gpointer object) { GWeakRef *weak_ref; /* XXX Might want to expose this in Camel's public API if it * proves useful elsewhere. Based on e_weak_ref_new(). */ weak_ref = g_slice_new0 (GWeakRef); g_weak_ref_init (weak_ref, object); return weak_ref; }
0
[]
evolution-data-server
f26a6f672096790d0bbd76903db4c9a2e44f116b
175,167,024,499,191,600,000,000,000,000,000,000,000
12
[IMAPx] 'STARTTLS not supported' error ignored When a user has setup the STARTTLS encryption method, but the server doesn't support it, then an error should be shown to the user, instead of using unsecure connection. There had been two bugs in the existing code which prevented this error from being used and the failur...
SYSCALL_DEFINE2(io_setup, unsigned, nr_events, aio_context_t __user *, ctxp) { struct kioctx *ioctx = NULL; unsigned long ctx; long ret; ret = get_user(ctx, ctxp); if (unlikely(ret)) goto out; ret = -EINVAL; if (unlikely(ctx || nr_events == 0)) { pr_debug("EINVAL: io_setup: ctx %lu nr_events %u\n", ...
0
[ "CWE-190" ]
linux-2.6
75e1c70fc31490ef8a373ea2a4bea2524099b478
34,648,810,742,751,464,000,000,000,000,000,000,000
31
aio: check for multiplication overflow in do_io_submit Tavis Ormandy pointed out that do_io_submit does not do proper bounds checking on the passed-in iocb array:        if (unlikely(nr < 0))                return -EINVAL;        if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(iocbpp)))))                retu...
static int ntop_get_interface_find_proc_name_flows(lua_State* vm) { NetworkInterfaceView *ntop_interface = getCurrentInterface(vm); char *proc_name; ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); if(!Utils::isUserAdministrator(vm)) return(CONST_LUA_ERROR); if(ntop_lua_check(vm, __FU...
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
71,342,776,281,955,020,000,000,000,000,000,000,000
16
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it