func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
getname_flags(const char __user *filename, int flags, int *empty) { struct filename *result; char *kname; int len; result = audit_reusename(filename); if (result) return result; result = __getname(); if (unlikely(!result)) return ERR_PTR(-ENOMEM); /* * First, try to embed the struct filename inside the...
0
[ "CWE-416" ]
linux
f15133df088ecadd141ea1907f2c96df67c729f0
24,927,264,716,176,050,000,000,000,000,000,000,000
77
path_openat(): fix double fput() path_openat() jumps to the wrong place after do_tmpfile() - it has already done path_cleanup() (as part of path_lookupat() called by do_tmpfile()), so doing that again can lead to double fput(). Cc: stable@vger.kernel.org # v3.11+ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
ves_icall_System_Threading_Thread_ConstructInternalThread (MonoThread *this) { MonoInternalThread *internal = create_internal_thread_object (); internal->state = ThreadState_Unstarted; internal->apartment_state = ThreadApartmentState_Unknown; InterlockedCompareExchangePointer ((gpointer)&this->internal_thread, in...
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
173,712,927,618,516,500,000,000,000,000,000,000,000
9
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
Item_string_ascii(THD *thd, const char *str, uint length): Item_string(thd, str, length, &my_charset_latin1, DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII) { }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
337,020,910,930,886,980,000,000,000,000,000,000,000
4
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, xmlNodePtr node, xmlSchemaTypePtr type, const xmlChar *value, xmlSchemaValPtr *retVal, int fireErrors, int normalize, int isNormalized) { int ret = 0, valNeeded = (retVal) ? 1 : 0; xmlSchemaValPt...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
257,490,847,194,247,400,000,000,000,000,000,000,000
340
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
static void sco_sock_clear_timer(struct sock *sk) { if (!sco_pi(sk)->conn) return; BT_DBG("sock %p state %d", sk, sk->sk_state); cancel_delayed_work(&sco_pi(sk)->conn->timeout_work); }
0
[ "CWE-416" ]
linux
0771cbb3b97d3c1d68eecd7f00055f599954c34e
198,295,369,176,079,560,000,000,000,000,000,000,000
8
Bluetooth: SCO: Replace use of memcpy_from_msg with bt_skb_sendmsg This makes use of bt_skb_sendmsg instead of allocating a different buffer to be used with memcpy_from_msg which cause one extra copy. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
uint32_t ndp_msg_ifindex(struct ndp_msg *msg) { return msg->ifindex; }
0
[ "CWE-284" ]
libndp
a4892df306e0532487f1634ba6d4c6d4bb381c7f
195,551,873,468,936,130,000,000,000,000,000,000,000
4
libndp: validate the IPv6 hop limit None of the NDP messages should ever come from a non-local network; as stated in RFC4861's 6.1.1 (RS), 6.1.2 (RA), 7.1.1 (NS), 7.1.2 (NA), and 8.1. (redirect): - The IP Hop Limit field has a value of 255, i.e., the packet could not possibly have been forwarded by a router. T...
static int set_msr_hyperv_pw(struct kvm_vcpu *vcpu, u32 msr, u64 data) { struct kvm *kvm = vcpu->kvm; switch (msr) { case HV_X64_MSR_GUEST_OS_ID: kvm->arch.hv_guest_os_id = data; /* setting guest os id to zero disables hypercall page */ if (!kvm->arch.hv_guest_os_id) kvm->arch.hv_hypercall &= ~HV_X64_MSR_H...
0
[]
kvm
0769c5de24621141c953fbe1f943582d37cb4244
247,156,253,788,438,500,000,000,000,000,000,000,000
41
KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid" In order to be able to proceed checks on CPU-specific properties within the emulator, function "get_cpuid" is introduced. With "get_cpuid" it is possible to virtually call the guests "cpuid"-opcode without changing the VM's context. [mtosatti: cleanup/beautif...
int MAIN(int argc, char *argv[]) { X509_VERIFY_PARAM *vpm = NULL; int badarg = 0; short port=PORT; char *CApath=NULL,*CAfile=NULL; unsigned char *context = NULL; char *dhfile = NULL; #ifndef OPENSSL_NO_ECDH char *named_curve = NULL; #endif int badop=0,bugs=0; int ret=1; int off=0; int no_tmp_rsa=0,no_dhe=0,...
1
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
122,631,082,795,280,460,000,000,000,000,000,000,000
950
Add SRP support.
void HGraph::InsertRepresentationChangeForUse(HValue* value, HValue* use_value, int use_index, Representation to) { // Insert the representation change right before its use. For ph...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
109,058,352,151,234,630,000,000,000,000,000,000,000
37
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
ZEND_VM_HOT_NOCONSTCONST_HANDLER(1, ZEND_ADD, CONST|TMPVARCV, CONST|TMPVARCV) { USE_OPLINE zend_free_op free_op1, free_op2; zval *op1, *op2, *result; double d1, d2; op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R); if (ZEND_VM_SPEC && OP1_TYPE == IS_CONST && OP2_TYPE == IS_CONST) {...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
60,701,952,241,928,970,000,000,000,000,000,000,000
38
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
static int l2tp_nl_cmd_tunnel_get(struct sk_buff *skb, struct genl_info *info) { struct l2tp_tunnel *tunnel; struct sk_buff *msg; u32 tunnel_id; int ret = -ENOBUFS; struct net *net = genl_info_net(info); if (!info->attrs[L2TP_ATTR_CONN_ID]) { ret = -EINVAL; goto err; } tunnel_id = nla_get_u32(info->attrs[...
0
[ "CWE-416" ]
linux
f026bc29a8e093edfbb2a77700454b285c97e8ad
235,564,692,765,893,930,000,000,000,000,000,000,000
43
l2tp: pass tunnel pointer to ->session_create() Using l2tp_tunnel_find() in pppol2tp_session_create() and l2tp_eth_create() is racy, because no reference is held on the returned session. These functions are only used to implement the ->session_create callback which is run by l2tp_nl_cmd_session_create(). Therefore sea...
static JSValue js_bs_prop_set(JSContext *ctx, JSValueConst this_val, JSValueConst value, int magic) { s64 ival; GET_JSBS if (!bs) return GF_JS_EXCEPTION(ctx); switch (magic) { case JS_BS_POS: if (JS_ToInt64(ctx, &ival, value)) return GF_JS_EXCEPTION(ctx); gf_bs_seek(bs, ival); break; } return JS_UNDEFINED...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
166,569,050,369,353,710,000,000,000,000,000,000,000
14
fixed #2138
static void __exit mod_exit(void) { unregister_hdlc_protocol(&proto); }
0
[ "CWE-20" ]
net
66d42ed8b25b64eb63111a2b8582c5afc8bf1105
176,854,549,322,519,750,000,000,000,000,000,000,000
4
hdlc_ppp: add range checks in ppp_cp_parse_cr() There are a couple bugs here: 1) If opt[1] is zero then this results in a forever loop. If the value is less than 2 then it is invalid. 2) It assumes that "len" is more than sizeof(valid_accm) or 6 which can result in memory corruption. In the case of LCP_OPTION_...
pixBlockconvTiled(PIX *pix, l_int32 wc, l_int32 hc, l_int32 nx, l_int32 ny) { l_int32 i, j, w, h, d, xrat, yrat; PIX *pixs, *pixd, *pixc, *pixt; PIX *pixr, *pixrc, *pixg, *pixgc, *pixb, *pixbc; PIXTILING *pt; PROCNAM...
0
[]
leptonica
480f5e74c24fdc2003c42a4e15d1f24c9e6ea469
111,891,726,651,302,360,000,000,000,000,000,000,000
102
Fixed issue 21972 (oss-fuzz) Divide by zero in pixBlockconvGray().
static my_bool sql_connect(MYSQL *mysql, uint wait) { my_bool info=0; for (;;) { if (mysql_connect_ssl_check(mysql, host, user, opt_password, NullS, tcp_port, unix_port, CLIENT_REMEMBER_OPTIONS, opt_ssl_mode == SSL_MODE_REQUIRED)) { my...
0
[ "CWE-319" ]
mysql-server
0002e1380d5f8c113b6bce91f2cf3f75136fd7c7
24,430,277,152,925,524,000,000,000,000,000,000,000
78
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec)
void lsrc_del(GF_Box *s) { GF_LASERConfigurationBox *ptr = (GF_LASERConfigurationBox *)s; if (ptr == NULL) return; if (ptr->hdr) gf_free(ptr->hdr); gf_free(ptr); }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
76,252,766,856,178,080,000,000,000,000,000,000,000
7
fixed 2 possible heap overflows (inc. #1088)
static void tg3_get_estats(struct tg3 *tp, struct tg3_ethtool_stats *estats) { struct tg3_ethtool_stats *old_estats = &tp->estats_prev; struct tg3_hw_stats *hw_stats = tp->hw_stats; ESTAT_ADD(rx_octets); ESTAT_ADD(rx_fragments); ESTAT_ADD(rx_ucast_packets); ESTAT_ADD(rx_mcast_packets); ESTAT_ADD(rx_bcast_packet...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
193,383,896,066,526,360,000,000,000,000,000,000,000
83
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
static int handle_vmwrite(struct kvm_vcpu *vcpu) { unsigned long field; gva_t gva; unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION); u32 vmx_instruction_info = vmcs_read32(VMX_INSTRUCTION_INFO); /* The value to write might be 32 or 64 bits, depending on L1's long * mode, and eventually we need t...
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
40,075,213,383,413,597,000,000,000,000,000,000,000
52
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
static void packed_list(const char *dir, void (*fn)(const char *, void *), void *userdata) { char buf[256], tmp[sizeof(buf)]; const char *path, *begin, *end; size_t i, n = strlen(dir); tmp[0] = '\0'; // Previously listed entry for (i = 0; (path = mg_unlist(i)) != NULL; i++) { if (...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
338,736,786,872,508,400,000,000,000,000,000,000,000
20
Protect against the directory traversal in mg_upload()
void TightenCheck(HBoundsCheck* original_check, HBoundsCheck* tighter_check) { ASSERT(original_check->length() == tighter_check->length()); MoveIndexIfNecessary(tighter_check->index(), original_check, tighter_check); original_check->ReplaceAllUsesWith(original_check->index()); orig...
1
[]
node
3122e0eae64c5ab494b29d0a9cadef902d93f1f9
42,482,479,610,985,280,000,000,000,000,000,000,000
7
deps: fix up v8 after fd80a3 fd80a31e0697d6317ce8c2d289575399f4e06d21 has introduced a segfault during redundant boundary check elimination (#8208). The problem consists of two parts: 1. Abscense of instruction iterator in `EliminateRedundantBoundsChecks`. It was present in recent v8, but wasn't consider...
uint16_t smb2cli_session_current_channel_sequence(struct smbXcli_session *session) { return session->smb2->channel_sequence; }
0
[ "CWE-94" ]
samba
46b5e4aca6adb12a27efaad3bfe66c2d8a82ec95
111,856,008,845,102,650,000,000,000,000,000,000,000
4
CVE-2016-2019: libcli/smb: don't allow guest sessions if we require signing Note real anonymous sessions (with "" as username) don't hit this as we don't even call smb2cli_session_set_session_key() in that case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860 Signed-off-by: Stefan Metzmacher <metze@samba.org>
chpass_principal3_2_svc(chpass3_arg *arg, struct svc_req *rqstp) { static generic_ret ret; char *prime_arg; gss_buffer_desc client_name = GSS_C_EMPTY_BUFFER; gss_buffer_desc service_name = GSS_C_EMPTY_BUFFER; OM_uint32 ...
0
[ "CWE-119", "CWE-772", "CWE-401" ]
krb5
83ed75feba32e46f736fcce0d96a0445f29b96c2
111,300,654,111,921,790,000,000,000,000,000,000,000
67
Fix leaks in kadmin server stubs [CVE-2015-8631] In each kadmind server stub, initialize the client_name and server_name variables, and release them in the cleanup handler. Many of the stubs will otherwise leak the client and server name if krb5_unparse_name() fails. Also make sure to free the prime_arg variables in...
void license_free(rdpLicense* license) { if (license) { free(license->Modulus); certificate_free(license->certificate); license_free_product_info(license->ProductInfo); license_free_binary_blob(license->ErrorInfo); license_free_binary_blob(license->KeyExchangeList); license_free_binary_blob(license->Serve...
0
[ "CWE-125" ]
FreeRDP
6ade7b4cbfd71c54b3d724e8f2d6ac76a58e879a
274,202,803,012,719,280,000,000,000,000,000,000,000
21
Fixed OOB Read in license_read_new_or_upgrade_license_packet CVE-2020-11099 thanks to @antonio-morales for finding this.
inflate_zlib(GraphicsManager UNUSED *self, Image *img, uint8_t *buf, size_t bufsz) { bool ok = false; z_stream z; uint8_t *decompressed = malloc(img->load_data.data_sz); if (decompressed == NULL) fatal("Out of memory allocating decompression buffer"); z.zalloc = Z_NULL; z.zfree = Z_NULL; z.o...
0
[ "CWE-787" ]
kitty
82c137878c2b99100a3cdc1c0f0efea069313901
253,371,485,361,472,900,000,000,000,000,000,000,000
26
Graphics protocol: Dont return filename in the error message when opening file fails, since filenames can contain control characters Fixes #3128
hfs_file_read_compressed_rsrc(const TSK_FS_ATTR * a_fs_attr, TSK_OFF_T a_offset, char *a_buf, size_t a_len, int (*read_block_table)(const TSK_FS_ATTR *rAttr, CMP_OFFSET_ENTRY** offsetTableOut, uint32_t* tableSizeOut, uint32_t* t...
0
[ "CWE-190", "CWE-284" ]
sleuthkit
114cd3d0aac8bd1aeaf4b33840feb0163d342d5b
152,391,594,585,163,920,000,000,000,000,000,000,000
194
hfs: fix keylen check in hfs_cat_traverse() If key->key_len is 65535, calculating "uint16_t keylen' would cause an overflow: uint16_t keylen; ... keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len) so the code bypasses the sanity check "if (keylen > nodesize)" which results in crash later: ./too...
int mp_unpack_one(lua_State *L) { int offset = luaL_optinteger(L, 2, 0); /* Variable pop because offset may not exist */ lua_pop(L, lua_gettop(L)-1); return mp_unpack_full(L, 1, offset); }
0
[ "CWE-119", "CWE-787" ]
redis
52a00201fca331217c3b4b8b634f6a0f57d6b7d3
75,641,106,271,139,490,000,000,000,000,000,000,000
6
Security: fix Lua cmsgpack library stack overflow. During an auditing effort, the Apple Vulnerability Research team discovered a critical Redis security issue affecting the Lua scripting part of Redis. -- Description of the problem Several years ago I merged a pull request including many small changes at the Lua Msg...
static int _commit_one(struct mailbox *mailbox, struct index_change *change) { indexbuffer_t ibuf; unsigned char *buf = ibuf.buf; size_t offset; struct index_record *record = &change->record; uint32_t recno = record->recno; mailbox_index_record_to_buf(&change->record, mailbox->i.minor_version, ...
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
236,064,922,277,577,170,000,000,000,000,000,000,000
63
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
int blk_rq_map_user_iov(struct request_queue *q, struct request *rq, struct rq_map_data *map_data, const struct iov_iter *iter, gfp_t gfp_mask) { bool copy = false; unsigned long align = q->dma_pad_mask | queue_dma_alignment(q); struct bio *bio = NULL; struct iov_iter i; int ret = -EINVAL; if (!iter_is_iov...
0
[ "CWE-200" ]
linux
cc8f7fe1f5eab010191aa4570f27641876fa1267
15,815,412,004,879,100,000,000,000,000,000,000,000
42
block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern Add __GFP_ZERO flag for alloc_page in function bio_copy_kern to initialize the buffer of a bio. Signed-off-by: Haimin Zhang <tcs.kernel@gmail.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: ...
static void parse_mntopt(char *opt, unsigned long *flags, char **data) { struct mount_opt *mo; /* If opt is found in mount_opt, set or clear flags. * Otherwise append it to data. */ for (mo = &mount_opt[0]; mo->name != NULL; mo++) { if (!strncmp(opt, mo->name, strlen(mo->name))) { if (mo->clear) *flags ...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
227,403,390,576,009,880,000,000,000,000,000,000,000
21
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
bool Subgraph::IsCancelled() { return (check_cancelled_func_ != nullptr) && (*check_cancelled_func_)(cancellation_data_); }
0
[ "CWE-20", "CWE-787" ]
tensorflow
d58c96946b2880991d63d1dacacb32f0a4dfa453
73,138,971,873,775,350,000,000,000,000,000,000,000
4
[tflite] Ensure inputs and outputs don't overlap. If a model uses the same tensor for both an input and an output then this can result in data loss and memory corruption. This should not happen. PiperOrigin-RevId: 332522916 Change-Id: If0905b142415a9dfceaf2d181872f2a8fb88f48a
static void dump_cbsize(de265_image* img) { int w = img->get_width(0); int h = img->get_height(0); for (int y=0;y<h;y+=8) { for (int x=0;x<w;x+=8) { printf("%d",img->get_log2CbSize(x,y)); } printf("\n"); } }
0
[]
libde265
e83f3798dd904aa579425c53020c67e03735138d
65,437,347,099,019,540,000,000,000,000,000,000,000
12
fix check for valid PPS idx (#298)
flatpak_dir_get_remote_filter (FlatpakDir *self, const char *remote_name) { GKeyFile *config = flatpak_dir_get_repo_config (self); g_autofree char *group = get_group (remote_name); if (config) { g_autofree char *filter = g_key_file_get_string (config, group, "xa.filter", ...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
150,010,803,476,638,480,000,000,000,000,000,000,000
16
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
static void gen9_disable_guc_interrupts(struct intel_guc *guc) { struct intel_gt *gt = guc_to_gt(guc); assert_rpm_wakelock_held(&gt->i915->runtime_pm); spin_lock_irq(&gt->irq_lock); guc->interrupts.enabled = false; gen6_gt_pm_disable_irq(gt, gt->pm_guc_events); spin_unlock_irq(&gt->irq_lock); intel_synchroni...
0
[ "CWE-20", "CWE-190" ]
linux
c784e5249e773689e38d2bc1749f08b986621a26
18,136,332,316,077,292,000,000,000,000,000,000,000
16
drm/i915/guc: Update to use firmware v49.0.1 The latest GuC firmware includes a number of interface changes that require driver updates to match. * Starting from Gen11, the ID to be provided to GuC needs to contain the engine class in bits [0..2] and the instance in bits [3..6]. NOTE: this patch breaks pointer d...
rfbBool rfbCheckPasswordByList(rfbClientPtr cl,const char* response,int len) { char **passwds; int i=0; for(passwds=(char**)cl->screen->authPasswdData;*passwds;passwds++,i++) { uint8_t auth_tmp[CHALLENGESIZE]; memcpy((char *)auth_tmp, (char *)cl->authChallenge, CHALLENGESIZE); rfbEncryptBytes(auth_tm...
0
[]
libvncserver
804335f9d296440bb708ca844f5d89b58b50b0c6
208,521,317,983,072,260,000,000,000,000,000,000,000
21
Thread safety for zrle, zlib, tight. Proposed tight security type fix for debian bug 517422.
Word continueResponseHandler(void* raw_context) { auto context = WASM_CONTEXT(raw_context); context->continueResponse(); return wasmResultToWord(WasmResult::Ok); }
0
[ "CWE-476" ]
envoy
8788a3cf255b647fd14e6b5e2585abaaedb28153
32,403,975,646,972,950,000,000,000,000,000,000,000
5
1.4 - Do not call into the VM unless the VM Context has been created. (#24) * Ensure that the in VM Context is created before onDone is called. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Update as per offline discussion. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Set in_vm_context_created_ in onNet...
void ZipTest::testSkipSingleFile() { std::string testFile = getTestFile("data", "test.zip"); std::ifstream inp(testFile.c_str(), std::ios::binary); assert (inp.good()); SkipCallback skip; ZipLocalFileHeader hdr(inp, false, skip); assert (ZipCommon::HS_FAT == hdr.getHostSystem()); int major = hdr.getMajorVersionN...
1
[ "CWE-22" ]
poco
bb7e5feece68ccfd8660caee93da25c5c39a4707
262,393,190,407,593,000,000,000,000,000,000,000,000
20
merge zip entry absolute path vulnerability fix (#1968) from develop
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_CV_TMP(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2, free_op_data2, free_op_data1; zval **var_ptr; zval *value; switch (opline->extended_value) { case ZEN...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
317,058,908,708,437,540,000,000,000,000,000,000,000
80
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
jd_to_weeknum(VALUE jd, int f, double sg, VALUE *nth, int *rjd, int *ry, int *rw, int *rd) { decode_jd(jd, nth, rjd); c_jd_to_weeknum(*rjd, f, sg, ry, rw, rd); }
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
9,180,493,422,042,464,000,000,000,000,000,000,000
7
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`...
backend_set_handle (struct backend *b, struct connection *conn, void *handle) { assert (b->i < conn->nr_handles); conn->handles[b->i].handle = handle; }
1
[ "CWE-406" ]
nbdkit
a6b88b195a959b17524d1c8353fd425d4891dc5f
110,094,266,397,933,930,000,000,000,000,000,000,000
5
server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO Most known NBD clients do not bother with NBD_OPT_INFO (except for clients like 'qemu-nbd --list' that don't ever intend to connect), but go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu to add in an extra client step (whether info on the ...
void shutdownListener() override { listener_.reset(); }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
21,058,554,037,599,376,000,000,000,000,000,000,000
1
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
bool CNB::BindToDescriptor(CTXDescriptor &Descriptor) { if (m_SGL == nullptr) { return false; } Descriptor.SetNB(this); auto &HeadersArea = Descriptor.HeadersAreaAccessor(); auto EthHeaders = HeadersArea.EthHeadersAreaVA(); ULONG HeadersLength; ULONG L4HeaderOffset; if (!C...
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
265,365,173,367,185,140,000,000,000,000,000,000,000
27
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
static int wait_noreap_copyout(struct task_struct *p, pid_t pid, uid_t uid, int why, int status, struct siginfo __user *infop, struct rusage __user *rusagep) { int retval = rusagep ? getrusage(p, RUSAGE_BOTH, rusagep) : 0; put_task_struct(p); if (!retval) retval = put_user(SIGCHLD, &...
0
[ "CWE-284", "CWE-264" ]
linux
8141c7f3e7aee618312fa1c15109e1219de784a7
17,001,418,040,590,643,000,000,000,000,000,000,000
24
Move "exit_robust_list" into mm_release() We don't want to get rid of the futexes just at exit() time, we want to drop them when doing an execve() too, since that gets rid of the previous VM image too. Doing it at mm_release() time means that we automatically always do it when we disassociate a VM map from the task. ...
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { OpData* op_data = static_cast<OpData*>(node->user_data); TF_LITE_ENSURE_EQ(context, node->outputs->size, 1); // Logic for determining regular lstm and layer norm lstm: // input_size, forget_gate_layer_norm_tensor (20) null? is_layer_norm? // 20...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
98,629,961,134,130,650,000,000,000,000,000,000,000
503
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
fetch_indirect_line_string (dwarf_vma offset) { struct dwarf_section *section = &debug_displays [line_str].section; const unsigned char * ret; if (section->start == NULL) return (const unsigned char *) _("<no .debug_line_str section>"); if (offset >= section->size) { warn (_("DW_FORM_line_strp o...
0
[ "CWE-703" ]
binutils-gdb
695c6dfe7e85006b98c8b746f3fd5f913c94ebff
263,428,735,032,842,270,000,000,000,000,000,000,000
26
PR29370, infinite loop in display_debug_abbrev The PR29370 testcase is a fuzzed object file with multiple .trace_abbrev sections. Multiple .trace_abbrev or .debug_abbrev sections are not a violation of the DWARF standard. The DWARF5 standard even gives an example of multiple .debug_abbrev sections contained in group...
static void net_tx_pkt_do_sw_csum(struct NetTxPkt *pkt) { struct iovec *iov = &pkt->vec[NET_TX_PKT_L2HDR_FRAG]; uint32_t csum_cntr; uint16_t csum = 0; uint32_t cso; /* num of iovec without vhdr */ uint32_t iov_len = pkt->payload_frags + NET_TX_PKT_PL_START_FRAG - 1; uint16_t csl; struct ...
0
[ "CWE-399", "CWE-120" ]
qemu
ead315e43ea0c2ca3491209c6c8db8ce3f2bbe05
335,811,940,889,615,360,000,000,000,000,000,000,000
30
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...
int sched_nr_latency_handler(struct ctl_table *table, int write, struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) { int ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos); if (ret || !write) return ret; sched_nr_latency = DIV_ROUND_UP(sysctl_sched_latency, sysctl_sched...
0
[]
linux-2.6
6a6029b8cefe0ca7e82f27f3904dbedba3de4e06
175,408,056,800,952,570,000,000,000,000,000,000,000
14
sched: simplify sched_slice() Use the existing calc_delta_mine() calculation for sched_slice(). This saves a divide and simplifies the code because we share it with the other /cfs_rq->load users. It also improves code size: text data bss dec hex filename 42659 2740 144 45543 b1e...
static void SVGStartElement(void *context,const xmlChar *name, const xmlChar **attributes) { #define PushGraphicContext(id) \ { \ if (*id == '\0') \ (void) FormatLocaleFile(svg_info->file,"push graphic-context\n"); \ else \ (void) FormatLocaleFile(svg_info->file,"push graphic-context \"%s\"\n", \ id...
0
[ "CWE-476" ]
ImageMagick
43dfb1894761c4929d5d5c98dc80ba4e59a0d114
315,371,980,843,323,100,000,000,000,000,000,000,000
1,325
Handle null pointer return from call to xmlCreatePushParserCtxt (#2624).
xmlParseComment(xmlParserCtxtPtr ctxt) { xmlChar *buf = NULL; int size = XML_PARSER_BUFFER_SIZE; int len = 0; xmlParserInputState state; const xmlChar *in; int nbchar = 0, ccol; int inputid; /* * Check that there is a comment right here. */ if ((RAW != '<') || (NXT(1) != '...
0
[ "CWE-125" ]
libxml2
77404b8b69bc122d12231807abf1a837d121b551
159,572,117,905,116,950,000,000,000,000,000,000,000
143
Make sure the parser returns when getting a Stop order patch backported from chromiun bug fixes, assuming author is Chris
void dtls1_clear(SSL *s) { pqueue unprocessed_rcds; pqueue processed_rcds; pqueue buffered_messages; pqueue sent_messages; pqueue buffered_app_data; unsigned int mtu; if (s->d1) { unprocessed_rcds = s->d1->unprocessed_rcds.q; processed_rcds = s->d1->processed_rcds.q; buffered_messages = s->d1-...
0
[ "CWE-310" ]
openssl
cf6da05304d554aaa885151451aa4ecaa977e601
77,151,053,455,915,310,000,000,000,000,000,000,000
47
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
void ZRtp::processTimeout() { Event_t ev; ev.type = Timer; if (stateEngine != NULL) { stateEngine->processEvent(&ev); } }
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
166,508,446,898,117,570,000,000,000,000,000,000,000
8
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
CAMLprim value caml_string_set64(value str, value index, value newval) { unsigned char b1, b2, b3, b4, b5, b6, b7, b8; int64_t val; intnat idx = Long_val(index); if (idx < 0 || idx + 7 >= caml_string_length(str)) caml_array_bound_error(); val = Int64_val(newval); #ifdef ARCH_BIG_ENDIAN b1 = 0xFF & val >> 56...
0
[ "CWE-200" ]
ocaml
659615c7b100a89eafe6253e7a5b9d84d0e8df74
214,038,448,246,418,350,000,000,000,000,000,000,000
36
fix PR#7003 and a few other bugs caused by misuse of Int_val git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16525 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
void CLASS parse_external_jpeg() { const char *file, *ext; char *jname, *jfile, *jext; #ifndef LIBRAW_LIBRARY_BUILD FILE *save = ifp; #else #if defined(_WIN32) && !defined(__MINGW32__) && defined(_MSC_VER) && (_MSC_VER > 1310) if (ifp->wfname()) { std::wstring rawfile(ifp->wfname()); rawfile.replace(r...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
223,020,688,803,727,700,000,000,000,000,000,000,000
112
Secunia SA75000 advisory: several buffer overruns
RZ_API RZ_OWN RzList /*<RzBinString *>*/ *rz_bin_dex_strings(RZ_NONNULL RzBinDex *dex) { rz_return_val_if_fail(dex, NULL); DexString *string; void **it; RzList *strings = rz_list_newf(rz_bin_string_free); if (!strings) { return NULL; } ut32 ordinal = 0; rz_pvector_foreach (dex->strings, it) { string = (De...
0
[ "CWE-787" ]
rizin
1524f85211445e41506f98180f8f69f7bf115406
195,712,445,526,757,900,000,000,000,000,000,000,000
31
fix #2969 - oob write (1 byte) in dex.c
static RBinInfo *info(RBinFile *bf) { RBinInfo *ret = NULL; bool big_endian = 0; if (!(ret = R_NEW0 (RBinInfo))) { return NULL; } ret->file = strdup (bf->file); ret->bclass = strdup ("kernelcache"); ret->rclass = strdup ("ios"); ret->os = strdup ("iOS"); ret->arch = strdup ("arm"); // XXX ret->machine = str...
0
[ "CWE-476" ]
radare2
feaa4e7f7399c51ee6f52deb84dc3f795b4035d6
263,071,169,756,610,530,000,000,000,000,000,000,000
20
Fix null deref in xnu.kernelcache ##crash * Reported by @xshad3 via huntr.dev
saveatt (void *item, void *data) { struct atchinfo *aptr = item; compose_env_t *env = data; mu_message_t part; int rc; rc = mu_attachment_create (&part, aptr->content_type, aptr->encoding, aptr->name, aptr->filename); if (rc) { mu_error (_("can't create attachment %s: %s"), ap...
0
[]
mailutils
4befcfd015256c568121653038accbd84820198f
149,073,717,084,591,440,000,000,000,000,000,000,000
21
mail: disable compose escapes in non-interctive mode. * NEWS: Document changes. * doc/texinfo/programs/mail.texi: Document changes. * mail/send.c (mail_compose_send): Recognize escapes only in interactive mode.
static int ntop_stats_insert_hour_sampling(lua_State *vm) { char *sampling; time_t rawtime; int ifid; NetworkInterface* iface; StatsManager *sm; ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TNUMBER)) return(CONST_LUA_ERROR); ifid = l...
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
298,470,738,312,609,880,000,000,000,000,000,000,000
28
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
BOOL security_master_secret(const BYTE* premaster_secret, const BYTE* client_random, const BYTE* server_random, BYTE* output) { /* MasterSecret = PremasterHash('A') + PremasterHash('BB') + PremasterHash('CCC') */ return security_premaster_hash("A", 1, premaster_secret, client_random, serve...
0
[ "CWE-125", "CWE-787" ]
FreeRDP
d6cd14059b257318f176c0ba3ee0a348826a9ef8
235,999,243,427,437,300,000,000,000,000,000,000,000
11
Fixed GHSL-2020-101 missing NULL check (cherry picked from commit b207dbba35c505bbc3ad5aadc10b34980c6b7e8e)
uint64_t Cluster::Size() const { const uint64_t element_size = EbmlMasterElementSize(libwebm::kMkvCluster, 0xFFFFFFFFFFFFFFFFULL) + payload_size_; return element_size; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
160,564,992,830,241,830,000,000,000,000,000,000,000
6
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
static __be32 nfsd4_decode_destroy_clientid(struct nfsd4_compoundargs *argp, struct nfsd4_destroy_clientid *dc) { DECODE_HEAD; READ_BUF(8); COPYMEM(&dc->clientid, 8); DECODE_TAIL; }
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
64,615,916,117,335,000,000,000,000,000,000,000,000
9
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
const x509* SSL_CTX::getCert() const { return certificate_; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
96,381,456,071,516,140,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
static NO_INLINE JsVar *jspGetNamedFieldInParents(JsVar *object, const char* name, bool returnName) { // Now look in prototypes JsVar * child = jspeiFindChildFromStringInParents(object, name); /* Check for builtins via separate function * This way we save on RAM for built-ins because everything comes out of p...
1
[ "CWE-787" ]
Espruino
e069be2ecc5060ef47391716e4de94999595b260
221,373,283,736,074,360,000,000,000,000,000,000,000
53
Fix potential corruption issue caused by `delete [].__proto__` (fix #2142)
int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage) { struct address_space *swap_space; struct file *swap_storage; struct page *from_page; struct page *to_page; int i; int ret = -ENOMEM; BUG_ON(ttm->state != tt_unbound && ttm->state != tt_unpopulated); BUG_ON(ttm->caching_state != tt_c...
0
[]
linux
5de5b6ecf97a021f29403aa272cb4e03318ef586
162,092,914,397,279,260,000,000,000,000,000,000,000
59
drm/ttm/nouveau: don't call tt destroy callback on alloc failure. This is confusing, and from my reading of all the drivers only nouveau got this right. Just make the API act under driver control of it's own allocation failing, and don't call destroy, if the page table fails to create there is nothing to cleanup here...
static int cirrus_get_bpp(VGAState *s1) { CirrusVGAState * s = (CirrusVGAState *)s1; uint32_t ret = 8; if ((s->sr[0x07] & 0x01) != 0) { /* Cirrus SVGA */ switch (s->sr[0x07] & CIRRUS_SR7_BPP_MASK) { case CIRRUS_SR7_BPP_8: ret = 8; break; case CIRRUS_SR7_BPP_16_DOUBLEVCLK: ret = cirrus_ge...
0
[ "CWE-787" ]
qemu
b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef
90,318,069,154,975,820,000,000,000,000,000,000,000
37
CVE-2007-1320 - Cirrus LGD-54XX "bitblt" heap overflow I have just noticed that patch for CVE-2007-1320 has never been applied to the QEMU CVS. Please find it below. | Multiple heap-based buffer overflows in the cirrus_invalidate_region | function in the Cirrus VGA extension in QEMU 0.8.2, as used in Xen and | possib...
unsigned lodepng_zlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings) { unsigned error = 0; unsigned CM, CINFO, FDICT; if(insize < 2) return 53; /*error, size of zlib data too small*/ /*read inf...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
45,093,350,124,692,440,000,000,000,000,000,000,000
44
Fixed #5645: realloc return handling
void address_space_cache_invalidate(MemoryRegionCache *cache, hwaddr addr, hwaddr access_len) { }
0
[ "CWE-125" ]
qemu
04bf2526ce87f21b32c9acba1c5518708c243ad0
312,049,410,186,070,040,000,000,000,000,000,000,000
5
exec: use qemu_ram_ptr_length to access guest ram When accessing guest's ram block during DMA operation, use 'qemu_ram_ptr_length' to get ram block pointer. It ensures that DMA operation of given length is possible; And avoids any OOB memory access situations. Reported-by: Alex <broscutamaker@gmail.com> Signed-off-by...
static int ima_lsm_rule_init(struct ima_measure_rule_entry *entry, char *args, int lsm_rule, int audit_type) { int result; if (entry->lsm[lsm_rule].rule) return -EINVAL; entry->lsm[lsm_rule].type = audit_type; result = security_filter_rule_init(entry->lsm[lsm_rule].type, Audit_equal, args, ...
0
[ "CWE-284", "CWE-264" ]
linux
867c20265459d30a01b021a9c1e81fb4c5832aa9
146,112,141,388,140,640,000,000,000,000,000,000,000
16
ima: fix add LSM rule bug If security_filter_rule_init() doesn't return a rule, then not everything is as fine as the return code implies. This bug only occurs when the LSM (eg. SELinux) is disabled at runtime. Adding an empty LSM rule causes ima_match_rules() to always succeed, ignoring any remaining rules. defau...
static void MSLStartElement(void *context,const xmlChar *tag, const xmlChar **attributes) { AffineMatrix affine, current; ChannelType channel; ChannelType channel_mask; char *attribute, key[MagickPathExtent], *value; const char *keyword; double angle; DrawInfo ...
0
[ "CWE-772" ]
ImageMagick
c9c4ef4e7ca83d8a00effd16723f37946e89fbad
257,763,750,496,497,240,000,000,000,000,000,000,000
6,819
Fixed leaking of the image when writing an MSL image (#1360).
*/ static void mysql_prune_stmt_list(MYSQL *mysql) { LIST *pruned_list= 0; while(mysql->stmts) { LIST *element= mysql->stmts; MYSQL_STMT *stmt; mysql->stmts= list_delete(element, element); stmt= (MYSQL_STMT *) element->data; if (stmt->state != MYSQL_STMT_INIT_DONE) { stmt->mysql= 0...
0
[ "CWE-319" ]
mysql-server
060b1eadf4913f7066484ea34ec62feead1bca44
124,788,577,639,227,020,000,000,000,000,000,000,000
26
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit 3b2d28578c526f347f5cfe763681eff365731f99)
xmlSchemaCustomWarning(xmlSchemaAbstractCtxtPtr actxt, xmlParserErrors error, xmlNodePtr node, xmlSchemaTypePtr type ATTRIBUTE_UNUSED, const char *message, const xmlChar *str1, const xmlChar *str2, const xmlChar *str3) { xmlChar *msg = NULL; xmlSchemaFormatNodeForError(&msg, ...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
220,964,931,124,328,900,000,000,000,000,000,000,000
21
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
TEST(GetAllOfHeaderAsStringTest, All) { const LowerCaseString test_header("test"); { TestRequestHeaderMapImpl headers; const auto ret = HeaderUtility::getAllOfHeaderAsString(headers, test_header); EXPECT_FALSE(ret.result().has_value()); EXPECT_TRUE(ret.backingString().empty()); } { TestReque...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
49,678,816,667,675,520,000,000,000,000,000,000,000
46
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
#if !defined(GPAC_DISABLE_ISOM_HINTING) && !defined(GPAC_DISABLE_SENG) static void set_sdp_ext() { u32 i, j; for (i=0; i<nb_sdp_ex; i++) { u32 trackID = get_track_id(file, &sdp_lines[i].track_id); if (trackID) { u32 track = gf_isom_get_track_by_id(file, trackID); if (gf_isom_get_media_type(file, track)!=GF_...
0
[ "CWE-787" ]
gpac
4e56ad72ac1afb4e049a10f2d99e7512d7141f9d
116,884,754,631,917,730,000,000,000,000,000,000,000
33
fixed #2216
static int GetBoolean(const byte* input, word32* inOutIdx, word32 maxIdx) { word32 idx = *inOutIdx; byte b; if ((idx + 3) > maxIdx) return BUFFER_E; b = input[idx++]; if (b != ASN_BOOLEAN) return ASN_PARSE_E; if (input[idx++] != 1) return ASN_PARSE_E; b = input[...
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
165,252,187,896,285,100,000,000,000,000,000,000,000
20
OCSP: improve handling of OCSP no check extension
compile_string_node(Node* node, regex_t* reg) { int r, len, prev_len, slen, ambig; OnigEncoding enc = reg->enc; UChar *p, *prev, *end; StrNode* sn; sn = NSTR(node); if (sn->end <= sn->s) return 0; end = sn->end; ambig = NSTRING_IS_AMBIG(node); p = prev = sn->s; prev_len = enclen(enc, p); p ...
1
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
146,123,118,981,524,450,000,000,000,000,000,000,000
37
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
static void cdelete(JF, js_Ast *exp) { switch (exp->type) { case EXP_IDENTIFIER: if (J->strict) jsC_error(J, exp, "delete on an unqualified name is not allowed in strict mode"); emitlocal(J, F, OP_DELLOCAL, OP_DELVAR, exp); break; case EXP_INDEX: cexp(J, F, exp->a); cexp(J, F, exp->b); emit(J, F, OP_D...
0
[ "CWE-476" ]
mujs
5008105780c0b0182ea6eda83ad5598f225be3ee
174,679,852,840,416,600,000,000,000,000,000,000,000
21
Fix 697172: degenerate labeled break/continue statement. A labeled break statement will look for a matching label through its chain of parent statements. We start looking at the break statement though, so if the label is attached to the break, we'll return the break statement itself as a break target. Start looking f...
TEST_F(HttpConnectionManagerImplTest, TestStopAllIterationAndBufferOnDecodingPathFirstFilter) { setup(false, "envoy-custom-server", false); setUpEncoderAndDecoder(true, true); // Kick off the incoming data. Buffer::OwnedImpl fake_input("1234"); conn_manager_->onData(fake_input, false); // Verify that once...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
3,946,289,707,908,378,000,000,000,000,000,000,000
21
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
static void __exit nfnetlink_exit(void) { pr_info("Removing netfilter NETLINK layer.\n"); unregister_pernet_subsys(&nfnetlink_net_ops); }
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
138,026,178,536,357,510,000,000,000,000,000,000,000
5
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
bool mem_cgroup_handle_oom(struct mem_cgroup *memcg, gfp_t mask) { struct oom_wait_info owait; bool locked, need_to_kill; owait.mem = memcg; owait.wait.flags = 0; owait.wait.func = memcg_oom_wake_function; owait.wait.private = current; INIT_LIST_HEAD(&owait.wait.task_list); need_to_kill = true; mem_cgroup_mar...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
137,035,180,876,087,420,000,000,000,000,000,000,000
49
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
static void io_get_work(struct io_wq_work *work) { struct io_kiocb *req = container_of(work, struct io_kiocb, work); refcount_inc(&req->refs); }
0
[]
linux
181e448d8709e517c9c7b523fcd209f24eb38ca7
261,298,762,434,021,300,000,000,000,000,000,000,000
6
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 int compute_coverage(RCore *core) { RListIter *iter; SdbListIter *iter2; RAnalFunction *fcn; RIOSection *sec; int cov = 0; r_list_foreach (core->anal->fcns, iter, fcn) { ls_foreach (core->io->sections, iter2, sec) { if (sec->perm & R_PERM_X) { ut64 section_end = sec->vaddr + sec->vsize; ut64 s...
0
[ "CWE-125", "CWE-787" ]
radare2
a1bc65c3db593530775823d6d7506a457ed95267
271,676,900,171,961,900,000,000,000,000,000,000,000
19
Fix #12375 - Crash in bd+ao (#12382)
static void register_hinfo(AvahiServer *s) { struct utsname utsname; AvahiRecord *r; assert(s); if (!s->config.publish_hinfo) return; if (s->hinfo_entry_group) assert(avahi_s_entry_group_is_empty(s->hinfo_entry_group)); else s->hinfo_entry_group = avahi_s_entry_group_n...
0
[ "CWE-399" ]
avahi
3093047f1aa36bed8a37fa79004bf0ee287929f4
52,260,941,177,353,040,000,000,000,000,000,000,000
44
Don't get confused by UDP packets with a source port that is zero This is a fix for rhbz 475394. Problem identified by Hugo Dias.
static int atalk_connect(struct socket *sock, struct sockaddr *uaddr, int addr_len, int flags) { struct sock *sk = sock->sk; struct atalk_sock *at = at_sk(sk); struct sockaddr_at *addr; sk->sk_state = TCP_CLOSE; sock->state = SS_UNCONNECTED; if (addr_len != sizeof(*addr)) return -EINVAL; addr = (struc...
0
[ "CWE-200" ]
linux-2.6
3d392475c873c10c10d6d96b94d092a34ebd4791
78,773,267,144,846,310,000,000,000,000,000,000,000
45
appletalk: fix atalk_getname() leak atalk_getname() can leak 8 bytes of kernel memory to user Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
rfbSendRectEncodingRaw(rfbClientPtr cl, int x, int y, int w, int h) { rfbFramebufferUpdateRectHeader rect; int nlines; int bytesPerLine = w * (cl->format.bitsPerPixel / 8); char *fbptr = (cl->screen->frameBuffer ...
0
[ "CWE-119" ]
vino
dff52694a384fe95195f2211254026b752d63ec4
224,080,754,247,151,560,000,000,000,000,000,000,000
64
Avoid out-of-bounds memory accesses This fixes two critical security vulnerabilities that lead to an out-of-bounds memory access with a crafted client framebuffer update request packet. The dimensions of the update from the packet are checked to ensure that they are within the screen dimensions. Thanks to Kevin Chen ...
int P_Random (void) { prndindex = (prndindex+1)&0xff; return rndtable[prndindex]; }
0
[ "CWE-120", "CWE-787" ]
doom-vanille
8a6d9a02fa991a91ff90ccdc73b5ceabaa6cb9ec
29,557,633,817,289,182,000,000,000,000,000,000,000
5
Fix buffer overflow in M_LoadDefaults Too much data will most likely result in a crash or freeze, but you can overwrite the stack which can be used to do an arbitrary code execution. (https://twitter.com/notrevenant/status/1268654123903340544)
static int jfs_writepage(struct page *page, struct writeback_control *wbc) { return block_write_full_page(page, jfs_get_block, wbc); }
0
[ "CWE-476" ]
linux
a53046291020ec41e09181396c1e829287b48d47
311,942,978,311,798,300,000,000,000,000,000,000,000
4
jfs: prevent NULL deref in diFree Add validation check for JFS_IP(ipimap)->i_imap to prevent a NULL deref in diFree since diFree uses it without do any validations. When function jfs_mount calls diMount to initialize fileset inode allocation map, it can fail and JFS_IP(ipimap)->i_imap won't be initialized. Then it cal...
static inline void _swap16Buffer(short *pData, int numWords) { int i; for (i = 0; i < numWords; i ++) { pData[i] = _swap16(pData[i]); } }
0
[ "CWE-119" ]
soundtouch
9e02d9b04fda6c1f44336ff00bb5af1e2ffc039e
37,718,071,973,094,867,000,000,000,000,000,000,000
9
Added minimum size check for WAV header block lengh values
*/ static inline bool io_check_restriction(struct io_ring_ctx *ctx, struct io_kiocb *req, unsigned int sqe_flags) { if (!test_bit(req->opcode, ctx->restrictions.sqe_op)) return false; if ((sqe_flags & ctx->restrictions.sqe_flags_required) != ctx->restrictions.sqe_flags_required) return false; i...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
106,745,863,051,138,970,000,000,000,000,000,000,000
17
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
const GF_FilterRegister *av1dmx_register(GF_FilterSession *session) { return &AV1DmxRegister; }
0
[ "CWE-476", "CWE-787" ]
gpac
13dad7d5ef74ca2e6fe4010f5b03eb12e9bbe0ec
103,707,658,601,125,490,000,000,000,000,000,000,000
4
fixed #1719
static int final_ec_pt_formats(SSL *s, unsigned int context, int sent) { unsigned long alg_k, alg_a; if (s->server) return 1; alg_k = s->s3->tmp.new_cipher->algorithm_mkey; alg_a = s->s3->tmp.new_cipher->algorithm_auth; /* * If we are client and using an elliptic curve cryptography c...
0
[ "CWE-476" ]
openssl
fb9fa6b51defd48157eeb207f52181f735d96148
156,519,708,773,443,700,000,000,000,000,000,000,000
37
ssl sigalg extension: fix NULL pointer dereference As the variable peer_sigalgslen is not cleared on ssl rehandshake, it's possible to crash an openssl tls secured server remotely by sending a manipulated hello message in a rehandshake. On such a manipulated rehandshake, tls1_set_shared_sigalgs() calls tls12_shared_s...
eb_validate_vma(struct i915_execbuffer *eb, struct drm_i915_gem_exec_object2 *entry, struct i915_vma *vma) { if (unlikely(entry->flags & eb->invalid_flags)) return -EINVAL; if (unlikely(entry->alignment && !is_power_of_2(entry->alignment))) return -EINVAL; /* * Offset can be used as input (EXEC_OBJECT_PI...
0
[ "CWE-20" ]
linux
594cc251fdd0d231d342d88b2fdff4bc42fb0690
96,995,276,041,448,660,000,000,000,000,000,000,000
53
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...
ShapeRefiner::~ShapeRefiner() { // The lifetime of the tensors are bound to the GraphRunner, so the tensors // should be deleted before it. const_tensor_map_.clear(); }
0
[ "CWE-416", "CWE-369" ]
tensorflow
ee119d4a498979525046fba1c3dd3f13a039fbb1
226,512,991,626,857,530,000,000,000,000,000,000,000
5
Fix segmentation fault in shape inference logic. When running shape functions, some functions (such as `MutableHashTableShape`) produce extra output information in the form of a `ShapeAndType` struct. The shapes embedded in this struct are owned by an inference context that is cleaned up almost immediately; if the up...
PackLinuxElf32armLe::buildLoader(Filter const *ft) { if (Elf32_Ehdr::ELFOSABI_LINUX==ei_osabi) { if (0!=xct_off) { // shared library buildLinuxLoader( stub_arm_v5t_linux_shlib_init, sizeof(stub_arm_v5t_linux_shlib_init), nullptr, 0, ...
0
[ "CWE-476", "CWE-415" ]
upx
90279abdfcd235172eab99651043051188938dcc
232,964,078,168,610,350,000,000,000,000,000,000,000
20
PackLinuxElf::canUnpack must checkEhdr() for ELF input https://github.com/upx/upx/issues/485 modified: p_lx_elf.cpp
static json_t * is_scheme_parameters_valid(json_t * j_params) { json_t * j_return, * j_error, * j_element = NULL, * j_cert; size_t index = 0; json_int_t pubkey; char * message; if (json_is_object(j_params)) { j_error = json_array(); if (j_error != NULL) { if (!json_is_boolean(json_object_get(...
0
[ "CWE-120", "CWE-787" ]
glewlwyd
0efd112bb62f566877750ad62ee828bff579b4e2
114,302,830,006,169,840,000,000,000,000,000,000,000
101
Fix fido2 signature validation bug
static int nested_vmx_store_msr_check(struct kvm_vcpu *vcpu, struct vmx_msr_entry *e) { if (e->index == MSR_IA32_SMBASE || /* SMM is not supported */ nested_vmx_msr_check_common(vcpu, e)) return -EINVAL; return 0; }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
161,049,539,979,180,880,000,000,000,000,000,000,000
8
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
static int set_register(pegasus_t *pegasus, __u16 indx, __u8 data) { u8 *buf; int ret; buf = kmemdup(&data, 1, GFP_NOIO); if (!buf) return -ENOMEM; ret = usb_control_msg(pegasus->usb, usb_sndctrlpipe(pegasus->usb, 0), PEGASUS_REQ_SET_REG, PEGASUS_REQT_WRITE, data, indx, buf, 1, 1000); if (re...
0
[ "CWE-119", "CWE-284" ]
linux
5593523f968bc86d42a035c6df47d5e0979b5ace
10,274,226,079,355,678,000,000,000,000,000,000,000
18
pegasus: Use heap buffers for all register access Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") References: https://bugs.debian.org/852556 Reported-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@...
static int handle_dr(struct kvm_vcpu *vcpu) { unsigned long exit_qualification; int dr, dr7, reg; int err = 1; exit_qualification = vmx_get_exit_qual(vcpu); dr = exit_qualification & DEBUG_REG_ACCESS_NUM; /* First, if DR does not exist, trigger UD */ if (!kvm_require_dr(vcpu, dr)) return 1; if (vmx_get_cpl...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
116,164,412,775,868,460,000,000,000,000,000,000,000
62
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
int openssl_spki_cleanup(const char *src, char *dest) { int removed=0; while (*src) { if (*src!='\n'&&*src!='\r') { *dest++=*src; } else { ++removed; } ++src; } *dest=0; return removed; }
0
[ "CWE-754" ]
php-src
89637c6b41b510c20d262c17483f582f115c66d6
159,687,977,379,566,910,000,000,000,000,000,000,000
15
Fix bug #74651 - check EVP_SealInit as it can return -1
check_result_t handler_rowid_filter_check(void *h_arg) { handler *h= (handler*) h_arg; TABLE *tab= h->get_table(); /* Check for out-of-range and killed conditions only if we haven't done it already in the pushed index condition check */ if (!h->pushed_idx_cond) { THD *thd= h->table->in_use; ...
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
12,080,508,082,990,015,000,000,000,000,000,000,000
25
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
static void print_rsync_version(enum logcode f) { char *subprotocol = ""; char const *got_socketpair = "no "; char const *have_inplace = "no "; char const *hardlinks = "no "; char const *prealloc = "no "; char const *symtimes = "no "; char const *acls = "no "; char const *xattrs = "no "; char const *links = "n...
0
[]
rsync
7706303828fcde524222babb2833864a4bd09e07
238,558,148,947,488,600,000,000,000,000,000,000,000
83
Ignore --protect-args when already sent by client In parse_arguments when --protect-args is encountered the function exits early. The caller is expected to check protect_args, and recall parse_arguments setting protect_args to 2. This patch prevents the client from resetting protect_args during the second pass of pars...
static const string EncodeDNSLabel(const string& input) { if(input.length() == 1 && input[0]=='.') // otherwise we encode .. (long story) return string (1, 0); labelparts_t parts; bool unescapedSomething = labeltokUnescape(parts, input); string ret; if(!unescapedSomething) { for(labelparts_t::...
0
[ "CWE-399" ]
pdns
adb10be102ddd4d2baf7a8adbb5673946fe5e555
256,826,126,050,574,800,000,000,000,000,000,000,000
28
fix forward reference-check in getLabelFromContent()
static int session_predicate_push_promise_send(nghttp2_session *session, nghttp2_stream *stream) { int rv; if (!session->server) { return NGHTTP2_ERR_PROTO; } rv = session_predicate_for_stream_send(session, stream); if (rv != 0) { return rv; } asse...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
44,411,179,099,264,010,000,000,000,000,000,000,000
26
Add nghttp2_option_set_max_outbound_ack