func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void rsi_indicate_tx_status(struct rsi_hw *adapter, struct sk_buff *skb, int status) { struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct skb_info *tx_params; if (!adapter->hw) { rsi_dbg(ERR_ZONE, "##### No MAC #####\n"); return; } if (!status) info->flags |= IEEE80211_TX_STAT_ACK...
0
[ "CWE-416" ]
linux
abd39c6ded9db53aa44c2540092bdd5fb6590fa8
234,061,675,124,419,600,000,000,000,000,000,000,000
21
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 <...
static UINT rdpei_send_touch_event_pdu(RDPEI_CHANNEL_CALLBACK* callback, RDPINPUT_TOUCH_FRAME* frame) { UINT status; wStream* s; UINT32 pduLength; pduLength = 64 + (frame->contactCount * 64); s = Stream_New(NULL, pduLength); if (!s) { WLog_ERR(TAG, "Stream_New failed!");...
0
[ "CWE-125" ]
FreeRDP
6b485b146a1b9d6ce72dfd7b5f36456c166e7a16
203,189,316,792,586,700,000,000,000,000,000,000,000
37
Fixed oob read in irp_write and similar
TfLiteExternalContext* Subgraph::GetExternalContext( TfLiteExternalContextType type) { if (static_cast<int>(type) >= 0 && type < kTfLiteMaxExternalContexts) { return external_contexts_[type]; } return nullptr; }
0
[ "CWE-20", "CWE-787" ]
tensorflow
d58c96946b2880991d63d1dacacb32f0a4dfa453
157,083,091,491,603,160,000,000,000,000,000,000,000
7
[tflite] Ensure inputs and outputs don't overlap. If a model uses the same tensor for both an input and an output then this can result in data loss and memory corruption. This should not happen. PiperOrigin-RevId: 332522916 Change-Id: If0905b142415a9dfceaf2d181872f2a8fb88f48a
static int jas_iccgetuint16(jas_stream_t *in, jas_iccuint16_t *val) { jas_ulonglong tmp; if (jas_iccgetuint(in, 2, &tmp)) return -1; *val = tmp; return 0; }
0
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
246,530,407,848,327,760,000,000,000,000,000,000,000
8
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
void test_nghttp2_session_create_idle_stream(void) { nghttp2_session *session; nghttp2_session_callbacks callbacks; nghttp2_stream *stream2, *stream4, *stream8, *stream10; nghttp2_priority_spec pri_spec; int rv; int i; memset(&callbacks, 0, sizeof(callbacks)); callbacks.send_callback = null_send_callba...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
304,882,570,534,489,500,000,000,000,000,000,000,000
137
Add nghttp2_option_set_max_outbound_ack
SSL_CTX_use_PrivateKey_blob(SSL_CTX *ctx, const struct curl_blob *blob, int type, const char *key_passwd) { int ret = 0; EVP_PKEY *pkey = NULL; BIO *in = BIO_new_mem_buf(blob->data, (int)(blob->len)); if(!in) return CURLE_OUT_OF_MEMORY; if(type == SSL_FILETYPE_PEM) pkey = P...
0
[ "CWE-416", "CWE-295" ]
curl
7f4a9a9b2a49547eae24d2e19bc5c346e9026479
119,059,008,818,337,210,000,000,000,000,000,000,000
28
openssl: associate/detach the transfer from connection CVE-2021-22901 Bug: https://curl.se/docs/CVE-2021-22901.html
static void LRUTestMode(void) { redisReply *reply; char key[128]; long long start_cycle; int j; srand(time(NULL)^getpid()); while(1) { /* Perform cycles of 1 second with 50% writes and 50% reads. * We use pipelining batching writes / reads N times per cycle in order * ...
0
[ "CWE-119", "CWE-787" ]
redis
9fdcc15962f9ff4baebe6fdd947816f43f730d50
321,207,769,484,721,500,000,000,000,000,000,000,000
60
Security: fix redis-cli buffer overflow. Thanks to Fakhri Zulkifli for reporting it. The fix switched to dynamic allocation, copying the final prompt in the static buffer only at the end.
rsvg_new_filter_primitive_gaussian_blur (void) { RsvgFilterPrimitiveGaussianBlur *filter; filter = g_new (RsvgFilterPrimitiveGaussianBlur, 1); _rsvg_node_init (&filter->super.super, RSVG_NODE_TYPE_FILTER_PRIMITIVE_GAUSSIAN_BLUR); filter->super.in = g_string_new ("none"); filter->super.result = g_str...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
262,974,492,486,958,300,000,000,000,000,000,000,000
16
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
static int parse_json(ogs_sbi_message_t *message, char *content_type, char *json) { int rv = OGS_OK; cJSON *item = NULL; ogs_assert(message); if (!json) return OGS_OK; if (!content_type) { ogs_error("No Content-type"); return OGS_ERROR; } ogs_log_print(OGS...
0
[ "CWE-476", "CWE-787" ]
open5gs
d919b2744cd05abae043490f0a3dd1946c1ccb8c
116,605,469,885,713,250,000,000,000,000,000,000,000
847
[AMF] fix the memory problem (#1247) 1. memory corruption - Overflow num_of_part in SBI message 2. null pointer dereference - n2InfoContent->ngap_ie_type
translate_hex_string(char *s, char *saved_orphan) { int c1 = *saved_orphan; char *start = s; char *t = s; for (; *s; s++) { if (isspace((unsigned char) *s)) continue; if (c1) { *t++ = (hexval(c1) << 4) + hexval(*s); c1 = 0; } else c1 = *s; } *saved_orphan = c1; return t...
0
[ "CWE-119", "CWE-787" ]
t1utils
6b9d1aafcb61a3663c883663eb19ccdbfcde8d33
301,715,171,587,188,130,000,000,000,000,000,000,000
17
Security fixes. - Don't overflow the small cs_start buffer (reported by Niels Thykier via the debian tracker (Jakub Wilk), found with a fuzzer ("American fuzzy lop")). - Cast arguments to <ctype.h> functions to unsigned char.
Compound_Selector_Obj Parser::parse_compound_selector() { // init an empty compound selector wrapper Compound_Selector_Obj seq = SASS_MEMORY_NEW(Compound_Selector, pstate); seq->media_block(last_media_block); // skip initial white-space lex< css_whitespace >(); // parse list while (tru...
0
[ "CWE-674" ]
libsass
f2db04883e5fff4e03777dcc1eb60d4373c45be1
170,969,473,606,458,500,000,000,000,000,000,000,000
65
Make `parse_css_variable_value` non-recursive Fixes #2658 stack overflow
static NTSTATUS dcesrv_lsa_QueryInfoPolicy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct lsa_QueryInfoPolicy *r) { struct lsa_QueryInfoPolicy2 r2; NTSTATUS status; ZERO_STRUCT(r2); r2.in.handle = r->in.handle; r2.in.level = r->in.level; r2.out.info = r->out.info; status = dcesrv_lsa_...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
268,589,512,960,226,960,000,000,000,000,000,000,000
16
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
static void remove_profile(gpointer data, gpointer user_data) { struct btd_profile *profile = data; struct btd_adapter *adapter = user_data; if (profile->adapter_remove) profile->adapter_remove(profile, adapter); }
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
139,704,068,890,792,850,000,000,000,000,000,000,000
8
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
static struct pending_op *send_read(struct btd_device *device, struct gatt_db_attribute *attrib, GDBusProxy *proxy, struct queue *owner_queue, unsigned int id, uint16_t offset, uint8_t link_type) { struct pending_op *op; op = pending_read_new(device, owner_queue, attrib, id, offset, ...
1
[ "CWE-416" ]
bluez
838c0dc7641e1c991c0f3027bf94bee4606012f8
223,231,238,004,832,430,000,000,000,000,000,000,000
21
gatt: Fix not cleaning up when disconnected There is a current use after free possible on a gatt server if a client disconnects while a WriteValue call is being processed with dbus. This patch includes the addition of a pending disconnect callback to handle cleanup better if a disconnect occurs during a write, an acq...
static bool check_interleaving_with_nj(JOIN_TAB *next_tab) { TABLE_LIST *next_emb= next_tab->table->pos_in_table_list->embedding; JOIN *join= next_tab->join; if (join->cur_embedding_map & ~next_tab->embedding_map) { /* next_tab is outside of the "pair of brackets" we're currently in. Cannot ad...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
203,057,246,645,424,500,000,000,000,000,000,000,000
46
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
static void snd_compr_update_tstamp(struct snd_compr_stream *stream, struct snd_compr_tstamp *tstamp) { if (!stream->ops->pointer) return; stream->ops->pointer(stream, tstamp); pr_debug("dsp consumed till %d total %d bytes\n", tstamp->byte_offset, tstamp->copied_total); stream->runtime->hw_pointer = tstamp->b...
0
[ "CWE-703" ]
linux
b35cc8225845112a616e3a2266d2fde5ab13d3ab
15,573,907,240,489,178,000,000,000,000,000,000,000
11
ALSA: compress_core: integer overflow in snd_compr_allocate_buffer() These are 32 bit values that come from the user, we need to check for integer overflows or we could end up allocating a smaller buffer than expected. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
static void do_refine_retval_range(struct bpf_reg_state *regs, int ret_type, int func_id, struct bpf_call_arg_meta *meta) { struct bpf_reg_state *ret_reg = &regs[BPF_REG_0]; if (ret_type != RET_INTEGER || (func_id != BPF_FUNC_get_stack && func_id != BPF_FUNC_probe_read_str && func_id !...
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
49,140,016,926,052,290,000,000,000,000,000,000,000
19
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
void CoreNetwork::disablePingTimeout() { _pingTimer.stop(); _sendPings = false; resetPingTimeout(); }
0
[ "CWE-399" ]
quassel
b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8
63,180,280,399,243,520,000,000,000,000,000,000,000
6
Improve the message-splitting algorithm for PRIVMSG and CTCP This introduces a new message splitting algorithm based on QTextBoundaryFinder. It works by first starting with the entire message to be sent, encoding it, and checking to see if it is over the maximum message length. If it is, it uses QTBF to find the wor...
static int fill_autodev(const struct lxc_rootfs *rootfs) { int ret; char path[MAXPATHLEN]; int i; mode_t cmask; INFO("Creating initial consoles under container /dev"); ret = snprintf(path, MAXPATHLEN, "%s/dev", rootfs->path ? rootfs->mount : ""); if (ret < 0 || ret >= MAXPATHLEN) { ERROR("Error calculating c...
1
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
330,880,920,039,697,230,000,000,000,000,000,000,000
53
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
static int create_snapshot(struct btrfs_root *root, struct inode *dir, struct dentry *dentry, u64 *async_transid, bool readonly, struct btrfs_qgroup_inherit *inherit) { struct btrfs_fs_info *fs_info = btrfs_sb(dir->i_sb); struct inode *inode; struct btrfs_pending_snapshot *pending_snapshot; struct...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
266,787,559,376,060,400,000,000,000,000,000,000,000
131
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
FlushObject( TPMI_DH_OBJECT handle // IN: handle to be freed ) { UINT32 index = handle - TRANSIENT_FIRST; pAssert(index < MAX_LOADED_OBJECTS); // Clear all the object attributes MemorySet((BYTE*)&(s_objects[index].attributes), 0, sizeof(OBJECT_ATTRIBUTES)); return; }
0
[ "CWE-119" ]
libtpms
ea62fd9679f8c6fc5e79471b33cfbd8227bfed72
107,133,077,824,198,920,000,000,000,000,000,000,000
11
tpm2: Initialize a whole OBJECT before using it Initialize a whole OBJECT before using it. This is necessary since an OBJECT may also be used as a HASH_OBJECT via the ANY_OBJECT union and that HASH_OBJECT can leave bad size inidicators in TPM2B buffer in the OBJECT. To get rid of this problem we reset the whole OBJECT...
static inline int build_open_flags(int flags, umode_t mode, struct open_flags *op) { int lookup_flags = 0; int acc_mode; if (flags & (O_CREAT | __O_TMPFILE)) op->mode = (mode & S_IALLUGO) | S_IFREG; else op->mode = 0; /* Must never be set by userspace */ flags &= ~FMODE_NONOTIFY & ~O_CLOEXEC; /* * O_SYN...
0
[ "CWE-17" ]
linux
eee5cc2702929fd41cce28058dc6d6717f723f87
199,326,300,332,997,200,000,000,000,000,000,000,000
67
get rid of s_files and files_lock The only thing we need it for is alt-sysrq-r (emergency remount r/o) and these days we can do just as well without going through the list of files. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
bool AveragePool(const float* input_data, const Dims<4>& input_dims, int stride, int pad_width, int pad_height, int filter_width, int filter_height, float* output_data, const Dims<4>& output_dims) { return AveragePool<Ac>(input_data, input_dims, stride, stride, pad_w...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
60,885,166,287,186,670,000,000,000,000,000,000,000
8
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
static void nfc_llcp_symm_timer(struct timer_list *t) { struct nfc_llcp_local *local = from_timer(local, t, link_timer); pr_err("SYMM timeout\n"); schedule_work(&local->timeout_work); }
0
[ "CWE-476" ]
linux
58bdd544e2933a21a51eecf17c3f5f94038261b5
315,703,362,744,703,300,000,000,000,000,000,000,000
8
net: nfc: Fix NULL dereference on nfc_llcp_build_tlv fails KASAN report this: BUG: KASAN: null-ptr-deref in nfc_llcp_build_gb+0x37f/0x540 [nfc] Read of size 3 at addr 0000000000000000 by task syz-executor.0/5401 CPU: 0 PID: 5401 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45 Hardware name: QEMU Standard PC (i440FX ...
copy_task_done (GObject *source_object, GAsyncResult *res, gpointer user_data) { CopyMoveJob *job; job = user_data; if (job->done_callback) { job->done_callback (job->debuting_files, !job_aborted ((CommonJob *) job), ...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
220,063,203,993,058,180,000,000,000,000,000,000,000
33
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...
int vm_brk_flags(unsigned long addr, unsigned long request, unsigned long flags) { struct mm_struct *mm = current->mm; unsigned long len; int ret; bool populate; LIST_HEAD(uf); len = PAGE_ALIGN(request); if (len < request) return -ENOMEM; if (!len) return 0; if (mmap_write_lock_killable(mm)) return -EI...
0
[ "CWE-362" ]
linux
246c320a8cfe0b11d81a4af38fa9985ef0cc9a4c
170,930,185,235,728,860,000,000,000,000,000,000,000
25
mm/mmap.c: close race between munmap() and expand_upwards()/downwards() VMA with VM_GROWSDOWN or VM_GROWSUP flag set can change their size under mmap_read_lock(). It can lead to race with __do_munmap(): Thread A Thread B __do_munmap() detach_vmas_to_be_unmapped() mmap_write_downgrade() expand_downwards() ...
void * pvPortMalloc( size_t xWantedSize ) { BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink; void * pvReturn = NULL; vTaskSuspendAll(); { /* If this is the first call to malloc then the heap will require * initialisation to setup the list of free blocks. */ ...
1
[ "CWE-200", "CWE-119" ]
FreeRTOS-Kernel
c7a9a01c94987082b223d3e59969ede64363da63
179,121,558,830,391,200,000,000,000,000,000,000,000
150
Improve heap2 bounds checking (#224) * Improve heap bounds checking in pvPortMalloc
CURLcode telrcv(struct Curl_easy *data, const unsigned char *inbuf, /* Data received from socket */ ssize_t count) /* Number of bytes received */ { unsigned char c; CURLcode result; int in = 0; int startwrite = -1; struct TELNET *tn = data->req.p.telnet; #define s...
0
[ "CWE-200", "CWE-909" ]
curl
39ce47f219b09c380b81f89fe54ac586c8db6bde
37,388,920,861,072,613,000,000,000,000,000,000,000
160
telnet: check sscanf() for correct number of matches CVE-2021-22898 Bug: https://curl.se/docs/CVE-2021-22898.html
rsvg_cairo_push_early_clips (RsvgDrawingCtx * ctx) { cairo_save (((RsvgCairoRender *) ctx->render)->cr); if (rsvg_current_state (ctx)->clip_path_ref) if (((RsvgClipPath *) rsvg_current_state (ctx)->clip_path_ref)->units == userSpaceOnUse) rsvg_cairo_clip (ctx, rsvg_current_state (ctx)->clip_...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
47,598,806,581,361,670,000,000,000,000,000,000,000
8
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
CreateMultiStringPopUp ( IN UINTN RequestedWidth, IN UINTN NumberOfLines, ... ) { VA_LIST Marker; VA_START (Marker, NumberOfLines); CreateSharedPopUp (RequestedWidth, NumberOfLines, Marker); VA_END (Marker); }
0
[]
edk2
f1d78c489a39971b5aac5d2fc8a39bfa925c3c5d
309,813,135,787,944,470,000,000,000,000,000,000,000
14
MdeModulePkg/DisplayEngine: Zero memory before free (CVE-2019-14558) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1611 Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.do...
decompileAction(int n, SWF_ACTION *actions, int maxn) { if( n > maxn ) SWF_error("Action overflow!!"); #ifdef DEBUG fprintf(stderr,"%d:\tACTION[%3.3d]: %s\n", actions[n].SWF_ACTIONRECORD.Offset, n, actionName(actions[n].SWF_ACTIONRECORD.ActionCode)); #endif switch(actions[n].SWF_ACTIONRECORD.Act...
1
[ "CWE-119", "CWE-125" ]
libming
da9d86eab55cbf608d5c916b8b690f5b76bca462
179,423,518,731,787,960,000,000,000,000,000,000,000
281
decompileAction: Prevent heap buffer overflow and underflow with using OpCode
Error ImageLoaderTGA::decode_tga_rle(const uint8_t *p_compressed_buffer, size_t p_pixel_size, uint8_t *p_uncompressed_buffer, size_t p_output_size) { Error error; Vector<uint8_t> pixels; error = pixels.resize(p_pixel_size); if (error != OK) { return error; } uint8_t *pixels_w = pixels.ptrw(); size_t compres...
1
[ "CWE-20", "CWE-787" ]
godot
403e4fd08b0b212e96f53d926e6273e0745eaa5a
54,771,754,652,528,530,000,000,000,000,000,000,000
43
Fix a crash in the TGA loader with malformed input
poppler_document_get_keywords (PopplerDocument *document) { g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL); GooString *goo_keywords = document->doc->getDocInfoKeywords(); gchar *utf8 = _poppler_goo_string_to_utf8(goo_keywords); delete goo_keywords; return utf8; }
0
[ "CWE-476" ]
poppler
f162ecdea0dda5dbbdb45503c1d55d9afaa41d44
26,552,542,877,310,924,000,000,000,000,000,000,000
10
Fix crash on missing embedded file Check whether an embedded file is actually present in the PDF and show warning in that case. https://bugs.freedesktop.org/show_bug.cgi?id=106137 https://gitlab.freedesktop.org/poppler/poppler/issues/236
inq_import_key_parms (void *opaque, const char *line) { struct import_key_parm_s *parm = opaque; gpg_error_t err; if (has_leading_keyword (line, "KEYDATA")) { err = assuan_send_data (parm->dflt->ctx, parm->key, parm->keylen); } else err = default_inq_cb (parm->dflt, line); return err; }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
328,395,999,456,050,200,000,000,000,000,000,000,000
14
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static void dispatch_queued_ios(struct multipath *m) { int r; unsigned long flags; struct dm_mpath_io *mpio; union map_info *info; struct request *clone, *n; LIST_HEAD(cl); spin_lock_irqsave(&m->lock, flags); list_splice_init(&m->queued_ios, &cl); spin_unlock_irqrestore(&m->lock, flags); list_for_each_entry...
0
[ "CWE-284", "CWE-264" ]
linux
ec8013beddd717d1740cfefb1a9b900deef85462
247,029,095,643,387,520,000,000,000,000,000,000,000
31
dm: do not forward ioctls from logical volumes to the underlying device A logical volume can map to just part of underlying physical volume. In this case, it must be treated like a partition. Based on a patch from Alasdair G Kergon. Cc: Alasdair G Kergon <agk@redhat.com> Cc: dm-devel@redhat.com Signed-off-by: Paolo ...
static int do_execveat_common(int fd, struct filename *filename, struct user_arg_ptr argv, struct user_arg_ptr envp, int flags) { char *pathbuf = NULL; struct linux_binprm *bprm; struct file *file; struct files_struct *displaced; int retval; if (IS_ERR(filename)) return PTR_ERR(filen...
0
[]
linux
98da7d08850fb8bdeb395d6368ed15753304aa0c
165,287,130,936,016,550,000,000,000,000,000,000,000
145
fs/exec.c: account for argv/envp pointers When limiting the argv/envp strings during exec to 1/4 of the stack limit, the storage of the pointers to the strings was not included. This means that an exec with huge numbers of tiny strings could eat 1/4 of the stack limit in strings and then additional space would be lat...
DeviceNRecoder::DeviceNRecoder(Stream *strA, int widthA, int heightA, GfxImageColorMap *colorMapA): FilterStream(strA) { width = widthA; height = heightA; colorMap = colorMapA; imgStr = NULL; pixelIdx = 0; bufIdx = gfxColorMaxComps; bufSize = ((GfxDeviceNColorSpace *)colorMap->getColorSpace(...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
81,927,017,916,857,975,000,000,000,000,000,000,000
14
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
LibarchivePlugin::~LibarchivePlugin() { for (const auto e : qAsConst(m_emittedEntries)) { // Entries might be passed to pending slots, so we just schedule their deletion. e->deleteLater(); } }
0
[ "CWE-59", "CWE-61" ]
ark
8bf8c5ef07b0ac5e914d752681e470dea403a5bd
170,305,620,629,535,700,000,000,000,000,000,000,000
7
Pass the ARCHIVE_EXTRACT_SECURE_SYMLINKS flag to libarchive There are archive types which allow to first create a symlink and then later on dereference it. If the symlink points outside of the archive, this results in writing outside of the destination directory. With the ARCHIVE_EXTRACT_SECURE_SYMLINKS option set, l...
bool fix_fields_if_needed(THD *thd, Item **ref) { return is_fixed() ? false : fix_fields(thd, ref); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
20,614,280,373,751,031,000,000,000,000,000,000,000
4
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 ...
flatpak_run_add_session_dbus_args (FlatpakBwrap *app_bwrap, FlatpakBwrap *proxy_arg_bwrap, FlatpakContext *context, FlatpakRunFlags flags, const char *app_id) { gboolean ...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
168,835,175,154,039,970,000,000,000,000,000,000,000
65
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
static void ldap_decode_response(TALLOC_CTX *mem_ctx, struct asn1_data *data, struct ldap_Result *result) { asn1_read_enumerated(data, &result->resultcode); asn1_read_OctetString_talloc(mem_ctx, data, &result->dn); asn1_read_OctetString_talloc(mem_ctx, data, &result->errormessage); if (asn1_peek_tag(data,...
1
[ "CWE-399" ]
samba
530d50a1abdcdf4d1775652d4c456c1274d83d8d
326,620,240,068,762,700,000,000,000,000,000,000,000
15
CVE-2015-7540: s4: libcli: ldap message - Ensure all asn1_XX returns are checked. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): F...
void put_busid_priv(struct bus_id_priv *bid) { if (bid) spin_unlock(&bid->busid_lock); }
0
[ "CWE-362" ]
linux
c171654caa875919be3c533d3518da8be5be966e
320,943,439,780,532,840,000,000,000,000,000,000,000
5
usbip: usbip_host: fix bad unlock balance during stub_probe() stub_probe() calls put_busid_priv() in an error path when device isn't found in the busid_table. Fix it by making put_busid_priv() safe to be called with null struct bus_id_priv pointer. This problem happens when "usbip bind" is run without loading usbip_h...
lka_report_smtp_link_connect(const char *direction, struct timeval *tv, uint64_t reqid, const char *rdns, int fcrdns, const struct sockaddr_storage *ss_src, const struct sockaddr_storage *ss_dest) { struct filter_session *fs; char src[NI_MAXHOST + 5]; char dest[NI_MAXHOST + 5]; uint16_t src_port = 0; u...
0
[ "CWE-476" ]
src
6c3220444ed06b5796dedfd53a0f4becd903c0d1
46,526,113,424,003,190,000,000,000,000,000,000,000
51
smtpd's filter state machine can prematurely release resources leading to a crash. From gilles@
vte_sequence_handler_cursor_lower_left (VteTerminal *terminal, GValueArray *params) { VteScreen *screen; long row; screen = terminal->pvt->screen; row = MAX(0, terminal->row_count - 1); screen->cursor_current.row = screen->insert_delta + row; screen->cursor_current.col = 0; }
0
[]
vte
58bc3a942f198a1a8788553ca72c19d7c1702b74
309,404,869,976,960,700,000,000,000,000,000,000,000
9
fix bug #548272 svn path=/trunk/; revision=2365
START_TEST(test_tm_adopt_ispidowner) { /* we are the owner of this pid so should return true */ fail_unless(TRUE == ispidowner(getpid())); /* when unit test run as non-root user, owner of this pid is not the owner of pid 1 (init) */ if (getuid() != 0) fail_unless(FALSE == ispidowner(1)); }
0
[ "CWE-264" ]
torque
967cdc80150690459a47a35a658abeee0ca6e5cb
331,654,289,212,869,500,000,000,000,000,000,000,000
9
TRQ-2885 - clean up unit test so it passes when run as root
void httpsSslBumpStep2AccessCheckDone(Acl::Answer answer, void *data) { ConnStateData *connState = (ConnStateData *) data; // if the connection is closed or closing, just return. if (!connState->isOpen()) return; debugs(33, 5, "Answer: " << answer << " kind:" << answer.kind); assert(connSt...
0
[ "CWE-116" ]
squid
7024fb734a59409889e53df2257b3fc817809fb4
290,199,981,522,986,150,000,000,000,000,000,000,000
29
Handle more Range requests (#790) Also removed some effectively unused code.
static int bgp_keepalive_receive(struct peer *peer, bgp_size_t size) { if (bgp_debug_keepalive(peer)) zlog_debug("%s KEEPALIVE rcvd", peer->host); bgp_update_implicit_eors(peer); peer->rtt = sockopt_tcp_rtt(peer->fd); /* If the peer's RTT is higher than expected, shutdown * the peer automatically. */ if (...
0
[ "CWE-125" ]
frr
ff6db1027f8f36df657ff2e5ea167773752537ed
202,465,492,891,382,530,000,000,000,000,000,000,000
30
bgpd: Make sure hdr length is at a minimum of what is expected Ensure that if the capability length specified is enough data. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
void __init cpu_dev_init(void) { if (subsys_system_register(&cpu_subsys, cpu_root_attr_groups)) panic("Failed to register CPU subsystem"); cpu_dev_register_generic(); cpu_register_vulnerabilities(); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
79,997,922,144,509,040,000,000,000,000,000,000,000
8
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
static void io_ring_file_put(struct io_ring_ctx *ctx, struct io_rsrc_put *prsrc) { struct file *file = prsrc->file; #if defined(CONFIG_UNIX) struct sock *sock = ctx->ring_sock->sk; struct sk_buff_head list, *head = &sock->sk_receive_queue; struct sk_buff *skb; int i; __skb_queue_head_init(&list); /* * Find ...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
63,245,868,258,350,080,000,000,000,000,000,000,000
62
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...
//! Load image from a JPEG file \newinstance. static CImg<T> get_load_jpeg(std::FILE *const file) { return CImg<T>().load_jpeg(file);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
153,728,126,669,432,920,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
host_fake_gethostbyname(const uschar *name, int af, int *error_num) { #if HAVE_IPV6 int alen = (af == AF_INET)? sizeof(struct in_addr):sizeof(struct in6_addr); #else int alen = sizeof(struct in_addr); #endif int ipa; const uschar *lname = name; uschar *adds; uschar **alist; struct hostent *yield; dns_answer * dnsa = s...
0
[ "CWE-787" ]
exim
d4bc023436e4cce7c23c5f8bb5199e178b4cc743
195,012,380,085,195,430,000,000,000,000,000,000,000
121
Fix host_name_lookup (Close 2747) Thanks to Nico R for providing a reproducing configuration. host_lookup = * message_size_limit = ${if def:sender_host_name {32M}{32M}} acl_smtp_connect = acl_smtp_connect acl_smtp_rcpt = acl_smtp_rcpt begin ac...
static int sco_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len) { struct sockaddr_sco *sa = (struct sockaddr_sco *) addr; struct sock *sk = sock->sk; int err = 0; BT_DBG("sk %p %pMR", sk, &sa->sco_bdaddr); if (!addr || addr->sa_family != AF_BLUETOOTH) return -EINVAL; lock_sock(sk); if (s...
0
[ "CWE-200" ]
linux
c8c499175f7d295ef867335bceb9a76a2c3cdc38
41,021,827,358,288,644,000,000,000,000,000,000,000
31
Bluetooth: SCO - Fix missing msg_namelen update in sco_sock_recvmsg() If the socket is in state BT_CONNECT2 and BT_SK_DEFER_SETUP is set in the flags, sco_sock_recvmsg() returns early with 0 without updating the possibly set msg_namelen member. This, in turn, leads to a 128 byte kernel stack leak in net/socket.c. Fix...
static void enable_verify_allow_rsa_md5(gnutls_priority_t c) { c->additional_verify_flags |= GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD5; }
0
[ "CWE-310" ]
gnutls
21f89efad7014a5ee0debd4cd3d59e27774b29e6
262,394,604,383,803,870,000,000,000,000,000,000,000
5
handshake: add FALLBACK_SCSV priority option This allows clients to enable the TLS_FALLBACK_SCSV mechanism during the handshake, as defined in RFC7507.
gst_asf_demux_setup_pad (GstASFDemux * demux, GstPad * src_pad, GstCaps * caps, guint16 id, gboolean is_video, GstBuffer * streamheader, GstTagList * tags) { AsfStream *stream; gst_pad_use_fixed_caps (src_pad); gst_pad_set_caps (src_pad, caps); gst_pad_set_event_function (src_pad, GST_DEBUG_FUNC...
0
[ "CWE-125", "CWE-787" ]
gst-plugins-ugly
d21017b52a585f145e8d62781bcc1c5fefc7ee37
142,634,220,892,994,000,000,000,000,000,000,000,000
54
asfdemux: Check that we have enough data available before parsing bool/uint extended content descriptors https://bugzilla.gnome.org/show_bug.cgi?id=777955
void *SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx) { return(CRYPTO_get_ex_data(&s->ex_data,idx)); }
0
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
190,678,539,004,404,080,000,000,000,000,000,000,000
4
Add SRP support.
intset *intsetAdd(intset *is, int64_t value, uint8_t *success) { uint8_t valenc = _intsetValueEncoding(value); uint32_t pos; if (success) *success = 1; /* Upgrade encoding if necessary. If we need to upgrade, we know that * this value should be either appended (if > 0) or prepended (if < 0), ...
0
[ "CWE-190" ]
redis
789f10156009b404950ad717642a9496ed887083
320,438,761,924,365,800,000,000,000,000,000,000,000
28
Fix integer overflow in intset (CVE-2021-29478) An integer overflow bug in Redis 6.2 could be exploited to corrupt the heap and potentially result with remote code execution. The vulnerability involves changing the default set-max-intset-entries configuration value, creating a large set key that consists of integer v...
CmpWString(LPVOID item, LPVOID str) { return (wcscmp(item, str) == 0) ? TRUE : FALSE; }
0
[ "CWE-415" ]
openvpn
1394192b210cb3c6624a7419bcf3ff966742e79b
232,040,505,517,328,100,000,000,000,000,000,000,000
4
Fix potential double-free() in Interactive Service (CVE-2018-9336) Malformed input data on the service pipe towards the OpenVPN interactive service (normally used by the OpenVPN GUI to request openvpn instances from the service) can result in a double free() in the error handling code. This usually only leads to a pr...
unpack_vcol_info_from_frm(THD *thd, MEM_ROOT *mem_root, TABLE *table, String *expr_str, Virtual_column_info **vcol_ptr, bool *error_reported) { Create_field vcol_storage; // placeholder for vcol_info Parser_state parser_state; Virtual_column_info *vcol= *vcol_pt...
1
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
108,946,119,540,076,540,000,000,000,000,000,000,000
52
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
mrb_vm_define_class(mrb_state *mrb, mrb_value outer, mrb_value super, mrb_sym id) { struct RClass *s; struct RClass *c; if (!mrb_nil_p(super)) { if (!mrb_class_p(super)) { mrb_raisef(mrb, E_TYPE_ERROR, "superclass must be a Class (%!v given)", super); } s = mrb_class_ptr(super); } else { ...
0
[ "CWE-787" ]
mruby
b1d0296a937fe278239bdfac840a3fd0e93b3ee9
136,072,311,981,590,840,000,000,000,000,000,000,000
35
class.c: clear method cache after `remove_method`.
static av_cold int dfa_decode_init(AVCodecContext *avctx) { DfaContext *s = avctx->priv_data; avctx->pix_fmt = AV_PIX_FMT_PAL8; if (!avctx->width || !avctx->height) return AVERROR_INVALIDDATA; av_assert0(av_image_check_size(avctx->width, avctx->height, 0, avctx) >= 0); s->frame_buf = av_...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
f52fbf4f3ed02a7d872d8a102006f29b4421f360
277,131,446,537,575,880,000,000,000,000,000,000,000
17
avcodec/dfa: Fix off by 1 error Fixes out of array access Fixes: 1345/clusterfuzz-testcase-minimized-6062963045695488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static int RandomGetWrap(void) { unsigned long r; do { r = RandomGet(); } while(r >= ULONG_MAX - (ULONG_MAX % RAND_MAX)); return r % RAND_MAX; }
0
[]
suricata
50e2b973eeec7172991bf8f544ab06fb782b97df
253,760,644,180,462,960,000,000,000,000,000,000,000
10
stream/tcp: handle RST with MD5 or AO header Special handling for RST packets if they have an TCP MD5 or AO header option. The options hash can't be validated. The end host might be able to validate it, as it can have a key/password that was communicated out of band. The sender could use this to move the TCP state to...
static void ahci_start_dma(IDEDMA *dma, IDEState *s, BlockCompletionFunc *dma_cb) { #ifdef DEBUG_AHCI AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma); #endif DPRINTF(ad->port_no, "\n"); s->io_buffer_offset = 0; dma_cb(s, 0); }
0
[ "CWE-399" ]
qemu
3251bdcf1c67427d964517053c3d185b46e618e8
200,701,737,582,116,060,000,000,000,000,000,000,000
10
ide: Correct handling of malformed/short PRDTs This impacts both BMDMA and AHCI HBA interfaces for IDE. Currently, we confuse the difference between a PRDT having "0 bytes" and a PRDT having "0 complete sectors." When we receive an incomplete sector, inconsistent error checking leads to an infinite loop wherein the c...
sc_pkcs15emu_add_pin(sc_pkcs15_card_t *p15card, const sc_pkcs15_id_t *id, const char *label, const sc_path_t *path, int ref, int type, unsigned int min_length, unsigned int max_length, int flags, int tries_left, const char pad_char, int obj...
0
[ "CWE-415", "CWE-119" ]
OpenSC
360e95d45ac4123255a4c796db96337f332160ad
224,454,072,891,432,350,000,000,000,000,000,000,000
31
fixed out of bounds writes Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problems.
tracing_fill_pipe_page(size_t rem, struct trace_iterator *iter) { size_t count; int save_len; int ret; /* Seq buffer is page-sized, exactly what we need. */ for (;;) { save_len = iter->seq.seq.len; ret = print_trace_line(iter); if (trace_seq_has_overflowed(&iter->seq)) { iter->seq.seq.len = save_len; ...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
80,959,075,172,576,280,000,000,000,000,000,000,000
45
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
//! Load image from a PNM file \overloading. CImg<T>& load_pnm(std::FILE *const file) { return _load_pnm(file,0);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
50,682,824,363,099,800,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static void raw_err(struct sock *sk, struct sk_buff *skb, u32 info) { struct inet_sock *inet = inet_sk(sk); const int type = icmp_hdr(skb)->type; const int code = icmp_hdr(skb)->code; int err = 0; int harderr = 0; /* Report error on raw socket, if: 1. User requested ip_recverr. 2. Socket is connected (ot...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
212,524,885,774,772,100,000,000,000,000,000,000,000
53
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
get_space(size_t need) { need += TPS(out_used); if (need > TPS(out_size)) { TPS(out_size) = need * 2; TYPE_REALLOC(char, TPS(out_size), TPS(out_buff)); } }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
82,335,481,562,026,890,000,000,000,000,000,000,000
8
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...
static int mov_write_vpcc_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *track) { int64_t pos = avio_tell(pb); avio_wb32(pb, 0); ffio_wfourcc(pb, "vpcC"); avio_w8(pb, 1); /* version */ avio_wb24(pb, 0); /* flags */ ff_isom_write_vpcc(s, pb, track->par); return update_size(pb, pos); }
0
[ "CWE-125" ]
FFmpeg
95556e27e2c1d56d9e18f5db34d6f756f3011148
5,676,114,305,041,759,000,000,000,000,000,000,000
11
avformat/movenc: Do not pass AVCodecParameters in avpriv_request_sample Fixes: out of array read Fixes: ffmpeg_crash_8.avi Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
size_t EC_GROUP_get_seed_len(const EC_GROUP *group) { return group->seed_len; }
0
[]
openssl
21c856b75d81eff61aa63b4f036bb64a85bf6d46
279,968,802,019,076,050,000,000,000,000,000,000,000
4
[crypto/ec] for ECC parameters with NULL or zero cofactor, compute it The cofactor argument to EC_GROUP_set_generator is optional, and SCA mitigations for ECC currently use it. So the library currently falls back to very old SCA-vulnerable code if the cofactor is not present. This PR allows EC_GROUP_set_generator to ...
vim_strsave_escape_csi( char_u *p) { char_u *res; char_u *s, *d; /* Need a buffer to hold up to three times as much. Four in case of an * illegal utf-8 byte: * 0xc0 -> 0xc3 0x80 -> 0xc3 K_SPECIAL KS_SPECIAL KE_FILLER */ res = alloc((unsigned)(STRLEN(p) * 4) + 1); if (res != NULL) ...
0
[ "CWE-78" ]
vim
53575521406739cf20bbe4e384d88e7dca11f040
246,687,160,970,409,630,000,000,000,000,000,000,000
34
patch 8.1.1365: source command doesn't check for the sandbox Problem: Source command doesn't check for the sandbox. (Armin Razmjou) Solution: Check for the sandbox when sourcing a file.
void __weak kvm_arch_pre_destroy_vm(struct kvm *kvm) { }
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
318,367,537,038,076,900,000,000,000,000,000,000,000
3
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
static void line6_stream_stop(struct snd_line6_pcm *line6pcm, int direction, int type) { unsigned long flags; struct line6_pcm_stream *pstr = get_stream(line6pcm, direction); spin_lock_irqsave(&pstr->lock, flags); clear_bit(type, &pstr->running); if (!pstr->running) { spin_unlock_irqrestore(&pstr->lock, fl...
0
[ "CWE-476" ]
linux
3450121997ce872eb7f1248417225827ea249710
113,758,643,919,788,420,000,000,000,000,000,000,000
19
ALSA: line6: Fix write on zero-sized buffer LINE6 drivers allocate the buffers based on the value returned from usb_maxpacket() calls. The manipulated device may return zero for this, and this results in the kmalloc() with zero size (and it may succeed) while the other part of the driver code writes the packet data w...
*/ static void php_wddx_pop_element(void *user_data, const XML_Char *name) { st_entry *ent1, *ent2; wddx_stack *stack = (wddx_stack *)user_data; HashTable *target_hash; zend_class_entry *pce; zval obj; /* OBJECTS_FIXME */ if (stack->top == 0) { return; } if (!strcmp((char *)name, EL_STRING) ||...
0
[]
php-src
366f9505a4aae98ef2f4ca39a838f628a324b746
329,557,350,724,385,850,000,000,000,000,000,000,000
113
Fixed bug #70661 (Use After Free Vulnerability in WDDX Packet Deserialization) Conflicts: ext/wddx/wddx.c
hexprint(netdissect_options *ndo, const uint8_t *loc, size_t len) { const uint8_t *p; size_t i; p = loc; for (i = 0; i < len; i++) ND_PRINT((ndo,"%02x", p[i] & 0xff)); }
0
[ "CWE-125" ]
tcpdump
396e94ff55a80d554b1fe46bf107db1e91008d6c
174,026,906,262,272,360,000,000,000,000,000,000,000
9
(for 4.9.3) CVE-2018-14469/ISAKMP: Add a missing bounds check In ikev1_n_print() check bounds before trying to fetch the replay detection status. This fixes a buffer over-read discovered by Bhargava Shastry. Add a test using the capture file supplied by the reporter(s).
int af_page_size(AFFILE *af) { return af->image_pagesize; }
0
[ "CWE-20", "CWE-295" ]
AFFLIBv3
435a2ca802358a3debb6d164d2c33049131df81c
144,670,119,134,763,250,000,000,000,000,000,000,000
4
Sanity check size passed to malloc... Add sanity check before calling malloc in af_get_page() function to avoid undefined behavior (e.g., seg fault) when dealing with a corrupt AFF image with an invalid pagesize. Issue found by Luis Rocha (luiscrocha@gmail.com).
static int may_mknod(mode_t mode) { switch (mode & S_IFMT) { case S_IFREG: case S_IFCHR: case S_IFBLK: case S_IFIFO: case S_IFSOCK: case 0: /* zero mode translates to S_IFREG */ return 0; case S_IFDIR: return -EPERM; default: return -EINVAL; } }
0
[ "CWE-120" ]
linux-2.6
d70b67c8bc72ee23b55381bd6a884f4796692f77
90,997,865,253,691,950,000,000,000,000,000,000,000
16
[patch] vfs: fix lookup on deleted directory Lookup can install a child dentry for a deleted directory. This keeps the directory dentry alive, and the inode pinned in the cache and on disk, even after all external references have gone away. This isn't a big problem normally, since memory pressure or umount will clea...
bool is_secure_file_path(char *path) { char buff1[FN_REFLEN], buff2[FN_REFLEN]; size_t opt_secure_file_priv_len; /* All paths are secure if opt_secure_file_path is 0 */ if (!opt_secure_file_priv) return TRUE; opt_secure_file_priv_len= strlen(opt_secure_file_priv); if (strlen(path) >= FN_REFLEN) ...
0
[ "CWE-362" ]
server
347eeefbfc658c8531878218487d729f4e020805
214,530,973,641,902,840,000,000,000,000,000,000,000
43
don't use my_copystat in the server it was supposed to be used in command-line tools only. Different fix for 4e5473862e: Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans, u64 type) { u64 alloc_flags = btrfs_get_alloc_profile(trans->fs_info, type); return btrfs_chunk_alloc(trans, alloc_flags, CHUNK_ALLOC_FORCE); }
0
[ "CWE-703", "CWE-667" ]
linux
1cb3db1cf383a3c7dbda1aa0ce748b0958759947
333,747,277,661,587,180,000,000,000,000,000,000,000
6
btrfs: fix deadlock with concurrent chunk allocations involving system chunks When a task attempting to allocate a new chunk verifies that there is not currently enough free space in the system space_info and there is another task that allocated a new system chunk but it did not finish yet the creation of the respecti...
static struct mountpoint *new_mountpoint(struct dentry *dentry) { struct hlist_head *chain = mp_hash(dentry); struct mountpoint *mp; int ret; hlist_for_each_entry(mp, chain, m_hash) { if (mp->m_dentry == dentry) { /* might be worth a WARN_ON() */ if (d_unlinked(dentry)) return ERR_PTR(-ENOENT); mp->...
0
[ "CWE-269" ]
user-namespace
a6138db815df5ee542d848318e5dae681590fccd
17,273,039,245,052,731,000,000,000,000,000,000,000
31
mnt: Only change user settable mount flags in remount Kenton Varda <kenton@sandstorm.io> discovered that by remounting a read-only bind mount read-only in a user namespace the MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user to the remount a read-only mount read-write. Correct this by replacing t...
CJSON_PUBLIC(cJSON *) cJSON_CreateNumber(double num) { cJSON *item = cJSON_New_Item(&global_hooks); if(item) { item->type = cJSON_Number; item->valuedouble = num; /* use saturation in case of overflow */ if (num >= INT_MAX) { item->valueint = INT_MAX; ...
0
[ "CWE-754", "CWE-787" ]
cJSON
be749d7efa7c9021da746e685bd6dec79f9dd99b
18,983,733,743,983,234,000,000,000,000,000,000,000
25
Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays
void CIRCNetwork::SetIRCNick(const CNick& n) { m_IRCNick = n; for (CClient* pClient : m_vClients) { pClient->SetNick(n.GetNick()); } }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
253,389,558,753,686,330,000,000,000,000,000,000,000
7
Don't crash if user specified invalid encoding. This is CVE-2019-9917
xmlXIncludeNewContext(xmlDocPtr doc) { xmlXIncludeCtxtPtr ret; #ifdef DEBUG_XINCLUDE xmlGenericError(xmlGenericErrorContext, "New context\n"); #endif if (doc == NULL) return(NULL); ret = (xmlXIncludeCtxtPtr) xmlMalloc(sizeof(xmlXIncludeCtxt)); if (ret == NULL) { xmlXIncludeErrMemory(NULL, (xmlNod...
0
[ "CWE-416" ]
libxml2
1098c30a040e72a4654968547f415be4e4c40fe7
82,234,961,312,679,335,000,000,000,000,000,000,000
23
Fix user-after-free with `xmllint --xinclude --dropdtd` The --dropdtd option can leave dangling pointers in entity reference nodes. Make sure to skip these nodes when processing XIncludes. This also avoids scanning entity declarations and even modifying them inadvertently during XInclude processing. Move from a bloc...
dissect_tb_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, struct fp_info *p_fp_info, dissector_handle_t *data_handle, void *data) { int chan, num_tbs = 0; int bit_offset = 0; int crci_bit_offset = (offset+1)<<3; /* Current...
0
[ "CWE-20" ]
wireshark
7d7190695ce2ff269fdffb04e87139995cde21f4
300,598,088,725,507,460,000,000,000,000,000,000,000
127
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...
ftp_loop_internal (struct url *u, struct fileinfo *f, ccon *con, char **local_file, bool force_full_retrieve) { int count, orig_lp; wgint restval, len = 0, qtyread = 0; char *tms, *locf; const char *tmrate = NULL; uerr_t err; struct_stat st; /* Declare WARC variables. */ bool warc_en...
0
[]
wget
075d7556964f5a871a73c22ac4b69f5361295099
75,196,407,896,512,880,000,000,000,000,000,000,000
303
Fix IP address exposure in FTP code * src/ftp.c (getftp): Do not use PORT when PASV fails. * tests/FTPServer.px: Add pasv_not_supported server flag. * tests/Makefile.am: Add Test-ftp-pasv-not-supported.px * tests/Test-ftp-pasv-not-supported.px: New test Fix IP address exposure when automatically falling back from pas...
int SSL_CTX_use_certificate_file(SSL_CTX* ctx, const char* file, int format) { return read_file(ctx, file, format, Cert); }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
319,077,475,069,934,600,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
gst_qtdemux_post_no_playable_stream_error (GstQTDemux * qtdemux) { if (qtdemux->posted_redirect) { GST_ELEMENT_ERROR (qtdemux, STREAM, DEMUX, (_("This file contains no playable streams.")), ("no known streams found, a redirect message has been posted")); } else { GST_ELEMENT_ERROR (qtdemux, ...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
70,055,126,476,803,700,000,000,000,000,000,000,000
12
qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451
static BOOL rdp_read_bitmap_cache_capability_set(wStream* s, UINT16 length, rdpSettings* settings) { WINPR_UNUSED(settings); if (length < 40) return FALSE; Stream_Seek_UINT32(s); /* pad1 (4 bytes) */ Stream_Seek_UINT32(s); /* pad2 (4 bytes) */ Stream_Seek_UINT32(s); /* pad3 (4 bytes) */ Stream_Seek_UINT32(s); ...
0
[ "CWE-119", "CWE-125" ]
FreeRDP
3627aaf7d289315b614a584afb388f04abfb5bbf
126,632,303,879,958,350,000,000,000,000,000,000,000
20
Fixed #6011: Bounds check in rdp_read_font_capability_set
ATExecSetStatistics(Relation rel, const char *colName, Node *newValue, LOCKMODE lockmode) { int newtarget; Relation attrelation; HeapTuple tuple; Form_pg_attribute attrtuple; Assert(IsA(newValue, Integer)); newtarget = intVal(newValue); /* * Limit target to a sane range */ if (newtarget < -1) { erepo...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
138,511,748,918,064,100,000,000,000,000,000,000,000
60
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
expand_words_shellexp (list) WORD_LIST *list; { return (expand_word_list_internal (list, WEXP_SHELLEXP)); }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
120,724,979,835,591,720,000,000,000,000,000,000,000
5
bash-4.4-rc2 release
compile_cap_prog(synblock_T *synblock) { regprog_T *rp = synblock->b_cap_prog; char_u *re; if (synblock->b_p_spc == NULL || *synblock->b_p_spc == NUL) synblock->b_cap_prog = NULL; else { // Prepend a ^ so that we only match at one column re = concat_str((char_u *)"^", synblock->b_p_spc); if (...
0
[ "CWE-416" ]
vim
2813f38e021c6e6581c0c88fcf107e41788bc835
88,122,325,342,527,090,000,000,000,000,000,000,000
26
patch 8.2.5072: using uninitialized value and freed memory in spell command Problem: Using uninitialized value and freed memory in spell command. Solution: Initialize "attr". Check for empty line early.
static inline bool cache_leaves_are_shared(struct cacheinfo *this_leaf, struct cacheinfo *sib_leaf) { return sib_leaf->fw_token == this_leaf->fw_token; }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
151,943,659,708,555,450,000,000,000,000,000,000,000
5
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
static void uvesafb_exit(void) { struct uvesafb_ktask *task; if (v86d_started) { task = uvesafb_prep(); if (task) { task->t.flags = TF_EXIT; uvesafb_exec(task); uvesafb_free(task); } } cn_del_callback(&uvesafb_cn_id); driver_remove_file(&uvesafb_driver.driver, &driver_attr_v86d); platform_device_...
0
[ "CWE-190" ]
linux
9f645bcc566a1e9f921bdae7528a01ced5bc3713
138,413,293,654,361,350,000,000,000,000,000,000,000
18
video: uvesafb: Fix integer overflow in allocation cmap->len can get close to INT_MAX/2, allowing for an integer overflow in allocation. This uses kmalloc_array() instead to catch the condition. Reported-by: Dr Silvio Cesare of InfoSect <silvio.cesare@gmail.com> Fixes: 8bdb3a2d7df48 ("uvesafb: the driver core") Cc: s...
TEST_P(ProtocolIntegrationTest, RetryStreaming) { initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); auto encoder_decoder = codec_client_->startRequest(Http::TestRequestHeaderMapImpl{{":method", "POST"}, {":path", "/test/lon...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
98,007,947,295,897,900,000,000,000,000,000,000,000
52
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
ParserCallbacks::handleObject(QPDFObjectHandle obj) { if (obj.isName() && (obj.getName() == "/Abort")) { std::cout << "test suite: terminating parsing" << std::endl; terminateParsing(); } std::cout << obj.getTypeName() << ": "; if (obj.isInlineImage()) { // Exercise getTy...
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
149,179,639,704,091,970,000,000,000,000,000,000,000
19
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
void JsonParse(JsonDocument &doc, const char *str, size_t length, bool throwExc = false) { #ifdef TINYGLTF_USE_RAPIDJSON (void)throwExc; doc.Parse(str, length); #else doc = json::parse(str, str + length, nullptr, throwExc); #endif }
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
232,537,757,374,932,430,000,000,000,000,000,000,000
9
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
Item *Item::neg(THD *thd) { return new (thd->mem_root) Item_func_neg(thd, this); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
29,155,089,364,865,897,000,000,000,000,000,000,000
4
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
ecma_op_iterator_get_index (ecma_object_t *iter_obj_p) /**< iterator object pointer */ { uint32_t index = ((ecma_extended_object_t *) iter_obj_p)->u.pseudo_array.u1.iterator_index; if (JERRY_UNLIKELY (index == ECMA_ITERATOR_INDEX_LIMIT)) { ecma_string_t *prop_name_p = ecma_get_magic_string (LIT_INTERNAL_MAG...
0
[ "CWE-119", "CWE-125", "CWE-703" ]
jerryscript
c2b662170245a16f46ce02eae68815c325d99821
273,505,450,647,101,030,000,000,000,000,000,000,000
15
Fix adding entries to the internal buffer of a Map object (#3805) When appending the key/value pair separately, garbage collection could be triggered before the value is added, which could cause problems during marking. This patch changes insertion to add both values at the same time, which prevents partial entries...
static void rtps_util_topic_info_add_tree(proto_tree *tree, tvbuff_t *tvb, gint offset, endpoint_guid * guid) { if (enable_topic_info) { proto_tree * topic_info_tree; proto_item * ti; type_mapping * type_mapping_object = rtps_util_get_topic_info(guid); if (type_mapping_object != NULL) { topic_...
0
[ "CWE-401" ]
wireshark
33e63d19e5496c151bad69f65cdbc7cba2b4c211
250,574,546,883,404,150,000,000,000,000,000,000,000
21
RTPS: Fixup our coherent set map. coherent_set_tracking.coherent_set_registry_map uses a struct as a key, but the hash and comparison routines treat keys as a sequence of bytes. Make sure every key byte is initialized. Fixes #16994. Call wmem_strong_hash on our key in coherent_set_key_hash_by_key instead of creating ...
smb21_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock, unsigned int epoch, bool *purge_cache) { char message[5] = {0}; unsigned int new_oplock = 0; oplock &= 0xFF; cinode->lease_granted = true; if (oplock == SMB2_OPLOCK_LEVEL_NOCHANGE) return; /* Check if the server granted an oplock rath...
0
[ "CWE-476" ]
linux
d6f5e358452479fa8a773b5c6ccc9e4ec5a20880
194,911,204,676,267,700,000,000,000,000,000,000,000
35
cifs: fix NULL ptr dereference in smb2_ioctl_query_info() When calling smb2_ioctl_query_info() with invalid smb_query_info::flags, a NULL ptr dereference is triggered when trying to kfree() uninitialised rqst[n].rq_iov array. This also fixes leaked paths that are created in SMB2_open_init() which required SMB2_open_f...
snd_usb_find_clock_multiplier(struct usb_host_interface *ctrl_iface, int clock_id) { struct uac_clock_multiplier_descriptor *cs = NULL; while ((cs = snd_usb_find_csint_desc(ctrl_iface->extra, ctrl_iface->extralen, cs, UAC2_CLOCK_MULTIPLIER))) { if (cs->bClockID == clock_id) return...
0
[]
sound
447d6275f0c21f6cc97a88b3a0c601436a4cdf2a
293,277,444,929,027,850,000,000,000,000,000,000,000
14
ALSA: usb-audio: Add sanity checks for endpoint accesses Add some sanity check codes before actually accessing the endpoint via get_endpoint() in order to avoid the invalid access through a malformed USB descriptor. Mostly just checking bNumEndpoints, but in one place (snd_microii_spdif_default_get()), the validity o...