func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static u32 bnx2x_rx_ustorm_prods_offset(struct bnx2x_fastpath *fp) { struct bnx2x *bp = fp->bp; u32 offset = BAR_USTRORM_INTMEM; if (IS_VF(bp)) return bnx2x_vf_ustorm_prods_offset(bp, fp); else if (!CHIP_IS_E1x(bp)) offset += USTORM_RX_PRODS_E2_OFFSET(fp->cl_qzone_id); else offset += USTORM_RX_PRODS_E1X_OFF...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
121,145,185,313,687,650,000,000,000,000,000,000,000
14
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
rad_get_vendor_attr(u_int32_t *vendor, unsigned char *type, const void **data, size_t *len, const void *raw, size_t raw_len) { struct vendor_attribute *attr; if (raw_len < sizeof(struct vendor_attribute)) { return -1; } attr = (struct vendor_attribute *) raw; *vendor = ntohl(attr->vendor_value); *type = attr-...
0
[ "CWE-119", "CWE-787" ]
php-radius
13c149b051f82b709e8d7cc32111e84b49d57234
34,727,033,036,496,267,000,000,000,000,000,000,000
20
Fix a security issue in radius_get_vendor_attr(). The underlying rad_get_vendor_attr() function assumed that it would always be given valid VSA data. Indeed, the buffer length wasn't even passed in; the assumption was that the length field within the VSA structure would be valid. This could result in denial of servic...
point_in(PG_FUNCTION_ARGS) { char *str = PG_GETARG_CSTRING(0); Point *point; double x, y; char *s; if (!pair_decode(str, &x, &y, &s) || (*s != '\0')) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), errmsg("invalid input syntax for type point: \"%s\"", str))); point = (Poin...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
175,383,177,178,324,330,000,000,000,000,000,000,000
20
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
static long do_splice_to(struct file *in, loff_t *ppos, struct pipe_inode_info *pipe, size_t len, unsigned int flags) { loff_t isize, left; int ret; if (unlikely(!in->f_op || !in->f_op->splice_read)) return -EINVAL; if (unlikely(!(in->f_mode & FMODE_READ))) return -EBADF; ret = rw_verify_area(READ, ...
0
[ "CWE-264" ]
linux-2.6
8c34e2d63231d4bf4852bac8521883944d770fe3
36,898,350,492,245,404,000,000,000,000,000,000,000
27
[PATCH] Remove SUID when splicing into an inode Originally from Mark Fasheh <mark.fasheh@oracle.com> generic_file_splice_write() does not remove S_ISUID or S_ISGID. This is inconsistent with the way we generally write to files. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com> Signed-off-by: Jens Axboe <jens.axboe...
static const char *reg_name_for_access(RzAnalysisOp *op, RzAnalysisVarAccessType type) { if (type == RZ_ANALYSIS_VAR_ACCESS_TYPE_WRITE) { if (op->dst && op->dst->reg) { return op->dst->reg->name; } } else { if (op->src[0] && op->src[0]->reg) { return op->src[0]->reg->name; } } return NULL; }
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
281,626,941,635,880,240,000,000,000,000,000,000,000
12
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
static int check_nnp_nosuid(const struct linux_binprm *bprm, const struct task_security_struct *old_tsec, const struct task_security_struct *new_tsec) { int nnp = (bprm->unsafe & LSM_UNSAFE_NO_NEW_PRIVS); int nosuid = !mnt_may_suid(bprm->file->f_path.mnt); int rc; u32 av; if (!nnp && !nosuid) retu...
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
101,385,600,745,783,680,000,000,000,000,000,000,000
53
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
rsvg_current_state (RsvgDrawingCtx * ctx) { return ctx->state; }
0
[ "CWE-20" ]
librsvg
d1c9191949747f6dcfd207831d15dd4ba00e31f2
104,927,138,549,138,230,000,000,000,000,000,000,000
4
state: Store mask as reference Instead of immediately looking up the mask, store the reference and look it up on use.
parse_blockquote(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t size) { size_t beg, end = 0, pre, work_size = 0; uint8_t *work_data = 0; struct buf *out = 0; out = rndr_newbuf(rndr, BUFFER_BLOCK); beg = 0; while (beg < size) { for (end = beg + 1; end < size && data[end - 1] != '\n'; end++); ...
0
[]
redcarpet
e5a10516d07114d582d13b9125b733008c61c242
225,963,729,420,261,000,000,000,000,000,000,000,000
39
Avoid rewinding previous inline when auto-linking When a bit like "_foo_1@bar.com" is processed, first the emphasis is rendered, then the 1 is output verbatim. When the `@` is encountered, Redcarpet tries to find the "local part" of the address and stops when it encounters an invalid char (i.e. here the `!`). The pro...
static int before_frame_send(nghttp2_session *ngh2, const nghttp2_frame *frame, void *user_data) { h2_proxy_session *session = user_data; if (APLOGcdebug(session->c)) { char buffer[256]; h2_proxy_util_frame_print(frame, buffer, sizeof(buffer)/sizeof(buffer[0])); ...
0
[ "CWE-770" ]
mod_h2
dd05d49abe0f67512ce9ed5ba422d7711effecfb
155,118,140,412,462,250,000,000,000,000,000,000,000
14
* fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now, mpm event backport to 2.4.x up for vote). * Fixes stream cleanup when connection throttling is in place. * Counts stream resets by client on streams initiated by client as cause for connection throttling. * Header length checks are no...
set_description (GsmXSMPClient *client) { SmProp *prop; const char *id; prop = find_property (client, SmProgram, NULL); id = gsm_client_peek_startup_id (GSM_CLIENT (client)); g_free (client->priv->description); if (prop) { client->priv->description =...
0
[ "CWE-125", "CWE-835" ]
gnome-session
b0dc999e0b45355314616321dbb6cb71e729fc9d
289,215,229,181,689,630,000,000,000,000,000,000,000
21
[gsm] Delay the creation of the GsmXSMPClient until it really exists We used to create the GsmXSMPClient before the XSMP connection is really accepted. This can lead to some issues, though. An example is: https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting: "What is happening is that a new client (probabl...
static void JS_CreateHotbackup(v8::FunctionCallbackInfo<v8::Value> const& args) { TRI_V8_TRY_CATCH_BEGIN(isolate); if (args.Length() != 1 || !args[0]->IsObject()) { TRI_V8_THROW_EXCEPTION_USAGE("createHotbackup(obj)"); } VPackBuilder obj; try { TRI_V8ToVPack(isolate, obj, args[0], false, true); } c...
0
[ "CWE-918" ]
arangodb
d9b7f019d2435f107b19a59190bf9cc27d5f34dd
295,239,236,313,401,860,000,000,000,000,000,000,000
28
[APM-78] Disable installation from remote URL (#15292)
static void * xar_hash_init(int hash, void **sc, void **mc) { if (!sc && !mc) return NULL; switch (hash) { case XAR_CKSUM_SHA1: *sc = cl_hash_init("sha1"); if (!(*sc)) { return NULL; } return *sc; case XAR_CKSUM_MD5: *mc = cl_hash_init("md5");...
0
[ "CWE-125" ]
clamav-devel
d96a6b8bcc7439fa7e3876207aa0a8e79c8451b6
178,031,145,895,934,500,000,000,000,000,000,000,000
25
bb11588 - fix out of bounds read.
extern void libxml_add_error(const std::string &msg) { xmlErrorVec *error_list = &s_libxml_errors->m_errors; error_list->resize(error_list->size() + 1); xmlError &error_copy = error_list->back(); memset(&error_copy, 0, sizeof(xmlError)); error_copy.domain = 0; error_copy.code = XML_ERR_INTERNAL_ERROR; e...
0
[ "CWE-94" ]
hhvm
95f96e7287effe2fcdfb9a5338d1a7e4f55b083b
136,944,787,297,204,180,000,000,000,000,000,000,000
21
Fix libxml_disable_entity_loader() This wasn't calling requestInit and setting the libxml handler no null. So the first time an error came along it would reset the handler from no-op to reading again. This is a much better fix, we set our custom handler in requestInit and when libxml_disable_entity_loader we store th...
xmlCreateMemoryParserCtxt(const char *buffer, int size) { xmlParserCtxtPtr ctxt; xmlParserInputPtr input; xmlParserInputBufferPtr buf; if (buffer == NULL) return(NULL); if (size <= 0) return(NULL); ctxt = xmlNewParserCtxt(); if (ctxt == NULL) return(NULL); /* TODO: xmlParserInputBu...
0
[ "CWE-125" ]
libxml2
77404b8b69bc122d12231807abf1a837d121b551
173,400,691,136,768,960,000,000,000,000,000,000,000
37
Make sure the parser returns when getting a Stop order patch backported from chromiun bug fixes, assuming author is Chris
bool LEX::only_view_structure() { switch (sql_command) { case SQLCOM_SHOW_CREATE: case SQLCOM_SHOW_TABLES: case SQLCOM_SHOW_FIELDS: case SQLCOM_REVOKE_ALL: case SQLCOM_REVOKE: case SQLCOM_GRANT: case SQLCOM_CREATE_VIEW: return TRUE; default: return FALSE; } }
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
327,535,530,115,768,240,000,000,000,000,000,000,000
15
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
void InstanceUtil::flushMetricsToSinks(const std::list<Stats::SinkPtr>& sinks, Stats::Store& store) { // Create a snapshot and flush to all sinks. // NOTE: Even if there are no sinks, creating the snapshot has the important property that it // latches all counters on a...
0
[ "CWE-400" ]
envoy
542f84c66e9f6479bc31c6f53157c60472b25240
132,966,767,166,235,600,000,000,000,000,000,000,000
11
overload: Runtime configurable global connection limits (#147) Signed-off-by: Tony Allen <tony@allen.gg>
mono_image_get_ctor_on_inst_token (MonoDynamicImage *assembly, MonoReflectionCtorOnTypeBuilderInst *c, gboolean create_methodspec) { guint32 sig, token; MonoClass *klass; MonoGenericClass *gclass; MonoType *type; /* A ctor cannot be a generic method, so we can ignore create_methodspec */ token = GPOINTER_TO_UIN...
0
[ "CWE-20" ]
mono
65292a69c837b8a5f7a392d34db63de592153358
282,832,008,531,367,000,000,000,000,000,000,000,000
51
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
static void bnxt_re_process_req_wc(struct ib_wc *wc, struct bnxt_qplib_cqe *cqe) { switch (cqe->type) { case BNXT_QPLIB_SWQE_TYPE_SEND: wc->opcode = IB_WC_SEND; break; case BNXT_QPLIB_SWQE_TYPE_SEND_WITH_IMM: wc->opcode = IB_WC_SEND; wc->wc_flags |= IB_WC_WITH_IMM; break; case BNXT_QPLIB_SWQE_TYPE_SEND_WI...
0
[ "CWE-400", "CWE-401" ]
linux
4a9d46a9fe14401f21df69cea97c62396d5fb053
34,477,705,615,787,730,000,000,000,000,000,000,000
43
RDMA: Fix goto target to release the allocated memory In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory should be released by goto fail. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Link: https://lore.kernel.org/r/20190910222120.16517-1-navid.emamdoost@gmail.com Si...
nbd_unlocked_opt_abort (struct nbd_handle *h) { int r = nbd_unlocked_aio_opt_abort (h); if (r == -1) return r; return wait_for_option (h); }
0
[ "CWE-617" ]
libnbd
fb4440de9cc76e9c14bd3ddf3333e78621f40ad0
316,197,279,562,914,920,000,000,000,000,000,000,000
9
opt_go: Tolerate unplanned server death While debugging some experimental nbdkit code that was triggering an assertion failure in nbdkit, I noticed a secondary failure of nbdsh also dying from an assertion: libnbd: debug: nbdsh: nbd_opt_go: transition: NEWSTYLE.OPT_GO.SEND -> DEAD libnbd: debug: nbdsh: nbd_opt_go: op...
proxy_C_DigestKey (CK_X_FUNCTION_LIST *self, CK_SESSION_HANDLE handle, CK_OBJECT_HANDLE key) { State *state = (State *)self; Mapping map; CK_RV rv; rv = map_session_to_real (state->px, &handle, &map, NULL); if (rv != CKR_OK) return rv; return (map.funcs->C_DigestKey) (hand...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
251,993,166,037,809,100,000,000,000,000,000,000,000
13
Check for arithmetic overflows before allocating
static void print_file_or_dir(const char *path, const char *fname) { assert(fname); char *name; if (asprintf(&name, "%s/%s", path, fname) == -1) errExit("asprintf"); struct stat s; if (stat(name, &s) == -1) { if (lstat(name, &s) == -1) { printf("Error: cannot access %s\n", do_replace_cntrl_chars(name, '?'...
0
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
306,899,059,832,916,340,000,000,000,000,000,000,000
128
fixing CVE-2022-31214
cmsUInt8Number Word2Byte(cmsUInt16Number w) { return (cmsUInt8Number) floor((cmsFloat64Number) w / 257.0 + 0.5); }
0
[]
Little-CMS
d1fcbdc6bcdd50432ae95e9c6f83e79338f87690
91,336,242,619,793,100,000,000,000,000,000,000,000
4
Buffer overflow fix. BuildColorantList() concatenates 32 bit data in each iteration. The max value of iteration can be 16. Thus buffer overflow can occur with storage of 128 bytes. It would need 512 bytes in worst case.
proxy_C_SetAttributeValue (CK_X_FUNCTION_LIST *self, CK_SESSION_HANDLE handle, CK_OBJECT_HANDLE object, CK_ATTRIBUTE_PTR template, CK_ULONG count) { State *state = (State *)self; Mapping map; CK_RV rv; rv = ...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
290,096,951,003,742,650,000,000,000,000,000,000,000
15
Check for arithmetic overflows before allocating
nfs_scan_commit(struct inode *inode, struct list_head *dst, struct nfs_commit_info *cinfo) { int ret = 0; spin_lock(cinfo->lock); if (cinfo->mds->ncommit > 0) { const int max = INT_MAX; ret = nfs_scan_commit_list(&cinfo->mds->list, dst, cinfo, max); ret += pnfs_scan_commit_lists(inode, cinfo, max -...
0
[]
linux
c7559663e42f4294ffe31fe159da6b6a66b35d61
191,999,415,105,919,900,000,000,000,000,000,000,000
16
NFS: Allow nfs_updatepage to extend a write under additional circumstances Currently nfs_updatepage allows a write to be extended to cover a full page only if we don't have a byte range lock lock on the file... but if we have a write delegation on the file or if we have the whole file locked for writing then we should...
koi8_is_mbc_ambiguous(OnigAmbigType flag, const OnigUChar** pp, const OnigUChar* end) { const OnigUChar* p = *pp; (*pp)++; if (((flag & ONIGENC_CASE_FOLD_ASCII_CASE) != 0 && ONIGENC_IS_MBC_ASCII(p)) || ((flag & ONIGENC_CASE_FOLD_NONASCII_CASE) != 0 && !ONIGENC_IS_MBC_ASCII(p))) { int v = ...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
160,958,790,854,000,420,000,000,000,000,000,000,000
15
onig-5.9.2
static void FS_CheckFilenameIsMutable( const char *filename, const char *function ) { // Check if the filename ends with the library, QVM, or pk3 extension if( COM_CompareExtension( filename, DLL_EXT ) || COM_CompareExtension( filename, ".qvm" ) || COM_CompareExtension( filename, ".pk3" ) ) { Com_Error( ERR_...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
331,141,900,179,353,800,000,000,000,000,000,000,000
12
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
static ssize_t regulator_total_uA_show(struct device *dev, struct device_attribute *attr, char *buf) { struct regulator_dev *rdev = dev_get_drvdata(dev); struct regulator *regulator; int uA = 0; mutex_lock(&rdev->mutex); list_for_each_entry(regulator, &rdev->consumer_list, list) uA += regulator->uA_lo...
0
[ "CWE-416" ]
linux
60a2362f769cf549dc466134efe71c8bf9fbaaba
159,365,965,642,621,200,000,000,000,000,000,000,000
13
regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing After freeing pin from regulator_ena_gpio_free, loop can access the pin. So this patch fixes not to access pin after freeing. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
AckFeature(PPARANDIS_ADAPTER pContext, UINT32 Feature) { if (VirtIOIsFeatureEnabled(pContext->u32HostFeatures, Feature)) { VirtIOFeatureEnable(pContext->u32GuestFeatures, Feature); return TRUE; } return FALSE; }
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
144,013,043,480,388,760,000,000,000,000,000,000,000
9
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
void move_elements_to(Item_change_list *to) { change_list.move_elements_to(&to->change_list); }
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
53,432,598,951,741,910,000,000,000,000,000,000,000
4
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
intrusive_ptr<DocumentSource> DocumentSourceGroup::createFromBson( BSONElement elem, const intrusive_ptr<ExpressionContext>& pExpCtx) { uassert(15947, "a group's fields must be specified in an object", elem.type() == Object); intrusive_ptr<DocumentSourceGroup> pGroup(new DocumentSourceGroup(pExpCtx)); ...
0
[]
mongo
07b8851825836911265e909d6842d4586832f9bb
252,653,496,767,865,200,000,000,000,000,000,000,000
31
SERVER-60218-44: SERVER-60218 add initialize helper function for document_source_group (cherry picked from commit 867f52afbb79bc00e35c70f8e0681b7d602f97b2)
static void _dfwd_sent_cb(int rc, pmixp_p2p_ctx_t ctx, void *_vcbdata) { pmixp_coll_cbdata_t *cbdata = (pmixp_coll_cbdata_t*)_vcbdata; pmixp_coll_t *coll = cbdata->coll; pmixp_coll_tree_t *tree = &coll->state.tree; if( PMIXP_P2P_REGULAR == ctx ){ /* lock the collective */ slurm_mutex_lock(&coll->lock); } if...
0
[ "CWE-120" ]
slurm
c3142dd87e06621ff148791c3d2f298b5c0b3a81
212,752,301,348,101,840,000,000,000,000,000,000,000
52
PMIx - fix potential buffer overflows from use of unpackmem(). CVE-2020-27745.
replace_async_data_free (ReplaceAsyncData *data) { if (data->stream) g_object_unref (data->stream); g_free (data->etag); g_free (data); }
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
272,351,085,537,836,830,000,000,000,000,000,000,000
7
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
static int fdt_include_supernodes(struct fdt_region_state *info, int depth) { int base = fdt_off_dt_struct(info->fdt); int start, stop_at; int i; /* * Work down the stack looking for supernodes that we didn't include. * The algortihm here is actually pretty simple, since we know that * no previous subnode ha...
0
[]
u-boot
8a7d4cf9820ea16fabd25a6379351b4dc291204b
65,966,049,107,336,930,000,000,000,000,000,000,000
33
fdt_region: Check for a single root node of the correct name At present fdt_find_regions() assumes that the FIT is a valid devicetree. If the FIT has two root nodes this is currently not detected in this function, nor does libfdt's fdt_check_full() notice. Also it is possible for the root node to have a name even thou...
static int cap_sb_parse_opts_str(char *options, struct security_mnt_opts *opts) { return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
302,208,391,521,466,200,000,000,000,000,000,000,000
4
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...
Client::doneSendingRequestBody() { debugs(9,3, HERE << "done sending request body"); assert(requestBodySource != NULL); stopConsumingFrom(requestBodySource); // kids extend this }
0
[ "CWE-20" ]
squid
6c9c44d0e9cf7b72bb233360c5308aa063af3d69
258,207,773,038,200,700,000,000,000,000,000,000,000
8
Handle more partial responses (#791)
lyd_parse_fd(struct ly_ctx *ctx, int fd, LYD_FORMAT format, int options, ...) { struct lyd_node *ret; va_list ap; va_start(ap, options); ret = lyd_parse_fd_(ctx, fd, format, options, ap); va_end(ap); return ret; }
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
298,940,334,397,975,600,000,000,000,000,000,000,000
11
schema tree BUGFIX do not check features while still resolving schema Fixes #723
gdImagePtr gdImageScaleTwoPass(const gdImagePtr src, const unsigned int src_width, const unsigned int src_height, const unsigned int new_width, const unsigned int new_height) { gdImagePtr tmp_im; gdImagePtr dst; /* Convert to truecolor if it isn't; this code requires it. */ if (!src->trueColor) { gdImagePaletteT...
1
[ "CWE-399" ]
php-src
1a4722a89ee85be74af5086a7027b3ad1e0a55e8
22,949,719,617,905,980,000,000,000,000,000,000,000
28
Fix #70064: imagescale(..., IMG_BICUBIC) leaks memory A temporary image (tmp_im) is created with gdImageTrueColor() and freed with gdFree() instead of gdImageDestroy(). Let's fix that.
static void bpf_map_save_memcg(struct bpf_map *map) { map->memcg = get_mem_cgroup_from_mm(current->mm); }
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
100,143,341,319,345,830,000,000,000,000,000,000,000
4
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
void ESTreeIRGen::emitFunctionEpilogue(Value *returnValue) { if (returnValue) { Builder.setLocation(SourceErrorManager::convertEndToLocation( Builder.getFunction()->getSourceRange())); Builder.createReturnInst(returnValue); } // Delete CreateArgumentsInst if it is unused. if (!curFunction()->cr...
0
[ "CWE-125", "CWE-787" ]
hermes
091835377369c8fd5917d9b87acffa721ad2a168
96,574,342,343,378,250,000,000,000,000,000,000,000
13
Correctly restore whether or not a function is an inner generator Summary: If a generator was large enough to be lazily compiled, we would lose that information when reconstituting the function's context. This meant the function was generated as a regular function instead of a generator. #utd-hermes-ignore-android R...
static void rt_mutex_init_task(struct task_struct *p) { spin_lock_init(&p->pi_lock); #ifdef CONFIG_RT_MUTEXES plist_head_init(&p->pi_waiters, &p->pi_lock); p->pi_blocked_on = NULL; #endif }
0
[ "CWE-264" ]
linux-2.6
2d5516cbb9daf7d0e342a2e3b0fc6f8c39a81205
235,387,803,508,243,640,000,000,000,000,000,000,000
8
copy_process: fix CLONE_PARENT && parent_exec_id interaction CLONE_PARENT can fool the ->self_exec_id/parent_exec_id logic. If we re-use the old parent, we must also re-use ->parent_exec_id to make sure exit_notify() sees the right ->xxx_exec_id's when the CLONE_PARENT'ed task exits. Also, move down the "p->parent_ex...
ldap_install_tls( LDAP *ld ) { #ifndef HAVE_TLS return LDAP_NOT_SUPPORTED; #else if ( ldap_tls_inplace( ld ) ) { return LDAP_LOCAL_ERROR; } return ldap_int_tls_start( ld, ld->ld_defconn, NULL ); #endif }
0
[ "CWE-843" ]
openldap
4bdfffd2889c0c5cdf58bebafbdc8fce4bb2bff0
133,955,405,082,265,080,000,000,000,000,000,000,000
12
ITS#9425 add more checks to ldap_X509dn2bv
ZEND_API void zend_wrong_param_count(TSRMLS_D) /* {{{ */ { const char *space; const char *class_name = get_active_class_name(&space TSRMLS_CC); zend_error(E_WARNING, "Wrong parameter count for %s%s%s()", class_name, space, get_active_function_name(TSRMLS_C)); }
0
[ "CWE-416" ]
php-src
0e6fe3a4c96be2d3e88389a5776f878021b4c59f
337,836,519,567,387,560,000,000,000,000,000,000,000
7
Fix bug #73147: Use After Free in PHP7 unserialize()
void setCopy(const LowerCaseString& key, absl::string_view value) override { header_map_->setCopy(key, value); header_map_->verifyByteSizeInternalForTest(); }
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
45,402,628,522,301,550,000,000,000,000,000,000,000
4
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...
void RtmpProtocol::sendSetBufferLength(uint32_t stream_index, uint32_t len) { std::string control; stream_index = htonl(stream_index); control.append((char *) &stream_index, 4); len = htonl(len); control.append((char *) &len, 4); sendUserControl(CONTROL_SETBUFFER, control); }
0
[ "CWE-703" ]
ZLMediaKit
7d8b212a3c3368bc2f6507cb74664fc419eb9327
321,234,859,212,653,670,000,000,000,000,000,000,000
9
修复rtmp汇报窗口太小导致循环递归的bug:#1839
static int uvc_scan_chain(struct uvc_video_chain *chain, struct uvc_entity *term) { struct uvc_entity *entity, *prev; uvc_trace(UVC_TRACE_PROBE, "Scanning UVC chain:"); entity = term; prev = NULL; while (entity != NULL) { /* Entity must not be part of an existing chain */ if (entity->chain.next || enti...
0
[ "CWE-269" ]
linux
68035c80e129c4cfec659aac4180354530b26527
104,946,206,479,007,260,000,000,000,000,000,000,000
34
media: uvcvideo: Avoid cyclic entity chains due to malformed USB descriptors Way back in 2017, fuzzing the 4.14-rc2 USB stack with syzkaller kicked up the following WARNING from the UVC chain scanning code: | list_add double add: new=ffff880069084010, prev=ffff880069084010, | next=ffff880067d22298. | ----------...
static int l2tp_nl_cmd_tunnel_delete(struct sk_buff *skb, struct genl_info *info) { struct l2tp_tunnel *tunnel; u32 tunnel_id; int ret = 0; struct net *net = genl_info_net(info); if (!info->attrs[L2TP_ATTR_CONN_ID]) { ret = -EINVAL; goto out; } tunnel_id = nla_get_u32(info->attrs[L2TP_ATTR_CONN_ID]); tunn...
0
[ "CWE-416" ]
linux
f026bc29a8e093edfbb2a77700454b285c97e8ad
220,587,064,103,349,770,000,000,000,000,000,000,000
29
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...
STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x) { GENERAL_NAMES *gens; STACK_OF(OPENSSL_STRING) *ret; gens = X509_get_ext_d2i(x, NID_subject_alt_name, NULL, NULL); ret = get_email(X509_get_subject_name(x), gens); sk_GENERAL_NAME_pop_free(gens, GENERAL_NAME_free); return ret; }
0
[ "CWE-125" ]
openssl
bb4d2ed4091408404e18b3326e3df67848ef63d0
262,132,194,649,904,480,000,000,000,000,000,000,000
10
Fix append_ia5 function to not assume NUL terminated strings ASN.1 strings may not be NUL terminated. Don't assume they are. CVE-2021-3712 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org>
void ext4_set_bits(void *bm, int cur, int len) { __u32 *addr; len = cur + len; while (cur < len) { if ((cur & 31) == 0 && (len - cur) >= 32) { /* fast path: set whole word at once */ addr = bm + (cur >> 3); *addr = 0xffffffff; cur += 32; continue; } mb_set_bit(cur, bm); cur++; } }
0
[ "CWE-416" ]
linux
8844618d8aa7a9973e7b527d038a2a589665002c
152,091,390,391,483,040,000,000,000,000,000,000,000
17
ext4: only look at the bg_flags field if it is valid The bg_flags field in the block group descripts is only valid if the uninit_bg or metadata_csum feature is enabled. We were not consistently looking at this field; fix this. Also block group #0 must never have uninitialized allocation bitmaps, or need to be zeroed...
struct buffer_head *ext4_getblk(handle_t *handle, struct inode *inode, ext4_lblk_t block, int map_flags) { struct ext4_map_blocks map; struct buffer_head *bh; int create = map_flags & EXT4_GET_BLOCKS_CREATE; int err; J_ASSERT(handle != NULL || create == 0); map.m_lblk = block; map.m_len = 1; err = ext4_ma...
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
273,660,682,811,780,420,000,000,000,000,000,000,000
56
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
static int hardware_enable(void) { int cpu = raw_smp_processor_id(); u64 phys_addr = __pa(per_cpu(vmxarea, cpu)); int r; if (cr4_read_shadow() & X86_CR4_VMXE) return -EBUSY; /* * This can happen if we hot-added a CPU but failed to allocate * VP assist page for it. */ if (static_branch_unlikely(&enable_e...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
64,313,227,947,502,490,000,000,000,000,000,000,000
30
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
add_cycle_timer (GSManager *manager, glong timeout) { manager->priv->cycle_timeout_id = g_timeout_add (timeout, (GSourceFunc)cycle_timeout, manager); }
0
[]
gnome-screensaver
2f597ea9f1f363277fd4dfc109fa41bbc6225aca
290,405,011,457,049,200,000,000,000,000,000,000,000
7
Fix adding monitors Make sure to show windows that are added. And fix an off by one bug.
void sqlite3ResolveSelectNames( Parse *pParse, /* The parser context */ Select *p, /* The SELECT statement being coded. */ NameContext *pOuterNC /* Name context for parent SELECT statement */ ){ Walker w; assert( p!=0 ); w.xExprCallback = resolveExprStep; w.xSelectCallback = resolveS...
0
[ "CWE-416" ]
sqlite
4ded26a53c4df312e9fd06facbbf70377e969983
268,208,856,120,614,400,000,000,000,000,000,000,000
15
Prevent aliases of window functions expressions from being used as arguments to aggregate or other window functions. FossilOrigin-Name: 1e16d3e8fc60d39ca3899759ff15d355fdd7d3e23b325d8d2b0f954e11ce8dce
static MemTxResult flatview_write_continue(FlatView *fv, hwaddr addr, MemTxAttrs attrs, const void *ptr, hwaddr len, hwaddr addr1, hwaddr l, MemoryR...
0
[ "CWE-787" ]
qemu
4bfb024bc76973d40a359476dc0291f46e435442
155,318,545,528,283,480,000,000,000,000,000,000,000
47
memory: clamp cached translation in case it points to an MMIO region In using the address_space_translate_internal API, address_space_cache_init forgot one piece of advice that can be found in the code for address_space_translate_internal: /* MMIO registers can be expected to perform full-width accesses based onl...
dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code) { static const char str[] = "double fault"; struct task_struct *tsk = current; /* Return not checked because double check cannot be ignored */ notify_die(DIE_TRAP, str, regs, error_code, 8, SIGSEGV); tsk->thread.error_code = error_code; t...
0
[ "CWE-400" ]
linux-stable-rt
e5d4e1c3ccee18c68f23d62ba77bda26e893d4f0
193,678,020,921,042,980,000,000,000,000,000,000,000
18
x86: Do not disable preemption in int3 on 32bit Preemption must be disabled before enabling interrupts in do_trap on x86_64 because the stack in use for int3 and debug is a per CPU stack set by th IST. But 32bit does not have an IST and the stack still belongs to the current task and there is no problem in scheduling ...
NOEXPORT void safestring(char *c) { for(; *c; ++c) if(!(*c&0x80 || isprint((int)*c))) *c='.'; }
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
17,426,482,876,016,668,000,000,000,000,000,000,000
5
stunnel-5.57
ConnStateData::afterClientRead() { #if USE_OPENSSL if (parsingTlsHandshake) { parseTlsHandshake(); return; } #endif /* Process next request */ if (pipeline.empty()) fd_note(clientConnection->fd, "Reading next request"); if (!clientParseRequests()) { if (!isOpen()) ...
0
[ "CWE-116" ]
squid
7024fb734a59409889e53df2257b3fc817809fb4
253,225,794,730,860,950,000,000,000,000,000,000,000
31
Handle more Range requests (#790) Also removed some effectively unused code.
static int io_rsrc_ref_quiesce(struct io_rsrc_data *data, struct io_ring_ctx *ctx) { int ret; /* As we may drop ->uring_lock, other task may have started quiesce */ if (data->quiesce) return -ENXIO; data->quiesce = true; do { ret = io_rsrc_node_switch_start(ctx); if (ret) break; io_rsrc_node_switch(c...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
120,428,282,952,475,500,000,000,000,000,000,000,000
36
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
static bool vmxnet_tx_pkt_rebuild_payload(struct VmxnetTxPkt *pkt) { size_t payload_len = iov_size(pkt->raw, pkt->raw_frags) - pkt->hdr_len; pkt->payload_frags = iov_copy(&pkt->vec[VMXNET_TX_PKT_PL_START_FRAG], pkt->max_payload_frags, pkt->raw, pk...
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
248,529,431,640,646,750,000,000,000,000,000,000,000
16
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...
get_one_option(int optid, const struct my_option *opt __attribute__((unused)), char *argument) { int error = 0; switch(optid) { case 'c': opt_count_iterations= 1; break; case 'p': if (argument == disabled_my_option) argument= (char*) ""; // Don't require password if (argument) ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
204,995,126,558,302,650,000,000,000,000,000,000,000
75
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static struct page *next_active_pageblock(struct page *page) { /* Ensure the starting page is pageblock-aligned */ BUG_ON(page_to_pfn(page) & (pageblock_nr_pages - 1)); /* If the entire pageblock is free, move to the end of free page */ if (pageblock_free(page)) { int order; /* be careful. we don't have locks,...
0
[]
linux-2.6
08dff7b7d629807dbb1f398c68dd9cd58dd657a1
272,522,653,537,773,140,000,000,000,000,000,000,000
16
mm/hotplug: correctly add new zone to all other nodes' zone lists When online_pages() is called to add new memory to an empty zone, it rebuilds all zone lists by calling build_all_zonelists(). But there's a bug which prevents the new zone to be added to other nodes' zone lists. online_pages() { build_all_zonelists(...
int load_config(BIO *err, CONF *cnf) { static int load_config_called = 0; if (load_config_called) return 1; load_config_called = 1; if (!cnf) cnf = config; if (!cnf) return 1; OPENSSL_load_builtin_modules(); if (CONF_modules_load(cnf, NULL, 0) <= 0) { BIO_printf(err, "Error configuring OpenSSL\n"); ...
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
96,818,731,097,046,180,000,000,000,000,000,000,000
21
New functions to check a hostname email or IP address against a certificate. Add options to s_client, s_server and x509 utilities to print results of checks.
static void vmxnet3_adjust_by_guest_type(VMXNET3State *s) { struct Vmxnet3_GOSInfo gos; PCIDevice *d = PCI_DEVICE(s); VMXNET3_READ_DRV_SHARED(d, s->drv_shmem, devRead.misc.driverInfo.gos, &gos, sizeof(gos)); s->rx_packets_compound = (gos.gosType == VMXNET3_GOS_TYPE_W...
0
[ "CWE-416" ]
qemu
6c352ca9b4ee3e1e286ea9e8434bd8e69ac7d0d8
253,055,479,001,604,030,000,000,000,000,000,000,000
12
net: vmxnet3: check for device_active before write Vmxnet3 device emulator does not check if the device is active, before using it for write. It leads to a use after free issue, if the vmxnet3_io_bar0_write routine is called after the device is deactivated. Add check to avoid it. Reported-by: Li Qiang <liqiang6-s@360...
GF_Box *tpay_New() { ISOM_DECL_BOX_ALLOC(GF_TPAYBox, GF_ISOM_BOX_TYPE_TPAY); return (GF_Box *)tmp; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
132,190,304,783,710,790,000,000,000,000,000,000,000
5
prevent dref memleak on invalid input (#1183)
static void geneve_sock_release(struct geneve_dev *geneve) { struct geneve_sock *gs4 = rtnl_dereference(geneve->sock4); #if IS_ENABLED(CONFIG_IPV6) struct geneve_sock *gs6 = rtnl_dereference(geneve->sock6); rcu_assign_pointer(geneve->sock6, NULL); #endif rcu_assign_pointer(geneve->sock4, NULL); synchronize_net()...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
226,712,683,849,381,450,000,000,000,000,000,000,000
17
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
static void Log_queue(LogObject *self, const char *msg, int len) { const char *p = NULL; const char *q = NULL; const char *e = NULL; p = msg; e = p + len; /* * Break string on newline. This is on assumption * that primarily textual information being logged. */ q = p; wh...
0
[ "CWE-264" ]
mod_wsgi
d9d5fea585b23991f76532a9b07de7fcd3b649f4
306,248,078,416,110,500,000,000,000,000,000,000,000
103
Local privilege escalation when using daemon mode. (CVE-2014-0240)
void SSL_CTX_free(SSL_CTX *a) { int i; if (a == NULL) return; i=CRYPTO_add(&a->references,-1,CRYPTO_LOCK_SSL_CTX); #ifdef REF_PRINT REF_PRINT("SSL_CTX",a); #endif if (i > 0) return; #ifdef REF_CHECK if (i < 0) { fprintf(stderr,"SSL_CTX_free, bad reference count\n"); abort(); /* ok */ } #endif if (a->...
0
[ "CWE-310" ]
openssl
c6a876473cbff0fd323c8abcaace98ee2d21863d
287,889,376,050,284,970,000,000,000,000,000,000,000
63
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
static int packet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) { struct sock *sk; struct sockaddr_ll *sll; struct packet_sock *po; u8 *skb_head = skb->data; int skb_len = skb->len; unsigned int snaplen, res; if (skb->pkt_type == PACKET_LOOPBACK) ...
0
[ "CWE-909" ]
linux-2.6
67286640f638f5ad41a946b9a3dc75327950248f
5,536,874,944,435,711,000,000,000,000,000,000,000
109
net: packet: fix information leak to userland packet_getname_spkt() doesn't initialize all members of sa_data field of sockaddr struct if strlen(dev->name) < 13. This structure is then copied to userland. It leads to leaking of contents of kernel stack memory. We have to fully fill sa_data with strncpy() instead of ...
void in_timestamp::set(uint pos, Item *item) { Timestamp_or_zero_datetime *buff= &((Timestamp_or_zero_datetime *) base)[pos]; Timestamp_or_zero_datetime_native_null native(current_thd, item, true); if (native.is_null()) *buff= Timestamp_or_zero_datetime(); else *buff= Timestamp_or_zero_datetime(native);...
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
106,021,916,755,540,270,000,000,000,000,000,000,000
9
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
BGD_DECLARE(void) gdImageSetAntiAliased (gdImagePtr im, int c) { im->AA = 1; im->AA_color = c; im->AA_dont_blend = -1; }
0
[ "CWE-119", "CWE-787" ]
libgd
77f619d48259383628c3ec4654b1ad578e9eb40e
166,086,298,134,179,630,000,000,000,000,000,000,000
6
fix #215 gdImageFillToBorder stack-overflow when invalid color is used
int js_gettop(js_State *J) { return TOP - BOT; }
0
[ "CWE-476" ]
mujs
77ab465f1c394bb77f00966cd950650f3f53cb24
212,686,747,504,258,320,000,000,000,000,000,000,000
4
Fix 697401: Error when dropping extra arguments to lightweight functions.
std::ostream& operator<<(std::ostream& out, HealthTransition changed_state) { switch (changed_state) { case HealthTransition::Unchanged: out << "Unchanged"; break; case HealthTransition::Changed: out << "Changed"; break; case HealthTransition::ChangePending: out << "ChangePending"; break...
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
198,100,215,909,232,680,000,000,000,000,000,000,000
14
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static int ZEND_FASTCALL ZEND_SR_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; shift_right_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
164,642,645,627,290,580,000,000,000,000,000,000,000
12
- 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
static void svm_sched_in(struct kvm_vcpu *vcpu, int cpu) { if (pause_filter_thresh) shrink_ple_window(vcpu); }
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
295,017,933,271,141,530,000,000,000,000,000,000,000
5
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
PackLinuxElf32::adjABS(Elf32_Sym *sym, unsigned delta) { for (int j = 0; abs_symbol_names[j][0]; ++j) { unsigned st_name = get_te32(&sym->st_name); if (!strcmp(abs_symbol_names[j], get_str_name(st_name, (unsigned)-1))) { sym->st_value += delta; return 1; } } r...
1
[]
upx
77c914bce58aab9459029bed699f2bfb7ff2f90f
167,380,704,223,436,780,000,000,000,000,000,000,000
11
Check de-compressed SHT_SYMTAB https://github.com/upx/upx/issues/396 modified: p_lx_elf.cpp
static int mpls_netconf_fill_devconf(struct sk_buff *skb, struct mpls_dev *mdev, u32 portid, u32 seq, int event, unsigned int flags, int type) { struct nlmsghdr *nlh; struct netconfmsg *ncm; bool all = false; nlh = nlmsg_put(skb, portid, seq, event, sizeof(struct netconfmsg), flags); if (!nl...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
2,024,603,805,864,914,400,000,000,000,000,000,000
34
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
int skb_flow_dissector_bpf_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog) { struct bpf_prog *attached; struct net *net; net = current->nsproxy->net_ns; mutex_lock(&flow_dissector_mutex); attached = rcu_dereference_protected(net->flow_dissector_prog, lockdep_is_held(&flow_disse...
0
[ "CWE-330" ]
linux
55667441c84fa5e0911a0aac44fb059c15ba6da2
286,831,288,303,804,770,000,000,000,000,000,000,000
19
net/flow_dissector: switch to siphash UDP IPv6 packets auto flowlabels are using a 32bit secret (static u32 hashrnd in net/core/flow_dissector.c) and apply jhash() over fields known by the receivers. Attackers can easily infer the 32bit secret and use this information to identify a device and/or user, since this 32bi...
static inline void tree_mod_log_write_unlock(struct btrfs_fs_info *fs_info) { write_unlock(&fs_info->tree_mod_log_lock); }
0
[ "CWE-416", "CWE-362" ]
linux
5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339
208,772,110,265,001,320,000,000,000,000,000,000,000
4
Btrfs: make xattr replace operations atomic Replacing a xattr consists of doing a lookup for its existing value, delete the current value from the respective leaf, release the search path and then finally insert the new value. This leaves a time window where readers (getxattr, listxattrs) won't see any value for the x...
virPCIEDeviceInfoParseXML(xmlXPathContextPtr ctxt, xmlNodePtr pciExpressNode, virPCIEDeviceInfoPtr pci_express) { VIR_XPATH_NODE_AUTORESTORE(ctxt) xmlNodePtr lnk; int ret = -1; ctxt->node = pciExpressNode; if ((lnk = virXPathNode("./link[@validit...
0
[ "CWE-119" ]
libvirt
4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a
317,941,121,248,386,100,000,000,000,000,000,000,000
30
conf: Fix segfault when parsing mdev types Commit f1b0890 introduced a potential crash due to incorrect operator precedence when accessing an element from a pointer to an array. Backtrace below: #0 virNodeDeviceGetMdevTypesCaps (sysfspath=0x7fff801661e0 "/sys/devices/pci0000:00/0000:00:02.0", mdev_types=0x7fff801...
static MYSQL *db_connect(char *host, char *database, char *user, char *passwd) { MYSQL *mysql; if (verbose) fprintf(stdout, "Connecting to %s\n", host ? host : "localhost"); if (opt_use_threads && !lock_tables) { pthread_mutex_lock(&init_mutex); if (!(mysql= mysql_init(NULL)...
0
[ "CWE-319" ]
mysql-server
060b1eadf4913f7066484ea34ec62feead1bca44
102,645,933,441,742,320,000,000,000,000,000,000,000
66
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)
static int rds_iw_laddr_check(__be32 addr) { int ret; struct rdma_cm_id *cm_id; struct sockaddr_in sin; /* Create a CMA ID and try to bind it. This catches both * IB and iWARP capable NICs. */ cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP, IB_QPT_RC); if (IS_ERR(cm_id)) return PTR_ERR(cm_id); memset(&si...
0
[ "CWE-476" ]
net-next
bf39b4247b8799935ea91d90db250ab608a58e50
144,038,660,124,377,360,000,000,000,000,000,000,000
33
rds: prevent dereference of a NULL device in rds_iw_laddr_check Binding might result in a NULL device which is later dereferenced without checking. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
prepare_search (KEYRING_HANDLE hd) { if (hd->current.error) { /* If the last key was a legacy key, we simply ignore the error so that we can easily use search_next. */ if (gpg_err_code (hd->current.error) == GPG_ERR_LEGACY_KEY) hd->current.error = 0; else ...
0
[ "CWE-416" ]
gnupg
f0f71a721ccd7ab9e40b8b6b028b59632c0cc648
150,182,671,694,273,560,000,000,000,000,000,000,000
47
gpg: Prevent an invalid memory read using a garbled keyring. * g10/keyring.c (keyring_get_keyblock): Whitelist allowed packet types. * g10/keydb.c (parse_keyblock_image): Ditto. -- The keyring DB code did not reject packets which don't belong into a keyring. If for example the keyblock contains a literal data packet...
GF_Err pasp_dump(GF_Box *a, FILE * trace) { GF_PixelAspectRatioBox *ptr = (GF_PixelAspectRatioBox*)a; gf_isom_box_dump_start(a, "PixelAspectRatioBox", trace); fprintf(trace, "hSpacing=\"%d\" vSpacing=\"%d\" >\n", ptr->hSpacing, ptr->vSpacing); gf_isom_box_dump_done("PixelAspectRatioBox", a, trace); return GF_OK; }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
145,059,906,902,760,590,000,000,000,000,000,000,000
8
fixed 2 possible heap overflows (inc. #1088)
static void mac80211_hwsim_tx_frame(struct ieee80211_hw *hw, struct sk_buff *skb, struct ieee80211_channel *chan) { struct mac80211_hwsim_data *data = hw->priv; u32 _pid = READ_ONCE(data->wmediumd); if (ieee80211_hw_check(hw, SUPPORTS_RC_TABLE)) { struct ieee80211_tx_info *txi = IEEE80211_SKB_CB(s...
0
[ "CWE-703", "CWE-772" ]
linux
0ddcff49b672239dda94d70d0fcf50317a9f4b51
3,464,647,835,371,869,400,000,000,000,000,000,000
22
mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl() 'hwname' is malloced in hwsim_new_radio_nl() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length") Signed-off-by: Wei Yongjun <we...
TEST_P(Http2UpstreamIntegrationTest, RouterDownstreamDisconnectBeforeResponseComplete) { testRouterDownstreamDisconnectBeforeResponseComplete(); }
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
153,070,607,096,667,120,000,000,000,000,000,000,000
3
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 inline void of_unittest_overlay_i2c_14(void) { }
0
[ "CWE-401" ]
linux
e13de8fe0d6a51341671bbe384826d527afe8d44
258,636,178,409,580,370,000,000,000,000,000,000,000
1
of: unittest: fix memory leak in unittest_data_add In unittest_data_add, a copy buffer is created via kmemdup. This buffer is leaked if of_fdt_unflatten_tree fails. The release for the unittest_data buffer is added. Fixes: b951f9dc7f25 ("Enabling OF selftest to run without machine's devicetree") Signed-off-by: Navid ...
TEST_P(JSITest, HostObjectTest) { class ConstantHostObject : public HostObject { Value get(Runtime&, const PropNameID& sym) override { return 9000; } void set(Runtime&, const PropNameID&, const Value&) override {} }; Object cho = Object::createFromHostObject(rt, std::make_shared<Constant...
0
[ "CWE-843", "CWE-125" ]
hermes
fe52854cdf6725c2eaa9e125995da76e6ceb27da
89,435,710,718,206,940,000,000,000,000,000,000,000
217
[CVE-2020-1911] Look up HostObject computed properties on the right object in the prototype chain. Summary: The change in the hermes repository fixes the security vulnerability CVE-2020-1911. This vulnerability only affects applications which allow evaluation of uncontrolled, untrusted JavaScript code not shipped wit...
zipExtension() : Extension("zip", "1.12.4-dev") {}
0
[ "CWE-22" ]
hhvm
65c95a01541dd2fbc9c978ac53bed235b5376686
154,529,390,080,819,990,000,000,000,000,000,000,000
1
ZipArchive::extractTo bug 70350 Summary:Don't allow upward directory traversal when extracting zip archive files. Files in zip files with `..` or starting at main root `/` should be normalized to something where the file being extracted winds up within the directory or a subdirectory where the actual extraction is ta...
static void masking_bogus_flags(struct urb *urb) { int xfertype; struct usb_device *dev; struct usb_host_endpoint *ep; int is_out; unsigned int allowed; if (!urb || urb->hcpriv || !urb->complete) return; dev = urb->dev; if ((!dev) || (dev->state < USB_STATE_UNAUTHENTICATED)) return; ep = (usb_pipe...
0
[ "CWE-125" ]
linux
635f545a7e8be7596b9b2b6a43cab6bbd5a88e43
2,466,119,938,992,964,400,000,000,000,000,000,000
53
usbip: fix stub_rx: get_pipe() to validate endpoint number get_pipe() routine doesn't validate the input endpoint number and uses to reference ep_in and ep_out arrays. Invalid endpoint number can trigger BUG(). Range check the epnum and returning error instead of calling BUG(). Change caller stub_recv_cmd_submit() to...
static int hv_remote_flush_tlb_with_range(struct kvm *kvm, struct kvm_tlb_range *range) { struct kvm_vcpu *vcpu; int ret = 0, i; spin_lock(&to_kvm_vmx(kvm)->ept_pointer_lock); if (to_kvm_vmx(kvm)->ept_pointers_match == EPT_POINTERS_CHECK) check_ept_pointer_match(kvm); if (to_kvm_vmx(kvm)->ept_pointers_match...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
53,349,890,886,547,000,000,000,000,000,000,000,000
26
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
int audit_remove_tree_rule(struct audit_krule *rule) { struct audit_tree *tree; tree = rule->tree; if (tree) { spin_lock(&hash_lock); list_del_init(&rule->rlist); if (list_empty(&tree->rules) && !tree->goner) { tree->root = NULL; list_del_init(&tree->same_root); tree->goner = 1; list_move(&tree->li...
0
[ "CWE-362" ]
linux-2.6
8f7b0ba1c853919b85b54774775f567f30006107
34,852,664,413,003,963,000,000,000,000,000,000,000
23
Fix inotify watch removal/umount races Inotify watch removals suck violently. To kick the watch out we need (in this order) inode->inotify_mutex and ih->mutex. That's fine if we have a hold on inode; however, for all other cases we need to make damn sure we don't race with umount. We can *NOT* just grab a reference...
void freerdp_bitmap_planar_context_free(BITMAP_PLANAR_CONTEXT* context) { if (!context) return; free(context->pTempData); free(context->planesBuffer); free(context->deltaPlanesBuffer); free(context->rlePlanesBuffer); free(context); }
0
[ "CWE-125" ]
FreeRDP
17f547ae11835bb11baa3d045245dc1694866845
338,924,919,006,941,230,000,000,000,000,000,000,000
11
Fixed CVE-2020-11521: Out of bounds write in planar codec. Thanks to Sunglin and HuanGMz from Knownsec 404
const char *Natural_join_column::safe_table_name() { DBUG_ASSERT(table_ref); return table_ref->alias.str ? table_ref->alias.str : ""; }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
253,204,957,363,991,620,000,000,000,000,000,000,000
5
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
int ha_partition::check(THD *thd, HA_CHECK_OPT *check_opt) { DBUG_ENTER("ha_partition::check"); DBUG_RETURN(handle_opt_partitions(thd, check_opt, CHECK_PARTS)); }
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
279,713,464,412,969,240,000,000,000,000,000,000,000
6
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
CImg<T>& _distance_core(longT (*const sep)(const longT, const longT, const longT *const), longT (*const f)(const longT, const longT, const longT *const)) { // Check for g++ 4.9.X, as OpenMP seems to crash for this particular function. I have no clues why. #define cimg_is_gcc49x (__GNUC_...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
300,642,652,321,091,400,000,000,000,000,000,000,000
51
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
void *kvm_kvzalloc(unsigned long size) { if (size > PAGE_SIZE) return vzalloc(size); else return kzalloc(size, GFP_KERNEL); }
0
[ "CWE-399" ]
linux
12d6e7538e2d418c08f082b1b44ffa5fb7270ed8
228,684,086,996,206,470,000,000,000,000,000,000,000
7
KVM: perform an invalid memslot step for gpa base change PPC must flush all translations before the new memory slot is visible. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
*/ static __cold void io_uring_cancel_generic(bool cancel_all, struct io_sq_data *sqd) { struct io_uring_task *tctx = current->io_uring; struct io_ring_ctx *ctx; s64 inflight; DEFINE_WAIT(wait); WARN_ON_ONCE(sqd && sqd->thread != current); if (!current->io_uring) return; if (tctx->io_wq) io_wq_exi...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
330,316,211,876,342,900,000,000,000,000,000,000,000
65
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...
size_t git_delta_index_size(git_delta_index *index) { assert(index); return index->memsize; }
0
[ "CWE-190", "CWE-125" ]
libgit2
3f461902dc1072acb8b7607ee65d0a0458ffac2a
60,099,748,952,602,050,000,000,000,000,000,000,000
6
delta: fix sign-extension of big left-shift Our delta code was originally adapted from JGit, which itself adapted it from git itself. Due to this heritage, we inherited a bug from git.git in how we compute the delta offset, which was fixed upstream in 48fb7deb5 (Fix big left-shifts of unsigned char, 2009-06-17). As ex...
void mbedtls_ssl_set_timer( mbedtls_ssl_context *ssl, uint32_t millisecs ) { if( ssl->f_set_timer == NULL ) return; MBEDTLS_SSL_DEBUG_MSG( 3, ( "set_timer to %d ms", (int) millisecs ) ); ssl->f_set_timer( ssl->p_timer, millisecs / 4, millisecs ); }
0
[ "CWE-787" ]
mbedtls
f333dfab4a6c2d8a604a61558a8f783145161de4
330,550,292,019,606,400,000,000,000,000,000,000,000
8
More SSL debug messages for ClientHello parsing In particular, be verbose when checking the ClientHello cookie in a possible DTLS reconnection. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
int fuse_fs_open(struct fuse_fs *fs, const char *path, struct fuse_file_info *fi) { fuse_get_context()->private_data = fs->user_data; if (fs->op.open) return fs->op.open(path, fi); else return 0; }
0
[]
ntfs-3g
fb28eef6f1c26170566187c1ab7dc913a13ea43c
128,999,962,330,079,350,000,000,000,000,000,000,000
9
Hardened the checking of directory offset requested by a readdir When asked for the next directory entries, make sure the chunk offset is within valid values, otherwise return no more entries in chunk.
dissect_80211n_mac(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, int data_len, gboolean add_subtree, guint32 *n_mac_flags, guint32 *ampdu_id, struct ieee_802_11_phdr *phdr) { proto_tree *ftree = tree; ptvcursor_t *csr; int subtree_off = add_subtree ? 4 : 0; guint32...
0
[ "CWE-20" ]
wireshark
2c13e97d656c1c0ac4d76eb9d307664aae0e0cf7
65,281,139,466,616,000,000,000,000,000,000,000,000
49
The WTAP_ENCAP_ETHERNET dissector needs to be passed a struct eth_phdr. We now require that. Make it so. Bug: 12440 Change-Id: Iffee520976b013800699bde3c6092a3e86be0d76 Reviewed-on: https://code.wireshark.org/review/15424 Reviewed-by: Guy Harris <guy@alum.mit.edu>