func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static inline void set_attr(map<string, bufferlist>& attrs, const char* key, const char* value) { bufferlist bl; encode(value,bl); attrs.emplace(key, std::move(bl)); }
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
307,692,111,325,300,700,000,000,000,000,000,000,000
6
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
qemuDomainPerfRestart(virDomainObjPtr vm) { size_t i; virDomainDefPtr def = vm->def; qemuDomainObjPrivatePtr priv = vm->privateData; if (!(priv->perf = virPerfNew())) return -1; for (i = 0; i < VIR_PERF_EVENT_LAST; i++) { if (def->perf.events[i] && def->perf.events[i] =...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
57,039,820,678,758,000,000,000,000,000,000,000,000
21
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
TEST_F(ConnectionManagerUtilityTest, NoTraceWhenForcedTracedButGlobalNotSet) { ON_CALL(config_, useRemoteAddress()).WillByDefault(Return(false)); // Internal request, make traceable. TestRequestHeaderMapImpl headers{{"x-forwarded-for", "10.0.0.1"}, {"x-request-id", "125a4afb-6f5...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
74,156,847,473,887,090,000,000,000,000,000,000,000
20
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
const BSONObj& cmdObj() const { return _request->body; }
0
[ "CWE-20" ]
mongo
722f06f3217c029ef9c50062c8cc775966fd7ead
50,635,842,891,762,940,000,000,000,000,000,000,000
3
SERVER-38275 ban find explain with UUID
static void cpu_load_update_idle(struct rq *this_rq) { /* * bail if there's load or we're actually up-to-date. */ if (weighted_cpuload(this_rq)) return; cpu_load_update_nohz(this_rq, READ_ONCE(jiffies), 0); }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
136,227,231,940,072,970,000,000,000,000,000,000,000
10
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
gdm_session_get_display_seat_id (GdmSession *self) { g_return_val_if_fail (GDM_IS_SESSION (self), NULL); return g_strdup (self->priv->display_seat_id); }
0
[]
gdm
5ac224602f1d603aac5eaa72e1760d3e33a26f0a
294,213,906,774,415,370,000,000,000,000,000,000,000
6
session: disconnect signals from worker proxy when conversation is freed We don't want an outstanding reference on the worker proxy to lead to signal handlers getting dispatched after the conversation is freed. https://bugzilla.gnome.org/show_bug.cgi?id=758032
prepare_singleton_class(mrb_state *mrb, struct RBasic *o) { struct RClass *sc, *c; mrb_assert(o->c); if (o->c->tt == MRB_TT_SCLASS) return; sc = MRB_OBJ_ALLOC(mrb, MRB_TT_SCLASS, mrb->class_class); sc->flags |= MRB_FL_CLASS_IS_INHERITED; sc->mt = mt_new(mrb); sc->iv = 0; if (o->tt == MRB_TT_CLASS) { ...
0
[ "CWE-787" ]
mruby
b1d0296a937fe278239bdfac840a3fd0e93b3ee9
258,499,252,096,351,170,000,000,000,000,000,000,000
36
class.c: clear method cache after `remove_method`.
win_new_height(win_T *wp, int height) { int prev_height = wp->w_height; // Don't want a negative height. Happens when splitting a tiny window. // Will equalize heights soon to fix it. if (height < 0) height = 0; if (wp->w_height == height) return; // nothing to do if (wp->w_height > 0)...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
179,814,645,977,681,780,000,000,000,000,000,000,000
32
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
key_ref_t keyring_search(key_ref_t keyring, struct key_type *type, const char *description) { if (!type->match) return ERR_PTR(-ENOKEY); return keyring_search_aux(keyring, current->cred, type, description, type->match); } /* end keyring_search() */
0
[ "CWE-362" ]
linux-2.6
cea7daa3589d6b550546a8c8963599f7c1a3ae5c
207,309,366,319,755,180,000,000,000,000,000,000,000
11
KEYS: find_keyring_by_name() can gain access to a freed keyring find_keyring_by_name() can gain access to a keyring that has had its reference count reduced to zero, and is thus ready to be freed. This then allows the dead keyring to be brought back into use whilst it is being destroyed. The following timeline illus...
int dump_write_kismet_netxml( void ) { int network_number, average_power, client_nbr; int client_max_rate, unused; struct AP_info *ap_cur; struct ST_info *st_cur; char first_time[TIME_STR_LENGTH]; char last_time[TIME_STR_LENGTH]; char * manuf; char * essid = NULL; if (! G.record_dat...
0
[ "CWE-787" ]
aircrack-ng
ff70494dd389ba570dbdbf36f217c28d4381c6b5
318,452,712,867,956,600,000,000,000,000,000,000,000
337
Airodump-ng: Fixed GPS stack overflow (Closes #13 on GitHub). git-svn-id: http://svn.aircrack-ng.org/trunk@2416 28c6078b-6c39-48e3-add9-af49d547ecab
static GF_Err trak_add_sample(GF_ISOFile *movie, GF_TrackBox *trak, const GF_ISOSample *sample, u32 descIndex, u64 data_offset, u32 syncShadowSampleNum) { Bool skip_data = GF_FALSE; GF_Err e; //faststart mode with interleaving time, cache data until we have a full chunk if ((movie->storageMode==GF_ISOM_STORE_FASTS...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
133,277,725,734,267,750,000,000,000,000,000,000,000
54
fixed #1706
dns_zone_setxfrsource6dscp(dns_zone_t *zone, isc_dscp_t dscp) { REQUIRE(DNS_ZONE_VALID(zone)); LOCK_ZONE(zone); zone->xfrsource6dscp = dscp; UNLOCK_ZONE(zone); return (ISC_R_SUCCESS); }
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
298,470,571,686,735,370,000,000,000,000,000,000,000
9
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.
sctp_disposition_t sctp_sf_do_5_2_2_dupinit(const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { /* Call helper to do the real work for both simulataneous and * duplicate INIT chunk handling. */ return sctp_sf_do...
0
[ "CWE-20" ]
linux-2.6
ba0166708ef4da7eeb61dd92bbba4d5a749d6561
273,990,682,911,513,970,000,000,000,000,000,000,000
11
sctp: Fix kernel panic while process protocol violation parameter Since call to function sctp_sf_abort_violation() need paramter 'arg' with 'struct sctp_chunk' type, it will read the chunk type and chunk length from the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen() always with 'struct sctp_paramh...
SYSCALL_DEFINE3(socket, int, family, int, type, int, protocol) { int retval; struct socket *sock; int flags; /* Check the SOCK_* constants for consistency. */ BUILD_BUG_ON(SOCK_CLOEXEC != O_CLOEXEC); BUILD_BUG_ON((SOCK_MAX | SOCK_TYPE_MASK) != SOCK_TYPE_MASK); BUILD_BUG_ON(SOCK_CLOEXEC & SOCK_TYPE_MASK); BUIL...
0
[ "CWE-264" ]
net
4de930efc23b92ddf88ce91c405ee645fe6e27ea
272,416,417,625,720,500,000,000,000,000,000,000,000
36
net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom Cc: stable@vger.kernel.org # v3.19 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
choose_mac(struct ssh *ssh, struct sshmac *mac, char *client, char *server) { char *name = match_list(client, server, NULL); if (name == NULL) return SSH_ERR_NO_MAC_ALG_MATCH; if (mac_setup(mac, name) < 0) return SSH_ERR_INTERNAL_ERROR; /* truncate the key */ if (ssh->compat & SSH_BUG_HMAC) mac->key_len = 1...
0
[ "CWE-522", "CWE-399" ]
openssh-portable
ec165c392ca54317dbe3064a8c200de6531e89ad
73,710,650,330,259,760,000,000,000,000,000,000,000
16
upstream commit Unregister the KEXINIT handler after message has been received. Otherwise an unauthenticated peer can repeat the KEXINIT and cause allocation of up to 128MB -- until the connection is closed. Reported by shilei-c at 360.cn Upstream-ID: 43649ae12a27ef94290db16d1a98294588b75c05
int usbip_vhci_driver_open(void) { udev_context = udev_new(); if (!udev_context) { err("udev_new failed"); return -1; } vhci_driver = calloc(1, sizeof(struct usbip_vhci_driver)); /* will be freed in usbip_driver_close() */ vhci_driver->hc_device = udev_device_new_from_subsystem_sysname(udev_context, ...
0
[ "CWE-200" ]
linux
2f2d0088eb93db5c649d2a5e34a3800a8a935fc5
101,620,075,290,642,200,000,000,000,000,000,000,000
56
usbip: prevent vhci_hcd driver from leaking a socket pointer address When a client has a USB device attached over IP, the vhci_hcd driver is locally leaking a socket pointer address via the /sys/devices/platform/vhci_hcd/status file (world-readable) and in debug output when "usbip --debug port" is run. Fix it to not...
void vrend_fb_bind_texture(struct vrend_resource *res, int idx, uint32_t level, uint32_t layer) { vrend_fb_bind_texture_id(res, res->id, idx, level, layer); }
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
105,815,988,237,500,790,000,000,000,000,000,000,000
6
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
static int load_misc_binary(struct linux_binprm *bprm) { Node *fmt; struct file * interp_file = NULL; char iname[BINPRM_BUF_SIZE]; const char *iname_addr = iname; int retval; int fd_binary = -1; retval = -ENOEXEC; if (!enabled) goto _ret; /* to keep locking time low, we copy the interpreter string */ read...
1
[ "CWE-200" ]
linux-2.6
b66c5984017533316fd1951770302649baf1aa33
161,200,060,903,545,100,000,000,000,000,000,000,000
102
exec: do not leave bprm->interp on stack If a series of scripts are executed, each triggering module loading via unprintable bytes in the script header, kernel stack contents can leak into the command line. Normally execution of binfmt_script and binfmt_misc happens recursively. However, when modules are enabled, and...
int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *ctx) { if (group->meth->mul == 0) /* use default */ return ec_wNAF_mul(group, r, scalar, num, points, scalars, ctx); return group->meth->mul(group, r, scalar, num, ...
0
[ "CWE-320" ]
openssl
8aed2a7548362e88e84a7feb795a3a97e8395008
29,422,549,189,807,484,000,000,000,000,000,000,000
9
Reserve option to use BN_mod_exp_mont_consttime in ECDSA. Submitted by Shay Gueron, Intel Corp. RT: 3149 Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit f54be179aa4cbbd944728771d7d59ed588158a12)
static struct mskwajd_header *kwajd_open(struct mskwaj_decompressor *base, const char *filename) { struct mskwaj_decompressor_p *self = (struct mskwaj_decompressor_p *) base; struct mskwajd_header *hdr; struct mspack_system *sys; struct mspack_file *fh; if (!self) return NULL; sys = self-...
0
[ "CWE-310", "CWE-787" ]
libmspack
0b0ef9344255ff5acfac6b7af09198ac9c9756c8
72,385,441,129,465,590,000,000,000,000,000,000,000
30
kwaj_read_headers(): fix handling of non-terminated strings
static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; if (!(fdctrl->msr & FD_MSR_RQM) || !(fdctrl->msr & FD_MSR_DIO)) { FLOPPY_DPRINTF("error: controller not ready for reading...
0
[ "CWE-787" ]
qemu
defac5e2fbddf8423a354ff0454283a2115e1367
124,716,867,979,922,670,000,000,000,000,000,000,000
64
hw/block/fdc: Prevent end-of-track overrun (CVE-2021-3507) Per the 82078 datasheet, if the end-of-track (EOT byte in the FIFO) is more than the number of sectors per side, the command is terminated unsuccessfully: * 5.2.5 DATA TRANSFER TERMINATION The 82078 supports terminal count explicitly through the TC pin a...
make_text_segment(Node** node, ScanEnv* env) { int r; int i; Node* x; Node* ns[2]; /* \X == (?>\O(?:\Y\O)*) */ ns[1] = NULL_NODE; r = ONIGERR_MEMORY; ns[0] = onig_node_new_anchor(ANCR_NO_TEXT_SEGMENT_BOUNDARY, FALSE); if (IS_NULL(ns[0])) goto err; r = node_new_true_anychar(&ns[1], env); if (r ...
0
[ "CWE-125" ]
oniguruma
aa0188eaedc056dca8374ac03d0177429b495515
186,284,491,549,891,500,000,000,000,000,000,000,000
53
fix #163: heap-buffer-overflow in gb18030_mbc_enc_len
void task_del(void *_task) { GF_FSTask *task = _task; if (!task->notified) gf_free(task); }
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
182,031,154,350,800,300,000,000,000,000,000,000,000
5
fixed crashes for very long path - cf #1908
bool FunctionContext::is_col_constant(int i) const { if (i < 0 || i >= _impl->_constant_cols.size()) { return false; } return _impl->_constant_cols[i] != nullptr; }
0
[ "CWE-200" ]
incubator-doris
246ac4e37aa4da6836b7850cb990f02d1c3725a3
99,152,308,286,785,960,000,000,000,000,000,000,000
6
[fix] fix a bug of encryption function with iv may return wrong result (#8277)
i64 runzip_fd(rzip_control *control, int fd_in, int fd_out, int fd_hist, i64 expected_size) { uchar md5_stored[MD5_DIGEST_SIZE]; struct timeval start,end; i64 total = 0, u; double tdiff; if (!NO_MD5) md5_init_ctx (&control->ctx); gettimeofday(&start,NULL); do { u = runzip_chunk(control, fd_in, expected_siz...
0
[ "CWE-703" ]
lrzip
4b3942103b57c639c8e0f31d6d5fd7bac53bbdf4
258,068,201,383,577,800,000,000,000,000,000,000,000
120
Fix possible race condition between zpaq_decompress_buf() and clear_rulist() function as reported by wcventure.
static void test_do_deinit(void) { dict_deinit(&keys_dict); dict_driver_unregister(&dict_driver_file); oauth2_validation_key_cache_deinit(&key_cache); i_unlink(".keys"); buffer_free(&hs_sign_key); dcrypt_deinitialize(); }
0
[ "CWE-22" ]
core
15682a20d5589ebf5496b31c55ecf9238ff2457b
265,178,856,470,577,330,000,000,000,000,000,000,000
9
lib-oauth2: Do not escape '.' This is not really needed and just makes things difficult.
void rbd_warn(struct rbd_device *rbd_dev, const char *fmt, ...) { struct va_format vaf; va_list args; va_start(args, fmt); vaf.fmt = fmt; vaf.va = &args; if (!rbd_dev) printk(KERN_WARNING "%s: %pV\n", RBD_DRV_NAME, &vaf); else if (rbd_dev->disk) printk(KERN_WARNING "%s: %s: %pV\n", RBD_DRV_NAME, rbd_dev...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
245,727,108,910,776,700,000,000,000,000,000,000,000
25
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...
static void update_stibp_strict(void) { u64 mask = x86_spec_ctrl_base & ~SPEC_CTRL_STIBP; if (sched_smt_active()) mask |= SPEC_CTRL_STIBP; if (mask == x86_spec_ctrl_base) return; pr_info("Update user space SMT mitigation: STIBP %s\n", mask & SPEC_CTRL_STIBP ? "always-on" : "off"); x86_spec_ctrl_base = mas...
0
[]
linux
a2059825986a1c8143fd6698774fa9d83733bb11
149,025,555,899,073,890,000,000,000,000,000,000,000
15
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...
static int inet6_dump_fib(struct sk_buff *skb, struct netlink_callback *cb) { struct net *net = sock_net(skb->sk); unsigned int h, s_h; unsigned int e = 0, s_e; struct rt6_rtnl_dump_arg arg; struct fib6_walker_t *w; struct fib6_table *tb; struct hlist_head *head; int res = 0; s_h = cb->args[0]; s_e = cb->arg...
0
[ "CWE-399" ]
linux
307f2fb95e9b96b3577916e73d92e104f8f26494
113,899,447,715,438,460,000,000,000,000,000,000,000
62
ipv6: only static routes qualify for equal cost multipathing Static routes in this case are non-expiring routes which did not get configured by autoconf or by icmpv6 redirects. To make sure we actually get an ecmp route while searching for the first one in this fib6_node's leafs, also make sure it matches the ecmp ro...
static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { char buffer[MagickPathExtent], cache_filename[MagickPathExtent]; const char *property, *value; MagickBooleanType status; MagickOffsetType offset, scene; register ssize...
0
[ "CWE-772" ]
ImageMagick
53ff6cadfa2051296d3bd67c06a693043222c4d6
157,310,535,161,525,100,000,000,000,000,000,000,000
413
Fixed memory leak reported in #458.
print_tickdevice(struct seq_file *m, struct tick_device *td, int cpu) { struct clock_event_device *dev = td->evtdev; SEQ_printf(m, "Tick Device: mode: %d\n", td->mode); if (cpu < 0) SEQ_printf(m, "Broadcast device\n"); else SEQ_printf(m, "Per CPU device: %d\n", cpu); SEQ_printf(m, "Clock Event Device: ")...
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
215,343,027,121,620,630,000,000,000,000,000,000,000
66
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
static void _progress_coll_tree(pmixp_coll_t *coll) { pmixp_coll_tree_t *tree = &coll->state.tree; int ret = 0; do { switch (tree->state) { case PMIXP_COLL_TREE_SYNC: /* check if any activity was observed */ if (tree->contrib_local || tree->contrib_children) { tree->state = PMIXP_COLL_TREE_COLLECT; ...
0
[ "CWE-120" ]
slurm
c3142dd87e06621ff148791c3d2f298b5c0b3a81
48,094,873,934,635,765,000,000,000,000,000,000,000
37
PMIx - fix potential buffer overflows from use of unpackmem(). CVE-2020-27745.
static int input_dev_resume(struct device *dev) { struct input_dev *input_dev = to_input_dev(dev); spin_lock_irq(&input_dev->event_lock); /* Restore state of LEDs and sounds, if any were active. */ input_dev_toggle(input_dev, true); spin_unlock_irq(&input_dev->event_lock); return 0; }
0
[ "CWE-703", "CWE-787" ]
linux
cb222aed03d798fc074be55e59d9a112338ee784
109,766,239,436,749,990,000,000,000,000,000,000,000
13
Input: add safety guards to input_set_keycode() If we happen to have a garbage in input device's keycode table with values too big we'll end up doing clear_bit() with offset way outside of our bitmaps, damaging other objects within an input device or even outside of it. Let's add sanity checks to the returned old keyc...
nautilus_file_set_metadata (NautilusFile *file, const char *key, const char *default_metadata, const char *metadata) { g_return_if_fail (NAUTILUS_IS_FILE (file)); g_return_if_fail (key != NULL); g_return_if_fail (key[0] != '\0'); nautilus_directory_set_file_metadata (file->details->directory...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
76,228,158,668,632,450,000,000,000,000,000,000,000
16
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-...
static int clone_submodule(const char *path, const char *gitdir, const char *url, const char *depth, struct string_list *reference, int quiet, int progress) { struct child_process cp = CHILD_PROCESS_INIT; argv_array_push(&cp.args, "clone"); argv_array_push(&cp.args, "--no-checkout"); if (quiet) argv_...
0
[ "CWE-88" ]
git
98afac7a7cefdca0d2c4917dd8066a59f7088265
160,870,949,241,049,210,000,000,000,000,000,000,000
33
submodule--helper: use "--" to signal end of clone options When we clone a submodule, we call "git clone $url $path". But there's nothing to say that those components can't begin with a dash themselves, confusing git-clone into thinking they're options. Let's pass "--" to make it clear what we expect. There's no test...
longlong val_int() { return m_value.to_datetime(current_thd).to_longlong(); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
332,728,897,750,898,840,000,000,000,000,000,000,000
4
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
static int nfs4_match_client(struct nfs_client *pos, struct nfs_client *new, struct nfs_client **prev, struct nfs_net *nn) { int status; if (pos->rpc_ops != new->rpc_ops) return 1; if (pos->cl_minorversion != new->cl_minorversion) return 1; /* If "pos" isn't marked ready, we can't trust the * rem...
0
[ "CWE-703" ]
linux
dd99e9f98fbf423ff6d365b37a98e8879170f17c
260,550,718,072,464,240,000,000,000,000,000,000,000
43
NFSv4: Initialise connection to the server in nfs4_alloc_client() Set up the connection to the NFSv4 server in nfs4_alloc_client(), before we've added the struct nfs_client to the net-namespace's nfs_client_list so that a downed server won't cause other mounts to hang in the trunking detection code. Reported-by: Mich...
static void opj_tcd_free_tile(opj_tcd_t *p_tcd) { OPJ_UINT32 compno, resno, bandno, precno; opj_tcd_tile_t *l_tile = 00; opj_tcd_tilecomp_t *l_tile_comp = 00; opj_tcd_resolution_t *l_res = 00; opj_tcd_band_t *l_band = 00; opj_tcd_precinct_t *l_precinct = 00; OPJ_U...
0
[ "CWE-369" ]
openjpeg
8f9cc62b3f9a1da9712329ddcedb9750d585505c
141,512,672,059,872,940,000,000,000,000,000,000,000
81
Fix division by zero Fix uclouvain/openjpeg#733
int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs) { int mmu_reset_needed = 0; int pending_vec, max_bits; struct desc_ptr dt; dt.size = sregs->idt.limit; dt.address = sregs->idt.base; kvm_x86_ops->set_idt(vcpu, &dt); dt.size = sregs->gdt.limit; dt.address = sregs->gdt.base;...
0
[ "CWE-362", "CWE-401" ]
linux
fc3a9157d3148ab91039c75423da8ef97be3e105
169,492,482,108,578,740,000,000,000,000,000,000,000
72
KVM: X86: Don't report L2 emulation failures to user-space This patch prevents that emulation failures which result from emulating an instruction for an L2-Guest results in being reported to userspace. Without this patch a malicious L2-Guest would be able to kill the L1 by triggering a race-condition between an vmexit...
static int ext4_write_info(struct super_block *sb, int type) { int ret, err; handle_t *handle; /* Data block + inode block */ handle = ext4_journal_start(sb->s_root->d_inode, 2); if (IS_ERR(handle)) return PTR_ERR(handle); ret = dquot_commit_info(sb, type); err = ext4_journal_stop(handle); if (!ret) ret = ...
0
[ "CWE-20" ]
linux-2.6
4ec110281379826c5cf6ed14735e47027c3c5765
77,457,691,403,623,330,000,000,000,000,000,000,000
15
ext4: Add sanity checks for the superblock before mounting the filesystem This avoids insane superblock configurations that could lead to kernel oops due to null pointer derefences. http://bugzilla.kernel.org/show_bug.cgi?id=12371 Thanks to David Maciejak at Fortinet's FortiGuard Global Security Research Team who di...
static void nfs4_lock_prepare(struct rpc_task *task, void *calldata) { struct nfs4_lockdata *data = calldata; struct nfs4_state *state = data->lsp->ls_state; dprintk("%s: begin!\n", __func__); if (nfs_wait_on_sequence(data->arg.lock_seqid, task) != 0) goto out_wait; /* Do we need to do an open_to_lock_owner? */...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
194,523,466,442,426,550,000,000,000,000,000,000,000
41
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *inode, gfp_t gfp_flags) { struct fscrypt_ctx *ctx = NULL; struct fscrypt_info *ci = inode->i_crypt_info; unsigned long flags; if (ci == NULL) return ERR_PTR(-ENOKEY); /* * We first try getting the ctx from a free list because in * the common case the ...
0
[ "CWE-416", "CWE-476" ]
linux
1b53cf9815bb4744958d41f3795d5d5a1d365e2d
335,861,612,459,337,500,000,000,000,000,000,000,000
36
fscrypt: remove broken support for detecting keyring key revocation Filesystem encryption ostensibly supported revoking a keyring key that had been used to "unlock" encrypted files, causing those files to become "locked" again. This was, however, buggy for several reasons, the most severe of which was that when key r...
static int sqfs_tokenize(char **tokens, int count, const char *str) { int i, j, ret = 0; char *aux, *strc; strc = strdup(str); if (!strc) return -ENOMEM; if (!strcmp(strc, "/")) { tokens[0] = strdup(strc); if (!tokens[0]) { ret = -ENOMEM; goto free_strc; } } else { for (j = 0; j < count; j++) { ...
0
[ "CWE-787" ]
u-boot
2ac0baab4aff1a0b45067d0b62f00c15f4e86856
188,595,386,109,418,430,000,000,000,000,000,000,000
33
fs/squashfs: sqfs_read: Prevent arbitrary code execution Following Jincheng's report, an out-of-band write leading to arbitrary code execution is possible because on one side the squashfs logic accepts directory names up to 65535 bytes (u16), while U-Boot fs logic accepts directory names up to 255 bytes long. Prevent...
static int root_task_group_empty(void) { return list_empty(&root_task_group.children); }
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
302,769,581,394,732,870,000,000,000,000,000,000,000
4
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...
xfs_attr3_leaf_add_work( struct xfs_buf *bp, struct xfs_attr3_icleaf_hdr *ichdr, struct xfs_da_args *args, int mapindex) { struct xfs_attr_leafblock *leaf; struct xfs_attr_leaf_entry *entry; struct xfs_attr_leaf_name_local *name_loc; struct xfs_attr_leaf_name_remote *name_rmt; struct xfs_mount *mp; int t...
1
[ "CWE-241", "CWE-19" ]
linux
8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59
315,686,191,668,295,860,000,000,000,000,000,000,000
117
xfs: remote attribute overwrite causes transaction overrun Commit e461fcb ("xfs: remote attribute lookups require the value length") passes the remote attribute length in the xfs_da_args structure on lookup so that CRC calculations and validity checking can be performed correctly by related code. This, unfortunately h...
void DDGifSlurp(GifInfo *info, bool decode, bool exitAfterFrame) { GifRecordType RecordType; GifByteType *ExtData; int ExtFunction; GifFileType *gifFilePtr; gifFilePtr = info->gifFilePtr; uint_fast32_t lastAllocatedGCBIndex = 0; do { if (DGifGetRecordType(gifFilePtr, &RecordType) == GIF_ERROR) { break; } ...
0
[ "CWE-415" ]
android-gif-drawable
cc5b4f8e43463995a84efd594f89a21f906c2d20
203,981,670,932,970,200,000,000,000,000,000,000,000
140
Do not realloc array if new raster size is 0. if realloc() is called with 0 size it may return NULL and this will be incorrectly handled as not enough memory and (also) rasterBits will be freed by realloc but we will not update it.
static int hidp_session_start_sync(struct hidp_session *session) { unsigned int vendor, product; if (session->hid) { vendor = session->hid->vendor; product = session->hid->product; } else if (session->input) { vendor = session->input->id.vendor; product = session->input->id.product; } else { vendor = 0...
0
[ "CWE-843" ]
linux
51bda2bca53b265715ca1852528f38dc67429d9a
69,052,441,060,165,280,000,000,000,000,000,000,000
26
Bluetooth: hidp_connection_add() unsafe use of l2cap_pi() it's OK after we'd verified the sockets, but not before that. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
static void komeda_wb_connector_destroy(struct drm_connector *connector) { drm_connector_cleanup(connector); kfree(to_kconn(to_wb_conn(connector))); }
0
[ "CWE-401" ]
linux
a0ecd6fdbf5d648123a7315c695fb6850d702835
288,683,565,455,006,100,000,000,000,000,000,000,000
5
drm/komeda: prevent memory leak in komeda_wb_connector_add In komeda_wb_connector_add if drm_writeback_connector_init fails the allocated memory for kwb_conn should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com> Sig...
static void log_irqs(u32 evt) { if (likely(!(param_debug & (OHCI_PARAM_DEBUG_IRQS | OHCI_PARAM_DEBUG_BUSRESETS)))) return; if (!(param_debug & OHCI_PARAM_DEBUG_IRQS) && !(evt & OHCI1394_busReset)) return; fw_notify("IRQ %08x%s%s%s%s%s%s%s%s%s%s%s%s%s\n", evt, evt & OHCI1394_selfIDComplete ? " self...
0
[ "CWE-399" ]
linux-2.6
8c0c0cc2d9f4c523fde04bdfe41e4380dec8ee54
334,637,107,484,628,440,000,000,000,000,000,000,000
31
firewire: ohci: handle receive packets with a data length of zero Queueing to receive an ISO packet with a payload length of zero silently does nothing in dualbuffer mode, and crashes the kernel in packet-per-buffer mode. Return an error in dualbuffer mode, because the DMA controller won't let us do what we want, and...
void ioat_kobject_del(struct ioatdma_device *device) { struct dma_device *dma = &device->common; struct dma_chan *c; list_for_each_entry(c, &dma->channels, device_node) { struct ioat_chan_common *chan = to_chan_common(c); if (!test_bit(IOAT_KOBJ_INIT_FAIL, &chan->state)) { kobject_del(&chan->kobj); kobje...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
92,584,191,522,679,210,000,000,000,000,000,000,000
14
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
get_execution_context_addr (void) { MonoDomain *domain = mono_domain_get (); guint32 offset; if (!execution_context_field) { execution_context_field = mono_class_get_field_from_name (mono_defaults.thread_class, "_ec"); g_assert (execution_context_field); } g_assert (mono_class_try_get_vtable (domain, mon...
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
110,738,517,382,724,860,000,000,000,000,000,000,000
20
Fix access to freed members of a dead thread * threads.c: Fix access to freed members of a dead thread. Found and fixed by Rodrigo Kumpera <rkumpera@novell.com> Ref: CVE-2011-0992
dissect_kafka_regular_string(proto_tree *tree, int hf_item, tvbuff_t *tvb, packet_info *pinfo, int offset, int *p_offset, int *p_length) { gint16 length; proto_item *pi; length = (gint16) tvb_get_ntohs(tvb, offset); if (length < -1) { pi = proto_tree_add_item(tree, hf_item,...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
180,289,835,122,834,640,000,000,000,000,000,000,000
34
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
static int __dev_open(struct net_device *dev) { const struct net_device_ops *ops = dev->netdev_ops; int ret; ASSERT_RTNL(); if (!netif_device_present(dev)) return -ENODEV; /* Block netpoll from trying to do any rx path servicing. * If we don't do this there is a chance ndo_poll_controller * or ndo_poll ma...
1
[]
linux
7bced397510ab569d31de4c70b39e13355046387
52,150,801,559,702,760,000,000,000,000,000,000,000
43
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
static int get_v4l2_ext_controls32(struct file *file, struct v4l2_ext_controls __user *kp, struct v4l2_ext_controls32 __user *up, void __user *aux_buf, u32 aux_space) { struct v4l2_ext_control32 __user *ucontrols; struct v4l2_ext_control __user *kcontrols; u32 count; u32 n; compat_caddr_t p; ...
0
[ "CWE-787" ]
linux
a1dfb4c48cc1e64eeb7800a27c66a6f7e88d075a
234,331,269,468,069,040,000,000,000,000,000,000,000
58
media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic The 32-bit compat v4l2 ioctl handling is implemented based on its 64-bit equivalent. It converts 32-bit data structures into its 64-bit equivalents and needs to provide the data to the 64-bit ioctl in user space memory which is commonly allocated using compat...
void dump_print( int ws_row, int ws_col, int if_num ) { time_t tt; struct tm *lt; int nlines, i, n, len; char strbuf[512]; char buffer[512]; char ssid_list[512]; struct AP_info *ap_cur; struct ST_info *st_cur; struct NA_info *na_cur; int columns_ap = 83; int columns_sta = 74;...
0
[ "CWE-787" ]
aircrack-ng
ff70494dd389ba570dbdbf36f217c28d4381c6b5
229,496,171,833,148,180,000,000,000,000,000,000,000
581
Airodump-ng: Fixed GPS stack overflow (Closes #13 on GitHub). git-svn-id: http://svn.aircrack-ng.org/trunk@2416 28c6078b-6c39-48e3-add9-af49d547ecab
*/ int init_dummy_netdev(struct net_device *dev) { /* Clear everything. Note we don't initialize spinlocks * are they aren't supposed to be taken by any of the * NAPI code and this dummy netdev is supposed to be * only ever used for NAPI polls */ memset(dev, 0, sizeof(struct net_device)); /* make sure we B...
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
244,185,684,305,647,700,000,000,000,000,000,000,000
28
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...
mapping_readimage(ImagingMapperObject* mapper, PyObject* args) { int y, size; Imaging im; char* mode; int xsize; int ysize; int stride; int orientation; if (!PyArg_ParseTuple(args, "s(ii)ii", &mode, &xsize, &ysize, &stride, &orientation)) return NULL; ...
0
[ "CWE-190" ]
Pillow
c50ebe6459a131a1ea8ca531f10da616d3ceaa0f
14,497,344,319,239,993,000,000,000,000,000,000,000
52
Map.c overflow fixes
gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, int bgcolor) { const int angle_rounded = (int)floor(angle * 100); if (bgcolor < 0) { return NULL; } /* impact perf a bit, but not that much. Implementation for palette images can be done at a later point. */ if (src->trueColor =...
1
[ "CWE-119" ]
php-src
4bb422343f29f06b7081323844d9b52e1a71e4a5
42,748,227,609,674,860,000,000,000,000,000,000,000
50
Fix bug #70976: fix boundary check on gdImageRotateInterpolated
create_input_type(agooErr err) { gqlType type; gqlType type_type; gqlType type_nn; gqlType string_nn; if (NULL == (type = gql_type_create(err, "__InputValue", NULL, 0, NULL)) || NULL == (string_nn = gql_assure_nonnull(err, &gql_string_type)) || NULL == (type_type = gql_assure_type(err, "__Type")...
0
[ "CWE-703" ]
agoo
ecb72fa66f3d846b724b4fa1d7648669cebabe0c
99,638,242,733,305,280,000,000,000,000,000,000,000
23
Protect against recursive fragment in schema Really a error on the developers part but this catches the error.
static int ffs_set_inst_name(struct usb_function_instance *fi, const char *name) { struct f_fs_opts *opts; char *ptr; const char *tmp; int name_len, ret; name_len = strlen(name) + 1; if (name_len > MAX_INST_NAME_LEN) return -ENAMETOOLONG; ptr = kstrndup(name, name_len, GFP_KERNEL); if (!ptr) return -ENOME...
0
[ "CWE-416", "CWE-362" ]
linux
38740a5b87d53ceb89eb2c970150f6e94e00373a
168,444,236,654,865,900,000,000,000,000,000,000,000
35
usb: gadget: f_fs: Fix use-after-free When using asynchronous read or write operations on the USB endpoints the issuer of the IO request is notified by calling the ki_complete() callback of the submitted kiocb when the URB has been completed. Calling this ki_complete() callback will free kiocb. Make sure that the str...
static struct io_wq *io_init_wq_offload(struct io_ring_ctx *ctx, struct task_struct *task) { struct io_wq_hash *hash; struct io_wq_data data; unsigned int concurrency; hash = ctx->hash_map; if (!hash) { hash = kzalloc(sizeof(*hash), GFP_KERNEL); if (!hash) return ERR_PTR(-ENOMEM); refcount_set(&has...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
309,652,124,003,966,160,000,000,000,000,000,000,000
27
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
snmpPortOpened(const Comm::ConnectionPointer &conn, int) { if (!Comm::IsConnOpen(conn)) fatalf("Cannot open SNMP %s Port",(conn->fd == snmpIncomingConn->fd?"receiving":"sending")); Comm::SetSelect(conn->fd, COMM_SELECT_READ, snmpHandleUdp, NULL, 0); if (conn->fd == snmpIncomingConn->fd) de...
0
[ "CWE-772" ]
squid
983c5c36e5f109512ed1af38a329d0b5d0967498
34,619,902,648,607,130,000,000,000,000,000,000,000
14
Fix memory leak when parsing SNMP packet (#313) SNMP queries denied by snmp_access rules and queries with certain unsupported SNMPv2 commands were leaking a few hundred bytes each. Such queries trigger "SNMP agent query DENIED from..." WARNINGs in cache.log.
unlink_free_heap_page(mrb_gc *gc, mrb_heap_page *page) { if (page->free_prev) page->free_prev->free_next = page->free_next; if (page->free_next) page->free_next->free_prev = page->free_prev; if (gc->free_heaps == page) gc->free_heaps = page->free_next; page->free_prev = NULL; page->free_next = NUL...
0
[ "CWE-415" ]
mruby
97319697c8f9f6ff27b32589947e1918e3015503
329,303,304,163,478,220,000,000,000,000,000,000,000
11
Cancel 9cdf439 Should not free the pointer in `realloc` since it can cause use-after-free problem.
const Type_handler *type_handler() const { return &type_handler_timestamp; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
234,721,974,587,177,850,000,000,000,000,000,000,000
1
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...
p11_rpc_buffer_add_mechanism (p11_buffer *buffer, const CK_MECHANISM *mech) { p11_rpc_mechanism_serializer *serializer = NULL; size_t i; /* The mechanism type */ p11_rpc_buffer_add_uint32 (buffer, mech->mechanism); if (mechanism_has_no_parameters (mech->mechanism)) { p11_rpc_buffer_add_byte_array (buffer, NULL...
0
[ "CWE-787" ]
p11-kit
2617f3ef888e103324a28811886b99ed0a56346d
105,144,031,392,317,040,000,000,000,000,000,000,000
27
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.
char *i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *method, ASN1_ENUMERATED *a) { BIGNUM *bntmp = NULL; char *strtmp = NULL; if(!a) return NULL; if(!(bntmp = ASN1_ENUMERATED_to_BN(a, NULL)) || !(strtmp = BN_bn2dec(bntmp)) ) X509V3err(X509V3_F_I2S_ASN1_ENUMERATED,ERR_R_MALLOC_FAILURE); BN_free(bntmp); return strtm...
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
10,861,883,603,188,630,000,000,000,000,000,000,000
11
New functions to check a hostname email or IP address against a certificate. Add options to s_client, s_server and x509 utilities to print results of checks.
my_gnutls_read (gnutls_transport_ptr_t ptr, void *buffer, size_t size) { my_socket_t sock = ptr; #if USE_NPTH return npth_read (sock->fd, buffer, size); #else return read (sock->fd, buffer, size); #endif }
0
[ "CWE-352" ]
gnupg
4a4bb874f63741026bd26264c43bb32b1099f060
242,255,120,912,404,380,000,000,000,000,000,000,000
9
dirmngr: Avoid possible CSRF attacks via http redirects. * dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path. (http_redir_info_t): New. * dirmngr/http.c (do_parse_uri): Set new fields. (same_host_p): New. (http_prepare_redirect): New. * dirmngr/t-http-basic.c: New test. * dirmngr/ks-engine-hkp.c (send_re...
int xen_netbk_must_stop_queue(struct xenvif *vif) { if (!xen_netbk_rx_ring_full(vif)) return 0; vif->rx.sring->req_event = vif->rx_req_cons_peek + max_required_rx_slots(vif); mb(); /* request notification /then/ check the queue */ return xen_netbk_rx_ring_full(vif); }
0
[ "CWE-399" ]
linux
7d5145d8eb2b9791533ffe4dc003b129b9696c48
185,696,871,074,723,100,000,000,000,000,000,000,000
11
xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop. Signed-off-by: Matthew Daley <mattjd@gmail.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jan Beulich <JBeulich@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static int fts3TruncateSegment( Fts3Table *p, /* FTS3 table handle */ sqlite3_int64 iAbsLevel, /* Absolute level of segment to modify */ int iIdx, /* Index within level of segment to modify */ const char *zTerm, /* Remove terms smaller than this */ i...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
269,992,542,435,239,830,000,000,000,000,000,000,000
75
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
lyd_wd_leaflist_cleanup(struct ly_set *set, struct unres_data *unres) { unsigned int i; assert(set); /* if there is an instance without the dflt flag, we have to * remove all instances with the flag - an instance could be * explicitely added, so the default leaflists were invalidated */ for ...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
203,803,780,889,774,400,000,000,000,000,000,000,000
29
schema tree BUGFIX do not check features while still resolving schema Fixes #723
find_all_by_keyword(smartlist_t *s, directory_keyword k) { smartlist_t *out = NULL; SMARTLIST_FOREACH(s, directory_token_t *, t, if (t->tp == k) { if (!out) out = smartlist_new(); smartlist_add(out, t); }); ...
0
[ "CWE-119" ]
tor
d978216dea6b21ac38230a59d172139185a68dbd
87,513,489,856,808,520,000,000,000,000,000,000,000
11
Fix parsing bug with unecognized token at EOS In get_token(), we could read one byte past the end of the region. This is only a big problem in the case where the region itself is (a) potentially hostile, and (b) not explicitly nul-terminated. This patch fixes the underlying bug, and also makes sure that the one remai...
AlgorithmEnum* ZRtp::findBestAuthLen(ZrtpPacketHello *hello) { int i; int ii; int numAlgosOffered; AlgorithmEnum* algosOffered[ZrtpConfigure::maxNoOfAlgos+2]; int numAlgosConf; AlgorithmEnum* algosConf[ZrtpConfigure::maxNoOfAlgos+2]; int num = hello->getNumAuth(); if (num == 0) { ...
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
274,865,122,806,196,400,000,000,000,000,000,000,000
40
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
TEST(GetComputedPathsTest, ExpressionFieldPathDoesNotCountAsRenameWhenUsingRemoveBuiltin) { intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest()); auto expr = ExpressionFieldPath::parse(expCtx, "$$REMOVE", expCtx->variablesParseState); auto computedPaths = expr->getComputedPaths("a"...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
149,009,734,406,916,200,000,000,000,000,000,000,000
8
SERVER-38070 fix infinite loop in agg expression
int agcontains(Agraph_t* g, void* obj) { Agraph_t* subg; if (agroot (g) != agroot (obj)) return 0; switch (AGTYPE(obj)) { case AGRAPH: subg = (Agraph_t *) obj; do { if (subg == g) return 1; } while ((subg = agparent (subg))); return 0; case AGNODE: return (agidnode(g, AGID(obj), 0...
0
[ "CWE-476" ]
graphviz
839085f8026afd6f6920a0c31ad2a9d880d97932
138,249,190,083,465,800,000,000,000,000,000,000,000
18
attempted fix for null pointer deference on malformed input
TEST_P(Http2CodecImplFlowControlTest, FlowControlPendingRecvData) { initialize(); MockStreamCallbacks callbacks; TestRequestHeaderMapImpl request_headers; HttpTestUtility::addDefaultHeaders(request_headers); TestRequestHeaderMapImpl expected_headers; HttpTestUtility::addDefaultHeaders(expected_headers); ...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
55,058,309,093,711,750,000,000,000,000,000,000,000
21
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
on_rehandshake_finish (GObject *object, GAsyncResult *res, gpointer user_data) { TestConnection *test = user_data; GError *error = NULL; GOutputStream *stream; g_tls_connection_handshake_finish (G_TLS_CONNECTION (object), res, &error); g_assert_no...
0
[ "CWE-295" ]
glib-networking
29513946809590c4912550f6f8620468f9836d94
188,072,521,023,305,480,000,000,000,000,000,000,000
17
Return bad identity error if identity is unset When the server-identity property of GTlsClientConnection is unset, the documentation sasy we need to fail the certificate verification with G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise, it's easy for applications to fail to specify server identity....
static void WarnPatented(gs_font_type42 *pfont, ttfFont *ttf, const char *txt) { if (!ttf->design_grid) { char buf[gs_font_name_max + 1]; int l; gs_font_type42 *base_font = pfont; while ((gs_font_type42 *)base_font->base != base_font) base_font = (gs_font_type42 *)base_f...
0
[ "CWE-125" ]
ghostpdl
937ccd17ac65935633b2ebc06cb7089b91e17e6b
72,741,516,774,065,030,000,000,000,000,000,000,000
21
Bug 698056: make bounds check in gx_ttfReader__Read more robust
static void kvm_resume(void) { if (kvm_usage_count) { WARN_ON(raw_spin_is_locked(&kvm_count_lock)); hardware_enable_nolock(NULL); } }
0
[ "CWE-416", "CWE-362" ]
linux
cfa39381173d5f969daf43582c95ad679189cbc9
229,299,835,882,750,170,000,000,000,000,000,000,000
7
kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974) kvm_ioctl_create_device() does the following: 1. creates a device that holds a reference to the VM object (with a borrowed reference, the VM's refcount has not been bumped yet) 2. initializes the device 3. transfers the reference to the device t...
static int dev_ifsioc(unsigned int fd, unsigned int cmd, unsigned long arg) { struct ifreq ifr; struct ifreq32 __user *uifr32; struct ifmap32 __user *uifmap32; mm_segment_t old_fs; int err; uifr32 = compat_ptr(arg); uifmap32 = &uifr32->ifr_ifru.ifru_map; switch (cmd) { case SIOCSIFMAP: err = copy_from_user...
0
[]
linux-2.6
188f83dfe0eeecd1427d0d255cc97dbf7ef6b4b7
332,170,751,520,559,200,000,000,000,000,000,000,000
67
[PATCH] BLOCK: Move the msdos device ioctl compat stuff to the msdos driver [try #6] Move the msdos device ioctl compat stuff from fs/compat_ioctl.c to the msdos driver so that the msdos header file doesn't need to be included. Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel...
static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, unsigned long address, unsigned int *flags, int *nonblocking) { unsigned int fault_flags = 0; int ret; /* mlock all present pages, but do not fault in new pages */ if ((*flags & (FOLL_POPULATE | FOLL_MLOCK)) == FOLL_MLOCK) return -ENO...
0
[ "CWE-362" ]
linux
19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619
41,978,795,389,059,016,000,000,000,000,000,000,000
64
mm: remove gup_flags FOLL_WRITE games from __get_user_pages() This is an ancient bug that was actually attempted to be fixed once (badly) by me eleven years ago in commit 4ceb5db9757a ("Fix get_user_pages() race for write access") but that was then undone due to problems on s390 by commit f33ea7f404e5 ("fix get_user_p...
test_full_context (void) { g_autoptr(FlatpakBwrap) bwrap = flatpak_bwrap_new (NULL); g_autoptr(FlatpakContext) context = flatpak_context_new (); g_autoptr(FlatpakExports) exports = NULL; g_autoptr(GError) error = NULL; g_autoptr(GKeyFile) keyfile = g_key_file_new (); g_autofree gchar *text = NULL; g_auto(...
0
[ "CWE-74" ]
flatpak
4108e022452303093d8b90c838695a0476cb09c7
115,914,806,135,434,230,000,000,000,000,000,000,000
308
context: Add --unset-env option and a corresponding override This follows up from GHSA-4ppf-fxf6-vxg2 to fix missing functionality that I noticed while resolving that vulnerability, but is not required for fixing the vulnerability. Signed-off-by: Simon McVittie <smcv@collabora.com>
int imap_read_headers (IMAP_DATA* idata, unsigned int msn_begin, unsigned int msn_end) { CONTEXT* ctx; char *hdrreq = NULL; FILE *fp; char tempfile[_POSIX_PATH_MAX]; int msgno, idx; IMAP_HEADER h; IMAP_STATUS* status; int rc, mfhrc = 0, oldmsgcount; int fetch_msn_end = 0; unsigned int maxuid = 0; ...
0
[ "CWE-787" ]
mutt
3287534daa3beac68e2e83ca4b4fe8a3148ff870
126,608,546,297,268,800,000,000,000,000,000,000,000
359
Don't overflow tmp in msg_parse_fetch. Ensure INTERNALDATE and RFC822.SIZE field sizes fit temp buffer. Thanks to Jeriko One for the bug report and patch, which this patch is based upon.
static void add_load_option(DYNAMIC_STRING *str, const char *option, const char *option_value) { if (!option_value) { /* Null value means we don't add this option. */ return; } dynstr_append_checked(str, option); if (strncmp(option_value, "0x", sizeof("0x")-1) == 0) ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
25,155,889,672,725,320,000,000,000,000,000,000,000
22
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static CImg<floatT> plane3d(CImgList<tf>& primitives, const float size_x=100, const float size_y=100, const unsigned int subdivisions_x=10, const unsigned int subdivisions_y=10) { primitives.assign(); if (!subdivisions_x || !subdivisions_y)...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
52,517,594,133,074,610,000,000,000,000,000,000,000
16
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
xmlSchemaInternalErr(xmlSchemaAbstractCtxtPtr actxt, const char *funcName, const char *message) { xmlSchemaInternalErr2(actxt, funcName, message, NULL, NULL); }
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
230,598,619,106,996,970,000,000,000,000,000,000,000
6
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 void __init sun4i_apb1_clk_setup(struct device_node *node) { sunxi_factors_clk_setup(node, &sun4i_apb1_data); }
0
[ "CWE-476" ]
linux
fcdf445ff42f036d22178b49cf64e92d527c1330
313,478,365,784,048,800,000,000,000,000,000,000,000
4
clk-sunxi: fix a missing-check bug in sunxi_divs_clk_setup() In sunxi_divs_clk_setup(), 'derived_name' is allocated by kstrndup(). It returns NULL when fails. 'derived_name' should be checked. Signed-off-by: Gen Zhang <blackgod016574@gmail.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
void CLASS kodak_rgb_load_raw() { short buf[768], *bp; int row, col, len, c, i, rgb[3], ret; ushort *ip = image[0]; for (row = 0; row < height; row++) { #ifdef LIBRAW_LIBRARY_BUILD checkCancel(); #endif for (col = 0; col < width; col += 256) { len = MIN(256, width - col); ret = kodak_...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
323,775,194,629,296,030,000,000,000,000,000,000,000
28
Secunia SA75000 advisory: several buffer overruns
void vrend_renderer_blit(struct vrend_context *ctx, uint32_t dst_handle, uint32_t src_handle, const struct pipe_blit_info *info) { struct vrend_resource *src_res, *dst_res; src_res = vrend_renderer_ctx_res_lookup(ctx, src_handle); dst_res = vrend_renderer_ctx_r...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
151,354,440,870,273,620,000,000,000,000,000,000,000
79
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
desktop_dir_changed_callback (gpointer callback_data) { desktop_dir_changed (); }
0
[]
nautilus
a0f7bb5f2e9af8ecb463b13da834fa8559b0a481
97,438,740,226,518,230,000,000,000,000,000,000,000
4
Use $XDG_DATA_HOME/.converted-launchers as marker for one-time desktop 2009-02-25 Alexander Larsson <alexl@redhat.com> * src/nautilus-application.c: Use $XDG_DATA_HOME/.converted-launchers as marker for one-time desktop file trust operation. * libnautilus-private/nautilus-file-utilities.[ch]: Ad...
_rsvg_node_text_type_children (RsvgNode * self, RsvgDrawingCtx * ctx, gdouble * x, gdouble * y, gboolean * lastwasspace) { guint i; rsvg_push_discrete_layer (ctx); for (i = 0; i < self->children->len; i++) { RsvgNode *node = g_ptr_array_index (self->children, i); ...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
18,821,026,417,852,450,000,000,000,000,000,000,000
27
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
Bool gf_isom_has_cenc_sample_group(GF_ISOFile *the_file, u32 trackNumber) { GF_TrackBox *trak; u32 i, count; trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak) return GF_FALSE; if (!trak->Media->information->sampleTable->sampleGroups) return GF_FALSE; count = gf_list_count(trak->Media->inform...
0
[ "CWE-787" ]
gpac
f0a41d178a2dc5ac185506d9fa0b0a58356b16f7
115,826,383,056,100,580,000,000,000,000,000,000,000
18
fixed #2120
opj_pi_iterator_t *opj_pi_create_decode(opj_image_t *p_image, opj_cp_t *p_cp, OPJ_UINT32 p_tile_no) { /* loop */ OPJ_UINT32 pino; OPJ_UINT32 compno, resno; /* to store w, h, dx and dy fro all components and resolutions */ OPJ_UINT32 * l_tmp_data; OPJ_UINT32 ** l_tmp_ptr; /* encoding pramete...
1
[ "CWE-190", "CWE-125", "CWE-703", "CWE-787" ]
openjpeg
ef01f18dfc6780b776d0674ed3e7415c6ef54d24
102,080,190,404,657,720,000,000,000,000,000,000,000
203
Cast to size_t before multiplication Need to cast to size_t before multiplication otherwise overflow check is useless.
static void lxc_proc_put_context_info(struct lxc_proc_context_info *ctx) { if (ctx->lsm_label) free(ctx->lsm_label); if (ctx->container) lxc_container_put(ctx->container); free(ctx); }
0
[ "CWE-17" ]
lxc
15ec0fd9d490dd5c8a153401360233c6ee947c24
337,865,789,489,470,260,000,000,000,000,000,000,000
8
CVE-2015-1334: Don't use the container's /proc during attach A user could otherwise over-mount /proc and prevent the apparmor profile or selinux label from being written which combined with a modified /bin/sh or other commonly used binary would lead to unconfined code execution. Reported-by: Roman Fiedler Signed-off-...
int kill_pid_usb_asyncio(int sig, int errno, sigval_t addr, struct pid *pid, const struct cred *cred) { struct kernel_siginfo info; struct task_struct *p; unsigned long flags; int ret = -EINVAL; clear_siginfo(&info); info.si_signo = sig; info.si_errno = errno; info.si_code = SI_ASYNCIO; *((sigval_t *)&inf...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
11,618,671,393,821,662,000,000,000,000,000,000,000
42
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
file_compare_by_parent_uri (NautilusFile *file_a, NautilusFile *file_b) { char *parent_uri_a, *parent_uri_b; int ret; parent_uri_a = nautilus_file_get_parent_uri (file_a); parent_uri_b = nautilus_file_get_parent_uri (file_b); ret = strcmp (parent_uri_a, parent_uri_b); ...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
271,120,268,723,070,700,000,000,000,000,000,000,000
16
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
DLLEXPORT char *tjGetErrorStr(void) { return errStr; }
0
[ "CWE-787" ]
libjpeg-turbo
3d9c64e9f8aa1ee954d1d0bb3390fc894bb84da3
262,616,912,909,685,130,000,000,000,000,000,000,000
4
tjLoadImage(): Fix int overflow/segfault w/big BMP Fixes #304
BSONObj spec() { return BSON("$lte" << BSON_ARRAY(1 << 0)); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
326,963,323,714,272,960,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
static PHP_FUNCTION(bzread) { zval *bz; long len = 1024; php_stream *stream; if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &bz, &len)) { RETURN_FALSE; } php_stream_from_zval(stream, &bz); if ((len + 1) < 1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "length may not be negative...
1
[ "CWE-787" ]
php-src
f3feddb5b45b5abd93abb1a95044b7e099d51c84
195,691,925,069,169,760,000,000,000,000,000,000,000
29
Partial fix for bug #72613 - do not treat negative returns from bz2 as size_t
struct dst_entry *icmp6_dst_alloc(struct net_device *dev, struct flowi6 *fl6) { struct dst_entry *dst; struct rt6_info *rt; struct inet6_dev *idev = in6_dev_get(dev); struct net *net = dev_net(dev); if (unlikely(!idev)) return ERR_PTR(-ENODEV); rt = ip6_dst_alloc(net, dev, 0, NULL); if (unlikely(!rt)) ...
0
[ "CWE-119" ]
net
c88507fbad8055297c1d1e21e599f46960cbee39
227,045,755,969,125,350,000,000,000,000,000,000,000
39
ipv6: don't set DST_NOCOUNT for remotely added routes DST_NOCOUNT should only be used if an authorized user adds routes locally. In case of routes which are added on behalf of router advertisments this flag must not get used as it allows an unlimited number of routes getting added remotely. Signed-off-by: Sabrina Dub...
static inline pmd_t pmd_mkhuge(pmd_t pmd) { return pmd_set_flags(pmd, _PAGE_PSE); }
0
[ "CWE-119", "CWE-787" ]
linux
027ef6c87853b0a9df53175063028edb4950d476
249,325,552,772,048,320,000,000,000,000,000,000,000
4
mm: thp: fix pmd_present for split_huge_page and PROT_NONE with THP In many places !pmd_present has been converted to pmd_none. For pmds that's equivalent and pmd_none is quicker so using pmd_none is better. However (unless we delete pmd_present) we should provide an accurate pmd_present too. This will avoid the ri...