func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
PHP_METHOD(Phar, copy) { char *oldfile, *newfile, *error; const char *pcr_error; size_t oldfile_len, newfile_len; phar_entry_info *oldentry, newentry = {0}, *temp; int tmp_len = 0; PHAR_ARCHIVE_OBJECT(); if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &oldfile, &oldfile_len, &newfile, &newfile_len) == FAILURE...
1
[ "CWE-20" ]
php-src
1e9b175204e3286d64dfd6c9f09151c31b5e099a
150,250,224,649,255,880,000,000,000,000,000,000,000
97
Fix bug #71860: Require valid paths for phar filenames
static inline void SetPixelGreen(const Image *magick_restrict image, const Quantum green,Quantum *magick_restrict pixel) { pixel[image->channel_map[GreenPixelChannel].offset]=green; }
0
[ "CWE-20", "CWE-125" ]
ImageMagick
8187d2d8fd010d2d6b1a3a8edd935beec404dddc
246,015,567,277,894,320,000,000,000,000,000,000,000
5
https://github.com/ImageMagick/ImageMagick/issues/1610
i16 sqlite3TableColumnToStorage(Table *pTab, i16 iCol){ int i; i16 n; assert( iCol<pTab->nCol ); if( (pTab->tabFlags & TF_HasVirtual)==0 || iCol<0 ) return iCol; for(i=0, n=0; i<iCol; i++){ if( (pTab->aCol[i].colFlags & COLFLAG_VIRTUAL)==0 ) n++; } if( pTab->aCol[i].colFlags & COLFLAG_VIRTUAL ){ /...
0
[ "CWE-674", "CWE-787" ]
sqlite
38096961c7cd109110ac21d3ed7dad7e0cb0ae06
53,031,739,298,509,080,000,000,000,000,000,000,000
16
Avoid infinite recursion in the ALTER TABLE code when a view contains an unused CTE that references, directly or indirectly, the view itself. FossilOrigin-Name: 1d2e53a39b87e364685e21de137655b6eee725e4c6d27fc90865072d7c5892b5
crypt_reencrypt_info LUKS2_reencrypt_get_params(struct luks2_hdr *hdr, struct crypt_params_reencrypt *params) { crypt_reencrypt_info ri; ri = LUKS2_reencrypt_status(hdr); if (ri == CRYPT_REENCRYPT_NONE || ri == CRYPT_REENCRYPT_INVALID || !params) return ri; params->mode = reencrypt_mode(hdr); params->directio...
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
98,217,893,896,023,710,000,000,000,000,000,000,000
20
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
static int session_predicate_request_headers_send(nghttp2_session *session, nghttp2_outbound_item *item) { if (item->aux_data.headers.canceled) { return NGHTTP2_ERR_STREAM_CLOSING; } /* If we are terminating session (NGHTTP2_GOAWAY_TERM_ON_SEND), GOAWAY w...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
339,639,550,475,496,730,000,000,000,000,000,000,000
14
Add nghttp2_option_set_max_outbound_ack
g_utf8_get_char (const gchar * p) { int i, mask = 0, len; gunichar result; unsigned char c = (unsigned char) *p; UTF8_COMPUTE (c, mask, len); if (len == -1) return (gunichar) - 1; UTF8_GET (result, p, i, mask, len); return result; }
0
[]
libidn
2e97c2796581c27213962c77f5a8571a598f9a2e
58,525,189,485,429,580,000,000,000,000,000,000,000
13
libidn: stringprep_utf8_to_ucs4 now rejects invalid UTF-8. CVE-2015-2059
static int dev_remove(struct file *filp, struct dm_ioctl *param, size_t param_size) { struct hash_cell *hc; struct mapped_device *md; int r; struct dm_table *t; down_write(&_hash_lock); hc = __find_device_hash_cell(param); if (!hc) { DMDEBUG_LIMIT("device doesn't appear to be in the dev hash table."); up_w...
0
[ "CWE-787" ]
linux
4edbe1d7bcffcd6269f3b5eb63f710393ff2ec7a
232,186,746,834,564,560,000,000,000,000,000,000,000
51
dm ioctl: fix out of bounds array access when no devices If there are not any dm devices, we need to zero the "dev" argument in the first structure dm_name_list. However, this can cause out of bounds write, because the "needed" variable is zero and len may be less than eight. Fix this bug by reporting DM_BUFFER_FULL_...
void CoreNetwork::userInput(BufferInfo buf, QString msg) { userInputHandler()->handleUserInput(buf, msg); }
0
[ "CWE-399" ]
quassel
b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8
224,886,173,794,227,430,000,000,000,000,000,000,000
4
Improve the message-splitting algorithm for PRIVMSG and CTCP This introduces a new message splitting algorithm based on QTextBoundaryFinder. It works by first starting with the entire message to be sent, encoding it, and checking to see if it is over the maximum message length. If it is, it uses QTBF to find the wor...
DEFUN(followI, VIEW_IMAGE, "Display image in viewer") { Anchor *a; Buffer *buf; if (Currentbuf->firstLine == NULL) return; a = retrieveCurrentImg(Currentbuf); if (a == NULL) return; /* FIXME: gettextize? */ message(Sprintf("loading %s", a->url)->ptr, 0, 0); refresh(); buf = loadG...
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
82,435,279,115,370,860,000,000,000,000,000,000,000
25
Make temporary directory safely when ~/.w3m is unwritable
static bool decode_dirsync_request(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; DATA_BLOB cookie; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_dirsync_control *ldc; if (!data) return false; if (!asn1_load(data, in)) { return false; } ldc = talloc(mem_ctx, struct ldb_dir...
0
[ "CWE-399" ]
samba
530d50a1abdcdf4d1775652d4c456c1274d83d8d
218,649,003,361,312,800,000,000,000,000,000,000,000
52
CVE-2015-7540: s4: libcli: ldap message - Ensure all asn1_XX returns are checked. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): F...
static void ffs_free_inst(struct usb_function_instance *f) { struct f_fs_opts *opts; opts = to_f_fs_opts(f); ffs_dev_lock(); _ffs_free_dev(opts->dev); ffs_dev_unlock(); kfree(opts); }
0
[ "CWE-416", "CWE-362" ]
linux
38740a5b87d53ceb89eb2c970150f6e94e00373a
266,350,190,590,418,100,000,000,000,000,000,000,000
10
usb: gadget: f_fs: Fix use-after-free When using asynchronous read or write operations on the USB endpoints the issuer of the IO request is notified by calling the ki_complete() callback of the submitted kiocb when the URB has been completed. Calling this ki_complete() callback will free kiocb. Make sure that the str...
entry *load_entry(FILE * file, void (*error_func) (), struct passwd *pw, char **envp) { /* this function reads one crontab entry -- the next -- from a file. * it skips any leading blank lines, ignores comments, and returns * NULL if for any reason the entry can't be read and parsed. * * the entry is also pars...
0
[ "CWE-476" ]
cronie
a6576769f01325303b11edc3e0cfb05ef382ce56
250,952,664,499,553,030,000,000,000,000,000,000,000
356
Fix CVE-2019-9704 and CVE-2019-9705 The users can cause DoS of the crond by loading huge crontab files. We now allow maximum 1000 environment variables and 1000 crontab entries. Also the comments and whitespace between the entries and variables are now limited to 32768 characters.
void mp_unregister_driver(struct uart_driver *drv) { struct tty_driver *normal = NULL; normal = drv->tty_driver; if (!normal) { return; } tty_unregister_driver(normal); put_tty_driver(normal); drv->tty_driver = NULL; if (drv->state) { kfree(drv->state); }...
0
[ "CWE-200" ]
linux
a8b33654b1e3b0c74d4a1fed041c9aae50b3c427
337,959,533,602,259,440,000,000,000,000,000,000,000
22
Staging: sb105x: info leak in mp_get_count() The icount.reserved[] array isn't initialized so it leaks stack information to userspace. Reported-by: Nico Golde <nico@ngolde.de> Reported-by: Fabian Yamaguchi <fabs@goesec.de> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Li...
static int verify_extension(SSL *s, unsigned int context, unsigned int type, custom_ext_methods *meths, RAW_EXTENSION *rawexlist, RAW_EXTENSION **found) { size_t i; size_t builtin_num = OSSL_NELEM(ext_defs); const EXTENSION_DEFINITION *thisext; fo...
0
[ "CWE-476" ]
openssl
fb9fa6b51defd48157eeb207f52181f735d96148
224,597,594,245,176,850,000,000,000,000,000,000,000
42
ssl sigalg extension: fix NULL pointer dereference As the variable peer_sigalgslen is not cleared on ssl rehandshake, it's possible to crash an openssl tls secured server remotely by sending a manipulated hello message in a rehandshake. On such a manipulated rehandshake, tls1_set_shared_sigalgs() calls tls12_shared_s...
static void __init multi_register_ports(struct uart_driver *drv) { int i; multi_init_ports(); for (i = 0; i < NR_PORTS; i++) { struct mp_port *mtpt = &multi_ports[i]; mtpt->port.line = i; mtpt->port.ops = &multi_pops; init_timer(&mtpt->timer); mtpt->timer.function = multi_timeout; mp_add_one_port(drv,...
0
[ "CWE-200" ]
linux
a8b33654b1e3b0c74d4a1fed041c9aae50b3c427
145,285,316,062,543,410,000,000,000,000,000,000,000
16
Staging: sb105x: info leak in mp_get_count() The icount.reserved[] array isn't initialized so it leaks stack information to userspace. Reported-by: Nico Golde <nico@ngolde.de> Reported-by: Fabian Yamaguchi <fabs@goesec.de> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Li...
static int sisusb_read_memio_byte(struct sisusb_usb_data *sisusb, int type, u32 addr, u8 *data) { struct sisusb_packet packet; int ret; CLEARPACKET(&packet); packet.header = (1 << (addr & 3)) | (type << 6); packet.address = addr & ~3; ret = sisusb_send_packet(sisusb, 6, &packet); *data = (u8)(packet.data >> ...
0
[ "CWE-476" ]
linux
9a5729f68d3a82786aea110b1bfe610be318f80a
334,078,854,033,897,750,000,000,000,000,000,000,000
13
USB: sisusbvga: fix oops in error path of sisusb_probe The pointer used to log a failure of usb_register_dev() must be set before the error is logged. v2: fix that minor is not available before registration Signed-off-by: oliver Neukum <oneukum@suse.com> Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail...
cb_notify_str_postprocess(packet_info *pinfo _U_, proto_tree *tree _U_, proto_item *item, dcerpc_info *di _U_, tvbuff_t *tvb, int start_offset, int end_offset, void *callback_args) { gint levels, hf_index = GPOINTER_TO_INT(callback_args); guint32 len; char *s; proto_item *hid...
0
[ "CWE-399" ]
wireshark
b4d16b4495b732888e12baf5b8a7e9bf2665e22b
261,640,331,135,895,760,000,000,000,000,000,000,000
53
SPOOLSS: Try to avoid an infinite loop. Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make sure our offset always increments in dissect_spoolss_keybuffer. Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793 Reviewed-on: https://code.wireshark.org/review/14687 Reviewed-by: Gerald Combs <gerald@wires...
static bool pickoneauth(struct auth *pick) { bool picked; /* only deal with authentication we want */ unsigned long avail = pick->avail & pick->want; picked = TRUE; /* The order of these checks is highly relevant, as this will be the order of preference in case of the existence of multiple accepted type...
0
[ "CWE-284" ]
curl
79b9d5f1a42578f807a6c94914bc65cbaa304b6d
17,904,886,272,591,896,000,000,000,000,000,000,000
27
http_done: close Negotiate connections when done When doing HTTP requests Negotiate authenticated, the entire connnection may become authenticated and not just the specific HTTP request which is otherwise how HTTP works, as Negotiate can basically use NTLM under the hood. curl was not adhering to this fact but would a...
inline void Pad(const T* input_data, const Dims<4>& input_dims, const std::vector<int>& left_paddings, const std::vector<int>& right_paddings, T* output_data, const Dims<4>& output_dims) { const T pad_value = static_cast<T>(0); PadV2<T>(input_data, input_dims, left_pa...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
282,897,233,054,751,300,000,000,000,000,000,000,000
8
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
static int mptsas_process_scsi_io_request(MPTSASState *s, MPIMsgSCSIIORequest *scsi_io, hwaddr addr) { MPTSASRequest *req; MPIMsgSCSIIOReply reply; SCSIDevice *sdev; int status; mptsas_fix_scsi_io_endianness(scsi_io...
0
[ "CWE-416" ]
qemu
3791642c8d60029adf9b00bcb4e34d7d8a1aea4d
106,032,803,446,939,900,000,000,000,000,000,000,000
90
mptsas: Remove unused MPTSASState 'pending' field (CVE-2021-3392) While processing SCSI i/o requests in mptsas_process_scsi_io_request(), the Megaraid emulator appends new MPTSASRequest object 'req' to the 's->pending' queue. In case of an error, this same object gets dequeued in mptsas_free_request() only if SCSIRequ...
static int MP4_ReadBox_stsh( stream_t *p_stream, MP4_Box_t *p_box ) { MP4_READBOX_ENTER( MP4_Box_data_stsh_t ); MP4_GETVERSIONFLAGS( p_box->data.p_stsh ); MP4_GET4BYTES( p_box->data.p_stsh->i_entry_count ); p_box->data.p_stsh->i_shadowed_sample_number = calloc( p_box->data.p_stsh->i_entry_co...
0
[ "CWE-120", "CWE-191", "CWE-787" ]
vlc
2e7c7091a61aa5d07e7997b393d821e91f593c39
114,121,654,557,088,650,000,000,000,000,000,000,000
35
demux: mp4: fix buffer overflow in parsing of string boxes. We ensure that pbox->i_size is never smaller than 8 to avoid an integer underflow in the third argument of the subsequent call to memcpy. We also make sure no truncation occurs when passing values derived from the 64 bit integer p_box->i_size to arguments of ...
MagickExport void GetBlobInfo(BlobInfo *blob_info) { assert(blob_info != (BlobInfo *) NULL); (void) memset(blob_info,0,sizeof(*blob_info)); blob_info->type=UndefinedStream; blob_info->quantum=(size_t) MagickMaxBlobExtent; blob_info->properties.st_mtime=GetMagickTime(); blob_info->properties.st_ctime=blob_in...
0
[ "CWE-416" ]
ImageMagick6
614a257295bdcdeda347086761062ac7658b6830
160,573,393,876,313,760,000,000,000,000,000,000,000
13
https://github.com/ImageMagick/ImageMagick6/issues/43
zfs_zaccess_unix(znode_t *zp, mode_t mode, cred_t *cr) { int v4_mode = zfs_unix_to_v4(mode >> 6); return (zfs_zaccess(zp, v4_mode, 0, B_FALSE, cr)); }
0
[ "CWE-200", "CWE-732" ]
zfs
716b53d0a14c72bda16c0872565dd1909757e73f
208,860,772,770,046,950,000,000,000,000,000,000,000
6
FreeBSD: Fix UNIX permissions checking Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10727
http_read_line (int print_fd, int sok, char *buf, int len) { len = waitline (sok, buf, len, TRUE); if (len >= 1) { /* print the message out (send it to the parent process) */ write (print_fd, "0\n", 2); if (buf[len-1] == '\r') { buf[len-1] = '\n'; write (print_fd, buf, len); } else { write (pri...
0
[ "CWE-310" ]
hexchat
c9b63f7f9be01692b03fa15275135a4910a7e02d
115,294,216,053,955,500,000,000,000,000,000,000,000
21
ssl: Validate hostnames Closes #524
ArgParser::argCoalesceContents() { o.coalesce_contents = true; }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
97,591,814,059,610,470,000,000,000,000,000,000,000
4
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
njs_value_bool(const njs_value_t *value) { return njs_bool(value); }
0
[]
njs
6549d49630ce5f5ac823fd3ae0c6c8558b8716ae
100,480,397,087,468,800,000,000,000,000,000,000,000
4
Fixed redefinition of special props in Object.defineProperty(). Previously, when NJS_PROPERTY_HANDLER property was updated it might be left in inconsistent state. Namely, prop->type was left unchanged, but prop->value did not have an expected property handler. As a result consecutive reference to the property may re...
_c_public_ int c_shquote_parse_argv(char ***argvp, size_t *argcp, const char *input, size_t n_input) { _c_cleanup_(c_shquote_freep) char **argv = NULL, *buffer = NULL; size_t i, n_in, n_out, argc ...
0
[ "CWE-787" ]
c-shquote
7fd15f8e272136955f7ffc37df29fbca9ddceca1
234,006,914,800,908,700,000,000,000,000,000,000,000
79
strnspn: fix buffer overflow Fix the strnspn and strncspn functions to use a properly sized buffer. It used to be 1 byte too short. Checking for `0xff` in a string will thus write `0xff` once byte beyond the stack space of the local buffer. Note that the public API does not allow to pass `0xff` to those functions. Th...
static int replmd_ldb_message_element_attid_sort(const struct ldb_message_element *e1, const struct ldb_message_element *e2, const struct dsdb_schema *schema) { const struct dsdb_attribute *a1; const struct dsdb_attribute *a2; /* * TODO: make this faster by caching the dsdb_attribute pointer * ...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
165,286,380,525,999,130,000,000,000,000,000,000,000
27
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...
png_convert_from_time_t(png_timep ptime, time_t ttime) { struct tm *tbuf; png_debug(1, "in png_convert_from_time_t"); tbuf = gmtime(&ttime); png_convert_from_struct_tm(ptime, tbuf); }
0
[ "CWE-120" ]
libpng
81f44665cce4cb1373f049a76f3904e981b7a766
5,485,929,262,148,489,000,000,000,000,000,000,000
9
[libpng16] Reject attempt to write over-length PLTE chunk
guestfs___is_dir_nocase (guestfs_h *g, const char *path) { CLEANUP_FREE char *p = NULL; int r; p = guestfs___case_sensitive_path_silently (g, path); if (!p) return 0; r = guestfs_is_dir (g, p); return r > 0; }
0
[ "CWE-703" ]
libguestfs
fa6a76050d82894365dfe32916903ef7fee3ffcd
278,477,238,599,616,940,000,000,000,000,000,000,000
11
inspection: Fix double-free when certain guest files are empty. The following commit: commit 5a3da366268825b26b470cde35658b67c1d11cd4 Author: Richard W.M. Jones <rjones@redhat.com> Date: Thu Jan 24 17:07:38 2013 +0000 inspect: Use CLEANUP_* macros in inspection code. can cause a double-free along an e...
static PHP_MINFO_FUNCTION(session) /* {{{ */ { ps_module **mod; ps_serializer *ser; smart_str save_handlers = {0}; smart_str ser_handlers = {0}; int i; /* Get save handlers */ for (i = 0, mod = ps_modules; i < MAX_MODULES; i++, mod++) { if (*mod && (*mod)->s_name) { smart_str_appends(&save_handlers, (*mod)...
0
[ "CWE-476" ]
php-src
d76f7c6c636b8240e06a1fa29eebb98ad005008a
73,102,775,913,796,590,000,000,000,000,000,000,000
47
Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress
EIGEN_STRONG_INLINE QInt32 operator*(const QInt32 a, const double b) { return static_cast<int32_t>(lrint(static_cast<double>(a.value) * b)); }
0
[ "CWE-908", "CWE-787" ]
tensorflow
ace0c15a22f7f054abcc1f53eabbcb0a1239a9e2
71,369,958,567,073,790,000,000,000,000,000,000,000
3
Default initialize fixed point Eigen types. In certain cases, tensors are filled with default values of the type. But, for these fixed point types, these values were uninitialized. Thus, we would have uninitialized memory access bugs, some of which were caught by MSAN. PiperOrigin-RevId: 344101137 Change-Id: I14555fd...
int PE_(r_bin_pe_is_stripped_line_nums)(struct PE_(r_bin_pe_obj_t)* bin) { if (!bin || !bin->nt_headers) { return false; } return HASCHR (PE_IMAGE_FILE_LINE_NUMS_STRIPPED); }
0
[ "CWE-125" ]
radare2
4e1cf0d3e6f6fe2552a269def0af1cd2403e266c
84,301,081,739,315,190,000,000,000,000,000,000,000
6
Fix crash in pe
add_compile_string_length(UChar* s ARG_UNUSED, int mb_len, int str_len, regex_t* reg ARG_UNUSED, int ignore_case) { return 1; }
0
[ "CWE-476", "CWE-125" ]
oniguruma
c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c
141,138,239,544,383,250,000,000,000,000,000,000,000
5
Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode.
evbuffer_readline(struct evbuffer *buffer) { return evbuffer_readln(buffer, NULL, EVBUFFER_EOL_ANY); }
0
[ "CWE-189" ]
libevent
20d6d4458bee5d88bda1511c225c25b2d3198d6c
335,851,816,091,471,650,000,000,000,000,000,000,000
4
Fix CVE-2014-6272 in Libevent 2.0 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
gst_qtdemux_find_index_linear (GstQTDemux * qtdemux, QtDemuxStream * str, GstClockTime media_time) { guint32 index = 0; guint64 mov_time; QtDemuxSample *sample; /* convert media_time to mov format */ mov_time = gst_util_uint64_scale_ceil (media_time, str->timescale, GST_SECOND); sample = str->sa...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
143,782,226,936,146,510,000,000,000,000,000,000,000
40
qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451
static int proc_pid_auxv(struct task_struct *task, char *buffer) { int res = 0; struct mm_struct *mm = get_task_mm(task); if (mm) { unsigned int nwords = 0; do { nwords += 2; } while (mm->saved_auxv[nwords - 2] != 0); /* AT_NULL */ res = nwords * sizeof(mm->saved_auxv[0]); if (res > PAGE_SIZE) res = ...
0
[ "CWE-20", "CWE-362", "CWE-416" ]
linux
86acdca1b63e6890540fa19495cfc708beff3d8b
293,298,896,891,342,300,000,000,000,000,000,000,000
17
fix autofs/afs/etc. magic mountpoint breakage We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT) if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type is bogus here; we want LAST_BIND for everything of that kind and we get LAST_NORM left over from finding parent directory. So make...
static int mailbox_update_webdav(struct mailbox *mailbox, const struct index_record *new) { struct webdav_db *webdavdb = NULL; struct param *param; struct body *body = NULL; struct webdav_data *wdata = NULL; struct buf resource = BUF_INITIALIZER; int r = 0; ...
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
40,177,049,095,502,170,000,000,000,000,000,000,000
84
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
static int snd_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_pcm_runtime *runtime; int err = 0, usecs; unsigned int bits; snd_pcm_uframes_t frames; if (PCM_RUNTIME_CHECK(substream)) return -ENXIO; runtime = substream->runtime; mutex_lock(&runtime->bu...
0
[ "CWE-125" ]
linux
92ee3c60ec9fe64404dc035e7c41277d74aa26cb
207,208,020,938,572,820,000,000,000,000,000,000,000
132
ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Currently we have neither proper check nor protection against the concurrent calls of PCM hw_params and hw_free ioctls, which may result in a UAF. Since the existing PCM stream lock can't be used for protecting the whole ioctl operations, we need a new...
ebt_get_udc_positions(struct ebt_entry *e, struct ebt_table_info *newinfo, unsigned int *n, struct ebt_cl_stack *udc) { int i; /* we're only interested in chain starts */ if (e->bitmask) return 0; for (i = 0; i < NF_BR_NUMHOOKS; i++) { if (newinfo->hook_entry[i] == (struct ebt_entries *)e) break; } /* ...
0
[ "CWE-20" ]
linux
d846f71195d57b0bbb143382647c2c6638b04c5a
56,489,969,044,915,630,000,000,000,000,000,000,000
24
bridge: netfilter: fix information leak Struct tmp is copied from userspace. It is not checked whether the "name" field is NULL terminated. This may lead to buffer overflow and passing contents of kernel stack as a module name to try_then_request_module() and, consequently, to modprobe commandline. It would be seen...
Client::blockCaching() { if (const Acl::Tree *acl = Config.accessList.storeMiss) { // This relatively expensive check is not in StoreEntry::checkCachable: // That method lacks HttpRequest and may be called too many times. ACLFilledChecklist ch(acl, originalRequest(), NULL); ch.reply ...
0
[ "CWE-20" ]
squid
1e05a85bd28c22c9ca5d3ac9f5e86d6269ec0a8c
72,913,523,173,450,600,000,000,000,000,000,000,000
15
Handle more partial responses (#791)
static int jpeg2000_decode_packets(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile) { int ret = 0; int layno, reslevelno, compno, precno, ok_reslevel; int x, y; s->bit_index = 8; switch (tile->codsty[0].prog_order) { case JPEG2000_PGOD_RLCP: avpriv_request_sample(s->avctx, "Progression or...
0
[ "CWE-703" ]
FFmpeg
8001e9f7d17e90b4b0898ba64e3b8bbd716c513c
54,854,405,942,520,280,000,000,000,000,000,000,000
107
avcodec/jpeg2000dec: fix error detection in pix_fmt_match() Fixes out of array accesses with CODEC_FLAG_EMU_EDGE Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
bool kvm_make_all_cpus_request(struct kvm *kvm, unsigned int req) { return kvm_make_all_cpus_request_except(kvm, req, NULL); }
0
[ "CWE-401" ]
linux
f65886606c2d3b562716de030706dfe1bea4ed5e
42,797,410,802,659,820,000,000,000,000,000,000,000
4
KVM: fix memory leak in kvm_io_bus_unregister_dev() when kmalloc() fails in kvm_io_bus_unregister_dev(), before removing the bus, we should iterate over all other devices linked to it and call kvm_iodevice_destructor() for them Fixes: 90db10434b16 ("KVM: kvm_io_bus_unregister_dev() should never fail") Cc: stable@vger...
static int json_parse_string(struct json_parser *parser, bool allow_skip, const char **value_r) { int ret; if (*parser->data != '"') return -1; parser->data++; if (parser->skipping && allow_skip) { *value_r = NULL; return json_skip_string(parser); } str_truncate(parser->value, 0); for (; parser-...
0
[]
core
973769d74433de3c56c4ffdf4f343cb35d98e4f7
186,127,307,883,714,160,000,000,000,000,000,000,000
58
lib: json - Escape invalid UTF-8 as unicode bytes This prevents dovecot from crashing if invalid UTF-8 input is given.
Smb4KMountJob::~Smb4KMountJob() { while ( !m_shares.isEmpty() ) { delete m_shares.takeFirst(); } while ( !m_auth_errors.isEmpty() ) { delete m_auth_errors.takeFirst(); } while ( !m_retries.isEmpty() ) { delete m_retries.takeFirst(); } }
0
[ "CWE-20" ]
smb4k
71554140bdaede27b95dbe4c9b5a028a83c83cce
235,752,613,626,299,320,000,000,000,000,000,000,000
17
Find the mount/umount commands in the helper Instead of trusting what we get passed in CVE-2017-8849
Table_arena(MEM_ROOT *mem_root, enum enum_state state_arg) : Query_arena(mem_root, state_arg){}
1
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
129,251,843,291,775,570,000,000,000,000,000,000,000
2
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...
TEST(EqOp, MatchesNestedNull) { BSONObj operand = BSON("a.b" << BSONNULL); EqualityMatchExpression eq("a.b", operand["a.b"]); // null matches any empty object that is on a subpath of a.b ASSERT(eq.matchesBSON(BSONObj(), NULL)); ASSERT(eq.matchesBSON(BSON("a" << BSONObj()), NULL)); ASSERT(eq.matc...
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
300,602,477,384,809,100,000,000,000,000,000,000,000
18
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
static void compTest(tjhandle handle, unsigned char **dstBuf, unsigned long *dstSize, int w, int h, int pf, char *basename, int subsamp, int jpegQual, int flags) { char tempStr[1024]; unsigned char *srcBuf = NULL, *yuvBuf = NULL; const char *pfStr = pixFormatStr[pf]; co...
0
[ "CWE-787" ]
libjpeg-turbo
2a9e3bd7430cfda1bc812d139e0609c6aca0b884
305,344,362,306,827,400,000,000,000,000,000,000,000
56
TurboJPEG: Properly handle gigapixel images Prevent several integer overflow issues and subsequent segfaults that occurred when attempting to compress or decompress gigapixel images with the TurboJPEG API: - Modify tjBufSize(), tjBufSizeYUV2(), and tjPlaneSizeYUV() to avoid integer overflow when computing the retur...
static void f2fs_destroy_inode(struct inode *inode) { call_rcu(&inode->i_rcu, f2fs_i_callback); }
0
[ "CWE-284" ]
linux
b9dd46188edc2f0d1f37328637860bb65a771124
87,029,561,269,403,600,000,000,000,000,000,000,000
4
f2fs: sanity check segment count F2FS uses 4 bytes to represent block address. As a result, supported size of disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments. Signed-off-by: Jin Qian <jinqian@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Status insertRoleDocument(OperationContext* txn, const BSONObj& roleObj) { Status status = insertAuthzDocument(txn, AuthorizationManager::rolesCollectionNamespace, roleObj); if (status.isOK()) { return status; } if (status.code() == ErrorCodes::DuplicateKey) { std::string name = ...
0
[ "CWE-613" ]
mongo
64d8e9e1b12d16b54d6a592bae8110226c491b4e
9,807,676,577,063,222,000,000,000,000,000,000,000
17
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
void cgtimer_time(cgtimer_t *ts_start) { FILETIME ft; GetSystemTimeAsFileTime(&ft); ts_start->LowPart = ft.dwLowDateTime; ts_start->HighPart = ft.dwHighDateTime; }
0
[ "CWE-20", "CWE-703" ]
sgminer
910c36089940e81fb85c65b8e63dcd2fac71470c
126,978,763,811,107,970,000,000,000,000,000,000,000
8
stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime. Might have introduced a memory leak, don't have time to check. :( Should the other hex2bin()'s be checked? Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this.
static char* get_private_subtags(const char* loc_name) { char* result =NULL; int singletonPos = 0; int len =0; const char* mod_loc_name =NULL; if( loc_name && (len = strlen(loc_name)>0 ) ){ mod_loc_name = loc_name ; len = strlen(mod_loc_name); while( (singletonPos = getSingletonPos(mod_loc_name))!= ...
1
[ "CWE-125" ]
php-src
97eff7eb57fc2320c267a949cffd622c38712484
120,983,388,008,331,200,000,000,000,000,000,000,000
41
Fix bug #72241: get_icu_value_internal out-of-bounds read
static uint32_t dp8393x_rrp(dp8393xState *s) { return (s->regs[SONIC_URRA] << 16) | s->regs[SONIC_RRP]; }
0
[]
qemu
915976bd98a9286efe6f2e573cb4f1360603adf9
318,355,965,798,207,750,000,000,000,000,000,000,000
4
hw/net/dp8393x: fix integer underflow in dp8393x_do_transmit_packets() An integer underflow could occur during packet transmission due to 'tx_len' not being updated if SONIC_TFC register is set to zero. Check for negative 'tx_len' when removing existing FCS. RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1899722 S...
static int nl80211_start_p2p_device(struct sk_buff *skb, struct genl_info *info) { struct cfg80211_registered_device *rdev = info->user_ptr[0]; struct wireless_dev *wdev = info->user_ptr[1]; int err; if (!rdev->ops->start_p2p_device) return -EOPNOTSUPP; if (wdev->iftype != NL80211_IFTYPE_P2P_DEVICE) return -...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
11,810,486,051,965,456,000,000,000,000,000,000,000
27
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
ZEND_VM_HELPER(zend_bw_xor_helper, ANY, ANY, zval *op_1, zval *op_2) { USE_OPLINE SAVE_OPLINE(); if (UNEXPECTED(Z_TYPE_INFO_P(op_1) == IS_UNDEF)) { op_1 = ZVAL_UNDEFINED_OP1(); } if (UNEXPECTED(Z_TYPE_INFO_P(op_2) == IS_UNDEF)) { op_2 = ZVAL_UNDEFINED_OP2(); } bitwise_xor_function(EX_VAR(opline->result.var)...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
299,826,594,340,390,800,000,000,000,000,000,000,000
20
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
static u32 spi_gpio_spec_txrx_word_mode3(struct spi_device *spi, unsigned nsecs, u32 word, u8 bits, unsigned flags) { flags = spi->master->flags; return bitbang_txrx_be_cpha1(spi, nsecs, 1, flags, word, bits); }
0
[ "CWE-400", "CWE-401" ]
linux
d3b0ffa1d75d5305ebe34735598993afbb8a869d
236,849,342,571,299,200,000,000,000,000,000,000,000
6
spi: gpio: prevent memory leak in spi_gpio_probe In spi_gpio_probe an SPI master is allocated via spi_alloc_master, but this controller should be released if devm_add_action_or_reset fails, otherwise memory leaks. In order to avoid leak spi_contriller_put must be called in case of failure for devm_add_action_or_reset....
IntegrationStreamDecoderPtr HttpIntegrationTest::sendRequestAndWaitForResponse( const Http::TestRequestHeaderMapImpl& request_headers, uint32_t request_body_size, const Http::TestResponseHeaderMapImpl& response_headers, uint32_t response_size, int upstream_index, std::chrono::milliseconds time) { ASSERT(c...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
260,566,786,829,742,620,000,000,000,000,000,000,000
23
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...
int blosc_set_compressor(const char* compname) { int code = blosc_compname_to_compcode(compname); g_compressor = code; /* Check whether the library should be initialized */ if (!g_initlib) blosc_init(); return code; }
0
[ "CWE-787" ]
c-blosc2
c4c6470e88210afc95262c8b9fcc27e30ca043ee
192,182,115,078,905,830,000,000,000,000,000,000,000
10
Fixed asan heap buffer overflow when not enough space to write compressed block size.
xml_parse_file_flags(struct xar *xar, const char *name) { const char *flag = NULL; if (strcmp(name, "UserNoDump") == 0) { xar->xmlsts = FILE_FLAGS_USER_NODUMP; flag = "nodump"; } else if (strcmp(name, "UserImmutable") == 0) { xar->xmlsts = FILE_FLAGS_USER_IMMUTABLE; flag = "uimmutable"; } else if (strcmp...
0
[ "CWE-125" ]
libarchive
fa7438a0ff4033e4741c807394a9af6207940d71
99,443,507,021,006,640,000,000,000,000,000,000,000
53
Do something sensible for empty strings to make fuzzers happy.
usm_secmod_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms) { if (!parms) return SNMPERR_GENERR; return usm_rgenerate_out_msg(parms->msgProcModel, parms->globalData, parms->globalDataLen, parms->maxMsgSize, parms->secModel, ...
0
[ "CWE-415" ]
net-snmp
5f881d3bf24599b90d67a45cae7a3eb099cd71c9
7,723,974,418,591,690,000,000,000,000,000,000,000
16
libsnmp, USM: Introduce a reference count in struct usmStateReference This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/.
static void l2cap_start_connection(struct l2cap_chan *chan) { if (__amp_capable(chan)) { BT_DBG("chan %p AMP capable: discover AMPs", chan); a2mp_discover_amp(chan); } else if (chan->conn->hcon->type == LE_LINK) { l2cap_le_start(chan); } else { l2cap_send_conn_req(chan); } }
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
45,511,560,735,199,130,000,000,000,000,000,000,000
11
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
struct nft_flow_rule *nft_flow_rule_create(struct net *net, const struct nft_rule *rule) { struct nft_offload_ctx *ctx; struct nft_flow_rule *flow; int num_actions = 0, err; struct nft_expr *expr; expr = nft_expr_first(rule); while (nft_expr_more(rule, expr)) { if (expr->ops->offload_flags & NFT_OFFLOA...
1
[ "CWE-269" ]
nf
b1a5983f56e371046dcf164f90bfaf704d2b89f6
285,772,030,524,236,200,000,000,000,000,000,000,000
56
netfilter: nf_tables_offload: incorrect flow offload action array size immediate verdict expression needs to allocate one slot in the flow offload action array, however, immediate data expression does not need to do so. fwd and dup expression need to allocate one slot, this is missing. Add a new offload_action inter...
TEST(EqOp, ElemMatchKeyWithImplicitAndExplicitTraversal) { BSONObj operand = BSON("a.0.b" << 3); BSONElement operandFirstElt = operand.firstElement(); EqualityMatchExpression eq; ASSERT(eq.init(operandFirstElt.fieldName(), operandFirstElt).isOK()); MatchDetails details; details.requestElemMatchK...
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
213,378,378,035,186,070,000,000,000,000,000,000,000
12
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
static struct gfs2_rgrpd *rgblk_free(struct gfs2_sbd *sdp, u64 bstart, u32 blen, unsigned char new_state) { struct gfs2_rbm rbm; struct gfs2_bitmap *bi, *bi_prev = NULL; rbm.rgd = gfs2_blk2rgrpd(sdp, bstart, 1); if (!rbm.rgd) { if (gfs2_consist(sdp)) fs_err(sdp, "block = %llu\n", (unsigned long long)...
0
[ "CWE-416" ]
linux
36e4ad0316c017d5b271378ed9a1c9a4b77fab5f
201,560,027,840,998,070,000,000,000,000,000,000,000
33
GFS2: don't set rgrp gl_object until it's inserted into rgrp tree Before this patch, function read_rindex_entry would set a rgrp glock's gl_object pointer to itself before inserting the rgrp into the rgrp rbtree. The problem is: if another process was also reading the rgrp in, and had already inserted its newly create...
static int snd_pcm_hw_rule_rate(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule) { struct snd_pcm_hardware *hw = rule->private; return snd_interval_list(hw_param_interval(params, rule->var), snd_pcm_known_rates.count, snd_pcm_known_rates.list, hw->rates); }
0
[ "CWE-125" ]
linux
92ee3c60ec9fe64404dc035e7c41277d74aa26cb
160,773,374,868,431,750,000,000,000,000,000,000,000
8
ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Currently we have neither proper check nor protection against the concurrent calls of PCM hw_params and hw_free ioctls, which may result in a UAF. Since the existing PCM stream lock can't be used for protecting the whole ioctl operations, we need a new...
void decoder_context::reset() { if (num_worker_threads>0) { //flush_thread_pool(&ctx->thread_pool); ::stop_thread_pool(&thread_pool_); } // -------------------------------------------------- #if 0 ctx->end_of_stream = false; ctx->pending_input_NAL = NULL; ctx->current_vps = NULL; ctx->current_sp...
0
[ "CWE-416" ]
libde265
f538254e4658ef5ea4e233c2185dcbfd165e8911
171,108,124,577,987,270,000,000,000,000,000,000,000
69
fix streams where SPS image size changes without refreshing PPS (#299)
parse_inline(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t size) { size_t i = 0, end = 0; uint8_t action = 0; struct buf work = { 0, 0, 0, 0 }; if (rndr->work_bufs[BUFFER_SPAN].size + rndr->work_bufs[BUFFER_BLOCK].size > rndr->max_nesting) return; while (i < size) { /* copying inactive ch...
1
[]
redcarpet
e5a10516d07114d582d13b9125b733008c61c242
314,279,994,217,076,850,000,000,000,000,000,000,000
36
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...
struct xt_table_info *xt_alloc_table_info(unsigned int size) { struct xt_table_info *info = NULL; size_t sz = sizeof(*info) + size; if (sz < sizeof(*info)) return NULL; /* Pedantry: prevent them from hitting BUG() in vmalloc.c --RR */ if ((SMP_ALIGN(size) >> PAGE_SHIFT) + 2 > totalram_pages) return NULL; i...
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
118,036,033,817,810,340,000,000,000,000,000,000,000
23
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static int ZEND_FASTCALL ZEND_SR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; shift_right_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); zval_dtor(free_op...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
229,714,310,283,801,350,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
conv_encoding(OnigEncoding from, OnigEncoding to, const UChar* s, const UChar* end, UChar** conv, UChar** conv_end) { int len = (int )(end - s); if (to == ONIG_ENCODING_UTF16_BE) { if (from == ONIG_ENCODING_ASCII || from == ONIG_ENCODING_ISO_8859_1) { *conv = (UChar* )xmalloc(len * 2); ...
0
[ "CWE-416", "CWE-200" ]
oniguruma
0f7f61ed1b7b697e283e37bd2d731d0bd57adb55
5,377,007,915,658,007,000,000,000,000,000,000,000
66
Fix CVE-2019-13224: don't allow different encodings for onig_new_deluxe()
ebt_check_entry_size_and_hooks(const struct ebt_entry *e, const struct ebt_table_info *newinfo, unsigned int *n, unsigned int *cnt, unsigned int *totalcnt, unsigned int *udc_cnt) { int i; for (i = 0; i < NF_BR_NUMHOOKS; i++) { if ((void *)e == (void *)newinfo->hook_entry[i]) break;...
0
[ "CWE-787" ]
linux
b71812168571fa55e44cdd0254471331b9c4c4c6
177,901,212,635,120,660,000,000,000,000,000,000,000
58
netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets We need to make sure the offsets are not out of range of the total size. Also check that they are in ascending order. The WARN_ON triggered by syzkaller (it sets panic_on_warn) is changed to also bail out, no point in continuing parsing. Briefly tested...
Logger::Logger() : lock(QReadWriteLock::Recursive) , msgCounter(0) , peerCounter(0) { }
0
[ "CWE-20", "CWE-79" ]
qBittorrent
6ca3e4f094da0a0017cb2d483ec1db6176bb0b16
323,720,618,686,198,400,000,000,000,000,000,000,000
6
Add Utils::String::toHtmlEscaped
ep_write_iter(struct kiocb *iocb, struct iov_iter *from) { struct file *file = iocb->ki_filp; struct ep_data *epdata = file->private_data; size_t len = iov_iter_count(from); bool configured; ssize_t value; char *buf; if ((value = get_ready_ep(file->f_flags, epdata, true)) < 0) return value; configured = epd...
0
[ "CWE-763" ]
linux
501e38a5531efbd77d5c73c0ba838a889bfc1d74
11,303,172,566,724,950,000,000,000,000,000,000,000
59
usb: gadget: clear related members when goto fail dev->config and dev->hs_config and dev->dev need to be cleaned if dev_config fails to avoid UAF. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Link: https://lore.kernel.org/r/20211231172138.7993-3-hbh25y@gmail.com Signed...
autoar_extractor_do_sanitize_pathname (AutoarExtractor *self, const char *pathname_bytes) { GFile *extracted_filename; gboolean valid_filename; g_autofree char *sanitized_pathname; g_autofree char *utf8_pathname; utf8_pathname = autoar_common_get_utf8_pathname (pat...
1
[ "CWE-22" ]
gnome-autoar
adb067e645732fdbe7103516e506d09eb6a54429
162,850,196,304,898,710,000,000,000,000,000,000,000
47
AutoarExtractor: Do not extract files outside the destination dir Currently, a malicious archive can cause that the files are extracted outside of the destination dir. This can happen if the archive contains a file whose parent is a symbolic link, which points outside of the destination dir. This is potentially a secu...
MagickExport MagickBooleanType SetImageInfo(ImageInfo *image_info, const unsigned int frames,ExceptionInfo *exception) { char component[MagickPathExtent], magic[MagickPathExtent], *q; const MagicInfo *magic_info; const MagickInfo *magick_info; ExceptionInfo *sans_exception; Image...
0
[ "CWE-119", "CWE-787" ]
ImageMagick
aecd0ada163a4d6c769cec178955d5f3e9316f2f
325,298,395,797,077,600,000,000,000,000,000,000,000
323
Set pixel cache to undefined if any resource limit is exceeded
istr_equal (gconstpointer v, gconstpointer v2) { return g_ascii_strcasecmp (v, v2) == 0; }
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
247,757,154,138,075,160,000,000,000,000,000,000,000
5
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
size_t HTTPSession::sendEOM(HTTPTransaction* txn, const HTTPHeaders* trailers) noexcept { VLOG(4) << *this << " sending EOM for streamID=" << txn->getID() << " trailers=" << (trailers ? "yes" : "no"); size_t encodedSize = 0; if (trailers) { encodedSize = codec_->generat...
0
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
133,474,911,187,686,200,000,000,000,000,000,000,000
21
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
bool operator <(const SilenceEntry& other) const { if (flags & SF_EXEMPT && other.flags & ~SF_EXEMPT) return true; if (other.flags & SF_EXEMPT && flags & ~SF_EXEMPT) return false; if (flags < other.flags) return true; if (other.flags < flags) return false; return mask < other.mask; }
0
[ "CWE-416" ]
inspircd
7b47de3c194f239c5fea09a0e49696c9af017d51
205,059,309,630,528,300,000,000,000,000,000,000,000
12
Copy the silence flags when sending update notifications. This fixes a crash bug in the silence module on some versions of GCC.
jpc_pi_t *jpc_dec_pi_create(jpc_dec_t *dec, jpc_dec_tile_t *tile) { jpc_pi_t *pi; int compno; jpc_picomp_t *picomp; jpc_pirlvl_t *pirlvl; jpc_dec_tcomp_t *tcomp; int rlvlno; jpc_dec_rlvl_t *rlvl; int prcno; int *prclyrno; jpc_dec_cmpt_t *cmpt; if (!(pi = jpc_pi_create0())) { return 0; } pi->numcomps = d...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
12,943,042,045,660,682,000,000,000,000,000,000,000
102
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
static void SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s) { if ((s->next != NULL) && (s->prev != NULL)) SSL_SESSION_list_remove(ctx, s); if (ctx->session_cache_head == NULL) { ctx->session_cache_head = s; ctx->session_cache_tail = s; s->prev = (SSL_SESSION *)&(ctx->session_...
0
[ "CWE-362" ]
openssl
939b4960276b040fc0ed52232238fcc9e2e9ec21
238,368,228,954,152,240,000,000,000,000,000,000,000
17
Fix race condition in NewSessionTicket If a NewSessionTicket is received by a multi-threaded client when attempting to reuse a previous ticket then a race condition can occur potentially leading to a double free of the ticket data. CVE-2015-1791 This also fixes RT#3808 where a session ID is changed for a session alr...
TfLiteStatus EvalFloat(const TfLiteTensor* input, const TfLiteTensor* bw_input, const TfLiteTensor* fw_input_weights, const TfLiteTensor* fw_recurrent_weights, const TfLiteTensor* fw_bias, const TfLiteTensor* bw_input_weights, ...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
22,540,228,867,736,260,000,000,000,000,000,000,000
141
[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...
void do_write() { //auto self = this->shared_from_this(); is_writing = true; asio::async_write( adaptor_.socket(), buffers_, [&](const asio::error_code& ec, std::size_t /*bytes_transferred*/) { is_writing = false; ...
0
[ "CWE-416" ]
Crow
fba01dc76d6ea940ad7c8392e8f39f9647241d8e
140,449,579,193,995,640,000,000,000,000,000,000,000
28
Prevent HTTP pipelining which Crow doesn't support.
lyext_load_plugin(void *dlhandler, const char *file_name) { struct lyext_plugin_list *plugin; char *str; int *version; #ifdef STATIC return 0; #endif /* STATIC */ /* get the plugin data */ plugin = dlsym(dlhandler, file_name); str = dlerror(); if (str) { LOGERR(NULL, LY_ESYS, "...
0
[ "CWE-252" ]
libyang
59a0bff1a5a2f0a0eac07e4bf94d4aea9dd3708d
135,665,505,494,127,960,000,000,000,000,000,000,000
25
plugins BUGFIX handle empty revision correctly Fixes #1451
QPDFWriter::setR5EncryptionParameters( char const* user_password, char const* owner_password, bool allow_accessibility, bool allow_extract, bool allow_assemble, bool allow_annotate_and_form, bool allow_form_filling, bool allow_modify_other, qpdf_r3_print_e print, bool encrypt_metadata) { std...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
256,167,737,724,136,040,000,000,000,000,000,000,000
19
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
hstore_gt(PG_FUNCTION_ARGS) { int res = DatumGetInt32(DirectFunctionCall2(hstore_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); PG_RETURN_BOOL(res > 0); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
124,875,437,748,811,300,000,000,000,000,000,000,000
8
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...
const string name() override { return "get_usage"; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
206,694,484,611,606,740,000,000,000,000,000,000,000
1
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
static inline void __atalk_insert_socket(struct sock *sk) { sk_add_node(sk, &atalk_sockets); }
0
[]
history
7ab442d7e0a76402c12553ee256f756097cae2d2
174,684,491,810,107,000,000,000,000,000,000,000,000
4
[DDP]: Convert to new protocol interface. Convert ddp to the new protocol interface which means it has to handle fragmented skb's. The only big change is in the checksum routine which has to do more work (like skb_checksum). Minor speedup is folding the carry to avoid a branch. Tested against a 2.4 system and by ru...
int ssl3_do_compress(SSL *ssl) { #ifndef OPENSSL_NO_COMP int i; SSL3_RECORD *wr; wr = &(ssl->s3->wrec); i = COMP_compress_block(ssl->compress, wr->data, SSL3_RT_MAX_COMPRESSED_LENGTH, wr->input, (int)wr->length); if (i < 0) return (0);...
0
[ "CWE-17" ]
openssl
77c77f0a1b9f15b869ca3342186dfbedd1119d0e
164,643,827,784,792,180,000,000,000,000,000,000,000
19
Multiblock corrupted pointer fix OpenSSL 1.0.2 introduced the "multiblock" performance improvement. This feature only applies on 64 bit x86 architecture platforms that support AES NI instructions. A defect in the implementation of "multiblock" can cause OpenSSL's internal write buffer to become incorrectly set to NULL...
nm_utils_log_connection_diff(NMConnection *connection, NMConnection *diff_base, guint32 level, guint64 domain, const char * name, const char * prefix, ...
0
[ "CWE-20" ]
NetworkManager
420784e342da4883f6debdfe10cde68507b10d27
172,209,797,192,295,160,000,000,000,000,000,000,000
230
core: fix crash in nm_wildcard_match_check() It's not entirely clear how to treat %NULL. Clearly "match.interface-name=eth0" should not match with an interface %NULL. But what about "match.interface-name=!eth0"? It's now implemented that negative matches still succeed against %NULL. What about "match.interface-name=*"...
static int mailbox_cacherecord_internal(struct mailbox *mailbox, const struct index_record *record, enum mbcache_rewrite_t rewrite) { struct mappedfile *cachefile; bit32 crc = 0; int r = IMAP_IOERROR; /* we do something nas...
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
259,333,702,421,690,370,000,000,000,000,000,000,000
91
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
rdp_reset_state(void) { g_next_packet = NULL; /* reset the packet information */ g_rdp_shareid = 0; sec_reset_state(); }
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
25,593,602,782,630,875,000,000,000,000,000,000,000
6
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
static int ext4_register_li_request(struct super_block *sb, ext4_group_t first_not_zeroed) { struct ext4_sb_info *sbi = EXT4_SB(sb); struct ext4_li_request *elr; ext4_group_t ngroups = EXT4_SB(sb)->s_groups_count; int ret = 0; if (sbi->s_li_request != NULL) return 0; if (first_not_zeroed == ngroups ||...
0
[ "CWE-703" ]
linux
0449641130f5652b344ef6fa39fa019d7e94660a
174,046,533,814,015,430,000,000,000,000,000,000,000
58
ext4: init timer earlier to avoid a kernel panic in __save_error_info During mount, when we fail to open journal inode or root inode, the __save_error_info will mod_timer. But actually s_err_report isn't initialized yet and the kernel oops. The detailed information can be found https://bugzilla.kernel.org/show_bug.cgi...
xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) { if ((buf == NULL) || (table == NULL)) return; xmlHashScan(table, xmlDumpNotationDeclScan, buf); }
0
[ "CWE-416" ]
libxml2
652dd12a858989b14eed4e84e453059cd3ba340e
113,231,103,801,308,620,000,000,000,000,000,000,000
5
[CVE-2022-23308] Use-after-free of ID and IDREF attributes If a document is parsed with XML_PARSE_DTDVALID and without XML_PARSE_NOENT, the value of ID attributes has to be normalized after potentially expanding entities in xmlRemoveID. Otherwise, later calls to xmlGetID can return a pointer to previously freed memory...
explicit LogSoftmaxStage(const GraphOptimizerContext& ctx, const ArithmeticOptimizerContext& ctx_ext) : ArithmeticOptimizerStage("LogSoftmaxStage", ctx, ctx_ext) {}
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
255,571,179,259,445,740,000,000,000,000,000,000,000
3
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
MagickExport MemoryInfo *AcquireVirtualMemory(const size_t count, const size_t quantum) { MemoryInfo *memory_info; size_t extent; if (CheckMemoryOverflow(count,quantum) != MagickFalse) return((MemoryInfo *) NULL); memory_info=(MemoryInfo *) MagickAssumeAligned(AcquireAlignedMemory(1, sizeof(...
0
[ "CWE-125" ]
ImageMagick
2174484dfa68a594e2f9ad17f46217b6120db18d
3,354,225,394,136,358,600,000,000,000,000,000,000
85
https://github.com/ImageMagick/ImageMagick/issues/82 https://github.com/ImageMagick/ImageMagick/issues/81 https://github.com/ImageMagick/ImageMagick/issues/80 https://github.com/ImageMagick/ImageMagick/issues/77
void __init skb_init(void) { skbuff_head_cache = kmem_cache_create("skbuff_head_cache", sizeof(struct sk_buff), 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); skbuff_fclone_cache = kmem_cache_create("skbuff_fclone_cache", (2*sizeof(struct sk_buff)) + sizeof(atomic_t),...
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
217,059,796,036,639,250,000,000,000,000,000,000,000
14
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
static uint16_t nvme_identify_ctrl_list(NvmeCtrl *n, NvmeRequest *req, bool attached) { NvmeIdentify *c = (NvmeIdentify *)&req->cmd; uint32_t nsid = le32_to_cpu(c->nsid); uint16_t min_id = le16_to_cpu(c->ctrlid); uint16_t list[NVME_CONTROLLER_LIST_SIZE] = {}; ...
0
[]
qemu
736b01642d85be832385063f278fe7cd4ffb5221
172,727,128,416,339,850,000,000,000,000,000,000,000
46
hw/nvme: fix CVE-2021-3929 This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the device itself. This still allows DMA to MMIO regions of other devices (e.g. doing P2P DMA to the controller memory buffer of another NVMe device). Fixes: CVE-2021-3929 Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com> Review...
int ext4_dirent_csum_verify(struct inode *inode, struct ext4_dir_entry *dirent) { struct ext4_dir_entry_tail *t; if (!EXT4_HAS_RO_COMPAT_FEATURE(inode->i_sb, EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)) return 1; t = get_dirent_tail(inode, dirent); if (!t) { warn_no_space_for_csum(inode); return 0; } if (...
0
[ "CWE-399" ]
linux
0e9a9a1ad619e7e987815d20262d36a2f95717ca
52,739,597,552,217,080,000,000,000,000,000,000,000
20
ext4: avoid hang when mounting non-journal filesystems with orphan list When trying to mount a file system which does not contain a journal, but which does have a orphan list containing an inode which needs to be truncated, the mount call with hang forever in ext4_orphan_cleanup() because ext4_orphan_del() will return...
s_push(stack *s, dfa *d, node *parent) { stackentry *top; if (s->s_top == s->s_base) { fprintf(stderr, "s_push: parser stack overflow\n"); return E_NOMEM; } top = --s->s_top; top->s_dfa = d; top->s_parent = parent; top->s_state = 0; return 0; }
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
256,655,841,783,306,300,000,000,000,000,000,000,000
13
bpo-35766: Merge typed_ast back into CPython (GH-11645)
TRIO_PRIVATE int TrioGetPosition TRIO_ARGS2((format, offsetPointer), TRIO_CONST char* format, int* offsetPointer) { #if TRIO_FEATURE_POSITIONAL char* tmpformat; int number = 0; int offset = *offsetPointer; number = (int)trio_to_long(&format[offset], &tmpformat, BASE_DECI...
0
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
117,230,815,497,969,190,000,000,000,000,000,000,000
22
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.