func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
int usb_get_configuration(struct usb_device *dev) { struct device *ddev = &dev->dev; int ncfg = dev->descriptor.bNumConfigurations; int result = 0; unsigned int cfgno, length; unsigned char *bigbuffer; struct usb_config_descriptor *desc; cfgno = 0; result = -ENOMEM; if (ncfg > USB_MAXCONFIG) { dev_warn(ddev...
0
[ "CWE-125" ]
linux
1c0edc3633b56000e18d82fc241e3995ca18a69e
272,356,970,091,343,880,000,000,000,000,000,000,000
103
USB: core: fix out-of-bounds access bug in usb_get_bos_descriptor() Andrey used the syzkaller fuzzer to find an out-of-bounds memory access in usb_get_bos_descriptor(). The code wasn't checking that the next usb_dev_cap_header structure could fit into the remaining buffer space. This patch fixes the error and also r...
ref_param_read_typed(gs_param_list * plist, gs_param_name pkey, gs_param_typed_value * pvalue) { iparam_list *const iplist = (iparam_list *) plist; iparam_loc loc; ref elt; int code = ref_param_read(iplist, pkey, &loc, -1); if (code != 0) return code; switch (r_type...
0
[]
ghostpdl
bfa6b2ecbe48edc69a7d9d22a12419aed25960b8
125,864,629,612,989,200,000,000,000,000,000,000,000
103
Bug 697548: use the correct param list enumerator When we encountered dictionary in a ref_param_list, we were using the enumerator for the "parent" param_list, rather than the enumerator for the param_list we just created for the dictionary. That parent was usually the stack list enumerator, and caused a segfault. Us...
int trace_pid_write(struct trace_pid_list *filtered_pids, struct trace_pid_list **new_pid_list, const char __user *ubuf, size_t cnt) { struct trace_pid_list *pid_list; struct trace_parser parser; unsigned long val; int nr_pids = 0; ssize_t read = 0; ssize_t ret = 0; loff_t pos; pid_t pid; if (trac...
0
[ "CWE-416" ]
linux
15fab63e1e57be9fdb5eec1bbc5916e9825e9acb
323,423,396,684,891,760,000,000,000,000,000,000,000
91
fs: prevent page refcount overflow in pipe_buf_get Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All callers converted to handle a failure. Reported-by:...
static int sfb_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old, struct netlink_ext_ack *extack) { struct sfb_sched_data *q = qdisc_priv(sch); if (new == NULL) new = &noop_qdisc; *old = qdisc_replace(sch, new, &q->qdisc); return 0; }
0
[ "CWE-330" ]
linux
55667441c84fa5e0911a0aac44fb059c15ba6da2
113,118,060,392,685,370,000,000,000,000,000,000,000
11
net/flow_dissector: switch to siphash UDP IPv6 packets auto flowlabels are using a 32bit secret (static u32 hashrnd in net/core/flow_dissector.c) and apply jhash() over fields known by the receivers. Attackers can easily infer the 32bit secret and use this information to identify a device and/or user, since this 32bi...
static void unbind_rdev_from_array(struct md_rdev *rdev) { char b[BDEVNAME_SIZE]; bd_unlink_disk_holder(rdev->bdev, rdev->mddev->gendisk); list_del_rcu(&rdev->same_set); printk(KERN_INFO "md: unbind<%s>\n", bdevname(rdev->bdev,b)); rdev->mddev = NULL; sysfs_remove_link(&rdev->kobj, "block"); sysfs_put(rdev->sys...
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
88,428,740,940,983,500,000,000,000,000,000,000,000
21
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
evbuffer_reserve_space(struct evbuffer *buf, ev_ssize_t size, struct evbuffer_iovec *vec, int n_vecs) { struct evbuffer_chain *chain, **chainp; int n = -1; EVBUFFER_LOCK(buf); if (buf->freeze_end) goto done; if (n_vecs < 1) goto done; if (n_vecs == 1) { if ((chain = evbuffer_expand_singlechain(buf, siz...
0
[ "CWE-189" ]
libevent
841ecbd96105c84ac2e7c9594aeadbcc6fb38bc4
243,217,282,030,025,970,000,000,000,000,000,000,000
31
Fix CVE-2014-6272 in Libevent 2.1 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
static void mpeg4_load_default_matrices(MpegEncContext *s) { int i, v; /* load default matrices */ for (i = 0; i < 64; i++) { int j = s->idsp.idct_permutation[i]; v = ff_mpeg4_default_intra_matrix[i]; s->intra_matrix[j] = v; s->chroma_intra_matrix[j] = v; v =...
0
[ "CWE-476" ]
FFmpeg
2aa9047486dbff12d9e040f917e5f799ed2fd78b
114,936,822,872,794,470,000,000,000,000,000,000,000
16
avcodec/mpeg4videodec: Check read profile before setting it Fixes: null pointer dereference Fixes: ffmpeg_crash_7.avi Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
bool empty() const override { return header_map_->empty(); }
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
321,058,873,417,016,900,000,000,000,000,000,000,000
1
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
PHP_METHOD(Phar, addFile) { char *fname, *localname = NULL; size_t fname_len, localname_len = 0; php_stream *resource; zval zresource; PHAR_ARCHIVE_OBJECT(); if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|s", &fname, &fname_len, &localname, &localname_len) == FAILURE) { return; } if (ZEND_SIZE_T_INT_OVFL(fna...
0
[ "CWE-281" ]
php-src
e5c95234d87fcb8f6b7569a96a89d1e1544749a6
149,886,934,345,656,280,000,000,000,000,000,000,000
35
Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions
TEST(RegexMatchExpression, MatchesElementMultipleFlags) { BSONObj matchMultilineDotAll = BSON("x" << "\na\nb"); RegexMatchExpression regex; ASSERT(regex.init("", "^a.b", "ms").isOK()); ASSERT(regex.matchesSingleElement(matchMultilineDotAll.firstElement())); }
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
79,963,446,070,383,930,000,000,000,000,000,000,000
7
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
int CheckCSRSignaturePubKey(const byte* cert, word32 certSz, void* heap, const byte* pubKey, word32 pubKeySz, int pubKeyOID) { return CheckCertSignature_ex(cert, certSz, heap, NULL, pubKey, pubKeySz, pubKeyOID, 1); }
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
70,837,078,664,943,390,000,000,000,000,000,000,000
6
OCSP: improve handling of OCSP no check extension
QPDFObjectHandle::isNull() { dereference(); return QPDFObjectTypeAccessor<QPDF_Null>::check(obj.getPointer()); }
0
[ "CWE-835" ]
qpdf
afe0242b263a9e1a8d51dd81e42ab6de2e5127eb
55,378,396,770,020,190,000,000,000,000,000,000,000
5
Handle object ID 0 (fixes #99) This is CVE-2017-9208. The QPDF library uses object ID 0 internally as a sentinel to represent a direct object, but prior to this fix, was not blocking handling of 0 0 obj or 0 0 R as a special case. Creating an object in the file with 0 0 obj could cause various infinite loops. The PDF...
static void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason, u32 exit_intr_info, unsigned long exit_qualification) { struct vcpu_vmx *vmx = to_vmx(vcpu); struct vmcs12 *vmcs12 = get_vmcs12(vcpu); /* trying to cancel vmlaunch/vmresume is a bug */ WARN_ON_ONCE(vmx->nested.nested_run_pendin...
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
316,155,830,035,348,980,000,000,000,000,000,000,000
79
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 ...
zsetstrokecolorspace(i_ctx_t * i_ctx_p) { int code; code = zswapcolors(i_ctx_p); if (code < 0) return code; /* Set up for the continuation procedure which will finish by restoring the fill colour space */ /* Make sure the exec stack has enough space */ check_estack(1); /* Now, the ...
1
[]
ghostpdl
ea735ba37dc0fd5f5622d031830b9a559dec1cc9
206,722,824,352,539,260,000,000,000,000,000,000,000
20
Fix error condition for SC and CS The SC and CS PDF operators correctly checked the return code from the underlying setcolor and setcolorspace code, but we had already set up the exec stack for handling a non-error return. We have to do this before calling the underlying code, as that also uses a state machine, and a...
} u32 parse_dnal(char *arg_val, u32 opt) { parse_track_id(&dump_nal_track, arg_val, GF_FALSE); dump_nal_type = opt; return 0;
0
[ "CWE-787" ]
gpac
4e56ad72ac1afb4e049a10f2d99e7512d7141f9d
251,251,558,249,957,900,000,000,000,000,000,000,000
6
fixed #2216
YCbCr_tables_init (void) { g_mutex_lock (&Tables_Mutex); if (YCbCr_R_Cr_Tab == NULL) { int i, v; YCbCr_R_Cr_Tab = g_new (int, 256); YCbCr_G_Cb_Tab = g_new (int, 256); YCbCr_G_Cr_Tab = g_new (int, 256); YCbCr_B_Cb_Tab = g_new (int, 256); for (i = 0, v = -128; i <= 255; i++, v++) { YCbCr_R_Cr_Tab[i] =...
0
[ "CWE-787" ]
gthumb
4faa5ce2358812d23a1147953ee76f59631590ad
87,389,877,376,192,450,000,000,000,000,000,000,000
22
jpeg loader: do not scan more than output_height lines
static void vga_bitblt(QemuConsole *con, int xs, int ys, int xd, int yd, int w, int h) { DisplaySurface *surface = qemu_console_surface(con); pixman_image_composite(PIXMAN_OP_SRC, surface->image, NULL, surface->image, xs, ys, 0, 0, xd...
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
189,777,440,577,623,680,000,000,000,000,000,000,000
9
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
void Item_ref_null_helper::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("<ref_null_helper>(")); if (ref) (*ref)->print(str, query_type); else str->append('?'); str->append(')'); }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
101,285,888,546,392,030,000,000,000,000,000,000,000
9
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
rend_service_free(rend_service_t *service) { if (!service) return; tor_free(service->directory); if (service->ports) { SMARTLIST_FOREACH(service->ports, rend_service_port_config_t*, p, rend_service_port_config_free(p)); smartlist_free(service->ports); } if (service->private_...
0
[ "CWE-532" ]
tor
09ea89764a4d3a907808ed7d4fe42abfe64bd486
205,567,369,408,408,400,000,000,000,000,000,000,000
35
Fix log-uninitialized-stack bug in rend_service_intro_established. Fixes bug 23490; bugfix on 0.2.7.2-alpha. TROVE-2017-008 CVE-2017-0380
TEST_F(QueryPlannerTest, MultikeySharedPrefixElemMatchNotShared) { // true means multikey addIndex(BSON("a.b" << 1 << "a.c" << 1), true); runQuery(fromjson("{'a.b': 1, a: {$elemMatch: {c: 1}}}")); assertNumSolutions(2U); assertSolutionExists("{cscan: {dir: 1}}"); assertSolutionExists( "...
0
[ "CWE-834" ]
mongo
94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5
183,742,067,868,099,100,000,000,000,000,000,000,000
12
SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch
void smb2cli_req_set_credit_charge(struct tevent_req *req, uint16_t charge) { struct smbXcli_req_state *state = tevent_req_data(req, struct smbXcli_req_state); state->smb2.credit_charge = charge; }
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
36,754,075,841,842,230,000,000,000,000,000,000,000
8
CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
BtnCode(XtermWidget xw, XButtonEvent *event, int button) { int result = (int) (32 + (KeyState(xw, event->state) << 2)); if (event->type == MotionNotify) result += 32; if (button < 0) { result += 3; } else { result += button & 3; if (button & 4) result += 64; if (button & 8) result += 12...
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
134,457,795,518,039,960,000,000,000,000,000,000,000
23
snapshot of project "xterm", label xterm-365d
static void get_note(struct SYMBOL *s) { struct SYMBOL *prev; int i, m, delta; prev = curvoice->last_sym; m = s->nhd; /* insert the note/rest in the voice */ sym_link(s, s->u.note.notes[0].len != 0 ? NOTEREST : SPACE); if (!(s->flags & ABC_F_GRACE)) curvoice->time += s->dur; if (curvoice->octave) { delt...
0
[ "CWE-787" ]
abcm2ps
dc0372993674d0b50fedfbf7b9fad1239b8efc5f
333,624,904,959,629,040,000,000,000,000,000,000,000
163
fix: crash when too many accidentals in K: (signature + explicit) Issue #17.
process_readdir(u_int32_t id) { DIR *dirp; struct dirent *dp; char *path; int r, handle; if ((r = get_handle(iqueue, &handle)) != 0) fatal("%s: buffer error: %s", __func__, ssh_err(r)); debug("request %u: readdir \"%s\" (handle %d)", id, handle_to_name(handle), handle); dirp = handle_to_dir(handle); pa...
0
[ "CWE-732", "CWE-703", "CWE-269" ]
src
a6981567e8e215acc1ef690c8dbb30f2d9b00a19
46,739,725,100,285,930,000,000,000,000,000,000,000
54
disallow creation (of empty files) in read-only mode; reported by Michal Zalewski, feedback & ok deraadt@
*/ static inline unsigned int skb_headroom(const struct sk_buff *skb) { return skb->data - skb->head;
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
107,613,080,424,786,680,000,000,000,000,000,000,000
4
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
uint64_t encoding_order() const { return encoding_order_; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
4,396,555,184,324,951,000,000,000,000,000,000,000
1
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
void drm_connector_cleanup(struct drm_connector *connector) { struct drm_device *dev = connector->dev; struct drm_display_mode *mode, *t; list_for_each_entry_safe(mode, t, &connector->probed_modes, head) drm_mode_remove(connector, mode); list_for_each_entry_safe(mode, t, &connector->modes, head) drm_mode_remo...
0
[ "CWE-190", "CWE-189" ]
linux
a5cd335165e31db9dbab636fd29895d41da55dd2
54,868,001,749,190,820,000,000,000,000,000,000,000
20
drm: integer overflow in drm_mode_dirtyfb_ioctl() There is a potential integer overflow in drm_mode_dirtyfb_ioctl() if userspace passes in a large num_clips. The call to kmalloc would allocate a small buffer, and the call to fb->funcs->dirty may result in a memory corruption. Reported-by: Haogang Chen <haogangchen@g...
read_stream(struct archive_read *a, const void **buff, size_t size, size_t minimum) { struct _7zip *zip = (struct _7zip *)a->format->data; uint64_t skip_bytes = 0; ssize_t r; if (zip->uncompressed_buffer_bytes_remaining == 0) { if (zip->pack_stream_inbytes_remaining > 0) { r = extract_pack_stream(a, 0); ...
0
[ "CWE-125" ]
libarchive
65a23f5dbee4497064e9bb467f81138a62b0dae1
104,545,166,526,481,930,000,000,000,000,000,000,000
108
7zip: fix crash when parsing certain archives Fuzzing with CRCs disabled revealed that a call to get_uncompressed_data() would sometimes fail to return at least 'minimum' bytes. This can cause the crc32() invocation in header_bytes to read off into invalid memory. A specially crafted archive can use this to cause a c...
virDomainInjectNMI(virDomainPtr domain, unsigned int flags) { virConnectPtr conn; VIR_DOMAIN_DEBUG(domain, "flags=%x", flags); virResetLastError(); virCheckDomainReturn(domain, -1); conn = domain->conn; virCheckReadOnlyGoto(conn->flags, error); if (conn->driver->domainInjectNMI) { ...
0
[ "CWE-254" ]
libvirt
506e9d6c2d4baaf580d489fff0690c0ff2ff588f
90,875,830,276,518,420,000,000,000,000,000,000,000
26
virDomainGetTime: Deny on RO connections We have a policy that if API may end up talking to a guest agent it should require RW connection. We don't obey the rule in virDomainGetTime(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
int ssh_file_readaccess_ok(const char *file) { if (_access(file, 4) < 0) { return 0; } return 1; }
0
[]
libssh
2ba1dea5493fb2f5a5be2dd263ce46ccb5f8ec76
247,752,975,696,508,900,000,000,000,000,000,000,000
7
CVE-2019-14889: misc: Add function to quote file names The added function quote file names strings to be used in a shell. Special cases are treated for the charactes '\'' and '!'. Fixes T181 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> (cherry pic...
static int add_column_list_values(String *str, partition_info *part_info, part_elem_value *list_value, HA_CREATE_INFO *create_info, Alter_info *alter_info) { int err= 0; uint i; List_iterator<const char> it(part_...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
229,080,294,112,896,000,000,000,000,000,000,000,000
109
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
static int ethtool_set_pauseparam(struct net_device *dev, void __user *useraddr) { struct ethtool_pauseparam pauseparam; if (!dev->ethtool_ops->set_pauseparam) return -EOPNOTSUPP; if (copy_from_user(&pauseparam, useraddr, sizeof(pauseparam))) return -EFAULT; return dev->ethtool_ops->set_pauseparam(dev, &paus...
0
[ "CWE-190" ]
linux-2.6
db048b69037e7fa6a7d9e95a1271a50dc08ae233
230,139,486,360,896,600,000,000,000,000,000,000,000
12
ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL On a 32-bit machine, info.rule_cnt >= 0x40000000 leads to integer overflow and the buffer may be smaller than needed. Since ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at least denial of service. Signed-off-by: Ben Hutching...
__acquires(RCU) { rcu_read_lock(); return *pos ? ptype_get_idx(*pos - 1) : SEQ_START_TOKEN; }
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
190,737,106,030,236,800,000,000,000,000,000,000,000
5
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
xmlSaveErrMemory(const char *extra) { __xmlSimpleError(XML_FROM_OUTPUT, XML_ERR_NO_MEMORY, NULL, NULL, extra); }
0
[ "CWE-502" ]
libxml2
c97750d11bb8b6f3303e7131fe526a61ac65bcfd
9,872,882,483,671,913,000,000,000,000,000,000,000
4
Avoid an out of bound access when serializing malformed strings For https://bugzilla.gnome.org/show_bug.cgi?id=766414 * xmlsave.c: xmlBufAttrSerializeTxtContent() if an attribute value is not UTF-8 be more careful when serializing it as we may do an out of bound access as a result.
normalizePublicId(XML_Char *publicId) { XML_Char *p = publicId; XML_Char *s; for (s = publicId; *s; s++) { switch (*s) { case 0x20: case 0xD: case 0xA: if (p != publicId && p[-1] != 0x20) *p++ = 0x20; break; default: *p++ = *s; } } if (p != publicId && p[-1] =...
0
[ "CWE-611", "CWE-776", "CWE-415", "CWE-125" ]
libexpat
c20b758c332d9a13afbbb276d30db1d183a85d43
326,544,224,909,488,700,000,000,000,000,000,000,000
19
xmlparse.c: Deny internal entities closing the doctype
int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb) { int err; u32 tsk_portid = cb->args[0]; u32 last_publ = cb->args[1]; u32 done = cb->args[2]; struct net *net = sock_net(skb->sk); struct tipc_sock *tsk; if (!tsk_portid) { struct nlattr **attrs; struct nlattr *sock[TIPC_NLA_SOCK_MAX + ...
1
[ "CWE-703" ]
linux
45e093ae2830cd1264677d47ff9a95a71f5d9f9c
336,373,683,980,543,200,000,000,000,000,000,000,000
49
tipc: check nl sock before parsing nested attributes Make sure the socket for which the user is listing publication exists before parsing the socket netlink attributes. Prior to this patch a call without any socket caused a NULL pointer dereference in tipc_nl_publ_dump(). Tested-and-reported-by: Baozeng Ding <splovi...
void reds_on_vc_change(RedsState *reds) { FOREACH_QXL_INSTANCE(reds, qxl) { red_qxl_on_vc_change(qxl, reds_get_video_codecs(reds)); } }
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
115,243,436,691,179,840,000,000,000,000,000,000,000
6
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
inline void process_message() { handler_->handle(); }
0
[ "CWE-416" ]
Crow
fba01dc76d6ea940ad7c8392e8f39f9647241d8e
35,594,779,177,936,210,000,000,000,000,000,000,000
4
Prevent HTTP pipelining which Crow doesn't support.
static int ensureDir(rpmPlugins plugins, const char *p, int owned, int create) { char *path = xstrdup(p); char *dp = path; char *sp = NULL, *bn; int oflags = O_RDONLY; int dirfd = fsmOpenat(-1, "/", oflags); int fd = dirfd; /* special case of "/" */ while ((bn = strtok_r(dp, "/", &sp)) != ...
0
[]
rpm
96ec957e281220f8e137a2d5eb23b83a6377d556
321,787,294,007,348,960,000,000,000,000,000,000,000
43
Validate intermediate symlinks during installation, CVE-2021-35939 Whenever directory changes during unpacking, walk the entire tree from starting from / and validate any symlinks crossed, fail the install on invalid links. This is the first of step of many towards securing our file operations against local tamperers...
getsize_gnutar( dle_t *dle, int level, time_t dumpsince, char **errmsg) { int pipefd = -1, nullfd = -1; pid_t dumppid; off_t size = (off_t)-1; FILE *dumpout = NULL; char *incrname = NULL; char *basename = NULL; char *dirname = NULL; char *inputname = NULL; ...
0
[ "CWE-264" ]
amanda
4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7
206,088,149,992,103,600,000,000,000,000,000,000,000
338
* Add a /etc/amanda-security.conf file git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0
static void stop_passive_scanning(struct btd_adapter *adapter) { struct mgmt_cp_stop_discovery cp; DBG(""); /* If there are any normal discovery clients passive scanning * wont be running */ if (adapter->discovery_list) return; if (adapter->discovery_enable == 0x00) return; cp.type = adapter->discovery_...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
118,371,536,761,328,140,000,000,000,000,000,000,000
20
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
void __fastcall TSCPFileSystem::AnyCommand(const UnicodeString Command, TCaptureOutputEvent OutputEvent) { DebugAssert(FSecureShell->OnCaptureOutput == NULL); if (OutputEvent != NULL) { FSecureShell->OnCaptureOutput = CaptureOutput; FOnCaptureOutput = OutputEvent; } try { ExecComm...
0
[ "CWE-20" ]
winscp
49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54
277,847,757,293,319,440,000,000,000,000,000,000,000
21
Bug 1675: Prevent SCP server sending files that were not requested https://winscp.net/tracker/1675 Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55
static int huft_build(const unsigned *b, const unsigned n, const unsigned s, const unsigned short *d, const unsigned char *e, huft_t **t, unsigned *m) { unsigned a; /* counter for codes of length k */ unsigned c[BMAX + 1]; /* bit length count table */ unsigned eob_len; /* length of end-of-b...
0
[ "CWE-476" ]
busybox
1de25a6e87e0e627aa34298105a3d17c60a1f44e
100,388,920,947,082,100,000,000,000,000,000,000,000
178
unzip: test for bad archive SEGVing function old new delta huft_build 1296 1300 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
static int rtnl_bridge_dellink(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) { struct net *net = sock_net(skb->sk); struct ifinfomsg *ifm; struct net_device *dev; struct nlattr *br_spec, *attr = NULL; int rem, err = -EOPNOTSUPP; u16 flags = 0; bool have_flags = false; if ...
0
[ "CWE-476" ]
linux
f428fe4a04cc339166c8bbd489789760de3a0cee
334,875,138,968,165,900,000,000,000,000,000,000,000
75
rtnetlink: give a user socket to get_target_net() This function is used from two places: rtnl_dump_ifinfo and rtnl_getlink. In rtnl_getlink(), we give a request skb into get_target_net(), but in rtnl_dump_ifinfo, we give a response skb into get_target_net(). The problem here is that NETLINK_CB() isn't initialized for ...
static struct audit_entry *audit_find_rule(struct audit_entry *entry, struct list_head *list) { struct audit_entry *e, *found = NULL; int h; if (entry->rule.watch) { /* we don't know the inode number, so must walk entire hash */ for (h = 0; h < AUDIT_INODE_BUCKETS; h++) { list = &audit_inode_hash[h];...
0
[ "CWE-362" ]
linux-2.6
8f7b0ba1c853919b85b54774775f567f30006107
295,433,689,585,871,460,000,000,000,000,000,000,000
28
Fix inotify watch removal/umount races Inotify watch removals suck violently. To kick the watch out we need (in this order) inode->inotify_mutex and ih->mutex. That's fine if we have a hold on inode; however, for all other cases we need to make damn sure we don't race with umount. We can *NOT* just grab a reference...
DECODE_JSON(StatusCode) { status ret = DECODE_DIRECT_JSON(dst, UInt32); if(ret != UA_STATUSCODE_GOOD) return ret; if(moveToken) parseCtx->index++; return UA_STATUSCODE_GOOD; }
0
[ "CWE-703", "CWE-787" ]
open62541
c800e2987b10bb3af6ef644b515b5d6392f8861d
236,448,506,665,098,860,000,000,000,000,000,000,000
9
fix(json): Check max recursion depth in more places
dissect_kafka_delete_records_response_topic_partition(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, kafka_api_version_t api_version _U_) { guint32 partition_id; gint64 partition_offset; // low watermark kafka_error_t partition_error...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
103,234,929,423,668,970,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...
hb_buffer_new( HB_Buffer *pbuffer ) { HB_Buffer buffer; HB_Error error; if ( ALLOC( buffer, sizeof( HB_BufferRec ) ) ) return error; buffer->allocated = 0; buffer->in_string = NULL; buffer->alt_string = NULL; buffer->positions = NULL; hb_buffer_clear( buffer ); *pbuffer = buffer; return H...
1
[]
pango
336bb3201096bdd0494d29926dd44e8cca8bed26
17,822,031,719,098,954,000,000,000,000,000,000,000
19
[HB] Remove all references to the old code!
static void init_header(struct ctl_table_header *head, struct ctl_table_root *root, struct ctl_table_set *set, struct ctl_node *node, struct ctl_table *table) { head->ctl_table = table; head->ctl_table_arg = table; head->used = 0; head->count = 1; head->nreg = 1; head->unregistering = NULL; head->root = root; ...
0
[ "CWE-476" ]
linux
23da9588037ecdd4901db76a5b79a42b529c4ec3
69,543,552,891,087,900,000,000,000,000,000,000,000
21
fs/proc/proc_sysctl.c: fix NULL pointer dereference in put_links Syzkaller reports: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN PTI CPU: 1 PID: 5373 Comm: syz-executor.0 Not tainted 5.0.0-rc8+ #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996)...
ews_client_autodiscover_response_cb (SoupSession *session, SoupMessage *msg, gpointer user_data) { GError *error; AutodiscoverData *data = user_data; gboolean op_res; guint status; gint idx; gsize size; xmlDoc *doc; xmlNode *node; status = msg->status_code; if (status == SOUP_STATUS_NONE) retur...
1
[ "CWE-310" ]
gnome-online-accounts
edde7c63326242a60a075341d3fea0be0bc4d80e
247,784,107,341,078,830,000,000,000,000,000,000,000
147
Guard against invalid SSL certificates None of the branded providers (eg., Google, Facebook and Windows Live) should ever have an invalid certificate. So set "ssl-strict" on the SoupSession object being used by GoaWebView. Providers like ownCloud and Exchange might have to deal with certificates that are not up to th...
ScrollV(xs, ys, xe, ye, n, bce) int xs, ys, xe, ye, n, bce; { int i; int up; int oldbot; int alok, dlok, aldlfaster; int missy = 0; ASSERT(display); if (n == 0) return; if (n >= ye - ys + 1 || -n >= ye - ys + 1) { ClearArea(xs, ys, xs, xe, xe, ye, bce, 0); return; } if (xs > D...
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
241,410,399,293,815,800,000,000,000,000,000,000,000
136
ansi: add support for xterm OSC 11 It allows for getting and setting the background color. Notably, Vim uses OSC 11 to learn whether it's running on a light or dark colored terminal and choose a color scheme accordingly. Tested with gnome-terminal and xterm. When called with "?" argument the current background color ...
CImgList(const CImgList<t>& list):_width(0),_allocated_width(0),_data(0) { assign(list._width); cimglist_for(*this,l) _data[l].assign(list[l],false); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
219,442,254,183,393,830,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
re_adjust_startpos(regex_t* reg, const char* string, int size, int startpos, int range) { if (startpos > 0 && ONIGENC_MBC_MAXLEN(reg->enc) != 1 && startpos < size) { UChar *p; UChar *s = (UChar* )string + startpos; if (range > 0) { p = onigenc_get_right_adjust_char_head(reg->enc, (UChar* )stri...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
93,023,334,053,404,950,000,000,000,000,000,000,000
18
onig-5.9.2
compile_regexps (void) { const char *err; int offset; #define COMPILE(re,pattern,options) \ do { \ re = pcre_compile ((pattern), (options), &err, &offset, NULL); \ if (re == NULL) { ...
0
[]
libguestfs
ae8bb84ecd46d7b6ef557a87725923ac8d09dce0
268,160,475,095,324,720,000,000,000,000,000,000,000
47
inspection: Don't segfault if /etc/SuSE-release is an empty file. Related to CVE-2013-2124. Thanks: Olaf Hering.
qemuProcessGenID(virDomainObjPtr vm, unsigned int flags) { if (!vm->def->genidRequested) return 0; /* If we are coming from a path where we must provide a new gen id * value regardless of whether it was previously generated or provided, * then generate a new GUID value before...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
305,927,687,480,391,300,000,000,000,000,000,000,000
19
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...
T _cubic_atX_pc(const float fx, const int y, const int z, const int c) const { return cimg::type<T>::cut(_cubic_atX_p(fx,y,z,c));
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
49,518,737,973,422,720,000,000,000,000,000,000,000
3
.
e_ews_connection_get_folder_permissions (EEwsConnection *cnc, gint pri, EwsFolderId *folder_id, GCancellable *cancellable, GAsyncReadyCallback callback, ...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
303,042,787,743,086,600,000,000,000,000,000,000,000
53
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
brcmf_msgbuf_process_rx_complete(struct brcmf_msgbuf *msgbuf, void *buf) { struct msgbuf_rx_complete *rx_complete; struct sk_buff *skb; u16 data_offset; u16 buflen; u16 flags; u32 idx; struct brcmf_if *ifp; brcmf_msgbuf_update_rxbufpost_count(msgbuf, 1); rx_complete = (struct msgbuf_rx_complete *)buf; data_...
0
[ "CWE-20" ]
linux
a4176ec356c73a46c07c181c6d04039fafa34a9f
112,110,190,953,580,020,000,000,000,000,000,000,000
55
brcmfmac: add subtype check for event handling in data path For USB there is no separate channel being used to pass events from firmware to the host driver and as such are passed over the data path. In order to detect mock event messages an additional check is needed on event subtype. This check is added conditionally...
print_array(FILE *f, const char *set, const char *name, int n) { int i; char val[100]; printf("uchar %s_%s[] = {\n", name, set); p = buf; *buf = '\0'; for (i = 0; i < n; ++i) { /* get a word from f */ endptr = p; for (;;) { while (isspace(*endptr)) ++endptr; if (*endp...
0
[ "CWE-200" ]
mysql-server
0dbd5a8797ed4bd18e8b883988fb62177eb0f73f
209,681,739,121,909,470,000,000,000,000,000,000,000
46
Bug#21973610: BUFFER OVERFLOW ISSUES Description : Incorrect usage of sprintf/strcpy caused possible buffer overflow issues at various places. Solution : - Fixed mysql_plugin and mysqlshow - Fixed regex library issues Reviewed-By : Georgi Kodinov <georgi.kodinov@oracle.com> Rev...
HiiExportPackageLists ( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE Handle, IN OUT UINTN *BufferSize, OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer ) { LIST_ENTRY *Link; EFI_STATUS Sta...
0
[ "CWE-416" ]
edk2
c32be82e99ef272e7fa742c2f06ff9a4c3756613
46,129,777,528,955,300,000,000,000,000,000,000,000
69
MdeModulePkg/HiiDB: Remove configuration table when it's freed (CVE-2019-14586) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1995 Fix the corner case issue that the original configuration runtime memory is freed, but it is still exposed to the OS runtime. So this patch is to remove the configuration table to a...
static void Sp_replace_regexp(js_State *J) { js_Regexp *re; const char *source, *s, *r; js_Buffer *sb = NULL; int n, x; Resub m; source = checkstring(J, 0); re = js_toregexp(J, 1); if (js_regexec(re->prog, source, &m, 0)) { js_copy(J, 0); return; } re->last = 0; loop: s = m.sub[0].sp; n = m.sub[0].e...
1
[ "CWE-400", "CWE-674", "CWE-787" ]
mujs
00d4606c3baf813b7b1c176823b2729bf51002a2
139,407,413,663,288,630,000,000,000,000,000,000,000
101
Bug 700937: Limit recursion in regexp matcher. Also handle negative return code as an error in the JS bindings.
static int check_access() { int error= 0; if ((error= my_access(opt_basedir, F_OK))) { fprintf(stderr, "ERROR: Cannot access basedir at '%s'.\n", opt_basedir); goto exit; } if ((error= my_access(opt_plugin_dir, F_OK))) { fprintf(stderr, "ERROR: Cannot access plugin_dir at '%s'.\n"...
0
[ "CWE-200" ]
mysql-server
0dbd5a8797ed4bd18e8b883988fb62177eb0f73f
105,888,178,452,883,750,000,000,000,000,000,000,000
44
Bug#21973610: BUFFER OVERFLOW ISSUES Description : Incorrect usage of sprintf/strcpy caused possible buffer overflow issues at various places. Solution : - Fixed mysql_plugin and mysqlshow - Fixed regex library issues Reviewed-By : Georgi Kodinov <georgi.kodinov@oracle.com> Rev...
peer_update_source_vty (struct vty *vty, const char *peer_str, const char *source_str) { struct peer *peer; union sockunion *su; peer = peer_and_group_lookup_vty (vty, peer_str); if (! peer) return CMD_WARNING; if (source_str) { su = sockunion_str2su (source_str); ...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
1,108,583,735,578,407,000,000,000,000,000,000,000
26
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
art_pdf_knockoutisolated_group_16(uint16_t *gs_restrict dst, const uint16_t *gs_restrict src, int n_chan) { uint16_t src_alpha; src_alpha = src[n_chan]; if (src_alpha == 0) return; memcpy (dst, src, 2*(n_chan + 1)); }
0
[ "CWE-476" ]
ghostpdl
7870f4951bcc6a153f317e3439e14d0e929fd231
72,808,115,063,907,510,000,000,000,000,000,000,000
10
Bug 701795: Segv due to image mask issue
find_directory_in_path( char_u *ptr, // file name int len, // length of file name int options, char_u *rel_fname) // file name searching relative to { return find_file_in_path_option(ptr, len, options, TRUE, p_cdpath, FINDFILE_DIR, rel_fname, (char_u *)""); }
0
[ "CWE-122" ]
vim
615ddd5342b50a6878a907062aa471740bd9a847
161,080,664,414,183,710,000,000,000,000,000,000,000
9
patch 8.2.3611: crash when using CTRL-W f without finding a file name Problem: Crash when using CTRL-W f without finding a file name. Solution: Bail out when the file name length is zero.
void DecodeUpdatePacketCounters(ThreadVars *tv, const DecodeThreadVars *dtv, const Packet *p) { StatsIncr(tv, dtv->counter_pkts); //StatsIncr(tv, dtv->counter_pkts_per_sec); StatsAddUI64(tv, dtv->counter_bytes, GET_PKT_LEN(p)); StatsAddUI64(tv, dtv->counter_avg_pkt_size, ...
0
[ "CWE-20" ]
suricata
11f3659f64a4e42e90cb3c09fcef66894205aefe
72,523,403,526,053,260,000,000,000,000,000,000,000
9
teredo: be stricter on what to consider valid teredo Invalid Teredo can lead to valid DNS traffic (or other UDP traffic) being misdetected as Teredo. This leads to false negatives in the UDP payload inspection. Make the teredo code only consider a packet teredo if the encapsulated data was decoded without any 'invali...
int msPostGISLayerGetItems(layerObj *layer) { #ifdef USE_POSTGIS msPostGISLayerInfo *layerinfo = NULL; static char *strSQLTemplate = "select * from %s where false limit 0"; PGresult *pgresult = NULL; char *col = NULL; char *sql = NULL; char *strFrom = NULL; char found_geom = 0; const char *value; int ...
0
[ "CWE-89" ]
mapserver
3a10f6b829297dae63492a8c63385044bc6953ed
211,395,316,203,573,100,000,000,000,000,000,000,000
108
Fix potential SQL Injection with postgis TIME filters (#4834)
ntp_poll( struct parse *pcmd, FILE *fp ) { (void) fprintf(fp, "poll not implemented yet\n"); }
0
[ "CWE-20" ]
ntp
07a5b8141e354a998a52994c3c9cd547927e56ce
195,108,683,291,944,330,000,000,000,000,000,000,000
7
[TALOS-CAN-0063] avoid buffer overrun in ntpq
STATIC void GC_do_nothing(void) {}
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
322,627,973,703,385,300,000,000,000,000,000,000,000
1
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
static void atusb_in_good(struct urb *urb) { struct usb_device *usb_dev = urb->dev; struct sk_buff *skb = urb->context; struct atusb *atusb = SKB_ATUSB(skb); uint8_t len, lqi; if (!urb->actual_length) { dev_dbg(&usb_dev->dev, "atusb_in: zero-sized URB ?\n"); return; } len = *skb->data; if (urb->actual_le...
0
[ "CWE-399", "CWE-119" ]
linux
05a974efa4bdf6e2a150e3f27dc6fcf0a9ad5655
13,117,183,346,440,258,000,000,000,000,000,000,000
37
ieee802154: atusb: do not use the stack for buffers to make them DMA able From 4.9 we should really avoid using the stack here as this will not be DMA able on various platforms. This changes the buffers already being present in time of 4.9 being released. This should go into stable as well. Reported-by: Dan Carpenter...
get_dconf_data (const char *app_id, const char **paths, const char *migrate_path, char **defaults, gsize *defaults_size, char **values, gsize *values_size, char **locks, ...
0
[ "CWE-20" ]
flatpak
a9107feeb4b8275b78965b36bf21b92d5724699e
11,047,699,904,940,257,000,000,000,000,000,000,000
80
run: Only compare the lowest 32 ioctl arg bits for TIOCSTI Closes #2782. Closes: #2783 Approved by: alexlarsson
static void try_queue_kicked_iocb(struct kiocb *iocb) { struct kioctx *ctx = iocb->ki_ctx; unsigned long flags; int run = 0; spin_lock_irqsave(&ctx->ctx_lock, flags); /* set this inside the lock so that we can't race with aio_run_iocb() * testing it and putting the iocb on the run list under the lock */ if (!...
0
[ "CWE-190" ]
linux-2.6
75e1c70fc31490ef8a373ea2a4bea2524099b478
241,487,733,732,480,750,000,000,000,000,000,000,000
15
aio: check for multiplication overflow in do_io_submit Tavis Ormandy pointed out that do_io_submit does not do proper bounds checking on the passed-in iocb array:        if (unlikely(nr < 0))                return -EINVAL;        if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(iocbpp)))))                retu...
void CommandHelpers::filterCommandRequestForPassthrough(BSONObjIterator* cmdIter, BSONObjBuilder* requestBuilder) { while (cmdIter->more()) { auto elem = cmdIter->next(); const auto name = elem.fieldNameStringData(); if (name == "$readP...
0
[ "CWE-20" ]
mongo
722f06f3217c029ef9c50062c8cc775966fd7ead
299,022,299,940,378,440,000,000,000,000,000,000,000
14
SERVER-38275 ban find explain with UUID
TEST_F(QueryPlannerTest, CannotIntersectBoundsOnSecondFieldWhenItAndSharedPrefixAreMultikey) { MultikeyPaths multikeyPaths{{0U}, {0U, 1U}}; addIndex(BSON("a.b" << 1 << "a.c" << 1), multikeyPaths); runQuery(fromjson("{a: {$elemMatch: {b: 2, c: {$gte: 0, $lt: 10}}}}")); assertNumSolutions(2U); assert...
0
[ "CWE-834" ]
mongo
94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5
41,230,216,365,049,710,000,000,000,000,000,000,000
12
SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch
static double mp_list_stats(_cimg_math_parser& mp) { const unsigned int ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.listin.width()), k = (unsigned int)mp.opcode[3]; if (!mp.list_stats) mp.list_stats.assign(mp.listin._width); if (!mp.list_stats[ind]) mp.list_stats[...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
54,650,390,150,389,010,000,000,000,000,000,000,000
8
Fix other issues in 'CImg<T>::load_bmp()'.
static void v4l_print_encoder_cmd(const void *arg, bool write_only) { const struct v4l2_encoder_cmd *p = arg; pr_cont("cmd=%d, flags=0x%x\n", p->cmd, p->flags); }
0
[ "CWE-401" ]
linux
fb18802a338b36f675a388fc03d2aa504a0d0899
72,636,069,448,977,150,000,000,000,000,000,000,000
7
media: v4l: ioctl: Fix memory leak in video_usercopy When an IOCTL with argument size larger than 128 that also used array arguments were handled, two memory allocations were made but alas, only the latter one of them was released. This happened because there was only a single local variable to hold such a temporary a...
TiledInputFile::TiledInputFile (const Header &header, OPENEXR_IMF_INTERNAL_NAMESPACE::IStream *is, int version, int numThreads) : _data (new Data (numThreads)) { _data->_deleteStream=false; _data->_streamData = n...
1
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
198,917,800,785,635,700,000,000,000,000,000,000,000
24
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
void sqlite3EndTable( Parse *pParse, /* Parse context */ Token *pCons, /* The ',' token after the last column defn. */ Token *pEnd, /* The ')' before options in the CREATE TABLE */ u8 tabOpts, /* Extra table options. Usually 0. */ Select *pSelect /* Select fro...
0
[ "CWE-674", "CWE-787" ]
sqlite
38096961c7cd109110ac21d3ed7dad7e0cb0ae06
187,691,223,918,078,240,000,000,000,000,000,000,000
269
Avoid infinite recursion in the ALTER TABLE code when a view contains an unused CTE that references, directly or indirectly, the view itself. FossilOrigin-Name: 1d2e53a39b87e364685e21de137655b6eee725e4c6d27fc90865072d7c5892b5
bool sqlcom_can_generate_row_events(const THD *thd) { return (sql_command_flags[thd->lex->sql_command] & CF_CAN_GENERATE_ROW_EVENTS); }
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
192,028,372,361,950,750,000,000,000,000,000,000,000
5
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
unsigned int cdrom_check_events(struct cdrom_device_info *cdi, unsigned int clearing) { unsigned int events; cdrom_update_events(cdi, clearing); events = cdi->vfs_events; cdi->vfs_events = 0; return events; }
0
[ "CWE-119", "CWE-787" ]
linux
9de4ee40547fd315d4a0ed1dd15a2fa3559ad707
175,499,685,331,939,600,000,000,000,000,000,000,000
10
cdrom: information leak in cdrom_ioctl_media_changed() This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned long. The way the check is written now, if one of the high 32 bits is set then we could read outside the info->slots[] array. This bug is pretty old and it predates git. Reviewed-by: Christ...
static void __exit exit_nfs_fs(void) { nfs_destroy_directcache(); nfs_destroy_writepagecache(); nfs_destroy_readpagecache(); nfs_destroy_inodecache(); nfs_destroy_nfspagecache(); #ifdef CONFIG_PROC_FS rpc_proc_unregister("nfs"); #endif unregister_nfs_fs(); nfs_fs_proc_exit(); nfsiod_stop(); }
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
237,974,709,922,661,050,000,000,000,000,000,000,000
14
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
vhost_user_check_and_alloc_queue_pair(struct virtio_net *dev, struct vhu_msg_context *ctx) { uint32_t vring_idx; switch (ctx->msg.request.master) { case VHOST_USER_SET_VRING_KICK: case VHOST_USER_SET_VRING_CALL: case VHOST_USER_SET_VRING_ERR: vring_idx = ctx->msg.payload.u64 & VHOST_USER_VRING_IDX_MASK; br...
0
[ "CWE-125", "CWE-787" ]
dpdk
6442c329b9d2ded0f44b27d2016aaba8ba5844c5
265,927,762,461,532,770,000,000,000,000,000,000,000
37
vhost: fix queue number check when setting inflight FD In function vhost_user_set_inflight_fd, queue number in inflight message is used to access virtqueue. However, queue number could be larger than VHOST_MAX_VRING and cause write OOB as this number will be used to write inflight info in virtqueue structure. This pat...
int security_key_permission(key_ref_t key_ref, const struct cred *cred, key_perm_t perm) { return security_ops->key_permission(key_ref, cred, perm); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
5,229,275,162,398,141,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...
static int pppoe_release(struct socket *sock) { struct sock *sk = sock->sk; struct pppox_sock *po; struct pppoe_net *pn; struct net *net = NULL; if (!sk) return 0; lock_sock(sk); if (sock_flag(sk, SOCK_DEAD)) { release_sock(sk); return -EBADF; } po = pppox_sk(sk); if (sk->sk_state & (PPPOX_CONNECTED...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
188,288,037,552,233,560,000,000,000,000,000,000,000
47
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 double mp_Ixyz(_cimg_math_parser& mp) { double *ptrd = &_mp_arg(1) + 1; const unsigned int interpolation = (unsigned int)_mp_arg(5), boundary_conditions = (unsigned int)_mp_arg(6), vsiz = (unsigned int)mp.opcode[7]; const CImg<T> &img = mp.imgin; ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
166,647,567,120,764,200,000,000,000,000,000,000,000
63
Fix other issues in 'CImg<T>::load_bmp()'.
static void part_write_body(const struct message_part *part, string_t *str, bool extended) { const struct message_part_data *data = part->data; bool text; i_assert(part->data != NULL); if ((part->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822) != 0) { str_append(str, "\"message\" \"rfc822\""); text = FALSE; ...
1
[ "CWE-20" ]
core
266e54b7b8c34c9a58dd60a2e53c5ca7d1deae19
165,334,664,299,621,240,000,000,000,000,000,000,000
71
lib-imap: Don't generate invalid BODYSTRUCTURE when reaching MIME part limit If the last MIME part was message/rfc822 and its child was truncated away, BODYSTRUCTURE was missing the ENVELOPE and BODY[STRUCTURE] parts. Fixed by writing empty dummy ones.
bool OSD::ms_verify_authorizer( Connection *con, int peer_type, int protocol, bufferlist& authorizer_data, bufferlist& authorizer_reply, bool& isvalid, CryptoKey& session_key, std::unique_ptr<AuthAuthorizerChallenge> *challenge) { AuthAuthorizeHandler *authorize_handler = 0; switch (peer_type) { case CEPH...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
238,210,493,840,202,930,000,000,000,000,000,000,000
75
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
void del_aubio_tempo (aubio_tempo_t *o) { del_aubio_specdesc(o->od); del_aubio_beattracking(o->bt); del_aubio_peakpicker(o->pp); del_aubio_pvoc(o->pv); del_fvec(o->out); del_fvec(o->of); del_cvec(o->fftgrain); del_fvec(o->dfframe); del_fvec(o->onset); AUBIO_FREE(o); return; }
0
[]
aubio
b1559f4c9ce2b304d8d27ffdc7128b6795ca82e5
56,686,084,377,708,490,000,000,000,000,000,000,000
14
[tempo] fix buffer overflow in method parser
int dev_change_net_namespace(struct net_device *dev, struct net *net, const char *pat) { int err; ASSERT_RTNL(); /* Don't allow namespace local devices to be moved. */ err = -EINVAL; if (dev->features & NETIF_F_NETNS_LOCAL) goto out; /* Ensure the device has been registrered */ if (dev->reg_state != NETREG...
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
200,989,065,043,987,430,000,000,000,000,000,000,000
102
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 void scsi_disk_load_request(QEMUFile *f, SCSIRequest *req) { SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req); qemu_get_be64s(f, &r->sector); qemu_get_be32s(f, &r->sector_count); qemu_get_be32s(f, &r->buflen); if (r->buflen) { scsi_init_iovec(r, r->buflen); if (r->req.cmd.mo...
0
[ "CWE-193" ]
qemu
b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8
49,463,745,008,652,070,000,000,000,000,000,000,000
22
hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands This avoids an off-by-one read of 'mode_sense_valid' buffer in hw/scsi/scsi-disk.c:mode_sense_page(). Fixes: CVE-2021-3930 Cc: qemu-stable@nongnu.org Reported-by: Alexander Bulekov <alxndr@bu.edu> Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pa...
static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_res; zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
314,584,662,330,706,630,000,000,000,000,000,000,000
41
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
int ext4_dirblock_csum_verify(struct inode *inode, struct buffer_head *bh) { struct ext4_dir_entry_tail *t; if (!ext4_has_metadata_csum(inode->i_sb)) return 1; t = get_dirent_tail(inode, bh); if (!t) { warn_no_space_for_csum(inode); return 0; } if (t->det_checksum != ext4_dirblock_csum(inode, bh->b_data,...
0
[ "CWE-125" ]
linux
5872331b3d91820e14716632ebb56b1399b34fe1
191,012,587,888,111,070,000,000,000,000,000,000,000
19
ext4: fix potential negative array index in do_split() If for any reason a directory passed to do_split() does not have enough active entries to exceed half the size of the block, we can end up iterating over all "count" entries without finding a split point. In this case, count == move, and split will be zero, and w...
xmlRegPrintAtom(FILE *output, xmlRegAtomPtr atom) { fprintf(output, " atom: "); if (atom == NULL) { fprintf(output, "NULL\n"); return; } if (atom->neg) fprintf(output, "not "); xmlRegPrintAtomType(output, atom->type); xmlRegPrintQuantType(output, atom->quant); if (atom->quant == XM...
0
[ "CWE-119" ]
libxml2
cbb271655cadeb8dbb258a64701d9a3a0c4835b4
254,998,746,816,710,150,000,000,000,000,000,000,000
27
Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711> * xmlregexp.c: (xmlFAParseCharRange): Only advance to the next character if there is no error. Advancing to the next character in case of an error while parsing regexp leads to an out of bounds access.
static int to_wchar(const char *path, wchar_t *wbuf, size_t wbuf_len) { int ret; char buf[MAX_PATH * 2], buf2[MAX_PATH * 2], *p; strncpy(buf, path, sizeof(buf)); buf[sizeof(buf) - 1] = '\0'; // Trim trailing slashes. Leave backslash for paths like "X:\" p = buf + strlen(buf) - 1; while (p > buf && p[-1] !...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
220,509,141,013,449,320,000,000,000,000,000,000,000
20
Protect against the directory traversal in mg_upload()
static int jpc_dec_process_eoc(jpc_dec_t *dec, jpc_ms_t *ms) { int tileno; jpc_dec_tile_t *tile; /* Eliminate compiler warnings about unused variables. */ ms = 0; for (tileno = 0, tile = dec->tiles; tileno < dec->numtiles; ++tileno, ++tile) { if (tile->state == JPC_TILE_ACTIVE) { if (jpc_dec_tiledecode(d...
0
[ "CWE-476" ]
jasper
69a1439a5381e42b06ec6a06ed2675eb793babee
88,610,995,342,852,340,000,000,000,000,000,000,000
27
The member (pi) in tiles was not properly initialized. This is now corrected. Also, each tile is now only cleaned up once.
static bool is_finite(const int) { return true; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
212,026,072,346,134,570,000,000,000,000,000,000,000
1
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void i40e_vsi_map_rings_to_vectors(struct i40e_vsi *vsi) { int qp_remaining = vsi->num_queue_pairs; int q_vectors = vsi->num_q_vectors; int num_ringpairs; int v_start = 0; int qp_idx = 0; /* If we don't have enough vectors for a 1-to-1 mapping, we'll have to * group them so there are multiple queues per...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
55,779,210,914,214,180,000,000,000,000,000,000,000
35
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
run_daemon(const char* cfgfile, int cmdline_verbose, int debug_mode, int need_pidfile) { struct config_file* cfg = NULL; struct daemon* daemon = NULL; int done_setup = 0; if(!(daemon = daemon_init())) fatal_exit("alloc failure"); while(!daemon->need_to_exit) { if(done_setup) verbose(VERB_OPS, "Restart of %...
0
[ "CWE-59" ]
unbound
ad387832979b6ce4c93f64fe706301cd7d034e87
18,168,090,428,690,076,000,000,000,000,000,000,000
61
- Fix for #303 CVE-2020-28935 : Fix that symlink does not interfere with chown of pidfile.
update_selected_object_message (gboolean userTriedToSelect) { if (screen.tool != POINTER) return; gint selectionLength = selection_length (&screen.selectionInfo); if (selectionLength == 0) { if (userTriedToSelect) { /* Update status bar message to make sure the user * knows about needing to select the l...
0
[ "CWE-200" ]
gerbv
319a8af890e4d0a5c38e6d08f510da8eefc42537
84,939,790,261,789,120,000,000,000,000,000,000,000
36
Remove local alias to parameter array Normalizing access to `gerbv_simplified_amacro_t::parameter` as a step to fix CVE-2021-40402
bool is_expensive() { return orig_item->is_expensive(); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
32,054,293,424,759,344,000,000,000,000,000,000,000
1
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....