func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
Event_db_repository::drop_schema_events(THD *thd, const LEX_CSTRING *schema) { int ret= 0; TABLE *table= NULL; READ_RECORD read_record_info; enum enum_events_table_field field= ET_FIELD_DB; MDL_savepoint mdl_savepoint= thd->mdl_context.mdl_savepoint(); DBUG_ENTER("Event_db_repository::drop_schema_events"); ...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
24,859,577,393,967,190,000,000,000,000,000,000,000
49
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...
int manager_environment_add(Manager *m, char **minus, char **plus) { char **a = NULL, **b = NULL, **l; assert(m); l = m->environment; if (!strv_isempty(minus)) { a = strv_env_delete(l, 1, minus); if (!a) return -ENOMEM; ...
0
[]
systemd
5ba6985b6c8ef85a8bcfeb1b65239c863436e75b
210,889,982,075,916,400,000,000,000,000,000,000,000
35
core: allow PIDs to be watched by two units at the same time In some cases it is interesting to map a PID to two units at the same time. For example, when a user logs in via a getty, which is reexeced to /sbin/login that binary will be explicitly referenced as main pid of the getty service, as well as implicitly refer...
int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, struct sockaddr_storage *kern_address, int mode) { int tot_len; if (kern_msg->msg_namelen) { if (mode == VERIFY_READ) { int err = move_addr_to_kernel(kern_msg->msg_name, kern_msg->msg_namelen, kern_address); ...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
309,599,980,952,803,600,000,000,000,000,000,000,000
26
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
void InstanceImpl::shutdownAdmin() { ENVOY_LOG(warn, "shutting down admin due to child startup"); stat_flush_timer_.reset(); handler_->stopListeners(); admin_->closeSocket(); // If we still have a parent, it should be terminated now that we have a child. ENVOY_LOG(warn, "terminating parent process"); res...
0
[ "CWE-400" ]
envoy
542f84c66e9f6479bc31c6f53157c60472b25240
16,688,581,825,117,379,000,000,000,000,000,000,000
10
overload: Runtime configurable global connection limits (#147) Signed-off-by: Tony Allen <tony@allen.gg>
void h2_beam_on_consumed(h2_bucket_beam *beam, h2_beam_ev_callback *ev_cb, h2_beam_io_callback *io_cb, void *ctx) { h2_beam_lock bl; if (enter_yellow(beam, &bl) == APR_SUCCESS) { beam->cons_ev_cb = ev_cb; beam->cons_io_cb = io_cb; beam->...
0
[ "CWE-400" ]
mod_h2
83a2e3866918ce6567a683eb4c660688d047ee81
136,331,860,626,620,120,000,000,000,000,000,000,000
12
* fixes a race condition where aborting streams triggers an unnecessary timeout.
zone_loaddone(void *arg, isc_result_t result) { static char me[] = "zone_loaddone"; dns_load_t *load = arg; dns_zone_t *zone; isc_result_t tresult; dns_zone_t *secure = NULL; REQUIRE(DNS_LOAD_VALID(load)); zone = load->zone; ENTER; tresult = dns_db_endload(load->db, &load->callbacks); if (tresult != ISC_R_...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
264,186,572,683,206,400,000,000,000,000,000,000,000
59
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
static int xfrm_notify_policy(struct xfrm_policy *xp, int dir, const struct km_event *c) { int len = nla_total_size(sizeof(struct xfrm_user_tmpl) * xp->xfrm_nr); struct net *net = xp_net(xp); struct xfrm_userpolicy_info *p; struct xfrm_userpolicy_id *id; struct nlmsghdr *nlh; struct sk_buff *skb; int headlen, er...
0
[ "CWE-200" ]
linux
1f86840f897717f86d523a13e99a447e6a5d2fa5
98,423,450,292,490,260,000,000,000,000,000,000,000
65
xfrm_user: fix info leak in copy_to_user_tmpl() The memory used for the template copy is a local stack variable. As struct xfrm_user_tmpl contains multiple holes added by the compiler for alignment, not initializing the memory will lead to leaking stack bytes to userland. Add an explicit memset(0) to avoid the info le...
static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) { u64 elem_size = sizeof(struct stack_map_bucket) + (u64)smap->map.value_size; int err; smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, smap->map.numa_node); if (!smap->elems) return -ENOMEM; err = pcpu_freelist_ini...
0
[ "CWE-190", "CWE-787" ]
linux
30e29a9a2bc6a4888335a6ede968b75cd329657a
312,983,289,290,861,570,000,000,000,000,000,000,000
23
bpf: Fix integer overflow in prealloc_elems_and_freelist() In prealloc_elems_and_freelist(), the multiplication to calculate the size passed to bpf_map_area_alloc() could lead to an integer overflow. As a result, out-of-bounds write could occur in pcpu_freelist_populate() as reported by KASAN: [...] [ 16.968613] BU...
static void php_cli_server_log_response(php_cli_server_client *client, int status, const char *message TSRMLS_DC) /* {{{ */ { int color = 0, effective_status = status; char *basic_buf, *message_buf = "", *error_buf = ""; zend_bool append_error_message = 0; if (PG(last_error_message)) { switch (PG(last_error_type...
0
[]
php-src
2438490addfbfba51e12246a74588b2382caa08a
32,216,230,256,140,506,000,000,000,000,000,000,000
79
slim post data
rl_generic_bind (type, keyseq, data, map) int type; const char *keyseq; char *data; Keymap map; { char *keys; int keys_len; register int i; KEYMAP_ENTRY k; k.function = 0; /* If no keys to bind to, exit right away. */ if (keyseq == 0 || *keyseq == 0) { if (type == ISMACR) ...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
150,518,385,490,786,480,000,000,000,000,000,000,000
107
bash-4.4-rc2 release
compat_do_replace(struct net *net, void __user *user, unsigned int len) { int ret; struct compat_ipt_replace tmp; struct xt_table_info *newinfo; void *loc_cpu_entry; struct ipt_entry *iter; if (copy_from_user(&tmp, user, sizeof(tmp)) != 0) return -EFAULT; /* overflow check */ if (tmp.size >= INT_MAX / num_p...
0
[ "CWE-284", "CWE-264" ]
linux
ce683e5f9d045e5d67d1312a42b359cb2ab2a13c
195,855,128,739,893,300,000,000,000,000,000,000,000
54
netfilter: x_tables: check for bogus target offset We're currently asserting that targetoff + targetsize <= nextoff. Extend it to also check that targetoff is >= sizeof(xt_entry). Since this is generic code, add an argument pointing to the start of the match/target, we can then derive the base structure size from the...
static MagickBooleanType IsPS(const unsigned char *magick,const size_t length) { if (length < 4) return(MagickFalse); if (memcmp(magick,"%!",2) == 0) return(MagickTrue); if (memcmp(magick,"\004%!",3) == 0) return(MagickTrue); return(MagickFalse); }
0
[ "CWE-787" ]
ImageMagick
34a6a5a45e83a4af852090b4e43f168a380df979
248,712,092,370,552,270,000,000,000,000,000,000,000
10
https://github.com/ImageMagick/ImageMagick/issues/1523
pfm_release_debug_registers(struct task_struct *task) { unsigned long flags; int ret; if (pmu_conf->use_rr_dbregs == 0) return 0; LOCK_PFS(flags); if (pfm_sessions.pfs_ptrace_use_dbregs == 0) { printk(KERN_ERR "perfmon: invalid release for [%d] ptrace_use_dbregs=0\n", task->pid); ret = -1; } else { pfm_s...
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
224,425,826,238,621,100,000,000,000,000,000,000,000
19
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
static char *execlp_output(boolean log_error,...) { va_list ap; int ntokens = 0; char cmd[256] = ""; // for logging, OK if command gets truncated // run through arguments once to count them va_start(ap, log_error); { char * s; while ((s = va_arg(ap, char *)) != NULL) { ...
0
[]
eucalyptus
c252889a46f41b4c396b89e005ec89836f2524be
135,268,391,993,511,460,000,000,000,000,000,000,000
133
Input validation, shellout hardening on back-end - validating bucketName and bucketPath in BundleInstance - validating device name in Attach and DetachVolume - removed some uses of system() and popen() Fixes EUCA-7572, EUCA-7520
extern "C" my_bool reopen_fstreams(const char *filename, FILE *outstream, FILE *errstream) { if (outstream && !my_freopen(filename, "a", outstream)) return TRUE; if (errstream && !my_freopen(filename, "a", errstream)) return TRUE; /* The error stream must be unbuffered...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
71,111,420,900,662,640,000,000,000,000,000,000,000
15
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
hook_timer_exec () { struct timeval tv_time; struct t_hook *ptr_hook, *next_hook; hook_timer_check_system_clock (); gettimeofday (&tv_time, NULL); hook_exec_start (); ptr_hook = weechat_hooks[HOOK_TYPE_TIMER]; while (ptr_hook) { next_hook = ptr_hook->next_hook...
0
[ "CWE-20" ]
weechat
c265cad1c95b84abfd4e8d861f25926ef13b5d91
263,565,324,320,368,040,000,000,000,000,000,000,000
49
Fix verification of SSL certificates by calling gnutls verify callback (patch #7459)
connection_write_throttled (const connection * const con, off_t max_bytes) { const request_config * const restrict rconf = &con->request.conf; if (0 == rconf->global_bytes_per_second && 0 == rconf->bytes_per_second) return max_bytes; if (rconf->global_bytes_per_second) { off_t limit = (off_...
0
[ "CWE-703" ]
lighttpd1.4
b03b86f47b0d5a553137f081fadc482b4af1372d
164,778,045,383,926,600,000,000,000,000,000,000,000
22
[core] fix merging large headers across mult reads (fixes #3059) (thx mitd) x-ref: "Connections stuck in Close_Wait causing 100% cpu usage" https://redmine.lighttpd.net/issues/3059
void mp_decode_to_lua_type(lua_State *L, mp_cur *c) { mp_cur_need(c,1); /* If we return more than 18 elements, we must resize the stack to * fit all our return values. But, there is no way to * determine how many objects a msgpack will unpack to up front, so * we request a +1 larger stack on ea...
0
[ "CWE-119", "CWE-787" ]
redis
52a00201fca331217c3b4b8b634f6a0f57d6b7d3
331,829,825,254,045,930,000,000,000,000,000,000,000
213
Security: fix Lua cmsgpack library stack overflow. During an auditing effort, the Apple Vulnerability Research team discovered a critical Redis security issue affecting the Lua scripting part of Redis. -- Description of the problem Several years ago I merged a pull request including many small changes at the Lua Msg...
static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, const struct bpf_reg_state *off_reg) { struct bpf_reg_state *regs = cur_regs(env), *dst_reg; bool known = tnum_is_const(off_reg->var_off); s64 smin_val = off_reg->smin_val...
1
[ "CWE-190" ]
linux
bb7f0f989ca7de1153bd128a40a71709e339fa03
10,456,316,011,043,038,000,000,000,000,000,000,000
198
bpf: fix integer overflows There were various issues related to the limited size of integers used in the verifier: - `off + size` overflow in __check_map_access() - `off + reg->off` overflow in check_mem_access() - `off + reg->var_off.value` overflow or 32-bit truncation of `reg->var_off.value` in check_mem_acce...
bool has_lookahead() const { return lookahead_token >= 0; }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
307,563,682,222,079,050,000,000,000,000,000,000,000
4
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 ssize_t aac_show_max_channel(struct device *device, struct device_attribute *attr, char *buf) { return snprintf(buf, PAGE_SIZE, "%d\n", class_to_shost(device)->max_channel); }
0
[ "CWE-284", "CWE-264" ]
linux
f856567b930dfcdbc3323261bf77240ccdde01f5
301,483,814,139,192,200,000,000,000,000,000,000,000
6
aacraid: missing capable() check in compat ioctl In commit d496f94d22d1 ('[SCSI] aacraid: fix security weakness') we added a check on CAP_SYS_RAWIO to the ioctl. The compat ioctls need the check as well. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torv...
_rl_erase_entire_line () { cr (); _rl_clear_to_eol (0); cr (); fflush (rl_outstream); }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
232,151,998,848,954,600,000,000,000,000,000,000,000
7
bash-4.4-rc2 release
void xrangeGenericCommand(client *c, int rev) { robj *o; stream *s; streamID startid, endid; long long count = -1; robj *startarg = rev ? c->argv[3] : c->argv[2]; robj *endarg = rev ? c->argv[2] : c->argv[3]; int startex = 0, endex = 0; /* Parse start and end IDs. */ if (streamP...
0
[ "CWE-703", "CWE-401" ]
redis
4a7a4e42db8ff757cdf3f4a824f66426036034ef
198,054,364,269,680,330,000,000,000,000,000,000,000
52
Fix memory leak in streamGetEdgeID (#10753) si is initialized by streamIteratorStart(), we should call streamIteratorStop() on it when done. regression introduced in #9127 (redis 7.0)
qpdf_error qpdf_next_warning(qpdf_data qpdf) { if (qpdf_more_warnings(qpdf)) { qpdf->tmp_error.exc = new QPDFExc(qpdf->warnings.front()); qpdf->warnings.pop_front(); QTC::TC("qpdf", "qpdf-c qpdf_next_warning returned warning"); return &qpdf->tmp_error; } else { return 0; } }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
325,014,657,869,429,830,000,000,000,000,000,000,000
14
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static void smsusb1_detectmode(void *context, int *mode) { char *product_string = ((struct smsusb_device_t *) context)->udev->product; *mode = DEVICE_MODE_NONE; if (!product_string) { product_string = "none"; pr_err("product string not found\n"); } else if (strstr(product_string, "DVBH")) *mode = 1; else...
0
[ "CWE-476" ]
linux
31e0456de5be379b10fea0fa94a681057114a96e
210,278,218,593,020,400,000,000,000,000,000,000,000
21
media: usb: siano: Fix general protection fault in smsusb The syzkaller USB fuzzer found a general-protection-fault bug in the smsusb part of the Siano DVB driver. The fault occurs during probe because the driver assumes without checking that the device has both IN and OUT endpoints and the IN endpoint is ep1. By sl...
R_API char *r_str_ndup(const char *ptr, int len) { if (len < 0) { return NULL; } char *out = malloc (len + 1); if (!out) { return NULL; } strncpy (out, ptr, len); out[len] = 0; return out; }
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
71,192,754,162,983,200,000,000,000,000,000,000,000
12
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...
bool CudnnSupport::DoRnnBackward( Stream* stream, const dnn::RnnDescriptor& rnn_desc, const dnn::RnnSequenceTensorDescriptor& input_desc, const DeviceMemory<float>& input_data, const dnn::RnnStateTensorDescriptor& input_h_desc, const DeviceMemory<float>& input_h_data, const dnn::RnnStateTensorDe...
0
[ "CWE-20" ]
tensorflow
14755416e364f17fb1870882fa778c7fec7f16e3
104,054,905,779,349,170,000,000,000,000,000,000,000
50
Prevent CHECK-fail in LSTM/GRU with zero-length input. PiperOrigin-RevId: 346239181 Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f
static int dgram_connect(struct sock *sk, struct sockaddr *uaddr, int len) { struct sockaddr_ieee802154 *addr = (struct sockaddr_ieee802154 *)uaddr; struct dgram_sock *ro = dgram_sk(sk); int err = 0; if (len < sizeof(*addr)) return -EINVAL; if (addr->family != AF_IEEE802154) return -EINVAL; lock_sock(sk...
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
48,822,785,056,741,110,000,000,000,000,000,000,000
26
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
which_module(const char *name) { struct module *mp; for (mp = module_head; mp; mp = mp->next) if (!label_compare(mp->name, name)) return (mp->modid); DEBUGMSGTL(("parse-mibs", "Module %s not found\n", name)); return (-1); }
0
[ "CWE-59", "CWE-61" ]
net-snmp
4fd9a450444a434a993bc72f7c3486ccce41f602
180,096,834,105,588,900,000,000,000,000,000,000,000
11
CHANGES: snmpd: Stop reading and writing the mib_indexes/* files Caching directory contents is something the operating system should do and is not something Net-SNMP should do. Instead of storing a copy of the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a MIB directory.
void t_cpp_generator::generate_service_processor(t_service* tservice, string style) { ProcessorGenerator generator(this, tservice, style); generator.run(); }
0
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
127,540,139,722,472,900,000,000,000,000,000,000,000
4
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
gs_window_show_message (GSWindow *window, const char *summary, const char *body, const char *icon) { g_return_if_fail (GS_IS_WINDOW (window)); set_info_text_and_icon (window, icon, ...
0
[ "CWE-284" ]
cinnamon-screensaver
da7af55f1fa966c52e15cc288d4f8928eca8cc9f
335,933,319,035,828,530,000,000,000,000,000,000,000
22
Workaround gtk3 bug, don't allow GtkWindow to handle popup_menu.
static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb) { static const u8 ppph[2] = { 0xff, 0x03 }; struct sock *sk = (struct sock *) chan->private; struct sock *sk_tun; struct l2tp_session *session; struct l2tp_tunnel *tunnel; struct pppol2tp_session *ps; int uhlen, headroom; if (sock_flag(sk,...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
223,668,682,613,087,260,000,000,000,000,000,000,000
57
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static void Dummy(rfbClient* client) { }
0
[ "CWE-189" ]
libvncserver
045a044e8ae79db9244593fbce154cdf6e843273
258,866,738,850,211,300,000,000,000,000,000,000,000
2
Fix integer overflow in MallocFrameBuffer() Promote integers to uint64_t to avoid integer overflow issue during frame buffer allocation for very large screen sizes
static int nbd_negotiate_handle_list(NBDClient *client, uint32_t length) { NBDExport *exp; if (length) { if (nbd_negotiate_drop_sync(client->ioc, length) < 0) { return -EIO; } return nbd_negotiate_send_rep_err(client->ioc, NBD_REP_ER...
1
[ "CWE-20" ]
qemu
2b0bbc4f8809c972bad134bc1a2570dbb01dea0b
285,185,046,922,213,350,000,000,000,000,000,000,000
22
nbd/server: get rid of nbd_negotiate_read and friends Functions nbd_negotiate_{read,write,drop_sync} were introduced in 1a6245a5b, when nbd_rwv (was nbd_wr_sync) was working through qemu_co_sendv_recvv (the path is nbd_wr_sync -> qemu_co_{recv/send} -> qemu_co_send_recv -> qemu_co_sendv_recvv), which just yields, with...
static long btrfs_ioctl_fs_info(struct btrfs_root *root, void __user *arg) { struct btrfs_ioctl_fs_info_args *fi_args; struct btrfs_device *device; struct btrfs_device *next; struct btrfs_fs_devices *fs_devices = root->fs_info->fs_devices; int ret = 0; fi_args = kzalloc(sizeof(*fi_args), GFP_KERNEL); if (!fi_ar...
0
[ "CWE-200" ]
linux
8039d87d9e473aeb740d4fdbd59b9d2f89b2ced9
332,422,911,722,622,550,000,000,000,000,000,000,000
32
Btrfs: fix file corruption and data loss after cloning inline extents Currently the clone ioctl allows to clone an inline extent from one file to another that already has other (non-inlined) extents. This is a problem because btrfs is not designed to deal with files having inline and regular extents, if a file has an ...
int outwrite(const gs_memory_t *mem, const char *str, int len) { int code; FILE *fout; gs_lib_ctx_t *pio = mem->gs_lib_ctx; if (len == 0) return 0; if (pio->stdout_is_redirected) { if (pio->stdout_to_stderr) return errwrite(mem, str, len); fout = pio->fstdout2; ...
0
[]
ghostpdl
6d444c273da5499a4cd72f21cb6d4c9a5256807d
79,657,461,728,812,790,000,000,000,000,000,000,000
23
Bug 697178: Add a file permissions callback For the rare occasions when the graphics library directly opens a file (currently for reading), this allows us to apply any restrictions on file access normally applied in the interpteter.
void SSL_set_shutdown(SSL*, int) { // TODO: }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
132,527,391,727,922,480,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
static void device_state_free(void *data) { struct device_state *state = data; queue_destroy(state->ccc_states, free); if (state->pending) { free(state->pending->value); free(state->pending); } free(state); }
0
[ "CWE-416" ]
bluez
838c0dc7641e1c991c0f3027bf94bee4606012f8
259,451,005,780,015,950,000,000,000,000,000,000,000
13
gatt: Fix not cleaning up when disconnected There is a current use after free possible on a gatt server if a client disconnects while a WriteValue call is being processed with dbus. This patch includes the addition of a pending disconnect callback to handle cleanup better if a disconnect occurs during a write, an acq...
do_shell( char_u *cmd, int flags) // may be SHELL_DOOUT when output is redirected { buf_T *buf; #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) int save_nwr; #endif #ifdef MSWIN int winstart = FALSE; #endif int keep_termcap = !termcap_active; /* * Disallow shell commands for "rvim"...
0
[ "CWE-787" ]
vim
e2bd8600b873d2cd1f9d667c28cba8b1dba18839
80,167,049,294,576,255,000,000,000,000,000,000,000
168
patch 8.2.4977: memory access error when substitute expression changes window Problem: Memory access error when substitute expression changes window. Solution: Disallow changing window in substitute expression.
parse_historical (struct app_local_s *apploc, const unsigned char * buffer, size_t buflen) { /* Example buffer: 00 31 C5 73 C0 01 80 00 90 00 */ if (buflen < 4) { log_error ("warning: historical bytes are too short\n"); return; /* Too short. */ } if (*buffer) { lo...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
306,937,974,276,754,360,000,000,000,000,000,000,000
45
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
EXPORTED void allow_hdr(struct transaction_t *txn, const char *name, unsigned allow) { const char *meths[] = { "OPTIONS, GET, HEAD", "POST", "PUT", "PATCH", "DELETE", "TRACE", "CONNECT", NULL }; comma_list_hdr(txn, name, meths, allow); if (allow & ALLOW_DAV) { ...
0
[]
cyrus-imapd
602f12ed2af0a49ac4a58affbfea57d0fc23dea5
308,035,714,469,335,300,000,000,000,000,000,000,000
21
httpd.c: only allow reuse of auth creds on a persistent connection against a backend server in a Murder
static void ax88179_status(struct usbnet *dev, struct urb *urb) { struct ax88179_int_data *event; u32 link; if (urb->actual_length < 8) return; event = urb->transfer_buffer; le32_to_cpus((void *)&event->intdata1); link = (((__force u32)event->intdata1) & AX_INT_PPLS_LINK) >> 16; if (netif_carrier_ok(dev->n...
0
[ "CWE-787" ]
linux
57bc3d3ae8c14df3ceb4e17d26ddf9eeab304581
43,130,839,804,045,810,000,000,000,000,000,000,000
18
net: usb: ax88179_178a: Fix out-of-bounds accesses in RX fixup ax88179_rx_fixup() contains several out-of-bounds accesses that can be triggered by a malicious (or defective) USB device, in particular: - The metadata array (hdr_off..hdr_off+2*pkt_cnt) can be out of bounds, causing OOB reads and (on big-endian syst...
double Field::pos_in_interval_val_real(Field *min, Field *max) { double n, d; n= val_real() - min->val_real(); if (n < 0) return 0.0; d= max->val_real() - min->val_real(); if (d <= 0) return 1.0; return MY_MIN(n/d, 1.0); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
194,560,481,857,115,700,000,000,000,000,000,000,000
11
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 void ExportCMYKQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const Quantum *magick_restrict p, unsigned char *magick_restrict q,ExceptionInfo *exception) { ssize_t x; if (image->colorspace != CMYKColorspace) { (void) ThrowMagickException(exception...
0
[ "CWE-190" ]
ImageMagick
5af1dffa4b6ab984b5f13d1e91c95760d75f12a6
185,838,796,465,041,900,000,000,000,000,000,000,000
144
outside the range of representable values of type 'unsigned char' (#3083) Co-authored-by: Zhang Xiaohui <ruc_zhangxiaohui@163.com>
int update_approximate_cache_glyph_order(const CACHE_GLYPH_ORDER* cache_glyph, UINT16* flags) { return 2 + cache_glyph->cGlyphs * 32; }
0
[ "CWE-415" ]
FreeRDP
67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8
29,364,663,743,390,237,000,000,000,000,000,000,000
4
Fixed #6013: Check new length is > 0
static void update_top_cache_domain(int cpu) { struct sched_domain *sd; struct sched_domain *busy_sd = NULL; int id = cpu; int size = 1; sd = highest_flag_domain(cpu, SD_SHARE_PKG_RESOURCES); if (sd) { id = cpumask_first(sched_domain_span(sd)); size = cpumask_weight(sched_domain_span(sd)); busy_sd = sd->pa...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
241,345,277,148,578,600,000,000,000,000,000,000,000
25
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...
large_freelist_alloc(gs_ref_memory_t *mem, uint size) { /* Scan large object freelist. We'll grab an object up to 1/8 bigger */ /* right away, else use best fit of entire scan. */ uint aligned_size = obj_align_round(size); uint aligned_min_size = aligned_size + sizeof(obj_header_t); uint aligned_max...
0
[ "CWE-190" ]
ghostpdl
cfde94be1d4286bc47633c6e6eaf4e659bd78066
66,440,034,889,366,460,000,000,000,000,000,000,000
53
Bug 697985: bounds check the array allocations methods The clump allocator has four allocation functions that use 'number of elements' and 'size of elements' parameters (rather than a simple 'number of bytes'). Those need specific bounds checking.
eap_send_request(esp) eap_state *esp; { u_char *outp; u_char *lenloc; u_char *ptr; int outlen; int challen; char *str; #ifdef USE_SRP struct t_server *ts; u_char clear[8], cipher[8], dig[SHA_DIGESTSIZE], *optr, *cp; int i, j; struct b64state b64; SHA1_CTX ctxt; #endif /* USE_SRP */ /* Handle both initial a...
0
[ "CWE-120", "CWE-787" ]
ppp
8d7970b8f3db727fe798b65f3377fe6787575426
191,964,688,759,165,980,000,000,000,000,000,000,000
226
pppd: Fix bounds check in EAP code Given that we have just checked vallen < len, it can never be the case that vallen >= len + sizeof(rhostname). This fixes the check so we actually avoid overflowing the rhostname array. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Paul Mackerras <paulus...
static void SVGStripString(const MagickBooleanType trim,char *message) { register char *p, *q; size_t length; assert(message != (char *) NULL); if (*message == '\0') return; /* Remove comment. */ q=message; for (p=message; *p != '\0'; p++) { if ((*p == '/') && (*(p+1) == '*')...
0
[ "CWE-401" ]
ImageMagick6
e3417aebe17cbe274b7361aa92c83226ca5b646b
262,981,734,799,549,940,000,000,000,000,000,000,000
59
https://github.com/ImageMagick/ImageMagick/issues/1533
void ZrtpStateClass::sendErrorPacket(uint32_t errorCode) { cancelTimer(); ZrtpPacketError* err = parent->prepareError(errorCode); parent->zrtpNegotiationFailed(ZrtpError, errorCode); sentPacket = static_cast<ZrtpPacketBase *>(err); nextState(WaitErrorAck); if (!parent->sendPacketZRTP(static_c...
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
158,996,495,568,316,130,000,000,000,000,000,000,000
12
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
init_syntax_tree( config_tree *ptree ) { ZERO(*ptree); ptree->mdnstries = 5; }
0
[ "CWE-19" ]
ntp
fe46889f7baa75fc8e6c0fcde87706d396ce1461
27,920,462,084,214,825,000,000,000,000,000,000,000
7
[Sec 2942]: Off-path DoS attack on auth broadcast mode. HStenn.
dse_deletedse(Slapi_PBlock *pb) { struct dse *pdse = NULL; slapi_pblock_get(pb, SLAPI_PLUGIN_PRIVATE, &pdse); if (pdse) { dse_destroy(pdse); } /* data is freed, so make sure no one tries to use it */ slapi_pblock_set(pb, SLAPI_PLUGIN_PRIVATE, NULL); return 0; }
0
[ "CWE-200", "CWE-203" ]
389-ds-base
b6aae4d8e7c8a6ddd21646f94fef1bf7f22c3f32
338,332,163,359,758,240,000,000,000,000,000,000,000
15
Issue 4609 - CVE - info disclosure when authenticating Description: If you bind as a user that does not exist. Error 49 is returned instead of error 32. As error 32 discloses that the entry does not exist. When you bind as an entry that does not have userpassword set then ...
static int tun_get_link_ksettings(struct net_device *dev, struct ethtool_link_ksettings *cmd) { ethtool_link_ksettings_zero_link_mode(cmd, supported); ethtool_link_ksettings_zero_link_mode(cmd, advertising); cmd->base.speed = SPEED_10; cmd->base.duplex = DUPLEX_FULL; cmd->base.port = PORT_TP; cmd->base.ph...
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
133,205,412,730,377,730,000,000,000,000,000,000,000
12
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
struct page *follow_devmap_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd, int flags, struct dev_pagemap **pgmap) { unsigned long pfn = pmd_pfn(*pmd); struct mm_struct *mm = vma->vm_mm; struct page *page; assert_spin_locked(pmd_lockptr(mm, pmd)); /* * When we COW a devmap PMD entry, we split ...
0
[ "CWE-362" ]
linux
c444eb564fb16645c172d550359cb3d75fe8a040
236,441,366,463,219,700,000,000,000,000,000,000,000
48
mm: thp: make the THP mapcount atomic against __split_huge_pmd_locked() Write protect anon page faults require an accurate mapcount to decide if to break the COW or not. This is implemented in the THP path with reuse_swap_page() -> page_trans_huge_map_swapcount()/page_trans_huge_mapcount(). If the COW triggers while ...
Status CmdAuthenticate::_authenticate(const std::string& mechanism, const UserName& user, const BSONObj& cmdObj) { if (mechanism == "MONGODB-CR") { return _authenticateCR(user, cmdObj); } #ifdef MONGO_SS...
0
[]
mongo
f85ceb17b37210eef71e8113162c41368bfd5c12
326,853,632,579,631,670,000,000,000,000,000,000,000
14
SERVER-9476 Redact some potentially sensitive information when logging authentications.
int main(int argc, char *argv[]) { char *p, *q, *r; Clp_Parser *clp = Clp_NewParser(argc, (const char * const *)argv, sizeof(options) / sizeof(options[0]), options); program_name = Clp_ProgramName(clp); /* interpret command line arguments using CLP */ while (1) { int opt = Clp_Next(clp); switch ...
1
[ "CWE-119", "CWE-787" ]
t1utils
6b9d1aafcb61a3663c883663eb19ccdbfcde8d33
184,679,780,827,020,100,000,000,000,000,000,000,000
198
Security fixes. - Don't overflow the small cs_start buffer (reported by Niels Thykier via the debian tracker (Jakub Wilk), found with a fuzzer ("American fuzzy lop")). - Cast arguments to <ctype.h> functions to unsigned char.
static void mg_http_vprintf_chunk(struct mg_connection *c, const char *fmt, va_list ap) { char mem[256], *buf = mem; int len = mg_vasprintf(&buf, sizeof(mem), fmt, ap); mg_printf(c, "%X\r\n", len); mg_send(c, buf, len > 0 ? (size_t) len : 0); mg_send(c, "\r\n", 2); if (buf ...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
181,973,242,242,267,220,000,000,000,000,000,000,000
9
Protect against the directory traversal in mg_upload()
TPMS_SIG_SCHEME_ECSCHNORR_Marshal(TPMS_SIG_SCHEME_ECSCHNORR *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; written += TPMS_SCHEME_HASH_Marshal(source, buffer, size); return written; }
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
135,172,986,805,121,920,000,000,000,000,000,000,000
6
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>
compat_copy_entry_from_user(struct compat_ipt_entry *e, void **dstptr, unsigned int *size, struct xt_table_info *newinfo, unsigned char *base) { struct xt_entry_target *t; struct xt_target *target; struct ipt_entry *de; unsigned int origsize; int h; struct xt_entry_match *ematch; origsize = *size;...
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
336,979,347,077,906,800,000,000,000,000,000,000,000
36
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
String_Obj Parser::parse_url_function_argument() { const char* p = position; std::string uri(""); if (lex< real_uri_value >(false)) { uri = lexed.to_string(); } if (peek< exactly< hash_lbrace > >()) { const char* pp = position; // TODO: error checking for unclosed interpolant...
1
[ "CWE-125" ]
libsass
b3374e3fd1a0c3658644d2bad24e4a0ff2e0dcea
246,110,589,654,395,250,000,000,000,000,000,000,000
25
Fix handling of unclosed interpolant in url Fixes #2661
static void item_free_contents(Item *i) { assert(i); free(i->path); free(i->argument); strv_free(i->xattrs); #if HAVE_ACL acl_free(i->acl_access); acl_free(i->acl_default); #endif }
0
[ "CWE-59" ]
systemd
5579f85663d10269e7ac7464be6548c99cea4ada
52,319,500,755,543,150,000,000,000,000,000,000,000
11
tmpfiles: refuse to chown()/chmod() files which are hardlinked, unless protected_hardlinks sysctl is on Let's add some extra safety. Fixes: #7736
EXPORTED int meth_options(struct transaction_t *txn, void *params) { parse_path_t parse_path = (parse_path_t) params; int r, i; /* Response should not be cached */ txn->flags.cc |= CC_NOCACHE; /* Response doesn't have a body, so no Vary */ txn->flags.vary = 0; /* Special case "*" - show a...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
261,316,629,426,575,380,000,000,000,000,000,000,000
54
HTTP: don't overrun buffer when parsing strings with sscanf()
const CImg<T>& save_video(const char *const filename, const unsigned int fps=25, const char *codec=0, const bool keep_open=false) const { if (is_empty()) { CImgList<T>().save_video(filename,fps,codec,keep_open); return *this; } CImgList<T> list; get_split('z').move_to...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
340,091,361,870,313,530,000,000,000,000,000,000,000
8
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
const struct sched_avg *sched_trace_rq_avg_dl(struct rq *rq) { #ifdef CONFIG_SMP return rq ? &rq->avg_dl : NULL; #else return NULL; #endif }
0
[ "CWE-400", "CWE-703" ]
linux
de53fd7aedb100f03e5d2231cfce0e4993282425
144,880,252,508,951,100,000,000,000,000,000,000,000
8
sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices It has been observed, that highly-threaded, non-cpu-bound applications running under cpu.cfs_quota_us constraints can hit a high percentage of periods throttled while simultaneously not consuming the allocated amount of quota...
TORRENT_TEST(expected_string) { char b[] = "di2ei0ee"; // expected string (dict keys must be strings) bdecode_node e; error_code ec; int pos; int ret = bdecode(b, b + sizeof(b)-1, e, ec, &pos); TEST_EQUAL(ret, -1); TEST_EQUAL(pos, 1); TEST_EQUAL(ec, error_code(bdecode_errors::expected_digit)); printf("%s\n",...
0
[ "CWE-125" ]
libtorrent
ec30a5e9ec703afb8abefba757c6d401303b53db
331,562,686,719,815,720,000,000,000,000,000,000,000
14
fix out-of-bounds read in bdecode Fixes #2099
static inline bool tun_legacy_is_little_endian(struct tun_struct *tun) { return tun->flags & TUN_VNET_BE ? false : virtio_legacy_is_little_endian(); }
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
36,759,659,741,917,480,000,000,000,000,000,000,000
5
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
static unsigned int __gang_lookup_nat_set(struct f2fs_nm_info *nm_i, nid_t start, unsigned int nr, struct nat_entry_set **ep) { return radix_tree_gang_lookup(&nm_i->nat_set_root, (void **)ep, start, nr); }
0
[ "CWE-200", "CWE-362" ]
linux
30a61ddf8117c26ac5b295e1233eaa9629a94ca3
162,341,119,011,782,880,000,000,000,000,000,000,000
6
f2fs: fix race condition in between free nid allocator/initializer In below concurrent case, allocated nid can be loaded into free nid cache and be allocated again. Thread A Thread B - f2fs_create - f2fs_new_inode - alloc_nid - __insert_nid_to_list(ALLOC_NID_LIST) - f2fs_balance_fs_bg - build_free...
static __cold int io_submit_fail_init(const struct io_uring_sqe *sqe, struct io_kiocb *req, int ret) { struct io_ring_ctx *ctx = req->ctx; struct io_submit_link *link = &ctx->submit_state.link; struct io_kiocb *head = link->head; trace_io_uring_req_failed(sqe, ctx, req, ret); /* * Avoid breaking lin...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
88,906,384,303,580,170,000,000,000,000,000,000,000
36
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...
X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc) { return X509at_get_attr(req->req_info->attributes, loc); }
0
[]
openssl
28a00bcd8e318da18031b2ac8778c64147cd54f9
128,306,980,800,611,640,000,000,000,000,000,000,000
4
Check public key is not NULL. CVE-2015-0288 PR#3708 Reviewed-by: Matt Caswell <matt@openssl.org>
static int nlgetc(FILE *sfd) { int ch, ch2; ch=getc(sfd); if ( ch!='\\' ) return( ch ); ch2 = getc(sfd); if ( ch2=='\n' ) return( nlgetc(sfd)); ungetc(ch2,sfd); return( ch ); }
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
143,351,621,620,704,060,000,000,000,000,000,000,000
12
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
MD5::getDataChecksum(char const* buf, int len) { MD5 m; m.encodeDataIncrementally(buf, len); return m.unparse(); }
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
72,212,229,965,898,820,000,000,000,000,000,000,000
6
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
CTransaction::GetLegacySigOpCount() const { int nSigOps = 0; BOOST_FOREACH(const CTxIn& txin, vin) { nSigOps += txin.scriptSig.GetSigOpCount(false); } BOOST_FOREACH(const CTxOut& txout, vout) { nSigOps += txout.scriptPubKey.GetSigOpCount(false); } return nSigOps; }
0
[ "CWE-16", "CWE-787" ]
bitcoin
a206b0ea12eb4606b93323268fc81a4f1f952531
202,663,535,725,347,600,000,000,000,000,000,000,000
13
Do not allow overwriting unspent transactions (BIP 30) Introduce the following network rule: * a block is not valid if it contains a transaction whose hash already exists in the block chain, unless all that transaction's outputs were already spent before said block. Warning: this is effectively a network rule ...
static int php_snmp_parse_oid(zval *object, int st, struct objid_query *objid_query, zval **oid, zval **type, zval **value TSRMLS_DC) { char *pptr; HashPosition pos_oid, pos_type, pos_value; zval **tmp_oid, **tmp_type, **tmp_value; if (Z_TYPE_PP(oid) != IS_ARRAY) { if (Z_ISREF_PP(oid)) { SEPARATE_ZVAL(oid); ...
0
[ "CWE-416" ]
php-src
cab1c3b3708eead315e033359d07049b23b147a3
2,759,301,519,040,155,000,000,000,000,000,000,000
152
Fixed bug #72479 - same as #72434
TEST_F(QueryPlannerTest, SparseIndexHintForSort) { addIndex(fromjson("{a: 1}"), false, true); runQuerySortHint(BSONObj(), fromjson("{a: 1}"), fromjson("{a: 1}")); assertNumSolutions(1U); assertSolutionExists( "{fetch: {filter: null, node: {ixscan: " "{filter: null, pattern: {a: 1}}}}}")...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
271,294,755,955,914,200,000,000,000,000,000,000,000
9
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
asmlinkage long sys32_sigsuspend(int history0, int history1, old_sigset_t mask) { mask &= _BLOCKABLE; spin_lock_irq(&current->sighand->siglock); current->saved_sigmask = current->blocked; siginitset(&current->blocked, mask); recalc_sigpending(); spin_unlock_irq(&current->sighand->siglock); current->state = TASK...
0
[ "CWE-399" ]
linux-2.6
e40cd10ccff3d9fbffd57b93780bee4b7b9bff51
64,991,145,092,375,260,000,000,000,000,000,000,000
14
x86: clear DF before calling signal handler The Linux kernel currently does not clear the direction flag before calling a signal handler, whereas the x86/x86-64 ABI requires that. Linux had this behavior/bug forever, but this becomes a real problem with gcc version 4.3, which assumes that the direction flag is correc...
static int get_info(struct net *net, void __user *user, const int *len, int compat) { char name[XT_TABLE_MAXNAMELEN]; struct xt_table *t; int ret; if (*len != sizeof(struct ip6t_getinfo)) { duprintf("length %u != %zu\n", *len, sizeof(struct ip6t_getinfo)); return -EINVAL; } if (copy_...
0
[ "CWE-200" ]
linux-2.6
6a8ab060779779de8aea92ce3337ca348f973f54
93,735,460,203,109,500,000,000,000,000,000,000,000
60
ipv6: netfilter: ip6_tables: fix infoleak to userspace Structures ip6t_replace, compat_ip6t_replace, and xt_get_revision are copied from userspace. Fields of these structs that are zero-terminated strings are not checked. When they are used as argument to a format string containing "%s" in request_module(), some sen...
run_cancel_or_skip_warning (CommonJob *job, char *primary_text, char *secondary_text, const char *details_text, int total_operations, int operations_re...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
68,027,019,052,550,130,000,000,000,000,000,000,000
32
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
static inline int vmcs_field_readonly(unsigned long field) { return (((field >> 10) & 0x3) == 1); }
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
337,763,230,983,241,900,000,000,000,000,000,000,000
4
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
static inline struct nlmsghdr *nlmsg_put_answer(struct sk_buff *skb, struct netlink_callback *cb, int type, int payload, int flags) { return nlmsg_put(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, type, payload, flags); }
0
[]
linux-2.6
1045b03e07d85f3545118510a587035536030c1c
315,916,193,597,786,260,000,000,000,000,000,000,000
8
netlink: fix overrun in attribute iteration kmemcheck reported this: kmemcheck: Caught 16-bit read from uninitialized memory (f6c1ba30) 0500110001508abf050010000500000002017300140000006f72672e66726565 i i i i i i i i i i i i i u u u u u u u u u u u u u u u u u u u ^ Pid: 3...
static int kvm_read_hva(void *data, void __user *hva, int len) { return __copy_from_user(data, hva, len); }
0
[ "CWE-399" ]
linux
12d6e7538e2d418c08f082b1b44ffa5fb7270ed8
39,808,573,786,188,560,000,000,000,000,000,000,000
4
KVM: perform an invalid memslot step for gpa base change PPC must flush all translations before the new memory slot is visible. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
int cil_resolve_call1(struct cil_tree_node *current, void *extra_args) { struct cil_call *new_call = current->data; struct cil_args_resolve *args = extra_args; struct cil_db *db = NULL; struct cil_tree_node *macro_node = NULL; struct cil_symtab_datum *macro_datum = NULL; int rc = SEPOL_ERR; if (args != NULL) { ...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
236,231,526,991,740,400,000,000,000,000,000,000,000
339
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
static void soft_offline_free_page(struct page *page) { if (PageHuge(page)) { struct page *hpage = compound_head(page); set_page_hwpoison_huge_page(hpage); if (!dequeue_hwpoisoned_huge_page(hpage)) num_poisoned_pages_add(1 << compound_order(hpage)); } else { if (!TestSetPageHWPoison(page)) num_poisoned...
0
[]
linux
c3901e722b2975666f42748340df798114742d6d
22,564,846,920,711,494,000,000,000,000,000,000,000
13
mm: hwpoison: fix thp split handling in memory_failure() When memory_failure() runs on a thp tail page after pmd is split, we trigger the following VM_BUG_ON_PAGE(): page:ffffd7cd819b0040 count:0 mapcount:0 mapping: (null) index:0x1 flags: 0x1fffc000400000(hwpoison) page dumped because: VM_BUG_ON_PAG...
static int tty_reopen(struct tty_struct *tty) { struct tty_driver *driver = tty->driver; struct tty_ldisc *ld; int retval = 0; if (driver->type == TTY_DRIVER_TYPE_PTY && driver->subtype == PTY_TYPE_MASTER) return -EIO; if (!tty->count) return -EAGAIN; if (test_bit(TTY_EXCLUSIVE, &tty->flags) && !capab...
0
[ "CWE-416" ]
linux
c8bcd9c5be24fb9e6132e97da5a35e55a83e36b9
26,854,646,512,011,947,000,000,000,000,000,000,000
34
tty: Fix ->session locking Currently, locking of ->session is very inconsistent; most places protect it using the legacy tty mutex, but disassociate_ctty(), __do_SAK(), tiocspgrp() and tiocgsid() don't. Two of the writers hold the ctrl_lock (because they already need it for ->pgrp), but __proc_set_tty() doesn't do tha...
static void f2fs_write_failed(struct address_space *mapping, loff_t to) { struct inode *inode = mapping->host; loff_t i_size = i_size_read(inode); if (to > i_size) { truncate_pagecache(inode, i_size); truncate_blocks(inode, i_size, true); } }
0
[ "CWE-190" ]
linux
b86e33075ed1909d8002745b56ecf73b833db143
146,170,270,235,444,110,000,000,000,000,000,000,000
10
f2fs: fix a dead loop in f2fs_fiemap() A dead loop can be triggered in f2fs_fiemap() using the test case as below: ... fd = open(); fallocate(fd, 0, 0, 4294967296); ioctl(fd, FS_IOC_FIEMAP, fiemap_buf); ... It's caused by an overflow in __get_data_block(): ... bh->b_size = map.m_len << inode->i_blkbits; ... ...
int security_audit_rule_match(u32 secid, u32 field, u32 op, void *lsmrule, struct audit_context *actx) { return security_ops->audit_rule_match(secid, field, op, lsmrule, actx); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
43,510,524,940,495,350,000,000,000,000,000,000,000
5
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
ssize_t ip_append_page(struct sock *sk, struct page *page, int offset, size_t size, int flags) { struct inet_sock *inet = inet_sk(sk); struct sk_buff *skb; struct rtable *rt; struct ip_options *opt = NULL; int hh_len; int mtu; int len; int err; unsigned int maxfraglen, fragheaderlen, fraggap; if (in...
0
[]
linux
e89e9cf539a28df7d0eb1d0a545368e9920b34ac
96,735,243,583,947,540,000,000,000,000,000,000,000
139
[IPv4/IPv6]: UFO Scatter-gather approach Attached is kernel patch for UDP Fragmentation Offload (UFO) feature. 1. This patch incorporate the review comments by Jeff Garzik. 2. Renamed USO as UFO (UDP Fragmentation Offload) 3. udp sendfile support with UFO This patches uses scatter-gather feature of skb to generate l...
static void cmd_read_cdvd_capacity(IDEState *s, uint8_t* buf) { uint64_t total_sectors = s->nb_sectors >> 2; /* NOTE: it is really the number of sectors minus 1 */ stl_be_p(buf, total_sectors - 1); stl_be_p(buf + 4, 2048); ide_atapi_cmd_reply(s, 8, 8); }
0
[ "CWE-125" ]
qemu
813212288970c39b1800f63e83ac6e96588095c6
122,316,835,180,965,910,000,000,000,000,000,000,000
9
ide: atapi: assert that the buffer pointer is in range A case was reported where s->io_buffer_index can be out of range. The report skimped on the details but it seems to be triggered by s->lba == -1 on the READ/READ CD paths (e.g. by sending an ATAPI command with LBA = 0xFFFFFFFF). For now paper over it with asserti...
GF_Box *piff_tenc_box_new() { ISOM_DECL_BOX_ALLOC(GF_PIFFTrackEncryptionBox, GF_ISOM_BOX_TYPE_UUID); tmp->internal_4cc = GF_ISOM_BOX_UUID_TENC; return (GF_Box *)tmp; }
0
[ "CWE-703" ]
gpac
f19668964bf422cf5a63e4dbe1d3c6c75edadcbb
183,635,197,961,581,200,000,000,000,000,000,000,000
6
fixed #1879
update_info_and_name (NautilusFile *file, GFileInfo *info) { return update_info_internal (file, info, TRUE); }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
228,021,588,622,729,350,000,000,000,000,000,000,000
5
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
void DocumentSourceLookUp::detachFromOperationContext() { if (_pipeline) { // We have a pipeline we're going to be executing across multiple calls to getNext(), so we // use Pipeline::detachFromOperationContext() to take care of updating '_fromExpCtx->opCtx'. _pipeline->detachFromOperationCo...
0
[ "CWE-416" ]
mongo
d6133a3a5464fac202f512b0310dfeb200c126f9
130,014,662,148,317,320,000,000,000,000,000,000,000
10
SERVER-43350 $lookup with no local default or user-specified collation should explicitly set the simple collation on the foreign expression context
ptaGetCount(PTA *pta) { PROCNAME("ptaGetCount"); if (!pta) return ERROR_INT("pta not defined", procName, 0); return pta->n; }
0
[ "CWE-119", "CWE-787" ]
leptonica
ee301cb2029db8a6289c5295daa42bba7715e99a
13,488,922,467,599,091,000,000,000,000,000,000,000
9
Security fixes: expect final changes for release 1.75.3. * Fixed a debian security issue with fscanf() reading a string with possible buffer overflow. * There were also a few similar situations with sscanf().
static int ssl_check_srp_ext_ClientHello(SSL *s,int *al) { int ret = SSL_ERROR_NONE; *al = SSL_AD_UNRECOGNIZED_NAME; if ((s->s3->tmp.new_cipher->algorithm_mkey & SSL_kSRP) && (s->srp_ctx.TLS_ext_srp_username_callback != NULL)) { if(s->srp_ctx.login == NULL) { /* RFC 5054 says SHOULD reject, ...
0
[]
openssl
4817504d069b4c5082161b02a22116ad75f822b1
61,383,830,436,549,580,000,000,000,000,000,000,000
23
PR: 2658 Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Reviewed by: steve Support for TLS/DTLS heartbeats.
static void sdhci_send_command(SDHCIState *s) { SDRequest request; uint8_t response[16]; int rlen; s->errintsts = 0; s->acmd12errsts = 0; request.cmd = s->cmdreg >> 8; request.arg = s->argument; trace_sdhci_send_command(request.cmd, request.arg); rlen = sdbus_do_command(&s->sdbus, ...
1
[ "CWE-119" ]
qemu
b263d8f928001b5cfa2a993ea43b7a5b3a1811e8
167,511,972,721,116,630,000,000,000,000,000,000,000
53
hw/sd: sdhci: Don't transfer any data when command time out At the end of sdhci_send_command(), it starts a data transfer if the command register indicates data is associated. But the data transfer should only be initiated when the command execution has succeeded. With this fix, the following reproducer: outl 0xcf8 ...
static int f2fs_quota_off(struct super_block *sb, int type) { struct inode *inode = sb_dqopt(sb)->files[type]; int err; if (!inode || !igrab(inode)) return dquot_quota_off(sb, type); f2fs_quota_sync(sb, type); err = dquot_quota_off(sb, type); if (err) goto out_put; inode_lock(inode); F2FS_I(inode)->i_fl...
0
[ "CWE-20" ]
linux
638164a2718f337ea224b747cf5977ef143166a4
123,331,123,546,757,650,000,000,000,000,000,000,000
23
f2fs: fix potential panic during fstrim As Ju Hyung Park reported: "When 'fstrim' is called for manual trim, a BUG() can be triggered randomly with this patch. I'm seeing this issue on both x86 Desktop and arm64 Android phone. On x86 Desktop, this was caused during Ubuntu boot-up. I have a cronjob installed which c...
gerbv_gdk_draw_prim5(GdkPixmap *pixmap, GdkGC *gc, double *p, double scale, gint x, gint y) { const int exposure_idx = 0; const int nuf_vertices_idx = 1; const int center_x_idx = 2; const int center_y_idx = 3; const int diameter_idx = 4; const int rotation_idx = 5; int nuf_vertices, ...
1
[ "CWE-703" ]
gerbv
b2c2f8da851f2ac8079a91ce9d498d87ff96abcf
58,657,214,356,194,180,000,000,000,000,000,000,000
46
Avoid direct access on array of unknown size Be requiring a `gerbv_simplified_amacro_t` the `dgk_draw_amacro_funcs` can be sure of the length of the parameter array.
GURL GetOriginOrURL(const WebFrame* frame) { url::Origin top_origin = url::Origin(frame->Top()->GetSecurityOrigin()); // The |top_origin| is unique ("null") e.g., for file:// URLs. Use the // document URL as the primary URL in those cases. // TODO(alexmos): This is broken for --site-per-process, since top() can...
0
[ "CWE-20", "CWE-200" ]
muon
c18663aa171c6cdf03da3e8c70df8663645b97c4
245,341,947,750,193,700,000,000,000,000,000,000,000
11
Issue: 15232 AllowScript should use atom::ContentSettingsManager like other Allow* methods in the observer
void WebContents::HandleNewRenderFrame( content::RenderFrameHost* render_frame_host) { auto* rwhv = render_frame_host->GetView(); if (!rwhv) return; // Set the background color of RenderWidgetHostView. auto* web_preferences = WebContentsPreferences::From(web_contents()); if (web_preferences) { bo...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
99,278,048,701,740,360,000,000,000,000,000,000,000
28
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
TEST(InMatchExpression, MatchesUndefined) { BSONObj operand = BSON_ARRAY(BSONUndefined); InMatchExpression in("a"); std::vector<BSONElement> equalities{operand.firstElement()}; ASSERT_NOT_OK(in.setEqualities(std::move(equalities))); }
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
9,087,152,684,999,344,000,000,000,000,000,000,000
7
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
_PUBLIC_ enum ndr_err_code ndr_push_netlogon_samlogon_response(struct ndr_push *ndr, int ndr_flags, const struct netlogon_samlogon_response *r) { if (r->ntver == NETLOGON_NT_VERSION_1) { NDR_CHECK(ndr_push_NETLOGON_SAM_LOGON_RESPONSE_NT40( ndr, ndr_flags, &r->data.nt4)); } else if (r->ntver & NETLOGON_NT_VERSION...
0
[ "CWE-400" ]
samba
cc3a67760cf9faaad3af73b1eed9e2ef85276633
201,323,292,777,233,500,000,000,000,000,000,000,000
17
CVE-2020-10745: ndr/dns-utils: prepare for NBT compatibility NBT has a funny thing where it sometimes needs to send a trailing dot as part of the last component, because the string representation is a user name. In DNS, "example.com", and "example.com." are the same, both having three components ("example", "com", "")...
int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct inode *inode, u64 new_size, u32 min_type) { struct btrfs_path *path; struct extent_buffer *leaf; struct btrfs_file_extent_item *fi; struct btrfs_key key; struct btrfs_key found_key; u64 e...
1
[ "CWE-200" ]
linux
0305cd5f7fca85dae392b9ba85b116896eb7c1c7
30,426,449,348,703,277,000,000,000,000,000,000,000
314
Btrfs: fix truncation of compressed and inlined extents When truncating a file to a smaller size which consists of an inline extent that is compressed, we did not discard (or made unusable) the data between the new file size and the old file size, wasting metadata space and allowing for the truncated data to be leaked...