func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
ImagingNew(const char* mode, int xsize, int ysize) { int bytes; Imaging im; if (strlen(mode) == 1) { if (mode[0] == 'F' || mode[0] == 'I') bytes = 4; else bytes = 1; } else bytes = strlen(mode); /* close enough */ if (xsize < 0 || ysize < 0) { ...
0
[ "CWE-284" ]
Pillow
5d8a0be45aad78c5a22c8d099118ee26ef8144af
321,528,884,837,824,760,000,000,000,000,000,000,000
27
Memory error in Storage.c when accepting negative image size arguments
explicit RemoveLogicalNotStage(const GraphOptimizerContext& ctx, const ArithmeticOptimizerContext& ctx_ext) : ArithmeticOptimizerStage("RemoveLogicalNot", ctx, ctx_ext) {}
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
119,014,680,495,184,350,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...
void btrfs_orphan_commit_root(struct btrfs_trans_handle *trans, struct btrfs_root *root) { struct btrfs_block_rsv *block_rsv; int ret; if (atomic_read(&root->orphan_inodes) || root->orphan_cleanup_state != ORPHAN_CLEANUP_DONE) return; spin_lock(&root->orphan_lock); if (atomic_read(&root->orphan_i...
0
[ "CWE-200" ]
linux
0305cd5f7fca85dae392b9ba85b116896eb7c1c7
160,990,231,494,493,990,000,000,000,000,000,000,000
41
Btrfs: fix truncation of compressed and inlined extents When truncating a file to a smaller size which consists of an inline extent that is compressed, we did not discard (or made unusable) the data between the new file size and the old file size, wasting metadata space and allowing for the truncated data to be leaked...
jbig2_image_set_pixel(Jbig2Image *image, int x, int y, bool value) { const int w = image->width; const int h = image->height; int scratch, mask; int bit, byte; if ((x < 0) || (x >= w)) return; if ((y < 0) || (y >= h)) return; byte = (x >> 3) + y * image->stride; bit = 7...
0
[ "CWE-787" ]
jbig2dec
0726320a4b55078e9d8deb590e477d598b3da66e
88,686,577,626,770,120,000,000,000,000,000,000,000
19
Fix OSS-Fuzz issue 20332: buffer overflow in jbig2_image_compose. With extreme values of x/y/w/h we can get overflow. Test for this and exit safely. Thanks for OSS-Fuzz for reporting.
static int ax88179_convert_old_led(struct usbnet *dev, u16 *ledvalue) { u16 led; /* Loaded the old eFuse LED Mode */ if (ax88179_read_cmd(dev, AX_ACCESS_EEPROM, 0x3C, 1, 2, &led) < 0) return -EINVAL; led >>= 8; switch (led) { case 0xFF: led = LED0_ACTIVE | LED1_LINK_10 | LED1_LINK_100 | LED1_LINK_10...
0
[ "CWE-787" ]
linux
57bc3d3ae8c14df3ceb4e17d26ddf9eeab304581
316,785,854,801,211,100,000,000,000,000,000,000,000
37
net: usb: ax88179_178a: Fix out-of-bounds accesses in RX fixup ax88179_rx_fixup() contains several out-of-bounds accesses that can be triggered by a malicious (or defective) USB device, in particular: - The metadata array (hdr_off..hdr_off+2*pkt_cnt) can be out of bounds, causing OOB reads and (on big-endian syst...
int StreamBase::GetFD() { return -1; }
0
[ "CWE-416" ]
node
4f8772f9b731118628256189b73cd202149bbd97
194,654,497,089,608,660,000,000,000,000,000,000,000
3
src: retain pointers to WriteWrap/ShutdownWrap Avoids potential use-after-free when wrap req's are synchronously destroyed. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 Refs: https://hackerone.com/bugs?subject=nodejs&report_id=988103 PR-URL: https://github.com/nodejs-private/...
static int iasecc_check_update_pin(struct sc_pin_cmd_data *data, struct sc_pin_cmd_pin *pin) { if ((!pin->data && pin->len) || (pin->data && !pin->len)) return SC_ERROR_INVALID_ARGUMENTS; if (pin->data) data->flags &= ~SC_PIN_CMD_USE_PINPAD; else data->flags |= SC_PIN_CMD_USE_PINPAD; return SC_SUCCESS; }
0
[]
OpenSC
ae1cf0be90396fb6c0be95829bf0d3eecbd2fd1c
302,391,050,664,318,870,000,000,000,000,000,000,000
12
iasecc: Prevent stack buffer overflow when empty ACL is returned Thanks oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30800
cmd_var_resolve(struct http *hp, char *spec) { char **hh, *hdr; if (!strcmp(spec, "req.request")) return(hp->req[0]); if (!strcmp(spec, "req.url")) return(hp->req[1]); if (!strcmp(spec, "req.proto")) return(hp->req[2]); if (!strcmp(spec, "resp.proto")) return(hp->resp[0]); if (!strcmp(spec, "resp.status"...
0
[ "CWE-269" ]
Varnish-Cache
85e8468bec9416bd7e16b0d80cb820ecd2b330c3
263,682,747,022,143,600,000,000,000,000,000,000,000
35
Do not consider a CR by itself as a valid line terminator Varnish (prior to version 4.0) was not following the standard with regard to line separator. Spotted and analyzed by: Régis Leroy [regilero] regis.leroy@makina-corpus.com
xmlDumpNotationDeclScan(void *nota, void *buf, const xmlChar *name ATTRIBUTE_UNUSED) { xmlDumpNotationDecl((xmlBufferPtr) buf, (xmlNotationPtr) nota); }
0
[ "CWE-416" ]
libxml2
652dd12a858989b14eed4e84e453059cd3ba340e
119,105,634,256,706,970,000,000,000,000,000,000,000
4
[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...
TEST_F(HeaderUtilityTest, RemovePortsFromHost) { const std::vector<std::pair<std::string, std::string>> host_headers{ {"localhost", "localhost"}, // w/o port part {"localhost:443", "localhost"}, // name w/ port {"", ""}, // empty {":443", ""}, ...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
181,047,503,787,303,700,000,000,000,000,000,000,000
24
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
wait_for_no_updates(MYSQL *connection, uint timeout, uint threshold) { time_t start_time; start_time = time(NULL); msg_ts("Waiting %u seconds for queries running longer than %u seconds " "to finish\n", timeout, threshold); while (time(NULL) <= (time_t)(start_time + timeout)) { if (!have_queries_to_wait...
0
[ "CWE-200" ]
percona-xtrabackup
7742f875bb289a874246fb4653b7cd9f14b588fe
192,810,433,031,430,700,000,000,000,000,000,000,000
20
PXB-2722 password is written into xtrabackup_info https://jira.percona.com/browse/PXB-2722 Analysis: password passed with -p option is written into backup tool_command in xtrabackup_info Fix: mask password before writting into xtrabackup_info
static int php_cli_server_request_shutdown(php_cli_server *server, php_cli_server_client *client TSRMLS_DC) { /* {{{ */ php_request_shutdown(0); php_cli_server_close_connection(server, client TSRMLS_CC); destroy_request_info(&SG(request_info)); SG(server_context) = NULL; SG(rfc1867_uploaded_files) = NULL; return ...
0
[]
php-src
2438490addfbfba51e12246a74588b2382caa08a
140,344,488,211,733,790,000,000,000,000,000,000,000
8
slim post data
static void hex_dump(const unsigned char *buf, size_t len) { size_t i; for (i = 0; i < len; i++) { if (i && !(i % 16)) printk("\n"); printk("%02x ", *(buf + i)); } printk("\n"); }
0
[ "CWE-119" ]
linux-2.6
ddb2c43594f22843e9f3153da151deaba1a834c5
183,608,860,044,482,230,000,000,000,000,000,000,000
11
asn1: additional sanity checking during BER decoding - Don't trust a length which is greater than the working buffer. An invalid length could cause overflow when calculating buffer size for decoding oid. - An oid length of zero is invalid and allows for an off-by-one error when decoding oid because the first su...
vmxnet3_pop_next_tx_descr(VMXNET3State *s, int qidx, struct Vmxnet3_TxDesc *txd, uint32_t *descr_idx) { Vmxnet3Ring *ring = &s->txq_descr[qidx].tx_ring; vmxnet3_ring_read_curr_cell(ring, txd); if (txd->gen == vmxnet3_ring_curr_ge...
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
112,377,582,087,454,200,000,000,000,000,000,000,000
21
net/vmxnet3: Refine l2 header validation Validation of l2 header length assumed minimal packet size as eth_header + 2 * vlan_header regardless of the actual protocol. This caused crash for valid non-IP packets shorter than 22 bytes, as 'tx_pkt->packet_type' hasn't been assigned for such packets, and 'vmxnet3_on_tx_do...
void ConnectionImpl::onHeaderField(const char* data, size_t length) { if (header_parsing_state_ == HeaderParsingState::Done) { // Ignore trailers. return; } if (header_parsing_state_ == HeaderParsingState::Value) { completeLastHeader(); } current_header_field_.append(data, length); }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
11,959,779,269,642,700,000,000,000,000,000,000,000
12
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static int __init inotify_user_setup(void) { BUILD_BUG_ON(IN_ACCESS != FS_ACCESS); BUILD_BUG_ON(IN_MODIFY != FS_MODIFY); BUILD_BUG_ON(IN_ATTRIB != FS_ATTRIB); BUILD_BUG_ON(IN_CLOSE_WRITE != FS_CLOSE_WRITE); BUILD_BUG_ON(IN_CLOSE_NOWRITE != FS_CLOSE_NOWRITE); BUILD_BUG_ON(IN_OPEN != FS_OPEN); BUILD_BUG_ON(IN_MOVE...
0
[ "CWE-399" ]
linux
d0de4dc584ec6aa3b26fffea320a8457827768fc
236,244,629,745,135,840,000,000,000,000,000,000,000
32
inotify: fix double free/corruption of stuct user On an error path in inotify_init1 a normal user can trigger a double free of struct user. This is a regression introduced by a2ae4cc9a16e ("inotify: stop kernel memory leak on file creation failure"). We fix this by making sure that if a group exists the user referen...
AcpiNsEvaluate ( ACPI_EVALUATE_INFO *Info) { ACPI_STATUS Status; ACPI_FUNCTION_TRACE (NsEvaluate); if (!Info) { return_ACPI_STATUS (AE_BAD_PARAMETER); } if (!Info->Node) { /* * Get the actual namespace node for the target object if we ...
1
[ "CWE-200" ]
acpica
37f2c716f2c6ab14c3ba557a539c3ee3224931b5
121,995,416,092,464,770,000,000,000,000,000,000,000
247
acpi: acpica: fix acpi operand cache leak in nseval.c I found an ACPI cache leak in ACPI early termination and boot continuing case. When early termination occurs due to malicious ACPI table, Linux kernel terminates ACPI function and continues to boot process. While kernel terminates ACPI function, kmem_cache_destroy...
static int __vm_munmap(unsigned long start, size_t len, bool downgrade) { int ret; struct mm_struct *mm = current->mm; LIST_HEAD(uf); if (down_write_killable(&mm->mmap_sem)) return -EINTR; ret = __do_munmap(mm, start, len, &uf, downgrade); /* * Returning 1 indicates mmap_sem is downgraded. * But 1 is not ...
0
[ "CWE-476" ]
linux
0a1d52994d440e21def1c2174932410b4f2a98a1
226,523,597,018,897,700,000,000,000,000,000,000,000
24
mm: enforce min addr even if capable() in expand_downwards() security_mmap_addr() does a capability check with current_cred(), but we can reach this code from contexts like a VFS write handler where current_cred() must not be used. This can be abused on systems without SMAP to make NULL pointer dereferences exploitab...
asn1_der_decoding_element (asn1_node * structure, const char *elementName, const void *ider, int len, char *errorDescription) { return asn1_der_decoding(structure, ider, len, errorDescription); }
0
[]
libtasn1
154909136c12cfa5c60732b7210827dfb1ec6aee
302,968,376,142,022,200,000,000,000,000,000,000,000
5
More precise tracking of data.
static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct tg3 *tp = netdev_priv(dev); u32 len, entry, base_flags, mss, vlan = 0; u32 budget; int i = -1, would_hit_hwbug; dma_addr_t mapping; struct tg3_napi *tnapi; struct netdev_queue *txq; unsigned int last; txq = netdev_get_tx_q...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
162,829,154,078,728,280,000,000,000,000,000,000,000
219
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
void CairoOutputDev::updateBlendMode(GfxState *state) { switch (state->getBlendMode()) { default: case gfxBlendNormal: cairo_set_operator (cairo, CAIRO_OPERATOR_OVER); break; case gfxBlendMultiply: cairo_set_operator (cairo, CAIRO_OPERATOR_MULTIPLY); break; case gfxBlendScreen: cairo_set_o...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
49,905,313,264,939,290,000,000,000,000,000,000,000
54
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
QPDFWriter::interpretR3EncryptionParameters( std::set<int>& clear, char const* user_password, char const* owner_password, bool allow_accessibility, bool allow_extract, qpdf_r3_print_e print, qpdf_r3_modify_e modify) { // Acrobat 5 security options: // Checkboxes: // Enable Content Access ...
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
27,696,480,996,015,600,000,000,000,000,000,000,000
69
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
TEST_F(Http1ClientConnectionImplTest, LargeHeaderRequestEncode) { initialize(); NiceMock<MockResponseDecoder> response_decoder; Http::RequestEncoder& request_encoder = codec_->newStream(response_decoder); const std::string long_header_value = std::string(79 * 1024, 'a'); TestRequestHeaderMapImpl headers{ ...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
196,057,148,676,592,320,000,000,000,000,000,000,000
15
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
static void rekey_seq_generator(struct work_struct *work) { struct keydata *keyptr = &ip_keydata[1 ^ (ip_cnt & 1)]; get_random_bytes(keyptr->secret, sizeof(keyptr->secret)); keyptr->count = (ip_cnt & COUNT_MASK) << HASH_BITS; smp_wmb(); ip_cnt++; schedule_delayed_work(&rekey_work, round_jiffies_relative...
1
[ "CWE-703" ]
linux
6e5714eaf77d79ae1c8b47e3e040ff5411b717ec
328,915,362,617,935,140,000,000,000,000,000,000,000
11
net: Compute protocol sequence numbers and fragment IDs using MD5. Computers have become a lot faster since we compromised on the partial MD4 hash which we use currently for performance reasons. MD5 is a much safer choice, and is inline with both RFC1948 and other ISS generators (OpenBSD, Solaris, etc.) Furthermore,...
UTI_AddDiffToTimespec(struct timespec *a, struct timespec *b, struct timespec *c, struct timespec *result) { double diff; diff = UTI_DiffTimespecsToDouble(a, b); UTI_AddDoubleToTimespec(c, diff, result); }
0
[ "CWE-59" ]
chrony
7a4c396bba8f92a3ee8018620983529152050c74
146,124,307,992,687,550,000,000,000,000,000,000,000
8
util: add functions for common file operations Add a function to open a file for reading, writing, or appending. In uppercase modes errors are handled as fatal, i.e. the caller doesn't need to check for NULL. To avoid string manipulations in the callers, the function accepts an optional directory and suffix. New files...
static int bin_resources(RCore *r, int mode) { const RBinInfo *info = r_bin_get_info (r->bin); if (!info || !info->rclass) { return false; } if (!strncmp ("pe", info->rclass, 2)) { bin_pe_resources (r, mode); } return true; }
0
[ "CWE-416" ]
radare2
f85bc674b2a2256a364fe796351bc1971e106005
166,309,378,913,730,250,000,000,000,000,000,000,000
10
Fix #7698 - UAF in r_config_set when loading a dex
static int b43_ratelimit(struct b43_wl *wl) { if (!wl || !wl->current_dev) return 1; if (b43_status(wl->current_dev) < B43_STAT_STARTED) return 1; /* We are up and running. * Ratelimit the messages to avoid DoS over the net. */ return net_ratelimit(); }
0
[ "CWE-134" ]
wireless
9538cbaab6e8b8046039b4b2eb6c9d614dc782bd
158,956,644,311,202,530,000,000,000,000,000,000,000
10
b43: stop format string leaking into error msgs The module parameter "fwpostfix" is userspace controllable, unfiltered, and is used to define the firmware filename. b43_do_request_fw() populates ctx->errors[] on error, containing the firmware filename. b43err() parses its arguments as a format string. For systems with...
record_func_map(struct bpf_verifier_env *env, struct bpf_call_arg_meta *meta, int func_id, int insn_idx) { struct bpf_insn_aux_data *aux = &env->insn_aux_data[insn_idx]; struct bpf_map *map = meta->map_ptr; if (func_id != BPF_FUNC_tail_call && func_id != BPF_FUNC_map_lookup_elem && func_id != BPF_FUNC_m...
0
[]
linux
294f2fc6da27620a506e6c050241655459ccd6bd
328,659,227,154,962,600,000,000,000,000,000,000,000
41
bpf: Verifer, adjust_scalar_min_max_vals to always call update_reg_bounds() Currently, for all op verification we call __red_deduce_bounds() and __red_bound_offset() but we only call __update_reg_bounds() in bitwise ops. However, we could benefit from calling __update_reg_bounds() in BPF_ADD, BPF_SUB, and BPF_MUL case...
psutil_proc_suspend_or_resume(PyObject *self, PyObject *args) { long pid; NTSTATUS status; HANDLE hProcess; PyObject* suspend; if (! PyArg_ParseTuple(args, "lO", &pid, &suspend)) return NULL; hProcess = psutil_handle_from_pid(pid, PROCESS_SUSPEND_RESUME); if (hProcess == NULL) ...
0
[ "CWE-415" ]
psutil
7d512c8e4442a896d56505be3e78f1156f443465
136,465,188,280,298,570,000,000,000,000,000,000,000
26
Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creat...
static int io_req_task_work_add(struct io_kiocb *req) { struct task_struct *tsk = req->task; struct io_ring_ctx *ctx = req->ctx; enum task_work_notify_mode notify; int ret; if (tsk->flags & PF_EXITING) return -ESRCH; /* * SQPOLL kernel thread doesn't need notification, just a wakeup. For * all other cases...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
121,541,140,545,041,730,000,000,000,000,000,000,000
26
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
_XimDelayModeSetAttr( Xim im) { XimDefIMValues im_values; if(!_XimSetIMResourceList(&im->core.im_resources, &im->core.im_num_resources)) { return False; } if(!_XimSetICResourceList(&im->core.ic_resources, &im->core.ic_num_resources)) { return False; } _XimSetIMMode(im->co...
0
[ "CWE-190" ]
libx11
1a566c9e00e5f35c1f9e7f3d741a02e5170852b2
180,048,972,629,264,980,000,000,000,000,000,000,000
30
Zero out buffers in functions It looks like uninitialized stack or heap memory can leak out via padding bytes. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
void mg_md5_init(mg_md5_ctx *ctx) { ctx->buf[0] = 0x67452301; ctx->buf[1] = 0xefcdab89; ctx->buf[2] = 0x98badcfe; ctx->buf[3] = 0x10325476; ctx->bits[0] = 0; ctx->bits[1] = 0; }
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
204,783,707,473,895,950,000,000,000,000,000,000,000
9
Protect against the directory traversal in mg_upload()
int lookup(struct sip_msg* _m, char* _t, char* _f, char* _s) { unsigned int flags; urecord_t* r; str aor, uri; ucontact_t* ptr,*it; int res; int ret; str path_dst; str flags_s; pv_value_t val; int_str istr; str sip_instance = {0,0},call_id = {0,0}; flags = 0; if (_f && _f[0]!=0) { if (fixup_get_svalue( ...
0
[ "CWE-835" ]
opensips
54e027adfa486cfcf993828512b2e273aeb163c2
283,039,291,580,308,730,000,000,000,000,000,000,000
216
backport from 1.9 (rev #9980) fixed temporary GRUU bug that lead to infinite loop Credits to Tolga Tarhan git-svn-id: svn+ssh://svn.code.sf.net/p/opensips/svn/trunk@9982 689a6050-402a-0410-94f2-e92a70836424
int RGWPostObj_ObjStore_S3::complete_get_params() { bool done; do { struct post_form_part part; int r = read_form_part_header(&part, done); if (r < 0) { return r; } ceph::bufferlist part_data; bool boundary; uint64_t chunk_size = s->cct->_conf->rgw_max_chunk_size; r = read_dat...
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
758,374,819,401,984,300,000,000,000,000,000,000
23
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
int dtls1_write_bytes(SSL *s, int type, const void *buf, int len) { int i; OPENSSL_assert(len <= SSL3_RT_MAX_PLAIN_LENGTH); s->rwstate=SSL_NOTHING; i=do_dtls1_write(s, type, buf, len, 0); return i; }
0
[ "CWE-310" ]
openssl
270881316664396326c461ec7a124aec2c6cc081
319,308,037,034,153,650,000,000,000,000,000,000,000
9
Add and use a constant-time memcmp. This change adds CRYPTO_memcmp, which compares two vectors of bytes in an amount of time that's independent of their contents. It also changes several MAC compares in the code to use this over the standard memcmp, which may leak information about the size of a matching prefix. (cher...
evutil_ascii_strcasecmp(const char *s1, const char *s2) { char c1, c2; while (1) { c1 = EVUTIL_TOLOWER_(*s1++); c2 = EVUTIL_TOLOWER_(*s2++); if (c1 < c2) return -1; else if (c1 > c2) return 1; else if (c1 == 0) return 0; } }
0
[ "CWE-119", "CWE-787" ]
libevent
329acc18a0768c21ba22522f01a5c7f46cacc4d5
323,641,230,514,154,820,000,000,000,000,000,000,000
14
evutil_parse_sockaddr_port(): fix buffer overflow @asn-the-goblin-slayer: "Length between '[' and ']' is cast to signed 32 bit integer on line 1815. Is the length is more than 2<<31 (INT_MAX), len will hold a negative value. Consequently, it will pass the check at line 1816. Segfault happens at line 1819. ...
static const char *am_set_cond_slot(cmd_parms *cmd, void *struct_ptr, const char *attribute, const char *value, const char *options) { am_dir_cfg_rec *d = struct_ptr; i...
0
[ "CWE-601" ]
mod_auth_mellon
9d28908e28ef70a12196c215503fb0075e1fd7f3
167,893,470,970,521,720,000,000,000,000,000,000,000
56
Add MellonRedirectDomains option. Limit the domains that we will redirect to after login / logout to a set of trusted domains. By default we only allow redirects to the current domain. This change breaks backwards compatibility with any site that relies on redirects to separate domains. Fixes #35
int MqttClient_Init(MqttClient *client, MqttNet* net, MqttMsgCb msg_cb, byte* tx_buf, int tx_buf_len, byte* rx_buf, int rx_buf_len, int cmd_timeout_ms) { int rc = MQTT_CODE_SUCCESS; /* Check arguments */ if (client == NULL || tx_buf == NULL || tx_buf_len <= 0 || rx_buf == NU...
0
[ "CWE-787" ]
wolfMQTT
84d4b53122e0fa0280c7872350b89d5777dabbb2
283,855,433,840,206,160,000,000,000,000,000,000,000
56
Fix wolfmqtt-fuzzer: Null-dereference WRITE in MqttProps_Free
pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, unsigned long size, pgprot_t vma_prot) { if (!pfn_valid(pfn)) return pgprot_noncached(vma_prot); else if (file->f_flags & O_SYNC) return pgprot_writecombine(vma_prot); return vma_prot; }
0
[]
linux
15122ee2c515a253b0c66a3e618bc7ebe35105eb
95,614,045,956,266,930,000,000,000,000,000,000,000
9
arm64: Enforce BBM for huge IO/VMAP mappings ioremap_page_range doesn't honour break-before-make and attempts to put down huge mappings (using p*d_set_huge) over the top of pre-existing table entries. This leads to us leaking page table memory and also gives rise to TLB conflicts and spurious aborts, which have been s...
static struct io_ring_ctx *io_ring_ctx_alloc(struct io_uring_params *p) { struct io_ring_ctx *ctx; int hash_bits; ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); if (!ctx) return NULL; ctx->fallback_req = kmem_cache_alloc(req_cachep, GFP_KERNEL); if (!ctx->fallback_req) goto err; /* * Use 5 bits less than the ...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
313,975,913,796,758,100,000,000,000,000,000,000,000
59
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...
static int find_msgid(char *msgid, char **mailbox, uint32_t *uid) { struct findrock frock = { NULL, 0 }; duplicate_find(msgid, &find_cb, &frock); if (!frock.mailbox) return 0; if (mailbox) { if (!frock.mailbox[0]) return 0; *mailbox = (char *) frock.mailbox; } if (uid) { if (!frock.uid) re...
0
[ "CWE-287" ]
cyrus-imapd
77903669e04c9788460561dd0560b9c916519594
657,928,882,260,700,260,000,000,000,000,000,000
19
Secunia SA46093 - make sure nntp authentication completes Discovered by Stefan Cornelius, Secunia Research The vulnerability is caused due to the access restriction for certain commands only checking whether or not variable "nntp_userid" is non-NULL, without performing additional checks to verify that a complete, suc...
static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address) { unsigned index = pgd_index(address); pgd_t *pgd_k; p4d_t *p4d, *p4d_k; pud_t *pud, *pud_k; pmd_t *pmd, *pmd_k; pgd += index; pgd_k = init_mm.pgd + index; if (!pgd_present(*pgd_k)) return NULL; /* * set_pgd(pgd, *pgd_k); here woul...
0
[ "CWE-20" ]
linux
342db04ae71273322f0011384a9ed414df8bdae4
270,223,359,528,929,430,000,000,000,000,000,000,000
41
x86/dumpstack: Don't dump kernel memory based on usermode RIP show_opcodes() is used both for dumping kernel instructions and for dumping user instructions. If userspace causes #PF by jumping to a kernel address, show_opcodes() can be reached with regs->ip controlled by the user, pointing to kernel code. Make sure th...
int load_ramdisk(const char *filename, hwaddr addr, uint64_t max_sz) { return load_ramdisk_as(filename, addr, max_sz, NULL); }
0
[ "CWE-787" ]
qemu
e423455c4f23a1a828901c78fe6d03b7dde79319
265,822,057,594,899,070,000,000,000,000,000,000,000
4
hw/core/loader: Fix possible crash in rom_copy() Both, "rom->addr" and "addr" are derived from the binary image that can be loaded with the "-kernel" paramer. The code in rom_copy() then calculates: d = dest + (rom->addr - addr); and uses "d" as destination in a memcpy() some lines later. Now with bad kernel ima...
int vfs_lstat_smb_fname(struct connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf) { struct smb_filename *smb_fname = NULL; NTSTATUS status; int ret; status = create_synthetic_smb_fname_split(talloc_tos(), fname, NULL, &smb_fname); if (!NT_STATUS_IS_OK(status)) { errno = map_errno_fro...
0
[ "CWE-22" ]
samba
bd269443e311d96ef495a9db47d1b95eb83bb8f4
279,172,012,986,931,670,000,000,000,000,000,000,000
22
Fix bug 7104 - "wide links" and "unix extensions" are incompatible. Change parameter "wide links" to default to "no". Ensure "wide links = no" if "unix extensions = yes" on a share. Fix man pages to refect this. Remove "within share" checks for a UNIX symlink set - even if widelinks = no. The server will not follow t...
void check_const_index(const unsigned int arg, char *const ss, char *const se, const char saved_char) { if (arg!=~0U && !_cimg_mp_is_const_scalar(arg)) { char *s0; _cimg_mp_strerr; throw CImgArgumentException("[" cimg_appname "_math_parser] " ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
194,711,371,709,964,520,000,000,000,000,000,000,000
10
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int get_version(void __user *arg) { mdu_version_t ver; ver.major = MD_MAJOR_VERSION; ver.minor = MD_MINOR_VERSION; ver.patchlevel = MD_PATCHLEVEL_VERSION; if (copy_to_user(arg, &ver, sizeof(ver))) return -EFAULT; return 0; }
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
210,698,948,157,947,900,000,000,000,000,000,000,000
13
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
delete_file_recursively (GFile *file, GCancellable *cancellable, DeleteCallback callback, gpointer callback_data) { gboolean success; g_autoptr (GError) error = NULL; do { g_autoptr (GFileEnumerator) e...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
93,076,138,756,193,700,000,000,000,000,000,000,000
69
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...
static void cma_id_get(struct rdma_id_private *id_priv) { refcount_inc(&id_priv->refcount); }
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
238,867,986,674,663,150,000,000,000,000,000,000,000
4
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
struct crypto_skcipher *crypto_alloc_skcipher(const char *alg_name, u32 type, u32 mask) { return crypto_alloc_tfm(alg_name, &crypto_skcipher_type2, type, mask); }
0
[ "CWE-476", "CWE-703" ]
linux
9933e113c2e87a9f46a40fde8dafbf801dca1ab9
775,636,747,160,899,900,000,000,000,000,000,000
5
crypto: skcipher - Add missing API setkey checks The API setkey checks for key sizes and alignment went AWOL during the skcipher conversion. This patch restores them. Cc: <stable@vger.kernel.org> Fixes: 4e6c3df4d729 ("crypto: skcipher - Add low-level skcipher...") Reported-by: Baozeng <sploving1@gmail.com> Signed-of...
ves_icall_System_Array_FastCopy (MonoArray *source, int source_idx, MonoArray* dest, int dest_idx, int length) { int element_size; void * dest_addr; void * source_addr; MonoClass *src_class; MonoClass *dest_class; int i; MONO_ARCH_SAVE_REGS; if (source->obj.vtable->klass->rank != dest->obj.vtable->klass->rank...
1
[ "CWE-362", "CWE-264" ]
mono
2f00e4bbb2137130845afb1b2a1e678552fc8e5c
142,406,443,107,476,930,000,000,000,000,000,000,000
86
Disable some of the FastCopy fast paths since they are racy.
inline int64_t NumElements(const TfLiteIntArray* dims) { int64_t count = 1; for (int i = 0; i < dims->size; ++i) { count *= dims->data[i]; } return count; }
0
[ "CWE-125", "CWE-787" ]
tensorflow
46d5b0852528ddfd614ded79bccc75589f801bd9
237,755,467,293,081,200,000,000,000,000,000,000,000
7
[tflite] Test for `kTfLiteOptionalTensor` in `GetInput`. `GetInput`, `GetVariableInput` and `GetOutput` all fail to check for the case where `node->inputs->data[index]` is the special `kTfLiteOptionalTensor` value (-1) which then causes `context->tensors[node->inputs->data[index]]` to read from invalid memory location...
static int net_eq_idr(int id, void *net, void *peer) { if (net_eq(net, peer)) return id ? : NET_ID_ZERO; return 0; }
0
[ "CWE-416" ]
linux
21b5944350052d2583e82dd59b19a9ba94a007f0
12,384,978,223,805,452,000,000,000,000,000,000,000
6
net: Fix double free and memory corruption in get_net_ns_by_id() (I can trivially verify that that idr_remove in cleanup_net happens after the network namespace count has dropped to zero --EWB) Function get_net_ns_by_id() does not check for net::count after it has found a peer in netns_ids idr. It may dereference a...
static int __init svm_check_processor_compat(void) { return 0; }
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
139,308,439,266,957,880,000,000,000,000,000,000,000
4
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
TEST_P( QuicServerTransportPendingDataTest, TestNoCipherProcessPendingOneRttData) { server->getNonConstConn().qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::Server); recvClientHello(); auto data = IOBuf::copyBuffer("bad data"); StreamId streamId = 2; // Write packet with zero rtt ke...
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
38,986,612,499,034,736,000,000,000,000,000,000,000
30
Close connection if we derive an extra 1-rtt write cipher Summary: Fixes CVE-2021-24029 Reviewed By: mjoras, lnicco Differential Revision: D26613890 fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945
static int get_value(config_fn_t fn, void *data, char *name, unsigned int len) { int c; char *value; /* Get the full name */ for (;;) { c = get_next_char(); if (config_file_eof) break; if (!iskeychar(c)) break; name[len++] = c; if (len >= MAXNAME) return -1; } name[len] = 0; while (c == ' ' |...
0
[ "CWE-94" ]
linux
aba8d056078e47350d85b06a9cabd5afcc4b72ea
15,915,970,879,247,207,000,000,000,000,000,000,000
30
perf tools: do not look at ./config for configuration In addition to /etc/perfconfig and $HOME/.perfconfig, perf looks for configuration in the file ./config, imitating git which looks at $GIT_DIR/config. If ./config is not a perf configuration file, it fails, or worse, treats it as a configuration file and changes b...
static int __init mbochs_dev_init(void) { int ret = 0; ret = alloc_chrdev_region(&mbochs_devt, 0, MINORMASK + 1, MBOCHS_NAME); if (ret < 0) { pr_err("Error: failed to register mbochs_dev, err: %d\n", ret); return ret; } cdev_init(&mbochs_cdev, &vd_fops); cdev_add(&mbochs_cdev, mbochs_devt, MINORMASK + 1); p...
1
[ "CWE-200", "CWE-401" ]
linux
de5494af4815a4c9328536c72741229b7de88e7f
105,662,273,094,362,130,000,000,000,000,000,000,000
48
vfio/mbochs: Fix missing error unwind of mbochs_used_mbytes Convert mbochs to use an atomic scheme for this like mtty was changed into. The atomic fixes various race conditions with probing. Add the missing error unwind. Also add the missing kfree of mdev_state->pages. Fixes: 681c1615f891 ("vfio/mbochs: Convert to us...
sph_enc16be(void *dst, unsigned val) { ((unsigned char *)dst)[0] = (unsigned char)(val >> 8); ((unsigned char *)dst)[1] = (unsigned char)val; }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
19,180,937,690,118,671,000,000,000,000,000,000,000
5
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 ...
void uwbd_stop(struct uwb_rc *rc) { kthread_stop(rc->uwbd.task); uwbd_flush(rc); }
1
[ "CWE-119", "CWE-787" ]
linux
bbf26183b7a6236ba602f4d6a2f7cade35bba043
103,479,328,573,049,240,000,000,000,000,000,000,000
5
uwb: properly check kthread_run return value uwbd_start() calls kthread_run() and checks that the return value is not NULL. But the return value is not NULL in case kthread_run() fails, it takes the form of ERR_PTR(-EINTR). Use IS_ERR() instead. Also add a check to uwbd_stop(). Signed-off-by: Andrey Konovalov <andr...
static void event_invite(IRC_SERVER_REC *server, const char *data) { char *params, *channel, *shortchan; g_return_if_fail(data != NULL); params = event_get_params(data, 2, NULL, &channel); if (irc_channel_find(server, channel) == NULL) { /* check if we're supposed to autojoin this channel */ CH...
0
[ "CWE-416" ]
irssi
43e44d553d44e313003cee87e6ea5e24d68b84a1
31,555,518,230,323,866,000,000,000,000,000,000,000
28
Merge branch 'security' into 'master' Security Closes GL#12, GL#13, GL#14, GL#15, GL#16 See merge request irssi/irssi!23
void sev_guest_memory_reclaimed(struct kvm *kvm) { if (!sev_guest(kvm)) return; wbinvd_on_all_cpus(); }
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
229,997,238,958,564,400,000,000,000,000,000,000,000
7
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
next_can_write (void *nxdata) { struct b_conn *b_conn = nxdata; return backend_can_write (b_conn->b, b_conn->conn); }
0
[ "CWE-406" ]
nbdkit
a6b88b195a959b17524d1c8353fd425d4891dc5f
312,138,113,820,758,720,000,000,000,000,000,000,000
5
server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO Most known NBD clients do not bother with NBD_OPT_INFO (except for clients like 'qemu-nbd --list' that don't ever intend to connect), but go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu to add in an extra client step (whether info on the ...
flatpak_proxy_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FlatpakProxy *proxy = FLATPAK_PROXY (object); switch (prop_id) { case PROP_DBUS_ADDRESS: g_value_set_string ...
0
[ "CWE-284", "CWE-436" ]
flatpak
52346bf187b5a7f1c0fe9075b328b7ad6abe78f6
139,292,287,342,001,780,000,000,000,000,000,000,000
22
Fix vulnerability in dbus proxy During the authentication all client data is directly forwarded to the dbus daemon as is, until we detect the BEGIN command after which we start filtering the binary dbus protocol. Unfortunately the detection of the BEGIN command in the proxy did not exactly match the detection in the ...
explicit QuantizeV2Op(OpKernelConstruction* ctx) : OpKernel(ctx) { half_range_ = !std::is_signed<T>::value ? 0.0f : (static_cast<double>(std::numeric_limits<T>::max()) - static_cast<double>(std::numeric_limits<T>::min()) + 1) / 2.0f; string mode...
0
[ "CWE-20", "CWE-476" ]
tensorflow
6da6620efad397c85493b8f8667b821403516708
56,810,503,209,154,910,000,000,000,000,000,000,000
47
Secure tf.raw_ops.QuantizeV2 Validate size and shape of min_range and max_range Ensure axis is within input dims limits PiperOrigin-RevId: 387232799 Change-Id: I36975281f7b5758e9e31a8dcc73fe610ef456318
struct kern_ipc_perm *ipc_obtain_object(struct ipc_ids *ids, int id) { struct kern_ipc_perm *out; int lid = ipcid_to_idx(id); out = idr_find(&ids->ipcs_idr, lid); if (!out) return ERR_PTR(-EINVAL); return out; }
0
[ "CWE-703", "CWE-189" ]
linux
6062a8dc0517bce23e3c2f7d2fea5e22411269a3
58,230,128,318,876,010,000,000,000,000,000,000,000
11
ipc,sem: fine grained locking for semtimedop Introduce finer grained locking for semtimedop, to handle the common case of a program wanting to manipulate one semaphore from an array with multiple semaphores. If the call is a semop manipulating just one semaphore in an array with multiple semaphores, only take the loc...
int nfs_symlink(struct user_namespace *mnt_userns, struct inode *dir, struct dentry *dentry, const char *symname) { struct page *page; char *kaddr; struct iattr attr; unsigned int pathlen = strlen(symname); int error; dfprintk(VFS, "NFS: symlink(%s/%lu, %pd, %s)\n", dir->i_sb->s_id, dir->i_ino, dentry, symna...
0
[ "CWE-909" ]
linux
ac795161c93699d600db16c1a8cc23a65a1eceaf
137,877,857,261,907,100,000,000,000,000,000,000,000
59
NFSv4: Handle case where the lookup of a directory fails If the application sets the O_DIRECTORY flag, and tries to open a regular file, nfs_atomic_open() will punt to doing a regular lookup. If the server then returns a regular file, we will happily return a file descriptor with uninitialised open state. The fix is ...
PJ_DEF(pj_status_t) pjsip_dlg_create_response( pjsip_dialog *dlg, pjsip_rx_data *rdata, int st_code, const pj_str_t *st_text, pjsip_tx_data **p_tdata) { pj_status_t status; pjsip_tx_data *tdata; /* Create generic response. * This will initialize response's Via, To, From, Call-I...
0
[ "CWE-297", "CWE-295" ]
pjproject
67e46c1ac45ad784db5b9080f5ed8b133c122872
112,973,894,571,170,560,000,000,000,000,000,000,000
33
Merge pull request from GHSA-8hcp-hm38-mfph * Check hostname during TLS transport selection * revision based on feedback * remove the code in create_request that has been moved
static int local_open(FsContext *ctx, V9fsPath *fs_path, int flags, V9fsFidOpenState *fs) { int fd; fd = local_open_nofollow(ctx, fs_path->data, flags, 0); if (fd == -1) { return -1; } fs->fd = fd; return fs->fd; }
0
[ "CWE-732" ]
qemu
9c6b899f7a46893ab3b671e341a2234e9c0c060e
56,016,216,721,615,310,000,000,000,000,000,000,000
12
9pfs: local: set the path of the export root to "." The local backend was recently converted to using "at*()" syscalls in order to ensure all accesses happen below the shared directory. This requires that we only pass relative paths, otherwise the dirfd argument to the "at*()" syscalls is ignored and the path is treat...
bool ConnectionManagerImpl::ActiveStream::processNewlyAddedMetadata() { if (request_metadata_map_vector_ == nullptr) { return false; } for (const auto& metadata_map : *getRequestMetadataMapVector()) { decodeMetadata(nullptr, *metadata_map); } getRequestMetadataMapVector()->clear(); return true; }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
103,540,937,406,890,550,000,000,000,000,000,000,000
10
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static int rsi_hal_key_config(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_key_conf *key, struct ieee80211_sta *sta) { struct rsi_hw *adapter = hw->priv; struct rsi_sta *rsta = NULL; int status; u8 key_type; s16 sta_id = 0; if (key->flags & IEEE80211_KEY_FLAG_PA...
0
[ "CWE-416" ]
linux
abd39c6ded9db53aa44c2540092bdd5fb6590fa8
234,028,232,860,016,500,000,000,000,000,000,000,000
63
rsi: add fix for crash during assertions Observed crash in some scenarios when assertion has occurred, this is because hw structure is freed and is tried to get accessed in some functions where null check is already present. So, avoided the crash by making the hw to NULL after freeing. Signed-off-by: Sanjay Konduri <...
log_selection_message(char *format, char *arg) { if (REF_GetMode() != REF_ModeNormal) return; LOG(LOGS_INFO, format, arg); }
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
7,250,657,806,763,748,000,000,000,000,000,000,000
6
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
flatpak_bwrap_add_arg_printf (FlatpakBwrap *bwrap, const char *format, ...) { va_list args; va_start (args, format); g_ptr_array_add (bwrap->argv, g_strdup_vprintf (format, args)); va_end (args); }
0
[ "CWE-94", "CWE-74" ]
flatpak
6d1773d2a54dde9b099043f07a2094a4f1c2f486
131,301,435,962,383,700,000,000,000,000,000,000,000
8
run: Convert all environment variables into bwrap arguments This avoids some of them being filtered out by a setuid bwrap. It also means that if they came from an untrusted source, they cannot be used to inject arbitrary code into a non-setuid bwrap via mechanisms like LD_PRELOAD. Because they get bundled into a memf...
Signature_Encoder::Signature_Encoder(const byte* dig, word32 digSz, HashType digOID, Source& source) { // build bottom up // Digest byte digArray[MAX_DIGEST_SZ]; word32 digestSz = SetDigest(dig, digSz, digArray); // AlgoID byte algoArray[MAX_ALGO_SZ]; w...
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
256,707,806,119,440,080,000,000,000,000,000,000,000
22
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
static int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) { struct pagevec lru_pvec; struct page *page; char *kaddr; struct iattr attr; unsigned int pathlen = strlen(symname); int error; dfprintk(VFS, "NFS: symlink(%s/%ld, %s, %s)\n", dir->i_sb->s_id, dir->i_ino, dentry->d_name.nam...
0
[ "CWE-20" ]
linux-2.6
54af3bb543c071769141387a42deaaab5074da55
143,703,669,511,342,850,000,000,000,000,000,000,000
62
NFS: Fix an Oops in encode_lookup() It doesn't look as if the NFS file name limit is being initialised correctly in the struct nfs_server. Make sure that we limit whatever is being set in nfs_probe_fsinfo() and nfs_init_server(). Also ensure that readdirplus and nfs4_path_walk respect our file name limits. Signed-of...
relay_websocket_client_handshake_valid (struct t_relay_client *client) { const char *value; /* check if we have header "Upgrade" with value "websocket" */ value = weechat_hashtable_get (client->http_headers, "upgrade"); if (!value) return -1; if (weechat_strcasecmp (value, "websocket") != 0...
0
[ "CWE-125" ]
weechat
8b1331f98de1714bae15a9ca2e2b393ba49d735b
75,735,485,763,300,180,000,000,000,000,000,000,000
31
relay: fix crash when decoding a malformed websocket frame
void opj_tcd_code_block_enc_deallocate (opj_tcd_precinct_t * p_precinct) { OPJ_UINT32 cblkno , l_nb_code_blocks; opj_tcd_cblk_enc_t * l_code_block = p_precinct->cblks.enc; if (l_code_block) { l_nb_code_blocks = p_precinct->block_size / sizeof(opj_tcd_cblk_enc_t); ...
0
[ "CWE-190" ]
openjpeg
5d00b719f4b93b1445e6fb4c766b9a9883c57949
296,967,590,113,937,000,000,000,000,000,000,000,000
31
[trunk] fixed a buffer overflow in opj_tcd_init_decode_tile Update issue 431
void CLASS imacon_full_load_raw() { #ifdef LIBRAW_LIBRARY_BUILD if (!image) throw LIBRAW_EXCEPTION_IO_CORRUPT; #endif int row, col; #ifdef LIBRAW_LIBRARY_BUILD unsigned short *buf = (unsigned short *)malloc(width * 3 * sizeof(unsigned short)); merror(buf, "imacon_full_load_raw"); #endif for (row = 0; ro...
0
[ "CWE-190" ]
LibRaw
4554e24ce24beaef5d0ef48372801cfd91039076
66,105,567,664,353,820,000,000,000,000,000,000,000
35
parse_qt: possible integer overflow
int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask, sector_t *error_sector) { struct request_queue *q; struct bio *bio; int ret = 0; if (bdev->bd_disk == NULL) return -ENXIO; q = bdev_get_queue(bdev); if (!q) return -ENXIO; /* * some block devices may not have their queue correctly set u...
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
96,068,447,893,888,160,000,000,000,000,000,000,000
39
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
ProtobufMessage::ValidationVisitor& PerListenerFactoryContextImpl::messageValidationVisitor() { return listener_factory_context_base_->messageValidationVisitor(); }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
104,788,138,429,934,660,000,000,000,000,000,000,000
3
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
static void deinit_keys(gnutls_session_t session) { gnutls_pk_params_release(&session->key.ecdh_params); gnutls_pk_params_release(&session->key.dh_params); zrelease_temp_mpi_key(&session->key.ecdh_x); zrelease_temp_mpi_key(&session->key.ecdh_y); _gnutls_free_temp_key_datum(&session->key.ecdhx); zrelease_temp_mpi...
0
[ "CWE-400" ]
gnutls
1ffb827e45721ef56982d0ffd5c5de52376c428e
259,097,979,675,527,420,000,000,000,000,000,000,000
25
handshake: set a maximum number of warning messages that can be received per handshake That is to avoid DoS due to the assymetry of cost of sending an alert vs the cost of processing.
static inline bool cpu_need_tpr_shadow(struct kvm_vcpu *vcpu) { return cpu_has_vmx_tpr_shadow() && lapic_in_kernel(vcpu); }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
167,115,163,212,669,880,000,000,000,000,000,000,000
4
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
dirvote_fetch_missing_signatures(void) { int need_any = 0; int i; for (i=0; i < N_CONSENSUS_FLAVORS; ++i) { networkstatus_t *consensus = pending_consensuses[i].consensus; if (!consensus || networkstatus_check_consensus_signature(consensus, -1) == 1) { /* We have no consensus, or we have one ...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
129,753,863,578,062,320,000,000,000,000,000,000,000
19
Fix assertion failure in tor_timegm. Fixes bug 6811.
int FileIo::munmap() { int rc = 0; if (p_->pMappedArea_ != 0) { #if defined EXV_HAVE_MMAP && defined EXV_HAVE_MUNMAP if (::munmap(p_->pMappedArea_, p_->mappedLength_) != 0) { rc = 1; } #elif defined WIN32 && !defined __CYGWIN__ UnmapViewOfFile(...
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
150,757,418,878,595,250,000,000,000,000,000,000,000
33
Fix https://github.com/Exiv2/exiv2/issues/55
static bool build_multipart( ogs_sbi_http_message_t *http, ogs_sbi_message_t *message) { int i; char boundary[32]; unsigned char digest[16]; char *p = NULL, *last; char *content_type = NULL; char *json = NULL; ogs_assert(message); ogs_assert(http); ogs_random(digest, 16);...
0
[ "CWE-476", "CWE-787" ]
open5gs
d919b2744cd05abae043490f0a3dd1946c1ccb8c
52,646,483,705,355,510,000,000,000,000,000,000,000
61
[AMF] fix the memory problem (#1247) 1. memory corruption - Overflow num_of_part in SBI message 2. null pointer dereference - n2InfoContent->ngap_ie_type
HttpStateData::continueAfterParsingHeader() { if (flags.handling1xx) { debugs(11, 5, HERE << "wait for 1xx handling"); Must(!flags.headers_parsed); return false; } if (!flags.headers_parsed && !eof) { debugs(11, 9, "needs more at " << inBuf.length()); flags.do_next_r...
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
61,435,160,596,382,070,000,000,000,000,000,000,000
66
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
getChar(char *p) { return wc_any_to_ucs(wtf_parse1((wc_uchar **)&p)); }
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
222,724,393,457,276,100,000,000,000,000,000,000,000
4
Make temporary directory safely when ~/.w3m is unwritable
RGWOpType get_type() override { return RGW_OP_GET_INFO; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
144,219,985,773,028,280,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 <...
parser_module_add_names_to_node (parser_context_t *context_p, /**< parser context */ ecma_string_t *imex_name_p, /**< import/export name */ ecma_string_t *local_name_p) /**< local name */ { ecma_module_names_t *new_name_p = (ecma_module_names_t *) pars...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
241,740,807,890,683,970,000,000,000,000,000,000,000
18
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
void CLASS wavelet_denoise() { float *fimg = 0, *temp, thold, mul[2], avg, diff; int scale = 1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; ushort *window[4]; static const float noise[] = {0.8002, 0.2735, 0.1202, 0.0585, 0.0291, 0.0152, 0.0080, 0.0044}; #ifdef DCRAW_VERBOSE if (verbose) f...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
233,169,288,399,479,430,000,000,000,000,000,000,000
124
Secunia SA75000 advisory: several buffer overruns
gio_read_socket (GIOChannel *gio, GIOCondition condition, gpointer data) { struct gio_to_qb_poll *adaptor = (struct gio_to_qb_poll *)data; gint fd = g_io_channel_unix_get_fd(gio); crm_trace("%p.%d %d (ref=%d)", data, fd, condition, gio_adapter_refcount(adaptor)); if(condition & G_IO_NVAL) { cr...
0
[ "CWE-399" ]
pacemaker
564f7cc2a51dcd2f28ab12a13394f31be5aa3c93
77,773,733,650,641,870,000,000,000,000,000,000,000
14
High: core: Internal tls api improvements for reuse with future LRMD tls backend.
static int do_tmpfile(struct nameidata *nd, unsigned flags, const struct open_flags *op, struct file *file) { struct dentry *child; struct path path; int error = path_lookupat(nd, flags | LOOKUP_DIRECTORY, &path); if (unlikely(error)) return error; error = mnt_want_write(path.mnt); if (unlikely(error)) go...
0
[ "CWE-416", "CWE-284" ]
linux
d0cb50185ae942b03c4327be322055d622dc79f6
201,248,843,788,969,660,000,000,000,000,000,000,000
31
do_last(): fetch directory ->i_mode and ->i_uid before it's too late may_create_in_sticky() call is done when we already have dropped the reference to dir. Fixes: 30aba6656f61e (namei: allow restricted O_CREAT of FIFOs and regular files) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
void __audit_inode(struct filename *name, const struct dentry *dentry, unsigned int flags) { struct audit_context *context = current->audit_context; struct inode *inode = d_backing_inode(dentry); struct audit_names *n; bool parent = flags & AUDIT_INODE_PARENT; if (!context->in_syscall) return; if (!name)...
0
[ "CWE-362" ]
linux
43761473c254b45883a64441dd0bc85a42f3645c
319,918,099,118,139,200,000,000,000,000,000,000,000
78
audit: fix a double fetch in audit_log_single_execve_arg() There is a double fetch problem in audit_log_single_execve_arg() where we first check the execve(2) argumnets for any "bad" characters which would require hex encoding and then re-fetch the arguments for logging in the audit record[1]. Of course this leaves a...
void nci_ntf_packet(struct nci_dev *ndev, struct sk_buff *skb) { __u16 ntf_opcode = nci_opcode(skb->data); pr_debug("NCI RX: MT=ntf, PBF=%d, GID=0x%x, OID=0x%x, plen=%d\n", nci_pbf(skb->data), nci_opcode_gid(ntf_opcode), nci_opcode_oid(ntf_opcode), nci_plen(skb->data)); /* strip the nci control header ...
0
[ "CWE-119", "CWE-787" ]
linux
67de956ff5dc1d4f321e16cfbd63f5be3b691b43
293,578,561,328,430,600,000,000,000,000,000,000,000
45
NFC: Prevent multiple buffer overflows in NCI Fix multiple remotely-exploitable stack-based buffer overflows due to the NCI code pulling length fields directly from incoming frames and copying too much data into statically-sized arrays. Signed-off-by: Dan Rosenberg <dan.j.rosenberg@gmail.com> Cc: stable@kernel.org Cc...
static STACK_OF(X509) * load_all_certs_from_file(char *certfile) { STACK_OF(X509_INFO) *sk=NULL; STACK_OF(X509) *stack=NULL, *ret=NULL; BIO *in=NULL; X509_INFO *xi; TSRMLS_FETCH(); if(!(stack = sk_X509_new_null())) { php_error_docref(NULL TSRMLS_CC, E_ERROR, "memory allocation failure"); goto end; } if (p...
0
[ "CWE-20" ]
php-src
2874696a5a8d46639d261571f915c493cd875897
285,614,090,308,230,050,000,000,000,000,000,000,000
52
Fix CVE-2013-4073 - handling of certs with null bytes
static inline bool __io_cqring_fill_event(struct io_ring_ctx *ctx, u64 user_data, long res, unsigned int cflags) { struct io_uring_cqe *cqe; trace_io_uring_complete(ctx, user_data, res, cflags); /* * If we can't get a cq entry, userspace overflowed the * submission (by quite a lot). Increment the overfl...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
112,936,889,177,419,050,000,000,000,000,000,000,000
21
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
xmlSchemaGetChameleonSchemaBucket(xmlSchemaParserCtxtPtr pctxt, const xmlChar *schemaLocation, const xmlChar *targetNamespace) { xmlSchemaBucketPtr cur; xmlSchemaItemListPtr list; list = pctxt->constructor->buckets; if (list->nbItems == 0) return(NULL); else { int i; for (i = 0...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
40,667,413,965,222,540,000,000,000,000,000,000,000
23
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
void Monitor::handle_sync_cookie(MonOpRequestRef op) { MMonSync *m = static_cast<MMonSync*>(op->get_req()); dout(10) << __func__ << " " << *m << dendl; if (sync_cookie) { dout(10) << __func__ << " already have a cookie, ignoring" << dendl; return; } if (m->get_source_inst() != sync_provider) { dou...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
25,976,019,554,184,580,000,000,000,000,000,000,000
20
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
parser_parse_switch_statement_start (parser_context_t *context_p) /**< context */ { parser_switch_statement_t switch_statement; parser_loop_statement_t loop; parser_stack_iterator_t iterator; scanner_location_t start_location; bool switch_case_was_found; bool default_case_was_found; parser_branch_node_t *...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
46,597,716,942,250,680,000,000,000,000,000,000,000
164
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static int cmp_extents_reverse(const void *a, const void *b) { const struct uid_gid_extent *e1 = a; const struct uid_gid_extent *e2 = b; if (e1->lower_first < e2->lower_first) return -1; if (e1->lower_first > e2->lower_first) return 1; return 0; }
0
[ "CWE-20", "CWE-862", "CWE-863" ]
linux
d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd
247,480,082,672,315,320,000,000,000,000,000,000,000
13
userns: also map extents in the reverse map to kernel IDs The current logic first clones the extent array and sorts both copies, then maps the lower IDs of the forward mapping into the lower namespace, but doesn't map the lower IDs of the reverse mapping. This means that code in a nested user namespace with >5 extent...
static void clear_atomic_switch_msr(struct vcpu_vmx *vmx, unsigned msr) { unsigned i; struct msr_autoload *m = &vmx->msr_autoload; for (i = 0; i < m->nr; ++i) if (m->guest[i].index == msr) break; if (i == m->nr) return; --m->nr; m->guest[i] = m->guest[m->nr]; m->host[i] = m->host[m->nr]; vmcs_write32(V...
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
271,844,022,698,420,760,000,000,000,000,000,000,000
17
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
static const char *plug_to_string(test_plug_t plug) { switch (plug) { case PLUG_NONE: return "open, "; case PLUG_RESET: return "closed, "; case PLUG_TIMEOUT: return "timeout,"; default: return "unknown,"; } }
0
[ "CWE-310" ]
libgadu
d882b15661ee94949919ebbbc43edf0db5f619cb
283,428,395,958,585,400,000,000,000,000,000,000,000
13
Odkąd biblioteka weryfikuje certyfikaty ciężko testować z self-signed.