func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static CURLcode load_cacert_from_memory(SSL_CTX *ctx, const struct curl_blob *ca_info_blob) { /* these need to be freed at the end */ BIO *cbio = NULL; STACK_OF(X509_INFO) *inf = NULL; /* everything else is just a reference */ int i, count = 0; X509_STORE *cts = NULL...
0
[]
curl
139a54ed0a172adaaf1a78d6f4fff50b2c3f9e08
259,228,811,385,701,500,000,000,000,000,000,000,000
60
openssl: don't leak the SRP credentials in redirects either Follow-up to 620ea21410030 Reported-by: Harry Sintonen Closes #8751
void cli_set_container(cli_ctx *ctx, cli_file_t type, size_t size) { ctx->containers[ctx->recursion].type = type; ctx->containers[ctx->recursion].size = size; }
1
[]
clamav-devel
167c0079292814ec5523d0b97a9e1b002bf8819b
258,279,323,791,059,920,000,000,000,000,000,000,000
5
fix 0.99.3 false negative of virus Pdf.Exploit.CVE_2016_1046-1.
virtual Settable_routine_parameter *get_settable_routine_parameter() { return 0; }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
122,752,216,002,176,970,000,000,000,000,000,000,000
4
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
Optimized(ExpressionContext* const expCtx, const ValueSet& cachedRhsSet, const ExpressionVector& operands) : ExpressionSetIsSubset(expCtx), _cachedRhsSet(cachedRhsSet) { _children = operands; }
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
38,888,996,032,174,913,000,000,000,000,000,000,000
6
SERVER-49404 Enforce additional checks in $arrayToObject
cmd_lock (assuan_context_t ctx, char *line) { ctrl_t ctrl = assuan_get_pointer (ctx); int rc = 0; retry: if (locked_session) { if (locked_session != ctrl->server_local) rc = gpg_error (GPG_ERR_LOCKED); } else locked_session = ctrl->server_local; #ifdef USE_NPTH if (rc && has_optio...
0
[]
gnupg
b0b3803e8c2959dd67ca96debc54b5c6464f0d41
317,535,544,258,764,460,000,000,000,000,000,000,000
31
scd: Avoid double-free on error condition in scd * scd/command.c (cmd_readkey): avoid double-free of cert -- When ksba_cert_new() fails, cert will be double-freed. Debian-Bug-Id: 773471 Original patch changed by wk to do the free only at leave.
static void destroy_browsing(void *data) { struct avrcp *session = data; session->browsing_id = 0; }
0
[ "CWE-200" ]
bluez
e2b0f0d8d63e1223bb714a9efb37e2257818268b
261,915,738,932,026,200,000,000,000,000,000,000,000
6
avrcp: Fix not checking if params_len match number of received bytes This makes sure the number of bytes in the params_len matches the remaining bytes received so the code don't end up accessing invalid memory.
TPMT_TK_AUTH_Marshal(TPMT_TK_AUTH *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; written += TPM_ST_Marshal(&source->tag, buffer, size); written += TPMI_RH_HIERARCHY_Marshal(&source->hierarchy, buffer, size); written += TPM2B_DIGEST_Marshal(&source->digest, buffer, size); return written;...
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
49,504,192,860,534,450,000,000,000,000,000,000,000
9
tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks Add maxSize parameter to TPM2B_Marshal and assert on it checking the size of the data intended to be marshaled versus the maximum buffer size. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
static int validate_and_copy_dec_ttl(struct net *net, const struct nlattr *attr, const struct sw_flow_key *key, struct sw_flow_actions **sfa, __be16 eth_type, __be16 vlan_tci, u32 mpls_label_count, bool log) { const struct nlattr *attrs[OVS_DEC_TTL_ATTR_MAX + 1]; int start...
0
[ "CWE-362", "CWE-787" ]
linux
cefa91b2332d7009bc0be5d951d6cbbf349f90f8
63,291,489,962,588,680,000,000,000,000,000,000,000
56
openvswitch: fix OOB access in reserve_sfa_size() Given a sufficiently large number of actions, while copying and reserving memory for a new action of a new flow, if next_offset is greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS...
static bool isFunctionFlag(const char *n) { return (!strncmp (n, "sym.func.", 9) || !strncmp (n, "method.", 7) || !strncmp (n, "sym.", 7) || !strncmp (n, "func.", 5) || !strncmp (n, "fcn.0", 5)); }
0
[ "CWE-125", "CWE-787" ]
radare2
52b1526443c1f433087928291d1c3d37a5600515
177,471,509,130,286,200,000,000,000,000,000,000,000
7
Fix crash in wasm disassembler
bool test_r_str_bits64(void) { char buf[65]; (void)r_str_bits64 (buf, 0); mu_assert_streq (buf, "00000000", "binary of 0"); (void)r_str_bits64 (buf, 1); mu_assert_streq (buf, "00000001", "binary of 1"); (void)r_str_bits64 (buf, 2); mu_assert_streq (buf, "00000010", "binary of 2"); mu_end; }
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
173,974,212,266,307,520,000,000,000,000,000,000,000
10
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
static int keyring_search_iterator(const void *object, void *iterator_data) { struct keyring_search_context *ctx = iterator_data; const struct key *key = keyring_ptr_to_key(object); unsigned long kflags = key->flags; kenter("{%d}", key->serial); /* ignore keys not of this type */ if (key->type != ctx->index_key...
1
[ "CWE-20" ]
linux
363b02dab09b3226f3bd1420dad9c72b79a42a76
306,047,487,916,267,800,000,000,000,000,000,000,000
64
KEYS: Fix race between updating and finding a negative key Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection error into one field such that: (1) The instantiation state can be modified/read atomically. (2) The error can be accessed atomically with the state. (3) The error isn't stored unione...
static int tls_check_preauth (const gnutls_datum_t *certdata, gnutls_certificate_status_t certstat, const char *hostname, int chainidx, int* certerr, int* savedcert) { gnutls_x509_crt_t cert; *certerr = CERTERR_VALID; *save...
0
[ "CWE-74" ]
mutt
c547433cdf2e79191b15c6932c57f1472bfb5ff4
52,407,376,716,246,630,000,000,000,000,000,000,000
103
Fix STARTTLS response injection attack. Thanks again to Damian Poddebniak and Fabian Ising from the Münster University of Applied Sciences for reporting this issue. Their summary in ticket 248 states the issue clearly: We found another STARTTLS-related issue in Mutt. Unfortunately, it affects SMTP, POP3 and IMAP...
void cgit_print_http_headers(void) { if (ctx.env.no_http && !strcmp(ctx.env.no_http, "1")) return; if (ctx.page.status) htmlf("Status: %d %s\n", ctx.page.status, ctx.page.statusmsg); if (ctx.page.mimetype && ctx.page.charset) htmlf("Content-Type: %s; charset=%s\n", ctx.page.mimetype, ctx.page.charset)...
1
[]
cgit
513b3863d999f91b47d7e9f26710390db55f9463
280,618,114,348,746,680,000,000,000,000,000,000,000
27
ui-shared: prevent malicious filename from injecting headers
const char *get_proxied_user() { return proxied_user; }
0
[]
mysql-server
25d1b7e03b9b375a243fabdf0556c063c7282361
239,870,630,854,525,550,000,000,000,000,000,000,000
1
Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string
parser_update_forward_branch (parser_mem_page_t *page_p, /**< current page */ size_t full_distance, /**< full distance */ uint8_t bytes_copied_before_jump) /**< bytes copied before jump */ { size_t new_distance = 0; while (full_distance > PARSER_CBC_STREA...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
138,994,599,638,808,140,000,000,000,000,000,000,000
16
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 hid_reset_resume(struct usb_interface *intf) { struct hid_device *hid = usb_get_intfdata(intf); int status; status = hid_post_reset(intf); if (status >= 0 && hid->driver && hid->driver->reset_resume) { int ret = hid->driver->reset_resume(hid); if (ret < 0) status = ret; } return status; }
0
[ "CWE-125", "CWE-787" ]
linux
f043bfc98c193c284e2cd768fefabe18ac2fed9b
324,275,722,025,149,700,000,000,000,000,000,000,000
13
HID: usbhid: fix out-of-bounds bug The hid descriptor identifies the length and type of subordinate descriptors for a device. If the received hid descriptor is smaller than the size of the struct hid_descriptor, it is possible to cause out-of-bounds. In addition, if bNumDescriptors of the hid descriptor have an incor...
static int imap_endofresp(struct pingpong *pp, int *resp) { char *line = pp->linestart_resp; size_t len = pp->nread_resp; struct imap_conn *imapc = &pp->conn->proto.imapc; const char *id = imapc->idstr; size_t id_len = strlen(id); if(len >= id_len + 3) { if(!memcmp(id, line, id_len) && (line[id_len] ==...
0
[ "CWE-89" ]
curl
75ca568fa1c19de4c5358fed246686de8467c238
223,610,036,539,596,250,000,000,000,000,000,000,000
23
URL sanitize: reject URLs containing bad data Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a decoded manner now use the new Curl_urldecode() function to reject URLs with embedded control codes (anything that is or decodes to a byte value less than 32). URLs containing such codes could easily oth...
epass2003_hook_path(struct sc_path *path, int inc) { u8 fid_h = path->value[path->len - 2]; u8 fid_l = path->value[path->len - 1]; switch (fid_h) { case 0x29: case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: if (inc) fid_l = fid_l * FID_STEP; else fid_l = fid_l / FID_STEP; path->value[path->...
0
[ "CWE-415", "CWE-119" ]
OpenSC
360e95d45ac4123255a4c796db96337f332160ad
339,447,031,540,749,750,000,000,000,000,000,000,000
23
fixed out of bounds writes Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problems.
gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int w, int h) { int c; int x, y; int tox, toy; int i; int colorMap[gdMaxColors]; if (dst->trueColor) { /* 2.0: much easier when the destination is truecolor. */ /* 2.0.10: needs a transparent-index check that is still valid i...
0
[ "CWE-119" ]
php-src
feba44546c27b0158f9ac20e72040a224b918c75
72,342,732,009,248,080,000,000,000,000,000,000,000
95
Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()).
void Box_iinf::derive_box_version() { if (m_children.size() > 0xFFFF) { set_version(1); } else { set_version(0); } }
0
[ "CWE-703" ]
libheif
2710c930918609caaf0a664e9c7bc3dce05d5b58
27,936,058,076,423,320,000,000,000,000,000,000,000
9
force fraction to a limited resolution to finally solve those pesky numerical edge cases
static struct inode *ext4_nfs_get_inode(struct super_block *sb, u64 ino, u32 generation) { struct inode *inode; if (ino < EXT4_FIRST_INO(sb) && ino != EXT4_ROOT_INO) return ERR_PTR(-ESTALE); if (ino > le32_to_cpu(EXT4_SB(sb)->s_es->s_inodes_count)) return ERR_PTR(-ESTALE); /* iget isn't really right if t...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
101,167,032,919,466,300,000,000,000,000,000,000,000
28
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
ssize_t rdbSaveLzfBlob(rio *rdb, void *data, size_t compress_len, size_t original_len) { unsigned char byte; ssize_t n, nwritten = 0; /* Data compressed! Let's save it on disk */ byte = (RDB_ENCVAL<<6)|RDB_ENC_LZF; if ((n = rdbWriteRaw(rdb,&byte,1)) == -1) goto writeerr; ...
0
[ "CWE-190" ]
redis
a30d367a71b7017581cf1ca104242a3c644dec0f
185,275,067,912,219,580,000,000,000,000,000,000,000
24
Fix Integer overflow issue with intsets (CVE-2021-32687) The vulnerability involves changing the default set-max-intset-entries configuration parameter to a very large value and constructing specially crafted commands to manipulate sets
static int selinux_sb_clone_mnt_opts(const struct super_block *oldsb, struct super_block *newsb) { const struct superblock_security_struct *oldsbsec = oldsb->s_security; struct superblock_security_struct *newsbsec = newsb->s_security; int set_fscontext = (oldsbsec->flags & FSCONTEXT_MNT); int set_context = (o...
0
[ "CWE-264" ]
linux
7b0d0b40cd78cadb525df760ee4cac151533c2b5
224,642,510,827,891,500,000,000,000,000,000,000,000
57
selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID. If the callee SID is bounded by the caller SID, then allowing the transition to occur poses no risk of privilege escalation and we can therefore safely allow the transition to occur. Add this exemption for both the case where a transition was explicitl...
static unsigned get_num_write_same_bios(struct dm_target *ti) { return ti->num_write_same_bios; }
0
[ "CWE-362" ]
linux
b9a41d21dceadf8104812626ef85dc56ee8a60ed
48,869,840,105,762,500,000,000,000,000,000,000,000
4
dm: fix race between dm_get_from_kobject() and __dm_destroy() The following BUG_ON was hit when testing repeat creation and removal of DM devices: kernel BUG at drivers/md/dm.c:2919! CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44 Call Trace: [<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a ...
dissect_dch_rx_timing_deviation(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, struct fp_info *p_fp_info) { guint16 timing_deviation; gint timing_deviation_chips; proto_item *timing_deviation_ti; /* CFN control...
0
[ "CWE-20" ]
wireshark
7d7190695ce2ff269fdffb04e87139995cde21f4
4,928,825,820,678,075,600,000,000,000,000,000,000
98
UMTS_FP: fix handling reserved C/T value The spec puts the reserved value at 0xf but our internal table has 'unknown' at 0; since all the other values seem to be offset-by-one, just take the modulus 0xf to avoid running off the end of the table. Bug: 12191 Change-Id: I83c8fb66797bbdee52a2246fb1eea6e37cbc7eb0 Reviewed...
xmlRegExecPushStringInternal(xmlRegExecCtxtPtr exec, const xmlChar *value, void *data, int compound) { xmlRegTransPtr trans; xmlRegAtomPtr atom; int ret; int final = 0; int progress = 1; if (exec == NULL) return(-1); if (exec->comp == NULL) return(-1); if (exec->...
0
[ "CWE-119" ]
libxml2
cbb271655cadeb8dbb258a64701d9a3a0c4835b4
296,274,448,306,071,100,000,000,000,000,000,000,000
346
Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711> * xmlregexp.c: (xmlFAParseCharRange): Only advance to the next character if there is no error. Advancing to the next character in case of an error while parsing regexp leads to an out of bounds access.
void VP8ComponentDecoder::initialize_thread_id(int thread_id, int target_thread_state, BlockBasedImagePerChannel<force_memory_optimized>& framebuffer) { if (target_thread_state) { always_assert(spin_workers_); } TimingHarness::timing[thread_id%NUM_THREA...
0
[ "CWE-1187" ]
lepton
82167c144a322cc956da45407f6dce8d4303d346
99,746,106,819,596,500,000,000,000,000,000,000,000
38
fix #87 : always check that threads_required set up the appropriate number of threads---fire off nop functions on unused threads for consistency
static int io_sqpoll_wait_sq(struct io_ring_ctx *ctx) { int ret = 0; DEFINE_WAIT(wait); do { if (!io_sqring_full(ctx)) break; prepare_to_wait(&ctx->sqo_sq_wait, &wait, TASK_INTERRUPTIBLE); if (unlikely(ctx->sqo_dead)) { ret = -EOWNERDEAD; goto out; } if (!io_sqring_full(ctx)) break; sch...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
157,440,444,188,288,840,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...
InspectableWebContents* inspectable_web_contents() const { return inspectable_web_contents_.get(); }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
169,907,372,060,401,730,000,000,000,000,000,000,000
3
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
std::string XPathIo::writeDataToFile(const std::string& orgPath) { Protocol prot = fileProtocol(orgPath); // generating the name for temp file. std::time_t timestamp = std::time(nullptr); std::stringstream ss; ss << timestamp << XPathIo::TEMP_FILE_EXT; std::string pa...
0
[ "CWE-190" ]
exiv2
c73d1e27198a389ce7caf52ac30f8e2120acdafd
81,190,171,345,061,470,000,000,000,000,000,000,000
47
Avoid negative integer overflow when `filesize < io_->tell()`. This fixes #791.
static int getmailboxidexists(void *sc, const char *extname) { script_data_t *sd = (script_data_t *)sc; const char *userid = mbname_userid(sd->mbname); char *intname = mboxlist_find_uniqueid(extname, userid, sd->authstate); int exists = intname ? 1 : 0; free(intname); return exists; }
0
[ "CWE-269" ]
cyrus-imapd
673ebd96e2efbb8895d08648983377262f35b3f7
144,499,031,969,004,520,000,000,000,000,000,000,000
9
lmtp_sieve: don't create mailbox with admin for sieve autocreate
static void padstr(char *str, const char *src, int len) { int i, v; for(i = 0; i < len; i++) { if (*src) v = *src++; else v = ' '; str[i^1] = v; } }
0
[ "CWE-189" ]
qemu
940973ae0b45c9b6817bab8e4cf4df99a9ef83d7
50,198,352,774,894,540,000,000,000,000,000,000,000
11
ide: Correct improper smart self test counter reset in ide core. The SMART self test counter was incorrectly being reset to zero, not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE: * We would write off the beginning of a dynamically allocated buffer * We forgot the SMART history Fix this. Signed-o...
bool operator()(const OpKernelContext* context, typename TTypes<float, 4>::ConstTensor grads, typename TTypes<float, 2>::ConstTensor boxes, typename TTypes<int32, 1>::ConstTensor box_index, typename TTypes<T, 4>::Tensor grads_image, ...
0
[ "CWE-703", "CWE-197" ]
tensorflow
ca8c013b5e97b1373b3bb1c97ea655e69f31a575
183,958,802,425,387,480,000,000,000,000,000,000,000
107
Prevent integer truncation from 64 to 32 bits. The `tensorflow::Shard` functions last argument must be a 2 argument function where both arguments are `int64` (`long long`, 64 bits). However, there are usages where code passes in a function where arguments are `int` or `int32` (32 bits). In these cases, it is possible ...
htmlParseScript(htmlParserCtxtPtr ctxt) { xmlChar buf[HTML_PARSER_BIG_BUFFER_SIZE + 5]; int nbchar = 0; int cur,l; SHRINK; cur = CUR_CHAR(l); while (IS_CHAR_CH(cur)) { if ((cur == '<') && (NXT(1) == '/')) { /* * One should break here, the specification is clear: ...
0
[ "CWE-399" ]
libxml2
de0cc20c29cb3f056062925395e0f68d2250a46f
156,574,970,479,375,200,000,000,000,000,000,000,000
74
Fix some buffer conversion issues https://bugzilla.gnome.org/show_bug.cgi?id=690202 Buffer overflow errors originating from xmlBufGetInputBase in 2.9.0 The pointers from the context input were not properly reset after that call which can do reallocations.
fopenTiffMemstream(const char *filename, const char *operation, l_uint8 **pdata, size_t *pdatasize) { L_MEMSTREAM *mstream; TIFF *tif; PROCNAME("fopenTiffMemstream"); if (!filename) return (TIFF *)ERROR_PTR("filename not defin...
0
[ "CWE-125" ]
leptonica
5ba34b1fe741d69d43a6c8cf767756997eadd87c
192,712,276,677,574,120,000,000,000,000,000,000,000
38
Issue 23654 in oss-fuzz: Heap-buffer-overflow in pixReadFromTiffStream * Increase scanline buffer for reading gray+alpha and converting to RGBA
CNF_SetupAccessRestrictions(void) { AllowDeny *node; int status; unsigned int i; for (i = 0; i < ARR_GetSize(ntp_restrictions); i++) { node = ARR_GetElement(ntp_restrictions, i); status = NCR_AddAccessRestriction(&node->ip, node->subnet_bits, node->allow, node->all); if (!status) { LOG_FATAL(...
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
42,616,629,293,352,480,000,000,000,000,000,000,000
25
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
mark_trusted_task_done (GObject *source_object, GAsyncResult *res, gpointer user_data) { MarkTrustedJob *job = user_data; g_object_unref (job->file); if (job->done_callback) { job->done_callback (!job_aborted ((CommonJob *) job), ...
1
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
138,291,086,758,702,850,000,000,000,000,000,000,000
16
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...
ccp_run_aes_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) { struct ccp_aes_engine *aes = &cmd->u.aes; struct ccp_dm_workarea key, ctx; struct ccp_data src, dst; struct ccp_op op; unsigned int dm_offset; bool in_place = false; int ret; if (!((aes->key_len == AES_KEYSIZE_128) || (aes->key_len == A...
0
[ "CWE-400", "CWE-401" ]
linux
128c66429247add5128c03dc1e144ca56f05a4e2
131,670,028,988,177,640,000,000,000,000,000,000,000
175
crypto: ccp - Release all allocated memory if sha type is invalid Release all allocated memory if sha type is invalid: In ccp_run_sha_cmd, if the type of sha is invalid, the allocated hmac_buf should be released. v2: fix the goto. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Acked-by: Gary R Hook <gary...
static int filter_generate(struct tree *xfm, const char *root, int *nmatches, char ***matches) { glob_t globbuf; int gl_flags = glob_flags; int r; int ret = 0; char **pathv = NULL; int pathc = 0; int root_prefix = strlen(root) - 1; *nmatches = 0; *matches ...
0
[]
augeas
163877441402e464266b45ee98e24bb652971def
223,481,739,245,595,160,000,000,000,000,000,000,000
78
Prevent symlink attacks via .augnew during saving Instead of saving into a predictable PATH.augnew file, save into a securely created PATH.augnew.XXXXXX * src/transform.c (transform_save): write changes to a temporary file in the same directory as the destination (either the file's canonical path or the path ...
static int dsdb_dn_compare_ptrs(struct ldb_dn **dn1, struct ldb_dn **dn2) { return ldb_dn_compare(*dn1, *dn2); }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
263,182,271,458,181,460,000,000,000,000,000,000,000
4
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
static int auxv_open(struct inode *inode, struct file *file) { return __mem_open(inode, file, PTRACE_MODE_READ_FSCREDS); }
0
[ "CWE-119" ]
linux
7f7ccc2ccc2e70c6054685f5e3522efa81556830
277,991,911,231,411,440,000,000,000,000,000,000,000
4
proc: do not access cmdline nor environ from file-backed areas proc_pid_cmdline_read() and environ_read() directly access the target process' VM to retrieve the command line and environment. If this process remaps these areas onto a file via mmap(), the requesting process may experience various issues such as extra de...
static inline struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t) { if (t->dst && !dst_check(t->dst, t->dst_cookie)) { dst_release(t->dst); t->dst = NULL; } return t->dst; }
0
[ "CWE-400", "CWE-399", "CWE-703" ]
linux
b69040d8e39f20d5215a03502a8e8b4c6ab78395
219,825,273,492,137,300,000,000,000,000,000,000,000
9
net: sctp: fix panic on duplicate ASCONF chunks When receiving a e.g. semi-good formed connection scan in the form of ... -------------- INIT[ASCONF; ASCONF_ACK] -------------> <----------- INIT-ACK[ASCONF; ASCONF_ACK] ------------ -------------------- COOKIE-ECHO --------------------> <-------------------- C...
path_has_prefix (const gchar *path, const gchar *prefix) { gsize len; if (prefix == NULL) return FALSE; len = strlen (prefix); if (len == 0) return FALSE; if (!g_str_has_prefix (path, prefix)) return FALSE; if (prefix[len - 1] == '/' || path[len] == '/') return TRUE; ...
0
[ "CWE-1021" ]
cockpit
8d9bc10d8128aae03dfde62fd00075fe492ead10
104,186,085,851,529,520,000,000,000,000,000,000,000
16
common: Restrict frame embedding to same origin Declare `X-Frame-Options: sameorigin` [1] so that cockpit frames can only be embedded into pages coming from the same origin. This is similar to setting CORP in commit 2b38b8de92f9a (which applies to `<script>`, `<img>`, etc.). The main use case for embedding is to run ...
int LZ4_saveDict (void* LZ4_dict, char* safeBuffer, int dictSize) { LZ4_stream_t_internal* dict = (LZ4_stream_t_internal*) LZ4_dict; const BYTE* previousDictEnd = dict->dictionary + dict->dictSize; if ((U32)dictSize > 64 KB) dictSize = 64 KB; /* useless to define a dictionary > 64 KB */ if ((U32)dict...
0
[ "CWE-20" ]
lz4
da5373197e84ee49d75b8334d4510689731d6e90
148,420,307,999,784,200,000,000,000,000,000,000,000
15
Fixed : issue 52 (reported by Ludwig Strigeus)
static int query_raw_packet_qp_state(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp, u8 *raw_packet_qp_state) { struct mlx5_ib_raw_packet_qp *raw_packet_qp = &qp->raw_packet_qp; struct mlx5_ib_sq *sq = &raw_packet_qp->sq; struct mlx5_ib_rq *rq = &raw_packet_qp->rq; int err; u8 sq_state = MLX5_SQ_...
0
[ "CWE-119", "CWE-787" ]
linux
0625b4ba1a5d4703c7fb01c497bd6c156908af00
317,481,210,728,916,800,000,000,000,000,000,000,000
26
IB/mlx5: Fix leaking stack memory to userspace mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: <stable@vger.kernel.org> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <...
unsigned int f2fs_shrink_extent_tree(struct f2fs_sb_info *sbi, int nr_shrink) { struct extent_tree *et, *next; struct extent_node *en; unsigned int node_cnt = 0, tree_cnt = 0; int remained; if (!test_opt(sbi, EXTENT_CACHE)) return 0; if (!atomic_read(&sbi->total_zombie_tree)) goto free_node; if (!mutex_tr...
0
[ "CWE-119", "CWE-787" ]
linux
dad48e73127ba10279ea33e6dbc8d3905c4d31c0
26,475,231,150,450,500,000,000,000,000,000,000,000
75
f2fs: fix a bug caused by NULL extent tree Thread A: Thread B: -f2fs_remount -sbi->mount_opt.opt = 0; <--- -f2fs_iget -do_read_inode -f2fs_init_extent_tree -F2FS_I(inode)->extent_tree is NULL -default_options && parse_options -remount return ...
add_llist_tags( char_u *tag, int num_matches, char_u **matches) { list_T *list; char_u tag_name[128 + 1]; char_u *fname; char_u *cmd; int i; char_u *p; tagptrs_T tagp; fname = alloc(MAXPATHL + 1); cmd = alloc(CMDBUFFSIZE + 1); list = list_alloc(); if (list == N...
0
[ "CWE-416" ]
vim
adce965162dd89bf29ee0e5baf53652e7515762c
289,376,323,325,273,230,000,000,000,000,000,000,000
142
patch 9.0.0246: using freed memory when 'tagfunc' deletes the buffer Problem: Using freed memory when 'tagfunc' deletes the buffer. Solution: Make a copy of the tag name.
main(const int argc, char **argv) { int n_listeners, i, clnt_length, clnt; struct pollfd *polls; LISTENER *lstn; pthread_t thr; pthread_attr_t attr; struct sched_param sp; uid_t user_id; gid_t group_id; FILE...
0
[]
pound
a0c52c542ca9620a96750f9877b26bf4c84aef1b
26,689,861,172,976,814,000,000,000,000,000,000,000
330
SSL Compression Disable patch for 2.6f This patch disables SSL/TLS compression entirely. There is no config option. This prevents CRIME attacks against SSL. Note that HTTP compression is still an option. Test your server at https://www.ssllabs.com/ssldb/ Original patch by Hereward Cooper <coops@fawk.eu> Openssl 0...
int Http2Session::OnStreamClose(nghttp2_session* handle, int32_t id, uint32_t code, void* user_data) { Http2Session* session = static_cast<Http2Session*>(user_data); Environment* env = session->env(); Isolate* isolate ...
0
[ "CWE-416" ]
node
a3c33d4ce78f74d1cf1765704af5b427aa3840a6
214,843,794,225,875,180,000,000,000,000,000,000,000
32
http2: update handling of rst_stream with error code NGHTTP2_CANCEL The PR updates the handling of rst_stream frames and adds all streams to the pending list on receiving rst frames with the error code NGHTTP2_CANCEL. The changes will remove dependency on the stream state that may allow bypassing the checks in certai...
bgp_rx(sock *sk, uint size) { struct bgp_conn *conn = sk->data; struct bgp_proto *p = conn->bgp; byte *pkt_start = sk->rbuf; byte *end = pkt_start + size; unsigned i, len; DBG("BGP: RX hook: Got %d bytes\n", size); while (end >= pkt_start + BGP_HEADER_LENGTH) { if ((conn->state == BS_CLOSE) || ...
0
[ "CWE-787" ]
bird
1657c41c96b3c07d9265b07dd4912033ead4124b
21,251,310,490,666,815,000,000,000,000,000,000,000
37
BGP: Fix bugs in handling of shutdown messages There is an improper check for valid message size, which may lead to stack overflow and buffer leaks to log when a large message is received. Thanks to Daniel McCarney for bugreport and analysis.
virtual bool excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred) { return false; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
229,617,020,052,150,840,000,000,000,000,000,000,000
2
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
ip_get_result_string_obj(interp) Tcl_Interp *interp; { #if TCL_MAJOR_VERSION >= 8 Tcl_Obj *retObj; volatile VALUE strval; retObj = Tcl_GetObjResult(interp); Tcl_IncrRefCount(retObj); strval = get_str_from_obj(retObj); RbTk_OBJ_UNTRUST(strval); Tcl_ResetResult(interp); Tcl_DecrRefCou...
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
267,633,697,286,910,500,000,000,000,000,000,000,000
18
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
void kvm_hv_invalidate_tsc_page(struct kvm *kvm) { struct kvm_hv *hv = to_kvm_hv(kvm); u64 gfn; int idx; if (hv->hv_tsc_page_status == HV_TSC_PAGE_BROKEN || hv->hv_tsc_page_status == HV_TSC_PAGE_UNSET || tsc_page_update_unsafe(hv)) return; mutex_lock(&hv->hv_lock); if (!(hv->hv_tsc_page & HV_X64_MS...
0
[ "CWE-476" ]
linux
7ec37d1cbe17d8189d9562178d8b29167fe1c31a
239,965,303,848,936,500,000,000,000,000,000,000,000
37
KVM: x86: Check lapic_in_kernel() before attempting to set a SynIC irq When KVM_CAP_HYPERV_SYNIC{,2} is activated, KVM already checks for irqchip_in_kernel() so normally SynIC irqs should never be set. It is, however, possible for a misbehaving VMM to write to SYNIC/STIMER MSRs causing erroneous behavior. The immedi...
void __fastcall TCustomDialog::Changed() { bool CanSubmit = true; DoChange(CanSubmit); EnableControl(OKButton, CanSubmit); }
0
[ "CWE-787" ]
winscp
faa96e8144e6925a380f94a97aa382c9427f688d
109,125,003,939,592,600,000,000,000,000,000,000,000
6
Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs https://winscp.net/tracker/1943 (cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0) Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b
void jpc_qmfb_split_col(jpc_fix_t *a, int numrows, int stride, int parity) { int bufsize = JPC_CEILDIVPOW2(numrows, 1); jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; jpc_fix_t *buf = splitbuf; register jpc_fix_t *srcptr; register jpc_fix_t *dstptr; register int n; register int m; int hstartcol; /* Get a buffer. *...
1
[ "CWE-119", "CWE-787" ]
jasper
4a59cfaf9ab3d48fca4a15c0d2674bf7138e3d1a
164,366,075,846,456,620,000,000,000,000,000,000,000
61
Fixed a buffer overrun problem in the QMFB code in the JPC codec that was caused by a buffer being allocated with a size that was too small in some cases. Added a new regression test case.
static int compat_sock_ioctl_trans(struct file *file, struct socket *sock, unsigned int cmd, unsigned long arg) { void __user *argp = compat_ptr(arg); struct sock *sk = sock->sk; struct net *net = sock_net(sk); if (cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) return compat_ifr_data_ioctl(net, cmd, ...
0
[ "CWE-362" ]
linux
6d8c50dcb029872b298eea68cc6209c866fd3e14
92,324,431,816,248,220,000,000,000,000,000,000,000
96
socket: close race condition between sock_close() and sockfs_setattr() fchownat() doesn't even hold refcnt of fd until it figures out fd is really needed (otherwise is ignored) and releases it after it resolves the path. This means sock_close() could race with sockfs_setattr(), which leads to a NULL pointer dereferenc...
static GF_Err lsr_read_restore(GF_LASeRCodec *lsr, GF_List *com_list) { lsr_read_byte_align_string(lsr, NULL, "groupID"); lsr_read_any_attribute(lsr, NULL, 1); return GF_OK; }
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
50,881,533,450,607,620,000,000,000,000,000,000,000
6
fixed #2213
int snd_usb_set_cur_mix_value(struct usb_mixer_elem_info *cval, int channel, int index, int value) { int err; unsigned int read_only = (channel == 0) ? cval->master_readonly : cval->ch_readonly & (1 << (channel - 1)); if (read_only) { usb_audio_dbg(cval->head.mixer->chip, "%s(): channel %d of...
0
[ "CWE-416", "CWE-787" ]
linux
124751d5e63c823092060074bd0abaae61aaa9c4
66,435,903,693,398,220,000,000,000,000,000,000,000
24
ALSA: usb-audio: Kill stray URB at exiting USB-audio driver may leave a stray URB for the mixer interrupt when it exits by some error during probe. This leads to a use-after-free error as spotted by syzkaller like: ================================================================== BUG: KASAN: use-after-free in sn...
static int cm_establish(struct ib_cm_id *cm_id) { struct cm_id_private *cm_id_priv; struct cm_work *work; unsigned long flags; int ret = 0; work = kmalloc(sizeof *work, GFP_ATOMIC); if (!work) return -ENOMEM; cm_id_priv = container_of(cm_id, struct cm_id_private, id); spin_lock_irqsave(&cm_id_priv->lock, fl...
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
64,764,199,976,052,620,000,000,000,000,000,000,000
48
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
bool retpoline_module_ok(bool has_retpoline) { if (spectre_v2_enabled == SPECTRE_V2_NONE || has_retpoline) return true; pr_err("System may be vulnerable to spectre v2\n"); spectre_v2_bad_module = true; return false; }
0
[]
linux
a2059825986a1c8143fd6698774fa9d83733bb11
207,598,517,499,555,080,000,000,000,000,000,000,000
9
x86/speculation: Enable Spectre v1 swapgs mitigations The previous commit added macro calls in the entry code which mitigate the Spectre v1 swapgs issue if the X86_FEATURE_FENCE_SWAPGS_* features are enabled. Enable those features where applicable. The mitigations may be disabled with "nospectre_v1" or "mitigations...
void nft_reg_track_update(struct nft_regs_track *track, const struct nft_expr *expr, u8 dreg, u8 len) { unsigned int regcount; int i; __nft_reg_track_clobber(track, dreg); regcount = DIV_ROUND_UP(len, NFT_REG32_SIZE); for (i = 0; i < regcount; i++, dreg++) __nft_reg_track_update(track, expr, dreg, i); }
0
[]
net
520778042ccca019f3ffa136dd0ca565c486cedd
157,032,007,419,777,070,000,000,000,000,000,000,000
12
netfilter: nf_tables: disallow non-stateful expression in sets earlier Since 3e135cd499bf ("netfilter: nft_dynset: dynamic stateful expression instantiation"), it is possible to attach stateful expressions to set elements. cd5125d8f518 ("netfilter: nf_tables: split set destruction in deactivate and destroy phase") in...
isdn_net_close(struct net_device *dev) { struct net_device *p; #ifdef CONFIG_ISDN_X25 struct concap_proto *cprot = ((isdn_net_local *)netdev_priv(dev))->netdev->cprot; /* printk(KERN_DEBUG "isdn_net_close %s\n" , dev-> name); */ #endif #ifdef CONFIG_ISDN_X25 if (cprot && cprot->pops) cprot->pops->close(cprot); #...
0
[ "CWE-119" ]
linux
9f5af546e6acc30f075828cb58c7f09665033967
253,548,809,483,406,150,000,000,000,000,000,000,000
31
isdn/i4l: fix buffer overflow This fixes a potential buffer overflow in isdn_net.c caused by an unbounded strcpy. [ ISDN seems to be effectively unmaintained, and the I4L driver in particular is long deprecated, but in case somebody uses this.. - Linus ] Signed-off-by: Jiten Thakkar <jitenmt@gmail.com> Signed-...
static int fuse_readpages_fill(void *_data, struct page *page) { struct fuse_fill_data *data = _data; struct fuse_req *req = data->req; struct inode *inode = data->inode; struct fuse_conn *fc = get_fuse_conn(inode); fuse_wait_on_page_writeback(inode, page->index); if (req->num_pages && (req->num_pages == F...
0
[ "CWE-399", "CWE-835" ]
linux
3ca8138f014a913f98e6ef40e939868e1e9ea876
217,335,935,576,720,470,000,000,000,000,000,000,000
40
fuse: break infinite loop in fuse_fill_write_pages() I got a report about unkillable task eating CPU. Further investigation shows, that the problem is in the fuse_fill_write_pages() function. If iov's first segment has zero length, we get an infinite loop, because we never reach iov_iter_advance() call. Fix this by c...
size_t size() const override { return sizeof(T) * elem_; }
0
[ "CWE-345" ]
tensorflow
abcced051cb1bd8fb05046ac3b6023a7ebcc4578
242,524,303,360,270,140,000,000,000,000,000,000,000
1
Prevent crashes when loading tensor slices with unsupported types. Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL) messages for the unset and unsupported types. PiperOrigin-RevId: 392695027 Change-Id: I4beda7db950db951d273e3259a7c8534ece49354
static inline int l2cap_do_send(struct sock *sk, struct msghdr *msg, int len) { struct l2cap_conn *conn = l2cap_pi(sk)->conn; struct sk_buff *skb, **frag; int err, hlen, count, sent = 0; struct l2cap_hdr *lh; BT_DBG("sk %p len %d", sk, len); /* First fragment (with L2CAP header) */ if (sk->sk_type == SOCK_DGRA...
0
[ "CWE-200", "CWE-119", "CWE-787" ]
linux
f2fcfcd670257236ebf2088bbdf26f6a8ef459fe
169,893,639,145,585,230,000,000,000,000,000,000,000
67
Bluetooth: Add configuration support for ERTM and Streaming mode Add support to config_req and config_rsp to configure ERTM and Streaming mode. If the remote device specifies ERTM or Streaming mode, then the same mode is proposed. Otherwise ERTM or Basic mode is used. And in case of a state 2 device, the remote device...
xfs_blkdev_get( xfs_mount_t *mp, const char *name, struct block_device **bdevp) { int error = 0; *bdevp = blkdev_get_by_path(name, FMODE_READ|FMODE_WRITE|FMODE_EXCL, mp); if (IS_ERR(*bdevp)) { error = PTR_ERR(*bdevp); xfs_warn(mp, "Invalid device [%s], error=%d", name, error); } return error; ...
0
[ "CWE-416" ]
linux
c9fbd7bbc23dbdd73364be4d045e5d3612cf6e82
212,149,748,768,334,300,000,000,000,000,000,000,000
16
xfs: clear sb->s_fs_info on mount failure We recently had an oops reported on a 4.14 kernel in xfs_reclaim_inodes_count() where sb->s_fs_info pointed to garbage and so the m_perag_tree lookup walked into lala land. Essentially, the machine was under memory pressure when the mount was being run, xfs_fs_fill_super() fa...
static int packet_direct_xmit(struct sk_buff *skb) { #ifdef CONFIG_NETFILTER_EGRESS if (nf_hook_egress_active()) { skb = nf_hook_direct_egress(skb); if (!skb) return NET_XMIT_DROP; } #endif return dev_direct_xmit(skb, packet_pick_tx_queue(skb)); }
0
[ "CWE-415" ]
linux
ec6af094ea28f0f2dda1a6a33b14cd57e36a9755
239,336,405,038,397,700,000,000,000,000,000,000,000
11
net/packet: rx_owner_map depends on pg_vec Packet sockets may switch ring versions. Avoid misinterpreting state between versions, whose fields share a union. rx_owner_map is only allocated with a packet ring (pg_vec) and both are swapped together. If pg_vec is NULL, meaning no packet ring was allocated, then neither w...
static unsigned php_ifd_get32u(void *void_value, int motorola_intel) { uchar *value = (uchar *) void_value; if (motorola_intel) { return ((unsigned)value[0] << 24) | ((unsigned)value[1] << 16) | ((unsigned)value[2] << 8 ) | ((unsigned)value[3] ); } else { return ((unsigned)value[3] << 24) ...
0
[ "CWE-125" ]
php-src
0c77b4307df73217283a4aaf9313e1a33a0967ff
173,097,194,354,759,000,000,000,000,000,000,000,000
15
Fixed bug #79282
void CModule::AddJob(CModuleJob* pJob) { CThreadPool::Get().addJob(pJob); m_sJobs.insert(pJob); }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
21,217,681,002,494,415,000,000,000,000,000,000,000
4
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
is_array_assignment() { udvt_entry *udv; struct value newvalue; int index; TBOOLEAN looks_OK = FALSE; int brackets; if (!isletter(c_token) || !equals(c_token+1, "[")) return FALSE; /* There are other legal commands where the 2nd token is [ * e.g. "plot [min:max] foo" * so we ch...
0
[ "CWE-415" ]
gnuplot
052cbd17c3cbbc602ee080b2617d32a8417d7563
246,830,856,807,446,950,000,000,000,000,000,000,000
51
successive failures of "set print <foo>" could cause double-free Bug #2312
static int on_map(h2_stream_state_t state, int map[H2_SS_MAX]) { int op = map[state]; switch (op) { case S_XXX: case S_ERR: return op; case S_NOP: return state; default: return op-1; } }
0
[ "CWE-770" ]
mod_h2
dd05d49abe0f67512ce9ed5ba422d7711effecfb
36,262,192,325,334,250,000,000,000,000,000,000,000
13
* fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now, mpm event backport to 2.4.x up for vote). * Fixes stream cleanup when connection throttling is in place. * Counts stream resets by client on streams initiated by client as cause for connection throttling. * Header length checks are no...
int FLTCheckFeatureIdFilters(FilterEncodingNode *psFilterNode, mapObj *map, int i) { int status = MS_SUCCESS; if (psFilterNode->eType == FILTER_NODE_TYPE_FEATUREID) { char** tokens; int nTokens = 0; layerObj* lp; int j; lp = GET_LAY...
0
[ "CWE-200", "CWE-119" ]
mapserver
e52a436c0e1c5e9f7ef13428dba83194a800f4df
151,753,150,699,106,380,000,000,000,000,000,000,000
43
security fix (patch by EvenR)
pci_parse_slot(char *opt) { struct businfo *bi; struct slotinfo *si; char *emul, *config, *str, *cp, *b = NULL; int error, bnum, snum, fnum; error = -1; str = strdup(opt); if (!str) { fprintf(stderr, "%s: strdup returns NULL\n", __func__); return -1; } emul = config = NULL; cp = str; str = strsep(&cp, ...
0
[ "CWE-617", "CWE-703" ]
acrn-hypervisor
6199e653418eda58cd698d8769820904453e2535
37,963,793,967,785,745,000,000,000,000,000,000,000
73
dm: validate the input in 'pci_emul_mem_handler()' checking the inputs explicitly instead of using Assert. Tracked-On: #4003 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
static void connection_lost(struct avdtp *session, int err) { char address[18]; session = avdtp_ref(session); ba2str(device_get_address(session->device), address); DBG("Disconnected from %s", address); g_slist_foreach(session->streams, (GFunc) release_stream, session); session->streams = NULL; finalize_disco...
0
[ "CWE-703" ]
bluez
7a80d2096f1b7125085e21448112aa02f49f5e9a
115,584,249,346,017,500,000,000,000,000,000,000,000
18
avdtp: Fix accepting invalid/malformed capabilities Check if capabilities are valid before attempting to copy them.
Field *Type_handler_blob_common::make_conversion_table_field(TABLE *table, uint metadata, const Field *target) const { uint pack_length= m...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
331,601,686,357,338,880,000,000,000,000,000,000,000
12
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
png_gamma_8bit_correct(unsigned int value, png_fixed_point gamma_val) { if (value > 0 && value < 255) { # ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED /* 'value' is unsigned, ANSI-C90 requires the compiler to correctly * convert this to a floating point value. This includes values that ...
0
[ "CWE-476" ]
libpng
812768d7a9c973452222d454634496b25ed415eb
253,319,164,489,961,950,000,000,000,000,000,000,000
45
[libpng16] Fixed a potential null pointer dereference in png_set_text_2() (bug report and patch by Patrick Keshishian).
print_lcp_config_options(netdissect_options *ndo, const u_char *p, int length) { int len, opt; if (length < 2) return 0; ND_TCHECK2(*p, 2); len = p[1]; opt = p[0]; if (length < len) return 0; if (len < 2) { if ((opt >= LCPOPT_MIN) && (opt <= LCPOPT_MAX)) ND_PRINT((ndo, "\n\t %...
1
[ "CWE-125", "CWE-787" ]
tcpdump
7029d15f148ef24bb7c6668bc640f5470d085e5a
85,870,603,559,755,680,000,000,000,000,000,000,000
218
CVE-2017-13029/PPP: Fix a bounds check, and clean up other bounds checks. For configuration protocol options, use ND_TCHECK() and ND_TCHECK_nBITS() macros, passing them the appropriate pointer argument. This fixes one case where the ND_TCHECK2() call they replace was not checking enough bytes. This fixes a buffer ove...
cin_ends_in(char_u *s, char_u *find, char_u *ignore) { char_u *p = s; char_u *r; int len = (int)STRLEN(find); while (*p != NUL) { p = cin_skipcomment(p); if (STRNCMP(p, find, len) == 0) { r = skipwhite(p + len); if (ignore != NULL && STRNCMP(r, ignore, STRLEN(ignore)) == 0) r = skip...
0
[ "CWE-122", "CWE-787" ]
vim
2de9b7c7c8791da8853a9a7ca9c467867465b655
71,833,121,332,232,090,000,000,000,000,000,000,000
22
patch 8.2.3625: illegal memory access when C-indenting Problem: Illegal memory access when C-indenting. Solution: Also set the cursor column.
uint FIFOSampleBuffer::adjustAmountOfSamples(uint numSamples) { if (numSamples < samplesInBuffer) { samplesInBuffer = numSamples; } return samplesInBuffer; }
0
[ "CWE-617" ]
soundtouch
107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260
282,169,183,410,556,250,000,000,000,000,000,000,000
8
Replaced illegal-number-of-channel assertions with run-time exception
static zend_always_inline void zend_array_dup_packed_elements(HashTable *source, HashTable *target, int with_holes) { Bucket *p = source->arData; Bucket *q = target->arData; Bucket *end = p + source->nNumUsed; do { if (!zend_array_dup_element(source, target, 0, p, q, 1, 1, with_holes)) { if (with_holes) { ...
0
[ "CWE-190" ]
php-src
4cc0286f2f3780abc6084bcdae5dce595daa3c12
197,358,419,727,758,700,000,000,000,000,000,000,000
15
Fix #73832 - leave the table in a safe state if the size is too big.
static int udf_find_fileset(struct super_block *sb, struct kernel_lb_addr *fileset, struct kernel_lb_addr *root) { struct buffer_head *bh = NULL; long lastblock; uint16_t ident; struct udf_sb_info *sbi; if (fileset->logicalBlockNum != 0xFFFFFFFF || fileset->partitionReferenceNum != 0xFFFF) { ...
0
[ "CWE-119", "CWE-787" ]
linux
1df2ae31c724e57be9d7ac00d78db8a5dabdd050
335,124,400,939,541,720,000,000,000,000,000,000,000
89
udf: Fortify loading of sparing table Add sanity checks when loading sparing table from disk to avoid accessing unallocated memory or writing to it. Signed-off-by: Jan Kara <jack@suse.cz>
static void dma_cache_maint_page(struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, void (*op)(const void *, size_t, int)) { unsigned long pfn; size_t left = size; pfn = page_to_pfn(page) + offset / PAGE_SIZE; offset %= PAGE_SIZE; /* * A single sg entry may refer to multiple p...
0
[ "CWE-284", "CWE-264" ]
linux
0ea1ec713f04bdfac343c9702b21cd3a7c711826
263,869,870,457,724,140,000,000,000,000,000,000,000
46
ARM: dma-mapping: don't allow DMA mappings to be marked executable DMA mapping permissions were being derived from pgprot_kernel directly without using PAGE_KERNEL. This causes them to be marked with executable permission, which is not what we want. Fix this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk...
openhost( const char *hname, int fam ) { const char svc[] = "ntp"; char temphost[LENHOSTNAME]; int a_info, i; struct addrinfo hints, *ai; sockaddr_u addr; size_t octets; register const char *cp; char name[LENHOSTNAME]; /* * We need to get by the [] if they were entered */ cp = hname; if (*cp ==...
0
[ "CWE-20" ]
ntp
07a5b8141e354a998a52994c3c9cd547927e56ce
272,767,619,951,401,430,000,000,000,000,000,000,000
168
[TALOS-CAN-0063] avoid buffer overrun in ntpq
void zend_ts_hash_display_pListTail(TsHashTable *ht) { begin_read(ht); zend_hash_display_pListTail(TS_HASH(ht)); end_read(ht); }
0
[]
php-src
24125f0f26f3787c006e4a51611ba33ee3b841cb
36,649,553,942,255,937,000,000,000,000,000,000,000
6
Fixed bug #68676 (Explicit Double Free)
int rdma_set_ib_paths(struct rdma_cm_id *id, struct ib_sa_path_rec *path_rec, int num_paths) { struct rdma_id_private *id_priv; int ret; id_priv = container_of(id, struct rdma_id_private, id); if (!cma_comp_exch(id_priv, RDMA_CM_ADDR_RESOLVED, RDMA_CM_ROUTE_RESOLVED)) return -EINVAL; id->route.pa...
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
148,083,048,671,131,970,000,000,000,000,000,000,000
24
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
reportDefault(XML_Parser parser, const ENCODING *enc, const char *s, const char *end) { if (MUST_CONVERT(enc, s)) { enum XML_Convert_Result convert_res; const char **eventPP; const char **eventEndPP; if (enc == encoding) { eventPP = &eventPtr; eventEndPP = &eventEndPtr; }...
0
[ "CWE-190" ]
libexpat
d4f735b88d9932bd5039df2335eefdd0723dbe20
124,911,962,584,864,540,000,000,000,000,000,000,000
26
Detect integer overflow (CVE-2016-9063) Needs XML_CONTEXT_BYTES to be _undefined_ to trigger, default is defined and set to 1024. Previously patched downstream, e.g. https://sources.debian.net/src/expat/2.2.0-2/debian/patches/CVE-2016-9063.patch/ https://bug1274777.bmoattachments.org/attachment.cgi?id=8755538 This v...
int agp_unbind_memory(struct agp_memory *curr) { int ret_val; if (curr == NULL) return -EINVAL; if (!curr->is_bound) { printk(KERN_INFO PFX "memory %p was not bound!\n", curr); return -EINVAL; } ret_val = curr->bridge->driver->remove_memory(curr, curr->pg_start, curr->type); if (ret_val != 0) return r...
0
[ "CWE-190" ]
linux-2.6
194b3da873fd334ef183806db751473512af29ce
307,665,603,527,590,260,000,000,000,000,000,000,000
24
agp: fix arbitrary kernel memory writes pg_start is copied from userspace on AGPIOC_BIND and AGPIOC_UNBIND ioctl cmds of agp_ioctl() and passed to agpioc_bind_wrap(). As said in the comment, (pg_start + mem->page_count) may wrap in case of AGPIOC_BIND, and it is not checked at all in case of AGPIOC_UNBIND. As a resu...
static bool fuse_emit(struct file *file, struct dir_context *ctx, struct fuse_dirent *dirent) { struct fuse_file *ff = file->private_data; if (ff->open_flags & FOPEN_CACHE_DIR) fuse_add_dirent_to_cache(file, dirent, ctx->pos); return dir_emit(ctx, dirent->name, dirent->namelen, dirent->ino, dirent->ty...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
237,480,378,647,448,160,000,000,000,000,000,000,000
11
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
compare_tor_version_str_ptr_(const void **_a, const void **_b) { const char *a = *_a, *b = *_b; int ca, cb; tor_version_t va, vb; ca = tor_version_parse(a, &va); cb = tor_version_parse(b, &vb); /* If they both parse, compare them. */ if (!ca && !cb) return tor_version_compare(&va,&vb); /* If one par...
0
[ "CWE-119" ]
tor
d978216dea6b21ac38230a59d172139185a68dbd
82,846,915,692,892,280,000,000,000,000,000,000,000
19
Fix parsing bug with unecognized token at EOS In get_token(), we could read one byte past the end of the region. This is only a big problem in the case where the region itself is (a) potentially hostile, and (b) not explicitly nul-terminated. This patch fixes the underlying bug, and also makes sure that the one remai...
static int sctp_process_param(struct sctp_association *asoc, union sctp_params param, const union sctp_addr *peer_addr, gfp_t gfp) { struct net *net = sock_net(asoc->base.sk); union sctp_addr addr; int i; __u16 sat; int retval = 1; sctp_scope_t scope; time_t stale; struct sctp_af *af;...
1
[ "CWE-399" ]
net
e40607cbe270a9e8360907cb1e62ddf0736e4864
24,120,447,783,483,690,000,000,000,000,000,000,000
206
net: sctp: fix NULL pointer dereference in af->from_addr_param on malformed packet An SCTP server doing ASCONF will panic on malformed INIT ping-of-death in the form of: ------------ INIT[PARAM: SET_PRIMARY_IP] ------------> While the INIT chunk parameter verification dissects through many things in order to detec...
yaffsfs_jblk_walk(TSK_FS_INFO * /*info*/, TSK_DADDR_T /*daddr*/, TSK_DADDR_T /*daddrt*/, int /*entry*/, TSK_FS_JBLK_WALK_CB /*cb*/, void * /*fn*/) { tsk_error_reset(); tsk_error_set_errno(TSK_ERR_FS_UNSUPFUNC); tsk_error_set_errstr("Journal support for YAFFS is not implemented"); return 1; }
0
[ "CWE-125", "CWE-787" ]
sleuthkit
459ae818fc8dae717549810150de4d191ce158f1
92,203,165,682,900,790,000,000,000,000,000,000,000
9
Fix stack buffer overflow in yaffsfs_istat Prevent a stack buffer overflow in yaffsfs_istat by increasing the buffer size to the size required by tsk_fs_time_to_str.
drv_Name(TERMINAL_CONTROL_BLOCK * TCB) { (void) TCB; return "tinfo"; }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
179,212,820,335,738,320,000,000,000,000,000,000,000
5
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
GF_Box *trun_box_new() { ISOM_DECL_BOX_ALLOC(GF_TrackFragmentRunBox, GF_ISOM_BOX_TYPE_TRUN); //NO FLAGS SET BY DEFAULT return (GF_Box *)tmp;
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
318,124,397,994,001,930,000,000,000,000,000,000,000
6
fixed #1587
guestfs___check_package_management (guestfs_h *g, struct inspect_fs *fs) { switch (fs->distro) { case OS_DISTRO_FEDORA: case OS_DISTRO_MEEGO: fs->package_management = OS_PACKAGE_MANAGEMENT_YUM; break; case OS_DISTRO_REDHAT_BASED: case OS_DISTRO_RHEL: case OS_DISTRO_CENTOS: case OS_DISTRO_SCIENTIF...
0
[ "CWE-703" ]
libguestfs
fa6a76050d82894365dfe32916903ef7fee3ffcd
283,037,404,270,304,300,000,000,000,000,000,000,000
56
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...
handle_log_exit(void) { u_int i; for (i = 0; i < num_handles; i++) if (handles[i].use != HANDLE_UNUSED) handle_log_close(i, "forced"); }
0
[ "CWE-732", "CWE-703", "CWE-269" ]
src
a6981567e8e215acc1ef690c8dbb30f2d9b00a19
321,304,597,352,772,600,000,000,000,000,000,000,000
8
disallow creation (of empty files) in read-only mode; reported by Michal Zalewski, feedback & ok deraadt@
static void ZEND_FASTCALL increment_string(zval *str) /* {{{ */ { int carry=0; size_t pos=Z_STRLEN_P(str)-1; char *s; zend_string *t; int last=0; /* Shut up the compiler warning */ int ch; if (Z_STRLEN_P(str) == 0) { zval_ptr_dtor_str(str); ZVAL_INTERNED_STR(str, ZSTR_CHAR('1')); return; } if (!Z_REFCO...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
53,734,839,543,489,375,000,000,000,000,000,000,000
83
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.
int may_umount_tree(struct vfsmount *m) { struct mount *mnt = real_mount(m); int actual_refs = 0; int minimum_refs = 0; struct mount *p; BUG_ON(!m); /* write lock needed for mnt_get_count */ br_write_lock(&vfsmount_lock); for (p = mnt; p; p = next_mnt(p, mnt)) { actual_refs += mnt_get_count(p); minimum_ref...
0
[ "CWE-284", "CWE-264" ]
linux
3151527ee007b73a0ebd296010f1c0454a919c7d
101,562,385,013,508,570,000,000,000,000,000,000,000
21
userns: Don't allow creation if the user is chrooted Guarantee that the policy of which files may be access that is established by setting the root directory will not be violated by user namespaces by verifying that the root directory points to the root of the mount namespace at the time of user namespace creation. ...
static void vmx_inject_irq(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); uint32_t intr; int irq = vcpu->arch.interrupt.nr; trace_kvm_inj_virq(irq); ++vcpu->stat.irq_injections; if (vmx->rmode.vm86_active) { int inc_eip = 0; if (vcpu->arch.interrupt.soft) inc_eip = vcpu->arch.event_exit_in...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
191,307,973,688,721,700,000,000,000,000,000,000,000
27
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
xmlChildElementCount(xmlNodePtr parent) { unsigned long ret = 0; xmlNodePtr cur = NULL; if (parent == NULL) return(0); switch (parent->type) { case XML_ELEMENT_NODE: case XML_ENTITY_NODE: case XML_DOCUMENT_NODE: case XML_DOCUMENT_FRAG_NODE: case XML_HTML_...
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
6,320,641,035,176,019,000,000,000,000,000,000,000
24
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...
void mp_encode_lua_integer(lua_State *L, mp_buf *buf) { #if (LUA_VERSION_NUM < 503) && BITS_32 lua_Number i = lua_tonumber(L,-1); #else lua_Integer i = lua_tointeger(L,-1); #endif mp_encode_int(L, buf, (int64_t)i); }
0
[ "CWE-119", "CWE-787" ]
redis
52a00201fca331217c3b4b8b634f6a0f57d6b7d3
296,717,191,800,949,750,000,000,000,000,000,000,000
8
Security: fix Lua cmsgpack library stack overflow. During an auditing effort, the Apple Vulnerability Research team discovered a critical Redis security issue affecting the Lua scripting part of Redis. -- Description of the problem Several years ago I merged a pull request including many small changes at the Lua Msg...