func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
compose_group16_nonknockout_noblend_general(uint16_t *tos_ptr, bool tos_isolated, int tos_planestride, int tos_rowstride, uint16_t alpha, uint16_t shape, gs_blend_mode_t blend_mode, bool tos_has_shape, int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag, uint16...
0
[ "CWE-476" ]
ghostpdl
7870f4951bcc6a153f317e3439e14d0e929fd231
32,586,357,238,476,725,000,000,000,000,000,000,000
15
Bug 701795: Segv due to image mask issue
static int ext3_blkdev_put(struct block_device *bdev) { return blkdev_put(bdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL); }
0
[ "CWE-20" ]
linux
8d0c2d10dd72c5292eda7a06231056a4c972e4cc
42,570,189,606,075,045,000,000,000,000,000,000,000
4
ext3: Fix format string issues ext3_msg() takes the printk prefix as the second parameter and the format string as the third parameter. Two callers of ext3_msg omit the prefix and pass the format string as the second parameter and the first parameter to the format string as the third parameter. In both cases this stri...
static int qcow_validate_header(struct qcow_header *header) { if (header->magic != QCOW_MAGIC) { tcmu_err("header is not QCOW\n"); return -1; } if (header->version != 1) { tcmu_err("version is %d, expected 1\n", header->version); return -1; } if (header->cluster_bits < 9 || header->cluster_bits > 16) { ...
0
[ "CWE-200" ]
tcmu-runner
8cf8208775022301adaa59c240bb7f93742d1329
237,044,742,195,961,660,000,000,000,000,000,000,000
31
removed all check_config callback implementations to avoid security issues see github issue #194 qcow.c contained an information leak, could test for existance of any file in the system file_example.c and file_optical.c allow also to test for existance of any file, plus to temporarily create empty new files anywhere...
int pack_response(struct extdom_res *res, struct berval **ret_val) { BerElement *ber = NULL; int ret; /* We send to follwing response: * ExtdomResponseValue ::= SEQUENCE { * responseType ENUMERATED { * sid (1), * name (2), * posix_user (3), * posix_group (4) * }, * ...
0
[ "CWE-19" ]
freeipa
50c8f0c80175c7812bb523ab2387b19a94245b59
280,118,676,930,874,700,000,000,000,000,000,000,000
89
extdom: handle ERANGE return code for getXXYYY_r() calls The getXXYYY_r() calls require a buffer to store the variable data of the passwd and group structs. If the provided buffer is too small ERANGE is returned and the caller can try with a larger buffer again. Cmocka/cwrap based unit-tests for get*_r_wrapper() are ...
static inline void SetPixelRed(const Image *restrict image,const Quantum red, Quantum *restrict pixel) { pixel[image->channel_map[RedPixelChannel].offset]=red; }
0
[ "CWE-119", "CWE-787" ]
ImageMagick
450bd716ed3b9186dd10f9e60f630a3d9eeea2a4
111,420,486,484,370,450,000,000,000,000,000,000,000
5
jint JNICALL JNI_GetDefaultJavaVMInitArgs(void *vm_args) { UDATA requestedVersion = (UDATA)((JDK1_1InitArgs *)vm_args)->version; switch (requestedVersion) { case JNI_VERSION_1_2: case JNI_VERSION_1_4: case JNI_VERSION_1_6: case JNI_VERSION_1_8: case JNI_VERSION_9: case JNI_VERSION_10: return JNI_OK; } r...
0
[ "CWE-119" ]
openj9
0971f22d88f42cf7332364ad7430e9bd8681c970
223,353,708,864,931,060,000,000,000,000,000,000,000
15
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>
static int add_partition_options(File fptr, partition_element *p_elem) { int err= 0; err+= add_space(fptr); if (p_elem->tablespace_name) err+= add_keyword_string(fptr,"TABLESPACE", FALSE, p_elem->tablespace_name); if (p_elem->nodegroup_id != UNDEF_NODEGROUP) err+= add_keywo...
0
[]
server
f305a7ce4bccbd56520d874e1d81a4f29bc17a96
52,245,485,315,463,560,000,000,000,000,000,000,000
30
bugfix: long partition names
zzip_dir_close(ZZIP_DIR * dir) { dir->refcount &= ~0x10000000; /* explicit dir close */ return zzip_dir_free(dir); }
0
[ "CWE-770" ]
zziplib
0c0c9256b0903f664bca25dd8d924211f81e01d3
66,672,781,084,028,400,000,000,000,000,000,000,000
5
Reject the ZIP file and report it as corrupt if the size of the central directory and/or the offset of start of central directory point beyond the end of the ZIP file. [CVE-2018-6484]
int gnutls_ocsp_req_export(gnutls_ocsp_req_t req, gnutls_datum_t * data) { int ret; if (req == NULL || data == NULL) { gnutls_assert(); return GNUTLS_E_INVALID_REQUEST; } /* XXX remove when we support these fields */ asn1_write_value(req->req, "tbsRequest.requestorName", NULL, 0); asn1_write_value(req->req,...
0
[ "CWE-264" ]
gnutls
964632f37dfdfb914ebc5e49db4fa29af35b1de9
155,649,334,341,868,920,000,000,000,000,000,000,000
21
ocsp: corrected the comparison of the serial size in OCSP response Previously the OCSP certificate check wouldn't verify the serial length and could succeed in cases it shouldn't. Reported by Stefan Buehler.
inline int web_client_api_request_single_chart(RRDHOST *host, struct web_client *w, char *url, void callback(RRDSET *st, BUFFER *buf)) { int ret = 400; char *chart = NULL; buffer_flush(w->response.data); while(url) { char *value = mystrsep(&url, "?&"); if(!value || !*value) continue; ...
0
[ "CWE-113", "CWE-200", "CWE-94", "CWE-74" ]
netdata
92327c9ec211bd1616315abcb255861b130b97ca
190,279,156,039,583,100,000,000,000,000,000,000,000
46
fixed vulnerabilities identified by red4sec.com (#4521)
static void delete_function_persistent(zval *zv) { sdlFunctionPtr function = Z_PTR_P(zv); if (function->functionName) { free(function->functionName); } if (function->requestName) { free(function->requestName); } if (function->responseName) { free(function->responseName); } if (function->requestParameters...
0
[ "CWE-476" ]
php-src
3c939e3f69955d087e0bb671868f7267dfb2a502
74,120,001,087,428,830,000,000,000,000,000,000,000
38
Fix bug #80672 - Null Dereference in SoapClient
int mnt_fs_set_bindsrc(struct libmnt_fs *fs, const char *src) { return strdup_to_struct_member(fs, bindsrc, src); }
0
[ "CWE-552", "CWE-703" ]
util-linux
166e87368ae88bf31112a30e078cceae637f4cdb
137,927,129,881,650,090,000,000,000,000,000,000,000
4
libmount: remove support for deleted mount table entries The "(deleted)" suffix has been originally used by kernel for deleted mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3 (Dec 2014) kernel does not use this suffix for mount stuff in /proc at all. Let's remove this support from libmount to...
ReadColorMap (FILE *fd, int number, CMap buffer, int *format) { int i; unsigned char rgb[3]; int flag; flag = TRUE; for (i = 0; i < number; ++i) { if (!ReadOK (fd, rgb, sizeof (rgb))) { g_message ("GIF: bad colormap\n"); return TRUE; } buffer[CM_RED][i] = rg...
0
[ "CWE-20" ]
gimp
cac290d093d0c318bbe33a4ff290c2abbd9698d3
293,473,880,090,683,600,000,000,000,000,000,000,000
30
When initializing the LZW state, watch out for a completely bogus * plug-ins/common/gifload.c: When initializing the LZW state, watch out for a completely bogus input_code_size [based on fix by Raphael Quinet] Also, fix a stupid old bug when clearing the code table between subimages. (Enables us to deal better ...
drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, int *errret) { bool result = FALSE; int status; TERMINAL *termp; SCREEN *sp; START_TRACE(); T((T_CALLED("tinfo::drv_CanHandle(%p)"), (void *) TCB)); assert(TCB != 0 && tname != 0); termp = (TERMINAL *) TCB; sp = TCB->cs...
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
114,120,285,394,688,290,000,000,000,000,000,000,000
99
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
virDomainMigrateGetMaxSpeed(virDomainPtr domain, unsigned long *bandwidth, unsigned int flags) { virConnectPtr conn; VIR_DOMAIN_DEBUG(domain, "bandwidth = %p, flags=%x", bandwidth, flags); virResetLastError(); virCheckDomainReturn(domain, -1); ...
0
[ "CWE-254" ]
libvirt
506e9d6c2d4baaf580d489fff0690c0ff2ff588f
214,093,032,570,864,100,000,000,000,000,000,000,000
27
virDomainGetTime: Deny on RO connections We have a policy that if API may end up talking to a guest agent it should require RW connection. We don't obey the rule in virDomainGetTime(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
virtual ulonglong get_max_int_value() const { return unsigned_flag ? 0xFFFFFFFFULL : 0x7FFFFFFFULL; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
114,367,255,760,809,220,000,000,000,000,000,000,000
4
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
gdk_pixbuf__tiff_image_stop_load (gpointer data, GError **error) { TiffContext *context = data; TIFF *tiff; gboolean retval; g_return_val_if_fail (data != NULL, FALSE); G_LOCK (tiff_loader); tiff_push_handlers (); ...
0
[ "CWE-20" ]
gdk-pixbuf
3bac204e0d0241a0d68586ece7099e6acf0e9bea
333,227,531,487,867,660,000,000,000,000,000,000,000
46
Initial stab at getting the focus code to work. Fri Jun 1 18:54:47 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreeview.c: (gtk_tree_view_focus): Initial stab at getting the focus code to work. (gtk_tree_view_class_init): Add a bunch of keybindings. * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_c...
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { const auto* params = reinterpret_cast<TfLiteUnidirectionalSequenceLSTMParams*>( node->builtin_data); const OpData* op_data = reinterpret_cast<OpData*>(node->user_data); const bool is_layer_norm_lstm = op_data->is_layer_norm_lstm; cons...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
163,758,877,133,845,850,000,000,000,000,000,000,000
195
[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...
int dsdb_user_obj_set_account_type(struct ldb_context *ldb, struct ldb_message *usr_obj, uint32_t user_account_control, uint32_t *account_type_p) { int ret; uint32_t account_type; account_type = ds_uf2atype(user_account_control); if (account_type == 0) { ldb_set_errstring(ldb, "dsdb: Unrecognized account ...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
67,192,093,957,662,500,000,000,000,000,000,000,000
25
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
static void run_checkdiff(struct diff_filepair *p, struct diff_options *o) { const char *name; const char *other; const char *attr_path; if (DIFF_PAIR_UNMERGED(p)) { /* unmerged */ return; } name = p->one->path; other = (strcmp(name, p->two->path) ? p->two->path : NULL); attr_path = other ? other : name; ...
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
174,368,001,799,075,900,000,000,000,000,000,000,000
23
Fix buffer overflow in git diff If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
static int ntop_set_host_quota(lua_State* vm) { NetworkInterfaceView *ntop_interface = getCurrentInterface(vm); char *host_ip; u_int16_t vlan_id = 0; char buf[64]; Host *h; u_int32_t quota; ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); if(ntop_lua_check(vm, __FUNCTION__, 1, LU...
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
296,852,781,597,899,960,000,000,000,000,000,000,000
26
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
static u32 sfb_compute_qlen(u32 *prob_r, u32 *avgpm_r, const struct sfb_sched_data *q) { int i; u32 qlen = 0, prob = 0, totalpm = 0; const struct sfb_bucket *b = &q->bins[q->slot].bins[0][0]; for (i = 0; i < SFB_LEVELS * SFB_NUMBUCKETS; i++) { if (qlen < b->qlen) qlen = b->qlen; totalpm += b->p_mark; if (...
0
[ "CWE-330" ]
linux
55667441c84fa5e0911a0aac44fb059c15ba6da2
267,807,314,080,773,600,000,000,000,000,000,000,000
18
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...
cluster_hash_key_make (void *p) { const struct cluster_list *cluster = p; return jhash(cluster->list, cluster->length, 0); }
0
[]
quagga
8794e8d229dc9fe29ea31424883433d4880ef408
114,820,661,385,635,640,000,000,000,000,000,000,000
6
bgpd: Fix regression in args consolidation, total should be inited from args * bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args.
static void spi_hw_init(struct device *dev, struct dw_spi *dws) { spi_reset_chip(dws); /* * Try to detect the FIFO depth if not set by interface driver, * the depth could be from 2 to 256 from HW spec */ if (!dws->fifo_len) { u32 fifo; for (fifo = 1; fifo < 256; fifo++) { dw_writel(dws, DW_SPI_TXFLTR,...
0
[ "CWE-662" ]
linux
19b61392c5a852b4e8a0bf35aecb969983c5932d
120,861,488,563,737,190,000,000,000,000,000,000,000
26
spi: spi-dw: Add lock protect dw_spi rx/tx to prevent concurrent calls dw_spi_irq() and dw_spi_transfer_one concurrent calls. I find a panic in dw_writer(): txw = *(u8 *)(dws->tx), when dw->tx==null, dw->len==4, and dw->tx_end==1. When tpm driver's message overtime dw_spi_irq() and dw_spi_transfer_one may concurrent...
_gnutls_map_kx_get_kx (gnutls_credentials_type_t type, int server) { gnutls_kx_algorithm_t ret = -1; if (server) { GNUTLS_KX_MAP_ALG_LOOP_SERVER (ret = p->algorithm); } else { GNUTLS_KX_MAP_ALG_LOOP_SERVER (ret = p->algorithm); } return ret; }
0
[ "CWE-310" ]
gnutls
34d87a7c3f12794a3ec2305cd2fdbae152bf2a76
59,362,571,448,465,830,000,000,000,000,000,000,000
14
(_gnutls_x509_oid2mac_algorithm): Don't crash trying to strcmp the NULL OID value in the hash_algorithms array, which happens when the input OID doesn't match our OIDs for SHA1, MD5, MD2 or RIPEMD160. Reported by satyakumar <satyam_kkd@hyd.hellosoft.com>.
TEST(FormatTest, PrintColored) { EXPECT_WRITE(stdout, fmt::print_colored(fmt::RED, "Hello, {}!\n", "world"), "\x1b[31mHello, world!\n\x1b[0m"); }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
110,634,027,151,714,500,000,000,000,000,000,000,000
4
Fix segfault on complex pointer formatting (#642)
static void smi_mod_timer(struct smi_info *smi_info, unsigned long new_val) { if (!smi_info->timer_can_start) return; smi_info->last_timeout_jiffies = jiffies; mod_timer(&smi_info->si_timer, new_val); smi_info->timer_running = true; }
0
[ "CWE-416" ]
linux
401e7e88d4ef80188ffa07095ac00456f901b8c4
20,848,122,130,456,167,000,000,000,000,000,000,000
8
ipmi_si: fix use-after-free of resource->name When we excute the following commands, we got oops rmmod ipmi_si cat /proc/ioports [ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478 [ 1623.482382] Mem abort info: [ 1623.482383] ESR = 0x96000007 [ 1623.482385] Exception class =...
xmlXIncludeMergeEntities(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlDocPtr from) { xmlNodePtr cur; xmlDtdPtr target, source; if (ctxt == NULL) return(-1); if ((from == NULL) || (from->intSubset == NULL)) return(0); target = doc->intSubset; if (target == NULL) { cur = xmlD...
0
[ "CWE-416" ]
libxml2
1098c30a040e72a4654968547f415be4e4c40fe7
35,182,780,478,397,073,000,000,000,000,000,000,000
49
Fix user-after-free with `xmllint --xinclude --dropdtd` The --dropdtd option can leave dangling pointers in entity reference nodes. Make sure to skip these nodes when processing XIncludes. This also avoids scanning entity declarations and even modifying them inadvertently during XInclude processing. Move from a bloc...
zcurrentstackprotect(i_ctx_t *i_ctx_p) { os_ptr op = osp; ref *ep = oparray_find(i_ctx_p); if (ep == 0) return_error(gs_error_rangecheck); push(1); make_bool(op, ep->value.opproc == oparray_cleanup); return 0; }
0
[]
ghostpdl
b575e1ec42cc86f6a58c603f2a88fcc2af699cc8
247,808,401,048,561,900,000,000,000,000,000,000,000
11
Bug 699668: handle stack overflow during error handling When handling a Postscript error, we push the object throwing the error onto the operand stack for the error handling procedure to access - we were not checking the available stack before doing so, thus causing a crash. Basically, if we get a stack overflow when...
static void hfsplus_set_perms(struct inode *inode, struct hfsplus_perm *perms) { if (inode->i_flags & S_IMMUTABLE) perms->rootflags |= HFSPLUS_FLG_IMMUTABLE; else perms->rootflags &= ~HFSPLUS_FLG_IMMUTABLE; if (inode->i_flags & S_APPEND) perms->rootflags |= HFSPLUS_FLG_APPEND; else perms->rootflags &= ~HFSP...
0
[ "CWE-119" ]
linux-2.6
efc7ffcb4237f8cb9938909041c4ed38f6e1bf40
156,912,153,253,697,250,000,000,000,000,000,000,000
16
hfsplus: fix Buffer overflow with a corrupted image When an hfsplus image gets corrupted it might happen that the catalog namelength field gets b0rked. If we mount such an image the memcpy() in hfsplus_cat_build_key_uni() writes more than the 255 that fit in the name field. Depending on the size of the overwritten d...
execute_subshell_builtin_or_function (words, redirects, builtin, var, pipe_in, pipe_out, async, fds_to_close, flags) WORD_LIST *words; REDIRECT *redirects; sh_builtin_func_t *builtin; SHELL_VAR *var; int pipe_in, pipe_out, async; struct fd_bitmap *fds_to_close; int...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
110,579,836,312,472,250,000,000,000,000,000,000,000
87
commit bash-20120224 snapshot
static void vhost_vdpa_unsetup_vq_irq(struct vhost_vdpa *v, u16 qid) { struct vhost_virtqueue *vq = &v->vqs[qid]; irq_bypass_unregister_producer(&vq->call_ctx.producer); }
0
[ "CWE-416" ]
linux
f6bbf0010ba004f5e90c7aefdebc0ee4bd3283b9
93,132,424,393,905,190,000,000,000,000,000,000,000
6
vhost-vdpa: fix use-after-free of v->config_ctx When the 'v->config_ctx' eventfd_ctx reference is released we didn't set it to NULL. So if the same character device (e.g. /dev/vhost-vdpa-0) is re-opened, the 'v->config_ctx' is invalid and calling again vhost_vdpa_config_put() causes use-after-free issues like the foll...
static int io_tee(struct io_kiocb *req, unsigned int issue_flags) { struct io_splice *sp = &req->splice; struct file *out = sp->file_out; unsigned int flags = sp->flags & ~SPLICE_F_FD_IN_FIXED; struct file *in; long ret = 0; if (issue_flags & IO_URING_F_NONBLOCK) return -EAGAIN; if (sp->flags & SPLICE_F_FD_I...
0
[ "CWE-909", "CWE-94" ]
linux
32452a3eb8b64e01e2be717f518c0be046975b9d
158,755,650,690,180,840,000,000,000,000,000,000,000
31
io_uring: fix uninitialized field in rw io_kiocb io_rw_init_file does not initialize kiocb->private, so when iocb_bio_iopoll reads kiocb->private it can contain uninitialized data. Fixes: 3e08773c3841 ("block: switch polling to be bio based") Signed-off-by: Joseph Ravichandran <jravi@mit.edu> Signed-off-by: Jens Axbo...
h2_streamerror(uint32_t u) { if (u < NSTREAMERRORS && stream_errors[u] != NULL) return (stream_errors[u]); else return (H2NN_ERROR); }
0
[ "CWE-444" ]
varnish-cache
d4c67d2a1a05304598895c24663c58a2e2932708
234,924,593,485,213,500,000,000,000,000,000,000,000
7
Take content length into account on H/2 request bodies When receiving H/2 data frames, make sure to take the advertised content length into account, and fail appropriately if the combined sum of the data frames does not match the content length.
UINT rdpgfx_write_header(wStream* s, const RDPGFX_HEADER* header) { Stream_Write_UINT16(s, header->cmdId); /* cmdId (2 bytes) */ Stream_Write_UINT16(s, header->flags); /* flags (2 bytes) */ Stream_Write_UINT32(s, header->pduLength); /* pduLength (4 bytes) */ return CHANNEL_RC_OK; }
0
[ "CWE-190" ]
FreeRDP
40393700642ad38437982e8a3afc34ff33ccf28e
267,065,963,219,119,420,000,000,000,000,000,000,000
7
Fixed input sanitation in rdpgfx_recv_solid_fill_pdu The input rectangle must be checked for plausibility. Thanks to Sunglin and HuanGMz of the Knownsec 404 security team and pangzi of pwnzen
ssize_t readlink_as_user(const char *fname, char *buf, size_t sz) { assert(fname && buf && sz); int called_as_root = 0; if (geteuid() == 0) called_as_root = 1; if (called_as_root) EUID_USER(); ssize_t rv = readlink(fname, buf, sz); if (called_as_root) EUID_ROOT(); return rv; }
0
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
139,560,133,896,476,230,000,000,000,000,000,000,000
17
fixing CVE-2022-31214
static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) { switch_mm(prev, next, current); cpumask_set_cpu(smp_processor_id(), mm_cpumask(next)); set_user_asce(next); }
0
[ "CWE-20" ]
linux
3446c13b268af86391d06611327006b059b8bab1
14,351,896,293,948,436,000,000,000,000,000,000,000
7
s390/mm: four page table levels vs. fork The fork of a process with four page table levels is broken since git commit 6252d702c5311ce9 "[S390] dynamic page tables." All new mm contexts are created with three page table levels and an asce limit of 4TB. If the parent has four levels dup_mmap will add vmas to the new co...
confFile(char *base) { return expandPath(Strnew_m_charp(w3m_conf_dir(), "/", base, NULL)->ptr); }
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
335,729,007,867,722,830,000,000,000,000,000,000,000
4
Make temporary directory safely when ~/.w3m is unwritable
byte_array_clear_and_free (gpointer data) { GByteArray *buffer = data; cockpit_memory_clear (buffer->data, buffer->len); g_byte_array_free (buffer, TRUE); }
0
[ "CWE-1021" ]
cockpit
46f6839d1af4e662648a85f3e54bba2d57f39f0e
252,699,103,338,290,800,000,000,000,000,000,000,000
6
ws: Restrict our cookie to the login host only Mark our cookie as `SameSite: Strict` [1]. The current `None` default will soon be moved to `Lax` by Firefox and Chromium, and recent versions started to throw a warning about it. [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite https://...
static int em_cmpxchg8b(struct x86_emulate_ctxt *ctxt) { u64 old = ctxt->dst.orig_val64; if (ctxt->dst.bytes == 16) return X86EMUL_UNHANDLEABLE; if (((u32) (old >> 0) != (u32) reg_read(ctxt, VCPU_REGS_RAX)) || ((u32) (old >> 32) != (u32) reg_read(ctxt, VCPU_REGS_RDX))) { *reg_write(ctxt, VCPU_REGS_RAX) = ...
0
[ "CWE-284" ]
linux
33ab91103b3415e12457e3104f0e4517ce12d0f3
263,449,247,239,464,880,000,000,000,000,000,000,000
20
KVM: x86: fix emulation of "MOV SS, null selector" This is CVE-2017-2583. On Intel this causes a failed vmentry because SS's type is neither 3 nor 7 (even though the manual says this check is only done for usable SS, and the dmesg splat says that SS is unusable!). On AMD it's worse: svm.c is confused and sets CPL to ...
max3421_check_unlink(struct usb_hcd *hcd) { struct spi_device *spi = to_spi_device(hcd->self.controller); struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); struct max3421_ep *max3421_ep; struct usb_host_endpoint *ep; struct urb *urb, *next; unsigned long flags; int retval = 0; spin_lock_irqsave(&max3421_h...
0
[ "CWE-416" ]
linux
b5fdf5c6e6bee35837e160c00ac89327bdad031b
74,382,431,874,562,740,000,000,000,000,000,000,000
29
usb: max-3421: Prevent corruption of freed memory The MAX-3421 USB driver remembers the state of the USB toggles for a device/endpoint. To save SPI writes, this was only done when a new device/endpoint was being used. Unfortunately, if the old device was removed, this would cause writes to freed memory. To fix this, ...
utfc_ptr2len_len(char_u *p, int size) { int len; #ifdef FEAT_ARABIC int prevlen; #endif if (size < 1 || *p == NUL) return 0; if (p[0] < 0x80 && (size == 1 || p[1] < 0x80)) // be quick for ASCII return 1; // Skip over first UTF-8 char, stopping at a NUL byte. len = utf_ptr2len_len(p, size);...
0
[ "CWE-122", "CWE-787" ]
vim
f6d39c31d2177549a986d170e192d8351bd571e2
305,017,618,820,746,500,000,000,000,000,000,000,000
52
patch 9.0.0220: invalid memory access with for loop over NULL string Problem: Invalid memory access with for loop over NULL string. Solution: Make sure mb_ptr2len() consistently returns zero for NUL.
R_API RBinJavaVerificationObj *r_bin_java_verification_info_from_type(RBinJavaObj *bin, R_BIN_JAVA_STACKMAP_TYPE type, ut32 value) { RBinJavaVerificationObj *se = R_NEW0 (RBinJavaVerificationObj); if (se) { se->tag = type; if (se->tag == R_BIN_JAVA_STACKMAP_OBJECT) { se->info.obj_val_cp_idx = (ut16) value; }...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
136,531,270,424,796,600,000,000,000,000,000,000,000
12
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
static unsigned long mem_cgroup_reclaim(struct mem_cgroup *memcg, gfp_t gfp_mask, unsigned long flags) { unsigned long total = 0; bool noswap = false; int loop; if (flags & MEM_CGROUP_RECLAIM_NOSWAP) noswap = true; if (!(flags & MEM_CGROUP_RECLAIM_SHRINK) && memcg->memsw_is_minimum) noswap = true; ...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
131,331,560,895,460,830,000,000,000,000,000,000,000
35
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
int __hci_req_remove_ext_adv_instance(struct hci_request *req, u8 instance) { struct hci_dev *hdev = req->hdev; /* If request specifies an instance that doesn't exist, fail */ if (instance > 0 && !hci_find_adv_instance(hdev, instance)) return -EINVAL; hci_req_add(req, HCI_OP_LE_REMOVE_ADV_SET, sizeof(instance),...
0
[ "CWE-362" ]
linux
e2cb6b891ad2b8caa9131e3be70f45243df82a80
333,607,611,100,946,080,000,000,000,000,000,000,000
12
bluetooth: eliminate the potential race condition when removing the HCI controller There is a possible race condition vulnerability between issuing a HCI command and removing the cont. Specifically, functions hci_req_sync() and hci_dev_do_close() can race each other like below: thread-A in hci_req_sync() | th...
static bool io_match_link(struct io_kiocb *preq, struct io_kiocb *req) { struct io_kiocb *link; if (!(preq->flags & REQ_F_LINK_HEAD)) return false; list_for_each_entry(link, &preq->link_list, link_list) { if (link == req) return true; } return false; }
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
89,673,869,136,660,400,000,000,000,000,000,000,000
14
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
cdf_read_long_sector_chain(const cdf_info_t *info, const cdf_header_t *h, const cdf_sat_t *sat, cdf_secid_t sid, size_t len, cdf_stream_t *scn) { size_t ss = CDF_SEC_SIZE(h), i, j; ssize_t nr; scn->sst_len = cdf_count_chain(sat, sid, ss); scn->sst_dirlen = len; if (scn->sst_len == (size_t)-1) return -1; s...
0
[ "CWE-119" ]
file
1140872578eedaeecf828f1841d17ff574372dba
159,610,505,776,361,800,000,000,000,000,000,000,000
44
- add float and double types - fix debug printf formats - fix short stream sizes - don't fail if we don't know about a type
u_undofile_reset_and_delete(buf_T *buf) { char_u *file_name; if (!buf->b_p_udf) return; file_name = u_get_undo_file_name(buf->b_ffname, TRUE); if (file_name != NULL) { mch_remove(file_name); vim_free(file_name); } set_option_value((char_u *)"undofile", 0L, NULL, OPT_LOCAL); }
0
[ "CWE-125", "CWE-787" ]
vim
8d02ce1ed75d008c34a5c9aaa51b67cbb9d33baa
39,568,983,719,271,768,000,000,000,000,000,000,000
16
patch 8.2.4217: illegal memory access when undo makes Visual area invalid Problem: Illegal memory access when undo makes Visual area invalid. Solution: Correct the Visual area after undo.
TEST(ComparisonsTest, LessBroadcast) { ComparisonOpModel model({1, 1, 1, 4}, {1, 1, 1, 1}, TensorType_INT32, BuiltinOperator_LESS); model.PopulateTensor<int>(model.input1(), {-1, 9, 7, 3}); model.PopulateTensor<int>(model.input2(), {7}); model.Invoke(); EXPECT_THAT(model.GetOutput()...
0
[ "CWE-20", "CWE-703" ]
tensorflow
a989426ee1346693cc015792f11d715f6944f2b8
272,819,464,155,625,300,000,000,000,000,000,000,000
10
Improve to cover scale value greater than one PiperOrigin-RevId: 433050921
static int dwc3_gadget_pullup(struct usb_gadget *g, int is_on) { struct dwc3 *dwc = gadget_to_dwc(g); unsigned long flags; int ret; is_on = !!is_on; /* * Per databook, when we want to stop the gadget, if a control transfer * is still in process, complete it and get the core into setup phase. */ if (!i...
0
[ "CWE-703", "CWE-667", "CWE-189" ]
linux
c91815b596245fd7da349ecc43c8def670d2269e
270,048,497,601,728,100,000,000,000,000,000,000,000
29
usb: dwc3: gadget: never call ->complete() from ->ep_queue() This is a requirement which has always existed but, somehow, wasn't reflected in the documentation and problems weren't found until now when Tuba Yavuz found a possible deadlock happening between dwc3 and f_hid. She described the situation as follows: spin_...
ms_escher_read_RegroupItems (MSEscherState *state, MSEscherHeader *h) { /* Each shape in a drawing has a regroup ID (separate from the shape * ID), so that the regroup command can find shapes that were once * grouped. In order to handle nested grouping and ungrouping * there is a table logging changes to regroup...
0
[ "CWE-119" ]
gnumeric
b5480b69345b3c6d56ee0ed9c9e9880bb2a08cdc
99,145,856,642,296,760,000,000,000,000,000,000,000
18
xls: fuzzed file crash.
set_option_default( int opt_idx, int opt_flags, /* OPT_FREE, OPT_LOCAL and/or OPT_GLOBAL */ int compatible) /* use Vi default value */ { char_u *varp; /* pointer to variable for current option */ int dvi; /* index in def_val[] */ long_u flags; long_u *flagsp; int both = (opt_flags...
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
40,917,453,943,194,356,000,000,000,000,000,000,000
69
patch 8.0.0056 Problem: When setting 'filetype' there is no check for a valid name. Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
int mwifiex_set_secure_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_config, struct cfg80211_ap_settings *params) { int i; struct mwifiex_wep_key wep_key; if (!params->privacy) { bss_config->protocol = PROTOCOL_NO_SECURITY; bss_config->key_mgmt = KEY_MGMT_NONE; bss_c...
0
[ "CWE-120", "CWE-787" ]
linux
7caac62ed598a196d6ddf8d9c121e12e082cac3a
335,261,486,633,211,000,000,000,000,000,000,000,000
126
mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settings mwifiex_update_vs_ie(),mwifiex_set_uap_rates() and mwifiex_set_wmm_params() call memcpy() without checking the destination size.Since the source is given from user-space, this may trigger a heap buffer overflow. Fix them by putting the length...
static int ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *expr = &opline->op1.u.constant; zval *result = &EX_T(opline->result.u.var).tmp_var; if (opline->extended_value != IS_STRING) { *result = *expr; if (!0) { zendi_zval_copy_ctor(*result); }...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
303,477,433,406,344,500,000,000,000,000,000,000,000
54
- 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 CURLUcode decode_host(char *hostname, char **outp) { char *per = NULL; if(hostname[0] != '[') /* only decode if not an ipv6 numerical */ per = strchr(hostname, '%'); if(!per) { *outp = strdup(hostname); if(!*outp) return CURLUE_OUT_OF_MEMORY; } else { /* might be encoded */ ...
0
[]
curl
914aaab9153764ef8fa4178215b8ad89d3ac263a
183,639,405,769,184,080,000,000,000,000,000,000,000
21
urlapi: reject percent-decoding host name into separator bytes CVE-2022-27780 Reported-by: Axel Chong Bug: https://curl.se/docs/CVE-2022-27780.html Closes #8826
void kvm_load_guest_fpu(struct kvm_vcpu *vcpu) { if (vcpu->guest_fpu_loaded) return; /* * Restore all possible states in the guest, * and assume host would use all available bits. * Guest xcr0 would be loaded later. */ kvm_put_guest_xcr0(vcpu); vcpu->guest_fpu_loaded = 1; __kernel_fpu_begin(); __copy_k...
0
[ "CWE-369" ]
linux
0185604c2d82c560dab2f2933a18f797e74ab5a8
235,847,860,808,822,830,000,000,000,000,000,000,000
16
KVM: x86: Reload pit counters for all channels when restoring state Currently if userspace restores the pit counters with a count of 0 on channels 1 or 2 and the guest attempts to read the count on those channels, then KVM will perform a mod of 0 and crash. This will ensure that 0 values are converted to 65536 as per...
void FieldStore::clear_headers() { headers_.clear(); header_key_prev_ = false; }
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
145,237,004,446,171,850,000,000,000,000,000,000,000
4
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
static CURLcode gtls_random(struct Curl_easy *data, unsigned char *entropy, size_t length) { int rc; (void)data; rc = gnutls_rnd(GNUTLS_RND_RANDOM, entropy, length); return rc?CURLE_FAILED_INIT:CURLE_OK; }
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
19,727,267,712,480,508,000,000,000,000,000,000,000
8
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
int ssl3_get_key_exchange(SSL *s) { #ifndef OPENSSL_NO_RSA unsigned char *q,md_buf[EVP_MAX_MD_SIZE*2]; #endif EVP_MD_CTX md_ctx; unsigned char *param,*p; int al,j,ok; long i,param_len,n,alg_k,alg_a; EVP_PKEY *pkey=NULL; const EVP_MD *md = NULL; #ifndef OPENSSL_NO_RSA RSA *rsa=NULL; #endif #ifndef OPENSSL_NO_DH...
0
[ "CWE-310" ]
openssl
ce325c60c74b0fa784f5872404b722e120e5cab0
220,977,692,852,750,700,000,000,000,000,000,000,000
741
Only allow ephemeral RSA keys in export ciphersuites. OpenSSL clients would tolerate temporary RSA keys in non-export ciphersuites. It also had an option SSL_OP_EPHEMERAL_RSA which enabled this server side. Remove both options as they are a protocol violation. Thanks to Karthikeyan Bhargavan for reporting this issue....
hfs_read_lzvn_block_table(const TSK_FS_ATTR *rAttr, CMP_OFFSET_ENTRY** offsetTableOut, uint32_t* tableSizeOut, uint32_t* tableOffsetOut) { int attrReadResult; char fourBytes[4]; uint32_t tableDataSize; uint32_t tableSize; // Size of the offset table char *offsetTableData = NULL; CMP_OFFS...
0
[ "CWE-190", "CWE-284" ]
sleuthkit
114cd3d0aac8bd1aeaf4b33840feb0163d342d5b
176,824,537,597,952,870,000,000,000,000,000,000,000
74
hfs: fix keylen check in hfs_cat_traverse() If key->key_len is 65535, calculating "uint16_t keylen' would cause an overflow: uint16_t keylen; ... keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len) so the code bypasses the sanity check "if (keylen > nodesize)" which results in crash later: ./too...
print_r2p_header (const char *name, const unsigned char *msg, size_t msglen) { DEBUGOUT_1 ("%s:\n", name); if (msglen < 9) return; DEBUGOUT_1 (" dwLength ..........: %u\n", convert_le_u32 (msg+1)); DEBUGOUT_1 (" bSlot .............: %u\n", msg[5]); DEBUGOUT_1 (" bSeq ..............: %u\n", msg[6]); D...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
295,603,020,288,813,760,000,000,000,000,000,000,000
12
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static void trigger_passive_scanning(struct btd_adapter *adapter) { if (!(adapter->current_settings & MGMT_SETTING_LE)) return; DBG(""); if (adapter->passive_scan_timeout > 0) { timeout_remove(adapter->passive_scan_timeout); adapter->passive_scan_timeout = 0; } /* * When the kernel background scanning i...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
224,257,805,518,243,400,000,000,000,000,000,000,000
51
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
qemuProcessMakeDir(virQEMUDriverPtr driver, virDomainObjPtr vm, const char *path) { if (virFileMakePathWithMode(path, 0750) < 0) { virReportSystemError(errno, _("Cannot create directory '%s'"), path); return -1; } if (qemuSecurityDomainSetPathLabel(driv...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
73,958,199,976,160,600,000,000,000,000,000,000,000
14
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
static JPAKE_CTX *jpake_init(const char *us, const char *them, const char *secret) { BIGNUM *p = NULL; BIGNUM *g = NULL; BIGNUM *q = NULL; BIGNUM *bnsecret = BN_new(); JPAKE_CTX *ctx; /* Use a safe prime for p (that we found earlier) */ BN_hex2bn(&p, "F9E5B365665EA7A05A9C534502780FEE6F1AB5BD4F49947FD03...
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
106,755,854,270,722,050,000,000,000,000,000,000,000
26
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 __net_init sctp_ctrlsock_exit(struct net *net) { /* Free the control endpoint. */ inet_ctl_sock_destroy(net->sctp.ctl_sock); }
0
[ "CWE-119", "CWE-787" ]
linux
8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4
175,641,832,197,188,560,000,000,000,000,000,000,000
5
sctp: fix race on protocol/netns initialization Consider sctp module is unloaded and is being requested because an user is creating a sctp socket. During initialization, sctp will add the new protocol type and then initialize pernet subsys: status = sctp_v4_protosw_init(); if (status) ...
} //! Return a reference to the minimum pixel value of the instance list \const. const T& min() const { bool is_all_empty = true; T *ptr_min = 0; cimglist_for(*this,l) if (!_data[l].is_empty()) { ptr_min = _data[l]._data; is_all_empty = false; break; } ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
334,076,911,797,418,700,000,000,000,000,000,000,000
20
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
proxy_C_SignRecover (CK_X_FUNCTION_LIST *self, CK_SESSION_HANDLE handle, CK_BYTE_PTR input, CK_ULONG input_len, CK_BYTE_PTR signature, CK_ULONG_PTR signature_len) { State *state = (State *)self; Mapping map; CK_R...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
63,510,561,091,383,920,000,000,000,000,000,000,000
16
Check for arithmetic overflows before allocating
static void ram_block_add(struct uc_struct *uc, RAMBlock *new_block) { RAMBlock *block; RAMBlock *last_block = NULL; new_block->offset = find_ram_offset(uc, new_block->max_length); if (!new_block->host) { new_block->host = phys_mem_alloc(uc, new_block->max_length, &new_block->m...
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
301,502,700,742,318,000,000,000,000,000,000,000,000
48
Fix crash when mapping a big memory and calling uc_close
static int nfs4_reset_slot_table(struct nfs4_slot_table *tbl, u32 max_reqs, int ivalue) { struct nfs4_slot *new = NULL; int i; int ret = 0; dprintk("--> %s: max_reqs=%u, tbl->max_slots %d\n", __func__, max_reqs, tbl->max_slots); /* Does the newly negotiated max_reqs match the existing slot table? */ if (...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
239,389,221,796,625,570,000,000,000,000,000,000,000
34
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
static Value parseStringToNumber(ExpressionContext* const expCtx, Value inputValue) { auto stringValue = inputValue.getStringData(); targetType result; // Reject any strings in hex format. This check is needed because the // NumberParser::parse call below allows an input hex string ...
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
151,863,164,902,198,490,000,000,000,000,000,000,000
20
SERVER-49404 Enforce additional checks in $arrayToObject
static int svc_getsockopt(struct socket *sock,int level,int optname, char __user *optval,int __user *optlen) { struct sock *sk = sock->sk; int error = 0, len; lock_sock(sk); if (!__SO_LEVEL_MATCH(optname, level) || optname != SO_ATMSAP) { error = vcc_getsockopt(sock, level, optname, optval, optlen); goto o...
0
[ "CWE-399" ]
linux-2.6
17b24b3c97498935a2ef9777370b1151dfed3f6f
214,666,908,991,781,000,000,000,000,000,000,000,000
27
ATM: CVE-2008-5079: duplicate listen() on socket corrupts the vcc table As reported by Hugo Dias that it is possible to cause a local denial of service attack by calling the svc_listen function twice on the same socket and reading /proc/net/atm/*vc Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: D...
void nfs4_close_state(struct path *path, struct nfs4_state *state, mode_t mode) { __nfs4_close(path, state, mode, 0); }
1
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
339,941,333,145,887,070,000,000,000,000,000,000,000
4
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static int grayinitialproc(i_ctx_t *i_ctx_p, ref *space) { gs_client_color cc; cc.pattern = 0x00; cc.paint.values[0] = 0; return gs_setcolor(igs, &cc); }
0
[]
ghostpdl
b326a71659b7837d3acde954b18bda1a6f5e9498
122,906,661,430,750,560,000,000,000,000,000,000,000
8
Bug 699655: Properly check the return value.... ...when getting a value from a dictionary
static int nc_uri(ASN1_IA5STRING *uri, ASN1_IA5STRING *base) { const char *baseptr = (char *)base->data; const char *hostptr = (char *)uri->data; const char *p = ia5memchr(uri, (char *)uri->data, ':'); int hostlen; /* Check for foo:// and skip past it */ if (p == NULL || IA5_OFFSET_...
0
[ "CWE-125" ]
openssl
8393de42498f8be75cf0353f5c9f906a43a748d2
227,234,081,608,954,940,000,000,000,000,000,000,000
49
Fix the name constraints code 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>
png_handle_zTXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) { png_const_charp errmsg = NULL; png_bytep buffer; png_uint_32 keyword_length; png_debug(1, "in png_handle_zTXt"); #ifdef PNG_USER_LIMITS_SUPPORTED if (png_ptr->user_chunk_cache_max != 0) { if (png_ptr->us...
0
[ "CWE-190", "CWE-369" ]
libpng
8a05766cb74af05c04c53e6c9d60c13fc4d59bf2
115,680,928,968,909,900,000,000,000,000,000,000,000
112
[libpng16] Fix the calculation of row_factor in png_check_chunk_length (Bug report by Thuan Pham, SourceForge issue #278)
check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len, gx_io_device *iodev, const char *permitgroup) { long i; ref *permitlist = NULL; /* an empty string (first character == 0) if '\' character is */ /* recognized as a file name separator as on DOS & Windows...
1
[]
ghostpdl
0d3901189f245232f0161addf215d7268c4d05a3
42,680,674,207,687,320,000,000,000,000,000,000,000
68
Bug 699657: properly apply file permissions to .tempfile
smtp_check_noparam(struct smtp_session *s, const char *args) { if (args != NULL) { smtp_reply(s, "500 %s %s: command does not accept arguments.", esc_code(ESC_STATUS_PERMFAIL, ESC_INVALID_COMMAND_ARGUMENTS), esc_description(ESC_INVALID_COMMAND_ARGUMENTS)); return 0; } return 1; }
0
[ "CWE-78", "CWE-252" ]
src
9dcfda045474d8903224d175907bfc29761dcb45
189,102,615,850,469,900,000,000,000,000,000,000
10
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@
CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread) { /* When sending a SMTP payload we must detect CRLF. sequences making sure they are sent as CRLF.. instead, as a . on the beginning of a line will be deleted by the server when not part of an EOB terminator and a genuine CRLF...
1
[ "CWE-200", "CWE-119", "CWE-787" ]
curl
ba1dbd78e5f1ed67c1b8d37ac89d90e5e330b628
34,435,479,658,008,970,000,000,000,000,000,000,000
99
smtp: use the upload buffer size for scratch buffer malloc ... not the read buffer size, as that can be set smaller and thus cause a buffer overflow! CVE-2018-0500 Reported-by: Peter Wu Bug: https://curl.haxx.se/docs/adv_2018-70a2.html
exif_mnote_data_pentax_load (ExifMnoteData *en, const unsigned char *buf, unsigned int buf_size) { ExifMnoteDataPentax *n = (ExifMnoteDataPentax *) en; size_t i, tcount, o, datao, base = 0; ExifShort c; if (!n || !buf || !buf_size) { exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifMnoteDataPentax", "S...
1
[ "CWE-125" ]
libexif
435e21f05001fb03f9f186fa7cbc69454afd00d1
7,655,742,321,089,199,000,000,000,000,000,000,000
115
Fix MakerNote tag size overflow issues at read time. Check for a size overflow while reading tags, which ensures that the size is always consistent for the given components and type of the entry, making checking further down superfluous. This provides an alternate fix for https://sourceforge.net/p/libexif/bugs/125/ C...
is_good_case_fold_items_for_search(OnigEncoding enc, int slen, int n, OnigCaseFoldCodeItem items[]) { int i, len; UChar buf[ONIGENC_MBC_CASE_FOLD_MAXLEN]; for (i = 0; i < n; i++) { OnigCaseFoldCodeItem* item = items + i; if (item->code_len != 1) return 0; if (it...
0
[ "CWE-476", "CWE-125" ]
oniguruma
c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c
47,188,007,160,105,510,000,000,000,000,000,000,000
17
Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode.
int MAIN(int argc, char **argv) { int build_chain = 0; SSL *con=NULL; #ifndef OPENSSL_NO_KRB5 KSSL_CTX *kctx; #endif int s,k,width,state=0; char *cbuf=NULL,*sbuf=NULL,*mbuf=NULL; int cbuf_len,cbuf_off; int sbuf_len,sbuf_off; fd_set readfds,writefds; short port=PORT; int full_log=1; char *host=SSL_HOST_NAME;...
1
[ "CWE-310" ]
openssl
cf6da05304d554aaa885151451aa4ecaa977e601
307,412,762,324,906,880,000,000,000,000,000,000,000
1,588
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
GF_Err fpar_Size(GF_Box *s) { FilePartitionBox *ptr = (FilePartitionBox *)s; ptr->size += 13 + (ptr->version ? 8 : 4); if (ptr->scheme_specific_info) ptr->size += strlen(ptr->scheme_specific_info); ptr->size+= ptr->nb_entries * 6; return GF_OK;
0
[ "CWE-416" ]
gpac
6063b1a011c3f80cee25daade18154e15e4c058c
79,729,587,798,989,160,000,000,000,000,000,000,000
11
fix UAF in audio_sample_entry_Read (#1440)
rpc_C_DecryptVerifyUpdate (CK_X_FUNCTION_LIST *self, p11_rpc_message *msg) { CK_SESSION_HANDLE session; CK_BYTE_PTR encrypted_part; CK_ULONG encrypted_part_len; CK_BYTE_PTR part; CK_ULONG part_len; BEGIN_CALL (DecryptVerifyUpdate); IN_ULONG (session); IN_BYTE_ARRAY (encrypted_part,...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
223,282,726,358,261,400,000,000,000,000,000,000,000
17
Check for arithmetic overflows before allocating
handle_client_shutdown_cookie_sha1_mech (DBusAuth *auth) { auth->cookie_id = -1; _dbus_string_set_length (&auth->challenge, 0); }
0
[ "CWE-59" ]
dbus
47b1a4c41004bf494b87370987b222c934b19016
149,577,806,554,176,750,000,000,000,000,000,000,000
5
auth: Reject DBUS_COOKIE_SHA1 for users other than the server owner The DBUS_COOKIE_SHA1 authentication mechanism aims to prove ownership of a shared home directory by having the server write a secret "cookie" into a .dbus-keyrings subdirectory of the desired identity's home directory with 0700 permissions, and having...
WebContents::WebContents(v8::Isolate* isolate, content::WebContents* web_contents) : content::WebContentsObserver(web_contents), type_(Type::kRemote), id_(GetAllWebContents().Add(this)), devtools_file_system_indexer_(new DevToolsFileSystemIndexer), file_task_runner_(...
0
[ "CWE-200", "CWE-668" ]
electron
07a1c2a3e5845901f7e2eda9506695be58edc73c
333,111,859,514,273,100,000,000,000,000,000,000,000
36
fix: restrict sendToFrame to same-process frames by default (#26875)
static int rt_fill_info(struct net *net, __be32 dst, __be32 src, u32 table_id, struct flowi4 *fl4, struct sk_buff *skb, u32 portid, u32 seq) { struct rtable *rt = skb_rtable(skb); struct rtmsg *r; struct nlmsghdr *nlh; unsigned long expires = 0; u32 error; u32 metrics[RTAX_MAX]; nlh = nlmsg_put(skb, port...
0
[ "CWE-476" ]
linux
bc3aae2bbac46dd894c89db5d5e98f7f0ef9e205
6,921,522,164,681,443,000,000,000,000,000,000,000
112
net: check and errout if res->fi is NULL when RTM_F_FIB_MATCH is set Syzkaller hit 'general protection fault in fib_dump_info' bug on commit 4.13-rc5.. Guilty file: net/ipv4/fib_semantics.c kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked...
URL original_url; URL redirect_url;
0
[ "CWE-119" ]
trafficserver
8b5f0345dade6b2822d9b52c8ad12e63011a5c12
246,900,315,837,025,420,000,000,000,000,000,000,000
3
Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug
void Gfx::opSetLineWidth(Object args[], int numArgs) { state->setLineWidth(args[0].getNum()); out->updateLineWidth(state); }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
12,314,081,497,861,012,000,000,000,000,000,000,000
4
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
ieee80211_rx_h_check(struct ieee80211_rx_data *rx) { struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; /* Drop disallowed frame classes based on STA auth/assoc state; * IEEE 802.11, Chap 5.5. * * mac80211 filters only based on association state, i.e. it drops * Class 3 frames from not associ...
0
[]
linux
588f7d39b3592a36fb7702ae3b8bdd9be4621e2f
9,602,123,028,295,403,000,000,000,000,000,000,000
53
mac80211: drop robust management frames from unknown TA When receiving a robust management frame, drop it if we don't have rx->sta since then we don't have a security association and thus couldn't possibly validate the frame. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
void cpu_register_map_client(QEMUBH *bh) { MapClient *client = g_malloc(sizeof(*client)); qemu_mutex_lock(&map_client_list_lock); client->bh = bh; QLIST_INSERT_HEAD(&map_client_list, client, link); if (!qatomic_read(&bounce.in_use)) { cpu_notify_map_clients_locked(); } qemu_mutex_un...
0
[ "CWE-787" ]
qemu
4bfb024bc76973d40a359476dc0291f46e435442
173,119,740,565,468,000,000,000,000,000,000,000,000
12
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...
static void power_pmu_del(struct perf_event *event, int ef_flags) { struct cpu_hw_events *cpuhw; long i; unsigned long flags; local_irq_save(flags); perf_pmu_disable(event->pmu); power_pmu_read(event); cpuhw = &__get_cpu_var(cpu_hw_events); for (i = 0; i < cpuhw->n_events; ++i) { if (event == cpuhw->event[...
0
[ "CWE-703", "CWE-189" ]
linux
0837e3242c73566fc1c0196b4ec61779c25ffc93
31,742,342,577,115,966,000,000,000,000,000,000,000
47
perf, powerpc: Handle events that raise an exception without overflowing Events on POWER7 can roll back if a speculative event doesn't eventually complete. Unfortunately in some rare cases they will raise a performance monitor exception. We need to catch this to ensure we reset the PMC. In all cases the PMC will be 25...
static inline void nohz_balancer_kick(struct rq *rq) { }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
210,065,742,843,213,230,000,000,000,000,000,000,000
1
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
static inline int pte_numa(pte_t pte) { return (pte_flags(pte) & (_PAGE_NUMA|_PAGE_PRESENT)) == _PAGE_NUMA; }
0
[]
linux
ee53664bda169f519ce3c6a22d378f0b946c8178
222,582,128,509,827,550,000,000,000,000,000,000,000
5
mm: Fix NULL pointer dereference in madvise(MADV_WILLNEED) support Sasha Levin found a NULL pointer dereference that is due to a missing page table lock, which in turn is due to the pmd entry in question being a transparent huge-table entry. The code - introduced in commit 1998cc048901 ("mm: make madvise(MADV_WILLNEE...
void SSL_set_debug(SSL *s, int debug) { s->debug = debug; }
0
[ "CWE-310" ]
openssl
56f1acf5ef8a432992497a04792ff4b3b2c6f286
240,261,082,865,142,700,000,000,000,000,000,000,000
4
Disable SSLv2 default build, default negotiation and weak ciphers. SSLv2 is by default disabled at build-time. Builds that are not configured with "enable-ssl2" will not support SSLv2. Even if "enable-ssl2" is used, users who want to negotiate SSLv2 via the version-flexible SSLv23_method() will need to explicitly ca...
static void ohci_stop_endpoints(OHCIState *ohci) { USBDevice *dev; int i, j; for (i = 0; i < ohci->num_ports; i++) { dev = ohci->rhport[i].port.dev; if (dev && dev->attached) { usb_device_ep_stopped(dev, &dev->ep_ctl); for (j = 0; j < USB_MAX_ENDPOINTS; j++) { ...
0
[ "CWE-835" ]
qemu
95ed56939eb2eaa4e2f349fe6dcd13ca4edfd8fb
250,423,723,312,959,600,000,000,000,000,000,000,000
16
usb: ohci: limit the number of link eds The guest may builds an infinite loop with link eds. This patch limit the number of linked ed to avoid this. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Message-id: 5899a02e.45ca240a.6c373.93c1@mx.google.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
static int unit_ref_uid_gid_internal(Unit *u, uid_t uid, gid_t gid, bool clean_ipc) { int r = 0, q = 0; assert(u); /* Reference both a UID and a GID in one go. Either references both, or neither. */ if (uid_is_valid(uid)) { r = unit_ref_uid(u, uid, clean_ipc); ...
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
125,096,985,102,239,240,000,000,000,000,000,000,000
25
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...
Client::maybePurgeOthers() { // only some HTTP methods should purge matching cache entries if (!request->method.purgesOthers()) return; // and probably only if the response was successful if (theFinalReply->sline.status() >= 400) return; // XXX: should we use originalRequest() here...
0
[ "CWE-20" ]
squid
6c9c44d0e9cf7b72bb233360c5308aa063af3d69
48,756,354,826,441,550,000,000,000,000,000,000,000
18
Handle more partial responses (#791)
qf_goto_win_with_ll_file(win_T *use_win, int qf_fnum, qf_info_T *ll_ref) { win_T *win = use_win; if (win == NULL) { // Find the window showing the selected file in the current tab page. FOR_ALL_WINDOWS(win) if (win->w_buffer->b_fnum == qf_fnum) break; if (win == NULL) { // Find a previous u...
0
[ "CWE-416" ]
vim
4f1b083be43f351bc107541e7b0c9655a5d2c0bb
88,625,274,846,866,500,000,000,000,000,000,000,000
32
patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any.
static void normalize_task(struct rq *rq, struct task_struct *p) { int on_rq; update_rq_clock(rq); on_rq = p->se.on_rq; if (on_rq) deactivate_task(rq, p, 0); __setscheduler(rq, p, SCHED_NORMAL, 0); if (on_rq) { activate_task(rq, p, 0); resched_task(rq->curr); } }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
125,002,788,738,913,620,000,000,000,000,000,000,000
13
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
static int attach_crypt(struct xfrm_state *x, struct nlattr *rta) { struct xfrm_algo *p, *ualg; struct xfrm_algo_desc *algo; if (!rta) return 0; ualg = nla_data(rta); algo = xfrm_ealg_get_byname(ualg->alg_name, 1); if (!algo) return -ENOSYS; x->props.ealgo = algo->desc.sadb_alg_id; p = kmemdup(ualg, xfr...
0
[ "CWE-284" ]
linux
677e806da4d916052585301785d847c3b3e6186a
63,745,324,925,656,460,000,000,000,000,000,000,000
24
xfrm_user: validate XFRM_MSG_NEWAE XFRMA_REPLAY_ESN_VAL replay_window When a new xfrm state is created during an XFRM_MSG_NEWSA call we validate the user supplied replay_esn to ensure that the size is valid and to ensure that the replay_window size is within the allocated buffer. However later it is possible to updat...