func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int openssh_mapper_match_user(X509 *x509, const char *user, void *context) { struct passwd *pw; char filename[PATH_MAX]; if (!x509) return -1; if (!user) return -1; pw = getpwnam(user); if (!pw || is_empty_str(pw->pw_dir) ) { DBG1("User '%s' has no home direct...
0
[]
pam_pkcs11
a37fe986997b2d2fefc350c43650cc8193389235
277,887,356,252,435,130,000,000,000,000,000,000,000
13
fixed buffer overflow with long home directory Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the issue.
static inline void gen_op_jmp_v(TCGv dest) { tcg_gen_st_tl(dest, cpu_env, offsetof(CPUX86State, eip)); }
0
[ "CWE-94" ]
qemu
30663fd26c0307e414622c7a8607fbc04f92ec14
334,093,425,125,916,070,000,000,000,000,000,000,000
4
tcg/i386: Check the size of instruction being translated This fixes the bug: 'user-to-root privesc inside VM via bad translation caching' reported by Jann Horn here: https://bugs.chromium.org/p/project-zero/issues/detail?id=1122 Reviewed-by: Richard Henderson <rth@twiddle.net> CC: Peter Maydell <peter.maydell@linaro....
void StreamResource::RemoveStreamListener(StreamListener* listener) { CHECK_NOT_NULL(listener); StreamListener* previous; StreamListener* current; // Remove from the linked list. for (current = listener_, previous = nullptr; /* No loop condition because we want a crash if listener is not found */ ...
0
[ "CWE-416" ]
node
4f8772f9b731118628256189b73cd202149bbd97
84,415,195,343,251,110,000,000,000,000,000,000,000
23
src: retain pointers to WriteWrap/ShutdownWrap Avoids potential use-after-free when wrap req's are synchronously destroyed. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 Refs: https://hackerone.com/bugs?subject=nodejs&report_id=988103 PR-URL: https://github.com/nodejs-private/...
unsigned long X509_issuer_and_serial_hash(X509 *a) { unsigned long ret = 0; EVP_MD_CTX *ctx = EVP_MD_CTX_new(); unsigned char md[16]; char *f; if (ctx == NULL) goto err; f = X509_NAME_oneline(a->cert_info.issuer, NULL, 0); if (!EVP_DigestInit_ex(ctx, EVP_md5(), NULL)) goto e...
1
[ "CWE-476" ]
openssl
8130d654d1de922ea224fa18ee3bc7262edc39c0
217,614,412,441,121,300,000,000,000,000,000,000,000
28
Fix Null pointer deref in X509_issuer_and_serial_hash() The OpenSSL public API function X509_issuer_and_serial_hash() attempts to create a unique hash value based on the issuer and serial number data contained within an X509 certificate. However it fails to correctly handle any errors that may occur while parsing the ...
static int ceph_aes_decrypt2(const void *key, int key_len, void *dst1, size_t *dst1_len, void *dst2, size_t *dst2_len, const void *src, size_t src_len) { struct sg_table sg_in; struct scatterlist sg_out[3], prealloc_sg; struct crypto_skcipher *tfm = ceph_crypto_alloc_cipher(); SKCIPHER_REQUE...
0
[ "CWE-399" ]
linux
a45f795c65b479b4ba107b6ccde29b896d51ee98
220,709,774,676,045,800,000,000,000,000,000,000,000
79
libceph: introduce ceph_crypt() for in-place en/decryption Starting with 4.9, kernel stacks may be vmalloced and therefore not guaranteed to be physically contiguous; the new CONFIG_VMAP_STACK option is enabled by default on x86. This makes it invalid to use on-stack buffers with the crypto scatterlist API, as sg_set...
static int io_write(struct io_kiocb *req, struct io_kiocb **nxt, bool force_nonblock) { struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs; struct kiocb *kiocb = &req->rw; struct iov_iter iter; struct file *file; size_t iov_count; ssize_t ret; ret = io_prep_rw(req, force_nonblock); if (ret) re...
0
[]
linux
181e448d8709e517c9c7b523fcd209f24eb38ca7
45,658,666,235,380,090,000,000,000,000,000,000,000
63
io_uring: async workers should inherit the user creds If we don't inherit the original task creds, then we can confuse users like fuse that pass creds in the request header. See link below on identical aio issue. Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u Signed...
static void ip6mr_free_table(struct mr6_table *mrt) { del_timer_sync(&mrt->ipmr_expire_timer); mroute_clean_tables(mrt, true); kfree(mrt); }
0
[ "CWE-20" ]
linux
99253eb750fda6a644d5188fb26c43bad8d5a745
120,503,989,285,390,050,000,000,000,000,000,000,000
6
ipv6: check sk sk_type and protocol early in ip_mroute_set/getsockopt Commit 5e1859fbcc3c ("ipv4: ipmr: various fixes and cleanups") fixed the issue for ipv4 ipmr: ip_mroute_setsockopt() & ip_mroute_getsockopt() should not access/set raw_sk(sk)->ipmr_table before making sure the socket is a raw socket, and prot...
struct ldb_dn *ldb_get_default_basedn(struct ldb_context *ldb) { void *opaque = ldb_get_opaque(ldb, "defaultNamingContext"); return talloc_get_type(opaque, struct ldb_dn); }
0
[ "CWE-476" ]
samba
d8b9bb274b7e7a390cf3bda9cd732cb2227bdbde
310,215,184,128,754,640,000,000,000,000,000,000,000
5
CVE-2020-10730: lib ldb: Check if ldb_lock_backend_callback called twice Prevent use after free issues if ldb_lock_backend_callback is called twice, usually due to ldb_module_done being called twice. This can happen if a module ignores the return value from function a function that calls ldb_module_done as part of it'...
static inline float *VMUL2(float *dst, const float *v, unsigned idx, const float *scale) { float s = *scale; *dst++ = v[idx & 15] * s; *dst++ = v[idx>>4 & 15] * s; return dst; }
0
[ "CWE-703" ]
FFmpeg
6e42ccb9dbc13836cd52cda594f819d17af9afa2
104,571,121,319,889,450,000,000,000,000,000,000,000
8
avcodec/aacdec: Fix pulse position checks in decode_pulses() Fixes out of array read Fixes: asan_static-oob_1efed25_1887_cov_2013541199_HeyYa_RA10_AAC_192K_30s.rm Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
uint32_t BinaryProtocolWriter::writeStructEnd() { return 0; }
0
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
118,031,472,368,049,770,000,000,000,000,000,000,000
3
Better handling of truncated data when reading strings Summary: Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB). This diff changes the logic to check if we have enough data in the buffer bef...
int crypt_volume_key_get(struct crypt_device *cd, int keyslot, char *volume_key, size_t *volume_key_size, const char *passphrase, size_t passphrase_size) { struct volume_key *vk = NULL; int key_len, r = -EINVAL; if (!cd || !volume_key || !volume_key_size || (!isTCRYPT(cd->type) && !isVERITY(cd->type) && !passp...
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
292,301,141,930,781,980,000,000,000,000,000,000,000
61
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
static inline int vfat_is_used_badchars(const wchar_t *s, int len) { int i; for (i = 0; i < len; i++) if (vfat_bad_char(s[i])) return -EINVAL; if (s[i - 1] == ' ') /* last character cannot be space */ return -EINVAL; return 0; }
0
[ "CWE-119", "CWE-787" ]
linux
0720a06a7518c9d0c0125bd5d1f3b6264c55c3dd
107,164,455,093,421,580,000,000,000,000,000,000,000
13
NLS: improve UTF8 -> UTF16 string conversion routine The utf8s_to_utf16s conversion routine needs to be improved. Unlike its utf16s_to_utf8s sibling, it doesn't accept arguments specifying the maximum length of the output buffer or the endianness of its 16-bit output. This patch (as1501) adds the two missing argumen...
folly::Optional<ClientTransportParameters> getClientTransportParams() override { std::vector<TransportParameter> transportParams; transportParams.push_back(encodeIntegerParameter( TransportParameterId::initial_max_stream_data_bidi_local, kDefaultStreamWindowSize)); transportParams.pu...
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
136,958,714,656,785,990,000,000,000,000,000,000,000
35
Close connection if we derive an extra 1-rtt write cipher Summary: Fixes CVE-2021-24029 Reviewed By: mjoras, lnicco Differential Revision: D26613890 fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945
static GF_Err do_compress_top_boxes(char *inName, char *outName) { FILE *in, *out; u8 *buf; u32 buf_alloc, comp_size; s32 bytes_comp=0; s32 bytes_uncomp=0; GF_Err e = GF_OK; u64 source_size, dst_size; u32 orig_box_overhead; u32 final_box_overhead; u32 nb_added_box_bytes=0; Bool has_mov = GF_FALSE; Bool rep...
0
[ "CWE-787" ]
gpac
4e56ad72ac1afb4e049a10f2d99e7512d7141f9d
265,305,323,750,861,650,000,000,000,000,000,000,000
140
fixed #2216
int sm_restore_priority(p_fm_config_conx_hdlt hdl, fm_mgr_type_t mgr, int argc, char *argv[]) { fm_mgr_config_errno_t res; fm_msg_ret_code_t ret_code; if((res = fm_mgr_simple_query(hdl, FM_ACT_GET, FM_DT_SM_RESTORE_PRIORITY, mgr, 0, NULL, &ret_code)) != FM_CONF_OK) { fprintf(stderr, "sm_restore_priority: Failed...
0
[ "CWE-362" ]
opa-fm
c5759e7b76f5bf844be6c6641cc1b356bbc83869
241,991,408,394,233,220,000,000,000,000,000,000,000
15
Fix scripts and code that use well-known tmp files.
void gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) { _gdImageGifCtx(im, out); }
0
[ "CWE-415" ]
php-src
089f7c0bc28d399b0420aa6ef058e4c1c120b2ae
196,733,945,208,689,500,000,000,000,000,000,000,000
4
Sync with upstream Even though libgd/libgd#492 is not a relevant bug fix for PHP, since the binding doesn't use the `gdImage*Ptr()` functions at all, we're porting the fix to stay in sync here.
private int handle_annotation(struct magic_set *ms, struct magic *m) { if (ms->flags & MAGIC_APPLE) { if (file_printf(ms, "%.8s", m->apple) == -1) return -1; return 1; } if ((ms->flags & MAGIC_MIME_TYPE) && m->mimetype[0]) { if (file_printf(ms, "%s", m->mimetype) == -1) return -1; return 1; }
0
[ "CWE-20" ]
php-src
74555e7c26b2c61bb8e67b7d6a6f4d2b8eb3a5f3
295,572,241,696,155,970,000,000,000,000,000,000,000
14
Fixed bug #64830 mimetype detection segfaults on mp3 file
write_chunks_to_file(const char *fname, const smartlist_t *chunks, int bin) { int flags = OPEN_FLAGS_REPLACE|(bin?O_BINARY:O_TEXT); return write_chunks_to_file_impl(fname, chunks, flags); }
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
210,349,518,456,197,900,000,000,000,000,000,000,000
5
Fix assertion failure in tor_timegm. Fixes bug 6811.
isatap_chksrc(struct sk_buff *skb, struct iphdr *iph, struct ip_tunnel *t) { struct ip_tunnel_prl_entry *p; int ok = 1; rcu_read_lock(); p = __ipip6_tunnel_locate_prl(t, iph->saddr); if (p) { if (p->flags & PRL_DEFAULT) skb->ndisc_nodetype = NDISC_NODETYPE_DEFAULT; else skb->ndisc_nodetype = NDISC_NODET...
0
[]
linux-2.6
d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978
18,527,182,690,352,057,000,000,000,000,000,000,000
24
tunnels: fix netns vs proto registration ordering Same stuff as in ip_gre patch: receive hook can be called before netns setup is done, oopsing in net_generic(). Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
gx_begin_image1(gx_device * dev, const gs_gstate * pgs, const gs_matrix * pmat, const gs_image_common_t * pic, const gs_int_rect * prect, const gx_drawing_color * pdcolor, const gx_clip_path * pcpath, gs_memory_t * mem, gx_image_enum_common_t ** pinfo) { ...
0
[]
ghostpdl
cffb5712bc10c2c2f46adf311fc74aaae74cb784
109,074,926,439,240,310,000,000,000,000,000,000,000
28
Commit a9a58bb95 was incorrect, clearing some values that it shouldn't The penum->rect values were cleared, and this didn't cover all uses of gx_image_enum_alloc. Also, return *ppenum NULL if alloc fails in case the caller doesn't check the return code. Also, if we fail the enum_begin, free the enum and set *pinfo to ...
void ldapsrv_notification_retry_setup(struct ldapsrv_service *service, bool force) { struct ldapsrv_connection *conn = NULL; struct timeval retry; size_t num_pending = 0; size_t num_active = 0; if (force) { TALLOC_FREE(service->notification.retry); service->notification.generation += 1; } if (service->noti...
0
[ "CWE-703" ]
samba
f9b2267c6eb8138fc94df7a138ad5d87526f1d79
164,211,767,725,914,970,000,000,000,000,000,000,000
52
CVE-2021-3670 ldap_server: Ensure value of MaxQueryDuration is greater than zero BUG: https://bugzilla.samba.org/show_bug.cgi?id=14694 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> (cherry picked from commit e1ab0c43629686d1d2c0b0b2bcdc90057...
PHP_FUNCTION(pcntl_setpriority) { long who = PRIO_PROCESS; long pid = getpid(); long pri; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|ll", &pri, &pid, &who) == FAILURE) { RETURN_FALSE; } if (setpriority(who, pid, pri)) { PCNTL_G(last_error) = errno; switch (errno) { case ESRCH: php_erro...
0
[ "CWE-19" ]
php-src
be9b2a95adb504abd5acdc092d770444ad6f6854
223,665,434,603,363,160,000,000,000,000,000,000,000
34
Fixed bug #69418 - more s->p fixes for filenames
bash_ignore_everything (names) char **names; { _ignore_completion_names (names, return_zero); return 0; }
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
55,232,967,608,527,950,000,000,000,000,000,000,000
6
Bash-4.4 patch 7
ews_get_name (CamelService *service, gboolean brief) { CamelSettings *settings; gchar *name; gchar *host; gchar *user; settings = camel_service_ref_settings (service); user = camel_network_settings_dup_user (CAMEL_NETWORK_SETTINGS (settings)); host = camel_ews_utils_get_host_name (settings); g_...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
200,263,009,161,697,650,000,000,000,000,000,000,000
27
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
asn1_get_bit_der (const unsigned char *der, int der_len, int *ret_len, unsigned char *str, int str_size, int *bit_len) { int len_len, len_byte; if (der_len <= 0) return ASN1_GENERIC_ERROR; len_byte = asn1_get_length_der (der, der_len, &len_len) - 1; if (len_byte < 0) return ASN1_DER_ERROR; *...
1
[ "CWE-131" ]
libtasn1
1c3ccb3e040bf13e342ee60bc23b21b97b11923f
189,455,055,466,414,370,000,000,000,000,000,000,000
24
Do not return illegal values in asn1_get_bit_der().
GC_INNER void GC_remove_counts(struct hblk *h, size_t sz/* bytes */) { register struct hblk * hbp; for (hbp = h+1; (word)hbp < (word)h + sz; hbp += 1) { SET_HDR(hbp, 0); } }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
62,293,709,780,080,160,000,000,000,000,000,000,000
7
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...
void fx_DataView_prototype_byteOffset_get(txMachine* the) { txSlot* instance = fxCheckDataViewInstance(the, mxThis); txSlot* view = instance->next; txSlot* buffer = view->next; fxCheckDataViewSize(the, view, buffer, XS_IMMUTABLE); mxResult->kind = XS_INTEGER_KIND; mxResult->value.integer = view->value.dataView.of...
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
87,303,248,690,141,790,000,000,000,000,000,000,000
9
XS: #896
static void srpt_srq_event(struct ib_event *event, void *ctx) { pr_info("SRQ event %d\n", event->event); }
0
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
314,477,666,533,424,200,000,000,000,000,000,000,000
4
IB/srpt: Simplify srpt_handle_tsk_mgmt() Let the target core check task existence instead of the SRP target driver. Additionally, let the target core check the validity of the task management request instead of the ib_srpt driver. This patch fixes the following kernel crash: BUG: unable to handle kernel NULL pointer...
static int perf_event_check_period(struct perf_event *event, u64 value) { return event->pmu->check_period(event, value); }
0
[ "CWE-401" ]
tip
7bdb157cdebbf95a1cd94ed2e01b338714075d00
142,749,746,112,985,260,000,000,000,000,000,000,000
4
perf/core: Fix a memory leak in perf_event_parse_addr_filter() As shown through runtime testing, the "filename" allocation is not always freed in perf_event_parse_addr_filter(). There are three possible ways that this could happen: - It could be allocated twice on subsequent iterations through the loop, - or leake...
free_decompression(struct archive_read *a, struct _7zip *zip) { int r = ARCHIVE_OK; #if !defined(HAVE_ZLIB_H) &&\ !(defined(HAVE_BZLIB_H) && defined(BZ_CONFIG_ERROR)) (void)a;/* UNUSED */ #endif #ifdef HAVE_LZMA_H if (zip->lzstream_valid) lzma_end(&(zip->lzstream)); #endif #if defined(HAVE_BZLIB_H) && defined(BZ...
0
[ "CWE-125" ]
libarchive
65a23f5dbee4497064e9bb467f81138a62b0dae1
250,904,857,684,599,200,000,000,000,000,000,000,000
41
7zip: fix crash when parsing certain archives Fuzzing with CRCs disabled revealed that a call to get_uncompressed_data() would sometimes fail to return at least 'minimum' bytes. This can cause the crc32() invocation in header_bytes to read off into invalid memory. A specially crafted archive can use this to cause a c...
static bool get_nx_auto_mode(void) { /* Return true when CPU has the bug, and mitigations are ON */ return boot_cpu_has_bug(X86_BUG_ITLB_MULTIHIT) && !cpu_mitigations_off(); }
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
329,171,850,972,383,600,000,000,000,000,000,000,000
5
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
int security_inet_conn_request(struct sock *sk, struct sk_buff *skb, struct request_sock *req) { return security_ops->inet_conn_request(sk, skb, req); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
68,926,884,550,773,930,000,000,000,000,000,000,000
5
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
XkbClientGone(void *data, XID id) { DevicePtr pXDev = (DevicePtr) data; if (!XkbRemoveResourceClient(pXDev, id)) { ErrorF ("[xkb] Internal Error! bad RemoveResourceClient in XkbClientGone\n"); } return 1; }
0
[ "CWE-119" ]
xserver
f7cd1276bbd4fe3a9700096dec33b52b8440788d
90,176,023,420,265,700,000,000,000,000,000,000,000
10
Correct bounds checking in XkbSetNames() CVE-2020-14345 / ZDI 11428 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
static void cryp_state_free(struct user_ta_ctx *utc, struct tee_cryp_state *cs) { struct tee_obj *o; if (tee_obj_get(utc, cs->key1, &o) == TEE_SUCCESS) tee_obj_close(utc, o); if (tee_obj_get(utc, cs->key2, &o) == TEE_SUCCESS) tee_obj_close(utc, o); TAILQ_REMOVE(&utc->cryp_states, cs, link); if (cs->ctx_final...
0
[ "CWE-119", "CWE-787" ]
optee_os
a637243270fc1faae16de059091795c32d86e65e
96,114,382,823,645,440,000,000,000,000,000,000,000
32
svc: check for allocation overflow in crypto calls Without checking for overflow there is a risk of allocating a buffer with size smaller than anticipated and as a consequence of that it might lead to a heap based overflow with attacker controlled data written outside the boundaries of the buffer. Fixes: OP-TEE-2018-...
static void d_lru_add(struct dentry *dentry) { D_FLAG_VERIFY(dentry, 0); dentry->d_flags |= DCACHE_LRU_LIST; this_cpu_inc(nr_dentry_unused); WARN_ON_ONCE(!list_lru_add(&dentry->d_sb->s_dentry_lru, &dentry->d_lru)); }
0
[ "CWE-362", "CWE-399" ]
linux
49d31c2f389acfe83417083e1208422b4091cd9e
104,790,165,371,922,970,000,000,000,000,000,000,000
7
dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same st...
http_findhdr(const struct http *hp, unsigned l, const char *hdr) { unsigned u; for (u = HTTP_HDR_FIRST; u < hp->nhd; u++) { Tcheck(hp->hd[u]); if (hp->hd[u].e < hp->hd[u].b + l + 1) continue; if (hp->hd[u].b[l] != ':') continue; if (!http_hdr_at(hdr, hp->hd[u].b, l)) continue; return (u); } retu...
0
[ "CWE-703" ]
varnish-cache
c5fd097e5cce8b461c6443af02b3448baef2491d
309,386,050,947,938,770,000,000,000,000,000,000,000
16
Do not call http_hdr_flags() on pseudo-headers In http_EstimateWS(), all headers are passed to the http_isfiltered() function to calculate how many bytes is needed to serialize the entire struct http. http_isfiltered() will check the headers for whether they are going to be filtered out later and if so skip them. How...
static int process_styles_line(ASS_Track *track, char *str) { int ret = 0; if (!strncmp(str, "Format:", 7)) { char *p = str + 7; skip_spaces(&p); free(track->style_format); track->style_format = strdup(p); if (!track->style_format) return -1; ass_msg(t...
0
[ "CWE-369", "CWE-787" ]
libass
017137471d0043e0321e377ed8da48e45a3ec632
198,838,998,448,780,770,000,000,000,000,000,000,000
23
decode_font: fix subtraction broken by change to unsigned type This caused a one-byte buffer overwrite and an assertion failure. Regression in commit 910211f1c0078e37546f73e95306724358b89be2. Discovered by OSS-Fuzz. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26674. Fixes https://bugs.chromium.org/p...
static inline u16 count_to_lpf_count(unsigned int d) { if (d > FILTR_LPF) d = FILTR_LPF; else if (d < 4) d = 0; return (u16) d; }
0
[ "CWE-400", "CWE-401" ]
linux
a7b2df76b42bdd026e3106cf2ba97db41345a177
337,137,787,884,704,440,000,000,000,000,000,000,000
8
media: rc: prevent memory leak in cx23888_ir_probe In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
gdm_session_get_display_mode (GdmSession *self) { g_debug ("GdmSession: type %s, program? %s, seat %s", self->priv->session_type, self->priv->is_program_session? "yes" : "no", self->priv->display_seat_id); #ifdef ENABLE_WAYLAND_SUPPORT /* Wayland sessi...
0
[]
gdm
5ac224602f1d603aac5eaa72e1760d3e33a26f0a
94,691,983,372,599,920,000,000,000,000,000,000,000
36
session: disconnect signals from worker proxy when conversation is freed We don't want an outstanding reference on the worker proxy to lead to signal handlers getting dispatched after the conversation is freed. https://bugzilla.gnome.org/show_bug.cgi?id=758032
JpegInitDestination(j_compress_ptr cinfo) { jpegError = FALSE; jpegDstManager.next_output_byte = (JOCTET *)tightAfterBuf; jpegDstManager.free_in_buffer = (size_t)tightAfterBufSize; }
0
[]
libvncserver
804335f9d296440bb708ca844f5d89b58b50b0c6
176,896,893,630,087,170,000,000,000,000,000,000,000
6
Thread safety for zrle, zlib, tight. Proposed tight security type fix for debian bug 517422.
SSL_SESSION *SSL_SESSION_new(void) { SSL_SESSION *ss; ss = (SSL_SESSION *)OPENSSL_malloc(sizeof(SSL_SESSION)); if (ss == NULL) { SSLerr(SSL_F_SSL_SESSION_NEW, ERR_R_MALLOC_FAILURE); return (0); } memset(ss, 0, sizeof(SSL_SESSION)); ss->verify_result = 1; /* avoid 0 (= X509...
0
[ "CWE-362" ]
openssl
939b4960276b040fc0ed52232238fcc9e2e9ec21
106,645,754,083,394,520,000,000,000,000,000,000,000
37
Fix race condition in NewSessionTicket If a NewSessionTicket is received by a multi-threaded client when attempting to reuse a previous ticket then a race condition can occur potentially leading to a double free of the ticket data. CVE-2015-1791 This also fixes RT#3808 where a session ID is changed for a session alr...
TPM_SU_Unmarshal(TPM_SU *target, BYTE **buffer, INT32 *size) { TPM_RC rc = TPM_RC_SUCCESS; TPM_SU orig_target = *target; // libtpms added if (rc == TPM_RC_SUCCESS) { rc = UINT16_Unmarshal(target, buffer, size); } if (rc == TPM_RC_SUCCESS) { switch (*target) { case TPM_SU_CLEAR: case TPM_S...
0
[ "CWE-787" ]
libtpms
5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b
273,242,775,183,584,800,000,000,000,000,000,000,000
20
tpm2: Restore original value if unmarshalled value was illegal Restore the original value of the memory location where data from a stream was unmarshalled and the unmarshalled value was found to be illegal. The goal is to not keep illegal values in memory. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
bool operator==(const char *const expression) const { return *this==(+*this)._fill(expression,true,1,0,0,"operator==",this); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
59,757,258,090,920,270,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
parse_callout_of_name(Node** np, int cterm, UChar** src, UChar* end, ScanEnv* env) { int r; int i; int in; int num; int name_id; int arg_num; int max_arg_num; int opt_arg_num; int is_not_single; OnigCodePoint c; UChar* name_start; UChar* name_end; UChar* tag_start; UChar* tag_end; Node* n...
0
[ "CWE-476" ]
oniguruma
850bd9b0d8186eb1637722b46b12656814ab4ad2
62,569,564,190,215,720,000,000,000,000,000,000,000
145
fix #87: Read unknown address in onig_error_code_to_str()
static int rtl8139_post_load(void *opaque, int version_id) { RTL8139State* s = opaque; rtl8139_set_next_tctr_time(s); if (version_id < 4) { s->cplus_enabled = s->CpCmd != 0; } /* nc.link_down can't be migrated, so infer link_down according * to link status bit in BasicModeStatus */ ...
0
[ "CWE-835" ]
qemu
5311fb805a4403bba024e83886fa0e7572265de4
153,566,341,572,864,830,000,000,000,000,000,000,000
14
rtl8139: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Buglink: https://bugs.launchpad.net/qemu/+bug/1910826...
bool TensorSliceReader::HasTensor(const string& name, TensorShape* shape, DataType* type) const { mutex_lock l(mu_); const TensorSliceSet* tss = gtl::FindPtrOrNull(tensors_, name); if (!tss && !all_shards_loaded_) { VLOG(1) << "Did not find tensor in preferred shard, loading ...
0
[ "CWE-369", "CWE-345" ]
tensorflow
b619c6f865715ca3b15ef1842b5b95edbaa710ad
163,401,676,840,936,430,000,000,000,000,000,000,000
22
Use BuildTensorShapeBase when parsing unverified TensorShapes during checkpoint loading. This avoids crashing when the TensorShape has negative dimensions. PiperOrigin-RevId: 392769882 Change-Id: Id1f7ae7fcf8142193556af47abfda81b13d3cce4
uint Field_varstring::max_packed_col_length(uint max_length) { return (max_length > 255 ? 2 : 1)+max_length; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
9,639,917,688,078,522,000,000,000,000,000,000,000
4
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...
static int jas_icctxt_input(jas_iccattrval_t *attrval, jas_stream_t *in, int cnt) { jas_icctxt_t *txt = &attrval->data.txt; txt->string = 0; if (!(txt->string = jas_malloc(cnt))) goto error; if (jas_stream_read(in, txt->string, cnt) != cnt) goto error; txt->string[cnt - 1] = '\0'; if (JAS_CAST(int, strlen(t...
1
[]
jasper
4bb93a6c49da7c1b6ad2acb60b18954a6547c637
283,626,258,287,152,670,000,000,000,000,000,000,000
18
Add fixes for CVE-2014-8137.
static std::string show_encryption_method(QPDF::encryption_method_e method) { std::string result = "unknown"; switch (method) { case QPDF::e_none: result = "none"; break; case QPDF::e_unknown: result = "unknown"; break; case QPDF::e_rc4: result = "RC...
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
127,536,882,411,775,100,000,000,000,000,000,000,000
24
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
cmsBool CMSEXPORT cmsPipelineEvalReverseFloat(cmsFloat32Number Target[], cmsFloat32Number Result[], cmsFloat32Number Hint[], const cmsPipeline* lut) { cmsUInt32Number i, j; ...
0
[]
Little-CMS
b0d5ffd4ad91cf8683ee106f13742db3dc66599a
156,309,305,464,526,900,000,000,000,000,000,000,000
97
Memory Squeezing: LCMS2: CLUTElemDup Check for allocation failures and tidy up if found.
xmlBufferAdd(xmlBufferPtr buf, const xmlChar *str, int len) { unsigned int needSize; if ((str == NULL) || (buf == NULL)) { return -1; } if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1; if (len < -1) { #ifdef DEBUG_BUFFER xmlGenericError(xmlGenericErrorContext, "xmlBufferAdd: len ...
1
[ "CWE-190" ]
libxml2
6c283d83eccd940bcde15634ac8c7f100e3caefd
44,449,545,804,604,930,000,000,000,000,000,000,000
35
[CVE-2022-29824] Fix integer overflows in xmlBuf and xmlBuffer In several places, the code handling string buffers didn't check for integer overflow or used wrong types for buffer sizes. This could result in out-of-bounds writes or other memory errors when working on large, multi-gigabyte buffers. Thanks to Felix Wil...
void ui_config_reloaded(void) { PostMessage(hwnd, WM_VALID_CONFIG, 0, 0); }
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
199,975,007,229,935,650,000,000,000,000,000,000,000
3
stunnel-5.57
static int apply_workqueue_attrs_locked(struct workqueue_struct *wq, const struct workqueue_attrs *attrs) { struct apply_wqattrs_ctx *ctx; /* only unbound workqueues can change attributes */ if (WARN_ON(!(wq->flags & WQ_UNBOUND))) return -EINVAL; /* creating multiple pwqs breaks ordering guarantee */ if (...
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
322,769,657,332,151,860,000,000,000,000,000,000,000
23
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
template<typename t1, typename t2, typename t3, typename t4> CImgList<T>& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const bool is_shared=false) { assign(4); _data[0].assign(img1,is_shared); _data[1].assign(img2,is_shared); ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
265,639,838,089,453,250,000,000,000,000,000,000,000
7
Fix other issues in 'CImg<T>::load_bmp()'.
int nghttp2_session_add_item(nghttp2_session *session, nghttp2_outbound_item *item) { /* TODO Return error if stream is not found for the frame requiring stream presence. */ int rv = 0; nghttp2_stream *stream; nghttp2_frame *frame; frame = &item->frame; stream = nghttp2_se...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
222,308,732,759,166,550,000,000,000,000,000,000,000
102
Add nghttp2_option_set_max_outbound_ack
HTTP_Encode(const struct http *fm, uint8_t *p0, unsigned l, unsigned how) { unsigned u, w; uint16_t n; uint8_t *p, *e; AN(p0); AN(l); p = p0; e = p + l; assert(p + 5 <= e); assert(fm->nhd <= fm->shd); n = HTTP_HDR_FIRST - 3; vbe16enc(p + 2, fm->status); p += 4; CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC); for (u =...
0
[ "CWE-703" ]
varnish-cache
c5fd097e5cce8b461c6443af02b3448baef2491d
55,032,347,955,027,610,000,000,000,000,000,000,000
33
Do not call http_hdr_flags() on pseudo-headers In http_EstimateWS(), all headers are passed to the http_isfiltered() function to calculate how many bytes is needed to serialize the entire struct http. http_isfiltered() will check the headers for whether they are going to be filtered out later and if so skip them. How...
bool net_tx_pkt_send_loopback(struct NetTxPkt *pkt, NetClientState *nc) { bool res; pkt->is_loopback = true; res = net_tx_pkt_send(pkt, nc); pkt->is_loopback = false; return res; }
0
[ "CWE-399", "CWE-120" ]
qemu
ead315e43ea0c2ca3491209c6c8db8ce3f2bbe05
211,540,013,025,381,930,000,000,000,000,000,000,000
10
net: check fragment length during fragmentation Network transport abstraction layer supports packet fragmentation. While fragmenting a packet, it checks for more fragments from packet length and current fragment length. It is susceptible to an infinite loop, if the current fragment length is zero. Add check to avoid i...
FileInputSource::setFile( char const* description, FILE* filep, bool close_file) { destroy(); this->filename = description; this->close_file = close_file; this->file = filep; this->seek(0, SEEK_SET); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
261,298,217,347,118,100,000,000,000,000,000,000,000
9
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 ...
int ssh_kdf(struct ssh_crypto_struct *crypto, unsigned char *key, size_t key_len, int key_type, unsigned char *output, size_t requested_len) { EVP_KDF_CTX *ctx = EVP_KDF_CTX_new_id(EVP_KDF_SSHKDF); int rc; if (ctx == NULL) { return -1; } rc = EVP_KDF_ctr...
0
[ "CWE-476" ]
libssh
b36272eac1b36982598c10de7af0a501582de07a
53,858,065,879,260,060,000,000,000,000,000,000,000
47
CVE-2020-1730: Fix a possible segfault when zeroing AES-CTR key Fixes T213 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
int register_md_cluster_operations(struct md_cluster_operations *ops, struct module *module) { if (md_cluster_ops != NULL) return -EALREADY; spin_lock(&pers_lock); md_cluster_ops = ops; md_cluster_mod = module; spin_unlock(&pers_lock); return 0; }
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
251,449,611,391,589,800,000,000,000,000,000,000,000
10
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
pgp_update_new_algo_attr(sc_card_t *card, sc_cardctl_openpgp_keygen_info_t *key_info) { struct pgp_priv_data *priv = DRVDATA(card); pgp_blob_t *algo_blob; unsigned int old_modulus_len; /* measured in bits */ unsigned int old_exponent_len; const unsigned int tag = 0x00C0 | key_info->keytype; u8 changed = 0; i...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
15,770,725,518,594,240,000,000,000,000,000,000,000
57
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
static struct inode *f2fs_nfs_get_inode(struct super_block *sb, u64 ino, u32 generation) { struct f2fs_sb_info *sbi = F2FS_SB(sb); struct inode *inode; if (check_nid_range(sbi, ino)) return ERR_PTR(-ESTALE); /* * f2fs_iget isn't quite right if the inode is currently unallocated! * However f2fs_iget curren...
0
[ "CWE-284" ]
linux
b9dd46188edc2f0d1f37328637860bb65a771124
172,554,325,462,509,970,000,000,000,000,000,000,000
24
f2fs: sanity check segment count F2FS uses 4 bytes to represent block address. As a result, supported size of disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments. Signed-off-by: Jin Qian <jinqian@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static int isCaptiveURL(char *url) { if((!strcmp(url, KINDLE_WIFISTUB_URL)) || (!strcmp(url, HOTSPOT_DETECT_URL)) || (!strcmp(url, HOTSPOT_DETECT_LUA_URL)) || (!strcmp(url, ntop->getPrefs()->getCaptivePortalUrl())) || (!strcmp(url, AUTHORIZE_CAPTIVE_LUA_URL)) || (!strcmp(url, "/")) ) ...
0
[ "CWE-284", "CWE-335" ]
ntopng
30610bda60cbfc058f90a1c0a17d0e8f4516221a
26,431,487,574,302,094,000,000,000,000,000,000,000
12
Added code to randomize values returned by rand()
static int call_undef_hook(struct pt_regs *regs, unsigned int instr) { struct undef_hook *hook; unsigned long flags; int (*fn)(struct pt_regs *regs, unsigned int instr) = NULL; raw_spin_lock_irqsave(&undef_lock, flags); list_for_each_entry(hook, &undef_hook, node) if ((instr & hook->instr_mask) == hook->instr_v...
0
[ "CWE-284", "CWE-264" ]
linux
a4780adeefd042482f624f5e0d577bf9cdcbb760
57,014,077,930,212,300,000,000,000,000,000,000,000
15
ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to prevent it from being used as a covert channel between two tasks. There are more and more applications coming to Windows RT, Wine could support them, but mostly they ...
int HttpDownstreamConnection::initiate_connection() { int rv; auto worker_blocker = worker_->get_connect_blocker(); if (worker_blocker->blocked()) { if (LOG_ENABLED(INFO)) { DCLOG(INFO, this) << "Worker wide backend connection was blocked temporarily"; } return SHRPX_ERR_NETWORK; } ...
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
130,705,006,527,452,800,000,000,000,000,000,000,000
178
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
TEST_F(ZlibDecompressorImplTest, DetectExcessiveCompressionRatio) { const absl::string_view ten_whitespaces = " "; Buffer::OwnedImpl buffer; Extensions::Compression::Gzip::Compressor::ZlibCompressorImpl compressor; compressor.init( Extensions::Compression::Gzip::Compressor::ZlibCompressorImpl::Co...
0
[]
envoy
cb4ef0b09200c720dfdb07e097092dd105450343
226,717,821,157,393,880,000,000,000,000,000,000,000
22
decompressors: stop decompressing upon excessive compression ratio (#733) Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com> Co-authored-by: Ryan Hamilton <rch@google.com> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
vrrp_group_track_bfd_handler(vector_t *strvec) { alloc_value_block(alloc_vrrp_group_track_bfd, vector_slot(strvec, 0)); }
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
206,203,315,022,682,800,000,000,000,000,000,000,000
4
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
static int handle_invlpg(struct kvm_vcpu *vcpu) { unsigned long exit_qualification = vmx_get_exit_qual(vcpu); kvm_mmu_invlpg(vcpu, exit_qualification); return kvm_skip_emulated_instruction(vcpu); }
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
83,929,568,556,330,670,000,000,000,000,000,000,000
7
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
nautilus_file_operations_trash_or_delete (GList *files, GtkWindow *parent_window, NautilusDeleteCallback done_callback, gpointer done_callback_data) { trash_or_delete_internal (files, parent_window, TRUE, done_callback, done_callback_data)...
0
[]
nautilus
ca2fd475297946f163c32dcea897f25da892b89d
186,217,845,023,093,200,000,000,000,000,000,000,000
9
Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if th...
static bool blk_flush_complete_seq(struct request *rq, struct blk_flush_queue *fq, unsigned int seq, int error) { struct request_queue *q = rq->q; struct list_head *pending = &fq->flush_queue[fq->flush_pending_idx]; bool queued = false, kicked; BUG_ON(rq->flush.seq & seq); rq->flush.seq |= seq; if...
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
131,416,483,457,314,800,000,000,000,000,000,000,000
53
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
static void vrend_hw_emit_dsa(struct vrend_context *ctx) { struct pipe_depth_stencil_alpha_state *state = &ctx->sub->dsa_state; if (state->depth.enabled) { vrend_depth_test_enable(ctx, true); glDepthFunc(GL_NEVER + state->depth.func); if (state->depth.writemask) glDepthMask(GL_TRUE); ...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
160,128,887,095,460,560,000,000,000,000,000,000,000
23
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
struct link_encoder *dce80_link_encoder_create( const struct encoder_init_data *enc_init_data) { struct dce110_link_encoder *enc110 = kzalloc(sizeof(struct dce110_link_encoder), GFP_KERNEL); if (!enc110) return NULL; dce110_link_encoder_construct(enc110, enc_init_data, &link_enc_feature, ...
0
[ "CWE-400", "CWE-703", "CWE-401" ]
linux
055e547478a11a6360c7ce05e2afc3e366968a12
83,179,169,282,983,290,000,000,000,000,000,000,000
17
drm/amd/display: memory leak In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated clk_src needs release. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
void LinkResolver::check_field_accessability(Klass* ref_klass, Klass* resolved_klass, Klass* sel_klass, const fieldDescriptor& fd, TRAPS) { ...
0
[]
jdk11u
132745902a4601dc64b2c8ca112ca30292feccb4
274,128,769,443,421,880,000,000,000,000,000,000,000
31
8281866: Enhance MethodHandle invocations Reviewed-by: mbaesken Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
Kick(User* source, Membership* memb, const std::string& reason) : ClientProtocol::Message("KICK", source) { PushParamRef(memb->chan->name); PushParamRef(memb->user->nick); PushParamRef(reason); }
0
[ "CWE-200", "CWE-732" ]
inspircd
4350a11c663b0d75f8119743bffb7736d87abd4d
336,445,299,574,069,060,000,000,000,000,000,000,000
7
Fix sending malformed pong messages in some cases.
static int proc_reapurbnonblock(struct usb_dev_state *ps, void __user *arg) { int retval; struct async *as; as = async_getcompleted(ps); if (as) { snoop(&ps->dev->dev, "reap %p\n", as->userurb); retval = processcompl(as, (void __user * __user *)arg); free_async(as); } else { retval = (connected(ps) ? -EAG...
0
[ "CWE-200" ]
linux
681fef8380eb818c0b845fca5d2ab1dcbab114ee
82,912,301,421,262,390,000,000,000,000,000,000,000
15
USB: usbfs: fix potential infoleak in devio The stack object “ci” has a total size of 8 bytes. Its last 3 bytes are padding bytes which are not initialized and leaked to userland via “copy_to_user”. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env) { int r = 0; switch (NODE_TYPE(node)) { case NODE_LIST: { Node* prev = NULL_NODE; do { r = setup_tree(NODE_CAR(node), reg, state, env); if (IS_NOT_NULL(prev) && r == 0) { r = next_setup(prev, NODE_CAR(node), r...
0
[ "CWE-125" ]
oniguruma
4d461376bd85e7994835677b2ff453a43c49cd28
256,732,819,494,906,000,000,000,000,000,000,000,000
124
don't expand string case folds to alternatives if code length == 1 and byte length is same
get_function_args( char_u **argp, char_u endchar, garray_T *newargs, garray_T *argtypes, // NULL unless using :def int types_optional, // types optional if "argtypes" is not NULL evalarg_T *evalarg, // context or NULL int *varargs, garray_T *default_args, int skip, exarg_T *ea...
1
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
235,889,517,252,338,760,000,000,000,000,000,000,000
190
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.
**/ int mouse_y() const { return _mouse_y;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
247,093,792,753,589,300,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static NPError g_NPP_Destroy(NPP instance, NPSavedData **sdata) { if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) return NPERR_INVALID_INSTANCE_ERROR; if (sdata) *sdata = NULL; // Process all pending calls as the data cou...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
178,209,008,034,686,870,000,000,000,000,000,000,000
29
Support all the new variables added
int ec_scalar_mul_ladder(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, const EC_POINT *point, BN_CTX *ctx) { int i, cardinality_bits, group_top, kbit, pbit, Z_is_one; EC_POINT *p = NULL; EC_POINT *s = NULL; BIGNUM *k = NULL; BIGNUM *lambd...
0
[ "CWE-327", "CWE-320" ]
openssl
b1d6d55ece1c26fa2829e2b819b038d7b6d692b4
246,634,706,142,541,800,000,000,000,000,000,000,000
247
Timing vulnerability in ECDSA signature generation (CVE-2018-0735) Preallocate an extra limb for some of the big numbers to avoid a reallocation that can potentially provide a side channel. Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/7486) (cherry pick...
void readcb(struct ev_loop *loop, ev_io *w, int revents) { int rv; auto handler = static_cast<Http2Handler *>(w->data); rv = handler->on_read(); if (rv == -1) { delete_handler(handler); } }
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
40,897,427,412,420,705,000,000,000,000,000,000,000
9
Don't read too greedily
static inline realpath_cache_bucket* realpath_cache_find(const char *path, int path_len, time_t t TSRMLS_DC) /* {{{ */ { #ifdef PHP_WIN32 unsigned long key = realpath_cache_key(path, path_len TSRMLS_CC); #else unsigned long key = realpath_cache_key(path, path_len); #endif unsigned long n = key % (sizeof(CWDG(realpa...
0
[ "CWE-190" ]
php-src
0218acb7e756a469099c4ccfb22bce6c2bd1ef87
325,754,333,733,022,100,000,000,000,000,000,000,000
32
Fix for bug #72513
virDomainDefGetOnlineVcpumap(const virDomainDef *def) { virBitmapPtr ret = NULL; size_t i; if (!(ret = virBitmapNew(def->maxvcpus))) return NULL; for (i = 0; i < def->maxvcpus; i++) { if (def->vcpus[i]->online) ignore_value(virBitmapSetBit(ret, i)); } return ret; }
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
144,553,307,852,346,600,000,000,000,000,000,000,000
15
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
read_yin_container(struct lys_module *module, struct lys_node *parent, struct lyxml_elem *yin, int options, struct unres_schema *unres) { struct ly_ctx *ctx = module->ctx; struct lyxml_elem *sub, *next, root; struct lys_node *node = NULL; struct lys_node *retval; struct lys_node_c...
0
[ "CWE-252" ]
libyang
a3917d95d516e3de267d3cfa5d4d3715a90e8777
336,173,865,557,448,440,000,000,000,000,000,000,000
218
yin parser BUGFIX invalid memory access ... in case there were some unresolved extensions. Fixes #1454 Fixes #1455
void l2cap_move_start(struct l2cap_chan *chan) { BT_DBG("chan %p", chan); if (chan->local_amp_id == AMP_ID_BREDR) { if (chan->chan_policy != BT_CHANNEL_POLICY_AMP_PREFERRED) return; chan->move_role = L2CAP_MOVE_ROLE_INITIATOR; chan->move_state = L2CAP_MOVE_WAIT_PREPARE; /* Placeholder - start physical lin...
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
178,384,842,293,629,540,000,000,000,000,000,000,000
18
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
int dccp_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen) { if (level != SOL_DCCP) return inet_csk(sk)->icsk_af_ops->getsockopt(sk, level, optname, optval, optlen); return do_dccp_getsockopt(sk, level, optname, optval, optlen); }
0
[]
linux-2.6
39ebc0276bada8bb70e067cb6d0eb71839c0fb08
223,442,227,205,688,100,000,000,000,000,000,000,000
9
[DCCP] getsockopt: Fix DCCP_SOCKOPT_[SEND,RECV]_CSCOV We were only checking if there was enough space to put the int, but left len as specified by the (malicious) user, sigh, fix it by setting len to sizeof(val) and transfering just one int worth of data, the one asked for. Also check for negative len values. Signed...
static void call_timer_fn(struct timer_list *timer, void (*fn)(struct timer_list *), unsigned long baseclk) { int count = preempt_count(); #ifdef CONFIG_LOCKDEP /* * It is permissible to free the timer from inside the * function that is called from it, this we need to take into * account for lockdep ...
0
[ "CWE-200", "CWE-330" ]
linux
f227e3ec3b5cad859ad15666874405e8c1bbc1d4
76,963,592,749,750,310,000,000,000,000,000,000,000
43
random32: update the net random state on interrupt and activity This modifies the first 32 bits out of the 128 bits of a random CPU's net_rand_state on interrupt or CPU activity to complicate remote observations that could lead to guessing the network RNG's internal state. Note that depending on some network devices'...
*/ int skb_to_sgvec_nomark(struct sk_buff *skb, struct scatterlist *sg, int offset, int len) { return __skb_to_sgvec(skb, sg, offset, len, 0);
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
244,505,816,222,412,600,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...
parse_be(const int is_emergency) { char lin[MAXBUF]; BACKEND *res; int has_addr, has_port; struct hostent *host; struct sockaddr_in in; struct sockaddr_in6 in6; if((res = (BACKEND *)malloc(sizeof(BACKEND))) == NULL) conf_err("BackEnd config: out of memory - ...
0
[]
pound
a0c52c542ca9620a96750f9877b26bf4c84aef1b
250,319,397,034,603,060,000,000,000,000,000,000,000
170
SSL Compression Disable patch for 2.6f This patch disables SSL/TLS compression entirely. There is no config option. This prevents CRIME attacks against SSL. Note that HTTP compression is still an option. Test your server at https://www.ssllabs.com/ssldb/ Original patch by Hereward Cooper <coops@fawk.eu> Openssl 0...
int rose_loopback_queue(struct sk_buff *skb, struct rose_neigh *neigh) { struct sk_buff *skbn; skbn = skb_clone(skb, GFP_ATOMIC); kfree_skb(skb); if (skbn != NULL) { skb_queue_tail(&loopback_queue, skbn); if (!rose_loopback_running()) rose_set_loopback_timer(); } return 1; }
0
[ "CWE-20" ]
linux
e0bccd315db0c2f919e7fcf9cb60db21d9986f52
118,980,037,422,316,090,000,000,000,000,000,000,000
17
rose: Add length checks to CALL_REQUEST parsing Define some constant offsets for CALL_REQUEST based on the description at <http://www.techfest.com/networking/wan/x25plp.htm> and the definition of ROSE as using 10-digit (5-byte) addresses. Use them consistently. Validate all implicit and explicit facilities lengths. ...
void devm_device_remove_groups(struct device *dev, const struct attribute_group **groups) { WARN_ON(devres_release(dev, devm_attr_groups_remove, devm_attr_group_match, /* cast away const */ (void *)groups)); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
44,007,483,247,577,420,000,000,000,000,000,000,000
7
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
static void io_kbuf_recycle(struct io_kiocb *req, unsigned issue_flags) { struct io_ring_ctx *ctx = req->ctx; struct io_buffer_list *bl; struct io_buffer *buf; if (!(req->flags & (REQ_F_BUFFER_SELECTED|REQ_F_BUFFER_RING))) return; /* don't recycle if we already did IO to this buffer */ if (req->flags & REQ_F_P...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
181,331,151,997,392,600,000,000,000,000,000,000,000
34
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
PERL_STATIC_INLINE item* push(UV key, item* curr) { item* head; Newx(head, 1, item); head->key = key; head->value = 0; head->next = curr; return head;
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
249,691,665,409,422,740,000,000,000,000,000,000,000
9
regcomp.c: Prevent integer overflow from nested regex quantifiers. (CVE-2020-10543) On 32bit systems the size calculations for nested regular expression quantifiers could overflow causing heap memory corruption. Fixes: Perl/perl5-security#125 (cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71)
void usb_sg_wait(struct usb_sg_request *io) { int i; int entries = io->entries; /* queue the urbs. */ spin_lock_irq(&io->lock); i = 0; while (i < entries && !io->status) { int retval; io->urbs[i]->dev = io->dev; spin_unlock_irq(&io->lock); retval = usb_submit_urb(io->urbs[i], GFP_NOIO); switch (ret...
0
[ "CWE-119", "CWE-787" ]
linux
2e1c42391ff2556387b3cb6308b24f6f65619feb
236,658,767,775,955,950,000,000,000,000,000,000,000
60
USB: core: harden cdc_parse_cdc_header Andrey Konovalov reported a possible out-of-bounds problem for the cdc_parse_cdc_header function. He writes: It looks like cdc_parse_cdc_header() doesn't validate buflen before accessing buffer[1], buffer[2] and so on. The only check present is while (buflen > 0). So fix thi...
int nfs4_lock_delegation_recall(struct file_lock *fl, struct nfs4_state *state, const nfs4_stateid *stateid) { struct nfs_server *server = NFS_SERVER(state->inode); int err; err = nfs4_set_lock_state(state, fl); if (err != 0) return err; err = _nfs4_do_setlk(state, F_SETLK, fl, NFS_LOCK_NEW); return nfs4_handl...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
329,240,239,550,223,080,000,000,000,000,000,000,000
11
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...
tmx_m_zone(union DateData *x) { VALUE zone = m_zone(x); /* TODO: fix potential dangling pointer */ return RSTRING_PTR(zone); }
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
110,089,486,111,060,050,000,000,000,000,000,000,000
6
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
static int serialize_cgroup_mask(FILE *f, const char *key, CGroupMask mask) { _cleanup_free_ char *s = NULL; int r; assert(f); assert(key); if (mask == 0) return 0; r = cg_mask_to_string(mask, &s); if (r < 0) return log_error_err...
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
148,206,768,308,171,580,000,000,000,000,000,000,000
16
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...
void Field_timestamp::sql_type(String &res) const { if (!decimals()) { res.set_ascii(STRING_WITH_LEN("timestamp")); return; } CHARSET_INFO *cs=res.charset(); res.length(cs->cset->snprintf(cs, (char*) res.ptr(), res.alloced_length(), "timestamp(%u)", decimals())); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
107,073,211,608,124,740,000,000,000,000,000,000,000
11
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...
fr_window_remove_from_recent_list (FrWindow *window, GFile *file) { char *uri; if (file == NULL) return; uri = g_file_get_uri (file); gtk_recent_manager_remove_item (gtk_recent_manager_get_default (), uri, NULL); g_free (uri); }
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
139,308,710,649,560,340,000,000,000,000,000,000,000
13
libarchive: sanitize filenames before extracting
get_path_for_fd (int fd, gboolean *writable_out, GError **error) { g_autofree char *proc_path = NULL; int fd_flags; struct stat st_buf; struct stat real_st_buf; g_autofree char *path = NULL; gboolean writable = FALSE; int read_access_mode; /* Must be able to get fd fla...
0
[ "CWE-94", "CWE-74" ]
flatpak
aeb6a7ab0abaac4a8f4ad98b3df476d9de6b8bd4
111,191,866,488,399,800,000,000,000,000,000,000,000
71
portal: Convert --env in extra-args into --env-fd This hides overridden variables from the command-line, which means processes running under other uids can't see them in /proc/*/cmdline, which might be important if they contain secrets. Signed-off-by: Simon McVittie <smcv@collabora.com> Part-of: https://github.com/fl...