func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void omninet_write_bulk_callback(struct urb *urb) { /* struct omninet_header *header = (struct omninet_header *) urb->transfer_buffer; */ struct usb_serial_port *port = urb->context; int status = urb->status; set_bit(0, &port->write_urbs_free); if (status) { dev_dbg(&port->dev, "%s - nonzero wr...
0
[ "CWE-399", "CWE-404" ]
linux
30572418b445d85fcfe6c8fe84c947d2606767d8
308,988,080,926,649,070,000,000,000,000,000,000,000
16
USB: serial: omninet: fix reference leaks at open This driver needlessly took another reference to the tty on open, a reference which was then never released on close. This lead to not just a leak of the tty, but also a driver reference leak that prevented the driver from being unloaded after a port had once been open...
ExprList_Finish(ExprList *l, PyArena *arena) { asdl_seq *seq; ExprList_check_invariants(l); /* Allocate the asdl_seq and copy the expressions in to it. */ seq = _Py_asdl_seq_new(l->size, arena); if (seq) { Py_ssize_t i; for (i = 0; i < l->size; i++) asdl_seq_SET(seq, i,...
0
[ "CWE-125" ]
cpython
a4d78362397fc3bced6ea80fbc7b5f4827aec55e
296,358,306,537,808,340,000,000,000,000,000,000,000
16
bpo-36495: Fix two out-of-bounds array reads (GH-12641) Research and fix by @bradlarsen.
gs_grab_move_to_window (GSGrab *grab, GdkWindow *window, GdkScreen *screen, gboolean hide_cursor) { gboolean result = FALSE; g_return_if_fail (GS_IS_GRAB (grab)); xorg_lock_smasher_set_active (grab, FALSE); d...
0
[]
gnome-screensaver
f93a22c175090cf02e80bc3ee676b53f1251f685
152,591,127,956,228,990,000,000,000,000,000,000,000
21
Nullify grab window variables when windows are destroyed If we don't do this then there is a time period where the grab window variables contain dangling pointers which can cause crashes. Part of fix for https://bugzilla.gnome.org/show_bug.cgi?id=609789
qf_setprop_curidx(qf_info_T *qi, qf_list_T *qfl, dictitem_T *di) { int denote = FALSE; int newidx; int old_qfidx; qfline_T *qf_ptr; // If the specified index is '$', then use the last entry if (di->di_tv.v_type == VAR_STRING && di->di_tv.vval.v_string != NULL && STRCMP(di->di_tv.vv...
0
[ "CWE-416" ]
vim
4f1b083be43f351bc107541e7b0c9655a5d2c0bb
242,813,724,934,331,000,000,000,000,000,000,000,000
39
patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any.
void net_inc_ingress_queue(void) { static_key_slow_inc(&ingress_needed); }
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
6,785,647,506,156,336,000,000,000,000,000,000,000
4
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
static const char *rbd_dev_v1_snap_name(struct rbd_device *rbd_dev, u64 snap_id) { u32 which; const char *snap_name; which = rbd_dev_snap_index(rbd_dev, snap_id); if (which == BAD_SNAP_INDEX) return ERR_PTR(-ENOENT); snap_name = _rbd_dev_v1_snap_name(rbd_dev, which); return snap_name ? snap_name : ERR_PT...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
11,641,979,645,591,116,000,000,000,000,000,000,000
13
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
void verifyUpStreamRequestAfterStopAllFilter() { if (downstreamProtocol() == Http::CodecClient::Type::HTTP2) { // decode-headers-return-stop-all-filter calls addDecodedData in decodeData and // decodeTrailers. 2 decoded data were added. EXPECT_EQ(count_ * size_ + added_decoded_data_size_ * 2, up...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
86,922,359,272,484,620,000,000,000,000,000,000,000
10
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
GC_API GC_ATTR_MALLOC void * GC_CALL GC_calloc_explicitly_typed(size_t n, size_t lb, GC_descr d) { word *op; size_t lg; GC_descr simple_descr; complex_descriptor *complex_descr; int descr_type; struct LeafDescriptor leaf; GC_ASSERT(GC_...
1
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
121,760,236,010,917,080,000,000,000,000,000,000,000
64
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
static inline int socket_set_cork(int socket, int enabled) { return -1; }
0
[]
spice
95a0cfac8a1c8eff50f05e65df945da3bb501fc9
34,047,106,791,538,966,000,000,000,000,000,000,000
4
With OpenSSL 1.0.2 and earlier: disable client-side renegotiation. Fixed issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
rb_str_dup(str) VALUE str; { VALUE dup = str_alloc(rb_obj_class(str)); rb_str_replace(dup, str); return dup; }
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
232,258,961,349,273,420,000,000,000,000,000,000,000
7
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static long cp_oldabi_stat64(struct kstat *stat, struct oldabi_stat64 __user *statbuf) { struct oldabi_stat64 tmp; tmp.st_dev = huge_encode_dev(stat->dev); tmp.__pad1 = 0; tmp.__st_ino = stat->ino; tmp.st_mode = stat->mode; tmp.st_nlink = stat->nlink; tmp.st_uid = from_kuid_munged(current_user_ns(), sta...
0
[ "CWE-264" ]
linux
7de249964f5578e67b99699c5f0b405738d820a2
323,283,087,396,508,450,000,000,000,000,000,000,000
26
arm: oabi compat: add missing access checks Add access checks to sys_oabi_epoll_wait() and sys_oabi_semtimedop(). This fixes CVE-2016-3857, a local privilege escalation under CONFIG_OABI_COMPAT. Cc: stable@vger.kernel.org Reported-by: Chiachih Wu <wuchiachih@gmail.com> Reviewed-by: Kees Cook <keescook@chromium.org> R...
ephy_permission_manager_iface_init (EphyPermissionManagerIface *iface) { iface->add = impl_permission_manager_add; iface->remove = impl_permission_manager_remove; iface->clear = impl_permission_manager_clear; iface->test = impl_permission_manager_test; iface->list = impl_permission_manager_list; }
0
[]
epiphany
3e0f7dea754381c5ad11a06ccc62eb153382b498
123,862,043,449,696,870,000,000,000,000,000,000,000
8
Report broken certs through the padlock icon This uses a new feature in libsoup that reports through a SoupMessageFlag whether the message is talking to a server that has a trusted server. Bug #600663
get_pressedreturn(void) { return ex_pressedreturn; }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
316,132,897,203,398,050,000,000,000,000,000,000,000
4
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
init_om( XOM om) { XLCd lcd = om->core.lcd; XOMGenericPart *gen = XOM_GENERIC(om); OMData data; XlcCharSet *charset_list; FontData font_data; char **required_list; XOrientation *orientation; char **value, buf[BUFSIZ], *bufptr; int count = 0, num = 0; unsigned int length = 0; ...
0
[ "CWE-190" ]
libx11
acdaaadcb3d85c61fd43669fc5dddf0f8c3f911d
223,101,988,894,681,500,000,000,000,000,000,000,000
160
Fix an integer overflow in init_om() CVE-2020-14363 This can lead to a double free later, as reported by Jayden Rivers. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
cdf_dump_property_info(const cdf_property_info_t *info, size_t count) { cdf_timestamp_t tp; struct timespec ts; char buf[64]; size_t i, j; for (i = 0; i < count; i++) { cdf_print_property_name(buf, sizeof(buf), info[i].pi_id); (void)fprintf(stderr, "%" SIZE_T_FORMAT "u) %s: ", i, buf); switch (info[i].pi_ty...
0
[ "CWE-119", "CWE-787" ]
file
f97486ef5dc3e8735440edc4fc8808c63e1a3ef0
192,756,613,923,018,800,000,000,000,000,000,000,000
67
CVE-2014-0207: Prevent 0 element vectors and vectors longer than the number of properties from accessing random memory.
Mat_VarCalloc(void) { matvar_t *matvar; matvar = (matvar_t*)malloc(sizeof(*matvar)); if ( NULL != matvar ) { matvar->nbytes = 0; matvar->rank = 0; matvar->data_type = MAT_T_UNKNOWN; matvar->data_size = 0; matvar->class_type = MAT_C_EMPTY; ...
0
[ "CWE-401" ]
matio
a47b7cd3aca70e9a0bddf8146eb4ab0cbd19c2c3
337,135,646,383,078,630,000,000,000,000,000,000,000
42
Fix memory leak As reported by https://github.com/tbeu/matio/issues/131
static ssize_t process_input_done(pn_transport_t *transport, unsigned int layer, const char *input_data, size_t len) { return PN_EOS; }
0
[]
qpid-proton
4aea0fd8502f5e9af7f22fd60645eeec07bce0b2
196,929,151,553,612,960,000,000,000,000,000,000,000
4
PROTON-2014: [c] Ensure SSL mutual authentication (cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7)
return e; } } return GF_OK; } static void dasher_finalize(GF_Filter *filter) { GF_DasherCtx *ctx = gf_filter_get_udta(filter); while (gf_list_count(ctx->pids)) { GF_DashStream *ds = gf_list_pop_back(ctx->pids); dasher_reset_stream(filter, ds, GF_TRUE); if (ds->packet_queue) gf_list_del(ds->packet_queu...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
270,340,077,237,062,300,000,000,000,000,000,000,000
30
fixed #2138
openvpn_decrypt (struct buffer *buf, struct buffer work, const struct crypto_options *opt, const struct frame* frame) { static const char error_prefix[] = "Authenticate/Decrypt packet error"; struct gc_arena gc; gc_init (&gc); if (buf->len > 0 && opt->key_ctx_bi) { struct key_ctx *ctx = &opt->k...
0
[ "CWE-200" ]
openvpn
11d21349a4e7e38a025849479b36ace7c2eec2ee
311,676,042,417,648,700,000,000,000,000,000,000,000
158
Use constant time memcmp when comparing HMACs in openvpn_decrypt. Signed-off-by: Steffan Karger <steffan.karger@fox-it.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: Gert Doering <gert@greenie.muc.de>
nfs4_ff_layout_stat_io_update_completed(struct nfs4_ff_layoutstat *layoutstat, __u64 requested, __u64 completed, ktime_t time_completed, ktime_t time_started) { struct nfs4_ff_io_stat *iostat = &layoutstat->io_stat; ktime_t completion_time = ktime_sub(time_completed, time_started); ktime_t timer; iostat->o...
0
[ "CWE-787" ]
linux
ed34695e15aba74f45247f1ee2cf7e09d449f925
238,804,158,353,141,770,000,000,000,000,000,000,000
21
pNFS/flexfiles: fix incorrect size check in decode_nfs_fh() We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym bazalii) observed the check: if (fh->size > sizeof(struct nfs_fh)) should not use the size of the nfs_fh struct which includes an extra two bytes from the size field. struct nfs_fh { unsi...
static int v4l_s_parm(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) { struct v4l2_streamparm *p = arg; int ret = check_fmt(file, p->type); if (ret) return ret; /* Note: extendedmode is never used in drivers */ if (V4L2_TYPE_IS_OUTPUT(p->type)) { memset(p->parm.output.reserved,...
0
[ "CWE-401" ]
linux
fb18802a338b36f675a388fc03d2aa504a0d0899
27,353,891,032,889,473,000,000,000,000,000,000,000
23
media: v4l: ioctl: Fix memory leak in video_usercopy When an IOCTL with argument size larger than 128 that also used array arguments were handled, two memory allocations were made but alas, only the latter one of them was released. This happened because there was only a single local variable to hold such a temporary a...
int ssl3_change_cipher_state(SSL *s, int which) { unsigned char *p,*mac_secret; unsigned char exp_key[EVP_MAX_KEY_LENGTH]; unsigned char exp_iv[EVP_MAX_IV_LENGTH]; unsigned char *ms,*key,*iv,*er1,*er2; EVP_CIPHER_CTX *dd; const EVP_CIPHER *c; #ifndef OPENSSL_NO_COMP COMP_METHOD *comp; #endif const EVP_MD *m; ...
0
[ "CWE-310" ]
openssl
cf6da05304d554aaa885151451aa4ecaa977e601
11,704,895,651,989,767,000,000,000,000,000,000,000
192
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
static bool io_cancel_task_cb(struct io_wq_work *work, void *data) { struct io_kiocb *req = container_of(work, struct io_kiocb, work); struct io_task_cancel *cancel = data; bool ret; if (!cancel->all && (req->flags & REQ_F_LINK_TIMEOUT)) { unsigned long flags; struct io_ring_ctx *ctx = req->ctx; /* protect...
0
[ "CWE-125" ]
linux
89c2b3b74918200e46699338d7bcc19b1ea12110
45,299,681,718,416,890,000,000,000,000,000,000,000
19
io_uring: reexpand under-reexpanded iters [ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900 [ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task syz-executor.0/828 [ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted 5.14.0-rc3-next-20210730 #1 [ 74.216525] Hardware n...
int dsExists(redisDb *db, robj *key) { }
0
[ "CWE-20" ]
redis
697af434fbeb2e3ba2ba9687cd283ed1a2734fa5
7,323,440,745,194,835,000,000,000,000,000,000,000
2
initial changes needed to turn the current VM code into a cache system. Tons of work to do still.
__libc_memalign (size_t alignment, size_t bytes) { void *address = RETURN_ADDRESS (0); return _mid_memalign (alignment, bytes, address); }
0
[ "CWE-787" ]
glibc
d6db68e66dff25d12c3bc5641b60cbd7fb6ab44f
249,915,400,429,209,800,000,000,000,000,000,000,000
5
malloc: Mitigate null-byte overflow attacks * malloc/malloc.c (_int_free): Check for corrupt prev_size vs size. (malloc_consolidate): Likewise.
static void v4l_print_enc_idx(const void *arg, bool write_only) { const struct v4l2_enc_idx *p = arg; pr_cont("entries=%d, entries_cap=%d\n", p->entries, p->entries_cap); }
0
[ "CWE-401" ]
linux
fb18802a338b36f675a388fc03d2aa504a0d0899
283,487,010,112,958,740,000,000,000,000,000,000,000
7
media: v4l: ioctl: Fix memory leak in video_usercopy When an IOCTL with argument size larger than 128 that also used array arguments were handled, two memory allocations were made but alas, only the latter one of them was released. This happened because there was only a single local variable to hold such a temporary a...
global_exe(char_u *cmd) { linenr_T old_lcount; /* b_ml.ml_line_count before the command */ buf_T *old_buf = curbuf; /* remember what buffer we started in */ linenr_T lnum; /* line number according to old situation */ /* * Set current position only once for a global command. * If global_bu...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
222,383,398,269,543,100,000,000,000,000,000,000,000
49
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
static int compress_file_blockDependency(char* input_filename, char* output_filename, int compressionlevel) { void* (*initFunction) (const char*); int (*compressionFunction)(void*, const char*, char*, int, int, int); int (*nextBlockFunction) (void*, char*, int); int (*freeFunction) (v...
0
[ "CWE-20" ]
lz4
da5373197e84ee49d75b8334d4510689731d6e90
326,908,544,543,371,700,000,000,000,000,000,000,000
155
Fixed : issue 52 (reported by Ludwig Strigeus)
png_save_uint_32(png_bytep buf, png_uint_32 i) { buf[0] = (png_byte)(i >> 24); buf[1] = (png_byte)(i >> 16); buf[2] = (png_byte)(i >> 8); buf[3] = (png_byte)(i ); }
0
[ "CWE-120" ]
libpng
81f44665cce4cb1373f049a76f3904e981b7a766
36,831,929,792,146,855,000,000,000,000,000,000,000
7
[libpng16] Reject attempt to write over-length PLTE chunk
static inline void get_hwc_palette(SM501State *state, int crt, uint8_t *palette) { int i; uint32_t color_reg; uint16_t rgb565; for (i = 0; i < 3; i++) { if (i + 1 == 3) { color_reg = crt ? state->dc_crt_hwc_color_3 : state->dc_panel_hwc_color_3; }...
0
[ "CWE-190" ]
qemu
b15a22bbcbe6a78dc3d88fe3134985e4cdd87de4
234,605,290,825,547,800,000,000,000,000,000,000,000
25
sm501: Replace hand written implementation with pixman where possible Besides being faster this should also prevent malicious guests to abuse 2D engine to overwrite data or cause a crash. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Message-id: 58666389b6cae256e4e972a32c05cf8aa51bffc0.1590089984.git.balaton@eik...
static bool path_connected(const struct path *path) { struct vfsmount *mnt = path->mnt; /* Only bind mounts can have disconnected paths */ if (mnt->mnt_root == mnt->mnt_sb->s_root) return true; return is_subdir(path->dentry, mnt->mnt_root); }
0
[ "CWE-284" ]
linux
9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca
244,800,806,874,268,460,000,000,000,000,000,000,000
10
vfs: rename: check backing inode being equal If a file is renamed to a hardlink of itself POSIX specifies that rename(2) should do nothing and return success. This condition is checked in vfs_rename(). However it won't detect hard links on overlayfs where these are given separate inodes on the overlayfs layer. Over...
static int do_recv_XCrossingEvent(rpc_message_t *message, XEvent *xevent) { int32_t x, y, x_root, y_root, mode, detail, same_screen, focus; uint32_t root, subwindow, time, state; int error; if ((error = do_recv_XAnyEvent(message, xevent)) < 0) return error; if ((error = rpc_message_recv_uint32(message, &root...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
280,676,138,507,493,700,000,000,000,000,000,000,000
45
Support all the new variables added
ulong STDCALL mysql_net_read_packet(MYSQL *mysql) { return ma_net_safe_read(mysql); }
0
[]
mariadb-connector-c
27b2f3d1f1550dfaee0f63a331a406ab31c1b37e
270,458,065,939,486,650,000,000,000,000,000,000,000
4
various checks for corrupted packets in the protocol also: check the return value of unpack_fields()
**/ CImg<T>& draw_rectangle(const int x0, const int y0, const int z0, const int c0, const int x1, const int y1, const int z1, const int c1, const T val, const float opacity=1) { if (is_empty()) return *this; const int nx0 = x0<x1?x0:x1,...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
325,229,330,949,125,170,000,000,000,000,000,000,000
35
.
xmlSchemaFindRedefCompInGraph(xmlSchemaBucketPtr bucket, xmlSchemaTypeType type, const xmlChar *name, const xmlChar *nsName) { xmlSchemaBasicItemPtr ret; int i; if ((bucket == NULL) || (name == NULL)) return(NULL); if ((bucket->globals == NULL) || (bucket->globals->nbItems ...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
244,796,751,346,831,700,000,000,000,000,000,000,000
79
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.
static uint16_t nvme_tx(NvmeCtrl *n, NvmeSg *sg, uint8_t *ptr, uint32_t len, NvmeTxDirection dir) { assert(sg->flags & NVME_SG_ALLOC); if (sg->flags & NVME_SG_DMA) { const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED; dma_addr_t residual; if (dir == NVME_TX_DIRECTI...
0
[]
qemu
736b01642d85be832385063f278fe7cd4ffb5221
301,636,716,900,370,680,000,000,000,000,000,000,000
36
hw/nvme: fix CVE-2021-3929 This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the device itself. This still allows DMA to MMIO regions of other devices (e.g. doing P2P DMA to the controller memory buffer of another NVMe device). Fixes: CVE-2021-3929 Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com> Review...
static int bpf_iter_unix_seq_show(struct seq_file *seq, void *v) { struct bpf_iter_meta meta; struct bpf_prog *prog; struct sock *sk = v; uid_t uid; if (v == SEQ_START_TOKEN) return 0; uid = from_kuid_munged(seq_user_ns(seq), sock_i_uid(sk)); meta.seq = seq; prog = bpf_iter_get_info(&meta, false); return u...
0
[]
net
35306eb23814444bd4021f8a1c3047d3cb0c8b2b
180,215,173,380,208,930,000,000,000,000,000,000,000
15
af_unix: fix races in sk_peer_pid and sk_peer_cred accesses Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred. In order to fix this issue, this patch adds a new spinlock that needs to be used whenever these fields are read o...
static int addrconf_notify(struct notifier_block *this, unsigned long event, void * data) { struct net_device *dev = (struct net_device *) data; struct inet6_dev *idev = __in6_dev_get(dev); switch(event) { case NETDEV_UP: switch(dev->type) { case ARPHRD_SIT: addrconf_sit_config(dev); break; case...
0
[ "CWE-200" ]
linux-2.6
8a47077a0b5aa2649751c46e7a27884e6686ccbf
281,923,309,699,485,300,000,000,000,000,000,000,000
77
[NETLINK]: Missing padding fields in dumped structures Plug holes with padding fields and initialized them to zero. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
static CURLcode multissl_connect(struct Curl_easy *data, struct connectdata *conn, int sockindex) { if(multissl_setup(NULL)) return CURLE_FAILED_INIT; return Curl_ssl->connect_blocking(data, conn, sockindex); }
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
283,159,322,249,380,270,000,000,000,000,000,000,000
7
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
void Compute(OpKernelContext* context) override { // Input tensor is of the following dimensions: // [ batch, in_rows, in_cols, in_depth ] const Tensor& input = context->input(0); // Input filter is of the following dimensions: // [ filter_rows, filter_cols, in_depth, out_depth] const Tensor&...
0
[ "CWE-20", "CWE-476" ]
tensorflow
0f0b080ecde4d3dfec158d6f60da34d5e31693c4
156,199,902,156,551,470,000,000,000,000,000,000,000
114
Fix undefined behavior in QuantizedConv2D Added more input validation and tests. Prior to this, we could get `nullptr` exceptions when attempting to access 0th elements of 0-sized inputs, leading to security vulnerability bugs. Also needed to modify `quantized_conv_ops_test.cc` for consistency. Previously the CPU ke...
static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr, char *buf, unsigned int bug) { if (!boot_cpu_has_bug(bug)) return sprintf(buf, "Not affected\n"); switch (bug) { case X86_BUG_CPU_MELTDOWN: if (boot_cpu_has(X86_FEATURE_PTI)) return sprintf(buf, "Mitigation: PTI\n"); ...
1
[]
linux
a2059825986a1c8143fd6698774fa9d83733bb11
29,932,520,338,966,567,000,000,000,000,000,000,000
44
x86/speculation: Enable Spectre v1 swapgs mitigations The previous commit added macro calls in the entry code which mitigate the Spectre v1 swapgs issue if the X86_FEATURE_FENCE_SWAPGS_* features are enabled. Enable those features where applicable. The mitigations may be disabled with "nospectre_v1" or "mitigations...
int32_t ByteArray::SetFilledLength(int32_t filled_length) { filled_length_ = std::min<int32_t>(filled_length, storage_length_); return filled_length_; }
0
[ "CWE-119", "CWE-703" ]
sfntly
c56b85408bab232efd7e650f0994272a174e3b92
21,791,259,723,640,175,000,000,000,000,000,000,000
4
Add a bounds check to ByteArray::Get().
static av_cold int rl2_read_header(AVFormatContext *s) { AVIOContext *pb = s->pb; AVStream *st; unsigned int frame_count; unsigned int audio_frame_counter = 0; unsigned int video_frame_counter = 0; unsigned int back_size; unsigned short sound_rate; unsigned short rate; unsigned short...
0
[ "CWE-399", "CWE-834" ]
FFmpeg
96f24d1bee7fe7bac08e2b7c74db1a046c9dc0de
176,385,349,400,849,600,000,000,000,000,000,000,000
137
avformat/rl2: Fix DoS due to lack of eof check Fixes: loop.rl2 Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
LOCAL uint32_t get_uint16(const uint8_t *p) { return p[0] * 256U + p[1]; }
0
[]
libmaxminddb
51255f113fe3c7b63ffe957636a7656a3ff9d1ff
328,016,901,218,432,770,000,000,000,000,000,000,000
4
Fix several segfaults from missing bounds checks These were found using afl-fuzz. There are several more similar failure that warrant investigation. If we want to add tests, I have several corrupt databases we could add, but these are trivially reproducible when using the existing test databases as input to afl-fuzz.
static inline struct sctp_ulpevent *sctp_ulpq_retrieve_reassembled(struct sctp_ulpq *ulpq) { struct sk_buff *pos; struct sctp_ulpevent *cevent; struct sk_buff *first_frag = NULL; __u32 ctsn, next_tsn; struct sctp_ulpevent *retval = NULL; /* Initialized to 0 just to avoid compiler warning message. Will * never...
0
[]
linux-2.6
672e7cca17ed6036a1756ed34cf20dbd72d5e5f6
216,442,752,975,498,950,000,000,000,000,000,000,000
57
[SCTP]: Prevent possible infinite recursion with multiple bundled DATA. There is a rare situation that causes lksctp to go into infinite recursion and crash the system. The trigger is a packet that contains at least the first two DATA fragments of a message bundled together. The recursion is triggered when the user d...
load_memoize(UnpicklerObject *self) { PyObject *value; if (Py_SIZE(self->stack) <= self->stack->fence) return Pdata_stack_underflow(self->stack); value = self->stack->data[Py_SIZE(self->stack) - 1]; return _Unpickler_MemoPut(self, self->memo_len, value); }
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
267,726,603,194,701,840,000,000,000,000,000,000,000
10
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
boost::intrusive_ptr<ExpressionObject> ExpressionObject::create( const boost::intrusive_ptr<ExpressionContext>& expCtx, std::vector<std::pair<std::string, boost::intrusive_ptr<Expression>>>&& expressionsWithChildrenInPlace) { std::vector<boost::intrusive_ptr<Expression>> children; std::vector<st...
0
[ "CWE-190" ]
mongo
21d8699ed6c517b45e1613e20231cd8eba894985
164,667,324,214,948,840,000,000,000,000,000,000,000
18
SERVER-43699 $mod should not overflow for large negative values
CImg<T> get_fill(const T& val0, const T& val1, const T& val2, const T& val3) const { return CImg<T>(_width,_height,_depth,_spectrum).fill(val0,val1,val2,val3); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
319,942,862,567,333,300,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info) { struct netdev_notifier_changeupper_info changeupper_info; struct netdev_adjacent *i, *j, *to_i, *to_j; int ret = 0; ASSERT_RTNL(); if (dev == upper_dev) ret...
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
332,155,200,481,664,300,000,000,000,000,000,000,000
117
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
gopherStateFree(const CommCloseCbParams &params) { GopherStateData *gopherState = (GopherStateData *)params.data; if (gopherState == NULL) return; gopherState->deleteThis("gopherStateFree"); }
0
[ "CWE-400" ]
squid
780c4ea1b4c9d2fb41f6962aa6ed73ae57f74b2b
72,891,064,055,279,900,000,000,000,000,000,000,000
9
Improve handling of Gopher responses (#1022)
void ssl_set_rng( ssl_context *ssl, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) { ssl->f_rng = f_rng; ssl->p_rng = p_rng; }
0
[ "CWE-310" ]
polarssl
4582999be608c9794d4518ae336b265084db9f93
339,172,433,323,031,100,000,000,000,000,000,000,000
7
Fixed timing difference resulting from badly formatted padding.
__nvmet_fc_free_assocs(struct nvmet_fc_tgtport *tgtport) { struct nvmet_fc_tgt_assoc *assoc, *next; unsigned long flags; spin_lock_irqsave(&tgtport->lock, flags); list_for_each_entry_safe(assoc, next, &tgtport->assoc_list, a_list) { if (!nvmet_fc_tgt_a_get(assoc)) continue; spin_unlock_irqrestore(&tgtpo...
0
[ "CWE-119", "CWE-787" ]
linux
0c319d3a144d4b8f1ea2047fd614d2149b68f889
225,078,439,190,728,650,000,000,000,000,000,000,000
17
nvmet-fc: ensure target queue id within range. When searching for queue id's ensure they are within the expected range. Signed-off-by: James Smart <james.smart@broadcom.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
xsltDebuggerStartSequenceConstructor(xsltTransformContextPtr ctxt, xmlNodePtr contextNode, xmlNodePtr list, xsltTemplatePtr templ, int *addCallResult) { xmlNodePtr debugedNode = NULL; if (ctxt->debugStatus != XSLT_DEBUG_NONE) { if (templ) { *addCallResult...
0
[]
libxslt
937ba2a3eb42d288f53c8adc211bd1122869f0bf
112,104,934,205,926,420,000,000,000,000,000,000,000
34
Fix default template processing on namespace nodes
static void vrend_destroy_program(struct vrend_linked_shader_program *ent) { int i; if (ent->ref_context && ent->ref_context->prog == ent) ent->ref_context->prog = NULL; glDeleteProgram(ent->id); list_del(&ent->head); for (i = PIPE_SHADER_VERTEX; i <= PIPE_SHADER_COMPUTE; i++) { if (ent->ss...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
2,696,963,298,165,831,000,000,000,000,000,000,000
19
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
int ldb_rename(struct ldb_context *ldb, struct ldb_dn *olddn, struct ldb_dn *newdn) { struct ldb_request *req; int ret; ret = ldb_build_rename_req(&req, ldb, ldb, olddn, newdn, NULL, NULL, ldb_op_default_callback, NULL); ldb_req_set_location(req, "ldb_rename"); if (ret != LDB_SUCC...
0
[ "CWE-476" ]
samba
d8b9bb274b7e7a390cf3bda9cd732cb2227bdbde
16,135,234,076,539,888,000,000,000,000,000,000,000
23
CVE-2020-10730: lib ldb: Check if ldb_lock_backend_callback called twice Prevent use after free issues if ldb_lock_backend_callback is called twice, usually due to ldb_module_done being called twice. This can happen if a module ignores the return value from function a function that calls ldb_module_done as part of it'...
void fx_TypedArray_prototype_forEach(txMachine* the) { mxTypedArrayDeclarations; txSlot* function = fxArgToCallback(the, 0); txInteger index = 0; while (index < length) { fxCallTypedArrayItem(the, function, dispatch, view, buffer->value.reference->next, index, C_NULL); mxPop(); index++; } }
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
258,436,449,341,513,600,000,000,000,000,000,000,000
11
XS: #896
htmlParseCharRef(htmlParserCtxtPtr ctxt) { int val = 0; if ((ctxt == NULL) || (ctxt->input == NULL)) { htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR, "htmlParseCharRef: context error\n", NULL, NULL); return(0); } if ((CUR == '&') && (NXT(1) == '#') && ((NXT(2) == 'x') || NXT(...
0
[ "CWE-399" ]
libxml2
de0cc20c29cb3f056062925395e0f68d2250a46f
301,518,906,832,466,600,000,000,000,000,000,000,000
60
Fix some buffer conversion issues https://bugzilla.gnome.org/show_bug.cgi?id=690202 Buffer overflow errors originating from xmlBufGetInputBase in 2.9.0 The pointers from the context input were not properly reset after that call which can do reallocations.
static bool set_nr_if_polling(struct task_struct *p) { struct thread_info *ti = task_thread_info(p); typeof(ti->flags) old, val = READ_ONCE(ti->flags); for (;;) { if (!(val & _TIF_POLLING_NRFLAG)) return false; if (val & _TIF_NEED_RESCHED) return true; old = cmpxchg(&ti->flags, val, val | _TIF_NEED_RESC...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
252,938,359,133,273,400,000,000,000,000,000,000,000
17
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...
header_put_be_8byte (SF_PRIVATE *psf, sf_count_t x) { psf->header.ptr [psf->header.indx++] = (x >> 56) ; psf->header.ptr [psf->header.indx++] = (x >> 48) ; psf->header.ptr [psf->header.indx++] = (x >> 40) ; psf->header.ptr [psf->header.indx++] = (x >> 32) ; psf->header.ptr [psf->header.indx++] = (x >> 24) ; psf->h...
0
[ "CWE-119", "CWE-787" ]
libsndfile
708e996c87c5fae77b104ccfeb8f6db784c32074
176,716,469,433,710,600,000,000,000,000,000,000,000
10
src/ : Move to a variable length header buffer Previously, the `psf->header` buffer was a fixed length specified by `SF_HEADER_LEN` which was set to `12292`. This was problematic for two reasons; this value was un-necessarily large for the majority of files and too small for some others. Now the size of the header bu...
static void test_resp3_push_handler(redisContext *c) { struct pushCounters pc = {0}; redisPushFn *old = NULL; redisReply *reply; void *privdata; /* Switch to RESP3 and turn on client tracking */ send_hello(c, 3); send_client_tracking(c, "ON"); privdata = c->privdata; c->privdata = &...
0
[ "CWE-190", "CWE-680" ]
redis
0215324a66af949be39b34be2d55143232c1cb71
101,820,290,957,802,430,000,000,000,000,000,000,000
59
Fix redis-cli / redis-sential overflow on some platforms (CVE-2021-32762) (#9587) The redis-cli command line tool and redis-sentinel service may be vulnerable to integer overflow when parsing specially crafted large multi-bulk network replies. This is a result of a vulnerability in the underlying hiredis library wh...
static unsigned mounts_poll(struct file *file, poll_table *wait) { struct proc_mounts *p = file->private_data; struct mnt_namespace *ns = p->ns; unsigned res = POLLIN | POLLRDNORM; poll_wait(file, &ns->poll, wait); spin_lock(&vfsmount_lock); if (p->event != ns->event) { p->event = ns->event; res |= POLLERR ...
0
[ "CWE-20", "CWE-362", "CWE-416" ]
linux
86acdca1b63e6890540fa19495cfc708beff3d8b
275,581,191,801,346,060,000,000,000,000,000,000,000
17
fix autofs/afs/etc. magic mountpoint breakage We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT) if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type is bogus here; we want LAST_BIND for everything of that kind and we get LAST_NORM left over from finding parent directory. So make...
Word setHeaderMapPairsHandler(void* raw_context, Word type, Word ptr, Word size) { if (type.u64_ > static_cast<uint64_t>(HeaderMapType::MAX)) { return wasmResultToWord(WasmResult::BadArgument); } auto context = WASM_CONTEXT(raw_context); auto data = context->wasmVm()->getMemory(ptr.u64_, size.u64_); if (!...
0
[ "CWE-476" ]
envoy
8788a3cf255b647fd14e6b5e2585abaaedb28153
78,190,823,963,661,960,000,000,000,000,000,000,000
12
1.4 - Do not call into the VM unless the VM Context has been created. (#24) * Ensure that the in VM Context is created before onDone is called. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Update as per offline discussion. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Set in_vm_context_created_ in onNet...
p11_rpc_message_write_attribute_buffer (p11_rpc_message *msg, CK_ATTRIBUTE_PTR arr, CK_ULONG num) { CK_ATTRIBUTE_PTR attr; CK_ULONG i; assert (num == 0 || arr != NULL); assert (msg != NULL); assert (msg->output != NULL); /* Make sur...
0
[ "CWE-787" ]
p11-kit
2617f3ef888e103324a28811886b99ed0a56346d
256,292,980,088,772,520,000,000,000,000,000,000,000
29
Check attribute length against buffer size If an attribute's length does not match the length of the byte array inside it, one length was used for allocation, and the other was used for memcpy. This additional check will instead return an error on malformed messages.
write_reg_contents( int name, char_u *str, int maxlen, int must_append) { write_reg_contents_ex(name, str, maxlen, must_append, MAUTO, 0L); }
0
[ "CWE-122", "CWE-787" ]
vim
d25f003342aca9889067f2e839963dfeccf1fe05
5,740,782,904,897,037,000,000,000,000,000,000,000
8
patch 9.0.0011: reading beyond the end of the line with put command Problem: Reading beyond the end of the line with put command. Solution: Adjust the end mark position.
static int mov_write_chan_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *track) { uint32_t layout_tag, bitmap; int64_t pos = avio_tell(pb); layout_tag = ff_mov_get_channel_layout_tag(track->par->codec_id, track->par->channel_layout, ...
0
[ "CWE-369" ]
FFmpeg
2c0e98a0b478284bdff6d7a4062522605a8beae5
144,996,578,266,758,170,000,000,000,000,000,000,000
27
avformat/movenc: Write version 2 of audio atom if channels is not known The version 1 needs the channel count and would divide by 0 Fixes: division by 0 Fixes: fpe_movenc.c_1108_1.ogg Fixes: fpe_movenc.c_1108_2.ogg Fixes: fpe_movenc.c_1108_3.wav Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg> Signed-off-by: Michael N...
void account_idle_time(cputime_t cputime) { struct cpu_usage_stat *cpustat = &kstat_this_cpu.cpustat; cputime64_t cputime64 = cputime_to_cputime64(cputime); struct rq *rq = this_rq(); if (atomic_read(&rq->nr_iowait) > 0) cpustat->iowait = cputime64_add(cpustat->iowait, cputime64); else cpustat->idle = cputime...
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
222,098,394,953,386,970,000,000,000,000,000,000,000
11
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...
static void do_perf_sw_event(enum perf_type_id type, u32 event_id, u64 nr, struct perf_sample_data *data, struct pt_regs *regs) { struct swevent_htable *swhash = &__get_cpu_var(swevent_htable); struct perf_event *event; struct hlist_head *head; rcu_read_lock(); head = find_swevent_head_rcu...
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
17,013,688,731,972,170,000,000,000,000,000,000,000
21
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
struct file *task_lookup_next_fd_rcu(struct task_struct *task, unsigned int *ret_fd) { /* Must be called with rcu_read_lock held */ struct files_struct *files; unsigned int fd = *ret_fd; struct file *file = NULL; task_lock(task); files = task->files; if (files) { for (; fd < files_fdtable(files)->max_fds; fd+...
0
[]
linux
054aa8d439b9185d4f5eb9a90282d1ce74772969
19,267,854,407,533,373,000,000,000,000,000,000,000
20
fget: check that the fd still exists after getting a ref to it Jann Horn points out that there is another possible race wrt Unix domain socket garbage collection, somewhat reminiscent of the one fixed in commit cbcf01128d0a ("af_unix: fix garbage collect vs MSG_PEEK"). See the extended comment about the garbage colle...
void do1xxHeaders() override { IS_ENVOY_BUG("unexpected 1xx headers"); }
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
112,937,819,010,789,870,000,000,000,000,000,000,000
1
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
static void earthmate_event_hook(struct gps_device_t *session, event_t event) { if (session->context->readonly) return; if (event == event_triggermatch) { (void)gpsd_write(session, "EARTHA\r\n", 8); (void)usleep(10000); (void)gpsd_switch_driver(session, "Zodiac Binary"); } }
0
[]
gpsd
08edc49d8f63c75bfdfb480b083b0d960310f94f
293,123,303,798,794,540,000,000,000,000,000,000,000
10
Address Savannah bug #38511: ais_context->bitlen <= sizeof(ais_context->bits)/8 is not checked
njs_generate_inc_dec_operation(njs_vm_t *vm, njs_generator_t *generator, njs_parser_node_t *node, njs_bool_t post) { njs_int_t ret; njs_index_t index; njs_variable_t *var; njs_parser_node_t *lvalue; njs_vmcode_3addr_t *code; njs_vmcode_variable_t *va...
0
[ "CWE-703", "CWE-754" ]
njs
404553896792b8f5f429dc8852d15784a59d8d3e
236,884,074,374,458,480,000,000,000,000,000,000,000
64
Fixed break instruction in a try-catch block. Previously, JUMP offset for a break instruction inside a try-catch block was not set to a correct offset during code generation when a return instruction was present in inner try-catch block. The fix is to update the JUMP offset appropriately. This closes #553 issue on G...
static int check_map_func_compatibility(struct bpf_verifier_env *env, struct bpf_map *map, int func_id) { if (!map) return 0; /* We need a two way check, first is from map perspective ... */ switch (map->map_type) { case BPF_MAP_TYPE_PROG_ARRAY: if (func_id != BPF_FUNC_tail_call) goto error; break; ...
0
[ "CWE-125" ]
linux
b799207e1e1816b09e7a5920fbb2d5fcf6edd681
43,748,752,677,042,560,000,000,000,000,000,000,000
135
bpf: 32-bit RSH verification must truncate input before the ALU op When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it is sufficient to just truncate the output to 32 bits; and so I just moved the register size coercion t...
ins_compl_insert(int in_compl_func) { int compl_len = get_compl_len(); // Make sure we don't go over the end of the string, this can happen with // illegal bytes. if (compl_len < (int)STRLEN(compl_shown_match->cp_str)) ins_bytes(compl_shown_match->cp_str + compl_len); if (match_at_original_text(co...
0
[ "CWE-125" ]
vim
f12129f1714f7d2301935bb21d896609bdac221c
10,323,654,083,725,098,000,000,000,000,000,000,000
22
patch 9.0.0020: with some completion reading past end of string Problem: With some completion reading past end of string. Solution: Check the length of the string.
unique_ptr<IOBuf> IOBuf::create(std::size_t capacity) { if (capacity > kMaxIOBufSize) { throw_exception<std::bad_alloc>(); } // For smaller-sized buffers, allocate the IOBuf, SharedInfo, and the buffer // all with a single allocation. // // We don't do this for larger buffers since it can be wasteful i...
0
[ "CWE-787" ]
folly
4f304af1411e68851bdd00ef6140e9de4616f7d3
60,248,373,128,420,570,000,000,000,000,000,000,000
34
[folly] Add additional overflow checks to IOBuf - CVE-2021-24036 Summary: As per title CVE-2021-24036 Reviewed By: jan Differential Revision: D27938605 fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c
inline double BSONElement::numberDouble() const { switch (type()) { case NumberDouble: return _numberDouble(); case NumberInt: return _numberInt(); case NumberLong: return _numberLong(); case NumberDecimal: return _numberDecimal().toDou...
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
66,326,317,314,732,020,000,000,000,000,000,000,000
14
SERVER-38984 Validate unique User ID on UserCache hit
static void qxl_reset_memslots(PCIQXLDevice *d) { qxl_spice_reset_memslots(d); memset(&d->guest_slots, 0, sizeof(d->guest_slots)); }
0
[ "CWE-476" ]
qemu
d52680fc932efb8a2f334cc6993e705ed1e31e99
338,350,546,859,189,140,000,000,000,000,000,000,000
5
qxl: check release info object When releasing spice resources in release_resource() routine, if release info object 'ext.info' is null, it leads to null pointer dereference. Add check to avoid it. Reported-by: Bugs SysSec <bugs-syssec@rub.de> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Message-id: 20190425...
static struct megasas_instance *megasas_lookup_instance(u16 host_no) { int i; for (i = 0; i < megasas_mgmt_info.max_index; i++) { if ((megasas_mgmt_info.instance[i]) && (megasas_mgmt_info.instance[i]->host->host_no == host_no)) return megasas_mgmt_info.instance[i]; } return NULL; }
0
[ "CWE-476" ]
linux
bcf3b67d16a4c8ffae0aa79de5853435e683945c
328,486,209,351,458,280,000,000,000,000,000,000,000
13
scsi: megaraid_sas: return error when create DMA pool failed when create DMA pool for cmd frames failed, we should return -ENOMEM, instead of 0. In some case in: megasas_init_adapter_fusion() -->megasas_alloc_cmds() -->megasas_create_frame_pool create DMA pool failed, --> megasas_fre...
void link_neighbour(st_select_lex_node *neighbour) { DBUG_ASSERT(next == NULL); DBUG_ASSERT(neighbour != NULL); next= neighbour; neighbour->prev= &next; }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
190,468,671,548,579,850,000,000,000,000,000,000,000
7
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static MagickBooleanType WriteHDRImage(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { char header[MagickPathExtent]; const char *property; MagickBooleanType status; register const Quantum *p; register ssize_t i, x; size_t length; ssize_t count...
1
[ "CWE-125" ]
ImageMagick
14e606db148d6ebcaae20f1e1d6d71903ca4a556
43,391,290,389,208,570,000,000,000,000,000,000,000
167
https://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/1537213
void Inspect::operator()(Supports_Operator_Ptr so) { if (so->needs_parens(so->left())) append_string("("); so->left()->perform(this); if (so->needs_parens(so->left())) append_string(")"); if (so->operand() == Supports_Operator::AND) { append_mandatory_space(); append_token("and", so); ...
0
[ "CWE-476" ]
libsass
38f4c3699d06b64128bebc7cf1e8b3125be74dc4
156,055,815,337,052,000,000,000,000,000,000,000,000
21
Fix possible bug with handling empty reference combinators Fixes #2665
stop_pipeline (async, deferred) int async; COMMAND *deferred; { register int i, j; JOB *newjob; sigset_t set, oset; BLOCK_CHILD (set, oset); #if defined (PGRP_PIPE) /* The parent closes the process group synchronization pipe. */ sh_closepipe (pgrp_pipe); #endif cleanup_dead_jobs (); if (js...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
123,994,879,535,989,100,000,000,000,000,000,000,000
175
bash-4.4-rc2 release
static inline unsigned rb_page_size(struct buffer_page *bpage) { return rb_page_commit(bpage); }
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
233,977,544,171,213,700,000,000,000,000,000,000,000
4
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...
vhost_user_get_features(struct virtio_net **pdev, struct VhostUserMsg *msg, int main_fd __rte_unused) { struct virtio_net *dev = *pdev; uint64_t features = 0; rte_vhost_driver_get_features(dev->ifname, &features); msg->payload.u64 = features; msg->size = sizeof(msg->payload.u64); msg->fd_num = 0; return RT...
1
[]
dpdk
bf472259dde6d9c4dd3ebad2c2b477a168c6e021
112,868,064,294,646,760,000,000,000,000,000,000,000
14
vhost: fix possible denial of service by leaking FDs A malicious Vhost-user master could send in loop hand-crafted vhost-user messages containing more file descriptors the vhost-user slave expects. Doing so causes the application using the vhost-user library to run out of FDs. This issue has been assigned CVE-2019-14...
coroutine_fn iscsi_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int bytes, BdrvRequestFlags flags) { IscsiLun *iscsilun = bs->opaque; struct IscsiTask iTask; uint64_t lba; uint32_t nb_blocks; bool use_16_for_ws = iscsilun->use_16_for_rw; int r = 0; ...
0
[ "CWE-125" ]
qemu
ff0507c239a246fd7215b31c5658fc6a3ee1e4c5
296,585,599,321,619,930,000,000,000,000,000,000,000
103
block/iscsi:fix heap-buffer-overflow in iscsi_aio_ioctl_cb There is an overflow, the source 'datain.data[2]' is 100 bytes, but the 'ss' is 252 bytes.This may cause a security issue because we can access a lot of unrelated memory data. The len for sbp copy data should take the minimum of mx_sb_len and sb_len_wr, no...
struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn) { pfn_t pfn; pfn = gfn_to_pfn(kvm, gfn); if (!kvm_is_mmio_pfn(pfn)) return pfn_to_page(pfn); WARN_ON(kvm_is_mmio_pfn(pfn)); get_page(bad_page); return bad_page; }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
132,731,582,016,637,860,000,000,000,000,000,000,000
13
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
zsuperexec(i_ctx_t *i_ctx_p) { os_ptr op = osp; es_ptr ep; check_op(1); if (!r_has_attr(op, a_executable)) return 0; /* literal object just gets pushed back */ check_estack(2); ep = esp += 3; make_mark_estack(ep - 2, es_other, end_superexec); /* error case */ make_op_estack(ep ...
1
[]
ghostpdl
d683d1e6450d74619e6277efeebfc222d9a5cb91
128,344,527,950,804,680,000,000,000,000,000,000,000
18
Bug 700585: Obliterate "superexec". We don't need it, nor do any known apps. We were under the impression that the Windows driver 'PScript5.dll' used superexec, but after testing with our extensive suite of PostScript file, and analysis of the PScript5 "Adobe CoolType ProcSet, it does not appear that this operator is ...
static void vhost_dev_free_iovecs(struct vhost_dev *dev) { int i; for (i = 0; i < dev->nvqs; ++i) vhost_vq_free_iovecs(dev->vqs[i]); }
0
[ "CWE-399" ]
linux
7932c0bd7740f4cd2aa168d3ce0199e7af7d72d5
282,405,752,450,879,400,000,000,000,000,000,000,000
7
vhost: actually track log eventfd file While reviewing vhost log code, I found out that log_file is never set. Note: I haven't tested the change (QEMU doesn't use LOG_FD yet). Cc: stable@vger.kernel.org Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
void blk_start_request(struct request *req) { lockdep_assert_held(req->q->queue_lock); WARN_ON_ONCE(req->q->mq_ops); blk_dequeue_request(req); if (test_bit(QUEUE_FLAG_STATS, &req->q->queue_flags)) { req->io_start_time_ns = ktime_get_ns(); #ifdef CONFIG_BLK_DEV_THROTTLING_LOW req->throtl_size = blk_rq_sectors(...
0
[ "CWE-416", "CWE-703" ]
linux
54648cf1ec2d7f4b6a71767799c45676a138ca24
88,118,213,800,225,120,000,000,000,000,000,000,000
19
block: blk_init_allocated_queue() set q->fq as NULL in the fail case We find the memory use-after-free issue in __blk_drain_queue() on the kernel 4.14. After read the latest kernel 4.18-rc6 we think it has the same problem. Memory is allocated for q->fq in the blk_init_allocated_queue(). If the elevator init function...
TEST_F(ConnectionHandlerTest, UdpListenerNoFilterThrowsException) { InSequence s; TestListener* test_listener = addListener(1, true, false, "test_listener", Network::Address::SocketType::Datagram, std::chrono::milliseconds()); Network::MockUdpListener* listener = new Network::MockUdpListe...
0
[ "CWE-835" ]
envoy
c8de199e2971f79cbcbc6b5eadc8c566b28705d1
97,702,834,728,147,870,000,000,000,000,000,000,000
26
listener: clean up accept filter before creating connection (#8922) Signed-off-by: Yuchen Dai <silentdai@gmail.com>
static int copy_files(unsigned long clone_flags, struct task_struct * tsk) { struct files_struct *oldf, *newf; int error = 0; /* * A background process may not have any files ... */ oldf = current->files; if (!oldf) goto out; if (clone_flags & CLONE_FILES) { atomic_inc(&oldf->count); goto out; } ne...
0
[ "CWE-264" ]
linux-2.6
2d5516cbb9daf7d0e342a2e3b0fc6f8c39a81205
170,410,153,424,536,350,000,000,000,000,000,000,000
26
copy_process: fix CLONE_PARENT && parent_exec_id interaction CLONE_PARENT can fool the ->self_exec_id/parent_exec_id logic. If we re-use the old parent, we must also re-use ->parent_exec_id to make sure exit_notify() sees the right ->xxx_exec_id's when the CLONE_PARENT'ed task exits. Also, move down the "p->parent_ex...
static void io_poll_req_insert(struct io_kiocb *req) { struct io_ring_ctx *ctx = req->ctx; struct hlist_head *list; list = &ctx->cancel_hash[hash_long(req->cqe.user_data, ctx->cancel_hash_bits)]; hlist_add_head(&req->hash_node, list);
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
196,027,003,486,803,860,000,000,000,000,000,000,000
8
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...
static void save_pid(const char *pid_file) { FILE *fp; if (access(pid_file, F_OK) == 0) { if ((fp = fopen(pid_file, "r")) != NULL) { char buffer[1024]; if (fgets(buffer, sizeof(buffer), fp) != NULL) { unsigned int pid; if (safe_strtoul(buffer, &pid...
0
[ "CWE-189" ]
memcached
6695ccbc525c36d693aaa3e8337b36aa0c784424
55,036,658,130,460,900,000,000,000,000,000,000,000
38
Fix segfault on specially crafted packet.
**/ CImg<T>& log2() { if (is_empty()) return *this; cimg_pragma_openmp(parallel for cimg_openmp_if(size()>=4096)) cimg_rof(*this,ptrd,T) *ptrd = (T)cimg::log2((double)*ptrd); return *this;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
22,317,323,271,515,975,000,000,000,000,000,000,000
6
Fix other issues in 'CImg<T>::load_bmp()'.
bool CUser::PutStatusNotice(const CString& sLine, CClient* pClient, CClient* pSkipClient) { vector<CClient*> vClients = GetAllClients(); for (CClient* pEachClient : vClients) { if ((!pClient || pClient == pEachClient) && pSkipClient != pEachClient) { p...
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
316,416,600,769,409,500,000,000,000,000,000,000,000
16
Don't crash if user specified invalid encoding. This is CVE-2019-9917
String *Item_func_concat::val_str(String *str) { DBUG_ASSERT(fixed == 1); String *res,*res2,*use_as_buff; uint i; bool is_const= 0; null_value=0; if (!(res=args[0]->val_str(str))) goto null; use_as_buff= &tmp_value; /* Item_subselect in --ps-protocol mode will state it as a non-const */ is_const=...
0
[]
mysql-server
475dcde2c7856dd0050b967099a86c087d94f32f
23,138,924,582,762,270,000,000,000,000,000,000,000
140
Bug#27099029: UNLIMITED LENGTH OF THE PASSWORD Description: my_crypt_genhash depends on the length of plaintext password. Longer the password, more is the time required to produce the transformation. An unusually large password may consume considerable amount of time...
void DocumentSourceGraphLookUp::doBreadthFirstSearch() { long long depth = 0; bool shouldPerformAnotherQuery; do { shouldPerformAnotherQuery = false; // Check whether each key in the frontier exists in the cache or needs to be queried. auto cached = pExpCtx->getDocumentComparator()....
0
[ "CWE-416" ]
mongo
d6133a3a5464fac202f512b0310dfeb200c126f9
332,106,190,088,834,300,000,000,000,000,000,000,000
52
SERVER-43350 $lookup with no local default or user-specified collation should explicitly set the simple collation on the foreign expression context
static int mwifiex_pm_wakeup_card(struct mwifiex_adapter *adapter) { struct pcie_service_card *card = adapter->card; const struct mwifiex_pcie_card_reg *reg = card->pcie.reg; mwifiex_dbg(adapter, EVENT, "event: Wakeup device...\n"); if (reg->sleep_cookie) mwifiex_pcie_dev_wakeup_delay(adapter); /* Acces...
0
[ "CWE-400", "CWE-200", "CWE-401" ]
linux
d10dcb615c8e29d403a24d35f8310a7a53e3050c
151,917,014,899,899,530,000,000,000,000,000,000,000
27
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...
decode_NXAST_RAW_SET_TUNNEL(uint32_t tun_id, enum ofp_version ofp_version OVS_UNUSED, struct ofpbuf *out) { struct ofpact_tunnel *tunnel = ofpact_put_SET_TUNNEL(out); tunnel->ofpact.raw = NXAST_RAW_SET_TUNNEL; tunnel->tun_id = tun_id; return 0; }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
246,064,390,868,534,540,000,000,000,000,000,000,000
9
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
Natural_join_column::Natural_join_column(Field_translator *field_param, TABLE_LIST *tab) { DBUG_ASSERT(tab->field_translation); view_field= field_param; table_field= NULL; table_ref= tab; is_common= FALSE; }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
242,746,698,007,655,500,000,000,000,000,000,000,000
9
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.
void switch_to_nullable_trigger_fields(List<Item> &items, TABLE *table) { Field** field= table->field_to_fill(); /* True if we have NOT NULL fields and BEFORE triggers */ if (field != table->field) { List_iterator_fast<Item> it(items); Item *item; while ((item= it++)) item->walk(&Item::switch...
0
[]
server
0168d1eda30dad4b517659422e347175eb89e923
193,690,244,992,330,870,000,000,000,000,000,000,000
15
MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list Do not assume that subquery Item always present.