func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void xenvif_start_queue(struct xenvif *vif) { if (xenvif_schedulable(vif)) netif_wake_queue(vif->dev); }
0
[ "CWE-399" ]
net-next
e9d8b2c2968499c1f96563e6522c56958d5a1d0d
320,996,004,566,446,000,000,000,000,000,000,000,000
5
xen-netback: disable rogue vif in kthread context When netback discovers frontend is sending malformed packet it will disables the interface which serves that frontend. However disabling a network interface involving taking a mutex which cannot be done in softirq context, so we need to defer this process to kthread c...
RestoreMAC(PPARANDIS_ADAPTER pContext) { SetDeviceMAC(pContext, pContext->PermanentMacAddress); }
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
154,910,504,236,048,000,000,000,000,000,000,000,000
4
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
GF_Err tref_box_size(GF_Box *s) { return GF_OK; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
247,939,136,416,257,700,000,000,000,000,000,000,000
4
fixed #2255
closeSess(ptcpsess_t *pSess) { int sock; DEFiRet; if(pSess->compressionMode >= COMPRESS_STREAM_ALWAYS) doZipFinish(pSess); sock = pSess->sock; CHKiRet(removeEPollSock(sock, pSess->epd)); close(sock); pthread_mutex_lock(&pSess->pLstn->pSrv->mutSessLst); /* finally unlink session from structures */ if(pSes...
0
[ "CWE-190" ]
rsyslog
0381a0de64a5a048c3d48b79055bd9848d0c7fc2
78,230,658,779,901,680,000,000,000,000,000,000,000
31
imptcp: fix Segmentation Fault when octet count is to high
static int afiucv_hs_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) { struct sock *sk; struct iucv_sock *iucv; struct af_iucv_trans_hdr *trans_hdr; char nullstring[8]; int err = 0; skb_pull(skb, ETH_HLEN); trans_hdr = (struct af_iucv_trans_hdr *)skb->data;...
0
[ "CWE-200" ]
linux
a5598bd9c087dc0efc250a5221e5d0e6f584ee88
166,410,114,770,750,360,000,000,000,000,000,000,000
97
iucv: Fix missing msg_namelen update in iucv_sock_recvmsg() The current code does not fill the msg_name member in case it is set. It also does not set the msg_namelen member to 0 and therefore makes net/socket.c leak the local, uninitialized sockaddr_storage variable to userland -- 128 bytes of kernel stack memory. F...
QPDFObjectHandle::newUnicodeString(std::string const& utf8_str) { return QPDFObjectHandle(QPDF_String::new_utf16(utf8_str)); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
86,776,028,250,403,130,000,000,000,000,000,000,000
4
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
isdn_net_get_stats(struct net_device *dev) { isdn_net_local *lp = (isdn_net_local *) dev->priv; return &lp->stats; }
0
[ "CWE-119" ]
linux-2.6
0f13864e5b24d9cbe18d125d41bfa4b726a82e40
193,682,756,496,044,700,000,000,000,000,000,000,000
5
isdn: avoid copying overly-long strings Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9416 Signed-off-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
HTTP_GetHdrPack(struct worker *wrk, struct objcore *oc, hdr_t hdr) { const char *ptr; unsigned l; CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC); AN(hdr); l = hdr[0]; assert(l > 0); assert(l == strlen(hdr + 1)); assert(hdr[l] == ':'); hdr++; if (hdr[0] == ':') { /* Special ca...
0
[ "CWE-703" ]
varnish-cache
c5fd097e5cce8b461c6443af02b3448baef2491d
183,478,096,175,481,000,000,000,000,000,000,000,000
44
Do not call http_hdr_flags() on pseudo-headers In http_EstimateWS(), all headers are passed to the http_isfiltered() function to calculate how many bytes is needed to serialize the entire struct http. http_isfiltered() will check the headers for whether they are going to be filtered out later and if so skip them. How...
PHPAPI zval* php_get_session_var(zend_string *name) /* {{{ */ { IF_SESSION_VARS() { return zend_hash_find(Z_ARRVAL_P(Z_REFVAL(PS(http_session_vars))), name); } return NULL; }
0
[ "CWE-476" ]
php-src
d76f7c6c636b8240e06a1fa29eebb98ad005008a
107,955,880,952,562,020,000,000,000,000,000,000,000
7
Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress
static u64 get_time_ref_counter(struct kvm *kvm) { struct kvm_hv *hv = to_kvm_hv(kvm); struct kvm_vcpu *vcpu; u64 tsc; /* * Fall back to get_kvmclock_ns() when TSC page hasn't been set up, * is broken, disabled or being updated. */ if (hv->hv_tsc_page_status != HV_TSC_PAGE_SET) return div_u64(get_kvmclock...
0
[ "CWE-476" ]
linux
7ec37d1cbe17d8189d9562178d8b29167fe1c31a
313,215,963,036,911,600,000,000,000,000,000,000,000
18
KVM: x86: Check lapic_in_kernel() before attempting to set a SynIC irq When KVM_CAP_HYPERV_SYNIC{,2} is activated, KVM already checks for irqchip_in_kernel() so normally SynIC irqs should never be set. It is, however, possible for a misbehaving VMM to write to SYNIC/STIMER MSRs causing erroneous behavior. The immedi...
void snd_usb_mixer_notify_id(struct usb_mixer_interface *mixer, int unitid) { struct usb_mixer_elem_list *list; for (list = mixer->id_elems[unitid]; list; list = list->next_id_elem) snd_ctl_notify(mixer->chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &list->kctl->id); }
0
[ "CWE-416", "CWE-787" ]
linux
124751d5e63c823092060074bd0abaae61aaa9c4
162,142,965,508,620,990,000,000,000,000,000,000,000
8
ALSA: usb-audio: Kill stray URB at exiting USB-audio driver may leave a stray URB for the mixer interrupt when it exits by some error during probe. This leads to a use-after-free error as spotted by syzkaller like: ================================================================== BUG: KASAN: use-after-free in sn...
template <> HeaderMapImpl::StaticLookupTable<RequestTrailerMap>::StaticLookupTable() { finalizeTable(); }
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
259,738,587,723,151,320,000,000,000,000,000,000,000
3
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...
flatpak_context_reset_non_permissions (FlatpakContext *context) { g_hash_table_remove_all (context->env_vars); }
0
[ "CWE-94", "CWE-74" ]
flatpak
6e5ae7a109cdfa9735ea7ccbd8cb79f9e8d3ae8b
153,687,053,639,468,820,000,000,000,000,000,000,000
4
context: Add --env-fd option This allows environment variables to be added to the context without making their values visible to processes running under a different uid, which might be significant if the variable's value is a token or some other secret value. Signed-off-by: Simon McVittie <smcv@collabora.com> Part-of...
void Compute(OpKernelContext* ctx) override { const Tensor& sorted_inputs_t = ctx->input(0); const Tensor& values_t = ctx->input(1); // inputs must be at least a matrix OP_REQUIRES( ctx, sorted_inputs_t.shape().dims() >= 2, errors::InvalidArgument("sorted input argument must be a matr...
0
[ "CWE-125", "CWE-369" ]
tensorflow
42459e4273c2e47a3232cc16c4f4fff3b3a35c38
31,617,833,344,016,785,000,000,000,000,000,000,000
38
Prevent CHECK-fail/heap OOB in UpperBound and LowerBound PiperOrigin-RevId: 387738073 Change-Id: Iee74de95ddad18440d052a75a5a1cb67544f490a
static int fuse_writepage_locked(struct page *page) { struct address_space *mapping = page->mapping; struct inode *inode = mapping->host; struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_inode *fi = get_fuse_inode(inode); struct fuse_req *req; struct fuse_file *ff; struct page *tmp_page; set_page_write...
0
[]
linux-2.6
0bd87182d3ab18a32a8e9175d3f68754c58e3432
27,727,318,752,504,030,000,000,000,000,000,000,000
55
fuse: fix kunmap in fuse_ioctl_copy_user Looks like another victim of the confusing kmap() vs kmap_atomic() API differences. Reported-by: Todor Gyumyushev <yodor1@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Tejun Heo <tj@kernel.org> Cc: stable@kern...
void gnutls_global_set_log_level(int level) { _gnutls_log_level = level; }
0
[ "CWE-20" ]
gnutls
b0a3048e56611a2deee4976aeba3b8c0740655a6
85,761,715,127,389,170,000,000,000,000,000,000,000
4
env: use secure_getenv when reading environment variables
static void snap_all_rawfb(void) { int pixelsize = bpp/8; int n, sz; char *dst; static char *unclipped_dst = NULL; static int unclipped_len = 0; dst = snap->data; if (xform24to32 && bpp == 32) { pixelsize = 3; } sz = dpy_y * snap->bytes_per_line; if (wdpy_x > dpy_x || wdpy_y > dpy_y) { sz = wdpy_x * wd...
0
[ "CWE-862", "CWE-284", "CWE-732" ]
x11vnc
69eeb9f7baa14ca03b16c9de821f9876def7a36a
152,039,501,147,350,800,000,000,000,000,000,000,000
64
scan: limit access to shared memory segments to current user
send_environment (GdmSession *self, GdmSessionConversation *conversation) { g_hash_table_foreach (self->priv->environment, (GHFunc) send_environment_variable, conversation); }
0
[]
gdm
5ac224602f1d603aac5eaa72e1760d3e33a26f0a
145,353,515,541,701,630,000,000,000,000,000,000,000
8
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
history_node_new(void) { OnigCaptureTreeNode* node; node = (OnigCaptureTreeNode* )xmalloc(sizeof(OnigCaptureTreeNode)); CHECK_NULL_RETURN(node); node->childs = (OnigCaptureTreeNode** )0; node->allocated = 0; node->num_childs = 0; node->group = -1; node->beg = ONIG_REGION_NOTPOS; n...
0
[ "CWE-125" ]
oniguruma
d3e402928b6eb3327f8f7d59a9edfa622fec557b
264,551,215,636,202,340,000,000,000,000,000,000,000
16
fix heap-buffer-overflow
scanf_fmt_to_regpat( char_u **pefmp, char_u *efm, int len, char_u *regpat) { char_u *efmp = *pefmp; if (*efmp == '[' || *efmp == '\\') { if ((*regpat++ = *efmp) == '[') // %*[^a-z0-9] etc. { if (efmp[1] == '^') *regpat++ = *++efmp; if (efmp < efm + len) { *regpat++ = *++efmp; /...
0
[ "CWE-416" ]
vim
4f1b083be43f351bc107541e7b0c9655a5d2c0bb
39,573,065,912,090,280,000,000,000,000,000,000,000
43
patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any.
SYSCALL_DEFINE2(pivot_root, const char __user *, new_root, const char __user *, put_old) { struct path new, old, parent_path, root_parent, root; struct mount *new_mnt, *root_mnt, *old_mnt; struct mountpoint *old_mp, *root_mp; int error; if (!may_mount()) return -EPERM; error = user_path_dir(new_root, &new);...
0
[ "CWE-703" ]
linux
cd4a40174b71acd021877341684d8bb1dc8ea4ae
172,636,580,268,337,760,000,000,000,000,000,000,000
97
mnt: Fail collect_mounts when applied to unmounted mounts The only users of collect_mounts are in audit_tree.c In audit_trim_trees and audit_add_tree_rule the path passed into collect_mounts is generated from kern_path passed an audit_tree pathname which is guaranteed to be an absolute path. In those cases collect_...
SYSCALL_DEFINE3(getresuid, uid_t __user *, ruid, uid_t __user *, euid, uid_t __user *, suid) { const struct cred *cred = current_cred(); int retval; if (!(retval = put_user(cred->uid, ruid)) && !(retval = put_user(cred->euid, euid))) retval = put_user(cred->suid, suid); return retval; }
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
289,366,562,220,947,740,000,000,000,000,000,000,000
11
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
TEST(BasicFlatBufferModel, TestEmptyModels) { auto model = FlatBufferModel::BuildFromFile( "tensorflow/lite/testdata/empty_model.bin"); ASSERT_TRUE(model); // Now try to build it into a model. std::unique_ptr<Interpreter> interpreter; ASSERT_EQ(InterpreterBuilder(*model, TrivialResolver())(&interpreter)...
0
[ "CWE-703", "CWE-835" ]
tensorflow
c6173f5fe66cdbab74f4f869311fe6aae2ba35f4
117,759,949,802,590,680,000,000,000,000,000,000,000
10
TFLite: Error out when the graph has a recurion. Recursion is currently unsupported. PiperOrigin-RevId: 371708957 Change-Id: I8dfad0d85cbfe08e39ae8ea7bad21254ddee5003
static inline const char* proto_name(u16 pid) { switch (pid) { case PID_LCP: return "LCP"; case PID_IPCP: return "IPCP"; case PID_IPV6CP: return "IPV6CP"; default: return NULL; } }
0
[ "CWE-20" ]
net
66d42ed8b25b64eb63111a2b8582c5afc8bf1105
306,089,674,168,979,470,000,000,000,000,000,000,000
13
hdlc_ppp: add range checks in ppp_cp_parse_cr() There are a couple bugs here: 1) If opt[1] is zero then this results in a forever loop. If the value is less than 2 then it is invalid. 2) It assumes that "len" is more than sizeof(valid_accm) or 6 which can result in memory corruption. In the case of LCP_OPTION_...
ast2obj_stmt(void* _o) { stmt_ty o = (stmt_ty)_o; PyObject *result = NULL, *value = NULL; if (!o) { Py_RETURN_NONE; } switch (o->kind) { case FunctionDef_kind: result = PyType_GenericNew(FunctionDef_type, NULL, NULL); if (!result) goto failed; value = ast2obj_ide...
1
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
21,533,728,796,294,774,000,000,000,000,000,000,000
432
bpo-35766: Merge typed_ast back into CPython (GH-11645)
initialize_job_signals () { if (interactive) { set_signal_handler (SIGINT, sigint_sighandler); set_signal_handler (SIGTSTP, SIG_IGN); set_signal_handler (SIGTTOU, SIG_IGN); set_signal_handler (SIGTTIN, SIG_IGN); } else if (job_control) { old_tstp = set_signal_handler (SIGTS...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
163,574,773,741,010,760,000,000,000,000,000,000,000
18
bash-4.4-rc2 release
static int __ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr, unsigned int mode) { __be32 addr = imr->imr_multiaddr.s_addr; struct ip_mc_socklist *iml, *i; struct in_device *in_dev; struct inet_sock *inet = inet_sk(sk); struct net *net = sock_net(sk); int ifindex; int count = 0; int err; ASSER...
0
[ "CWE-362" ]
linux
23d2b94043ca8835bd1e67749020e839f396a1c2
321,388,427,922,449,630,000,000,000,000,000,000,000
49
igmp: Add ip_mc_list lock in ip_check_mc_rcu I got below panic when doing fuzz test: Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 4056 Comm: syz-executor.3 Tainted: G B 5.14.0-rc1-00195-gcff5c4254439-dirty #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9...
~Processor() { delete listen_handler; };
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
293,476,769,170,173,770,000,000,000,000,000,000,000
1
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 ...
xmlXPtrCoveringRange(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr loc) { if (loc == NULL) return(NULL); if ((ctxt == NULL) || (ctxt->context == NULL) || (ctxt->context->doc == NULL)) return(NULL); switch (loc->type) { case XPATH_POINT: return(xmlXPtrNewRange(loc->user, loc->index, ...
0
[ "CWE-415" ]
libxml2
f5048b3e71fc30ad096970b8df6e7af073bae4cb
253,254,011,700,472,980,000,000,000,000,000,000,000
50
Hardening of XPath evaluation Add a mechanism of frame for XPath evaluation when entering a function or a scoped evaluation, also fix a potential problem in predicate evaluation.
static void set_pixel_conversion(VncState *vs) { if ((vs->clientds.flags & QEMU_BIG_ENDIAN_FLAG) == (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG) && !memcmp(&(vs->clientds.pf), &(vs->ds->surface->pf), sizeof(PixelFormat))) { vs->write_pixels = vnc_write_pixels_copy; vnc_hextile_se...
1
[ "CWE-125" ]
qemu
9f64916da20eea67121d544698676295bbb105a7
219,465,964,382,771,750,000,000,000,000,000,000,000
12
pixman/vnc: use pixman images in vnc. The vnc code uses *three* DisplaySurfaces: First is the surface of the actual QemuConsole, usually the guest screen, but could also be a text console (monitor/serial reachable via Ctrl-Alt-<nr> keys). This is left as-is. Second is the current server's view of the screen content...
scanner_scan_post_primary_expression (parser_context_t *context_p, /**< context */ scanner_context_t *scanner_context_p, /**< scanner context */ lexer_token_type_t type, /**< current token type */ scan_stac...
0
[ "CWE-476", "CWE-703", "CWE-754" ]
jerryscript
69f8e78c2f8d562bd6d8002b5488f1662ac30d24
123,614,422,951,049,860,000,000,000,000,000,000,000
82
Fix error handling in scanner when in case of OOM (#3793) This patch fixes #3786 and fixes #3788. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
static int vnc_client_read(VncState *vs) { ssize_t ret; #ifdef CONFIG_VNC_SASL if (vs->sasl.conn && vs->sasl.runSSF) ret = vnc_client_read_sasl(vs); else #endif /* CONFIG_VNC_SASL */ ret = vnc_client_read_plain(vs); if (!ret) { if (vs->disconnecting) { vnc_disconnect...
0
[ "CWE-772" ]
qemu
d3b0db6dfea6b3a9ee0d96aceb796bdcafa84314
48,934,312,525,573,355,000,000,000,000,000,000,000
36
vnc: Set default kbd delay to 10ms The current VNC default keyboard delay is 1ms. With that we're constantly typing faster than the guest receives keyboard events from an XHCI attached USB HID device. The default keyboard delay time in the input layer however is 10ms. I don't know how that number came to be, but empi...
int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len, unsigned copied, struct page *page) { int ret, no_expand; void *kaddr; struct ext4_iloc iloc; if (unlikely(copied < len)) { if (!PageUptodate(page)) { copied = 0; goto out; } } ret = ext4_get_inode_loc(inode, &iloc...
0
[ "CWE-416" ]
linux
117166efb1ee8f13c38f9e96b258f16d4923f888
338,075,573,118,647,500,000,000,000,000,000,000,000
36
ext4: do not allow external inodes for inline data The inline data feature was implemented before we added support for external inodes for xattrs. It makes no sense to support that combination, but the problem is that there are a number of extended attribute checks that are skipped if e_value_inum is non-zero. Unfor...
static int h2_session_continue_data(h2_session *session) { if (h2_mplx_has_master_events(session->mplx)) { return 0; } if (h2_conn_io_needs_flush(&session->io)) { return 0; } return 1; }
0
[]
mod_h2
5e75e5685dd043fe93a5a08a15edd087a43f6968
234,830,566,346,100,080,000,000,000,000,000,000,000
9
v1.11.0 -------------------------------------------------------------------------------- * connection IO event handling reworked. Instead of reacting on incoming bytes, the state machine now acts on incoming frames that are affecting it. This reduces state transitions. * pytest suite now covers some basic tests...
static double mp_matrix_inv(_cimg_math_parser& mp) { double *ptrd = &_mp_arg(1) + 1; const double *ptr1 = &_mp_arg(2) + 1; const unsigned int k = (unsigned int)mp.opcode[3]; CImg<doubleT>(ptrd,k,k,1,1,true) = CImg<doubleT>(ptr1,k,k,1,1,true).get_invert(); return cimg::type...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
262,096,082,706,490,270,000,000,000,000,000,000,000
7
Fix other issues in 'CImg<T>::load_bmp()'.
static void local_cleanup(struct nfc_llcp_local *local) { nfc_llcp_socket_release(local, false, ENXIO); del_timer_sync(&local->link_timer); skb_queue_purge(&local->tx_queue); cancel_work_sync(&local->tx_work); cancel_work_sync(&local->rx_work); cancel_work_sync(&local->timeout_work); kfree_skb(local->rx_pending)...
0
[ "CWE-476" ]
linux
58bdd544e2933a21a51eecf17c3f5f94038261b5
60,638,538,679,862,230,000,000,000,000,000,000,000
13
net: nfc: Fix NULL dereference on nfc_llcp_build_tlv fails KASAN report this: BUG: KASAN: null-ptr-deref in nfc_llcp_build_gb+0x37f/0x540 [nfc] Read of size 3 at addr 0000000000000000 by task syz-executor.0/5401 CPU: 0 PID: 5401 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45 Hardware name: QEMU Standard PC (i440FX ...
static void io_free_req_deferred(struct io_kiocb *req) { req->io_task_work.func = io_free_req; io_req_task_work_add(req); }
0
[ "CWE-125" ]
linux
89c2b3b74918200e46699338d7bcc19b1ea12110
230,688,452,574,089,100,000,000,000,000,000,000,000
5
io_uring: reexpand under-reexpanded iters [ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900 [ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task syz-executor.0/828 [ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted 5.14.0-rc3-next-20210730 #1 [ 74.216525] Hardware n...
EvalPlanQualEnd(EPQState *epqstate) { EState *estate = epqstate->estate; MemoryContext oldcontext; ListCell *l; if (estate == NULL) return; /* idle, so nothing to do */ oldcontext = MemoryContextSwitchTo(estate->es_query_cxt); ExecEndNode(epqstate->planstate); foreach(l, estate->es_subplanstates) ...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
136,560,099,058,775,870,000,000,000,000,000,000,000
42
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
static void xmlGROW (xmlParserCtxtPtr ctxt) { xmlParserInputGrow(ctxt->input, INPUT_CHUNK); if ((ctxt->input->cur != NULL) && (*ctxt->input->cur == 0) && (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) xmlPopInput(ctxt); }
0
[ "CWE-125" ]
libxml2
77404b8b69bc122d12231807abf1a837d121b551
233,225,653,735,508,800,000,000,000,000,000,000,000
6
Make sure the parser returns when getting a Stop order patch backported from chromiun bug fixes, assuming author is Chris
static inline void tipc_aead_put(struct tipc_aead *aead) { if (aead && refcount_dec_and_test(&aead->refcnt)) call_rcu(&aead->rcu, tipc_aead_free); }
0
[ "CWE-20" ]
linux
fa40d9734a57bcbfa79a280189799f76c88f7bb0
209,583,351,158,665,560,000,000,000,000,000,000,000
5
tipc: fix size validations for the MSG_CRYPTO type The function tipc_crypto_key_rcv is used to parse MSG_CRYPTO messages to receive keys from other nodes in the cluster in order to decrypt any further messages from them. This patch verifies that any supplied sizes in the message body are valid for the received message...
static void cirrus_bitblt_reset(CirrusVGAState * s) { int need_update; s->vga.gr[0x31] &= ~(CIRRUS_BLT_START | CIRRUS_BLT_BUSY | CIRRUS_BLT_FIFOUSED); need_update = s->cirrus_srcptr != &s->cirrus_bltbuf[0] || s->cirrus_srcptr_end != &s->cirrus_bltbuf[0]; s->cirrus_srcptr = &s->cirrus_bltbuf[0]...
0
[ "CWE-119" ]
qemu
026aeffcb4752054830ba203020ed6eb05bcaba8
101,497,024,626,396,100,000,000,000,000,000,000,000
15
cirrus: stop passing around dst pointers in the blitter Instead pass around the address (aka offset into vga memory). Calculate the pointer in the rop_* functions, after applying the mask to the address, to make sure the address stays within the valid range. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-i...
int bcf_add_filter(const bcf_hdr_t *hdr, bcf1_t *line, int flt_id) { if ( !(line->unpacked & BCF_UN_FLT) ) bcf_unpack(line, BCF_UN_FLT); int i; for (i=0; i<line->d.n_flt; i++) if ( flt_id==line->d.flt[i] ) break; if ( i<line->d.n_flt ) return 0; // this filter is already set line->d.share...
0
[ "CWE-787" ]
htslib
dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c
165,034,162,948,992,700,000,000,000,000,000,000,000
18
Fix check for VCF record size The check for excessive record size in vcf_parse_format() only looked at individual fields. It was therefore possible to exceed the limit and overflow fmt_aux_t::offset by having multiple fields with a combined size that went over INT_MAX. Fix by including the amount of memory used so fa...
static ssize_t ucma_resolve_ip(struct ucma_file *file, const char __user *inbuf, int in_len, int out_len) { struct rdma_ucm_resolve_ip cmd; struct ucma_context *ctx; int ret; if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; if ((cmd.src_addr.sin6_family && !rdma_addr_size_in6(&...
0
[ "CWE-416" ]
linux
f5449e74802c1112dea984aec8af7a33c4516af1
253,289,718,977,341,140,000,000,000,000,000,000,000
26
RDMA/ucma: Rework ucma_migrate_id() to avoid races with destroy ucma_destroy_id() assumes that all things accessing the ctx will do so via the xarray. This assumption violated only in the case the FD is being closed, then the ctx is reached via the ctx_list. Normally this is OK since ucma_destroy_id() cannot run concu...
static void allwinner_ahci_init(Object *obj) { SysbusAHCIState *s = SYSBUS_AHCI(obj); AllwinnerAHCIState *a = ALLWINNER_AHCI(obj); memory_region_init_io(&a->mmio, OBJECT(obj), &allwinner_ahci_mem_ops, a, "allwinner-ahci", ALLWINNER_AHCI_MMIO_SIZE); memory_region_add_subregion(...
0
[ "CWE-772", "CWE-401" ]
qemu
d68f0f778e7f4fbd674627274267f269e40f0b04
14,102,925,873,973,660,000,000,000,000,000,000,000
10
ide: ahci: call cleanup function in ahci unit This can avoid memory leak when hotunplug the ahci device. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Message-id: 1488449293-80280-4-git-send-email-liqiang6-s@360.cn Signed-off-by: John Snow <jsnow@redhat.com>
static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd, struct iovec *iov, unsigned int iov_cnt) { VirtIODevice *vdev = VIRTIO_DEVICE(n); struct virtio_net_ctrl_mac mac_data; size_t s; NetClientState *nc = qemu_get_queue(n->nic); if (cmd == VIRTIO_NET_CTRL_MAC_A...
0
[ "CWE-703" ]
qemu
abe300d9d894f7138e1af7c8e9c88c04bfe98b37
276,632,167,701,179,500,000,000,000,000,000,000,000
95
virtio-net: fix map leaking on error during receive Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg") tries to fix the use after free of the sg by caching the virtqueue elements in an array and unmap them at once after receiving the packets, But it forgot to unmap the cached elements on error which ...
void Http2Session::RefreshSettings(const FunctionCallbackInfo<Value>& args) { Environment* env = Environment::GetCurrent(args); Http2Session* session; ASSIGN_OR_RETURN_UNWRAP(&session, args.Holder()); Http2Settings::Update(env, session, fn); DEBUG_HTTP2SESSION(session, "settings refreshed for session"); }
0
[]
node
ce22d6f9178507c7a41b04ac4097b9ea902049e3
121,335,166,076,474,340,000,000,000,000,000,000,000
7
http2: add altsvc support Add support for sending and receiving ALTSVC frames. PR-URL: https://github.com/nodejs/node/pull/17917 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
static bool io_poll_remove_one(struct io_kiocb *req) { bool do_complete; if (req->opcode == IORING_OP_POLL_ADD) { io_poll_remove_double(req, req->io); do_complete = __io_poll_remove_one(req, &req->poll); } else { struct async_poll *apoll = req->apoll; io_poll_remove_double(req, apoll->double_poll); /* n...
0
[ "CWE-416" ]
linux
6d816e088c359866f9867057e04f244c608c42fe
224,945,234,587,893,760,000,000,000,000,000,000,000
30
io_uring: hold 'ctx' reference around task_work queue + execute We're holding the request reference, but we need to go one higher to ensure that the ctx remains valid after the request has finished. If the ring is closed with pending task_work inflight, and the given io_kiocb finishes sync during issue, then we need a...
template<typename T> inline T sqr(const T& val) { return val*val;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
121,558,194,921,725,530,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
ftp_reinit(ftpbuf_t *ftp) { if (ftp == NULL) { return 0; } ftp_gc(ftp); ftp->nb = 0; if (!ftp_putcmd(ftp, "REIN", NULL)) { return 0; } if (!ftp_getresp(ftp) || ftp->resp != 220) { return 0; } return 1; }
1
[ "CWE-189" ]
php-src
ac2832935435556dc593784cd0087b5e576bbe4d
304,377,649,802,021,960,000,000,000,000,000,000,000
19
Fix bug #69545 - avoid overflow when reading list
QPDF_Stream::getStreamData(qpdf_stream_decode_level_e decode_level) { Pl_Buffer buf("stream data buffer"); if (! pipeStreamData(&buf, 0, decode_level, false, false)) { throw QPDFExc(qpdf_e_unsupported, qpdf->getFilename(), "", this->offset, "getStreamData called ...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
281,551,090,477,631,740,000,000,000,000,000,000,000
12
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
array_value_internal (s, quoted, flags, rtype, indp) char *s; int quoted, flags, *rtype; arrayind_t *indp; { int len; arrayind_t ind; char *akey; char *retval, *t, *temp; WORD_LIST *l; SHELL_VAR *var; var = array_variable_part (s, &t, &len); /* Expand the index, even if the variable doe...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
199,233,894,829,717,800,000,000,000,000,000,000,000
117
bash-4.4-rc2 release
} EXPORT_SYMBOL_GPL(iscsi_register_transport); int iscsi_unregister_transport(struct iscsi_transport *tt) { struct iscsi_internal *priv; unsigned long flags; BUG_ON(!tt); mutex_lock(&rx_queue_mutex); priv = iscsi_if_transport_lookup(tt); BUG_ON (!priv); spin_lock_irqsave(&iscsi_transport_lock, flags); list...
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
233,053,179,704,437,200,000,000,000,000,000,000,000
26
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
static inline void audit_get_watch(struct audit_watch *watch) { atomic_inc(&watch->count); }
0
[ "CWE-362" ]
linux-2.6
8f7b0ba1c853919b85b54774775f567f30006107
116,366,344,029,316,180,000,000,000,000,000,000,000
4
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...
int ext4_ext_map_blocks(handle_t *handle, struct inode *inode, struct ext4_map_blocks *map, int flags) { struct ext4_ext_path *path = NULL; struct ext4_extent newex, *ex, *ex2; struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); ext4_fsblk_t newblock = 0; int free_on_err = 0, err = 0, depth, ret; unsigned int all...
0
[ "CWE-200", "CWE-908" ]
linux
592acbf16821288ecdc4192c47e3774a4c48bb64
145,027,805,736,481,780,000,000,000,000,000,000,000
308
ext4: zero out the unused memory region in the extent tree block This commit zeroes out the unused memory region in the buffer_head corresponding to the extent metablock after writing the extent header and the corresponding extent node entries. This is done to prevent random uninitialized data from getting into the f...
static NTSTATUS smb_set_file_unix_info2(connection_struct *conn, struct smb_request *req, const char *pdata, int total_data, files_struct *fsp, struct smb_filename *smb_fname) { NTSTATUS status; uint32_t smb_fflags; uint32_t smb_fmask; if (total_data < 116) { return NT_STATUS_INVALID_PAR...
0
[ "CWE-787" ]
samba
22b4091924977f6437b59627f33a8e6f02b41011
225,801,835,202,761,100,000,000,000,000,000,000,000
56
CVE-2021-44142: smbd: add Netatalk xattr used by vfs_fruit to the list of private Samba xattrs This is an internal xattr that should not be user visible. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
static int pcrypt_do_parallel(struct padata_priv *padata, unsigned int *cb_cpu, struct padata_pcrypt *pcrypt) { unsigned int cpu_index, cpu, i; struct pcrypt_cpumask *cpumask; cpu = *cb_cpu; rcu_read_lock_bh(); cpumask = rcu_dereference_bh(pcrypt->cb_cpumask); if (cpumask_test_cpu(cpu, cpumask->mask)) ...
0
[ "CWE-399", "CWE-763" ]
linux
d76c68109f37cb85b243a1cf0f40313afd2bae68
327,698,826,314,837,150,000,000,000,000,000,000,000
28
crypto: pcrypt - fix freeing pcrypt instances pcrypt is using the old way of freeing instances, where the ->free() method specified in the 'struct crypto_template' is passed a pointer to the 'struct crypto_instance'. But the crypto_instance is being kfree()'d directly, which is incorrect because the memory was actual...
static int _nfs4_proc_open_confirm(struct nfs4_opendata *data) { struct nfs_server *server = NFS_SERVER(d_inode(data->dir)); struct rpc_task *task; struct rpc_message msg = { .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_OPEN_CONFIRM], .rpc_argp = &data->c_arg, .rpc_resp = &data->c_res, .rpc_cred = data->owner...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
58,831,642,294,027,880,000,000,000,000,000,000,000
38
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...
static void set_default_style(ASS_Style *style) { style->Name = strdup("Default"); style->FontName = strdup("Arial"); style->FontSize = 18; style->PrimaryColour = 0xffffff00; style->SecondaryColour = 0x00ffff00; style->OutlineColour = 0x00000000; style->Bac...
0
[ "CWE-369", "CWE-787" ]
libass
017137471d0043e0321e377ed8da48e45a3ec632
274,143,516,348,840,540,000,000,000,000,000,000,000
19
decode_font: fix subtraction broken by change to unsigned type This caused a one-byte buffer overwrite and an assertion failure. Regression in commit 910211f1c0078e37546f73e95306724358b89be2. Discovered by OSS-Fuzz. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26674. Fixes https://bugs.chromium.org/p...
const char* blosc_list_compressors(void) { static int compressors_list_done = 0; static char ret[256]; if (compressors_list_done) return ret; ret[0] = '\0'; strcat(ret, BLOSC_BLOSCLZ_COMPNAME); #if defined(HAVE_LZ4) strcat(ret, ","); strcat(ret, BLOSC_LZ4_COMPNAME); strcat(ret, ","); strcat(ret, BLOS...
0
[ "CWE-787" ]
c-blosc2
c4c6470e88210afc95262c8b9fcc27e30ca043ee
5,394,223,818,512,830,000,000,000,000,000,000,000
32
Fixed asan heap buffer overflow when not enough space to write compressed block size.
R_API RBinFile *r_bin_file_find_by_arch_bits(RBin *bin, const char *arch, int bits, const char *name) { RListIter *iter; RBinFile *binfile = NULL; RBinXtrData *xtr_data; if (!name || !arch) { return NULL; } r_list_foreach (bin->binfiles, iter, binfile) { RListIter *iter_xtr; if (!binfile->xtr_da...
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
120,866,822,861,277,880,000,000,000,000,000,000,000
34
Fix #8748 - Fix oobread on string search
static void force_swapin_readahead(struct vm_area_struct *vma, unsigned long start, unsigned long end) { struct mm_walk walk = { .mm = vma->vm_mm, .pmd_entry = swapin_walk_pmd_entry, .private = vma, }; walk_page_range(start, end, &walk); lru_add_drain(); /* Push any new pages onto the LRU now */ }
0
[ "CWE-703", "CWE-835" ]
linux
6ea8d958a2c95a1d514015d4e29ba21a8c0a1a91
97,539,341,019,763,930,000,000,000,000,000,000,000
13
mm/madvise.c: fix madvise() infinite loop under special circumstances MADVISE_WILLNEED has always been a noop for DAX (formerly XIP) mappings. Unfortunately madvise_willneed() doesn't communicate this information properly to the generic madvise syscall implementation. The calling convention is quite subtle there. ma...
static int superblock_alloc_security(struct super_block *sb) { struct superblock_security_struct *sbsec; sbsec = kzalloc(sizeof(struct superblock_security_struct), GFP_KERNEL); if (!sbsec) return -ENOMEM; mutex_init(&sbsec->lock); INIT_LIST_HEAD(&sbsec->isec_head); spin_lock_init(&sbsec->isec_lock); sbsec->s...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
94,452,856,161,697,600,000,000,000,000,000,000,000
19
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
TEST_F(QueryPlannerTest, LessThanEqual) { addIndex(BSON("x" << 1)); runQuery(BSON("x" << BSON("$lte" << 5))); ASSERT_EQUALS(getNumSolutions(), 2U); assertSolutionExists("{cscan: {dir: 1, filter: {x: {$lte: 5}}}}"); assertSolutionExists( "{fetch: {filter: null, node: {ixscan: " "{fi...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
48,548,720,472,398,210,000,000,000,000,000,000,000
11
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
static inline bool check_lba_range(SCSIDiskState *s, uint64_t sector_num, uint32_t nb_sectors) { /* * The first line tests that no overflow happens when computing the last * sector. The second line tests that the last accessed sector is in * range. * * Ca...
0
[ "CWE-193" ]
qemu
b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8
193,867,582,278,173,100,000,000,000,000,000,000,000
15
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 void call_nt_transact_query_security_desc(connection_struct *conn, struct smb_request *req, uint16 **ppsetup, uint32 setup_count, char **ppparams, uint32 parameter_count, char **ppdata, uint32 data_count, uint32 max_data_count) { char *params = *ppparams; ...
0
[ "CWE-189" ]
samba
6ef0e33fe8afa0ebb81652b9d42b42d20efadf04
92,181,884,328,022,640,000,000,000,000,000,000,000
155
Fix bug #10010 - Missing integer wrap protection in EA list reading can cause server to loop with DOS. Ensure we never wrap whilst adding client provided input. CVE-2013-4124 Signed-off-by: Jeremy Allison <jra@samba.org>
static int read_next_command(void) { static int stdin_eof = 0; if (stdin_eof) { unread_command_buf = 0; return EOF; } for (;;) { const char *p; if (unread_command_buf) { unread_command_buf = 0; } else { struct recent_command *rc; strbuf_detach(&command_buf, NULL); stdin_eof = strbuf_getlin...
0
[]
git
68061e3470210703cb15594194718d35094afdc0
308,147,512,068,894,970,000,000,000,000,000,000,000
57
fast-import: disallow "feature export-marks" by default The fast-import stream command "feature export-marks=<path>" lets the stream write marks to an arbitrary path. This may be surprising if you are running fast-import against an untrusted input (which otherwise cannot do anything except update Git objects and refs)...
int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock, struct socket *intr_sock) { struct hidp_session *session, *s; int vendor, product; int err; BT_DBG(""); if (bacmp(&bt_sk(ctrl_sock->sk)->src, &bt_sk(intr_sock->sk)->src) || bacmp(&bt_sk(ctrl_sock->sk)->dst, &bt_sk(intr_sock->sk)->...
0
[ "CWE-200" ]
linux
0a9ab9bdb3e891762553f667066190c1d22ad62b
136,848,222,611,903,320,000,000,000,000,000,000,000
150
Bluetooth: Fix incorrect strncpy() in hidp_setup_hid() The length parameter should be sizeof(req->name) - 1 because there is no guarantee that string provided by userspace will contain the trailing '\0'. Can be easily reproduced by manually setting req->name to 128 non-zero bytes prior to ioctl(HIDPCONNADD) and check...
_pickle_Unpickler_load_impl(UnpicklerObject *self) /*[clinic end generated code: output=fdcc488aad675b14 input=acbb91a42fa9b7b9]*/ { UnpicklerObject *unpickler = (UnpicklerObject*)self; /* Check whether the Unpickler was initialized correctly. This prevents segfaulting if a subclass overridden __init__ ...
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
301,801,444,524,544,570,000,000,000,000,000,000,000
19
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
static void ept_update_paging_mode_cr0(unsigned long *hw_cr0, unsigned long cr0, struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); if (!kvm_register_is_available(vcpu, VCPU_EXREG_CR3)) vmx_cache_reg(vcpu, VCPU_EXREG_CR3); if (!(cr0 & X86_CR0_PG)) { /* From paging/starting to nonpaging */ ...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
63,835,304,672,563,410,000,000,000,000,000,000,000
25
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
static void on_state_event(h2_stream *stream, h2_stream_event_t ev) { if (stream->monitor && stream->monitor->on_state_event) { stream->monitor->on_state_event(stream->monitor->ctx, stream, ev); } }
0
[ "CWE-770" ]
mod_h2
dd05d49abe0f67512ce9ed5ba422d7711effecfb
30,970,961,311,514,314,000,000,000,000,000,000,000
6
* fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now, mpm event backport to 2.4.x up for vote). * Fixes stream cleanup when connection throttling is in place. * Counts stream resets by client on streams initiated by client as cause for connection throttling. * Header length checks are no...
void xpendingCommand(client *c) { int justinfo = c->argc == 3; /* Without the range just outputs general informations about the PEL. */ robj *key = c->argv[1]; robj *groupname = c->argv[2]; robj *consumername = (c->argc == 7) ? c->argv[6] : NULL; streamID startid,...
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
133,908,482,991,642,440,000,000,000,000,000,000,000
141
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
char *_q_strunchar(char *str, char head, char tail) { if (str == NULL) return NULL; int len = strlen(str); if (len >= 2 && str[0] == head && str[len-1] == tail) { memmove(str, str + 1, len - 2); str[len - 2] = '\0'; } return str; }
0
[ "CWE-94" ]
qdecoder
ce7c8a7ac450a823a11b06508ef1eb7441241f81
188,546,848,839,331,270,000,000,000,000,000,000,000
12
security update: add check on improperly encoded input
template<typename t> CImg<T>& set_vector_at(const CImg<t>& vec, const unsigned int x, const unsigned int y=0, const unsigned int z=0) { if (x<_width && y<_height && z<_depth) { const t *ptrs = vec._data; const ulongT whd = (ulongT)_width*_height*_depth; T *ptrd = data(x,y,z); ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
285,479,430,696,999,840,000,000,000,000,000,000,000
11
Fix other issues in 'CImg<T>::load_bmp()'.
s_aes_set_key(stream_aes_state * state, const unsigned char *key, int keylength) { int code = 0; if ( (keylength < 1) || (keylength > SAES_MAX_KEYLENGTH) ) return_error(gs_error_rangecheck); if (key == NULL) return_error(gs_error_invalidaccess); /* we can't set the ke...
0
[]
ghostpdl
8e9ce5016db968b40e4ec255a3005f2786cce45f
317,233,406,268,550,600,000,000,000,000,000,000,000
24
Bug 699665 "memory corruption in aesdecode" The specimen file calls aesdecode without specifying the key to be used, though it does manage to do enough work with the PDF interpreter routines to get access to aesdecode (which isn't normally available). This causes us to read uninitialised memory, which can (and often ...
static void build_mixer_unit_ctl(struct mixer_build *state, struct uac_mixer_unit_descriptor *desc, int in_pin, int in_ch, int num_outs, int unitid, struct usb_audio_term *iterm) { struct usb_mixer_elem_info *cval; unsigned int i, len; struct snd_kcontrol *kctl; const struct usbmix_name_map *map; m...
0
[ "CWE-674" ]
sound
19bce474c45be69a284ecee660aa12d8f1e88f18
54,451,465,084,859,170,000,000,000,000,000,000,000
53
ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term `check_input_term` recursively calls itself with input from device side (e.g., uac_input_terminal_descriptor.bCSourceID) as argument (id). In `check_input_term`, if `check_input_term` is called with the same `id` argument as the caller, it triggers e...
static void tg3_read_bc_ver(struct tg3 *tp) { u32 val, offset, start, ver_offset; int i, dst_off; bool newver = false; if (tg3_nvram_read(tp, 0xc, &offset) || tg3_nvram_read(tp, 0x4, &start)) return; offset = tg3_nvram_logical_addr(tp, offset); if (tg3_nvram_read(tp, offset, &val)) return; if ((val ...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
187,191,202,022,195,600,000,000,000,000,000,000,000
51
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
static int compare_fields_by_table_order(Item *field1, Item *field2, void *table_join_idx) { int cmp= 0; bool outer_ref= 0; Item *field1_real= field1->real_item(); Item *field2_real= field2->real_item(); if (field1->const_item(...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
128,711,453,874,035,820,000,000,000,000,000,000,000
94
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
static char *get_param(char *p, char *q, bool *advance) { *advance = false; if (p[2]) /* the parameter's in the option */ return nasm_skip_spaces(p + 2); if (q && q[0]) { *advance = true; return q; } nasm_error(ERR_NONFATAL | ERR_NOFILE | ERR_USAGE, "option `...
0
[ "CWE-476" ]
nasm
e996d28c70d45008085322b442b44a9224308548
35,783,178,459,715,320,000,000,000,000,000,000,000
13
labels: Don't nil dereference if no label provided An equ without label may cause nil dereference | equ 0x100 Fixes 98578071b9d71ecaa2344dd9c185237c1765041e Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
static char *decode_text_string(const char *str, size_t str_len) { int idx, is_hex, is_utf16be, ascii_idx; char *ascii, hex_buf[5] = {0}; is_hex = is_utf16be = idx = ascii_idx = 0; /* Regular encoding */ if (str[0] == '(') { ascii = safe_calloc(strlen(str) + 1); strncpy(ascii...
0
[ "CWE-787" ]
pdfresurrect
0c4120fffa3dffe97b95c486a120eded82afe8a6
328,547,767,503,477,300,000,000,000,000,000,000,000
44
Zero and sanity check all dynamic allocs. This addresses the memory issues in Issue #6 expressed in calloc_some.pdf and malloc_some.pdf
void Chapter::ShallowCopy(Chapter* dst) const { dst->id_ = id_; dst->start_timecode_ = start_timecode_; dst->end_timecode_ = end_timecode_; dst->uid_ = uid_; dst->displays_ = displays_; dst->displays_size_ = displays_size_; dst->displays_count_ = displays_count_; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
175,947,400,470,388,400,000,000,000,000,000,000,000
9
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
static void __exit exit_o2nm(void) { /* XXX sync with hb callbacks and shut down hb? */ o2net_unregister_hb_callbacks(); configfs_unregister_subsystem(&o2nm_cluster_group.cs_subsys); o2cb_sys_shutdown(); o2net_exit(); o2hb_exit(); }
0
[ "CWE-476", "CWE-284" ]
linux
853bc26a7ea39e354b9f8889ae7ad1492ffa28d2
149,377,130,986,444,790,000,000,000,000,000,000,000
10
ocfs2: subsystem.su_mutex is required while accessing the item->ci_parent The subsystem.su_mutex is required while accessing the item->ci_parent, otherwise, NULL pointer dereference to the item->ci_parent will be triggered in the following situation: add node delete node sys_write vfs_write con...
HttpHealthCheckerImpl::codecClientType(const envoy::type::v3::CodecClientType& type) { switch (type) { PANIC_ON_PROTO_ENUM_SENTINEL_VALUES; case envoy::type::v3::HTTP3: return Http::CodecType::HTTP3; case envoy::type::v3::HTTP2: return Http::CodecType::HTTP2; case envoy::type::v3::HTTP1: return ...
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
13,395,937,906,715,133,000,000,000,000,000,000,000
12
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static int s390_fpregs_get(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf) { if (target == current) save_fp_regs(&target->thread.fp_regs); return user_regset_copyout(&pos, &count, &kbuf, &ubuf, &target->thread.fp_...
0
[ "CWE-399" ]
linux-2.6
3d6e48f43340343d97839eadb1ab7b6a3ea98797
123,503,740,153,779,680,000,000,000,000,000,000,000
10
[S390] CVE-2008-1514: prevent ptrace padding area read/write in 31-bit mode When running a 31-bit ptrace, on either an s390 or s390x kernel, reads and writes into a padding area in struct user_regs_struct32 will result in a kernel panic. This is also known as CVE-2008-1514. Test case available here: http://sources.r...
directory_initiate_command_routerstatus_rend(routerstatus_t *status, uint8_t dir_purpose, uint8_t router_purpose, int anonymized_connection, ...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
294,634,802,592,027,200,000,000,000,000,000,000,000
52
Fix assertion failure in tor_timegm. Fixes bug 6811.
zimage3(i_ctx_t *i_ctx_p) { os_ptr op = osp; gs_image3_t image; int interleave_type; ref *pDataDict; ref *pMaskDict; image_params ip_data, ip_mask; int ignored; int code, mcode; check_type(*op, t_dictionary); check_dict_read(*op); if ((code = dict_int_param(op, "InterleaveTy...
1
[ "CWE-704" ]
ghostpdl
548bb434e81dadcc9f71adf891a3ef5bea8e2b4e
187,375,094,005,984,050,000,000,000,000,000,000,000
52
PS interpreter - add some type checking These were 'probably' safe anyway, since they mostly treat the objects as integers without checking, which at least can't result in a crash. Nevertheless, we ought to check. The return from comparedictkeys could be wrong if one of the keys had a value which was not an array, i...
compute_consensus_versions_list(smartlist_t *lst, int n_versioning) { int min = n_versioning / 2; smartlist_t *good = smartlist_new(); char *result; sort_version_list(lst, 0); get_frequent_members(good, lst, min); result = smartlist_join_strings(good, ",", 0, NULL); smartlist_free(good); return result; ...
0
[]
tor
a0ef3cf0880e3cd343977b3fcbd0a2e7572f0cb4
282,133,405,069,448,200,000,000,000,000,000,000,000
11
Prevent int underflow in dirvote.c compare_vote_rs_. This should be "impossible" without making a SHA1 collision, but let's not keep the assumption that SHA1 collisions are super-hard. This prevents another case related to 21278. There should be no behavioral change unless -ftrapv is on.
static int can_open_cached(struct nfs4_state *state, int mode) { int ret = 0; switch (mode & (FMODE_READ|FMODE_WRITE|O_EXCL)) { case FMODE_READ: ret |= test_bit(NFS_O_RDONLY_STATE, &state->flags) != 0; break; case FMODE_WRITE: ret |= test_bit(NFS_O_WRONLY_STATE, &state->flags) != 0; break; case FMOD...
1
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
268,252,745,557,594,250,000,000,000,000,000,000,000
15
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static int ZEND_FASTCALL ZEND_THROW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *value; zval *exception; value = &opline->op1.u.constant; if (IS_CONST == IS_CONST || Z_TYPE_P(value) != IS_OBJECT) { zend_error_noreturn(E_ERROR, "Can only throw objects"); } zend_exceptio...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
156,034,474,793,467,330,000,000,000,000,000,000,000
25
- 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
static void nested_svm_uninit_mmu_context(struct kvm_vcpu *vcpu) { vcpu->arch.mmu = &vcpu->arch.root_mmu; vcpu->arch.walk_mmu = &vcpu->arch.root_mmu; }
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
274,427,138,233,590,980,000,000,000,000,000,000,000
5
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
static int ntop_is_windows(lua_State* vm) { ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__); lua_pushboolean(vm, #ifdef WIN32 1 #else 0 #endif ); return(CONST_LUA_OK); }
0
[ "CWE-476" ]
ntopng
01f47e04fd7c8d54399c9e465f823f0017069f8f
322,741,745,883,563,800,000,000,000,000,000,000,000
13
Security fix: prevents empty host from being used
node_list_len(Node* list) { int len; len = 1; while (IS_NOT_NULL(NODE_CDR(list))) { list = NODE_CDR(list); len++; } return len; }
0
[ "CWE-787" ]
oniguruma
cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0
326,734,847,229,117,140,000,000,000,000,000,000,000
12
#207: Out-of-bounds write
static void v4l_print_buftype(const void *arg, bool write_only) { pr_cont("type=%s\n", prt_names(*(u32 *)arg, v4l2_type_names)); }
0
[ "CWE-401" ]
linux
fb18802a338b36f675a388fc03d2aa504a0d0899
45,641,855,254,194,600,000,000,000,000,000,000,000
4
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...
static void JS_FoxxAllowInstallFromRemote(v8::FunctionCallbackInfo<v8::Value> const& args) { TRI_V8_TRY_CATCH_BEGIN(isolate) v8::HandleScope scope(isolate); TRI_GET_GLOBALS(); ServerSecurityFeature& security = v8g->_server.getFeature<ServerSecurityFeature>(); TRI_V8_RETURN_BOOL(security.foxxAllowInstallFromR...
0
[ "CWE-918" ]
arangodb
d9b7f019d2435f107b19a59190bf9cc27d5f34dd
137,639,188,935,237,150,000,000,000,000,000,000,000
10
[APM-78] Disable installation from remote URL (#15292)
selaCreateFromFile(const char *filename) { char *filestr, *line; l_int32 i, n, first, last, nsel, insel; size_t nbytes; NUMA *nafirst, *nalast; SARRAY *sa; SEL *sel; SELA *sela; PROCNAME("selaCreateFromFile"); if (!filename) return (SELA *)ERROR_PTR("filename not defined", procName, ...
0
[ "CWE-119", "CWE-787" ]
leptonica
ee301cb2029db8a6289c5295daa42bba7715e99a
222,220,145,126,787,900,000,000,000,000,000,000,000
68
Security fixes: expect final changes for release 1.75.3. * Fixed a debian security issue with fscanf() reading a string with possible buffer overflow. * There were also a few similar situations with sscanf().
static void power_pmu_bhrb_disable(struct perf_event *event) { struct cpu_hw_events *cpuhw = this_cpu_ptr(&cpu_hw_events); if (!ppmu->bhrb_nr) return; WARN_ON_ONCE(!cpuhw->bhrb_users); cpuhw->bhrb_users--; perf_sched_cb_dec(event->ctx->pmu); if (!cpuhw->disabled && !cpuhw->bhrb_users) { /* BHRB cannot be t...
0
[ "CWE-476" ]
linux
60b7ed54a41b550d50caf7f2418db4a7e75b5bdc
212,123,149,106,754,100,000,000,000,000,000,000,000
20
powerpc/perf: Fix crash in perf_instruction_pointer() when ppmu is not set On systems without any specific PMU driver support registered, running perf record causes Oops. The relevant portion from call trace: BUG: Kernel NULL pointer dereference on read at 0x00000040 Faulting instruction address: 0xc0021f0c Oo...
long zsetRank(robj *zobj, sds ele, int reverse) { unsigned long llen; unsigned long rank; llen = zsetLength(zobj); if (zobj->encoding == OBJ_ENCODING_ZIPLIST) { unsigned char *zl = zobj->ptr; unsigned char *eptr, *sptr; eptr = ziplistIndex(zl,0); serverAssert(eptr != N...
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
163,333,961,018,125,100,000,000,000,000,000,000,000
54
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
Sql_mode_dependency Item_args::value_depends_on_sql_mode_bit_or() const { Sql_mode_dependency res; for (uint i= 0; i < arg_count; i++) res|= args[i]->value_depends_on_sql_mode(); return res; }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
11,091,858,759,149,104,000,000,000,000,000,000,000
7
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
void TopologyDescription::setType(TopologyType type) { _type = type; }
0
[ "CWE-755" ]
mongo
75f7184eafa78006a698cda4c4adfb57f1290047
99,729,141,518,512,230,000,000,000,000,000,000,000
3
SERVER-50170 fix max staleness read preference parameter for server selection
static void s_server_init(void) { accept_socket = -1; verify_depth = 0; s_server_verify = SSL_VERIFY_NONE; s_dcert_file = NULL; s_dkey_file = NULL; s_dchain_file = NULL; s_cert_file = TEST_CERT; s_key_file = NULL; s_chain_file = NULL; s_cert_file2 = TEST_CERT2; s_key_file2 = ...
0
[ "CWE-399" ]
openssl
380f18ed5f140e0ae1b68f3ab8f4f7c395658d9e
286,898,595,546,928,900,000,000,000,000,000,000,000
28
CVE-2016-0798: avoid memory leak in SRP The SRP user database lookup method SRP_VBASE_get_by_user had confusing memory management semantics; the returned pointer was sometimes newly allocated, and sometimes owned by the callee. The calling code has no way of distinguishing these two cases. Specifically, SRP servers t...
TEST_F(RouterTest, UpstreamTimeout) { NiceMock<Http::MockRequestEncoder> encoder; Http::ResponseDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _)) .WillOnce(Invoke( [&](Http::ResponseDecoder& decoder, Http::ConnectionPool::Callback...
0
[ "CWE-703" ]
envoy
5bf9b0f1e7f247a4eee7180849cb0823926f7fff
39,161,761,053,385,930,000,000,000,000,000,000,000
43
[1.21] CVE-2022-21655 Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>