func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void Item::print_item_w_name(String *str, enum_query_type query_type) { print(str, query_type); if (name) { THD *thd= current_thd; str->append(STRING_WITH_LEN(" AS ")); append_identifier(thd, str, name, (uint) strlen(name)); } }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
8,799,188,935,132,184,000,000,000,000,000,000,000
11
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
smtp_report_timeout(struct smtp_session *s) { if (! SESSION_FILTERED(s)) return; report_smtp_timeout("smtp-in", s->id); }
0
[ "CWE-78", "CWE-252" ]
src
9dcfda045474d8903224d175907bfc29761dcb45
319,302,560,437,164,000,000,000,000,000,000,000,000
7
Fix a security vulnerability discovered by Qualys which can lead to a privileges escalation on mbox deliveries and unprivileged code execution on lmtp deliveries, due to a logic issue causing a sanity check to be missed. ok eric@, millert@
static int tg3_ape_wait_for_event(struct tg3 *tp, u32 timeout_us) { u32 i, apedata; for (i = 0; i < timeout_us / 10; i++) { apedata = tg3_ape_read32(tp, TG3_APE_EVENT_STATUS); if (!(apedata & APE_EVENT_STATUS_EVENT_PENDING)) break; udelay(10); } return i == timeout_us / 10; }
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
145,599,243,552,226,830,000,000,000,000,000,000,000
15
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 OPJ_BOOL opj_j2k_is_cinema_compliant(opj_image_t *image, OPJ_UINT16 rsiz, opj_event_mgr_t *p_manager) { OPJ_UINT32 i; /* Number of components */ if (image->numcomps != 3){ opj_event_msg(p_manager, EVT_WARNING, "JPEG 2000 Profile-3 (2k dc profile) requires:\n" ...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
282,782,087,493,262,900,000,000,000,000,000,000,000
61
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
static bool vmxnet3_verify_driver_magic(hwaddr dshmem) { return (VMXNET3_READ_DRV_SHARED32(dshmem, magic) == VMXNET3_REV1_MAGIC); }
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
14,006,582,763,632,590,000,000,000,000,000,000,000
4
net/vmxnet3: Refine l2 header validation Validation of l2 header length assumed minimal packet size as eth_header + 2 * vlan_header regardless of the actual protocol. This caused crash for valid non-IP packets shorter than 22 bytes, as 'tx_pkt->packet_type' hasn't been assigned for such packets, and 'vmxnet3_on_tx_do...
static int exec_mmap(struct mm_struct *mm) { struct task_struct *tsk; struct mm_struct *old_mm, *active_mm; int ret; /* Notify parent that we're no longer interested in the old VM */ tsk = current; old_mm = current->mm; exec_mm_release(tsk, old_mm); ret = mutex_lock_killable(&tsk->signal->exec_update_mutex); ...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
17,535,904,503,300,523,000,000,000,000,000,000,000
51
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
transit_state (struct dfa *d, state_num s, unsigned char const **pp) { state_num s1; int mbclen; /* The length of current input multibyte character. */ int maxlen = 0; size_t i, j; int *match_lens = NULL; size_t nelem = d->states[s].mbps.nelem; /* Just a alias. */ position_set follows; unsigned char c...
0
[ "CWE-189" ]
grep
cbbc1a45b9f843c811905c97c90a5d31f8e6c189
214,589,015,550,625,300,000,000,000,000,000,000,000
77
grep: fix some core dumps with long lines etc. These problems mostly occur because the code attempts to stuff sizes into int or into unsigned int; this doesn't work on most 64-bit hosts and the errors can lead to core dumps. * NEWS: Document this. * src/dfa.c (token): Typedef to ptrdiff_t, since the enum's range could...
static void doClosedir(DIR *dir) { closedir(dir); }
0
[ "CWE-200", "CWE-61" ]
passenger
4043718264095cde6623c2cbe8c644541036d7bf
152,635,881,497,403,080,000,000,000,000,000,000,000
3
Disable unused feature.
cdf_copy_info(cdf_property_info_t *inp, const void *p, const void *e, size_t len) { if (inp->pi_type & CDF_VECTOR) return 0; if (CAST(size_t, CAST(const char *, e) - CAST(const char *, p)) < len) return 0; (void)memcpy(&inp->pi_val, p, len); switch (len) { case 2: inp->pi_u16 = CDF_TOLE2(inp->pi_u16);...
0
[ "CWE-787" ]
file
46a8443f76cec4b41ec736eca396984c74664f84
307,371,676,595,820,180,000,000,000,000,000,000,000
26
Limit the number of elements in a vector (found by oss-fuzz)
xmlXPtrGetLastChar(xmlNodePtr *node, int *indx) { xmlNodePtr cur; int pos, len = 0; if ((node == NULL) || (indx == NULL)) return(-1); cur = *node; pos = *indx; if (cur == NULL) return(-1); if ((cur->type == XML_ELEMENT_NODE) || (cur->type == XML_DOCUMENT_NODE) || (cur->type == XML_HTM...
0
[ "CWE-415" ]
libxml2
f5048b3e71fc30ad096970b8df6e7af073bae4cb
327,450,034,704,295,300,000,000,000,000,000,000,000
36
Hardening of XPath evaluation Add a mechanism of frame for XPath evaluation when entering a function or a scoped evaluation, also fix a potential problem in predicate evaluation.
dname_remove_labels(uint8_t** dname, size_t* len, int n) { int i; for(i=0; i<n; i++) dname_remove_label(dname, len); }
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
94,538,241,270,246,430,000,000,000,000,000,000,000
6
- CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. - CVE-2020-12663 Malformed answers from upstream name servers can be used to make Unbound unresponsive.
static void jsR_callscript(js_State *J, int n, js_Function *F, js_Environment *scope) { js_Value v; if (scope) jsR_savescope(J, scope); js_pop(J, n); jsR_run(J, F); v = *stackidx(J, -1); TOP = --BOT; /* clear stack */ js_pushvalue(J, v); if (scope) jsR_restorescope(J); }
0
[ "CWE-476" ]
mujs
77ab465f1c394bb77f00966cd950650f3f53cb24
294,544,873,815,824,520,000,000,000,000,000,000,000
16
Fix 697401: Error when dropping extra arguments to lightweight functions.
static int nz_strcmp(int nzlength, const char *nz, const char *z) { int zlength=strlen(z); return (zlength == nzlength) && (strncmp(nz, z, zlength) == 0) ? 0 : -1; }
0
[ "CWE-125" ]
memcached
554b56687a19300a75ec24184746b5512580c819
92,887,586,254,950,020,000,000,000,000,000,000,000
4
fix strncpy call to avoid ASAN violation Ensure we're only reading to the size of the smallest buffer, since they're both on the stack and could potentially overlap. Overlapping is defined as ... undefined behavior. I've looked through all available implementations of strncpy and they still only copy from the first \0...
_gcry_mpi_ec_curve_point (gcry_mpi_point_t point, mpi_ec_t ctx) { int res = 0; gcry_mpi_t x, y, w; x = mpi_new (0); y = mpi_new (0); w = mpi_new (0); /* Check that the point is in range. This needs to be done here and * not after conversion to affine coordinates. */ if (mpi_cmpabs (point->x, ctx->p...
0
[ "CWE-203" ]
libgcrypt
d5407b78cca9f9d318a4f4d2f6ba2b8388584cd9
57,140,437,661,714,810,000,000,000,000,000,000,000
103
ecc: Add mitigation against timing attack. * cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_sign): Add the order N to K. * mpi/ec.c (_gcry_mpi_ec_mul_point): Compute with NBITS of P or larger. -- Cherry-picked master commit of: b9577f7c89b4327edc09f2231bc8b31521102c79 CVE-id: CVE-2019-13627 GnuPG-bug-id: 4626 Co-authored-by...
static bool nft_set_ops_candidate(const struct nft_set_type *type, u32 flags) { return (flags & type->features) == (flags & NFT_SET_FEATURES); }
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
177,136,998,170,864,470,000,000,000,000,000,000,000
4
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
UnicodeString::hasMoreChar32Than(int32_t start, int32_t length, int32_t number) const { pinIndices(start, length); // if(isBogus()) then fArray==0 and start==0 - u_strHasMoreChar32Than() checks for NULL return u_strHasMoreChar32Than(getArrayStart()+start, length, number); }
0
[ "CWE-190", "CWE-787" ]
icu
b7d08bc04a4296982fcef8b6b8a354a9e4e7afca
335,432,556,712,158,360,000,000,000,000,000,000,000
5
ICU-20958 Prevent SEGV_MAPERR in append See #971
int aio_complete(struct kiocb *iocb, long res, long res2) { struct kioctx *ctx = iocb->ki_ctx; struct aio_ring_info *info; struct aio_ring *ring; struct io_event *event; unsigned long flags; unsigned long tail; int ret; /* * Special case handling for sync iocbs: * - events go directly into the iocb for f...
0
[ "CWE-190" ]
linux-2.6
75e1c70fc31490ef8a373ea2a4bea2524099b478
52,466,343,064,291,570,000,000,000,000,000,000,000
100
aio: check for multiplication overflow in do_io_submit Tavis Ormandy pointed out that do_io_submit does not do proper bounds checking on the passed-in iocb array:        if (unlikely(nr < 0))                return -EINVAL;        if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(iocbpp)))))                retu...
static void cfi_init(struct module *mod) { #ifdef CONFIG_CFI_CLANG initcall_t *init; exitcall_t *exit; rcu_read_lock_sched(); mod->cfi_check = (cfi_check_fn) find_kallsyms_symbol_value(mod, "__cfi_check"); init = (initcall_t *) find_kallsyms_symbol_value(mod, "__cfi_jt_init_module"); exit = (exitcall_t *) ...
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
63,632,715,321,499,360,000,000,000,000,000,000,000
24
module: limit enabling module.sig_enforce Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying "module.sig_enforce=1" on the boot command line sets "sig_enforce". Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured. This patch makes the presence of /sys/module/module/parameters/s...
TS_RESP *d2i_TS_RESP(TS_RESP **a, const unsigned char **pp, long len) { long status; TS_RESP *ret; ret = d2i_TS_RESP_int(a, pp, len); if (!ret) { TSerr(TS_F_D2I_TS_RESP, TS_R_D2I_TS_RESP_INT_FAILED); return NULL; } status = ASN1_INTEGER_get(ret->status_info->status); if (ret->token) { if (status != 0 ...
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
260,185,259,059,707,370,000,000,000,000,000,000,000
35
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
long ssl2_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp) (void)) { return (0); }
0
[ "CWE-20" ]
openssl
86f8fb0e344d62454f8daf3e15236b2b59210756
69,701,543,832,068,690,000,000,000,000,000,000,000
4
Fix reachable assert in SSLv2 servers. This assert is reachable for servers that support SSLv2 and export ciphers. Therefore, such servers can be DoSed by sending a specially crafted SSLv2 CLIENT-MASTER-KEY. Also fix s2_srvr.c to error out early if the key lengths are malformed. These lengths are sent unencrypted, so...
eb_unreserve_vma(struct i915_vma *vma, unsigned int *flags) { if (!(*flags & __EXEC_OBJECT_HAS_PIN)) return; __eb_unreserve_vma(vma, *flags); *flags &= ~__EXEC_OBJECT_RESERVED; }
0
[ "CWE-20" ]
linux
594cc251fdd0d231d342d88b2fdff4bc42fb0690
186,226,443,823,635,400,000,000,000,000,000,000,000
8
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...
virDomainHostdevMatchCapsMisc(virDomainHostdevDefPtr a, virDomainHostdevDefPtr b) { return STREQ_NULLABLE(a->source.caps.u.misc.chardev, b->source.caps.u.misc.chardev); }
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
225,372,239,036,404,030,000,000,000,000,000,000,000
6
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...
static void __io_req_complete_post(struct io_kiocb *req, s32 res, u32 cflags) { if (!(req->flags & REQ_F_CQE_SKIP)) __io_fill_cqe_req(req, res, cflags); __io_req_complete_put(req); }
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
190,036,169,735,216,500,000,000,000,000,000,000,000
7
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...
lyp_get_yang_data_template(const struct lys_module *module, const char *yang_data_name, int yang_data_name_len) { int i, j; const struct lys_node *ret = NULL; const struct lys_submodule *submodule; for(i = 0; i < module->ext_size; ++i) { if (!strcmp(module->ext[i]->def->name, "yang-data") && !s...
0
[ "CWE-787" ]
libyang
f6d684ade99dd37b21babaa8a856f64faa1e2e0d
106,354,041,662,107,470,000,000,000,000,000,000,000
27
parser BUGFIX long identity name buffer overflow STRING_OVERFLOW (CWE-120)
static int handle_errors(Sass_Context* c_ctx) { try { return handle_error(c_ctx); } catch (...) { return handle_error(c_ctx); } }
0
[ "CWE-125" ]
libsass
8f40dc03e5ab5a8b2ebeb72b31f8d1adbb2fd6ae
6,751,985,826,017,642,000,000,000,000,000,000,000
4
Optimize line_begin/end search in `handle_error` There is no need to advance by UTF-8 code points when searching for an ASCII character, because UTF-8 is a prefix-free encoding.
void getClientsMaxBuffers(unsigned long *longest_output_list, unsigned long *biggest_input_buffer) { client *c; listNode *ln; listIter li; unsigned long lol = 0, bib = 0; listRewind(server.clients,&li); while ((ln = listNext(&li)) != NULL) { c = listNodeValue(l...
0
[ "CWE-254" ]
redis
874804da0c014a7d704b3d285aa500098a931f50
48,008,334,399,562,820,000,000,000,000,000,000,000
17
Security: Cross Protocol Scripting protection. This is an attempt at mitigating problems due to cross protocol scripting, an attack targeting services using line oriented protocols like Redis that can accept HTTP requests as valid protocol, by discarding the invalid parts and accepting the payloads sent, for example, ...
static int ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *expr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); zend_bool result; if (Z_TYPE_P(expr) == IS_OBJECT && Z_OBJ_HT_P(expr)->get_class_entry) { result = instanceof_function(Z_OB...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
255,513,964,614,323,950,000,000,000,000,000,000,000
16
- 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
lyd_insert_attr(struct lyd_node *parent, const struct lys_module *mod, const char *name, const char *value) { struct lyd_attr *a, *iter; struct ly_ctx *ctx; const struct lys_module *module; const char *p; char *aux; int pos, i; if (!parent || !name || !value) { LOGARG; retur...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
65,419,661,684,075,310,000,000,000,000,000,000,000
82
schema tree BUGFIX do not check features while still resolving schema Fixes #723
cmsBool OptimizeByResampling(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags) { cmsPipeline* Src = NULL; cmsPipeline* Dest = NULL; cmsStage* mpe; cmsStage* CLUT; cmsStage *KeepPreLin = NULL, *KeepPostLin = NULL; int...
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
57,025,715,278,177,910,000,000,000,000,000,000,000
163
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
void force_sig(int sig) { struct kernel_siginfo info; clear_siginfo(&info); info.si_signo = sig; info.si_errno = 0; info.si_code = SI_KERNEL; info.si_pid = 0; info.si_uid = 0; force_sig_info(&info); }
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
234,795,060,700,786,930,000,000,000,000,000,000,000
12
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
*/ static struct file *io_uring_get_file(struct io_ring_ctx *ctx) { struct file *file; #if defined(CONFIG_UNIX) int ret; ret = sock_create_kern(&init_net, PF_UNIX, SOCK_RAW, IPPROTO_IP, &ctx->ring_sock); if (ret) return ERR_PTR(ret); #endif file = anon_inode_getfile_secure("[io_uring]", &io_uring_fops, ct...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
154,624,258,361,868,640,000,000,000,000,000,000,000
24
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...
int qcow2_mark_corrupt(BlockDriverState *bs) { BDRVQcowState *s = bs->opaque; s->incompatible_features |= QCOW2_INCOMPAT_CORRUPT; return qcow2_update_header(bs); }
0
[ "CWE-476" ]
qemu
11b128f4062dd7f89b14abc8877ff20d41b28be9
45,978,247,663,287,280,000,000,000,000,000,000,000
7
qcow2: Fix NULL dereference in qcow2_open() error path (CVE-2014-0146) The qcow2 code assumes that s->snapshots is non-NULL if s->nb_snapshots != 0. By having the initialisation of both fields separated in qcow2_open(), any error occuring in between would cause the error path to dereference NULL in qcow2_free_snapshot...
get_obj_from_str(str) VALUE str; { const char *s = StringValueCStr(str); #if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0 return Tcl_NewStringObj((char*)s, RSTRING_LEN(str)); #else /* TCL_VERSION >= 8.1 */ VALUE enc = rb_attr_get(str, ID_at_enc); if (!NIL_P(enc)) { StringValue(enc); ...
0
[]
tk
d098136e3f62a4879a7d7cd34bbd50f482ba3331
10,343,705,325,244,331,000,000,000,000,000,000,000
33
tcltklib.c: use StringValueCStr [ci skip] * ext/tk/tcltklib.c (set_max_block_time, tcl_protect_core, ip_init, ip_create_slave_core, get_obj_from_str, ip_cancel_eval_core, lib_set_system_encoding, alloc_invoke_arguments, lib_merge_tklist): use StringValueCStr instead of StringValuePtr for values to be passed to...
static int reencrypt_add_backup_segment(struct crypt_device *cd, struct luks2_hdr *hdr, struct luks2_reencrypt *rh, unsigned final) { int digest, s = LUKS2_segment_first_unused_id(hdr); json_object *jobj; if (s < 0) return s; digest = final ? rh->digest_new : rh->digest_old; jobj = final ? rh->jobj_segme...
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
236,699,200,759,161,160,000,000,000,000,000,000,000
24
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...
struct btf *bpf_get_btf_vmlinux(void) { if (!btf_vmlinux && IS_ENABLED(CONFIG_DEBUG_INFO_BTF)) { mutex_lock(&bpf_verifier_lock); if (!btf_vmlinux) btf_vmlinux = btf_parse_vmlinux(); mutex_unlock(&bpf_verifier_lock); } return btf_vmlinux; }
0
[]
linux
9b00f1b78809309163dda2d044d9e94a3c0248a3
234,269,330,592,057,920,000,000,000,000,000,000,000
10
bpf: Fix truncation handling for mod32 dst reg wrt zero Recently noticed that when mod32 with a known src reg of 0 is performed, then the dst register is 32-bit truncated in verifier: 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (b7) r0 = 0 1: R0_w=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 1: (b7) r1 = -1 2: R0_w=inv...
flatpak_dir_resolve_free (FlatpakDirResolve *resolve) { if (resolve) { g_free (resolve->remote); g_free (resolve->ref); g_free (resolve->opt_commit); g_free (resolve->resolved_commit); g_bytes_unref (resolve->resolved_metadata); g_free (resolve); } }
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
160,170,516,711,754,090,000,000,000,000,000,000,000
12
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
static int kdb_kill(int argc, const char **argv) { long sig, pid; char *endp; struct task_struct *p; if (argc != 2) return KDB_ARGCOUNT; sig = simple_strtol(argv[1], &endp, 0); if (*endp) return KDB_BADINT; if ((sig >= 0) || !valid_signal(-sig)) { kdb_printf("Invalid signal parameter.<-signal>\n"); ret...
0
[ "CWE-787" ]
linux
eadb2f47a3ced5c64b23b90fd2a3463f63726066
259,085,292,287,340,270,000,000,000,000,000,000,000
36
lockdown: also lock down previous kgdb use KGDB and KDB allow read and write access to kernel memory, and thus should be restricted during lockdown. An attacker with access to a serial port (for example, via a hypervisor console, which some cloud vendors provide over the network) could trigger the debugger so it is i...
explicit SummaryTensorOpV2(OpKernelConstruction* context) : OpKernel(context) {}
0
[ "CWE-20", "CWE-703" ]
tensorflow
290bb05c80c327ed74fae1d089f1001b1e2a4ef7
107,388,004,016,445,100,000,000,000,000,000,000,000
2
Fix tf.raw_ops.TensorSummaryV2 vulnerability with invalid serialized_summary_metadata. Check that input is actually a scalar before treating it as such. PiperOrigin-RevId: 445197183
sctp_disposition_t sctp_sf_cookie_wait_icmp_abort(const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { return sctp_stop_t1_and_abort(commands, SCTP_ERROR_NO_ERROR, asoc, (struct sctp_transport *)arg); }
0
[]
linux-2.6
7c3ceb4fb9667f34f1599a062efecf4cdc4a4ce5
293,653,176,228,495,580,000,000,000,000,000,000,000
9
[SCTP]: Allow spillover of receive buffer to avoid deadlock. This patch fixes a deadlock situation in the receive path by allowing temporary spillover of the receive buffer. - If the chunk we receive has a tsn that immediately follows the ctsn, accept it even if we run out of receive buffer space and renege data wi...
int ttm_pool_populate(struct ttm_tt *ttm, struct ttm_operation_ctx *ctx) { struct ttm_mem_global *mem_glob = ttm->bdev->glob->mem_glob; unsigned i; int ret; if (ttm->state != tt_unpopulated) return 0; if (ttm_check_under_lowerlimit(mem_glob, ttm->num_pages, ctx)) return -ENOMEM; ret = ttm_get_pages(ttm->pa...
0
[ "CWE-125" ]
linux
453393369dc9806d2455151e329c599684762428
328,557,526,176,910,350,000,000,000,000,000,000,000
39
drm/ttm: fix incrementing the page pointer for huge pages When we increment the counter we need to increment the pointer as well. Signed-off-by: Christian König <christian.koenig@amd.com> Fixes: e16858a7e6e7 drm/ttm: fix start page for huge page check in ttm_put_pages() Reviewed-by: Michel Dänzer <michel.daenzer@amd....
static int ntop_interface_set_idle(lua_State* vm) { NetworkInterfaceView *ntop_interface = getCurrentInterface(vm); bool state; ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); if(!ntop_interface) return(CONST_LUA_ERROR); if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TBOOLEAN)) return(CO...
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
213,315,227,298,673,260,000,000,000,000,000,000,000
15
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
intrusive_ptr<Expression> ExpressionTrim::parse(ExpressionContext* const expCtx, BSONElement expr, const VariablesParseState& vps) { const auto name = expr.fieldNameStringData(); TrimType trimType = TrimType::kBoth; ...
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
37,092,315,136,601,370,000,000,000,000,000,000,000
34
SERVER-49404 Enforce additional checks in $arrayToObject
void CLASS kodak_65000_load_raw() { short buf[256]; int row, col, len, pred[2], ret, i; for (row=0; row < height; row++) { #ifdef LIBRAW_LIBRARY_BUILD checkCancel(); #endif for (col=0; col < width; col+=256) { pred[0] = pred[1] = 0; len = MIN (256, width-col); ret = kodak_65000_decode...
1
[ "CWE-119", "CWE-125", "CWE-787" ]
LibRaw
d13e8f6d1e987b7491182040a188c16a395f1d21
313,345,098,145,828,800,000,000,000,000,000,000,000
20
CVE-2017-1438 credits; fix for Kodak 65000 out of bounds access
location_list_from_uri_list (const GList *uris) { const GList *l; GList *files; GFile *f; files = NULL; for (l = uris; l != NULL; l = l->next) { f = g_file_new_for_uri (l->data); files = g_list_prepend (files, f); } return g_list_reverse (files); }
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
274,191,870,506,239,900,000,000,000,000,000,000,000
15
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
TEST_F(Http1ServerConnectionImplTest, BadHeadRequest) { initialize(); MockRequestDecoder decoder; Http::ResponseEncoder* response_encoder = nullptr; EXPECT_CALL(callbacks_, newStream(_, _)) .WillOnce(Invoke([&](ResponseEncoder& encoder, bool) -> RequestDecoder& { response_encoder = &encoder; ...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
236,420,820,813,385,500,000,000,000,000,000,000,000
18
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
getarg( const char *str, int code, arg_v *argp ) { u_long ul; switch (code & ~OPT) { case NTP_STR: argp->string = str; break; case NTP_ADD: if (!getnetnum(str, &argp->netnum, NULL, 0)) return 0; break; case NTP_UINT: if ('&' == str[0]) { if (!atouint(&str[1], &ul)) { fprintf(stderr, ...
0
[ "CWE-20" ]
ntp
07a5b8141e354a998a52994c3c9cd547927e56ce
235,190,497,853,469,270,000,000,000,000,000,000,000
68
[TALOS-CAN-0063] avoid buffer overrun in ntpq
static int php_date_timezone_initialize_from_hash(zval **return_value, php_timezone_obj **tzobj, HashTable *myht TSRMLS_DC) { zval **z_timezone = NULL; zval **z_timezone_type = NULL; if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS && Z_TYPE_PP(z_timezone_ty...
0
[]
php-src
c377f1a715476934133f3254d1e0d4bf3743e2d2
274,067,355,825,103,500,000,000,000,000,000,000,000
14
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
static inline void highlight_pointer(const int where) { complement_pos(sel_cons, where); }
0
[ "CWE-399" ]
linux-2.6
878b8619f711280fd05845e21956434b5e588cc4
89,608,649,581,949,740,000,000,000,000,000,000,000
4
Fix memory corruption in console selection Fix an off-by-two memory error in console selection. The loop below goes from sel_start to sel_end (inclusive), so it writes one more character. This one more character was added to the allocated size (+1), but it was not multiplied by an UTF-8 multiplier. This patch fixes...
inline bool operator()(const CryptoPP::HuffmanDecoder::CodeInfo &lhs, const CryptoPP::HuffmanDecoder::CodeInfo &rhs) {return lhs.code < rhs.code;}
0
[ "CWE-190", "CWE-125" ]
cryptopp
07dbcc3d9644b18e05c1776db2a57fe04d780965
91,374,659,106,006,840,000,000,000,000,000,000,000
2
Add Inflator::BadDistanceErr exception (Issue 414) The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings
void bn_sqr_comba4(BN_ULONG *r, const BN_ULONG *a) { #ifdef BN_LLONG BN_ULLONG t,tt; #else BN_ULONG bl,bh; #endif BN_ULONG t1,t2; BN_ULONG c1,c2,c3; c1=0; c2=0; c3=0; sqr_add_c(a,0,c1,c2,c3); r[0]=c1; c1=0; sqr_add_c2(a,1,0,c2,c3,c1); r[1]=c2; c2=0; sqr_add_c(a,1,c3,c1,c2); sqr_add_c2(a,2,0,c3,c1,c2); ...
1
[ "CWE-310" ]
openssl
a7a44ba55cb4f884c6bc9ceac90072dea38e66d0
32,777,313,805,555,757,000,000,000,000,000,000,000
38
Fix for CVE-2014-3570 (with minor bn_asm.c revamp). Reviewed-by: Emilia Kasper <emilia@openssl.org>
unsigned long __ref init_memory_mapping(unsigned long start, unsigned long end) { struct map_range mr[NR_RANGE_MR]; unsigned long ret = 0; int nr_range, i; pr_debug("init_memory_mapping: [mem %#010lx-%#010lx]\n", start, end - 1); memset(mr, 0, sizeof(mr)); nr_range = split_mem_range(mr, 0, s...
0
[ "CWE-200", "CWE-732" ]
linux
a4866aa812518ed1a37d8ea0c881dc946409de94
284,981,290,223,900,500,000,000,000,000,000,000,000
21
mm: Tighten x86 /dev/mem with zeroing reads Under CONFIG_STRICT_DEVMEM, reading System RAM through /dev/mem is disallowed. However, on x86, the first 1MB was always allowed for BIOS and similar things, regardless of it actually being System RAM. It was possible for heap to end up getting allocated in low 1MB RAM, and ...
bool Sampler::operator==(const Sampler &other) const { return this->extensions == other.extensions && this->extras == other.extras && this->magFilter == other.magFilter && this->minFilter == other.minFilter && this->name == other.name && this->wrapS == other.wrapS && this->wrapT ==...
1
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
88,564,280,129,010,670,000,000,000,000,000,000,000
9
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
start_conversation (GdmSession *self, const char *service_name) { GdmSessionConversation *conversation; char *job_name; conversation = g_new0 (GdmSessionConversation, 1); conversation->session = g_object_ref (self); conversation->service_nam...
0
[]
gdm
5ac224602f1d603aac5eaa72e1760d3e33a26f0a
330,560,726,549,943,780,000,000,000,000,000,000,000
50
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
cssp_gss_mech_available(gss_OID mech) { int mech_found; OM_uint32 major_status, minor_status; gss_OID_set mech_set; mech_found = 0; if (mech == GSS_C_NO_OID) return True; major_status = gss_indicate_mechs(&minor_status, &mech_set); if (!mech_set) return False; if (GSS_ERROR(major_status)) { cssp_gss_...
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
188,655,635,735,093,300,000,000,000,000,000,000,000
36
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
static int net_write(struct wif *wi, unsigned char *h80211, int len, struct tx_info *ti) { struct priv_net *pn = wi_priv(wi); int sz = sizeof(*ti); unsigned char buf[2048]; unsigned char *ptr = buf; /* XXX */ if (ti) memcpy(ptr, ti, sz); else memset(ptr, 0, sizeof(*ti)); ptr += sz; memcpy(ptr, h80...
0
[ "CWE-20", "CWE-787" ]
aircrack-ng
88702a3ce4c28a973bf69023cd0312f412f6193e
38,816,492,957,832,770,000,000,000,000,000,000,000
20
OSdep: Fixed segmentation fault that happens with a malicious server sending a negative length (Closes #16 on GitHub). git-svn-id: http://svn.aircrack-ng.org/trunk@2419 28c6078b-6c39-48e3-add9-af49d547ecab
const char *sqlite3_vtab_collation(sqlite3_index_info *pIdxInfo, int iCons){ HiddenIndexInfo *pHidden = (HiddenIndexInfo*)&pIdxInfo[1]; const char *zRet = 0; if( iCons>=0 && iCons<pIdxInfo->nConstraint ){ CollSeq *pC = 0; int iTerm = pIdxInfo->aConstraint[iCons].iTermOffset; Expr *pX = pHidden->pWC->a...
0
[ "CWE-129" ]
sqlite
effc07ec9c6e08d3bd17665f8800054770f8c643
18,662,356,641,606,390,000,000,000,000,000,000,000
14
Fix the whereKeyStats() routine (part of STAT4 processing only) so that it is able to cope with row-value comparisons against the primary key index of a WITHOUT ROWID table. [forum:/forumpost/3607259d3c|Forum post 3607259d3c]. FossilOrigin-Name: 2a6f761864a462de5c2d5bc666b82fb0b7e124a03443cd1482620dde344b34bb
void APar_TrackLevelInfo(Trackage *track, const char *track_search_atom_name) { uint8_t track_tally = 0; short iter = 0; while (parsedAtoms[iter].NextAtomNumber != 0) { if (strncmp(parsedAtoms[iter].AtomicName, "trak", 4) == 0) { track_tally += 1; if (track->track_num == 0) { track->tota...
0
[ "CWE-787" ]
atomicparsley
d72ccf06c98259d7261e0f3ac4fd8717778782c1
122,636,019,844,906,480,000,000,000,000,000,000,000
37
Avoid stack overflow refs: https://github.com/wez/atomicparsley/issues/32
zzip_disk_entry_fopen(ZZIP_DISK * disk, ZZIP_DISK_ENTRY * entry) { /* keep this in sync with zzip_mem_entry_fopen */ struct zzip_file_header *header = zzip_disk_entry_to_file_header(disk, entry); if (! header) return 0; /* EBADMSG */ ___ ZZIP_DISK_FILE *file = malloc(sizeof(ZZIP_DISK_FIL...
1
[]
zziplib
72ec933663f738d8e166979aa7fd5590b2104a07
152,313,011,080,785,680,000,000,000,000,000,000,000
35
need to check on endbuf for stored files #15
int av_reallocp_array(void *ptr, size_t nmemb, size_t size) { void **ptrptr = ptr; *ptrptr = av_realloc_f(*ptrptr, nmemb, size); if (!*ptrptr && !(nmemb && size)) return AVERROR(ENOMEM); return 0; }
1
[ "CWE-476" ]
FFmpeg
c94f9e854228e0ea00e1de8769d8d3f7cab84a55
279,679,284,966,796,030,000,000,000,000,000,000,000
8
avutil/mem: Fix flipped condition Fixes return code and later null pointer dereference Found-by: Laurent Butti <laurentb@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static netdev_tx_t sp_xmit(struct sk_buff *skb, struct net_device *dev) { struct sixpack *sp = netdev_priv(dev); if (skb->protocol == htons(ETH_P_IP)) return ax25_ip_xmit(skb); spin_lock_bh(&sp->lock); /* We were not busy, so we are now... :-) */ netif_stop_queue(dev); dev->stats.tx_bytes += skb->len; sp_enc...
0
[ "CWE-787" ]
linux
19d1532a187669ce86d5a2696eb7275310070793
168,935,695,336,996,000,000,000,000,000,000,000,000
18
net: 6pack: fix slab-out-of-bounds in decode_data Syzbot reported slab-out-of bounds write in decode_data(). The problem was in missing validation checks. Syzbot's reproducer generated malicious input, which caused decode_data() to be called a lot in sixpack_decode(). Since rx_count_cooked is only 400 bytes and noone...
sctp_disposition_t sctp_sf_t1_cookie_timer_expire(struct net *net, const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *repl = NULL; int attempts = asoc->init_err_counter + 1; ...
0
[]
linux
196d67593439b03088913227093e374235596e33
81,922,656,831,061,700,000,000,000,000,000,000,000
35
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
TEST_F(Http1ServerConnectionImplTest, HeadRequestResponse) { initialize(); NiceMock<MockRequestDecoder> decoder; Http::ResponseEncoder* response_encoder = nullptr; EXPECT_CALL(callbacks_, newStream(_, _)) .WillOnce(Invoke([&](ResponseEncoder& encoder, bool) -> RequestDecoder& { response_encoder =...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
280,191,324,261,819,070,000,000,000,000,000,000,000
23
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
int GetMyVersion(const byte* input, word32* inOutIdx, int* version, word32 maxIdx) { word32 idx = *inOutIdx; byte tag; if ((idx + MIN_VERSION_SZ) > maxIdx) return ASN_PARSE_E; if (GetASNTag(input, &idx, &tag, maxIdx) != 0) return ASN_PARSE_E; if (t...
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
298,582,133,052,284,960,000,000,000,000,000,000,000
23
OCSP: improve handling of OCSP no check extension
psutil_virtual_mem(PyObject *self, PyObject *args) { int rc; int pagesize = getpagesize(); perfstat_memory_total_t memory; rc = perfstat_memory_total( NULL, &memory, sizeof(perfstat_memory_total_t), 1); if (rc <= 0){ PyErr_SetFromErrno(PyExc_OSError); return NULL; } ...
0
[ "CWE-415" ]
psutil
7d512c8e4442a896d56505be3e78f1156f443465
199,691,088,228,787,900,000,000,000,000,000,000,000
20
Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creat...
void hmp_mouse_set(Monitor *mon, const QDict *qdict) { QemuInputHandlerState *s; int index = qdict_get_int(qdict, "index"); int found = 0; QTAILQ_FOREACH(s, &handlers, node) { if (s->id != index) { continue; } if (!(s->handler->mask & (INPUT_EVENT_MASK_REL | ...
0
[ "CWE-772" ]
qemu
fa18f36a461984eae50ab957e47ec78dae3c14fc
42,599,597,695,543,050,000,000,000,000,000,000,000
26
input: limit kbd queue depth Apply a limit to the number of items we accept into the keyboard queue. Impact: Without this limit vnc clients can exhaust host memory by sending keyboard events faster than qemu feeds them to the guest. Fixes: CVE-2017-8379 Cc: P J P <ppandit@redhat.com> Cc: Huawei PSIRT <PSIRT@huawei.c...
void mesh_report_reply(struct mesh_area* mesh, struct outbound_entry* e, struct comm_reply* reply, int what) { enum module_ev event = module_event_reply; e->qstate->reply = reply; if(what != NETEVENT_NOERROR) { event = module_event_noreply; if(what == NETEVENT_CAPSFAIL) event = module_event_capsfail; ...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
153,852,080,163,588,090,000,000,000,000,000,000,000
12
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
static int selinux_inode_listxattr(struct dentry *dentry) { const struct cred *cred = current_cred(); return dentry_has_perm(cred, NULL, dentry, FILE__GETATTR); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
15,808,133,655,674,565,000,000,000,000,000,000,000
6
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...
static int scsi_disk_emulate_read_toc(SCSIRequest *req, uint8_t *outbuf) { SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev); int start_track, format, msf, toclen; uint64_t nb_sectors; msf = req->cmd.buf[1] & 2; format = req->cmd.buf[2] & 0xf; start_track = req->cmd.buf[6]; bdrv_g...
0
[ "CWE-119", "CWE-787" ]
qemu
103b40f51e4012b3b0ad20f615562a1806d7f49a
258,723,894,708,627,420,000,000,000,000,000,000,000
34
scsi-disk: commonize iovec creation between reads and writes Also, consistently use qiov.size instead of iov.iov_len. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
void NumberFormatTest::TestFormatCurrencyPlural() { UErrorCode status = U_ZERO_ERROR; Locale locale = Locale::createCanonical("en_US"); NumberFormat *fmt = NumberFormat::createInstance(locale, UNUM_CURRENCY_PLURAL, status); if (U_FAILURE(status)) { dataerrln("Error creating NumberFormat - %s", u...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
172,145,531,600,834,100,000,000,000,000,000,000,000
13
ICU-20246 Fixing another integer overflow in number parsing.
GF_Err text_box_size(GF_Box *s) { GF_TextSampleEntryBox *ptr = (GF_TextSampleEntryBox*)s; s->size += 8; /*base + this + string length*/ s->size += 43 + 1; if (ptr->textName) s->size += strlen(ptr->textName); return GF_OK; }
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
81,187,938,303,819,560,000,000,000,000,000,000,000
11
fixed #1768
my_free_mc(struct mntentchn *mc) { if (mc) { my_free(mc->m.mnt_fsname); my_free(mc->m.mnt_dir); my_free(mc->m.mnt_type); my_free(mc->m.mnt_opts); free(mc); } }
0
[ "CWE-399" ]
util-linux
4b39b6aefd5dd8ac68a92adc650dc13d5d54d704
216,903,416,783,762,250,000,000,000,000,000,000,000
9
mount: use fflush() and temporary file for mtab updates (CVE-2011-1089) http://thread.gmane.org/gmane.comp.security.oss.general/4374 Changes: - force mount(8) to use /etc/mtab.tmp file every time. The original code used the tmp file for remount/move operations only. - call and check fflush() return code for...
static unsigned char paethPredictor(short a, short b, short c) { short pa = abs(b - c); short pb = abs(a - c); short pc = abs(a + b - c - c); if(pc < pa && pc < pb) return (unsigned char)c; else if(pb < pa) return (unsigned char)b; else return (unsigned char)a; }
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
311,204,687,422,474,540,000,000,000,000,000,000,000
10
Fixed #5645: realloc return handling
static int ec_mul_consttime(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 *s = NULL; BIGNUM *k = NULL; BIGNUM *lambda = NULL; B...
1
[ "CWE-327", "CWE-320" ]
openssl
56fb454d281a023b3f950d969693553d3f3ceea1
107,445,394,792,167,420,000,000,000,000,000,000,000
199
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...
GF_Err gf_isom_update_sample_reference(GF_ISOFile *movie, u32 trackNumber, u32 sampleNumber, GF_ISOSample *sample, u64 data_offset) { GF_Err e; GF_TrackBox *trak; e = CanAccessMovie(movie, GF_ISOM_OPEN_EDIT); if (e) return e; trak = gf_isom_get_track_from_file(movie, trackNumber); if (!trak) return GF_BAD_PARAM...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
17,669,898,771,558,880,000,000,000,000,000,000,000
31
fixed #1706
smb2_async_readv(struct cifs_readdata *rdata) { int rc, flags = 0; char *buf; struct smb2_sync_hdr *shdr; struct cifs_io_parms io_parms; struct smb_rqst rqst = { .rq_iov = rdata->iov, .rq_nvec = 1 }; struct TCP_Server_Info *server; unsigned int total_len; cifs_dbg(FYI, "%s: offset=%llu bytes=%u\n", __f...
0
[ "CWE-416", "CWE-200" ]
linux
6a3eb3360667170988f8a6477f6686242061488a
199,828,550,843,907,130,000,000,000,000,000,000,000
67
cifs: Fix use-after-free in SMB2_write There is a KASAN use-after-free: BUG: KASAN: use-after-free in SMB2_write+0x1342/0x1580 Read of size 8 at addr ffff8880b6a8e450 by task ln/4196 Should not release the 'req' because it will use in the trace. Fixes: eccb4422cf97 ("smb3: Add ftrace tracepoints for improved SMB3 de...
tty_cmd_cells(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; if (!tty_is_visible(tty, ctx, ctx->ocx, ctx->ocy, ctx->num, 1)) return; if (ctx->bigger && (ctx->xoff + ctx->ocx < ctx->ox || ctx->xoff + ctx->ocx + ctx->num > ctx->ox + ctx->sx)) { if (!ctx->wrapped || ...
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
296,129,721,760,356,200,000,000,000,000,000,000,000
29
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
static int ZEND_FASTCALL ZEND_EXIT_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { #if 0 || (IS_UNUSED != IS_UNUSED) zend_op *opline = EX(opline); if (IS_UNUSED != IS_UNUSED) { zval *ptr = NULL; if (Z_TYPE_P(ptr) == IS_LONG) { EG(exit_status) = Z_LVAL_P(ptr); } else { zend_print_variable(ptr); } } ...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
126,459,934,619,316,100,000,000,000,000,000,000,000
19
- 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
Bool ref_pic_lists_modification(GF_BitStream *bs, u32 slice_type, u32 num_ref_idx_l0_active, u32 num_ref_idx_l1_active) { //u32 i; Bool ref_pic_list_modification_flag_l0 = gf_bs_read_int(bs, 1); if (ref_pic_list_modification_flag_l0) { /*for (i=0; i<num_ref_idx_l0_active; i++) { list_entry_l0[i] = *//*gf_bs_rea...
0
[ "CWE-119", "CWE-787" ]
gpac
90dc7f853d31b0a4e9441cba97feccf36d8b69a4
26,679,541,643,862,380,000,000,000,000,000,000,000
22
fix some exploitable overflows (#994, #997)
int read_image_tga( gdIOCtx *ctx, oTga *tga ) { int pixel_block_size = (tga->bits / 8); int image_block_size = (tga->width * tga->height) * pixel_block_size; uint8_t* decompression_buffer = NULL; unsigned char* conversion_buffer = NULL; int buffer_caret = 0; int bitmap_caret = 0; int i = 0; int j = 0; uint8_t ...
1
[ "CWE-415", "CWE-125" ]
libgd
3c2b605d72e8b080dace1d98a6e50b46c1d12186
182,571,355,863,104,930,000,000,000,000,000,000,000
121
bug #248, fix Out-Of-Bounds Read in read_image_tga
PrefService* GetPrefService(content::WebContents* web_contents) { auto* context = web_contents->GetBrowserContext(); return static_cast<electron::ElectronBrowserContext*>(context)->prefs(); }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
137,154,541,530,276,040,000,000,000,000,000,000,000
4
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
static void sta_unblock(struct work_struct *wk) { struct sta_info *sta; sta = container_of(wk, struct sta_info, drv_unblock_wk); if (sta->dead) return; if (!test_sta_flag(sta, WLAN_STA_PS_STA)) { local_bh_disable(); ieee80211_sta_ps_deliver_wakeup(sta); local_bh_enable(); } else if (test_and_clear_sta_f...
0
[ "CWE-362" ]
linux
1d147bfa64293b2723c4fec50922168658e613ba
55,335,667,415,574,080,000,000,000,000,000,000,000
28
mac80211: fix AP powersave TX vs. wakeup race There is a race between the TX path and the STA wakeup: while a station is sleeping, mac80211 buffers frames until it wakes up, then the frames are transmitted. However, the RX and TX path are concurrent, so the packet indicating wakeup can be processed while a packet is b...
static ssize_t psi_write(struct file *file, const char __user *user_buf, size_t nbytes, enum psi_res res) { char buf[32]; size_t buf_size; struct seq_file *seq; struct psi_trigger *new; if (static_branch_likely(&psi_disabled)) return -EOPNOTSUPP; if (!nbytes) return -EINVAL; buf_size = min(nbytes, siz...
1
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
104,687,758,598,763,050,000,000,000,000,000,000,000
32
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
show_transport_handle(struct device *dev, struct device_attribute *attr, char *buf) { struct iscsi_internal *priv = dev_to_iscsi_internal(dev); if (!capable(CAP_SYS_ADMIN)) return -EACCES; return sysfs_emit(buf, "%llu\n", (unsigned long long)iscsi_handle(priv->iscsi_transport)); }
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
143,848,868,776,124,030,000,000,000,000,000,000,000
10
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
static void llist_dtor(void *user, void *element) { (void)user; (void)element; /* Do nothing */ }
0
[ "CWE-200" ]
curl
b3875606925536f82fc61f3114ac42f29eaf6945
292,164,995,063,230,430,000,000,000,000,000,000,000
6
curl_easy_duphandle: CURLOPT_COPYPOSTFIELDS read out of bounds When duplicating a handle, the data to post was duplicated using strdup() when it could be binary and contain zeroes and it was not even zero terminated! This caused read out of bounds crashes/segfaults. Since the lib/strdup.c file no longer is easily sha...
void ConnectionManagerImpl::ActiveStream::callLowWatermarkCallbacks() { ASSERT(high_watermark_count_ > 0); --high_watermark_count_; for (auto watermark_callbacks : watermark_callbacks_) { watermark_callbacks->onBelowWriteBufferLowWatermark(); } }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
136,763,849,770,667,100,000,000,000,000,000,000,000
7
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
void DequantizeClassPredictions(const TfLiteTensor* input_class_predictions, const int num_boxes, const int num_classes_with_background, TfLiteTensor* scores) { float quant_zero_point = static_cast<float>(input_class...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
146,197,427,133,226,120,000,000,000,000,000,000,000
13
[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...
static void udp_rmem_release(struct sock *sk, int size, int partial, bool rx_queue_lock_held) { struct udp_sock *up = udp_sk(sk); struct sk_buff_head *sk_queue; int amt; if (likely(partial)) { up->forward_deficit += size; size = up->forward_deficit; if (size < (sk->sk_rcvbuf >> 2) && !skb_queue...
0
[ "CWE-362" ]
net
85f1bd9a7b5a79d5baa8bf44af19658f7bf77bfa
105,722,958,314,149,910,000,000,000,000,000,000,000
41
udp: consistently apply ufo or fragmentation When iteratively building a UDP datagram with MSG_MORE and that datagram exceeds MTU, consistently choose UFO or fragmentation. Once skb_is_gso, always apply ufo. Conversely, once a datagram is split across multiple skbs, do not consider ufo. Sendpage already maintains th...
gboolean ves_icall_System_Threading_Thread_Join_internal(MonoInternalThread *this, int ms, HANDLE thread) { MonoInternalThread *cur_thread = mono_thread_internal_current (); gboolean ret; mono_thread_current_check_pending_interrupt (); ensure_synch_cs_set (this); EnterCriticalSection (this->synch_cs); ...
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
90,190,566,571,569,620,000,000,000,000,000,000,000
42
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
static int mcba_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) { struct net_device *netdev; struct mcba_priv *priv; int err = -ENOMEM; struct usb_device *usbdev = interface_to_usbdev(intf); netdev = alloc_candev(sizeof(struct mcba_priv), MCBA_MAX_TX_URBS); if (!netdev) { dev_err(&in...
0
[ "CWE-416" ]
linux
4d6636498c41891d0482a914dd570343a838ad79
62,042,834,356,172,780,000,000,000,000,000,000,000
77
can: mcba_usb: fix use-after-free on disconnect The driver was accessing its driver data after having freed it. Fixes: 51f3baad7de9 ("can: mcba_usb: Add support for Microchip CAN BUS Analyzer") Cc: stable <stable@vger.kernel.org> # 4.12 Cc: Remigiusz Kołłątaj <remigiusz.kollataj@mobica.com> Reported-by: syzbot+e2...
static loff_t max_file_size(unsigned bits) { loff_t result = (DEF_ADDRS_PER_INODE - F2FS_INLINE_XATTR_ADDRS); loff_t leaf_count = ADDRS_PER_BLOCK; /* two direct node blocks */ result += (leaf_count * 2); /* two indirect node blocks */ leaf_count *= NIDS_PER_BLOCK; result += (leaf_count * 2); /* one double in...
0
[ "CWE-787" ]
linux
9a59b62fd88196844cee5fff851bee2cfd7afb6e
239,004,392,548,729,200,000,000,000,000,000,000,000
19
f2fs: do more integrity verification for superblock Do more sanity check for superblock during ->mount. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static int MP4_ReadBox_pnot( stream_t *p_stream, MP4_Box_t *p_box ) { if ( p_box->i_size != 20 ) return 0; MP4_READBOX_ENTER( MP4_Box_data_pnot_t ); MP4_GET4BYTES( p_box->data.p_pnot->i_date ); uint16_t i_version; MP4_GET2BYTES( i_version ); if ( i_version != 0 ) MP4_READBOX_EXIT...
0
[ "CWE-120", "CWE-191", "CWE-787" ]
vlc
2e7c7091a61aa5d07e7997b393d821e91f593c39
149,515,558,690,952,310,000,000,000,000,000,000,000
14
demux: mp4: fix buffer overflow in parsing of string boxes. We ensure that pbox->i_size is never smaller than 8 to avoid an integer underflow in the third argument of the subsequent call to memcpy. We also make sure no truncation occurs when passing values derived from the 64 bit integer p_box->i_size to arguments of ...
zgetinterval(i_ctx_t *i_ctx_p) { os_ptr op = osp; os_ptr op1 = op - 1; os_ptr op2 = op1 - 1; uint index; uint count; switch (r_type(op2)) { default: return_op_typecheck(op2); case t_array: case t_string: case t_mixedarray: case t_shortarray:; ...
0
[]
ghostpdl
d683d1e6450d74619e6277efeebfc222d9a5cb91
224,621,301,806,439,040,000,000,000,000,000,000,000
44
Bug 700585: Obliterate "superexec". We don't need it, nor do any known apps. We were under the impression that the Windows driver 'PScript5.dll' used superexec, but after testing with our extensive suite of PostScript file, and analysis of the PScript5 "Adobe CoolType ProcSet, it does not appear that this operator is ...
static int TS_issuer_serial_cmp(ESS_ISSUER_SERIAL *is, X509_CINF *cinfo) { GENERAL_NAME *issuer; if (!is || !cinfo || sk_GENERAL_NAME_num(is->issuer) != 1) return -1; /* Check the issuer first. It must be a directory name. */ issuer = sk_GENERAL_NAME_value(is->issuer, 0); if (issuer->type != GEN_DIRNAME |...
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
80,877,257,929,880,950,000,000,000,000,000,000,000
18
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
} void sbgp_del(GF_Box *a) { GF_SampleGroupBox *p = (GF_SampleGroupBox *)a; if (p->sample_entries) gf_free(p->sample_entries); gf_free(p);
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
339,289,453,659,851,600,000,000,000,000,000,000,000
6
prevent dref memleak on invalid input (#1183)
void BinaryProtocolReader::readStructEnd() {}
0
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
133,342,580,887,743,070,000,000,000,000,000,000,000
1
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...
static int coroutine_fn v9fs_do_readdir_with_stat(V9fsPDU *pdu, V9fsFidState *fidp, uint32_t max_count) { V9fsPath path; V9fsStat v9stat; int len, err = 0; int32_t count = 0; struct stat stbuf; of...
0
[ "CWE-362" ]
qemu
89fbea8737e8f7b954745a1ffc4238d377055305
28,658,009,265,485,720,000,000,000,000,000,000,000
74
9pfs: Fully restart unreclaim loop (CVE-2021-20181) Depending on the client activity, the server can be asked to open a huge number of file descriptors and eventually hit RLIMIT_NOFILE. This is currently mitigated using a reclaim logic : the server closes the file descriptors of idle fids, based on the assumption that...
JNI_GetCreatedJavaVMs(JavaVM **vmBuf, jsize bufLen, jsize *nVMs) { jint result; Trc_SC_GetCreatedJavaVMs_Entry(vmBuf, bufLen, nVMs); /* for proxy we cannot preload the libraries as we don't know whether proxy is enabled or not at this point * However, if the libraries have not already been preloaded then we know ...
0
[ "CWE-119" ]
openj9
0971f22d88f42cf7332364ad7430e9bd8681c970
208,973,466,160,474,030,000,000,000,000,000,000,000
24
Clean up jio_snprintf and jio_vfprintf Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659 Signed-off-by: Peter Bain <peter_bain@ca.ibm.com>
int nft_validate_input_register(enum nft_registers reg) { if (reg <= NFT_REG_VERDICT) return -EINVAL; if (reg > NFT_REG_MAX) return -ERANGE; return 0; }
0
[ "CWE-19" ]
nf
a2f18db0c68fec96631c10cad9384c196e9008ac
91,355,920,224,136,680,000,000,000,000,000,000,000
8
netfilter: nf_tables: fix flush ruleset chain dependencies Jumping between chains doesn't mix well with flush ruleset. Rules from a different chain and set elements may still refer to us. [ 353.373791] ------------[ cut here ]------------ [ 353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159! [ 353.373896...
xfs_fileattr_get( struct dentry *dentry, struct fileattr *fa) { struct xfs_inode *ip = XFS_I(d_inode(dentry)); if (d_is_special(dentry)) return -ENOTTY; xfs_ilock(ip, XFS_ILOCK_SHARED); xfs_fill_fsxattr(ip, XFS_DATA_FORK, fa); xfs_iunlock(ip, XFS_ILOCK_SHARED); return 0; }
0
[ "CWE-125" ]
linux
983d8e60f50806f90534cc5373d0ce867e5aaf79
72,693,843,643,682,310,000,000,000,000,000,000,000
15
xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate The old ALLOCSP/FREESP ioctls in XFS can be used to preallocate space at the end of files, just like fallocate and RESVSP. Make the behavior consistent with the other ioctls. Reported-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Darric...
pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr, unsigned long sz) { pgd_t *pgd; p4d_t *p4d; pud_t *pud; pte_t *pte = NULL; pgd = pgd_offset(mm, addr); p4d = p4d_alloc(mm, pgd, addr); if (!p4d) return NULL; pud = pud_alloc(mm, p4d, addr); if (pud) { if (sz == PUD_SIZE) { pte = (pte_t ...
0
[ "CWE-362" ]
linux
17743798d81238ab13050e8e2833699b54e15467
296,754,714,477,813,100,000,000,000,000,000,000,000
28
mm/hugetlb: fix a race between hugetlb sysctl handlers There is a race between the assignment of `table->data` and write value to the pointer of `table->data` in the __do_proc_doulongvec_minmax() on the other thread. CPU0: CPU1: proc_sys_write ...