func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void GrpcHealthCheckerImpl::GrpcActiveHealthCheckSession::onTimeout() { ENVOY_CONN_LOG(debug, "connection/stream timeout health_flags={}", *client_, HostUtility::healthFlagsToString(*host_)); expect_reset_ = true; if (received_no_error_goaway_ || !parent_.reuse_connection_) { client_->close()...
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
147,232,977,583,204,190,000,000,000,000,000,000,000
10
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
get_key(char *filename, EVP_PKEY **retkey) { EVP_PKEY *pkey = NULL; BIO *tmp = NULL; int code; krb5_error_code retval; if (filename == NULL || retkey == NULL) return EINVAL; tmp = BIO_new(BIO_s_file()); if (tmp == NULL) return ENOMEM; code = BIO_read_filename(tmp, file...
0
[ "CWE-476" ]
krb5
f249555301940c6df3a2cdda13b56b5674eebc2e
337,584,938,748,162,800,000,000,000,000,000,000,000
32
PKINIT null pointer deref [CVE-2013-1415] Don't dereference a null pointer when cleaning up. The KDC plugin for PKINIT can dereference a null pointer when a malformed packet causes processing to terminate early, leading to a crash of the KDC process. An attacker would need to have a valid PKINIT certificate or have ...
holder(const T &value) : value_(value) {}
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
280,815,094,783,473,980,000,000,000,000,000,000,000
1
Fix #122
static double format(const float val) { return (double)val; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
213,499,458,033,290,500,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.
void copy_array<tstring, int64>(tstring* dst, const tstring* src, int64 size) { slow_copy_array(dst, src, size); }
0
[ "CWE-131", "CWE-369" ]
tensorflow
f94ef358bb3e91d517446454edff6535bcfe8e4a
4,034,225,972,764,128,500,000,000,000,000,000,000
3
Fix `tf.raw_ops.RaggedTensorToTensor` failing CHECK in `tensor.cc`. PiperOrigin-RevId: 368300502 Change-Id: I91255d23c4bfd3aa3c029aac773937c09daf3c64
x_filter_func(const ImageRef *ref, Image UNUSED *img, const void *data, CellPixelSize cell UNUSED) { const GraphicsCommand *g = data; return ref->start_column <= (int32_t)g->x_offset - 1 && ((int32_t)g->x_offset - 1) < ((int32_t)(ref->start_column + ref->effective_num_cols)); }
0
[ "CWE-787" ]
kitty
82c137878c2b99100a3cdc1c0f0efea069313901
102,654,915,720,034,870,000,000,000,000,000,000,000
4
Graphics protocol: Dont return filename in the error message when opening file fails, since filenames can contain control characters Fixes #3128
void _mutt_mktemp (char *s, size_t slen, const char *src, int line) { snprintf (s, slen, "%s/mutt-%s-%d-%d-%d", NONULL (Tempdir), NONULL(Hostname), (int) getuid(), (int) getpid (), Counter++); dprint (3, (debugfile, "%s:%d: mutt_mktemp returns \"%s\".\n", src, line, s)); unlink (s); }
1
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
50,668,751,234,213,140,000,000,000,000,000,000,000
6
use a 64-bit random value in temporary filenames. closes #3158
static int virtnet_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid) { struct virtnet_info *vi = netdev_priv(dev); struct scatterlist sg; sg_init_one(&sg, &vid, sizeof(vid)); if (!virtnet_send_command(vi, VIRTIO_NET_CTRL_VLAN, VIRTIO_NET_CTRL_VLAN_DEL, &sg)) dev_warn(&dev->dev, "Fail...
0
[ "CWE-119", "CWE-787" ]
linux
48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39
86,084,198,189,197,900,000,000,000,000,000,000,000
13
virtio-net: drop NETIF_F_FRAGLIST virtio declares support for NETIF_F_FRAGLIST, but assumes that there are at most MAX_SKB_FRAGS + 2 fragments which isn't always true with a fraglist. A longer fraglist in the skb will make the call to skb_to_sgvec overflow the sg array, leading to memory corruption. Drop NETIF_F_FRA...
Header headerLoad(void * uh) { return headerImport(uh, 0, 0); }
0
[ "CWE-125" ]
rpm
8f4b3c3cab8922a2022b9e47c71f1ecf906077ef
205,927,736,347,450,100,000,000,000,000,000,000,000
4
hdrblobInit() needs bounds checks too Users can pass untrusted data to hdrblobInit() and it must be robust against this.
void ext4_truncate(struct inode *inode) { struct ext4_inode_info *ei = EXT4_I(inode); unsigned int credits; handle_t *handle; struct address_space *mapping = inode->i_mapping; /* * There is a possibility that we're either freeing the inode * or it's a completely new inode. In those cases we might not * have...
0
[ "CWE-200" ]
linux
06bd3c36a733ac27962fea7d6f47168841376824
225,887,955,778,827,530,000,000,000,000,000,000,000
95
ext4: fix data exposure after a crash Huang has reported that in his powerfail testing he is seeing stale block contents in some of recently allocated blocks although he mounts ext4 in data=ordered mode. After some investigation I have found out that indeed when delayed allocation is used, we don't add inode to transa...
static void usbtest_disconnect(struct usb_interface *intf) { struct usbtest_dev *dev = usb_get_intfdata(intf); usb_set_intfdata(intf, NULL); dev_dbg(&intf->dev, "disconnect\n"); kfree(dev); }
1
[ "CWE-401" ]
linux
28ebeb8db77035e058a510ce9bd17c2b9a009dba
53,731,759,962,184,010,000,000,000,000,000,000,000
8
usb: usbtest: fix missing kfree(dev->buf) in usbtest_disconnect BUG: memory leak unreferenced object 0xffff888055046e00 (size 256): comm "kworker/2:9", pid 2570, jiffies 4294942129 (age 1095.500s) hex dump (first 32 bytes): 00 70 04 55 80 88 ff ff 18 bb 5a 81 ff ff ff ff .p.U......Z..... f5 96 78 81 ff ff...
static inline bool auth_principal_needs_rotating_keys(EntityName& name) { uint32_t ty(name.get_type()); return ((ty == CEPH_ENTITY_TYPE_OSD) || (ty == CEPH_ENTITY_TYPE_MDS) || (ty == CEPH_ENTITY_TYPE_MGR)); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
177,148,382,663,462,100,000,000,000,000,000,000,000
7
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 gfar_of_group_count(struct device_node *np) { struct device_node *child; int num = 0; for_each_available_child_of_node(np, child) if (of_node_name_eq(child, "queue-group")) num++; return num; }
0
[]
linux
d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f
52,565,794,110,865,270,000,000,000,000,000,000,000
11
gianfar: fix jumbo packets+napi+rx overrun crash When using jumbo packets and overrunning rx queue with napi enabled, the following sequence is observed in gfar_add_rx_frag: | lstatus | | skb | t | lstatus, size, flags | first | len, data_len, *...
SPL_METHOD(SplFileObject, key) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(getThis()); if (zend_parse_parameters_none() == FAILURE) { return; } /* Do not read the next line to support correct counting with fgetc() if (!intern->current_line) { spl_filesystem_file_read_line(getThis(), intern, 1); } */ ...
0
[ "CWE-74" ]
php-src
a5a15965da23c8e97657278fc8dfbf1dfb20c016
80,410,502,850,793,550,000,000,000,000,000,000,000
14
Fix #78863: DirectoryIterator class silently truncates after a null byte Since the constructor of DirectoryIterator and friends is supposed to accepts paths (i.e. strings without NUL bytes), we must not accept arbitrary strings.
onig_setup_builtin_monitors_by_ascii_encoded_name(void* fp /* FILE* */) { int id; char* name; OnigEncoding enc; unsigned int ts[4]; OnigValue opts[4]; if (IS_NOT_NULL(fp)) OutFp = (FILE* )fp; else OutFp = stdout; enc = ONIG_ENCODING_ASCII; name = "MON"; ts[0] = ONIG_TYPE_CHAR; opts[0].c...
0
[ "CWE-125" ]
oniguruma
d3e402928b6eb3327f8f7d59a9edfa622fec557b
61,414,691,909,779,970,000,000,000,000,000,000,000
22
fix heap-buffer-overflow
mono_thread_get_tls_offset (void) { int offset; MONO_THREAD_VAR_OFFSET (tls_current_object,offset); return offset; }
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
12,244,132,459,029,952,000,000,000,000,000,000,000
6
Fix access to freed members of a dead thread * threads.c: Fix access to freed members of a dead thread. Found and fixed by Rodrigo Kumpera <rkumpera@novell.com> Ref: CVE-2011-0992
nautilus_file_get_parent (NautilusFile *file) { g_assert (NAUTILUS_IS_FILE (file)); if (nautilus_file_is_self_owned (file)) { return NULL; } return nautilus_directory_get_corresponding_file (file->details->directory); }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
311,056,732,179,300,550,000,000,000,000,000,000,000
10
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-...
std::string JSON::JSON_dictionary::unparse(size_t depth) const { std::string result = "{"; bool first = true; for (std::map<std::string, PointerHolder<JSON_value> >::const_iterator iter = members.begin(); iter != members.end(); ++iter) { if (first) { fir...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
40,110,876,305,056,557,000,000,000,000,000,000,000
29
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static int rtas_token_define(struct kvm *kvm, char *name, u64 token) { struct rtas_token_definition *d; struct rtas_handler *h = NULL; bool found; int i; lockdep_assert_held(&kvm->arch.rtas_token_lock); list_for_each_entry(d, &kvm->arch.rtas_tokens, list) { if (d->token == token) return -EEXIST; } found...
0
[ "CWE-787" ]
linux
f62f3c20647ebd5fb6ecb8f0b477b9281c44c10a
143,642,896,429,810,370,000,000,000,000,000,000,000
37
KVM: PPC: Book3S: Fix H_RTAS rets buffer overflow The kvmppc_rtas_hcall() sets the host rtas_args.rets pointer based on the rtas_args.nargs that was provided by the guest. That guest nargs value is not range checked, so the guest can cause the host rets pointer to be pointed outside the args array. The individual rtas...
ctnetlink_conntrack_event(unsigned int events, struct nf_ct_event *item) { const struct nf_conntrack_zone *zone; struct net *net; struct nlmsghdr *nlh; struct nfgenmsg *nfmsg; struct nlattr *nest_parms; struct nf_conn *ct = item->ct; struct sk_buff *skb; unsigned int type; unsigned int flags = 0, group; int e...
0
[ "CWE-120" ]
linux
1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6
1,689,674,878,334,740,000,000,000,000,000,000,000
137
netfilter: ctnetlink: add a range check for l3/l4 protonum The indexes to the nf_nat_l[34]protos arrays come from userspace. So check the tuple's family, e.g. l3num, when creating the conntrack in order to prevent an OOB memory access during setup. Here is an example kernel panic on 4.14.180 when userspace passes in ...
void vrend_renderer_reset(void) { vrend_free_fences(); vrend_blitter_fini(); vrend_destroy_context(vrend_state.ctx0); vrend_state.ctx0 = vrend_create_context(0, strlen("HOST"), "HOST"); /* TODO respawn sync thread */ }
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
332,912,259,007,968,540,000,000,000,000,000,000,000
10
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
static void TraceRoundRectangle(PrimitiveInfo *primitive_info, const PointInfo start,const PointInfo end,PointInfo arc) { PointInfo degrees, offset, point; register PrimitiveInfo *p; register ssize_t i; p=primitive_info; offset.x=fabs(end.x-start.x); offset.y=fabs(end.y-start.y); ...
0
[ "CWE-399", "CWE-119" ]
ImageMagick
726812fa2fa7ce16bcf58f6e115f65427a1c0950
278,899,305,409,049,750,000,000,000,000,000,000,000
54
Prevent buffer overflow in magick/draw.c
njs_promise_prototype_then(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs, njs_index_t unused) { njs_int_t ret; njs_value_t *promise, *fulfilled, *rejected, constructor; njs_object_t *object; njs_function_t *function; njs_promise_capabilit...
1
[ "CWE-843", "CWE-269" ]
njs
6a40a85ff239497c6458c7dbef18f6a2736fe992
64,859,842,776,781,270,000,000,000,000,000,000,000
49
Fixed type confusion bug while resolving promises. Previously, the internal function njs_promise_perform_then() which implements PerformPromiseThen() expects its first argument to always be a promise instance. This assertion might be invalid because the functions corresponding to Promise.prototype.then() and Promise....
auto ReferenceHandle::Deref(MaybeLocal<Object> maybe_options) -> Local<Value> { CheckDisposed(); if (isolate.get() != IsolateEnvironment::GetCurrentHolder().get()) { throw RuntimeTypeError("Cannot dereference this from current isolate"); } bool release = ReadOption<bool>(maybe_options, StringTable::Get().release,...
0
[ "CWE-913" ]
isolated-vm
2646e6c1558bac66285daeab54c7d490ed332b15
236,290,719,832,853,900,000,000,000,000,000,000,000
12
Don't invoke accessors or proxies via Reference functions
static struct cm_id_private * cm_acquire_id(__be32 local_id, __be32 remote_id) { struct cm_id_private *cm_id_priv; spin_lock_irq(&cm.lock); cm_id_priv = cm_get_id(local_id, remote_id); spin_unlock_irq(&cm.lock); return cm_id_priv; }
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
156,319,679,522,647,700,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 int __init mcryptd_init(void) { int err, cpu; struct mcryptd_flush_list *flist; mcryptd_flist = alloc_percpu(struct mcryptd_flush_list); for_each_possible_cpu(cpu) { flist = per_cpu_ptr(mcryptd_flist, cpu); INIT_LIST_HEAD(&flist->list); mutex_init(&flist->lock); } err = mcryptd_init_queue(&mqueue, ...
0
[ "CWE-476", "CWE-284" ]
linux
48a992727d82cb7db076fa15d372178743b1f4cd
112,488,269,130,363,830,000,000,000,000,000,000,000
26
crypto: mcryptd - Check mcryptd algorithm compatibility Algorithms not compatible with mcryptd could be spawned by mcryptd with a direct crypto_alloc_tfm invocation using a "mcryptd(alg)" name construct. This causes mcryptd to crash the kernel if an arbitrary "alg" is incompatible and not intended to be used with mcr...
int common_timer_set(struct k_itimer *timr, int flags, struct itimerspec64 *new_setting, struct itimerspec64 *old_setting) { const struct k_clock *kc = timr->kclock; bool sigev_none; ktime_t expires; if (old_setting) common_timer_get(timr, old_setting); /* Prevent rearming by clearing the interva...
1
[ "CWE-125" ]
linux
cef31d9af908243421258f1df35a4a644604efbe
15,666,682,616,255,265,000,000,000,000,000,000,000
37
posix-timer: Properly check sigevent->sigev_notify timer_create() specifies via sigevent->sigev_notify the signal delivery for the new timer. The valid modes are SIGEV_NONE, SIGEV_SIGNAL, SIGEV_THREAD and (SIGEV_SIGNAL | SIGEV_THREAD_ID). The sanity check in good_sigevent() is only checking the valid combination for ...
} static GF_DownloadSession *get_file(const char *url, GF_DownloadManager *dm, GF_Err *e) { GF_DownloadSession *sess; sess = gf_dm_sess_new(dm, url, GF_NETIO_SESSION_NOT_THREADED, get_file_callback, NULL, e); if (!sess) return NULL; *e = gf_dm_sess_process(sess); if (*e) { gf_dm_sess_del(sess); return NULL; ...
0
[ "CWE-476", "CWE-401" ]
gpac
289ffce3e0d224d314f5f92a744d5fe35999f20b
230,217,268,810,564,360,000,000,000,000,000,000,000
12
fixed #1767 (fuzz)
int page_symlink(struct inode *inode, const char *symname, int len) { return __page_symlink(inode, symname, len, mapping_gfp_mask(inode->i_mapping)); }
0
[ "CWE-120" ]
linux-2.6
d70b67c8bc72ee23b55381bd6a884f4796692f77
3,759,261,678,936,718,500,000,000,000,000,000,000
5
[patch] vfs: fix lookup on deleted directory Lookup can install a child dentry for a deleted directory. This keeps the directory dentry alive, and the inode pinned in the cache and on disk, even after all external references have gone away. This isn't a big problem normally, since memory pressure or umount will clea...
static int unix_mknod(const char *sun_path, umode_t mode, struct path *res) { struct dentry *dentry; struct path path; int err = 0; /* * Get the parent directory, calculate the hash for last * component. */ dentry = kern_path_create(AT_FDCWD, sun_path, &path, 0); err = PTR_ERR(dentry); if (IS_ERR(dentry)) ...
0
[]
net
7d267278a9ece963d77eefec61630223fce08c6c
14,388,431,847,694,606,000,000,000,000,000,000,000
28
unix: avoid use-after-free in ep_remove_wait_queue Rainer Weikusat <rweikusat@mobileactivedefense.com> writes: An AF_UNIX datagram socket being the client in an n:1 association with some server socket is only allowed to send messages to the server if the receive queue of this socket contains at most sk_max_ack_backlog...
TiledInputFile::TiledInputFile (InputPartData* part) { _data = new Data (part->numThreads); _data->_deleteStream=false; try { multiPartInitialize(part); } catch(...) { if (_data) delete _data; throw; } }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
130,997,992,430,455,800,000,000,000,000,000,000,000
14
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
create_jwt_token_fields(const char *algo, time_t exp, time_t iat, time_t nbf, ARRAY_TYPE(oauth2_field) *fields) { const struct oauth2_field *field; buffer_t *tokenbuf = t_buffer_create(64); base64url_encode_str( t_strdup_printf("{\"alg\":\"%s\",\"typ\":\"JWT\"}", algo), tokenbuf); buffer_append(tokenbuf, "....
1
[ "CWE-22" ]
core
cf8f670629cf2b9ff862eb42d5446ac4a9383a84
77,463,889,603,019,710,000,000,000,000,000,000,000
36
lib-oauth2: Add test for token escape
static void rawmidi_release_priv(struct snd_rawmidi_file *rfile) { struct snd_rawmidi *rmidi; rmidi = rfile->rmidi; mutex_lock(&rmidi->open_mutex); if (rfile->input) { close_substream(rmidi, rfile->input, 1); rfile->input = NULL; } if (rfile->output) { close_substream(rmidi, rfile->output, 1); rfile->out...
0
[ "CWE-415" ]
linux
39675f7a7c7e7702f7d5341f1e0d01db746543a0
157,041,024,053,355,560,000,000,000,000,000,000,000
18
ALSA: rawmidi: Change resized buffers atomically The SNDRV_RAWMIDI_IOCTL_PARAMS ioctl may resize the buffers and the current code is racy. For example, the sequencer client may write to buffer while it being resized. As a simple workaround, let's switch to the resized buffer inside the stream runtime lock. Reported...
static ut64 r_ptr(ut8 *buf, RKernelCacheObj *obj) { ut64 decorated_addr = r_read_le64 (buf); return K_PPTR (decorated_addr); }
0
[ "CWE-476" ]
radare2
feaa4e7f7399c51ee6f52deb84dc3f795b4035d6
102,556,210,340,017,630,000,000,000,000,000,000,000
4
Fix null deref in xnu.kernelcache ##crash * Reported by @xshad3 via huntr.dev
static int kvm_alloc_memslot_metadata(struct kvm *kvm, struct kvm_memory_slot *slot) { unsigned long npages = slot->npages; int i, r; /* * Clear out the previous array pointers for the KVM_MR_MOVE case. The * old arrays will be freed by __kvm_set_memory_region() if installing * the new memslot is s...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
283,600,991,772,347,080,000,000,000,000,000,000,000
64
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
static const char *wsgi_add_import_script(cmd_parms *cmd, void *mconfig, const char *args) { const char *error = NULL; WSGIScriptFile *object = NULL; const char *option = NULL; const char *value = NULL; if (!wsgi_import_list) { wsgi_import_list = a...
0
[ "CWE-264" ]
mod_wsgi
d9d5fea585b23991f76532a9b07de7fcd3b649f4
57,070,925,037,221,920,000,000,000,000,000,000,000
95
Local privilege escalation when using daemon mode. (CVE-2014-0240)
struct nft_set *nf_tables_set_lookup_byid(const struct net *net, const struct nlattr *nla) { struct nft_trans *trans; u32 id = ntohl(nla_get_be32(nla)); list_for_each_entry(trans, &net->nft.commit_list, list) { if (trans->msg_type == NFT_MSG_NEWSET && id == nft_trans_set_id(trans)) return nft_tran...
0
[ "CWE-19" ]
nf
a2f18db0c68fec96631c10cad9384c196e9008ac
319,863,788,729,132,700,000,000,000,000,000,000,000
13
netfilter: nf_tables: fix flush ruleset chain dependencies Jumping between chains doesn't mix well with flush ruleset. Rules from a different chain and set elements may still refer to us. [ 353.373791] ------------[ cut here ]------------ [ 353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159! [ 353.373896...
errno_t sssctl_debug_level(struct sss_cmdline *cmdline, struct sss_tool_ctx *tool_ctx, void *pvt) { int ret; int debug_to_set = SSSDBG_INVALID; const char *debug_as_string = NULL; const char *config_file = NULL; const char *pc_config_file = NULL;...
0
[ "CWE-78" ]
sssd
7ab83f97e1cbefb78ece17232185bdd2985f0bbe
30,667,139,964,569,624,000,000,000,000,000,000,000
73
TOOLS: replace system() with execvp() to avoid execution of user supplied command :relnote: A flaw was found in SSSD, where the sssctl command was vulnerable to shell command injection via the logs-fetch and cache-expire subcommands. This flaw allows an attacker to trick the root user into running a specially crafted ...
mb_adjust_opend(oparg_T *oap) { char_u *p; if (oap->inclusive) { p = ml_get(oap->end.lnum); oap->end.col += mb_tail_off(p, p + oap->end.col); } }
0
[ "CWE-416", "CWE-787" ]
vim
9f8c304c8a390ade133bac29963dc8e56ab14cbc
237,969,514,688,199,860,000,000,000,000,000,000,000
10
patch 8.2.4120: block insert goes over the end of the line Problem: Block insert goes over the end of the line. Solution: Handle invalid byte better. Fix inserting the wrong text.
static void drop_user_return_notifiers(void) { unsigned int cpu = smp_processor_id(); struct kvm_shared_msrs *smsr = per_cpu_ptr(shared_msrs, cpu); if (smsr->registered) kvm_on_user_return(&smsr->urn); }
0
[]
kvm
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
197,557,424,390,500,960,000,000,000,000,000,000,000
8
KVM: x86: Check non-canonical addresses upon WRMSR Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is written to certain MSRs. The behavior is "almost" identical for AMD and Intel (ignoring MSRs that are not implemented in either architecture since they would anyhow #GP). However, IA32_SYSENTE...
bool is_module_percpu_address(unsigned long addr) { return false; }
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
333,878,152,032,198,330,000,000,000,000,000,000,000
4
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...
string_isspace(PyStringObject *self) { register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); register const unsigned char *e; /* Shortcut for single character strings */ if (PyString_GET_SIZE(self) == 1 && isspace(*p)) return PyBool_FromLong(1); /* S...
0
[ "CWE-190" ]
cpython
c3c9db89273fabc62ea1b48389d9a3000c1c03ae
220,435,177,858,657,530,000,000,000,000,000,000,000
22
[2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174)
static size_t curl_header_cb(void *ptr, size_t size, size_t nmemb, void *opaque) { BDRVCURLState *s = opaque; size_t realsize = size * nmemb; const char *accept_line = "Accept-Ranges: bytes"; if (realsize >= strlen(accept_line) && strncmp((char *)ptr, accept_line, strlen(accept_line)) == 0) { ...
0
[ "CWE-20" ]
qemu
6d4b9e55fc625514a38d27cff4b9933f617fa7dc
186,049,236,842,334,560,000,000,000,000,000,000,000
13
curl: check data size before memcpy to local buffer. (CVE-2014-0144) curl_read_cb is callback function for libcurl when data arrives. The data size passed in here is not guaranteed to be within the range of request we submitted, so we may overflow the guest IO buffer. Check the real size we have before memcpy to buffe...
static ssize_t _epoll_readv( oe_fd_t* desc, const struct oe_iovec* iov, int iovcnt) { ssize_t ret = -1; epoll_t* file = _cast_epoll(desc); void* buf = NULL; size_t buf_size = 0; size_t data_size = 0; if (!file || (iovcnt && !iov) || iovcnt < 0 || iovcnt > OE_IOV_MAX) OE_RAIS...
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
32,696,932,250,773,770,000,000,000,000,000,000,000
57
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
PrivilegeVector AuthorizationSessionImpl::getDefaultPrivileges() { PrivilegeVector defaultPrivileges; // If localhost exception is active (and no users exist), // return a vector of the minimum privileges required to bootstrap // a system and add the first user. if (_externalState->shouldAllowLocal...
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
290,620,316,700,266,300,000,000,000,000,000,000,000
42
SERVER-38984 Validate unique User ID on UserCache hit
Bool gf_fs_solve_js_script(char *szPath, const char *file_name, const char *file_ext) { const char *js_dirs; if (gf_opts_default_shared_directory(szPath)) { strcat(szPath, "/scripts/jsf/"); GF_LOG(GF_LOG_DEBUG, GF_LOG_FILTER, ("Trying JS filter %s\n", szPath)); if (locate_js_script(szPath, file_name, file_ext))...
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
6,428,746,934,817,030,000,000,000,000,000,000,000
36
fixed crashes for very long path - cf #1908
virtual RGWOpType get_type() { return RGW_OP_GET_BUCKET_META_SEARCH; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
325,331,093,867,956,850,000,000,000,000,000,000,000
1
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
static void uas_free_streams(struct uas_dev_info *devinfo) { struct usb_device *udev = devinfo->udev; struct usb_host_endpoint *eps[3]; eps[0] = usb_pipe_endpoint(udev, devinfo->status_pipe); eps[1] = usb_pipe_endpoint(udev, devinfo->data_in_pipe); eps[2] = usb_pipe_endpoint(udev, devinfo->data_out_pipe); usb_fr...
0
[ "CWE-125" ]
linux
786de92b3cb26012d3d0f00ee37adf14527f35c4
103,721,238,347,466,290,000,000,000,000,000,000,000
10
USB: uas: fix bug in handling of alternate settings The uas driver has a subtle bug in the way it handles alternate settings. The uas_find_uas_alt_setting() routine returns an altsetting value (the bAlternateSetting number in the descriptor), but uas_use_uas_driver() then treats that value as an index to the intf->al...
int git_path_diriter_init( git_path_diriter *diriter, const char *path, unsigned int flags) { git_win32_path path_filter; static int is_win7_or_later = -1; if (is_win7_or_later < 0) is_win7_or_later = git_has_win32_version(6, 1, 0); assert(diriter && path); memset(diriter, 0, sizeof(git_path_diriter)); di...
0
[ "CWE-20", "CWE-706" ]
libgit2
3f7851eadca36a99627ad78cbe56a40d3776ed01
187,193,796,466,905,060,000,000,000,000,000,000,000
49
Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS A little-known feature of NTFS is that it offers to store metadata in so-called "Alternate Data Streams" (inspired by Apple's "resource forks") that are copied together with the file they are associated with. These Alternate Data Streams can be accessed ...
__read_extent_tree_block(const char *function, unsigned int line, struct inode *inode, ext4_fsblk_t pblk, int depth, int flags) { struct buffer_head *bh; int err; gfp_t gfp_flags = __GFP_MOVABLE | GFP_NOFS; if (flags & EXT4_EX_NOFAIL) gfp_flags |= __GFP_NOFAIL; bh = sb_getblk_gfp(inode->i_sb, pb...
0
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
230,592,966,148,734,880,000,000,000,000,000,000,000
41
ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently...
R_API void U(r_bin_java_print_stack_map_append_frame_summary)(RBinJavaStackMapFrame * obj) { RListIter *iter, *iter_tmp; RList *ptrList; RBinJavaVerificationObj *ver_obj; printf ("Stack Map Frame Information\n"); printf (" Tag Value = 0x%02x Name: %s\n", obj->tag, ((RBinJavaStackMapFrameMetas *) obj->metas->type_...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
53,933,401,517,261,350,000,000,000,000,000,000,000
20
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
static void nf_tables_abort_release(struct nft_trans *trans) { switch (trans->msg_type) { case NFT_MSG_NEWTABLE: nf_tables_table_destroy(&trans->ctx); break; case NFT_MSG_NEWCHAIN: nf_tables_chain_destroy(&trans->ctx); break; case NFT_MSG_NEWRULE: nf_tables_rule_destroy(&trans->ctx, nft_trans_rule(trans))...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
332,105,884,812,737,330,000,000,000,000,000,000,000
31
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
static int sched_open(struct inode *inode, struct file *filp) { int ret; ret = single_open(filp, sched_show, NULL); if (!ret) { struct seq_file *m = filp->private_data; m->private = inode; } return ret; }
0
[ "CWE-20", "CWE-362", "CWE-416" ]
linux
86acdca1b63e6890540fa19495cfc708beff3d8b
118,641,447,919,447,300,000,000,000,000,000,000,000
12
fix autofs/afs/etc. magic mountpoint breakage We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT) if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type is bogus here; we want LAST_BIND for everything of that kind and we get LAST_NORM left over from finding parent directory. So make...
void GC_print_address_map(void) { char *maps; GC_err_printf("---------- Begin address map ----------\n"); maps = GC_get_maps(); GC_err_puts(maps != NULL ? maps : "Failed to get map!\n"); GC_err_printf("---------- End address map ----------\n"); }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
180,977,958,079,299,900,000,000,000,000,000,000,000
9
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
static void cmd_window_size(const char *data) { char sizestr[MAX_INT_STRLEN]; int size; if (!is_numeric(data, 0)) return; size = atoi(data); size -= WINDOW_MAIN(active_win)->height - WINDOW_MAIN(active_win)->statusbar_lines; if (size == 0) return; ltoa(sizestr, size < 0 ? -size : size); if (size < 0...
0
[ "CWE-476" ]
irssi
5b5bfef03596d95079c728f65f523570dd7b03aa
54,085,782,981,971,280,000,000,000,000,000,000,000
18
check the error condition of mainwindow_create
ldns_str2rdf_dname(ldns_rdf **d, const char *str) { size_t len; const char *s; uint8_t *q, *pq, label_len; uint8_t buf[LDNS_MAX_DOMAINLEN + 1]; *d = NULL; len = strlen((char*)str); /* octet representation can make strings a lot longer than actual length */ if (len > LDNS_MAX_DOMAINLEN * 4) { return LDNS_STA...
0
[ "CWE-415" ]
ldns
070b4595981f48a21cc6b4f5047fdc2d09d3da91
246,612,761,530,980,200,000,000,000,000,000,000,000
87
CAA and URI
int msPostGISLayerOpen(layerObj *layer) { #ifdef USE_POSTGIS msPostGISLayerInfo *layerinfo; int order_test = 1; assert(layer != NULL); if (layer->debug) { msDebug("msPostGISLayerOpen called: %s\n", layer->data); } if (layer->layerinfo) { if (layer->debug) { msDebug("msPostGISLayerOpen: Lay...
0
[ "CWE-89" ]
mapserver
3a10f6b829297dae63492a8c63385044bc6953ed
133,298,090,557,332,690,000,000,000,000,000,000,000
124
Fix potential SQL Injection with postgis TIME filters (#4834)
static void dns_transaction_stop_timeout(DnsTransaction *t) { assert(t); t->timeout_event_source = sd_event_source_unref(t->timeout_event_source); }
0
[ "CWE-416" ]
systemd
904dcaf9d4933499f8334859f52ea8497f2d24ff
99,476,117,463,316,240,000,000,000,000,000,000,000
5
resolved: take particular care when detaching DnsServer from its default stream DnsStream and DnsServer have a symbiotic relationship: one DnsStream is the current "default" stream of the server (and thus reffed by it), but each stream also refs the server it is connected to. This cyclic dependency can result in weird...
bm_search_notrev(regex_t* reg, const UChar* target, const UChar* target_end, const UChar* text, const UChar* text_end, const UChar* text_range) { const UChar *s, *se, *t, *p, *end; const UChar *tail; int skip, tlen1; #ifdef ONIG_DEBUG_SEARCH fprintf(stderr, "bm_search_notrev: text: %d, text_end: %d, text...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
94,162,860,579,241,050,000,000,000,000,000,000,000
54
onig-5.9.2
unzzip_list (int argc, char ** argv, int verbose) { int argn; ZZIP_MEM_DISK* disk; if (argc == 1) { printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); return EXIT_OK; /* better provide an archive argument */ } disk = zzip_mem_disk_open (argv[1]); if (! dis...
0
[ "CWE-772" ]
zziplib
83a2da55922f67e07f22048ac9671a44cc0d35c4
101,601,386,288,122,230,000,000,000,000,000,000,000
88
ensure disk_close to avoid mem-leak #40
static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size, UID uid, int64_t klv_offset) { MXFContext *mxf = arg; MXFPartition *partition, *tmp_part; UID op; uint64_t footer_partition; uint32_t nb_essence_containers; tmp_part = av_realloc_array(mxf->partitions, mxf->partit...
0
[ "CWE-703" ]
FFmpeg
f173cdfe669556aa92857adafe60cbe5f2aa1210
66,628,293,121,471,120,000,000,000,000,000,000,000
157
avformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array() Fixes: 20170829A.mxf Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com> Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 900f39692ca0337a98a7cf047e4e2611071810c...
hex_append(char *s, int len, u_long x) { char buf[30]; char *t; if (!x) return str_append(s,len,"0"); *(t = &buf[sizeof(buf)-1]) = '\0'; while (x && (t > buf)) { u_int cc = (x % 16); *--t = ((cc < 10) ? ('0'+cc) : ('a'+cc-10)); x /= 16; } return str_append(s,len,t); }
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
170,984,690,760,734,120,000,000,000,000,000,000,000
16
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
static int __net_init ip6_route_net_init_late(struct net *net) { #ifdef CONFIG_PROC_FS proc_create("ipv6_route", 0, net->proc_net, &ipv6_route_proc_fops); proc_create("rt6_stats", S_IRUGO, net->proc_net, &rt6_stats_seq_fops); #endif return 0; }
0
[ "CWE-119" ]
net
c88507fbad8055297c1d1e21e599f46960cbee39
310,087,636,867,415,960,000,000,000,000,000,000,000
8
ipv6: don't set DST_NOCOUNT for remotely added routes DST_NOCOUNT should only be used if an authorized user adds routes locally. In case of routes which are added on behalf of router advertisments this flag must not get used as it allows an unlimited number of routes getting added remotely. Signed-off-by: Sabrina Dub...
Init_ossl_cipher(void) { #if 0 mOSSL = rb_define_module("OpenSSL"); eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError); #endif /* Document-class: OpenSSL::Cipher * * Provides symmetric algorithms for encryption and decryption. The * algorithms that are available dep...
1
[ "CWE-326", "CWE-310", "CWE-703" ]
openssl
8108e0a6db133f3375608303fdd2083eb5115062
147,633,328,353,187,580,000,000,000,000,000,000,000
247
cipher: don't set dummy encryption key in Cipher#initialize Remove the encryption key initialization from Cipher#initialize. This is effectively a revert of r32723 ("Avoid possible SEGV from AES encryption/decryption", 2011-07-28). r32723, which added the key initialization, was a workaround for Ruby Bug #2768. For s...
static int mv_read_packet(AVFormatContext *avctx, AVPacket *pkt) { MvContext *mv = avctx->priv_data; AVIOContext *pb = avctx->pb; AVStream *st = avctx->streams[mv->stream_index]; const AVIndexEntry *index; int frame = mv->frame[mv->stream_index]; int64_t ret; uint64_t pos; if (frame < s...
0
[ "CWE-399", "CWE-834" ]
FFmpeg
4f05e2e2dc1a89f38cd9f0960a6561083d714f1e
46,989,996,117,153,350,000,000,000,000,000,000,000
47
avformat/mvdec: Fix DoS due to lack of eof check Fixes: loop.mv Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
int ssl3_get_client_key_exchange(SSL *s) { int i, al, ok; long n; unsigned long alg_k; unsigned char *p; #ifndef OPENSSL_NO_RSA RSA *rsa = NULL; EVP_PKEY *pkey = NULL; #endif #ifndef OPENSSL_NO_DH BIGNUM *pub = NULL; DH *dh_srvr, *dh_clnt = NULL; #endif #ifndef OPENSSL_NO_KRB5 KSSL_E...
0
[ "CWE-20" ]
openssl
b19d8143212ae5fbc9cebfd51c01f802fabccd33
227,017,579,722,531,800,000,000,000,000,000,000,000
803
Fix DHE Null CKE vulnerability If client auth is used then a server can seg fault in the event of a DHE cipher being used and a zero length ClientKeyExchange message being sent by the client. This could be exploited in a DoS attack. CVE-2015-1787 Reviewed-by: Richard Levitte <levitte@openssl.org>
static int try_to_unuse(unsigned int type) { struct swap_info_struct *si = swap_info[type]; struct mm_struct *start_mm; unsigned char *swap_map; unsigned char swcount; struct page *page; swp_entry_t entry; unsigned int i = 0; int retval = 0; /* * When searching mms for an entry, a good strategy is to * st...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
163,073,208,754,339,380,000,000,000,000,000,000,000
205
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
static int isunder(char *file, char *dir) { char *s1 = xabspath(dir, ABS_FILE), *s2 = xabspath(file, 0), *ss = s2; int rc = s1 && s2 && strstart(&ss, s1) && (!*ss || *ss=='/' || ss[-1]=='/'); free(s2); free(s1); return rc; }
0
[ "CWE-787" ]
toybox
6d4847934fc0fe47a3254ce6c0396d197a780cf4
121,239,924,546,157,540,000,000,000,000,000,000,000
10
Don't segfault if xabspath() returns null (spotted by Taolaw).
archive_read_format_iso9660_read_header(struct archive_read *a, struct archive_entry *entry) { struct iso9660 *iso9660; struct file_info *file; int r, rd_r = ARCHIVE_OK; iso9660 = (struct iso9660 *)(a->format->data); if (!a->archive.archive_format) { a->archive.archive_format = ARCHIVE_FORMAT_ISO9660; a-...
0
[ "CWE-125" ]
libarchive
f9569c086ff29259c73790db9cbf39fe8fb9d862
58,392,214,699,284,730,000,000,000,000,000,000,000
230
iso9660: validate directory record length
queue_attr_store(struct kobject *kobj, struct attribute *attr, const char *page, size_t length) { struct queue_sysfs_entry *entry = to_queue(attr); struct request_queue *q; ssize_t res; if (!entry->store) return -EIO; q = container_of(kobj, struct request_queue, kobj); mutex_lock(&q->sysfs_lock); if (b...
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
95,862,472,373,366,190,000,000,000,000,000,000,000
20
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 int rds_notify_cong(struct rds_sock *rs, struct msghdr *msghdr) { uint64_t notify = rs->rs_cong_notify; unsigned long flags; int err; err = put_cmsg(msghdr, SOL_RDS, RDS_CMSG_CONG_UPDATE, sizeof(notify), &notify); if (err) return err; spin_lock_irqsave(&rs->rs_lock, flags); rs->rs_cong_notify &= ~n...
0
[ "CWE-200" ]
linux-2.6
06b6a1cf6e776426766298d055bb3991957d90a7
265,754,984,733,886,200,000,000,000,000,000,000,000
17
rds: set correct msg_namelen Jay Fenlason (fenlason@redhat.com) found a bug, that recvfrom() on an RDS socket can return the contents of random kernel memory to userspace if it was called with a address length larger than sizeof(struct sockaddr_in). rds_recvmsg() also fails to set the addr_len paramater properly befor...
static void ram_block_add(RAMBlock *new_block, Error **errp) { RAMBlock *block; RAMBlock *last_block = NULL; ram_addr_t old_ram_size, new_ram_size; Error *err = NULL; old_ram_size = last_ram_page(); qemu_mutex_lock_ramlist(); new_block->offset = find_ram_offset(new_block->max_length); ...
0
[ "CWE-125" ]
qemu
04bf2526ce87f21b32c9acba1c5518708c243ad0
79,352,306,668,774,080,000,000,000,000,000,000,000
76
exec: use qemu_ram_ptr_length to access guest ram When accessing guest's ram block during DMA operation, use 'qemu_ram_ptr_length' to get ram block pointer. It ensures that DMA operation of given length is possible; And avoids any OOB memory access situations. Reported-by: Alex <broscutamaker@gmail.com> Signed-off-by...
static void add_atomic_switch_msr(struct vcpu_vmx *vmx, unsigned msr, u64 guest_val, u64 host_val) { unsigned i; struct msr_autoload *m = &vmx->msr_autoload; switch (msr) { case MSR_EFER: if (cpu_has_load_ia32_efer) { add_atomic_switch_msr_special(VM_ENTRY_LOAD_IA32_EFER, VM_EXIT_LOAD_IA32_EFER, ...
0
[ "CWE-20" ]
linux
bfd0a56b90005f8c8a004baf407ad90045c2b11e
140,585,209,440,311,260,000,000,000,000,000,000,000
49
nEPT: Nested INVEPT If we let L1 use EPT, we should probably also support the INVEPT instruction. In our current nested EPT implementation, when L1 changes its EPT table for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in the course of this modification already calls INVEPT. But if last level of sh...
static inline void cpu_to_le32_array(u32 *buf, unsigned int words) { while (words--) { __cpu_to_le32s(buf); buf++; } }
0
[ "CWE-703" ]
linux
bc0b96b54a21246e377122d54569eef71cec535f
248,495,025,007,556,100,000,000,000,000,000,000,000
7
crypto: Move md5_transform to lib/md5.c We are going to use this for TCP/IP sequence number and fragment ID generation. Signed-off-by: David S. Miller <davem@davemloft.net>
void CIRCNetwork::SetQuitMsg(const CString& s) { if (m_pUser->GetQuitMsg().Equals(s)) { m_sQuitMsg = ""; } else { m_sQuitMsg = s; } }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
113,911,172,159,994,200,000,000,000,000,000,000,000
7
Don't crash if user specified invalid encoding. This is CVE-2019-9917
static inline int cache_free_alien(struct kmem_cache *cachep, void *objp) { return 0; }
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
325,899,399,925,072,480,000,000,000,000,000,000,000
4
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 iw_conn_req_handler(struct iw_cm_id *cm_id, struct iw_cm_event *iw_event) { struct rdma_id_private *listen_id, *conn_id; struct rdma_cm_event event = {}; int ret = -ECONNABORTED; struct sockaddr *laddr = (struct sockaddr *)&iw_event->local_addr; struct sockaddr *raddr = (struct sockaddr *)&iw_...
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
242,553,779,566,366,050,000,000,000,000,000,000,000
69
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
void ram_mig_init(void) { qemu_mutex_init(&XBZRLE.lock); register_savevm_live(NULL, "ram", 0, 4, &savevm_ram_handlers, NULL); }
0
[ "CWE-20" ]
qemu
0be839a2701369f669532ea5884c15bead1c6e08
149,064,911,380,315,270,000,000,000,000,000,000,000
5
migration: fix parameter validation on ram load During migration, the values read from migration stream during ram load are not validated. Especially offset in host_from_stream_offset() and also the length of the writes in the callers of said function. To fix this, we need to make sure that the [offset, offset + leng...
static struct media_entity *find_entity(struct media_device *mdev, u32 id) { struct media_entity *entity; int next = id & MEDIA_ENT_ID_FLAG_NEXT; id &= ~MEDIA_ENT_ID_FLAG_NEXT; spin_lock(&mdev->lock); media_device_for_each_entity(entity, mdev) { if ((entity->id == id && !next) || (entity->id > id && nex...
0
[ "CWE-200" ]
linux
e6a623460e5fc960ac3ee9f946d3106233fd28d8
77,216,436,189,435,910,000,000,000,000,000,000,000
21
[media] media-device: fix infoleak in ioctl media_enum_entities() This fixes CVE-2014-1739. Signed-off-by: Salva Peiró <speiro@ai2.upv.es> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string) { const xmlChar *cur, *base; if ((buf == NULL) || (buf->error)) return(-1); CHECK_COMPAT(buf) if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(-1); if (xmlStrchr(string, '\"')) { if (xmlStrchr(string, '\'')) { ...
0
[ "CWE-399" ]
libxml2
213f1fe0d76d30eaed6e5853057defc43e6df2c9
119,752,592,097,450,070,000,000,000,000,000,000,000
43
CVE-2015-1819 Enforce the reader to run in constant memory One of the operation on the reader could resolve entities leading to the classic expansion issue. Make sure the buffer used for xmlreader operation is bounded. Introduce a new allocation type for the buffers for this effect.
static int smack_msg_queue_associate(struct kern_ipc_perm *isp, int msqflg) { int may; may = smack_flags_to_may(msqflg); return smk_curacc_msq(isp, may); }
0
[ "CWE-416" ]
linux
a3727a8bac0a9e77c70820655fd8715523ba3db7
310,922,243,669,790,230,000,000,000,000,000,000,000
7
selinux,smack: fix subjective/objective credential use mixups Jann Horn reported a problem with commit eb1231f73c4d ("selinux: clarify task subjective and objective credentials") where some LSM hooks were attempting to access the subjective credentials of a task other than the current task. Generally speaking, it is ...
uint32_t Binary::page_size() const { const bool is_arm = header().cpu_type() == CPU_TYPES::CPU_TYPE_ARM || header().cpu_type() == CPU_TYPES::CPU_TYPE_ARM64; return is_arm ? 0x4000 : 0x1000; }
0
[ "CWE-703" ]
LIEF
7acf0bc4224081d4f425fcc8b2e361b95291d878
145,787,382,199,040,920,000,000,000,000,000,000,000
5
Resolve #764
SPL_METHOD(SplFileObject, ftell) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); long ret = php_stream_tell(intern->u.file.stream); if (ret == -1) { RETURN_FALSE; } else { RETURN_LONG(ret); } } /* }}} */
1
[ "CWE-190" ]
php-src
7245bff300d3fa8bacbef7897ff080a6f1c23eba
103,450,180,728,306,720,000,000,000,000,000,000,000
11
Fix bug #72262 - do not overflow int
static bool io_poll_complete(struct io_kiocb *req, __poll_t mask) __must_hold(&req->ctx->completion_lock) { struct io_ring_ctx *ctx = req->ctx; unsigned flags = IORING_CQE_F_MORE; int error; if (READ_ONCE(req->poll.canceled)) { error = -ECANCELED; req->poll.events |= EPOLLONESHOT; } else { error = mangle_p...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
283,692,119,199,551,780,000,000,000,000,000,000,000
25
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 cpu_load_update_nohz_stop(void) { unsigned long curr_jiffies = READ_ONCE(jiffies); struct rq *this_rq = this_rq(); unsigned long load; struct rq_flags rf; if (curr_jiffies == this_rq->last_load_update_tick) return; load = weighted_cpuload(this_rq); rq_lock(this_rq, &rf); update_rq_clock(this_rq); cpu_...
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
278,775,144,602,885,080,000,000,000,000,000,000,000
16
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...
Value ExpressionDateToString::evaluate(const Document& root, Variables* variables) const { const Value date = _date->evaluate(root, variables); Value formatValue; // Eagerly validate the format parameter, ignoring if nullish since the input date nullish // behavior takes precedence. if (_format) { ...
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
48,388,687,113,308,900,000,000,000,000,000,000,000
44
SERVER-49404 Enforce additional checks in $arrayToObject
static int check_version_match(void) { DYNAMIC_STRING ds_version; char version_str[NAME_CHAR_LEN + 1]; if (init_dynamic_string(&ds_version, NULL, NAME_CHAR_LEN, NAME_CHAR_LEN)) die("Out of memory"); if (run_query("show variables like 'version'", &ds_version, FALSE)) { fprintf(stderr, "Error: Failed...
0
[ "CWE-295" ]
mysql-server
b3e9211e48a3fb586e88b0270a175d2348935424
177,011,652,777,802,600,000,000,000,000,000,000,000
36
WL#9072: Backport WL#8785 to 5.5
xfs_ioc_fsgetxattr( xfs_inode_t *ip, int attr, void __user *arg) { struct fsxattr fa; memset(&fa, 0, sizeof(struct fsxattr)); xfs_ilock(ip, XFS_ILOCK_SHARED); fa.fsx_xflags = xfs_ip2xflags(ip); fa.fsx_extsize = ip->i_d.di_extsize << ip->i_mount->m_sb.sb_blocklog; fa.fsx_projid = xfs_get_projid(ip); i...
0
[ "CWE-200" ]
linux-2.6
af24ee9ea8d532e16883251a6684dfa1be8eec29
155,296,291,546,826,780,000,000,000,000,000,000,000
36
xfs: zero proper structure size for geometry calls Commit 493f3358cb289ccf716c5a14fa5bb52ab75943e5 added this call to xfs_fs_geometry() in order to avoid passing kernel stack data back to user space: + memset(geo, 0, sizeof(*geo)); Unfortunately, one of the callers of that function passes the address of a smal...
user_unsetenv(argv) char **argv; { struct userenv *uep, **insp; char *arg = argv[0]; if (strchr(arg, '=') != NULL) { option_error("unexpected = in name: %s", arg); return 0; } if (arg == '\0') { option_error("missing variable name for unset"); return 0; } for (uep = userenv_list; ue...
0
[ "CWE-415", "CWE-119" ]
ppp
7658e8257183f062dc01f87969c140707c7e52cb
228,814,138,990,809,150,000,000,000,000,000,000,000
47
pppd: Eliminate potential integer overflow in option parsing When we are reading in a word from an options file, we maintain a count of the length we have seen so far in 'len', which is an int. When len exceeds MAXWORDLEN - 1 (i.e. 1023) we cease storing characters in the buffer but we continue to increment len. Sin...
static int call_netdevice_notifiers_extack(unsigned long val, struct net_device *dev, struct netlink_ext_ack *extack) { struct netdev_notifier_info info = { .dev = dev, .extack = extack, }; return call_netdevice_notifiers_info(val, &info); }
0
[ "CWE-416" ]
linux
a4270d6795b0580287453ea55974d948393e66ef
93,169,594,737,079,900,000,000,000,000,000,000,000
11
net-gro: fix use-after-free read in napi_gro_frags() If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might be freed and reused. Reading eth->h_proto at the en...
static int nft_parse_register(const struct nlattr *attr, u32 *preg) { unsigned int reg; reg = ntohl(nla_get_be32(attr)); switch (reg) { case NFT_REG_VERDICT...NFT_REG_4: *preg = reg * NFT_REG_SIZE / NFT_REG32_SIZE; break; case NFT_REG32_00...NFT_REG32_15: *preg = reg + NFT_REG_SIZE / NFT_REG32_SIZE - NFT_RE...
0
[]
net
520778042ccca019f3ffa136dd0ca565c486cedd
150,082,983,446,303,300,000,000,000,000,000,000,000
18
netfilter: nf_tables: disallow non-stateful expression in sets earlier Since 3e135cd499bf ("netfilter: nft_dynset: dynamic stateful expression instantiation"), it is possible to attach stateful expressions to set elements. cd5125d8f518 ("netfilter: nf_tables: split set destruction in deactivate and destroy phase") in...
quote_system_arg (char *quoted, char const *arg) { char *q = quotearg_style (shell_quoting_style, arg); size_t len = strlen (q); if (quoted) memcpy (quoted, q, len + 1); return len; }
0
[ "CWE-22" ]
patch
685a78b6052f4df6eac6d625a545cfb54a6ac0e1
238,229,761,286,276,740,000,000,000,000,000,000
9
Do not let a malicious patch create files above current directory This addresses CVE-2010-4651, reported by Jakub Wilk. https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2010-4651 * src/util.c (strip_leading_slashes): Reject absolute file names and file names containing a component of "..". * tests/bad-filenames: New fi...
R_API RBinObject *r_bin_cur_object(RBin *bin) { RBinFile *binfile = r_bin_cur (bin); return binfile? binfile->o: NULL; }
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
108,045,538,136,257,930,000,000,000,000,000,000,000
4
Fix #8748 - Fix oobread on string search
static void FV_ChangeGID(FontView *fv,int gid) { FVChangeChar(fv,fv->b.map->backmap[gid]); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
251,607,140,983,462,570,000,000,000,000,000,000,000
3
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
xmlDocPtr soap_xmlParseFile(const char *filename) { xmlParserCtxtPtr ctxt = NULL; xmlDocPtr ret; zend_bool old_allow_url_fopen; /* xmlInitParser(); */ old_allow_url_fopen = PG(allow_url_fopen); PG(allow_url_fopen) = 1; ctxt = xmlCreateFileParserCtxt(filename); PG(allow_url_fopen) = old_allow_url_fopen; if (c...
0
[ "CWE-476" ]
php-src
3c939e3f69955d087e0bb671868f7267dfb2a502
176,813,140,269,662,780,000,000,000,000,000,000,000
53
Fix bug #80672 - Null Dereference in SoapClient
send_ldap_result( Slapi_PBlock *pb, int err, char *matched, char *text, int nentries, struct berval **urls) { send_ldap_result_ext(pb, err, matched, text, nentries, urls, NULL); }
0
[ "CWE-399", "CWE-203" ]
389-ds-base
cc0f69283abc082488824702dae485b8eae938bc
255,019,011,103,203,670,000,000,000,000,000,000,000
10
Issue 4480 - Unexpected info returned to ldap request (#4491) Bug description: If the bind entry does not exist, the bind result info reports that 'No such entry'. It should not give any information if the target entry exists or not Fix description: Does not return any additional information d...
static inline u_int8_t instance_hashfn(u_int16_t queue_num) { return ((queue_num >> 8) ^ queue_num) % INSTANCE_BUCKETS; }
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
295,249,884,310,155,670,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...
void Field_float::sql_type(String &res) const { if (dec >= FLOATING_POINT_DECIMALS) { res.set_ascii(STRING_WITH_LEN("float")); } else { CHARSET_INFO *cs= res.charset(); res.length(cs->cset->snprintf(cs,(char*) res.ptr(),res.alloced_length(), "float(%d,%d)",(int) field_length,dec)); } ad...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
176,462,825,123,722,670,000,000,000,000,000,000,000
14
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
getString(struct SWF_ACTIONPUSHPARAM *act) { char *t; #ifdef DEBUG printf("*getString* type=%d\n",act->Type); #endif switch( act->Type ) { case PUSH_STRING: if (!act->p.String) /* Not a NULL string */ { SWF_warn("WARNING: Call to getString with NULL string.\n"); break; } t=malloc(strl...
0
[ "CWE-119", "CWE-125" ]
libming
da9d86eab55cbf608d5c916b8b690f5b76bca462
48,501,307,199,204,230,000,000,000,000,000,000,000
96
decompileAction: Prevent heap buffer overflow and underflow with using OpCode
Object PDFDoc::createTrailerDict(int uxrefSize, bool incrUpdate, Goffset startxRef, Ref *root, XRef *xRef, const char *fileName, Goffset fileSize) { Dict *trailerDict = new Dict(xRef); trailerDict->set("Size", Object(uxrefSize)); //build a new ID, as recommended in the reference, ...
0
[ "CWE-20" ]
poppler
9fd5ec0e6e5f763b190f2a55ceb5427cfe851d5f
304,966,838,813,807,300,000,000,000,000,000,000,000
85
PDFDoc::setup: Fix return value At that point xref can have gone wrong since extractPDFSubtype() can have caused a reconstruct that broke stuff so instead of unconditionally returning true, return xref->isOk() Fixes #706