func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
wl_addhead(struct winlink *wl) { wl->nextlink = chain; chain = wl; }
0
[ "CWE-120", "CWE-269" ]
NetHack
f3def5c0b999478da2d0a8f0b6a7c370a2065f77
206,600,591,896,450,900,000,000,000,000,000,000,000
5
command line triggered buffer overruns Prevent extremely long command line arguments from overflowing local buffers in raw_printf or config_error_add. The increased buffer sizes they recently got to deal with long configuration file values aren't sufficient to handle command line induced overflows. choose_windows(co...
TEST_P(DownstreamProtocolIntegrationTest, RetryAttemptCountHeader) { auto host = config_helper_.createVirtualHost("host", "/test_retry"); host.set_include_request_attempt_count(true); host.set_include_attempt_count_in_response(true); config_helper_.addVirtualHost(host); initialize(); codec_client_ = makeHtt...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
270,624,114,384,463,200,000,000,000,000,000,000,000
40
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
static int tar_get(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf) { return user_regset_copyout(&pos, &count, &kbuf, &ubuf, &target->thread.tar, 0, sizeof(u64)); }
0
[ "CWE-119", "CWE-787" ]
linux
c1fa0768a8713b135848f78fd43ffc208d8ded70
124,291,666,656,767,730,000,000,000,000,000,000,000
8
powerpc/tm: Flush TM only if CPU has TM feature Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump") added code to access TM SPRs in flush_tmregs_to_thread(). However flush_tmregs_to_thread() does not check if TM feature is available on CPU before trying to access TM SPRs in order to copy live state to th...
static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) { struct vm_area_struct *mpnt, *tmp, *prev, **pprev; struct rb_node **rb_link, *rb_parent; int retval; unsigned long charge; struct mempolicy *pol; down_write(&oldmm->mmap_sem); flush_cache_dup_mm(oldmm); /* * Not linked in yet - no deadlock ...
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
286,049,531,221,594,970,000,000,000,000,000,000,000
128
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
void readRegexMatch(YAML::Node node, const std::string &delimiter, string_array &dest, bool scope_limit = true) { YAML::Node object; std::string script, url, match, rep, strLine; for(unsigned i = 0; i < node.size(); i++) { object = node[i]; object["script"] >>= script; if(script...
0
[ "CWE-434", "CWE-94" ]
subconverter
ce8d2bd0f13f05fcbd2ed90755d097f402393dd3
224,471,623,097,668,720,000,000,000,000,000,000,000
30
Enhancements Add authorization check before loading scripts. Add detailed logs when loading preference settings.
CAMLexport int caml_deserialize_sint_1(void) { return read8s(); }
0
[ "CWE-200" ]
ocaml
659615c7b100a89eafe6253e7a5b9d84d0e8df74
333,392,680,098,819,360,000,000,000,000,000,000,000
4
fix PR#7003 and a few other bugs caused by misuse of Int_val git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16525 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
void WebContents::DevToolsOpened() { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); v8::Locker locker(isolate); v8::HandleScope handle_scope(isolate); DCHECK(inspectable_web_contents_); auto handle = FromOrCreate( isolate, inspectable_web_contents_->GetDevToolsWebContents()); devtools_web...
0
[ "CWE-200", "CWE-668" ]
electron
07a1c2a3e5845901f7e2eda9506695be58edc73c
84,810,129,356,019,285,000,000,000,000,000,000,000
22
fix: restrict sendToFrame to same-process frames by default (#26875)
static void setProtocolError(const char *errstr, client *c) { if (server.verbosity <= LL_VERBOSE || c->flags & CLIENT_MASTER) { sds client = catClientInfoString(sdsempty(),c); /* Sample some protocol to given an idea about what was inside. */ char buf[256]; if (sdslen(c->querybuf)-c...
0
[ "CWE-770" ]
redis
5674b0057ff2903d43eaff802017eddf37c360f8
139,562,509,308,267,530,000,000,000,000,000,000,000
28
Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675) This change sets a low limit for multibulk and bulk length in the protocol for unauthenticated connections, so that they can't easily cause redis to allocate massive amounts of memory by sending just a few characters on the network. T...
static void catc_stats_timer(unsigned long data) { struct catc *catc = (void *) data; int i; for (i = 0; i < 8; i++) catc_get_reg_async(catc, EthStats + 7 - i, catc_stats_done); mod_timer(&catc->timer, jiffies + STATS_UPDATE); }
0
[ "CWE-20", "CWE-119" ]
linux
2d6a0e9de03ee658a9adc3bfb2f0ca55dff1e478
317,668,933,168,059,000,000,000,000,000,000,000,000
10
catc: Use heap buffer for memory size test Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
void jswrap_graphics_drawCircle(JsVar *parent, int x, int y, int rad) { JsGraphics gfx; if (!graphicsGetFromVar(&gfx, parent)) return; graphicsDrawCircle(&gfx, (short)x,(short)y,(short)rad); graphicsSetVar(&gfx); // gfx data changed because modified area }
0
[ "CWE-125" ]
Espruino
8a44b04b584b3d3ab1cb68fed410f7ecb165e50e
10,763,669,822,848,507,000,000,000,000,000,000,000
5
Add height check for Graphics.createArrayBuffer(...vertical_byte:true) (fix #1421)
static Image *ReadTIFFImage(const ImageInfo *image_info, ExceptionInfo *exception) { #define ThrowTIFFException(severity,message) \ { \ if (pixel_info != (MemoryInfo *) NULL) \ pixel_info=RelinquishVirtualMemory(pixel_info); \ if (quantum_info != (QuantumInfo *) NULL) \ quantum_info=DestroyQuantumInfo(qua...
1
[ "CWE-703", "CWE-787" ]
ImageMagick
30ccf9a0da1f47161b5935a95be854fe84e6c2a2
153,310,449,494,041,790,000,000,000,000,000,000,000
1,013
squash heap-buffer-overflow, PoC TIFF from Hardik
std::string queueloader::get_filename(const std::string& str) { std::string fn = ctrl->get_dlpath(); if (fn[fn.length()-1] != NEWSBEUTER_PATH_SEP[0]) fn.append(NEWSBEUTER_PATH_SEP); char buf[1024]; snprintf(buf, sizeof(buf), "%s", str.c_str()); char * base = basename(buf); if (!base || strlen(base) == 0) { c...
0
[ "CWE-78" ]
newsbeuter
c8fea2f60c18ed30bdd1bb6f798e994e51a58260
161,988,235,943,497,160,000,000,000,000,000,000,000
18
Work around shell code in podcast names (#598)
static int get_vlan_ndev_tc(struct net_device *vlan_ndev, int prio) { struct net_device *dev; dev = vlan_dev_real_dev(vlan_ndev); if (dev->num_tc) return netdev_get_prio_tc_map(dev, prio); return (vlan_dev_get_egress_qos_mask(vlan_ndev, prio) & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT; }
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
35,865,411,955,736,310,000,000,000,000,000,000,000
11
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
static int enum_dir(sc_path_t path, int depth) { sc_file_t *file; int r, file_type; u8 files[SC_MAX_APDU_BUFFER_SIZE]; r = sc_lock(card); if (r == SC_SUCCESS) r = sc_select_file(card, &path, &file); sc_unlock(card); if (r) { fprintf(stderr, "SELECT FILE failed: %s\n", sc_strerror(r)); return 1; } print_...
1
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
323,282,471,668,804,360,000,000,000,000,000,000,000
43
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
MODRET set_wtmplog(cmd_rec *cmd) { int use_wtmp = -1; config_rec *c = NULL; CHECK_ARGS(cmd, 1); CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL|CONF_ANON); if (strcasecmp(cmd->argv[1], "NONE") == 0) { use_wtmp = FALSE; } else { use_wtmp = get_boolean(cmd, 1); if (use_wtmp == -1) { CO...
0
[ "CWE-59", "CWE-295" ]
proftpd
349addc3be4fcdad9bd4ec01ad1ccd916c898ed8
132,101,597,720,365,000,000,000,000,000,000,000,000
24
Walk the entire DefaultRoot path, checking for symlinks of any component, when AllowChrootSymlinks is disabled.
void ff_amf_write_null(uint8_t **dst) { bytestream_put_byte(dst, AMF_DATA_TYPE_NULL); }
0
[ "CWE-20" ]
FFmpeg
ffcc82219cef0928bed2d558b19ef6ea35634130
289,376,264,781,182,980,000,000,000,000,000,000,000
4
avformat/rtmppkt: Convert ff_amf_get_field_value() to bytestream2 Fixes: out of array accesses Found-by: JunDong Xie of Ant-financial Light-Year Security Lab Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
init_redir_ga(void) { ga_init2(&redir_ga, sizeof(char), 500); }
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
95,264,433,981,930,880,000,000,000,000,000,000,000
4
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
hyphenHashNew () { HyphenHashTab *hashTab; if (!(hashTab = malloc (sizeof (HyphenHashTab)))) outOfMemory (); memset (hashTab, 0, sizeof (HyphenHashTab)); return hashTab; }
0
[]
liblouis
dc97ef791a4fae9da11592c79f9f79e010596e0c
314,867,263,585,631,680,000,000,000,000,000,000,000
8
Merge branch 'table_resolver'
int fuse_fs_readlink(struct fuse_fs *fs, const char *path, char *buf, size_t len) { fuse_get_context()->private_data = fs->user_data; if (fs->op.readlink) return fs->op.readlink(path, buf, len); else return -ENOSYS; }
0
[]
ntfs-3g
fb28eef6f1c26170566187c1ab7dc913a13ea43c
309,426,971,155,505,200,000,000,000,000,000,000,000
9
Hardened the checking of directory offset requested by a readdir When asked for the next directory entries, make sure the chunk offset is within valid values, otherwise return no more entries in chunk.
void ring_buffer_set_clock(struct ring_buffer *buffer, u64 (*clock)(void)) { buffer->clock = clock; }
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
292,220,612,610,062,040,000,000,000,000,000,000,000
5
ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this...
gst_qtdemux_push_event (GstQTDemux * qtdemux, GstEvent * event) { guint n; gboolean has_valid_stream = FALSE; GstEventType etype = GST_EVENT_TYPE (event); GST_DEBUG_OBJECT (qtdemux, "pushing %s event on all source pads", GST_EVENT_TYPE_NAME (event)); for (n = 0; n < qtdemux->n_streams; n++) { GstP...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
28,102,420,180,136,610,000,000,000,000,000,000,000
35
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
smtp_report_protocol_client(struct smtp_session *s, const char *command) { if (! SESSION_FILTERED(s)) return; report_smtp_protocol_client("smtp-in", s->id, command); }
0
[ "CWE-78", "CWE-252" ]
src
9dcfda045474d8903224d175907bfc29761dcb45
203,225,981,366,475,330,000,000,000,000,000,000,000
7
Fix a security vulnerability discovered by Qualys which can lead to a privileges escalation on mbox deliveries and unprivileged code execution on lmtp deliveries, due to a logic issue causing a sanity check to be missed. ok eric@, millert@
get_user_cfgfile_path(const char *common_path, const char *filename, const struct passwd *user, char **fn) { /* Getting file from user home directory, e.g. ~/.yubico/challenge, or * from a system wide directory. * * Format is hex(challenge):hex(response):slot num */ char *userfile; size_t len; if (...
0
[ "CWE-200" ]
yubico-pam
0f6ceabab0a8849b47f67d727aa526c2656089ba
230,377,465,590,865,550,000,000,000,000,000,000,000
30
util: make sure to close the authfile before returning success fixes #136
static int io_unregister_pbuf_ring(struct io_ring_ctx *ctx, void __user *arg) { struct io_uring_buf_reg reg; struct io_buffer_list *bl; if (copy_from_user(&reg, arg, sizeof(reg))) return -EFAULT; if (reg.pad || reg.resv[0] || reg.resv[1] || reg.resv[2]) return -EINVAL; bl = io_buffer_get_list(ctx, reg.bgid)...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
296,258,220,423,104,600,000,000,000,000,000,000,000
23
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
struct passwd *enc_untrusted_getpwuid(uid_t uid) { MessageWriter input; MessageReader output; input.Push<uid_t>(uid); const auto status = NonSystemCallDispatcher( ::asylo::host_call::kGetPwUidHandler, &input, &output); CheckStatusAndParamCount(status, output, "enc_untrusted_getpwuid", 1, ...
0
[ "CWE-125" ]
asylo
b1d120a2c7d7446d2cc58d517e20a1b184b82200
61,439,301,522,591,570,000,000,000,000,000,000,000
26
Check for return size in enc_untrusted_read Check return size does not exceed requested. The returned result and content still cannot be trusted, but it's expected behavior when not using a secure file system. PiperOrigin-RevId: 333827386 Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29
next_trim (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags, int *err) { struct b_conn *b_conn = nxdata; int r; r = b_conn->b->trim (b_conn->b, b_conn->conn, count, offset, flags, err); if (r == -1) assert (*err); return r; }
0
[ "CWE-406" ]
nbdkit
bf0d61883a2f02f4388ec10dc92d4c61c093679e
150,079,662,830,974,610,000,000,000,000,000,000,000
11
server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO Most known NBD clients do not bother with NBD_OPT_INFO (except for clients like 'qemu-nbd --list' that don't ever intend to connect), but go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu to add in an extra client step (whether info on the ...
static ssize_t mdesc_read(struct file *file, char __user *buf, size_t len, loff_t *offp) { struct mdesc_handle *hp = file->private_data; unsigned char *mdesc; int bytes_left, count = len; if (*offp >= hp->handle_size) return 0; bytes_left = hp->handle_size - *offp; if (count > bytes_left) count = bytes...
0
[ "CWE-476" ]
sparc
80caf43549e7e41a695c6d1e11066286538b336f
103,987,407,363,161,130,000,000,000,000,000,000,000
23
mdesc: fix a missing-check bug in get_vdev_port_node_info() In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated by kstrdup_const(), and it returns NULL when fails. So 'node_info->vdev_port.name' should be checked. Signed-off-by: Gen Zhang <blackgod016574@gmail.com> Signed-off-by: David S. Miller <d...
void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) { int need_software_tstamp = sock_flag(sk, SOCK_RCVTSTAMP); struct timespec ts[3]; int empty = 1; struct skb_shared_hwtstamps *shhwtstamps = skb_hwtstamps(skb); /* Race occurred between timestamp enabling and packet receiv...
0
[]
linux-2.6
644595f89620ba8446cc555be336d24a34464950
288,938,548,243,600,900,000,000,000,000,000,000,000
46
compat: Handle COMPAT_USE_64BIT_TIME in net/socket.c Use helper functions aware of COMPAT_USE_64BIT_TIME to write struct timeval and struct timespec to userspace in net/socket.c. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
TEST_F(EncryptedRecordTest, TestPadding) { addToQueue("17030100050123456789"); EXPECT_CALL(*readAead_, _decrypt(_, _, 0)) .WillOnce(Invoke([](std::unique_ptr<IOBuf>& buf, const IOBuf*, uint64_t) { expectSame(buf, "0123456789"); return getBuf("1234abcd17000000"); })); auto msg = read_.r...
0
[ "CWE-400", "CWE-703", "CWE-770" ]
fizz
6bf67137ef1ee5cd70c842b014c322b7deaf994b
272,710,284,757,492,760,000,000,000,000,000,000,000
12
Reject zero length handshake records. Summary: Zero length (all padding) handshake are forbidden by RFC. Allowing these was a regression in D13754697 (2c6f78a). This is a partial fix for CVE-2019-11924 Reviewed By: xybu Differential Revision: D16285100 fbshipit-source-id: 05a19d31ad74601ce89156a0e59517aaad8dd928
phys_addr_t swiotlb_tbl_map_single(struct device *dev, phys_addr_t orig_addr, size_t mapping_size, size_t alloc_size, unsigned int alloc_align_mask, enum dma_data_direction dir, unsigned long attrs) { struct io_tlb_mem *mem = dev->dma_io_tlb_mem; unsigned int offset = swiotlb_align_offset(dev, orig_addr); unsi...
0
[ "CWE-200", "CWE-401" ]
linux
aa6f8dcbab473f3a3c7454b74caa46d36cdc5d13
235,176,610,749,413,200,000,000,000,000,000,000,000
51
swiotlb: rework "fix info leak with DMA_FROM_DEVICE" Unfortunately, we ended up merging an old version of the patch "fix info leak with DMA_FROM_DEVICE" instead of merging the latest one. Christoph (the swiotlb maintainer), he asked me to create an incremental fix (after I have pointed this out the mix up, and asked h...
static int graft_tree(struct mount *mnt, struct mount *p, struct mountpoint *mp) { if (mnt->mnt.mnt_sb->s_flags & MS_NOUSER) return -EINVAL; if (d_is_dir(mp->m_dentry) != d_is_dir(mnt->mnt.mnt_root)) return -ENOTDIR; return attach_recursive_mnt(mnt, p, mp, NULL); }
0
[ "CWE-703" ]
linux
cd4a40174b71acd021877341684d8bb1dc8ea4ae
76,031,529,793,949,450,000,000,000,000,000,000,000
11
mnt: Fail collect_mounts when applied to unmounted mounts The only users of collect_mounts are in audit_tree.c In audit_trim_trees and audit_add_tree_rule the path passed into collect_mounts is generated from kern_path passed an audit_tree pathname which is guaranteed to be an absolute path. In those cases collect_...
static void imap_mbox_select(struct Mailbox *m) { struct ImapAccountData *adata = imap_adata_get(m); struct ImapMboxData *mdata = imap_mdata_get(m); if (!adata || !mdata) return; const char *condstore = NULL; #ifdef USE_HCACHE if ((adata->capabilities & IMAP_CAP_CONDSTORE) && C_ImapCondstore) condsto...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
251,328,538,964,071,500,000,000,000,000,000,000,000
23
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
get_stream(struct snd_line6_pcm *line6pcm, int direction) { return (direction == SNDRV_PCM_STREAM_PLAYBACK) ? &line6pcm->out : &line6pcm->in; }
0
[ "CWE-476" ]
linux
3450121997ce872eb7f1248417225827ea249710
186,093,980,673,603,830,000,000,000,000,000,000,000
5
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...
int32_t ByteArray::Get(int32_t index, ByteVector* b) { assert(b); return Get(index, &((*b)[0]), 0, b->size()); }
0
[ "CWE-119", "CWE-703" ]
sfntly
c56b85408bab232efd7e650f0994272a174e3b92
227,891,201,564,588,270,000,000,000,000,000,000,000
4
Add a bounds check to ByteArray::Get().
void tssy_del(GF_Box *s) { gf_free(s); }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
149,465,450,402,634,760,000,000,000,000,000,000,000
4
prevent dref memleak on invalid input (#1183)
static struct xfrm_policy *clone_policy(const struct xfrm_policy *old, int dir) { struct xfrm_policy *newp = xfrm_policy_alloc(xp_net(old), GFP_ATOMIC); struct net *net = xp_net(old); if (newp) { newp->selector = old->selector; if (security_xfrm_policy_clone(old->security, &newp->security)) { kfr...
0
[ "CWE-125" ]
ipsec
7bab09631c2a303f87a7eb7e3d69e888673b9b7e
311,882,943,856,945,540,000,000,000,000,000,000,000
29
xfrm: policy: check policy direction value The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used as an array index. This can lead to an out-of-bound access, kernel lockup and DoS. Add a check for the 'dir' value. This fixes CVE-2017-11600. References: https://bugzilla.redhat.com/show_bug.cgi?...
copy_or_convert_to_datetime(THD *thd, const MYSQL_TIME *from, MYSQL_TIME *to) { if (from->time_type == MYSQL_TIMESTAMP_TIME) return time_to_datetime(thd, from, to); *to= *from; return false; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
190,549,446,879,642,560,000,000,000,000,000,000,000
7
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static inline u64 kvm_guest_supported_xfd(struct kvm_vcpu *vcpu) { return kvm_guest_supported_xcr0(vcpu) & XFEATURE_MASK_USER_DYNAMIC; }
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
129,302,976,807,733,020,000,000,000,000,000,000,000
4
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
static void UniqueColorsToImage(Image *unique_image,CacheView *unique_view, CubeInfo *cube_info,const NodeInfo *node_info,ExceptionInfo *exception) { #define UniqueColorsImageTag "UniqueColors/Image" MagickBooleanType status; register ssize_t i; size_t number_children; /* Traverse any chi...
0
[ "CWE-190" ]
ImageMagick
94691f00839dbdf43edb1508af945ab19b388573
321,126,388,934,968,500,000,000,000,000,000,000,000
64
https://github.com/ImageMagick/ImageMagick/issues/1750
static void ClosestColor(const Image *image,CubeInfo *cube_info, const NodeInfo *node_info) { register ssize_t i; size_t number_children; /* Traverse any children. */ number_children=cube_info->associate_alpha == MagickFalse ? 8UL : 16UL; for (i=0; i < (ssize_t) number_children; i++) if ...
0
[ "CWE-125" ]
ImageMagick6
e2a21735e3a3f3930bd431585ec36334c4c2eb77
38,612,996,653,611,850,000,000,000,000,000,000,000
71
https://github.com/ImageMagick/ImageMagick/issues/1540
R_API int *r_str_split_lines(char *str, int *count) { int i; int lines = 0; if (!str) { return NULL; } int *indexes = NULL; // count lines for (i = 0; str[i]; i++) { if (str[i] == '\n') { lines++; } } // allocate and set indexes indexes = calloc (sizeof (int), lines + 1); if (!indexes) { return NU...
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
261,822,281,625,225,900,000,000,000,000,000,000,000
31
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...
ec_subm_25519 (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, mpi_ec_t ctx) { mpi_ptr_t wp, up, vp; mpi_size_t wsize = LIMB_SIZE_25519; mpi_limb_t n[LIMB_SIZE_25519]; mpi_limb_t borrow; if (w->nlimbs != wsize || u->nlimbs != wsize || v->nlimbs != wsize) log_bug ("subm_25519: different sizes\n"); memset (n,...
0
[ "CWE-203" ]
libgcrypt
b9577f7c89b4327edc09f2231bc8b31521102c79
234,325,586,896,153,960,000,000,000,000,000,000,000
20
ecc: Add mitigation against timing attack. * cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_sign): Add the order N to K. * mpi/ec.c (_gcry_mpi_ec_mul_point): Compute with NBITS of P or larger. CVE-id: CVE-2019-13627 GnuPG-bug-id: 4626 Co-authored-by: Ján Jančár <johny@neuromancer.sk> Signed-off-by: NIIBE Yutaka <gniibe@fsij.org...
static inline bool got_nohz_idle_kick(void) { return false; }
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
74,761,941,667,598,095,000,000,000,000,000,000,000
4
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
static inline int ep_events_available(struct eventpoll *ep) { return !list_empty(&ep->rdllist) || ep->ovflist != EP_UNACTIVE_PTR; }
0
[]
linux-2.6
28d82dc1c4edbc352129f97f4ca22624d1fe61de
79,611,407,456,043,530,000,000,000,000,000,000,000
4
epoll: limit paths The current epoll code can be tickled to run basically indefinitely in both loop detection path check (on ep_insert()), and in the wakeup paths. The programs that tickle this behavior set up deeply linked networks of epoll file descriptors that cause the epoll algorithms to traverse them indefinitel...
TIFFWriteDirectoryTagCheckedUndefinedArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint8* value) { assert(sizeof(uint8)==1); return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_UNDEFINED,count,count,value)); }
0
[ "CWE-617" ]
libtiff
de144fd228e4be8aa484c3caf3d814b6fa88c6d9
16,397,731,092,397,873,000,000,000,000,000,000,000
5
TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963
} //! Insert a copy of the image \c img into the current image list, at position \c pos \newinstance.
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
52,272,626,443,747,370,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
kadm5_modify_principal(void *server_handle, kadm5_principal_ent_t entry, long mask) { int ret, ret2, i; kadm5_policy_ent_rec pol; krb5_boolean have_pol = FALSE; krb5_db_entry *kdb; krb5_tl_data *tl_data_orig; osa_princ...
1
[ "CWE-703" ]
krb5
b863de7fbf080b15e347a736fdda0a82d42f4f6b
161,681,685,629,957,250,000,000,000,000,000,000,000
143
Check for null kadm5 policy name [CVE-2015-8630] In kadm5_create_principal_3() and kadm5_modify_principal(), check for entry->policy being null when KADM5_POLICY is included in the mask. CVE-2015-8630: In MIT krb5 1.12 and later, an authenticated attacker with permission to modify a principal entry can cause kadmind...
std::unique_ptr<QuicReadCodec> makeClientEncryptedCodec( bool handshakeCipher = false) { FizzCryptoFactory cryptoFactory; auto readCodec = std::make_unique<QuicReadCodec>(QuicNodeType::Client); readCodec->setOneRttReadCipher(test::createNoOpAead()); readCodec->setOneRttHeaderCipher(test::createN...
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
247,630,288,979,520,620,000,000,000,000,000,000,000
20
Close connection if we derive an extra 1-rtt write cipher Summary: Fixes CVE-2021-24029 Reviewed By: mjoras, lnicco Differential Revision: D26613890 fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945
static int irias_seq_show(struct seq_file *seq, void *v) { if (v == SEQ_START_TOKEN) seq_puts(seq, "LM-IAS Objects:\n"); else { struct ias_object *obj = v; struct ias_attrib *attrib; IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return -EINVAL;); seq_printf(seq, "name: %s, id=%d\n", obj->name, obj->id...
0
[]
linux-2.6
d370af0ef7951188daeb15bae75db7ba57c67846
308,214,931,867,229,500,000,000,000,000,000,000,000
60
irda: validate peer name and attribute lengths Length fields provided by a peer for names and attributes may be longer than the destination array sizes. Validate lengths to prevent stack buffer overflows. Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com> Cc: stable@kernel.org Signed-off-by: David S. Miller <da...
uint8 LEX::get_effective_with_check(TABLE_LIST *view) { if (view->select_lex->master_unit() == &unit && which_check_option_applicable()) return (uint8)view->with_check; return VIEW_CHECK_NONE; }
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
237,845,866,951,564,370,000,000,000,000,000,000,000
7
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
disconnect_window_signals (GSManager *manager, GSWindow *window) { g_signal_handlers_disconnect_by_func (window, window_deactivated_cb, manager); g_signal_handlers_disconnect_by_func (window, window_activity_cb, manager); g_signal_handlers_disconnect_by_func (window, ...
0
[]
gnome-screensaver
2f597ea9f1f363277fd4dfc109fa41bbc6225aca
39,970,146,209,637,966,000,000,000,000,000,000,000
14
Fix adding monitors Make sure to show windows that are added. And fix an off by one bug.
FastHufDecoder::FastHufDecoder (const char *&table, int numBytes, int minSymbol, int maxSymbol, int rleSymbol) : _rleSymbol (rleSymbol), _numSymbols (0), _minCodeLength (255), _maxCodeLength (0), _idToSymbol (0) { // // List of symbols that we find with non-zero code ...
0
[ "CWE-190" ]
openexr
c3ed4a1db1f39bf4524a644cb2af81dc8cfab33f
153,643,357,904,600,980,000,000,000,000,000,000,000
220
compute Huf codelengths using 64 bit to prevent shift overflow Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static inline size_t xfrm_spdinfo_msgsize(void) { return NLMSG_ALIGN(4) + nla_total_size(sizeof(struct xfrmu_spdinfo)) + nla_total_size(sizeof(struct xfrmu_spdhinfo)) + nla_total_size(sizeof(struct xfrmu_spdhthresh)) + nla_total_size(sizeof(struct xfrmu_spdhthresh)); }
0
[ "CWE-284" ]
linux
677e806da4d916052585301785d847c3b3e6186a
160,871,832,666,204,080,000,000,000,000,000,000,000
8
xfrm_user: validate XFRM_MSG_NEWAE XFRMA_REPLAY_ESN_VAL replay_window When a new xfrm state is created during an XFRM_MSG_NEWSA call we validate the user supplied replay_esn to ensure that the size is valid and to ensure that the replay_window size is within the allocated buffer. However later it is possible to updat...
static indexEntry nextIndex(HeaderIterator hi) { Header h = hi->h; int slot; indexEntry entry = NULL; for (slot = hi->next_index; slot < h->indexUsed; slot++) { entry = h->index + slot; if (!ENTRY_IS_REGION(entry)) break; } hi->next_index = slot; if (entry == NULL || slot >= h->index...
0
[ "CWE-125" ]
rpm
8f4b3c3cab8922a2022b9e47c71f1ecf906077ef
3,749,380,125,496,440,000,000,000,000,000,000,000
18
hdrblobInit() needs bounds checks too Users can pass untrusted data to hdrblobInit() and it must be robust against this.
static int mbind_range(struct mm_struct *mm, unsigned long start, unsigned long end, struct mempolicy *new_pol) { struct vm_area_struct *next; struct vm_area_struct *prev; struct vm_area_struct *vma; int err = 0; pgoff_t pgoff; unsigned long vmstart; unsigned long vmend; vma = find_vma(mm, start); VM...
0
[ "CWE-787" ]
linux
aa9f7d5172fac9bf1f09e678c35e287a40a7b7dd
160,869,024,029,638,810,000,000,000,000,000,000,000
58
mm: mempolicy: require at least one nodeid for MPOL_PREFERRED Using an empty (malformed) nodelist that is not caught during mount option parsing leads to a stack-out-of-bounds access. The option string that was used was: "mpol=prefer:,". However, MPOL_PREFERRED requires a single node number, which is not being provi...
static Image *ReadMETAImage(const ImageInfo *image_info, ExceptionInfo *exception) { Image *buff, *image; MagickBooleanType status; StringInfo *profile; size_t length; void *blob; /* Open file containing binary metadata */ assert(image_info != (const ImageInfo *) NULL)...
0
[ "CWE-400" ]
ImageMagick6
4a8a6274f5e690f9106a998de9b8a8f3929402bc
141,163,037,465,655,040,000,000,000,000,000,000,000
227
https://github.com/ImageMagick/ImageMagick/issues/660
static int dev_cpu_callback(struct notifier_block *nfb, unsigned long action, void *ocpu) { struct sk_buff **list_skb; struct sk_buff *skb; unsigned int cpu, oldcpu = (unsigned long)ocpu; struct softnet_data *sd, *oldsd; if (action != CPU_DEAD && action != CPU_DEAD_FROZEN) return NOTIFY_OK; loca...
0
[ "CWE-264" ]
linux
8909c9ad8ff03611c9c96c9a92656213e4bb495b
277,901,872,052,525,900,000,000,000,000,000,000,000
48
net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules Since a8f80e8ff94ecba629542d9b4b5f5a8ee3eb565c any process with CAP_NET_ADMIN may load any module from /lib/modules/. This doesn't mean that CAP_NET_ADMIN is a superset of CAP_SYS_MODULE as modules are limited to /lib/modules/**. However, CAP_NET_ADMIN...
discard_samples(int new_first) { int n_to_save; assert(new_first >= 0 && new_first < n_samples); n_to_save = n_samples - new_first; memmove(rtc_sec, rtc_sec + new_first, n_to_save * sizeof(time_t)); memmove(rtc_trim, rtc_trim + new_first, n_to_save * sizeof(double)); memmove(system_times, system_times + ...
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
106,123,447,012,278,760,000,000,000,000,000,000,000
14
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
static void reject_delay(void *ctx) { REQUEST *request = ctx; rad_assert(request->magic == REQUEST_MAGIC); rad_assert(request->child_state == REQUEST_REJECT_DELAY); RDEBUG2("Sending delayed reject for request %u", request->number); DEBUG_PACKET(request, request->reply, 1); request->listener->send(request->lis...
0
[ "CWE-399" ]
freeradius-server
ff94dd35673bba1476594299d31ce8293b8bd223
72,529,751,268,096,010,000,000,000,000,000,000,000
18
Do not delete "old" requests until they are free. If the request is in the queue for 30+ seconds, do NOT delete it. Instead, mark it as "STOP PROCESSING", and do "wait_for_child_to_die", which waits for a child thread to pick it up, and acknowledge that it's done. Once it's marked done, we can finally clean it up. T...
_functor_isoline3d(CImgList<T>& _list):list(_list) {}
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
212,924,297,751,749,100,000,000,000,000,000,000,000
1
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static struct dentry *proc_fdinfo_instantiate(struct inode *dir, struct dentry *dentry, struct task_struct *task, const void *ptr) { unsigned fd = *(unsigned *)ptr; struct inode *inode; struct proc_inode *ei; struct dentry *error = ERR_PTR(-ENOENT); inode = proc_pid_make_inode(dir->i_sb, task); if (!inode) ...
0
[ "CWE-20", "CWE-362", "CWE-416" ]
linux
86acdca1b63e6890540fa19495cfc708beff3d8b
74,297,334,992,295,910,000,000,000,000,000,000,000
24
fix autofs/afs/etc. magic mountpoint breakage We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT) if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type is bogus here; we want LAST_BIND for everything of that kind and we get LAST_NORM left over from finding parent directory. So make...
int fxInt32Compare(const void* p, const void* q) { txS4 a = *((txS4*)p); txS4 b = *((txS4*)q); return (a < b) ? -1 : (a > b) ? 1 : 0; }
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
276,059,776,557,325,930,000,000,000,000,000,000,000
6
XS: #896
static void start_ssl_shutdown(pn_transport_t *transport) { pni_ssl_t *ssl = transport->ssl; assert(ssl->network_out_pending == 0); if (ssl->queued_shutdown) return; ssl->queued_shutdown = true; ssl_log(transport, "Shutting down SSL connection..."); DWORD shutdown = SCHANNEL_SHUTDOWN; SecBuffer shutB...
0
[]
qpid-proton
4aea0fd8502f5e9af7f22fd60645eeec07bce0b2
209,423,914,265,099,080,000,000,000,000,000,000,000
23
PROTON-2014: [c] Ensure SSL mutual authentication (cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7)
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { auto* params = reinterpret_cast<TfLiteResizeNearestNeighborParams*>(node->builtin_data); const TfLiteTensor* input = GetInput(context, node, kInputTensor); TfLiteTensor* output = GetOutput(context, node, kOutputTensor); const TfLiteTensor* siz...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
146,420,386,786,372,560,000,000,000,000,000,000,000
54
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
Simple_Selector_Obj Parser::parse_pseudo_selector() { if (lex< sequence< optional < pseudo_prefix >, // we keep the space within the name, strange enough // ToDo: refactor output to schedule the space for it // or do we really want to keep the real white-space? se...
0
[ "CWE-125" ]
libsass
b3374e3fd1a0c3658644d2bad24e4a0ff2e0dcea
140,717,891,640,584,220,000,000,000,000,000,000,000
55
Fix handling of unclosed interpolant in url Fixes #2661
static bool decode_vlv_response(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; DATA_BLOB context_id; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_vlv_resp_control *lvrc; if (!data) return false; if (!asn1_load(data, in)) { return false; } lvrc = talloc(mem_ctx, struct ldb...
0
[ "CWE-399" ]
samba
530d50a1abdcdf4d1775652d4c456c1274d83d8d
317,307,739,731,134,400,000,000,000,000,000,000,000
56
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...
dns64_get_mem(struct module_env* env, int id) { struct dns64_env* dns64_env = (struct dns64_env*)env->modinfo[id]; if (!dns64_env) return 0; return sizeof(*dns64_env); }
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
312,396,073,867,997,780,000,000,000,000,000,000,000
7
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) { struct kvm_run *kvm_run = vcpu->run; int r; vcpu_load(vcpu); kvm_sigset_activate(vcpu); kvm_run->flags = 0; kvm_load_guest_fpu(vcpu); kvm_vcpu_srcu_read_lock(vcpu); if (unlikely(vcpu->arch.mp_state == KVM_MP_STATE_UNINITIALIZED)) { if (kvm_run->immediate_...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
217,734,711,387,012,700,000,000,000,000,000,000,000
91
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
TPMS_ATTEST_Marshal(TPMS_ATTEST *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; written += TPM_CONSTANTS32_Marshal(&source->magic, buffer, size); written += TPMI_ST_ATTEST_Marshal(&source->type, buffer, size); written += TPM2B_NAME_Marshal(&source->qualifiedSigner, buffer, size); writte...
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
258,081,567,509,135,370,000,000,000,000,000,000,000
13
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>
void ogs_sbi_message_init(int num_of_request_pool, int num_of_response_pool) { ogs_pool_init(&request_pool, num_of_request_pool); ogs_pool_init(&response_pool, num_of_response_pool); }
0
[ "CWE-476", "CWE-787" ]
open5gs
d919b2744cd05abae043490f0a3dd1946c1ccb8c
53,320,240,644,116,340,000,000,000,000,000,000,000
5
[AMF] fix the memory problem (#1247) 1. memory corruption - Overflow num_of_part in SBI message 2. null pointer dereference - n2InfoContent->ngap_ie_type
attributeDeclSplit(void *ctx, const xmlChar * elem, const xmlChar * name, int type, int def, const xmlChar * defaultValue, xmlEnumerationPtr tree) { xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx; if ((ctxt != NULL) && (ctxt->user_sax != NULL) && (ctxt->user_s...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
294,573,561,952,899,500,000,000,000,000,000,000,000
13
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
void operator()(OpKernelContext* ctx, const CPUDevice& d, int64 num_batches, int64 samples_per_batch, int64 num_elements, typename TTypes<T>::ConstFlat means, typename TTypes<T>::ConstFlat stddevs, typename TTypes<T>::ConstFlat minvals, ...
1
[ "CWE-703", "CWE-197" ]
tensorflow
ca8c013b5e97b1373b3bb1c97ea655e69f31a575
254,236,726,954,734,230,000,000,000,000,000,000,000
258
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 ...
int snd_dma_alloc_pages(int type, struct device *device, size_t size, struct snd_dma_buffer *dmab) { snd_assert(size > 0, return -ENXIO); snd_assert(dmab != NULL, return -ENXIO); dmab->dev.type = type; dmab->dev.dev = device; dmab->bytes = 0; switch (type) { case SNDRV_DMA_TYPE_CONTINUOUS: dmab->area = snd...
0
[]
linux-2.6
ccec6e2c4a74adf76ed4e2478091a311b1806212
194,537,710,161,809,120,000,000,000,000,000,000,000
36
Convert snd-page-alloc proc file to use seq_file Use seq_file for the proc file read/write of snd-page-alloc module. This automatically fixes bugs in the old proc code. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
static struct futex_pi_state *alloc_pi_state(void) { struct futex_pi_state *pi_state = current->pi_state_cache; WARN_ON(!pi_state); current->pi_state_cache = NULL; return pi_state; }
0
[ "CWE-190" ]
linux
fbe0e839d1e22d88810f3ee3e2f1479be4c0aa4a
59,205,104,252,161,970,000,000,000,000,000,000,000
9
futex: Prevent overflow by strengthen input validation UBSAN reports signed integer overflow in kernel/futex.c: UBSAN: Undefined behaviour in kernel/futex.c:2041:18 signed integer overflow: 0 - -2147483648 cannot be represented in type 'int' Add a sanity check to catch negative values of nr_wake and nr_requeue. ...
static enum d_walk_ret check_mount(void *data, struct dentry *dentry) { int *ret = data; if (d_mountpoint(dentry)) { *ret = 1; return D_WALK_QUIT; } return D_WALK_CONTINUE; }
0
[ "CWE-401", "CWE-254" ]
linux
cde93be45a8a90d8c264c776fab63487b5038a65
198,710,239,426,858,940,000,000,000,000,000,000,000
9
dcache: Handle escaped paths in prepend_path A rename can result in a dentry that by walking up d_parent will never reach it's mnt_root. For lack of a better term I call this an escaped path. prepend_path is called by four different functions __d_path, d_absolute_path, d_path, and getcwd. __d_path only wants to see...
int merge_submodule(struct object_id *result, const char *path, const struct object_id *base, const struct object_id *a, const struct object_id *b, int search) { struct commit *commit_base, *commit_a, *commit_b; int parent_count; struct object_array merges; int i; /* store a in result in case we fail...
0
[]
git
a8dee3ca610f5a1d403634492136c887f83b59d2
123,907,287,091,138,270,000,000,000,000,000,000,000
91
Disallow dubiously-nested submodule git directories Currently it is technically possible to let a submodule's git directory point right into the git dir of a sibling submodule. Example: the git directories of two submodules with the names `hippo` and `hippo/hooks` would be `.git/modules/hippo/` and `.git/modules/hipp...
SPL_METHOD(SplFileInfo, getBasename) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(getThis()); char *fname, *suffix = 0; size_t flen; size_t slen = 0, path_len; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &suffix, &slen) == FAILURE) { return; } spl_filesystem_object_get_path(intern, &path_len); ...
0
[ "CWE-74" ]
php-src
a5a15965da23c8e97657278fc8dfbf1dfb20c016
244,753,686,481,481,850,000,000,000,000,000,000,000
23
Fix #78863: DirectoryIterator class silently truncates after a null byte Since the constructor of DirectoryIterator and friends is supposed to accepts paths (i.e. strings without NUL bytes), we must not accept arbitrary strings.
enum_field_types Item::field_type() const { switch (result_type()) { case STRING_RESULT: return string_field_type(); case INT_RESULT: return MYSQL_TYPE_LONGLONG; case DECIMAL_RESULT: return MYSQL_TYPE_NEWDECIMAL; case REAL_RESULT: return MYSQL_TYPE_DOUBLE; case ROW_RESULT: case TIME_RESULT: case...
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
235,303,674,770,275,630,000,000,000,000,000,000,000
15
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
dissect_kafka_produce_response_topic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version) { proto_item *ti; proto_tree *subtree; subtree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_kafka_topic, &ti, "Topic"); off...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
117,658,610,839,054,090,000,000,000,000,000,000,000
16
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
static int _gd2GetHeader(gdIOCtxPtr in, int *sx, int *sy, int *cs, int *vers, int *fmt, int *ncx, int *ncy, t_chunk_info ** chunkIdx) { int i; int ch; char id[5]; t_chunk_info *cidx; int sidx; int nc; GD2_DBG(php_gd_error("Reading gd2 header info")); for (i = 0; i < 4; i++) { ch = gdGetC(in); if (ch == EO...
1
[ "CWE-190" ]
php-src
7722455726bec8c53458a32851d2a87982cf0eac
244,111,162,467,894,080,000,000,000,000,000,000,000
116
Fixed #72339 Integer Overflow in _gd2GetHeader() resulting in heap overflow
void showLatencyDistSamples(struct distsamples *samples, long long tot) { int j; /* We convert samples into a index inside the palette * proportional to the percentage a given bucket represents. * This way intensity of the different parts of the spectrum * don't change relative to the number of...
0
[ "CWE-119", "CWE-787" ]
redis
9fdcc15962f9ff4baebe6fdd947816f43f730d50
158,247,954,841,081,160,000,000,000,000,000,000,000
20
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.
void gf_isom_reset_fragment_info(GF_ISOFile *movie, Bool keep_sample_count) { u32 i; if (!movie) return; for (i=0; i<gf_list_count(movie->moov->trackList); i++) { GF_TrackBox *trak = (GF_TrackBox*)gf_list_get(movie->moov->trackList, i); trak->Media->information->sampleTable->SampleSize->sampleCount = 0; #ifdef G...
0
[ "CWE-787" ]
gpac
f0a41d178a2dc5ac185506d9fa0b0a58356b16f7
221,995,880,313,716,080,000,000,000,000,000,000,000
15
fixed #2120
krb5_recvauth(krb5_context context, krb5_auth_context *auth_context, krb5_pointer fd, char *appl_version, krb5_principal server, krb5_int32 flags, krb5_keytab keytab, krb5_ticket **ticket) { return recvauth_common (context, auth_context, fd, appl_version, server, flags, keytab, ticket, 0...
0
[ "CWE-703" ]
krb5
102bb6ebf20f9174130c85c3b052ae104e5073ec
147,641,688,484,840,690,000,000,000,000,000,000,000
5
Fix krb5_read_message handling [CVE-2014-5355] In recvauth_common, do not use strcmp against the data fields of krb5_data objects populated by krb5_read_message(), as there is no guarantee that they are C strings. Instead, create an expected krb5_data value and use data_eq(). In the sample user-to-user server applic...
CImg<T>& draw_rectangle(const int x0, const int y0, const int z0, const int x1, const int y1, const int z1, const tc *const color, const float opacity=1) { if (is_empty()) return *this; if (!color) throw CImgArgumentException(_cimg_instance...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
77,311,467,389,268,590,000,000,000,000,000,000,000
11
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
ftp_nb_continue_read(ftpbuf_t *ftp TSRMLS_DC) { databuf_t *data = NULL; char *ptr; int lastch; size_t rcvd; ftptype_t type; data = ftp->data; /* check if there is already more data */ if (!data_available(ftp, data->fd)) { return PHP_FTP_MOREDATA; } type = ftp->type; lastch = ftp->lastch; if ((rcvd ...
0
[ "CWE-189" ]
php-src
ac2832935435556dc593784cd0087b5e576bbe4d
208,293,431,724,288,800,000,000,000,000,000,000,000
58
Fix bug #69545 - avoid overflow when reading list
GF_Err gf_isom_full_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_FullBox *ptr = (GF_FullBox *)s; e = gf_isom_box_write_header(s, bs); if (e) return e; gf_bs_write_u8(bs, ptr->version); gf_bs_write_u24(bs, ptr->flags); return GF_OK; }
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
265,319,605,904,645,880,000,000,000,000,000,000,000
10
fixed #1768
node_new_locked(void) { Node* node; if (IS_NOT_NULL(FreeNodeList)) { node = (Node* )FreeNodeList; FreeNodeList = FreeNodeList->next; return node; } node = (Node* )xmalloc(sizeof(Node)); /* xmemset(node, 0, sizeof(Node)); */ return node; }
0
[ "CWE-125" ]
Onigmo
29e7e6aedebafd5efbbd90655c8e0d495035d7b4
109,201,486,604,264,130,000,000,000,000,000,000,000
14
bug: Fix out of bounds read Add boundary check before PFETCH. Based on the following commits on https://github.com/kkos/oniguruma , but not the same. * 68c395576813b3f9812427f94d272bcffaca316c * dc0a23eb16961f98d2a5a2128d18bd4602058a10 * 5186c7c706a7f280110e6a0b060f87d0f7d790ce * 562bf4825b301693180c674994bf708b28b0...
int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, unsigned int flags) { int fput_needed, err, datagrams; struct socket *sock; struct mmsghdr __user *entry; struct compat_mmsghdr __user *compat_entry; struct msghdr msg_sys; struct used_address used_address; if (vlen > UIO_MAXIOV) ...
0
[]
linux-2.6
644595f89620ba8446cc555be336d24a34464950
291,905,978,149,404,160,000,000,000,000,000,000,000
54
compat: Handle COMPAT_USE_64BIT_TIME in net/socket.c Use helper functions aware of COMPAT_USE_64BIT_TIME to write struct timeval and struct timespec to userspace in net/socket.c. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
AddDevicePathPackage ( IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN OUT HII_DATABASE_RECORD *DatabaseRecord ) { EFI_STATUS Status; if (DevicePath == NULL) { ...
0
[ "CWE-416" ]
edk2
c32be82e99ef272e7fa742c2f06ff9a4c3756613
159,619,849,226,851,080,000,000,000,000,000,000,000
36
MdeModulePkg/HiiDB: Remove configuration table when it's freed (CVE-2019-14586) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1995 Fix the corner case issue that the original configuration runtime memory is freed, but it is still exposed to the OS runtime. So this patch is to remove the configuration table to a...
xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) { xmlChar buf[XML_PARSER_BIG_BUFFER_SIZE + 5]; int nbchar = 0; int cur, l; int count = 0; SHRINK; GROW; cur = CUR_CHAR(l); while ((cur != '<') && /* checked */ (cur != '&') && (IS_CHAR(cur))) /* test also done in x...
0
[ "CWE-119" ]
libxml2
6a36fbe3b3e001a8a840b5c1fdd81cefc9947f0d
45,027,167,714,517,640,000,000,000,000,000,000,000
81
Fix potential out of bound access
njs_array_alloc(njs_vm_t *vm, njs_bool_t flat, uint64_t length, uint32_t spare) { uint64_t size; njs_int_t ret; njs_array_t *array; njs_value_t value; if (njs_slow_path(length > UINT32_MAX)) { goto overflow; } array = njs_mp_alloc(vm->mem_pool, sizeof(njs_array_t)); if...
0
[ "CWE-703" ]
njs
2e00e95473861846aa8538be87db07699d9f676d
84,404,576,099,196,890,000,000,000,000,000,000,000
69
Fixed Array.prototype.slice() with slow "this" argument. Previously, when "this" argument was not a fast array, but the "deleted" array was a fast array, the "deleted" array may be left in uninitialized state if "this" argument had gaps. This fix is to ensure that "deleted" is properly initialized. This fixes #485 i...
static void cmm_set_timeout(long nr, long seconds) { cmm_timeout_pages = nr; cmm_timeout_seconds = seconds; cmm_set_timer(); }
0
[]
linux
b8e51a6a9db94bc1fb18ae831b3dab106b5a4b5f
186,038,168,427,418,200,000,000,000,000,000,000,000
6
s390/cmm: fix information leak in cmm_timeout_handler() The problem is that we were putting the NUL terminator too far: buf[sizeof(buf) - 1] = '\0'; If the user input isn't NUL terminated and they haven't initialized the whole buffer then it leads to an info leak. The NUL terminator should be: buf[len - 1] = '\0...
void nego_enable_nla(rdpNego* nego, BOOL enable_nla) { WLog_DBG(TAG, "Enabling NLA security: %s", enable_nla ? "TRUE" : "FALSE"); nego->EnabledProtocols[PROTOCOL_HYBRID] = enable_nla; }
0
[ "CWE-125" ]
FreeRDP
6b485b146a1b9d6ce72dfd7b5f36456c166e7a16
207,263,745,740,536,900,000,000,000,000,000,000,000
5
Fixed oob read in irp_write and similar
static void evtchn_fifo_clear_pending(evtchn_port_t port) { event_word_t *word = event_word_from_port(port); sync_clear_bit(EVTCHN_FIFO_BIT(PENDING, word), BM(word)); }
0
[ "CWE-400", "CWE-703" ]
linux
e99502f76271d6bc4e374fe368c50c67a1fd3070
118,868,982,531,525,060,000,000,000,000,000,000,000
5
xen/events: defer eoi in case of excessive number of events In case rogue guests are sending events at high frequency it might happen that xen_evtchn_do_upcall() won't stop processing events in dom0. As this is done in irq handling a crash might be the result. In order to avoid that, delay further inter-domain events...
bool TensorSliceReader::CopySliceData(const string& name, const TensorSlice& slice, T* data) const { std::vector<std::pair<TensorSlice, string>> details; const TensorSliceSet* tss; { mutex_lock l(mu_); tss = FindTensorSlice(name, slice, &details); if (!tss && !all...
1
[ "CWE-345" ]
tensorflow
368af875869a204b4ac552b9ddda59f6a46a56ec
125,021,583,934,003,130,000,000,000,000,000,000,000
45
Avoid buffer overflow when loading tensors with insufficient data from checkpoints. `CopyDataFromTensorSliceToTensorSlice` does not (and cannot conveniently) provide any bounds checking on its own, so the size is instead checked prior to passing unvalidated data to that function. PiperOrigin-RevId: 392971286 Change-I...
static void mwifiex_cleanup_pcie(struct mwifiex_adapter *adapter) { struct pcie_service_card *card = adapter->card; struct pci_dev *pdev = card->dev; const struct mwifiex_pcie_card_reg *reg = card->pcie.reg; int ret; u32 fw_status; cancel_work_sync(&card->work); ret = mwifiex_read_reg(adapter, reg->fw_status, ...
0
[ "CWE-400", "CWE-200", "CWE-401" ]
linux
d10dcb615c8e29d403a24d35f8310a7a53e3050c
285,537,367,932,392,500,000,000,000,000,000,000,000
28
mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring In mwifiex_pcie_init_evt_ring, a new skb is allocated which should be released if mwifiex_map_pci_memory() fails. The release for skb and card->evtbd_ring_vbase is added. Fixes: 0732484b47b5 ("mwifiex: separate ring initialization and ring creation routines...
int AVI_set_audio_track(avi_t *AVI, u32 track) { if (track + 1 > AVI->anum) return(-1); //this info is not written to file anyway AVI->aptr=track; return 0; }
0
[ "CWE-835" ]
gpac
7f060bbb72966cae80d6fee338d0b07fa3fc06e1
63,138,811,618,301,010,000,000,000,000,000,000,000
9
fixed #2159
TEST(BitTestMatchExpression, MatchesEmpty) { std::vector<uint32_t> bitPositions; BSONObj match1 = fromjson("{a: NumberInt(54)}"); BSONObj match2 = fromjson("{a: NumberLong(54)}"); BSONObj match3 = fromjson("{a: 54.0}"); BSONObj match4 = fromjson("{a: {$binary: '2AAAAAAAAAAAAAAAAAAAAAAAAAAA', $type:...
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
10,243,945,273,841,330,000,000,000,000,000,000,000
38
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
void gf_filter_reset_source(GF_Filter *filter) { if (filter && filter->source_ids) { gf_mx_p(filter->session->filters_mx); gf_free(filter->source_ids); filter->source_ids = NULL; gf_mx_v(filter->session->filters_mx); } }
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
174,197,704,559,332,900,000,000,000,000,000,000,000
9
fixed crashes for very long path - cf #1908
lseg_eq(PG_FUNCTION_ARGS) { LSEG *l1 = PG_GETARG_LSEG_P(0); LSEG *l2 = PG_GETARG_LSEG_P(1); PG_RETURN_BOOL(FPeq(l1->p[0].x, l2->p[0].x) && FPeq(l1->p[0].y, l2->p[0].y) && FPeq(l1->p[1].x, l2->p[1].x) && FPeq(l1->p[1].y, l2->p[1].y)); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
336,055,050,878,623,030,000,000,000,000,000,000,000
10
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...