func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void handle_rx(struct vhost_net *net) { struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX]; struct vhost_virtqueue *vq = &nvq->vq; unsigned uninitialized_var(in), log; struct vhost_log *vq_log; struct msghdr msg = { .msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, /* FIXME: get and h...
1
[ "CWE-787" ]
linux
e2b3b35eb9896f26c98b9a2c047d9111638059a2
23,595,605,538,998,923,000,000,000,000,000,000,000
133
vhost_net: batch used ring update in rx This patch tries to batched used ring update during RX. This is pretty fit for the case when guest is much faster (e.g dpdk based backend). In this case, used ring is almost empty: - we may get serious cache line misses/contending on both used ring and used idx. - at most 1 p...
smtp_transport_get_name (CamelService *service, gboolean brief) { CamelNetworkSettings *network_settings; CamelSettings *settings; gchar *host; gchar *name; settings = camel_service_ref_settings (service); network_settings = CAMEL_NETWORK_SETTINGS (settings); host = camel_network_setti...
0
[ "CWE-74" ]
evolution-data-server
ba82be72cfd427b5d72ff21f929b3a6d8529c4df
339,204,745,473,276,300,000,000,000,000,000,000,000
26
I#226 - CVE-2020-14928: Response Injection via STARTTLS in SMTP and POP3 Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/226
static int virtnet_poll(struct napi_struct *napi, int budget) { struct receive_queue *rq = container_of(napi, struct receive_queue, napi); unsigned int r, received; received = virtnet_receive(rq, budget); /* Out of packets? */ if (received < budget) { r = virtqueue_enable_cb_prepare(rq->vq); napi_complete(...
0
[ "CWE-119", "CWE-787" ]
linux
48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39
112,151,508,581,749,950,000,000,000,000,000,000,000
21
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...
static void nci_req_cancel(struct nci_dev *ndev, int err) { if (ndev->req_status == NCI_REQ_PEND) { ndev->req_result = err; ndev->req_status = NCI_REQ_CANCELED; complete(&ndev->req_completion); } }
0
[]
linux
48b71a9e66c2eab60564b1b1c85f4928ed04e406
156,210,393,144,122,640,000,000,000,000,000,000,000
8
NFC: add NCI_UNREG flag to eliminate the race There are two sites that calls queue_work() after the destroy_workqueue() and lead to possible UAF. The first site is nci_send_cmd(), which can happen after the nci_close_device as below nfcmrvl_nci_unregister_dev | nfc_genl_dev_up nci_close_device | f...
int rand_drbg_enable_locking(RAND_DRBG *drbg) { if (drbg->state != DRBG_UNINITIALISED) { RANDerr(RAND_F_RAND_DRBG_ENABLE_LOCKING, RAND_R_DRBG_ALREADY_INITIALIZED); return 0; } if (drbg->lock == NULL) { if (drbg->parent != NULL && drbg->parent->lock == NULL) { ...
0
[ "CWE-330" ]
openssl
1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be
221,532,285,184,932,970,000,000,000,000,000,000,000
25
drbg: ensure fork-safety without using a pthread_atfork handler When the new OpenSSL CSPRNG was introduced in version 1.1.1, it was announced in the release notes that it would be fork-safe, which the old CSPRNG hadn't been. The fork-safety was implemented using a fork count, which was incremented by a pthread_atfork...
static inline int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) { return 0; }
0
[ "CWE-416" ]
linux
362bca57f5d78220f8b5907b875961af9436e229
43,816,813,485,364,970,000,000,000,000,000,000,000
1
ALSA: pcm: prevent UAF in snd_pcm_info When the device descriptor is closed, the `substream->runtime` pointer is freed. But another thread may be in the ioctl handler, case SNDRV_CTL_IOCTL_PCM_INFO. This case calls snd_pcm_info_user() which calls snd_pcm_info() which accesses the now freed `substream->runtime`. Note:...
static int dtls1_preprocess_fragment(SSL *s, struct hm_header_st *msg_hdr) { size_t frag_off, frag_len, msg_len; msg_len = msg_hdr->msg_len; frag_off = msg_hdr->frag_off; frag_len = msg_hdr->frag_len; /* sanity checking */ if ((frag_off + frag_len) > msg_len || msg_len > dtls1_max_...
0
[ "CWE-399" ]
openssl
df6b5e29ffea2d5a3e08de92fb765fdb21c7a21e
214,408,836,598,678,500,000,000,000,000,000,000,000
41
Excessive allocation of memory in dtls1_preprocess_fragment() This issue is very similar to CVE-2016-6307 described in the previous commit. The underlying defect is different but the security analysis and impacts are the same except that it impacts DTLS. A DTLS message includes 3 bytes for its length in the header fo...
expectation_create(struct conntrack *ct, ovs_be16 dst_port, const struct conn *master_conn, bool reply, bool src_ip_wc, bool skip_nat) { struct ct_addr src_addr; struct ct_addr dst_addr; struct ct_addr alg_nat_repl_addr; struct alg_exp_node *alg_exp_node = xzalloc(s...
0
[ "CWE-400" ]
ovs
abd7a457652e6734902720fe6a5dddb3fc0d1e3b
219,982,167,940,649,130,000,000,000,000,000,000,000
70
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
get_pdf14_clist_device_proto(gx_device * dev, pdf14_clist_device ** pdevproto, pdf14_clist_device * ptempdevproto, gs_gstate * pgs, const gs_pdf14trans_t * pdf14pct, bool use_pdf14_accum) { bool using_blend_cs; pdf14_default_colorspace_t dev_cs = pdf14_determine_default_blend_cs(...
0
[ "CWE-416" ]
ghostpdl
90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb
252,222,354,595,425,740,000,000,000,000,000,000,000
94
Bug 697456. Dont create new ctx when pdf14 device reenabled This bug had yet another weird case where the user created a file that pushed the pdf14 device twice. We were in that case, creating a new ctx and blowing away the original one with out proper clean up. To avoid, only create a new one when we need it.
send_vhost_reply(int sockfd, struct VhostUserMsg *msg) { if (!msg) return 0; msg->flags &= ~VHOST_USER_VERSION_MASK; msg->flags &= ~VHOST_USER_NEED_REPLY; msg->flags |= VHOST_USER_VERSION; msg->flags |= VHOST_USER_REPLY_MASK; return send_vhost_message(sockfd, msg); }
0
[]
dpdk
612e17cf6d7b2bf05a687d8a9ba7be582a744e50
121,581,550,859,463,840,000,000,000,000,000,000,000
12
vhost: fix possible denial of service on SET_VRING_NUM vhost_user_set_vring_num() performs multiple allocations without checking whether data were previously allocated. It may cause a denial of service because of the memory leaks that happen if a malicious vhost-user master keeps sending VHOST_USER_SET_VRING_NUM requ...
ExpressionDateFromString::ExpressionDateFromString( const boost::intrusive_ptr<ExpressionContext>& expCtx, intrusive_ptr<Expression> dateString, intrusive_ptr<Expression> timeZone, intrusive_ptr<Expression> format, intrusive_ptr<Expression> onNull, intrusive_ptr<Expression> onError) : Expres...
0
[ "CWE-190" ]
mongo
21d8699ed6c517b45e1613e20231cd8eba894985
202,739,551,135,761,700,000,000,000,000,000,000,000
18
SERVER-43699 $mod should not overflow for large negative values
static int jpc_dec_tileinit(jpc_dec_t *dec, jpc_dec_tile_t *tile) { jpc_dec_tcomp_t *tcomp; int compno; int rlvlno; jpc_dec_rlvl_t *rlvl; jpc_dec_band_t *band; jpc_dec_prc_t *prc; int bndno; jpc_tsfb_band_t *bnd; int bandno; jpc_dec_ccp_t *ccp; int prccnt; jpc_dec_cblk_t *cblk; int cblkcnt; uint_fast32_t ...
1
[ "CWE-787" ]
jasper
e2f2e5f4022baef2386eec25c57b63debfe4cb20
9,910,229,290,184,567,000,000,000,000,000,000,000
284
jas_seq: check bounds in jas_seq2d_bindsub() Fixes CVE-2017-5503, CVE-2017-5504, CVE-2017-5505, Closes https://github.com/jasper-maint/jasper/issues/3 Closes https://github.com/jasper-maint/jasper/issues/4 Closes https://github.com/jasper-maint/jasper/issues/5 Closes https://github.com/mdadams/jasper/issues/88 Closes...
void mono_thread_new_init (intptr_t tid, gpointer stack_start, gpointer func) { if (mono_thread_start_cb) { mono_thread_start_cb (tid, stack_start, func); } }
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
171,715,149,584,621,330,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
UTFstring EbmlUnicodeString::GetValue() const { return Value; }
0
[ "CWE-200", "CWE-703" ]
libebml
ababb64e0c792ad2a314245233db0833ba12036b
141,039,738,932,288,700,000,000,000,000,000,000,000
3
EbmlUnicodeString: don't read beyond end of string The conversion from an UTF-8 encoded string into a wchar_t one was reading from beyond the end of the source buffer if the length indicated by a UTF-8 character's first byte exceeds the number of bytes actually present afterwards. Fixes the issue reported as Cisco TA...
switch (yych) { case 'a': goto yy39; default: goto yy36; }
1
[ "CWE-787" ]
re2c
039c18949190c5de5397eba504d2c75dad2ea9ca
296,546,945,221,019,060,000,000,000,000,000,000,000
4
Emit an error when repetition lower bound exceeds upper bound. Historically this was allowed and re2c swapped the bounds. However, it most likely indicates an error in user code and there is only a single occurrence in the tests (and the test in an artificial one), so although the change is backwards incompatible ther...
static inline void io_put_file(struct io_kiocb *req, struct file *file, bool fixed) { if (fixed) percpu_ref_put(req->fixed_file_refs); else fput(file); }
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
232,920,944,051,610,800,000,000,000,000,000,000,000
8
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
DirectFunctionCall4Coll(PGFunction func, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4) { FunctionCallInfoData fcinfo; Datum result; InitFunctionCallInfoData(fcinfo, NULL, 4, collation, NULL, NULL); fcinfo.arg[0] = arg1; fcinfo.arg[1] = arg2; fcinfo.arg[2] = arg3; fcinfo.arg[3] = arg4; ...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
82,494,750,561,187,770,000,000,000,000,000,000,000
25
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
ModuleExport void UnregisterTIM2Image(void) { (void) UnregisterMagickInfo("TM2"); }
0
[ "CWE-617" ]
ImageMagick
716496e6df0add89e9679d6da9c0afca814cfe49
158,472,975,407,531,540,000,000,000,000,000,000,000
4
do not attempt to write a null image list (thanks to Vinay Rohila)
collect_types (MonoPtrArray *types, MonoReflectionTypeBuilder *type) { int i; mono_ptr_array_append (*types, type); if (!type->subtypes) return; for (i = 0; i < mono_array_length (type->subtypes); ++i) { MonoReflectionTypeBuilder *subtype = mono_array_get (type->subtypes, MonoReflectionTypeBuilder*, i); co...
0
[ "CWE-20" ]
mono
65292a69c837b8a5f7a392d34db63de592153358
58,092,514,973,867,560,000,000,000,000,000,000,000
14
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
static int prealloc_init(struct bpf_htab *htab) { u32 num_entries = htab->map.max_entries; int err = -ENOMEM, i; if (!htab_is_percpu(htab) && !htab_is_lru(htab)) num_entries += num_possible_cpus(); htab->elems = bpf_map_area_alloc((u64)htab->elem_size * num_entries, htab->map.numa_node); if (!htab->elems...
0
[ "CWE-787" ]
bpf
c4eb1f403243fc7bbb7de644db8587c03de36da6
136,566,702,488,074,810,000,000,000,000,000,000,000
58
bpf: Fix integer overflow involving bucket_size In __htab_map_lookup_and_delete_batch(), hash buckets are iterated over to count the number of elements in each bucket (bucket_size). If bucket_size is large enough, the multiplication to calculate kvmalloc() size could overflow, resulting in out-of-bounds write as repor...
R_API RList *r_bin_file_get_symbols(RBinFile *bf) { r_return_val_if_fail (bf, NULL); RBinObject *o = bf->o; return o? o->symbols: NULL; }
0
[ "CWE-125" ]
radare2
193f4fe01d7f626e2ea937450f2e0c4604420e9d
31,628,199,191,315,220,000,000,000,000,000,000,000
5
Fix integer overflow in string search causing oobread ##crash * Reported by @greatergoodest via huntrdev * BountyID: 8a3dc5cb-08b3-4807-82b2-77f08c137a04 * Reproducer bfileovf
static int nfs4_do_open_expired(struct nfs_open_context *ctx, struct nfs4_state *state) { struct nfs_server *server = NFS_SERVER(state->inode); struct nfs4_exception exception = { }; int err; do { err = _nfs4_open_expired(ctx, state); trace_nfs4_open_expired(ctx, 0, err); if (nfs4_clear_cap_atomic_open_v1(se...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
301,960,486,244,775,560,000,000,000,000,000,000,000
23
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
exit_pfm_fs(void) { unregister_filesystem(&pfm_fs_type); mntput(pfmfs_mnt); }
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
340,092,058,606,833,950,000,000,000,000,000,000,000
5
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
domain_compare(const void *arg1, const void *arg2) { const fuid_domain_t *node1 = (const fuid_domain_t *)arg1; const fuid_domain_t *node2 = (const fuid_domain_t *)arg2; int val; val = strcmp(node1->f_ksid->kd_name, node2->f_ksid->kd_name); return (TREE_ISIGN(val)); }
0
[ "CWE-200", "CWE-732" ]
zfs
716b53d0a14c72bda16c0872565dd1909757e73f
113,172,049,428,722,270,000,000,000,000,000,000,000
10
FreeBSD: Fix UNIX permissions checking Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10727
void gf_filter_get_clock_hint(GF_Filter *filter, u64 *time_in_us, GF_Fraction64 *media_timestamp) { //for now only one clock hint possible ... if (time_in_us) *time_in_us = filter->session->hint_clock_us; if (media_timestamp) *media_timestamp = filter->session->hint_timestamp; }
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
54,973,356,267,914,650,000,000,000,000,000,000,000
6
fixed crashes for very long path - cf #1908
int sock_no_shutdown(struct socket *sock, int how) { return -EOPNOTSUPP; }
0
[ "CWE-264" ]
linux-2.6
df0bca049d01c0ee94afb7cd5dfd959541e6c8da
322,607,708,780,241,550,000,000,000,000,000,000,000
4
net: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2 In function sock_getsockopt() located in net/core/sock.c, optval v.val is not correctly initialized and directly returned in userland in case we have SO_BSDCOMPAT option set. This dummy code should trigger the bug: int main(void) { unsigned char buf...
static int do_change_type(struct path *path, int flag) { struct mount *m; struct mount *mnt = real_mount(path->mnt); int recurse = flag & MS_REC; int type; int err = 0; if (path->dentry != path->mnt->mnt_root) return -EINVAL; type = flags_to_propagation_type(flag); if (!type) return -EINVAL; namespace_l...
0
[ "CWE-269" ]
user-namespace
a6138db815df5ee542d848318e5dae681590fccd
103,313,290,904,396,580,000,000,000,000,000,000,000
31
mnt: Only change user settable mount flags in remount Kenton Varda <kenton@sandstorm.io> discovered that by remounting a read-only bind mount read-only in a user namespace the MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user to the remount a read-only mount read-write. Correct this by replacing t...
int ipv4_rcv_saddr_equal(const struct sock *sk1, const struct sock *sk2, bool match_wildcard) { struct inet_sock *inet1 = inet_sk(sk1), *inet2 = inet_sk(sk2); if (!ipv6_only_sock(sk2)) { if (inet1->inet_rcv_saddr == inet2->inet_rcv_saddr) return 1; if (!inet1->inet_rcv_saddr || !inet2->inet_rcv_saddr) ...
0
[]
linux
a612769774a30e4fc143c4cb6395c12573415660
195,278,903,505,321,820,000,000,000,000,000,000,000
13
udp: prevent bugcheck if filter truncates packet too much If socket filter truncates an udp packet below the length of UDP header in udpv6_queue_rcv_skb() or udp_queue_rcv_skb(), it will trigger a BUG_ON in skb_pull_rcsum(). This BUG_ON (and therefore a system crash if kernel is configured that way) can be easily enfo...
cifs_reconnect(struct TCP_Server_Info *server) { int rc = 0; struct list_head *tmp, *tmp2; struct cifs_ses *ses; struct cifs_tcon *tcon; struct mid_q_entry *mid_entry; struct list_head retry_list; spin_lock(&GlobalMid_Lock); if (server->tcpStatus == CifsExiting) { /* the demux thread will exit normally nex...
0
[ "CWE-703", "CWE-189" ]
linux
1fc29bacedeabb278080e31bb9c1ecb49f143c3b
32,653,525,478,339,162,000,000,000,000,000,000,000
99
cifs: fix off-by-one bug in build_unc_path_to_root commit 839db3d10a (cifs: fix up handling of prefixpath= option) changed the code such that the vol->prepath no longer contained a leading delimiter and then fixed up the places that accessed that field to account for that change. One spot in build_unc_path_to_root wa...
void buildDummyLexicalParent( IRBuilder &builder, Function *parent, Function *child) { // FunctionScopeAnalysis works through CreateFunctionInsts, so we have to add // that even though these functions are never invoked. auto *block = builder.createBasicBlock(parent); builder.setInsertionBlock(block)...
0
[ "CWE-125", "CWE-787" ]
hermes
091835377369c8fd5917d9b87acffa721ad2a168
225,090,852,107,015,940,000,000,000,000,000,000,000
12
Correctly restore whether or not a function is an inner generator Summary: If a generator was large enough to be lazily compiled, we would lose that information when reconstituting the function's context. This meant the function was generated as a regular function instead of a generator. #utd-hermes-ignore-android R...
static struct inode_security_struct *inode_security(struct inode *inode) { __inode_security_revalidate(inode, NULL, true); return selinux_inode(inode); }
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
294,745,296,448,430,570,000,000,000,000,000,000,000
5
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
void _xml_endElementHandler(void *userData, const XML_Char *name) { xml_parser *parser = (xml_parser *)userData; char *tag_name; if (parser) { zval *retval, *args[2]; tag_name = _xml_decode_tag(parser, name); if (parser->endElementHandler) { args[0] = _xml_resource_zval(parser->index); args[1] = _xml_...
1
[ "CWE-787" ]
php-src
7d163e8a0880ae8af2dd869071393e5dc07ef271
129,312,427,805,909,900,000,000,000,000,000,000,000
50
truncate results at depth of 255 to prevent corruption
TEST_F(Http1ServerConnectionImplTest, HeaderInvalidCharsRuntimeGuard) { TestScopedRuntime scoped_runtime; // When the runtime-guarded feature is NOT enabled, invalid header values // should be accepted by the codec. Runtime::LoaderSingleton::getExisting()->mergeValues( {{"envoy.reloadable_features.strict_...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
69,992,494,592,502,280,000,000,000,000,000,000,000
17
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
termcapinit(char_u *name) { char_u *term; if (name != NULL && *name == NUL) name = NULL; // empty name is equal to no name term = name; #ifndef MSWIN if (term == NULL) term = mch_getenv((char_u *)"TERM"); #endif if (term == NULL || *term == NUL) term = DEFAULT_TERM; set_string_option_di...
0
[ "CWE-125", "CWE-787" ]
vim
e178af5a586ea023622d460779fdcabbbfac0908
338,264,938,504,954,000,000,000,000,000,000,000,000
25
patch 8.2.5160: accessing invalid memory after changing terminal size Problem: Accessing invalid memory after changing terminal size. Solution: Adjust cmdline_row and msg_row to the value of Rows.
static int incrAggDepth(Walker *pWalker, Expr *pExpr){ if( pExpr->op==TK_AGG_FUNCTION ) pExpr->op2 += pWalker->u.n; return WRC_Continue; }
0
[ "CWE-416" ]
sqlite
4ded26a53c4df312e9fd06facbbf70377e969983
91,442,703,910,497,300,000,000,000,000,000,000,000
4
Prevent aliases of window functions expressions from being used as arguments to aggregate or other window functions. FossilOrigin-Name: 1e16d3e8fc60d39ca3899759ff15d355fdd7d3e23b325d8d2b0f954e11ce8dce
static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *set, struct pt_regs *regs) { struct rt_sigframe __user *frame; void __user *fp = NULL; int err = 0; struct task_struct *me = current; frame = get_sigframe(ka, regs, sizeof(struct rt_sigframe), &fp); if (!access_ok(VER...
0
[ "CWE-400" ]
linux-stable-rt
bcf6b1d78c0bde228929c388978ed3af9a623463
171,876,838,196,784,440,000,000,000,000,000,000,000
65
signal/x86: Delay calling signals in atomic On x86_64 we must disable preemption before we enable interrupts for stack faults, int3 and debugging, because the current task is using a per CPU debug stack defined by the IST. If we schedule out, another task can come in and use the same stack and cause the stack to be co...
static int tcp_prune_queue(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); SOCK_DEBUG(sk, "prune_queue: c=%x\n", tp->copied_seq); NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_PRUNECALLED); if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf) tcp_clamp_window(sk); else if (tcp_under_memory_pressure(sk)) tp...
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
323,226,108,881,186,120,000,000,000,000,000,000,000
42
tcp: fix zero cwnd in tcp_cwnd_reduction Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode conditionally") introduced a bug that cwnd may become 0 when both inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead to a div-by-zero if the connection starts another cwnd reduction phase by set...
mrb_proc_copy(struct RProc *a, struct RProc *b) { if (a->body.irep) { /* already initialized proc */ return; } a->flags = b->flags; a->body = b->body; if (!MRB_PROC_CFUNC_P(a) && a->body.irep) { mrb_irep_incref(NULL, (mrb_irep*)a->body.irep); } a->upper = b->upper; a->e.env = b->e.env; /* ...
1
[ "CWE-476", "CWE-190" ]
mruby
f5e10c5a79a17939af763b1dcf5232ce47e24a34
68,876,210,894,936,950,000,000,000,000,000,000,000
15
proc.c: add `mrb_state` argument to `mrb_proc_copy()`. The function may invoke the garbage collection and it requires `mrb_state` to run.
cb_logfile(const union sudo_defs_val *sd_un) { int logtype = def_syslog ? EVLOG_SYSLOG : EVLOG_NONE; debug_decl(cb_logfile, SUDOERS_DEBUG_PLUGIN); if (sd_un->str != NULL) SET(logtype, EVLOG_FILE); eventlog_set_type(logtype); eventlog_set_logpath(sd_un->str); debug_return_bool(true); }
0
[ "CWE-193" ]
sudo
1f8638577d0c80a4ff864a2aad80a0d95488e9a8
124,382,200,503,010,030,000,000,000,000,000,000,000
12
Fix potential buffer overflow when unescaping backslashes in user_args. Also, do not try to unescaping backslashes unless in run mode *and* we are running the command via a shell. Found by Qualys, this fixes CVE-2021-3156.
\param fps Number of desired frames per second. \param nb_loops Number of loops (\c 0 for infinite looping). **/ const CImgList<T>& save_gif_external(const char *const filename, const float fps=25, const unsigned int nb_loops=0) { CImg<charT> command(...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
187,297,856,775,710,480,000,000,000,000,000,000,000
45
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void process_read_by_type(struct async_read_op *op) { struct bt_gatt_server *server = op->server; uint8_t ecode; struct gatt_db_attribute *attr; attr = queue_pop_head(op->db_data); if (op->done || !attr) { bt_att_chan_send_rsp(op->chan, BT_ATT_OP_READ_BY_TYPE_RSP, op->pdu, op->pdu_len); async_re...
1
[ "CWE-287" ]
bluez
00da0fb4972cf59e1c075f313da81ea549cb8738
248,003,259,749,729,600,000,000,000,000,000,000,000
32
shared/gatt-server: Fix not properly checking for secure flags When passing the mask to check_permissions all valid permissions for the operation must be set including BT_ATT_PERM_SECURE flags.
static int m560_input_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max) { return -1; }
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
334,792,256,988,736,200,000,000,000,000,000,000,000
6
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
void CalculateFirstParentOutputIndex(INDEX_TYPE first_dimension, INDEX_TYPE output_index_multiplier, INDEX_TYPE first_dimension_output, vector<INDEX_TYPE>* result) { const INDEX_TYPE min_dimension ...
0
[ "CWE-131", "CWE-369" ]
tensorflow
f94ef358bb3e91d517446454edff6535bcfe8e4a
314,410,884,731,342,930,000,000,000,000,000,000,000
17
Fix `tf.raw_ops.RaggedTensorToTensor` failing CHECK in `tensor.cc`. PiperOrigin-RevId: 368300502 Change-Id: I91255d23c4bfd3aa3c029aac773937c09daf3c64
static BOOL update_read_mem3blt_order(wStream* s, const ORDER_INFO* orderInfo, MEM3BLT_ORDER* mem3blt) { ORDER_FIELD_UINT16(1, mem3blt->cacheId); ORDER_FIELD_COORD(2, mem3blt->nLeftRect); ORDER_FIELD_COORD(3, mem3blt->nTopRect); ORDER_FIELD_COORD(4, mem3blt->nWidth); ORDER_FIE...
0
[ "CWE-415" ]
FreeRDP
67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8
156,181,595,274,882,250,000,000,000,000,000,000,000
23
Fixed #6013: Check new length is > 0
int rtl_usb_probe(struct usb_interface *intf, const struct usb_device_id *id, struct rtl_hal_cfg *rtl_hal_cfg) { int err; struct ieee80211_hw *hw = NULL; struct rtl_priv *rtlpriv = NULL; struct usb_device *udev; struct rtl_usb_priv *usb_priv; hw = ieee80211_alloc_hw(sizeof(struct rtl_priv) + sizeof(s...
1
[ "CWE-400", "CWE-401" ]
linux
3f93616951138a598d930dcaec40f2bfd9ce43bb
297,388,059,885,269,400,000,000,000,000,000,000,000
84
rtlwifi: prevent memory leak in rtl_usb_probe In rtl_usb_probe if allocation for usb_data fails the allocated hw should be released. In addition the allocated rtlpriv->usb_data should be released on error handling path. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeau...
unsigned int zipStorePrevEntryLength(unsigned char *p, unsigned int len) { if (p == NULL) { return (len < ZIP_BIG_PREVLEN) ? 1 : sizeof(len)+1; } else { if (len < ZIP_BIG_PREVLEN) { p[0] = len; return 1; } else { return zipStorePrevEntryLengthLarge(p,l...
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
244,364,904,377,170,320,000,000,000,000,000,000,000
12
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
check_eventloop_interp(void) { DUMP1("check eventloop_interp"); if (eventloop_interp != (Tcl_Interp*)NULL && Tcl_InterpDeleted(eventloop_interp)) { DUMP2("eventloop_interp(%p) was deleted", eventloop_interp); return 1; } return 0; }
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
294,909,908,895,167,300,000,000,000,000,000,000,000
11
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Error color_profile_nclx::parse(BitstreamRange& range) { StreamReader::grow_status status; status = range.wait_for_available_bytes(7); if (status != StreamReader::size_reached) { // TODO: return recoverable error at timeout return Error(heif_error_Invalid_input, heif_suberror_End_of_data)...
0
[ "CWE-703" ]
libheif
2710c930918609caaf0a664e9c7bc3dce05d5b58
117,973,691,670,413,040,000,000,000,000,000,000,000
17
force fraction to a limited resolution to finally solve those pesky numerical edge cases
cmsStage* _cmsStageAllocLabV2ToV4curves(cmsContext ContextID) { cmsStage* mpe; cmsToneCurve* LabTable[3]; int i, j; LabTable[0] = cmsBuildTabulatedToneCurve16(ContextID, 258, NULL); LabTable[1] = cmsBuildTabulatedToneCurve16(ContextID, 258, NULL); LabTable[2] = cmsBuildTabulatedToneCurve16(Cont...
0
[]
Little-CMS
b0d5ffd4ad91cf8683ee106f13742db3dc66599a
315,254,595,584,957,500,000,000,000,000,000,000,000
34
Memory Squeezing: LCMS2: CLUTElemDup Check for allocation failures and tidy up if found.
QMap<QPair<QString, unsigned short>, unsigned int> Database::getPingCache() { QSqlQuery query; QMap<QPair<QString, unsigned short>, unsigned int> map; query.prepare(QLatin1String("SELECT `hostname`, `port`, `ping` FROM `pingcache`")); query.exec(); while (query.next()) { map.insert(QPair<QString, unsigned short...
0
[ "CWE-310" ]
mumble
5632c35d6759f5e13a7dfe78e4ee6403ff6a8e3e
134,676,932,238,337,900,000,000,000,000,000,000,000
11
Explicitly remove file permissions for settings and DB
map_attribute_to_value_type (CK_ATTRIBUTE_TYPE type) { switch (type) { case CKA_TOKEN: case CKA_PRIVATE: case CKA_TRUSTED: case CKA_SENSITIVE: case CKA_ENCRYPT: case CKA_DECRYPT: case CKA_WRAP: case CKA_UNWRAP: case CKA_SIGN: case CKA_SIGN_RECOVER: case CKA_VERIFY: case CKA_VERIFY_RECOVER: case CKA_DERIVE...
0
[ "CWE-787" ]
p11-kit
2617f3ef888e103324a28811886b99ed0a56346d
210,418,704,553,110,280,000,000,000,000,000,000,000
100
Check attribute length against buffer size If an attribute's length does not match the length of the byte array inside it, one length was used for allocation, and the other was used for memcpy. This additional check will instead return an error on malformed messages.
blk_qc_t generic_make_request(struct bio *bio) { /* * bio_list_on_stack[0] contains bios submitted by the current * make_request_fn. * bio_list_on_stack[1] contains bios that were submitted before * the current make_request_fn, but that haven't been processed * yet. */ struct bio_list bio_list_on_stack[2]...
0
[ "CWE-416", "CWE-703" ]
linux
54648cf1ec2d7f4b6a71767799c45676a138ca24
148,090,285,280,533,570,000,000,000,000,000,000,000
115
block: blk_init_allocated_queue() set q->fq as NULL in the fail case We find the memory use-after-free issue in __blk_drain_queue() on the kernel 4.14. After read the latest kernel 4.18-rc6 we think it has the same problem. Memory is allocated for q->fq in the blk_init_allocated_queue(). If the elevator init function...
check_arg_idx(win_T *win) { if (WARGCOUNT(win) > 1 && !editing_arg_idx(win)) { // We are not editing the current entry in the argument list. // Set "arg_had_last" if we are editing the last one. win->w_arg_idx_invalid = TRUE; if (win->w_arg_idx != WARGCOUNT(win) - 1 && arg_had_last == FALSE && ALIST(win...
0
[ "CWE-416", "CWE-125" ]
vim
6f98371532fcff911b462d51bc64f2ce8a6ae682
99,616,111,852,951,780,000,000,000,000,000,000,000
28
patch 8.2.3884: crash when clearing the argument list while using it Problem: Crash when clearing the argument list while using it. Solution: Lock the argument list for ":all".
static void __unhash_process(struct task_struct *p, bool group_dead) { nr_threads--; detach_pid(p, PIDTYPE_PID); if (group_dead) { detach_pid(p, PIDTYPE_TGID); detach_pid(p, PIDTYPE_PGID); detach_pid(p, PIDTYPE_SID); list_del_rcu(&p->tasks); list_del_init(&p->sibling); __this_cpu_dec(process_counts); }...
0
[ "CWE-20" ]
linux
594cc251fdd0d231d342d88b2fdff4bc42fb0690
222,524,394,092,164,470,000,000,000,000,000,000,000
16
make 'user_access_begin()' do 'access_ok()' Originally, the rule used to be that you'd have to do access_ok() separately, and then user_access_begin() before actually doing the direct (optimized) user access. But experience has shown that people then decide not to do access_ok() at all, and instead rely on it being i...
static void free_pairing_nodes(FriBidiPairingNode *nodes) { while (nodes) { FriBidiPairingNode *p = nodes; nodes = nodes->next; fribidi_free(p); } }
0
[ "CWE-120", "CWE-787" ]
fribidi
034c6e9a1d296286305f4cfd1e0072b879f52568
334,293,850,714,961,060,000,000,000,000,000,000,000
9
Truncate isolate_level to FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL
int CloseDatabase( SQLHENV hEnv, SQLHDBC hDbc ) { SQLDisconnect( hDbc ); SQLFreeConnect( hDbc ); SQLFreeEnv( hEnv ); return 1; }
0
[ "CWE-119", "CWE-369" ]
unixODBC
45ef78e037f578b15fc58938a3a3251655e71d6f
34,164,514,459,151,814,000,000,000,000,000,000,000
8
New Pre Source
compare_known_tor_addr_to_addr_policy_noport(const tor_addr_t *addr, const smartlist_t *policy) { /* We look to see if there's a definite match. If so, we return that match's value, unless there's an intervening possible match that says something different. */ ...
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
225,619,027,738,579,940,000,000,000,000,000,000,000
39
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
static void notValid( Parse *pParse, /* Leave error message here */ NameContext *pNC, /* The name context */ const char *zMsg, /* Type of error */ int validMask /* Set of contexts for which prohibited */ ){ assert( (validMask&~(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol))==0 ); if( (pNC->...
0
[ "CWE-20", "CWE-703", "CWE-681" ]
sqlite
522ebfa7cee96fb325a22ea3a2464a63485886a8
162,545,477,986,627,300,000,000,000,000,000,000,000
19
Whenever a generated column is used, assume that all columns are used. FossilOrigin-Name: 6601da58032d18ae00b466c0f2077fb2b1ecd84225b56e1787724bea478eedc9
static void hidpp_touchpad_touch_event(u8 *data, struct hidpp_touchpad_raw_xy_finger *finger) { u8 x_m = data[0] << 2; u8 y_m = data[2] << 2; finger->x = x_m << 6 | data[1]; finger->y = y_m << 6 | data[3]; finger->contact_type = data[0] >> 6; finger->contact_status = data[2] >> 6; finger->z = data[4]; finge...
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
96,478,079,797,982,900,000,000,000,000,000,000,000
16
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb) { mnt->mnt_sb = sb; mnt->mnt_root = dget(sb->s_root); return 0; }
0
[ "CWE-269" ]
linux-2.6
ee6f958291e2a768fd727e7a67badfff0b67711a
93,535,296,360,298,200,000,000,000,000,000,000,000
6
check privileges before setting mount propagation There's a missing check for CAP_SYS_ADMIN in do_change_type(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torva...
void Compute(tensorflow::OpKernelContext* context) override { for (int ngram_width : ngram_widths_) { OP_REQUIRES( context, ngram_width > 0, errors::InvalidArgument("ngram_widths must contain positive values")); } const tensorflow::Tensor* data; OP_REQUIRES_OK(context, conte...
0
[ "CWE-369", "CWE-681" ]
tensorflow
c283e542a3f422420cfdb332414543b62fc4e4a5
47,970,521,259,378,050,000,000,000,000,000,000,000
107
Disallow negative ngram_widths values in tf.raw_ops.StringNGrams PiperOrigin-RevId: 387148179 Change-Id: I641395a09a208be72ef9b3ceb128cf8a83a0775b
static int uvesafb_vbe_init_mode(struct fb_info *info) { struct list_head *pos; struct fb_modelist *modelist; struct fb_videomode *mode; struct uvesafb_par *par = info->par; int i, modeid; /* Has the user requested a specific VESA mode? */ if (vbemode) { for (i = 0; i < par->vbe_modes_cnt; i++) { if (par->...
0
[ "CWE-190" ]
linux
9f645bcc566a1e9f921bdae7528a01ced5bc3713
142,564,864,616,586,480,000,000,000,000,000,000,000
96
video: uvesafb: Fix integer overflow in allocation cmap->len can get close to INT_MAX/2, allowing for an integer overflow in allocation. This uses kmalloc_array() instead to catch the condition. Reported-by: Dr Silvio Cesare of InfoSect <silvio.cesare@gmail.com> Fixes: 8bdb3a2d7df48 ("uvesafb: the driver core") Cc: s...
grub_disk_dev_register (grub_disk_dev_t dev) { dev->next = grub_disk_dev_list; grub_disk_dev_list = dev; }
0
[ "CWE-20", "CWE-119" ]
radare2
c57997e76ec70862174a1b3b3aeb62a6f8570e85
159,460,738,481,978,200,000,000,000,000,000,000,000
5
Fix r2_hbo_grub_memmove ext2 crash
TRIO_PUBLIC trio_pointer_t trio_register TRIO_ARGS2((callback, name), trio_callback_t callback, TRIO_CONST char* name) { trio_userdef_t* def; trio_userdef_t* prev = NULL; if (callback == NULL) return NULL; if (name) { /* Handle built-in namespaces */ if (...
1
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
30,577,437,333,741,153,000,000,000,000,000,000,000
59
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.
CModule::EModRet CModule::OnDeleteUser(CUser& User) { return CONTINUE; }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
77,957,651,155,844,290,000,000,000,000,000,000,000
1
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
static void ReversePoints(PointInfo *points,const size_t number_points) { PointInfo point; ssize_t i; for (i=0; i < (ssize_t) (number_points >> 1); i++) { point=points[i]; points[i]=points[number_points-(i+1)]; points[number_points-(i+1)]=point; } }
0
[]
ImageMagick
f4cdb3f3aab28273960ffacf1d356312b56ffd27
291,397,992,783,835,080,000,000,000,000,000,000,000
15
https://github.com/ImageMagick/ImageMagick/issues/3338
inbound_topicnew (server *serv, char *nick, char *chan, char *topic, const message_tags_data *tags_data) { session *sess; char *stripped_topic; sess = find_channel (serv, chan); if (sess) { EMIT_SIGNAL_TIMESTAMP (XP_TE_NEWTOPIC, sess, nick, topic, chan, NULL, 0, tags_data->timestamp); strippe...
0
[ "CWE-22" ]
hexchat
4e061a43b3453a9856d34250c3913175c45afe9d
39,606,261,288,155,747,000,000,000,000,000,000,000
16
Clean up handling CAP LS
ZEND_API void _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC) { #ifdef ZTS ht->mx_reader = tsrm_mutex_alloc(); ht->mx_writer = tsrm_mutex_alloc(); ht->reader = 0; #endif _zend_hash_init_ex(TS_HASH(ht), nSize, pDestructor...
0
[]
php-src
2bcf69d073190e4f032d883f3416dea1b027a39e
257,047,805,214,355,970,000,000,000,000,000,000,000
9
Fixed bug #68676 (Explicit Double Free)
arguments(asdl_seq * args, arg_ty vararg, asdl_seq * kwonlyargs, asdl_seq * kw_defaults, arg_ty kwarg, asdl_seq * defaults, PyArena *arena) { arguments_ty p; p = (arguments_ty)PyArena_Malloc(arena, sizeof(*p)); if (!p) return NULL; p->args = args; p->vararg = vararg; p->kwonlya...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
25,302,353,009,538,156,000,000,000,000,000,000,000
15
bpo-35766: Merge typed_ast back into CPython (GH-11645)
ExprCreateKeyName(xkb_atom_t key_name) { EXPR_CREATE(ExprKeyName, expr, EXPR_VALUE, EXPR_TYPE_KEYNAME); expr->key_name.key_name = key_name; return expr; }
0
[ "CWE-476" ]
libxkbcommon
e3cacae7b1bfda0d839c280494f23284a1187adf
31,913,563,111,271,440,000,000,000,000,000,000,000
6
xkbcomp: fix crashes in the parser when geometry tokens appear In the XKB format, floats and various keywords can only be used in the xkb_geometry section. xkbcommon removed support xkb_geometry, but still parses it for backward compatibility. As part of ignoring it, the float AST node and various keywords were remove...
static struct wdm_device *wdm_find_device(struct usb_interface *intf) { struct wdm_device *desc; spin_lock(&wdm_device_list_lock); list_for_each_entry(desc, &wdm_device_list, device_list) if (desc->intf == intf) goto found; desc = NULL; found: spin_unlock(&wdm_device_list_lock); return desc; }
0
[ "CWE-119", "CWE-269" ]
linux
c0f5ecee4e741667b2493c742b60b6218d40b3aa
198,690,715,013,992,770,000,000,000,000,000,000,000
14
USB: cdc-wdm: fix buffer overflow The buffer for responses must not overflow. If this would happen, set a flag, drop the data and return an error after user space has read all remaining data. Signed-off-by: Oliver Neukum <oliver@neukum.org> CC: stable@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundati...
void set_device_name(py::handle v) { SetPyObject(v, &GetData()->device_name); }
0
[ "CWE-20", "CWE-476", "CWE-908" ]
tensorflow
22e07fb204386768e5bcbea563641ea11f96ceb8
163,962,317,696,249,830,000,000,000,000,000,000,000
3
Fix multiple vulnerabilities in `tf.experimental.dlpack.to_dlpack`. We have a use after free caused by memory coruption, a segmentation fault caused by memory corruption, several memory leaks and an undefined behavior when taking the reference of a nullptr. PiperOrigin-RevId: 332568894 Change-Id: Ife0fc05e103b3532509...
static void mg_ws_mask(struct mg_connection *c, size_t len) { if (c->is_client && c->send.buf != NULL) { size_t i; uint8_t *p = c->send.buf + c->send.len - len, *mask = p - 4; for (i = 0; i < len; i++) p[i] ^= mask[i & 3]; } }
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
96,684,751,900,976,620,000,000,000,000,000,000,000
7
Protect against the directory traversal in mg_upload()
mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode) { mod_ty res; PyObject *req_type[3]; char *req_name[] = {"Module", "Expression", "Interactive", "FunctionType"}; int isinstance; req_type[0] = (PyObject*)Module_type; req_type[1] = (PyObject*)Expression_type; req_type[2] = (PyObj...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
294,551,446,382,281,920,000,000,000,000,000,000,000
29
bpo-35766: Merge typed_ast back into CPython (GH-11645)
static void str_swap(pj_str_t *str1, pj_str_t *str2) { pj_str_t tmp = *str1; *str1 = *str2; *str2 = tmp; }
0
[ "CWE-400", "CWE-200", "CWE-754" ]
pjproject
97b3d7addbaa720b7ddb0af9bf6f3e443e664365
31,071,335,874,861,223,000,000,000,000,000,000,000
6
Merge pull request from GHSA-hvq6-f89p-frvp
static int fuse_writepages(struct address_space *mapping, struct writeback_control *wbc) { struct inode *inode = mapping->host; struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_fill_wb_data data; int err; err = -EIO; if (fuse_is_bad(inode)) goto out; data.inode = inode; data.wpa = NULL; data....
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
193,204,828,532,401,100,000,000,000,000,000,000,000
35
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
xfs_setup_devices( struct xfs_mount *mp) { int error; error = xfs_setsize_buftarg(mp->m_ddev_targp, mp->m_sb.sb_sectsize); if (error) return error; if (mp->m_logdev_targp && mp->m_logdev_targp != mp->m_ddev_targp) { unsigned int log_sector_size = BBSIZE; if (xfs_sb_version_hassector(&mp->m_sb)) log_s...
0
[ "CWE-416" ]
linux
c9fbd7bbc23dbdd73364be4d045e5d3612cf6e82
265,574,367,693,220,750,000,000,000,000,000,000,000
28
xfs: clear sb->s_fs_info on mount failure We recently had an oops reported on a 4.14 kernel in xfs_reclaim_inodes_count() where sb->s_fs_info pointed to garbage and so the m_perag_tree lookup walked into lala land. Essentially, the machine was under memory pressure when the mount was being run, xfs_fs_fill_super() fa...
static void flush_backlog(void *arg) { struct net_device *dev = arg; struct softnet_data *queue = &__get_cpu_var(softnet_data); struct sk_buff *skb, *tmp; skb_queue_walk_safe(&queue->input_pkt_queue, skb, tmp) if (skb->dev == dev) { __skb_unlink(skb, &queue->input_pkt_queue); kfree_skb(skb); } }
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
239,828,850,444,161,460,000,000,000,000,000,000,000
12
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos) { uint32_t idx = *pos; Bucket *p; IS_CONSISTENT(ht); if (idx != HT_INVALID_IDX) { p = ht->arData + idx; if (p->key) { return HASH_KEY_IS_STRING; } else { return HASH_KEY_IS_LONG; } } return HASH_KEY_NO...
0
[ "CWE-190" ]
php-src
4cc0286f2f3780abc6084bcdae5dce595daa3c12
272,690,593,873,861,470,000,000,000,000,000,000,000
16
Fix #73832 - leave the table in a safe state if the size is too big.
int edns_opt_compare(struct edns_option* p, struct edns_option* q) { if(!p && !q) return 0; if(!p) return -1; if(!q) return 1; log_assert(p && q); if(p->opt_code != q->opt_code) return (int)q->opt_code - (int)p->opt_code; if(p->opt_len != q->opt_len) return (int)q->opt_len - (int)p->opt_len; if(p->opt_len !=...
0
[ "CWE-787" ]
unbound
6c3a0b54ed8ace93d5b5ca7b8078dc87e75cd640
291,715,795,088,506,300,000,000,000,000,000,000,000
14
- Fix Out of Bound Write Compressed Names in rdata_copy(), reported by X41 D-Sec.
int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) { int al,i,j,ret; unsigned int n; SSL3_RECORD *rr; void (*cb)(const SSL *ssl,int type2,int val)=NULL; if (s->s3->rbuf.buf == NULL) /* Not initialized yet */ if (!ssl3_setup_buffers(s)) return(-1); if ((type && (type != SSL3_RT_AP...
1
[ "CWE-326" ]
openssl
410a49a4fa1d2a1a9775ee29f9e40cbbda79c149
139,160,772,590,724,620,000,000,000,000,000,000,000
457
Fix for CVE-2014-0224 Only accept change cipher spec when it is expected instead of at any time. This prevents premature setting of session keys before the master secret is determined which an attacker could use as a MITM attack. Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for reporting this issue and providing the ...
_nc_retrace_void_ptr(void *code) { T((T_RETURN("%p"), code)); return code; }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
15,169,681,807,558,693,000,000,000,000,000,000,000
5
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
ssl_cb_verify (int ok, X509_STORE_CTX * ctx) { char subject[256]; char issuer[256]; char buf[512]; X509_NAME_oneline (X509_get_subject_name (ctx->current_cert), subject, sizeof (subject)); X509_NAME_oneline (X509_get_issuer_name (ctx->current_cert), issuer, sizeof (issuer)); snprintf (buf, size...
0
[ "CWE-310" ]
hexchat
c9b63f7f9be01692b03fa15275135a4910a7e02d
150,381,360,578,893,050,000,000,000,000,000,000,000
19
ssl: Validate hostnames Closes #524
uchar * send_client_connect_attrs(MYSQL *mysql, uchar *buf) { /* check if the server supports connection attributes */ if (mysql->server_capabilities & CLIENT_CONNECT_ATTRS) { /* Always store the length if the client supports it */ buf= net_store_length(buf, mysql->options.exten...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
263,885,460,319,632,100,000,000,000,000,000,000,000
35
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static int handle_vmclear(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); gpa_t vmptr; struct vmcs12 *vmcs12; struct page *page; if (!nested_vmx_check_permission(vcpu)) return 1; if (nested_vmx_check_vmptr(vcpu, EXIT_REASON_VMCLEAR, &vmptr)) return 1; if (vmptr == vmx->nested.current_vmptr) ...
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
156,699,690,493,853,510,000,000,000,000,000,000,000
39
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
GF_Err trep_box_dump(GF_Box *a, FILE * trace) { GF_TrackExtensionPropertiesBox *p = (GF_TrackExtensionPropertiesBox*)a; gf_isom_box_dump_start(a, "TrackExtensionPropertiesBox", trace); gf_fprintf(trace, "TrackID=\"%d\">\n", p->trackID); gf_isom_box_dump_done("TrackExtensionPropertiesBox", a, trace); return GF_OK; ...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
284,307,842,549,793,400,000,000,000,000,000,000,000
8
fixed #2138
static inline void skb_set_mac_header(struct sk_buff *skb, const int offset) { skb_reset_mac_header(skb); skb->mac_header += offset;
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
66,578,920,210,276,710,000,000,000,000,000,000,000
5
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
static void dirty_children(GF_Node *node) { u32 i, count; GF_FieldInfo info; if (!node) return; node->sgprivate->flags &= GF_NODE_INTERNAL_FLAGS; if (node->sgprivate->tag>=GF_NODE_RANGE_LAST_VRML) { GF_ChildNodeItem *child = ((GF_ParentNode*)node)->children; while (child) { dirty_children(child->node); ...
0
[ "CWE-416" ]
gpac
9723dd0955894f2cb7be13b94cf7a47f2754b893
194,248,145,289,164,940,000,000,000,000,000,000,000
28
fixed #2109
asmlinkage long compat_sys_get_mempolicy(int __user *policy, compat_ulong_t __user *nmask, compat_ulong_t maxnode, compat_ulong_t addr, compat_ulong_t flags) { long err; unsigned long __user *nm = NULL; unsigned long nr_bits, alloc_size; DECLARE_BITMAP(bm, MAX_NUMNODES); nr_bits = min_t...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
314,577,936,753,904,100,000,000,000,000,000,000,000
29
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(...
dnnum_string(netdissect_options *ndo, u_short dnaddr) { char *str; size_t siz; int area = (u_short)(dnaddr & AREAMASK) >> AREASHIFT; int node = dnaddr & NODEMASK; str = (char *)malloc(siz = sizeof("00.0000")); if (str == NULL) (*ndo->ndo_error)(ndo, "dnnum_string: malloc"); snprintf(str, siz, "%d.%d", area, n...
0
[ "CWE-125" ]
tcpdump
c6e0531b5def26ecf912e8de6ade86cbdaed3751
223,071,940,816,481,900,000,000,000,000,000,000,000
13
CVE-2017-12899/DECnet: Fix bounds checking. If we're skipping over padding before the *real* flags, check whether the real flags are in the captured data before fetching it. This fixes a buffer over-read discovered by Kamil Frankowicz. Note one place where we don't need to do bounds checking as it's already been don...
static JSValue js_bs_get_u8(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) { GET_JSBS if (!bs) return GF_JS_EXCEPTION(ctx); return JS_NewInt32(ctx, gf_bs_read_u8(bs) ); }
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
173,735,268,042,294,240,000,000,000,000,000,000,000
6
fixed #2138
static CURLcode imap_init(struct connectdata *conn) { struct SessionHandle *data = conn->data; struct FTP *imap = data->state.proto.imap; if(!imap) { imap = data->state.proto.imap = calloc(sizeof(struct FTP), 1); if(!imap) return CURLE_OUT_OF_MEMORY; } /* get some initial data into the imap str...
0
[ "CWE-89" ]
curl
75ca568fa1c19de4c5358fed246686de8467c238
12,709,121,477,446,737,000,000,000,000,000,000,000
22
URL sanitize: reject URLs containing bad data Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a decoded manner now use the new Curl_urldecode() function to reject URLs with embedded control codes (anything that is or decodes to a byte value less than 32). URLs containing such codes could easily oth...
static void vhdx_block_translate(BDRVVHDXState *s, int64_t sector_num, int nb_sectors, VHDXSectorInfo *sinfo) { uint32_t block_offset; sinfo->bat_idx = sector_num >> s->sectors_per_block_bits; /* effectively a modulo - this gives us the offset into the block * (in sect...
0
[ "CWE-835" ]
qemu
1d7678dec4761acdc43439da6ceda41a703ba1a6
62,065,139,715,487,760,000,000,000,000,000,000,000
41
vhdx: Bounds checking for block_size and logical_sector_size (CVE-2014-0148) Other variables (e.g. sectors_per_block) are calculated using these variables, and if not range-checked illegal values could be obtained causing infinite loops and other potential issues when calculating BAT entries. The 1.00 VHDX spec requi...
buflist_altfpos(win_T *win) { buflist_setfpos(curbuf, win, win->w_cursor.lnum, win->w_cursor.col, TRUE); }
0
[ "CWE-416" ]
vim
9b4a80a66544f2782040b641498754bcb5b8d461
268,812,795,484,111,940,000,000,000,000,000,000,000
4
patch 8.2.4281: using freed memory with :lopen and :bwipe Problem: Using freed memory with :lopen and :bwipe. Solution: Do not use a wiped out buffer.
_glat_iterator<W> operator ++ (int) { _glat_iterator<W> tmp(*this); operator++(); return tmp; }
0
[ "CWE-476" ]
graphite
db132b4731a9b4c9534144ba3a18e65b390e9ff6
259,261,886,422,917,220,000,000,000,000,000,000,000
1
Deprecate and make ineffective gr_face_dumbRendering
static inline struct sk_buff *netlink_trim(struct sk_buff *skb, gfp_t allocation) { int delta; skb_orphan(skb); delta = skb->end - skb->tail; if (delta * 2 < skb->truesize) return skb; if (skb_shared(skb)) { struct sk_buff *nskb = skb_clone(skb, allocation); if (!nskb) return skb; kfree_skb(s...
0
[]
linux-2.6
16e5726269611b71c930054ffe9b858c1cea88eb
165,593,973,128,559,070,000,000,000,000,000,000,000
24
af_unix: dont send SCM_CREDENTIALS by default Since commit 7361c36c5224 (af_unix: Allow credentials to work across user and pid namespaces) af_unix performance dropped a lot. This is because we now take a reference on pid and cred in each write(), and release them in read(), usually done from another process, eventua...
void InstanceKlass::collect_statistics(KlassSizeStats *sz) const { Klass::collect_statistics(sz); sz->_inst_size = wordSize * size_helper(); sz->_vtab_bytes = wordSize * vtable_length(); sz->_itab_bytes = wordSize * itable_length(); sz->_nonstatic_oopmap_bytes = wordSize * nonstatic_oop_map_size(); int n...
0
[]
jdk11u-dev
41825fa33d605f8501164f9296572e4378e8183b
124,524,079,870,912,600,000,000,000,000,000,000,000
39
8270386: Better verification of scan methods Reviewed-by: mbaesken Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId, const XML_Char *uri, BINDING **bindingsPtr) { static const XML_Char xmlNamespace[] = { ASCII_h, ASCII_t, ASCII_t, ASCII_p, ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_w, ASCII_w, ASCII_w, ASCII_PERIOD, ASCII_w, ASCII_3, ASCII...
0
[ "CWE-119" ]
libexpat
ba0f9c3b40c264b8dd392e02a7a060a8fa54f032
53,414,258,971,227,570,000,000,000,000,000,000,000
112
CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings https://sourceforge.net/p/expat/bugs/528/
TEST(EqOp, MatchesScalar) { BSONObj operand = BSON("a" << 5); EqualityMatchExpression eq; eq.init("a", operand["a"]).transitional_ignore(); ASSERT(eq.matchesBSON(BSON("a" << 5.0), NULL)); ASSERT(!eq.matchesBSON(BSON("a" << 4), NULL)); }
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
330,366,728,246,643,500,000,000,000,000,000,000,000
7
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
sameUrlHosts(const char *url1, const char *url2) { // XXX: Want AnyP::Uri::parse() here, but it uses static storage and copying const char *host1 = strchr(url1, ':'); const char *host2 = strchr(url2, ':'); if (host1 && host2) { // skip scheme slashes do { ++host1; ...
0
[ "CWE-20" ]
squid
6c9c44d0e9cf7b72bb233360c5308aa063af3d69
109,042,645,648,161,430,000,000,000,000,000,000,000
26
Handle more partial responses (#791)