func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
yin_getplace_for_extcomplex_node(struct lyxml_elem *node, struct lys_ext_instance_complex *ext, LY_STMT stmt) { struct lyext_substmt *info; struct lys_node **snode, *siter; snode = lys_ext_complex_get_substmt(stmt, ext, &info); if (!snode) { LOGVAL(ext->module->ctx, LYE_INCHILDSTMT, LY_VLOG_NON...
0
[ "CWE-252" ]
libyang
a3917d95d516e3de267d3cfa5d4d3715a90e8777
84,102,266,961,061,430,000,000,000,000,000,000,000
21
yin parser BUGFIX invalid memory access ... in case there were some unresolved extensions. Fixes #1454 Fixes #1455
size_t mg_iobuf_add(struct mg_iobuf *io, size_t ofs, const void *buf, size_t len, size_t chunk_size) { size_t new_size = io->len + len; if (new_size > io->size) { new_size += chunk_size; // Make sure that io->size new_size -= new_size % chunk_size; // is aligned by chunk_siz...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
36,163,789,231,481,520,000,000,000,000,000,000,000
15
Protect against the directory traversal in mg_upload()
e1000e_rx_l3_cso_enabled(E1000ECore *core) { return !!(core->mac[RXCSUM] & E1000_RXCSUM_IPOFLD); }
0
[ "CWE-835" ]
qemu
4154c7e03fa55b4cf52509a83d50d6c09d743b77
245,253,525,743,257,330,000,000,000,000,000,000,000
4
net: e1000e: fix an infinite loop issue This issue is like the issue in e1000 network card addressed in this commit: e1000: eliminate infinite loops on out-of-bounds transfer start. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat....
inline const strings::AlphaNum& PrintOneElement(const strings::AlphaNum& a, bool print_v2) { return a; }
0
[ "CWE-345" ]
tensorflow
abcced051cb1bd8fb05046ac3b6023a7ebcc4578
318,625,098,956,192,500,000,000,000,000,000,000,000
4
Prevent crashes when loading tensor slices with unsupported types. Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL) messages for the unset and unsupported types. PiperOrigin-RevId: 392695027 Change-Id: I4beda7db950db951d273e3259a7c8534ece49354
static unsigned propcmp(icalcomponent *oldical, icalcomponent *newical, icalproperty_kind kind) { icalproperty *oldprop = icalcomponent_get_first_property(oldical, kind); icalproperty *newprop = icalcomponent_get_first_property(newical, kind); if (!oldprop) return (newprop != NULL); else if (!newpro...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
88,922,995,782,345,230,000,000,000,000,000,000,000
36
HTTP: don't overrun buffer when parsing strings with sscanf()
static inline struct compat_cmsghdr __user *cmsg_compat_nxthdr(struct msghdr *msg, struct compat_cmsghdr __user *cmsg, int cmsg_len) { char __user *ptr = (char __user *)cmsg + CMSG_COMPAT_ALIGN(cmsg_len); if ((unsigned long)(ptr + 1 - (char __user *)msg->msg_control) > msg->msg_controllen) return NULL; return...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
122,582,122,966,826,010,000,000,000,000,000,000,000
9
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 int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr, u8 tos, struct net_device *dev, int our) { struct rtable *rth; struct in_device *in_dev = __in_dev_get_rcu(dev); unsigned int flags = RTCF_MULTICAST; u32 itag = 0; int err; /* Primary sanity checks. */ if (!in_dev) return -EINV...
0
[ "CWE-476" ]
linux
bc3aae2bbac46dd894c89db5d5e98f7f0ef9e205
257,408,865,066,779,540,000,000,000,000,000,000,000
60
net: check and errout if res->fi is NULL when RTM_F_FIB_MATCH is set Syzkaller hit 'general protection fault in fib_dump_info' bug on commit 4.13-rc5.. Guilty file: net/ipv4/fib_semantics.c kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked...
swap_node(Node* a, Node* b) { Node c; c = *a; *a = *b; *b = c; if (NODE_TYPE(a) == NODE_STRING) { StrNode* sn = STR_(a); if (sn->capa == 0) { int len = (int )(sn->end - sn->s); sn->s = sn->buf; sn->end = sn->s + len; } } if (NODE_TYPE(b) == NODE_STRING) { StrNode* sn = S...
0
[ "CWE-476" ]
oniguruma
410f5916429e7d2920e1d4867388514f605413b8
277,702,109,909,363,480,000,000,000,000,000,000,000
24
fix #87: Read unknown address in onig_error_code_to_str()
int nghttp2_session_consume(nghttp2_session *session, int32_t stream_id, size_t size) { int rv; nghttp2_stream *stream; if (stream_id == 0) { return NGHTTP2_ERR_INVALID_ARGUMENT; } if (!(session->opt_flags & NGHTTP2_OPTMASK_NO_AUTO_WINDOW_UPDATE)) { return NGHTTP2_ERR_INV...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
263,935,468,067,316,160,000,000,000,000,000,000,000
33
Add nghttp2_option_set_max_outbound_ack
ar6000_ready_event(void *devt, u8 *datap, u8 phyCap, u32 sw_ver, u32 abi_ver) { struct ar6_softc *ar = (struct ar6_softc *)devt; struct net_device *dev = ar->arNetDev; memcpy(dev->dev_addr, datap, AR6000_ETH_ADDR_LEN); AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("mac address = %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
280,317,443,114,366,630,000,000,000,000,000,000,000
19
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a) { char buf[80], *p = buf; int i; if ((a == NULL) || (a->data == NULL)) return(BIO_write(bp,"NULL",4)); i=i2t_ASN1_OBJECT(buf,sizeof buf,a); if (i > (int)(sizeof(buf) - 1)) { p = OPENSSL_malloc(i + 1); if (!p) return -1; i2t_ASN1_OBJECT(p,i + 1,a); } if...
0
[ "CWE-200" ]
openssl
0042fb5fd1c9d257d713b15a1f45da05cf5c1c87
20,178,690,833,875,630,000,000,000,000,000,000,000
26
Fix OID handling: - Upon parsing, reject OIDs with invalid base-128 encoding. - Always NUL-terminate the destination buffer in OBJ_obj2txt printing function. CVE-2014-3508 Reviewed-by: Dr. Stephen Henson <steve@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
GF_Err stsc_dump(GF_Box *a, FILE * trace) { GF_SampleToChunkBox *p; u32 i, nb_samples; p = (GF_SampleToChunkBox *)a; gf_isom_box_dump_start(a, "SampleToChunkBox", trace); fprintf(trace, "EntryCount=\"%d\">\n", p->nb_entries); nb_samples = 0; for (i=0; i<p->nb_entries; i++) { fprintf(trace, "<SampleToChunkEnt...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
141,602,277,390,717,020,000,000,000,000,000,000,000
26
fixed 2 possible heap overflows (inc. #1088)
static int io_provide_buffers(struct io_kiocb *req, unsigned int issue_flags) { struct io_provide_buf *p = &req->pbuf; struct io_ring_ctx *ctx = req->ctx; struct io_buffer_list *bl; int ret = 0; io_ring_submit_lock(ctx, issue_flags); if (unlikely(p->bgid < BGID_ARRAY && !ctx->io_bl)) { ret = io_init_bl_list(c...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
148,172,298,844,363,140,000,000,000,000,000,000,000
44
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
bgp_capability_receive (struct peer *peer, bgp_size_t size) { u_char *pnt; /* Fetch pointer. */ pnt = stream_pnt (peer->ibuf); if (BGP_DEBUG (normal, NORMAL)) zlog_debug ("%s rcv CAPABILITY", peer->host); /* If peer does not have the capability, send notification. */ if (! CHECK_FLAG (peer->cap, PEER...
0
[ "CWE-119" ]
quagga
5861739f8c38bc36ea9955e5cb2be2bf2f482d70
107,988,149,007,952,640,000,000,000,000,000,000,000
33
bgpd: Open option parse errors don't NOTIFY, resulting in abort & DoS * bgp_packet.c: (bgp_open_receive) Errors from bgp_open_option_parse are detected, and the code will stop processing the OPEN and return. However it does so without calling bgp_notify_send to send a NOTIFY - which means the peer FSM doesn't g...
void ScanLineInputFile::initialize(const Header& header) { try { _data->header = header; _data->lineOrder = _data->header.lineOrder(); const Box2i &dataWindow = _data->header.dataWindow(); _data->minX = dataWindow.min.x; _data->maxX = dataWindow.max.x; _data->m...
1
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
267,360,362,197,406,780,000,000,000,000,000,000,000
56
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
set_context_in_set_cmd( expand_T *xp, char_u *arg, int opt_flags) /* OPT_GLOBAL and/or OPT_LOCAL */ { int nextchar; long_u flags = 0; /* init for GCC */ int opt_idx = 0; /* init for GCC */ char_u *p; char_u *s; int is_term_option = FALSE; int key; expand_option_flags = ...
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
7,641,678,711,510,688,000,000,000,000,000,000,000
205
patch 8.0.0056 Problem: When setting 'filetype' there is no check for a valid name. Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
Select *sqlite3SelectDup(sqlite3 *db, Select *pDup, int flags){ Select *pRet = 0; Select *pNext = 0; Select **pp = &pRet; Select *p; assert( db!=0 ); for(p=pDup; p; p=p->pPrior){ Select *pNew = sqlite3DbMallocRawNN(db, sizeof(*p) ); if( pNew==0 ) break; pNew->pEList = sqlite3ExprListDup(db, p->...
0
[ "CWE-476" ]
sqlite
57f7ece78410a8aae86aa4625fb7556897db384c
281,467,929,351,354,180,000,000,000,000,000,000,000
40
Fix a problem that comes up when using generated columns that evaluate to a constant in an index and then making use of that index in a join. FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af
ldbm_config_modify_entry_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore, Slapi_Entry *e, int *returncode, char *returntext, void *arg) { int i; char *attr_name; LDAPMod **mods; Slapi_Mods smods_moved; int rc = LDAP_SUCCESS; int apply_mod = 0; struct ldbminfo *li = (struct ldbminfo *)arg...
0
[ "CWE-399", "CWE-203" ]
389-ds-base
cc0f69283abc082488824702dae485b8eae938bc
134,832,935,800,103,660,000,000,000,000,000,000,000
122
Issue 4480 - Unexpected info returned to ldap request (#4491) Bug description: If the bind entry does not exist, the bind result info reports that 'No such entry'. It should not give any information if the target entry exists or not Fix description: Does not return any additional information d...
decompileSETMEMBER(int n, SWF_ACTION *actions, int maxn) { struct SWF_ACTIONPUSHPARAM *val, *var, *obj; val = pop(); var = pop(); obj = pop(); #ifdef DEBUG printf("*SETMember* varName %s (type=%d) objName=%s (type=%d)\n",getName(var),var->Type, getName(obj),obj->Type); #endif if (obj->Type == 12) /* do nothi...
0
[ "CWE-119", "CWE-125" ]
libming
da9d86eab55cbf608d5c916b8b690f5b76bca462
201,864,210,298,340,200,000,000,000,000,000,000,000
63
decompileAction: Prevent heap buffer overflow and underflow with using OpCode
const char* syscall() const { return syscall_; }
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
307,764,710,178,658,970,000,000,000,000,000,000,000
1
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
void nl80211_send_port_authorized(struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *bssid) { struct sk_buff *msg; void *hdr; msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); if (!msg) return; hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_PORT_AUTHORIZED); if (!hdr) { nlmsg...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
4,125,146,692,516,895,400,000,000,000,000,000,000
30
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
static void check_carrier(struct work_struct *work) { pegasus_t *pegasus = container_of(work, pegasus_t, carrier_check.work); set_carrier(pegasus->net); if (!(pegasus->flags & PEGASUS_UNPLUG)) { queue_delayed_work(pegasus_workqueue, &pegasus->carrier_check, CARRIER_CHECK_DELAY); } }
0
[ "CWE-119", "CWE-284" ]
linux
5593523f968bc86d42a035c6df47d5e0979b5ace
197,073,338,189,827,620,000,000,000,000,000,000,000
9
pegasus: Use heap buffers for all register access Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") References: https://bugs.debian.org/852556 Reported-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@...
AP_DECLARE(apr_socket_t *) ap_get_conn_socket(conn_rec *c) { return ap_get_core_module_config(c->conn_config); }
0
[ "CWE-416", "CWE-284" ]
httpd
4cc27823899e070268b906ca677ee838d07cf67a
25,459,883,583,574,920,000,000,000,000,000,000,000
4
core: Disallow Methods' registration at run time (.htaccess), they may be used only if registered at init time (httpd.conf). Calling ap_method_register() in children processes is not the right scope since it won't be shared for all requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7...
GetVariableWatcherSet() { thread_local std::unique_ptr< tensorflow::gtl::CompactPointerSet<TFE_Py_VariableWatcher*>> variable_watcher_set; thread_local ThreadLocalDestructionMarker marker; if (!marker.alive) { // This thread is being destroyed. It is unsafe to access // variable_watcher_set. ...
0
[ "CWE-476", "CWE-908" ]
tensorflow
237822b59fc504dda2c564787f5d3ad9c4aa62d9
110,004,794,439,427,610,000,000,000,000,000,000,000
16
Fix tf.compat.v1.placeholder_with_default vulnerability with quantized types. When iterating through the tensor to extract shape values, an underlying missing kernel (`StridedSlice` for quantized types) causes an error, which then results in a `nullptr` being passed to `ParseDimensionValue()`, causing a segfault. The...
on_user_is_loaded_changed (ActUser *user, GParamSpec *pspec, UsernameLookupOperation *operation) { if (act_user_is_loaded (user)) { set_up_automatic_login_session_if_user_exists (operation->manager, operation->dis...
0
[]
gdm
ff98b2817014684ae1acec78ff06f0f461a56a9f
80,120,328,037,053,040,000,000,000,000,000,000,000
12
manager: if falling back to X11 retry autologin Right now, we get one shot to autologin. If it fails, we fall back to the greeter. We should give it another go if the reason for the failure was wayland fallback to X. https://bugzilla.gnome.org/show_bug.cgi?id=780520
static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) { struct dentry *res = NULL; int error; dfprintk(VFS, "NFS: atomic_lookup(%s/%ld), %s\n", dir->i_sb->s_id, dir->i_ino, dentry->d_name.name); /* Check that we are indeed trying to open this file */ if (!is_a...
0
[ "CWE-20" ]
linux-2.6
54af3bb543c071769141387a42deaaab5074da55
117,012,814,966,069,730,000,000,000,000,000,000,000
68
NFS: Fix an Oops in encode_lookup() It doesn't look as if the NFS file name limit is being initialised correctly in the struct nfs_server. Make sure that we limit whatever is being set in nfs_probe_fsinfo() and nfs_init_server(). Also ensure that readdirplus and nfs4_path_walk respect our file name limits. Signed-of...
static int expandRegular(rpmfi fi, const char *dest, rpmpsm psm, int nodigest, int nocontent) { FD_t wfd = NULL; int rc = 0; /* Create the file with 0200 permissions (write by owner). */ { mode_t old_umask = umask(0577); wfd = Fopen(dest, "w.ufdio"); umask(old_umask); } if (Ferror(wfd)) { r...
1
[ "CWE-59", "CWE-61" ]
rpm
404ef011c300207cdb1e531670384564aae04bdc
220,604,716,480,515,000,000,000,000,000,000,000,000
26
Don't follow symlinks on file creation (CVE-2017-7501) Open newly created files with O_EXCL to prevent symlink tricks. When reopening hardlinks for writing the actual content, use append mode instead. This is compatible with the write-only permissions but is not destructive in case we got redirected to somebody elses ...
ExecASInsertTriggers(EState *estate, ResultRelInfo *relinfo) { TriggerDesc *trigdesc = relinfo->ri_TrigDesc; if (trigdesc && trigdesc->trig_insert_after_statement) AfterTriggerSaveEvent(estate, relinfo, TRIGGER_EVENT_INSERT, false, NULL, NULL, NIL, NULL); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
196,866,875,908,327,700,000,000,000,000,000,000,000
8
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
struct sctp_endpoint *sctp_endpoint_new(struct sock *sk, gfp_t gfp) { struct sctp_endpoint *ep; /* Build a local endpoint. */ ep = t_new(struct sctp_endpoint, gfp); if (!ep) goto fail; if (!sctp_endpoint_init(ep, sk, gfp)) goto fail_init; ep->base.malloced = 1; SCTP_DBG_OBJCNT_INC(ep); return ep; fail_ini...
0
[]
linux-2.6
5e739d1752aca4e8f3e794d431503bfca3162df4
114,969,914,776,100,050,000,000,000,000,000,000,000
19
sctp: fix potential panics in the SCTP-AUTH API. All of the SCTP-AUTH socket options could cause a panic if the extension is disabled and the API is envoked. Additionally, there were some additional assumptions that certain pointers would always be valid which may not always be the case. This patch hardens the API a...
static inline bool htab_use_raw_lock(const struct bpf_htab *htab) { return (!IS_ENABLED(CONFIG_PREEMPT_RT) || htab_is_prealloc(htab)); }
0
[ "CWE-787" ]
bpf
c4eb1f403243fc7bbb7de644db8587c03de36da6
117,849,845,169,291,390,000,000,000,000,000,000,000
4
bpf: Fix integer overflow involving bucket_size In __htab_map_lookup_and_delete_batch(), hash buckets are iterated over to count the number of elements in each bucket (bucket_size). If bucket_size is large enough, the multiplication to calculate kvmalloc() size could overflow, resulting in out-of-bounds write as repor...
static void crng_backtrack_protect(__u8 tmp[CHACHA_BLOCK_SIZE], int used) { struct crng_state *crng = NULL; #ifdef CONFIG_NUMA if (crng_node_pool) crng = crng_node_pool[numa_node_id()]; if (crng == NULL) #endif crng = &primary_crng; _crng_backtrack_protect(crng, tmp, used); }
0
[ "CWE-200", "CWE-330" ]
linux
f227e3ec3b5cad859ad15666874405e8c1bbc1d4
322,549,429,834,926,560,000,000,000,000,000,000,000
12
random32: update the net random state on interrupt and activity This modifies the first 32 bits out of the 128 bits of a random CPU's net_rand_state on interrupt or CPU activity to complicate remote observations that could lead to guessing the network RNG's internal state. Note that depending on some network devices'...
opaque* EncryptedPreMasterSecret::get_clientKey() const { return secret_; }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
29,075,511,933,178,770,000,000,000,000,000,000,000
4
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
SPL_METHOD(SplDoublyLinkedList, shift) { spl_dllist_object *intern; if (zend_parse_parameters_none() == FAILURE) { return; } intern = Z_SPLDLLIST_P(getThis()); spl_ptr_llist_shift(intern->llist, return_value); if (Z_ISUNDEF_P(return_value)) { zend_throw_exception(spl_ce_RuntimeException, "Can't shift from ...
0
[ "CWE-415" ]
php-src
28a6ed9f9a36b9c517e4a8a429baf4dd382fc5d5
11,690,617,777,965,654,000,000,000,000,000,000,000
16
Fix bug #71735: Double-free in SplDoublyLinkedList::offsetSet
content::PictureInPictureResult WebContents::EnterPictureInPicture( content::WebContents* web_contents, const viz::SurfaceId& surface_id, const gfx::Size& natural_size) { #if BUILDFLAG(ENABLE_PICTURE_IN_PICTURE) return PictureInPictureWindowManager::GetInstance()->EnterPictureInPicture( web_contents...
0
[ "CWE-200", "CWE-668" ]
electron
07a1c2a3e5845901f7e2eda9506695be58edc73c
285,076,180,762,780,980,000,000,000,000,000,000,000
11
fix: restrict sendToFrame to same-process frames by default (#26875)
static void vt_console_print(struct console *co, const char *b, unsigned count) { struct vc_data *vc = vc_cons[fg_console].d; unsigned char c; static DEFINE_SPINLOCK(printing_lock); const ushort *start; ushort start_x, cnt; int kmsg_console; /* console busy or not yet initialized */ if (!printable) return; ...
0
[ "CWE-416", "CWE-362" ]
linux
ca4463bf8438b403596edd0ec961ca0d4fbe0220
150,100,539,459,206,150,000,000,000,000,000,000,000
74
vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console The VT_DISALLOCATE ioctl can free a virtual console while tty_release() is still running, causing a use-after-free in con_shutdown(). This occurs because VT_DISALLOCATE considers a virtual console's 'struct vc_data' to be unused as soon as the correspond...
EC_POINT *EC_POINT_new(const EC_GROUP *group) { EC_POINT *ret; if (group == NULL) { ECerr(EC_F_EC_POINT_NEW, ERR_R_PASSED_NULL_PARAMETER); return NULL; } if (group->meth->point_init == NULL) { ECerr(EC_F_EC_POINT_NEW, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return NULL; ...
0
[]
openssl
30c22fa8b1d840036b8e203585738df62a03cec8
25,801,460,054,987,310,000,000,000,000,000,000,000
29
[crypto/ec] for ECC parameters with NULL or zero cofactor, compute it The cofactor argument to EC_GROUP_set_generator is optional, and SCA mitigations for ECC currently use it. So the library currently falls back to very old SCA-vulnerable code if the cofactor is not present. This PR allows EC_GROUP_set_generator to ...
void skb_trim(struct sk_buff *skb, unsigned int len) { if (skb->len > len) __skb_trim(skb, len); }
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
195,398,720,110,385,270,000,000,000,000,000,000,000
5
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
static apr_status_t modsecurity_request_body_start_init(modsec_rec *msr, char **error_msg) { *error_msg = NULL; if(msr->msc_reqbody_storage == MSC_REQBODY_MEMORY) { /* Prepare to store request body in memory. */ msr->msc_reqbody_chunks = apr_array_make(msr->msc_reqbody_mp, 32, size...
0
[ "CWE-476" ]
ModSecurity
0840b13612a0b7ef1ce7441cf811dcfc6b463fba
154,881,795,470,607,350,000,000,000,000,000,000,000
35
Fixed: chuck null pointer when unknown CT is sent and over in-memory limit
static void http_silent_debug(int line, struct session *s) { int size = 0; size += snprintf(trash + size, trashlen - size, "[%04d] req: p=%d(%d) s=%d bf=%08x an=%08x data=%p size=%d l=%d w=%p r=%p lr=%p sm=%d fw=%ld tf=%08x\n", line, s->si[0].state, s->si[0].fd, s->txn.req.msg_state, s->req->flags, s->req...
0
[]
haproxy-1.4
dc80672211e085c211f1fc47e15cfe57ab587d38
271,823,278,670,892,070,000,000,000,000,000,000,000
18
BUG/CRITICAL: using HTTP information in tcp-request content may crash the process During normal HTTP request processing, request buffers are realigned if there are less than global.maxrewrite bytes available after them, in order to leave enough room for rewriting headers after the request. This is done in http_wait_fo...
static void complete_nread_binary(conn *c) { assert(c != NULL); assert(c->cmd >= 0); switch(c->substate) { case bin_reading_set_header: if (c->cmd == PROTOCOL_BINARY_CMD_APPEND || c->cmd == PROTOCOL_BINARY_CMD_PREPEND) { process_bin_append_prepend(c); } else ...
0
[ "CWE-190" ]
memcached
bd578fc34b96abe0f8d99c1409814a09f51ee71c
307,436,790,829,878,460,000,000,000,000,000,000,000
43
CVE reported by cisco talos
cr_input_read_char (CRInput * a_this, guint32 * a_char) { enum CRStatus status = CR_OK; gulong consumed = 0, nb_bytes_left = 0; g_return_val_if_fail (a_this && PRIVATE (a_this) && a_char, CR_BAD_PARAM_ERROR); if (PRIVATE (a_this)->end_of_in...
1
[ "CWE-125" ]
libcroco
898e3a8c8c0314d2e6b106809a8e3e93cf9d4394
171,266,262,787,767,060,000,000,000,000,000,000,000
45
input: check end of input before reading a byte When reading bytes we weren't check that the index wasn't out of bound and this could produce an invalid read which could deal to a security bug.
static void insert_free_dqentry(struct quota_handle *h, dqbuf_t buf, unsigned int blk) { dqbuf_t tmpbuf = getdqbuf(); struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; struct qtree_mem_dqinfo *info = &h->qh_info.u.v2_mdqi.dqi_qtree; if (!tmpbuf) return; dh->dqdh_next_free = ext2fs_cpu_to_le...
0
[ "CWE-787" ]
e2fsprogs
8dbe7b475ec5e91ed767239f0e85880f416fc384
42,021,004,795,444,810,000,000,000,000,000,000,000
23
libsupport: add checks to prevent buffer overrun bugs in quota code A maliciously corrupted file systems can trigger buffer overruns in the quota code used by e2fsck. To fix this, add sanity checks to the quota header fields as well as to block number references in the quota tree. Addresses: CVE-2019-5094 Addresses:...
u16 gf_mp3_sampling_rate(u32 hdr) { u16 res; /* extract the necessary fields from the MP3 header */ u8 version = gf_mp3_version(hdr); u8 sampleRateIndex = (hdr >> 10) & 0x3; switch (sampleRateIndex) { case 0: res = 44100; break; case 1: res = 48000; break; case 2: res = 32000; break; default: GF...
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
224,037,134,797,876,100,000,000,000,000,000,000,000
30
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
static struct tcf_block *tcf_block_find(struct net *net, struct Qdisc **q, u32 *parent, unsigned long *cl, int ifindex, u32 block_index, struct netlink_ext_ack *extack) { struct tcf_block *block; int err = 0; ASSERT_RTNL(); err = __tcf_qdisc_find(net, q, parent, ifindex, true, extack); if (err) ...
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
57,746,155,686,186,250,000,000,000,000,000,000,000
33
net: sched: fix use-after-free in tc_new_tfilter() Whenever tc_new_tfilter() jumps back to replay: label, we need to make sure @q and @chain local variables are cleared again, or risk use-after-free as in [1] For consistency, apply the same fix in tc_ctl_chain() BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1...
pci_lintr_route(struct pci_vdev *dev) { struct businfo *bi; struct intxinfo *ii; if (dev->lintr.pin == 0) return; bi = pci_businfo[dev->bus]; assert(bi != NULL); ii = &bi->slotinfo[dev->slot].si_intpins[dev->lintr.pin - 1]; /* * Attempt to allocate an I/O APIC pin for this intpin if one * is not yet ass...
1
[ "CWE-617", "CWE-703" ]
acrn-hypervisor
2b3dedfb9ba13f15887f22b935d373f36c9a59fa
3,358,963,997,300,363,000,000,000,000,000,000,000
32
dm: pci: clean up assert() in pci core Tracked-On: #3252 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
urip_checkURL(const char *URL) { xmlDocPtr doc; doc = xmlReadFile(URL, NULL, 0); if (doc == NULL) return(-1); xmlFreeDoc(doc); return(1); }
0
[ "CWE-125" ]
libxml2
a820dbeac29d330bae4be05d9ecd939ad6b4aa33
58,713,033,750,026,190,000,000,000,000,000,000,000
9
Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605> Reviewed by David Kilzer. * HTMLparser.c: (htmlParseName): Add bounds check. (htmlParseNameComplex): Ditto. * result/HTML/758605.html: Added. * result/HTML/758605.html.err: Added. * result/HTML/758605.html.s...
seq_parameter_set::~seq_parameter_set() { //free(ref_pic_sets); }
0
[ "CWE-787" ]
libde265
8e89fe0e175d2870c39486fdd09250b230ec10b8
134,056,378,415,360,230,000,000,000,000,000,000,000
4
error on out-of-range cpb_cnt_minus1 (oss-fuzz issue 27590)
void performance_monitor_exception(struct pt_regs *regs) { __this_cpu_inc(irq_stat.pmu_irqs); perf_irq(regs); }
0
[]
linux
5d176f751ee3c6eededd984ad409bff201f436a7
191,681,282,937,671,400,000,000,000,000,000,000,000
6
powerpc: tm: Enable transactional memory (TM) lazily for userspace Currently the MSR TM bit is always set if the hardware is TM capable. This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and TFAIR) must be swapped for each process regardless of if they use TM. For processes that don't use TM the TM MSR ...
create_node(Subnet *parent_subnet, int the_entry) { Node *new_node; new_node = MallocNew(Node); parent_subnet->entry[the_entry] = (void *) new_node; clear_node(new_node); if (n_nodes == max_nodes) { if (nodes) { max_nodes += NODE_TABLE_INCREMENT; nodes = ReallocArray(Node *, max_nodes, nodes)...
1
[]
chrony
8f72155b438494e6d8e9e75920c36fd88d90f5b2
159,217,215,290,764,870,000,000,000,000,000,000,000
21
Multiply clientlog node table size when reallocating
static bool add_line(String &buffer, char *line, ulong line_length, char *in_string, bool *ml_comment, bool truncated) { uchar inchar; char buff[80], *pos, *out; COMMANDS *com; bool need_space= 0; bool ss_comment= 0; DBUG_ENTER("add_line"); if (!line[0] && buffer.is_empty()) DBUG...
0
[ "CWE-319" ]
mysql-server
0002e1380d5f8c113b6bce91f2cf3f75136fd7c7
271,653,443,005,656,540,000,000,000,000,000,000,000
272
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec)
R_API RBinJavaAttrInfo *r_bin_java_code_attr_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz, ut64 buf_offset) { RBinJavaAttrInfo *_attr = NULL; ut32 k = 0, curpos; ut64 offset = 0; RBinJavaAttrInfo *attr = r_bin_java_default_attr_new (bin, buffer, sz, buf_offset); if (!attr) { return NULL; } if (sz < 16 || sz > bu...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
251,608,211,712,325,240,000,000,000,000,000,000,000
105
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { auto* params = reinterpret_cast<TfLiteMfccParams*>(node->user_data); const TfLiteTensor* input_wav; TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTensorWav, &input_wav)); const TfLiteTensor* input_rate; TF_LITE_E...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
325,628,775,247,480,840,000,000,000,000,000,000,000
55
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
ServerItem::~ServerItem() { if (siParent) { siParent->qlChildren.removeAll(this); if (siParent->bParent && siParent->qlChildren.isEmpty()) siParent->setHidden(true); } // This is just for cleanup when exiting the dialog, it won't stop pending DNS for the children. foreach(ServerItem *si, qlChildren) delet...
0
[ "CWE-59", "CWE-61" ]
mumble
e59ee87abe249f345908c7d568f6879d16bfd648
232,582,919,141,215,720,000,000,000,000,000,000,000
11
FIX(client): Only allow "http"/"https" for URLs in ConnectDialog Our public server list registration script doesn't have an URL scheme whitelist for the website field. Turns out a malicious server can register itself with a dangerous URL in an attempt to attack a user's machine. User interaction is required, as the ...
PXA2xxI2CState *pxa2xx_i2c_init(hwaddr base, qemu_irq irq, uint32_t region_size) { DeviceState *dev; SysBusDevice *i2c_dev; PXA2xxI2CState *s; I2CBus *i2cbus; dev = qdev_create(NULL, TYPE_PXA2XX_I2C); qdev_prop_set_uint32(dev, "size", region_size + 1); qdev_prop_set_uint32(d...
0
[ "CWE-119" ]
qemu
caa881abe0e01f9931125a0977ec33c5343e4aa7
242,772,616,867,900,200,000,000,000,000,000,000,000
26
pxa2xx: avoid buffer overrun on incoming migration CVE-2013-4533 s->rx_level is read from the wire and used to determine how many bytes to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the length of s->rx_fifo[] the buffer can be overrun with arbitrary data from the wire. Fix this by validating rx_leve...
static int nested_svm_vmexit(struct vcpu_svm *svm) { struct vmcb *nested_vmcb; struct vmcb *hsave = svm->nested.hsave; struct vmcb *vmcb = svm->vmcb; struct page *page; trace_kvm_nested_vmexit_inject(vmcb->control.exit_code, vmcb->control.exit_info_1, vmcb->control.exit_info_2, vm...
0
[ "CWE-200", "CWE-399" ]
linux
cbdb967af3d54993f5814f1cee0ed311a055377d
237,111,890,414,430,850,000,000,000,000,000,000,000
122
KVM: svm: unconditionally intercept #DB This is needed to avoid the possibility that the guest triggers an infinite stream of #DB exceptions (CVE-2015-8104). VMX is not affected: because it does not save DR6 in the VMCS, it already intercepts #DB unconditionally. Reported-by: Jan Beulich <jbeulich@suse.com> Cc: stab...
template<typename tp, typename tc, typename to> CImg<floatT> get_object3dtoCImg3d(const CImgList<tp>& primitives, const CImgList<tc>& colors, const to& opacities, const bool full_check=true) const {...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
11,599,845,091,302,395,000,000,000,000,000,000,000
67
Fix other issues in 'CImg<T>::load_bmp()'.
bool asn1_read_enumerated(struct asn1_data *data, int *v) { *v = 0; if (!asn1_start_tag(data, ASN1_ENUMERATED)) return false; while (!data->has_error && asn1_tag_remaining(data)>0) { uint8_t b; asn1_read_uint8(data, &b); *v = (*v << 8) + b; } return asn1_end_tag(data); }
0
[ "CWE-399" ]
samba
9d989c9dd7a5b92d0c5d65287935471b83b6e884
154,849,022,361,676,350,000,000,000,000,000,000,000
12
CVE-2015-7540: lib: util: Check *every* asn1 return call and early return. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep...
xmlXPathCacheConvertNumber(xmlXPathContextPtr ctxt, xmlXPathObjectPtr val) { xmlXPathObjectPtr ret; if (val == NULL) return(xmlXPathCacheNewFloat(ctxt, 0.0)); if (val->type == XPATH_NUMBER) return(val); ret = xmlXPathCacheNewFloat(ctxt, xmlXPathCastToNumber(val)); xmlXPathReleaseObject(ctxt, val)...
0
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
335,056,595,374,907,970,000,000,000,000,000,000,000
11
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification
clear_node(Node *node) { node->client_hits = 0; node->peer_hits = 0; node->cmd_hits_auth = 0; node->cmd_hits_normal = 0; node->cmd_hits_bad = 0; node->last_ntp_hit = (time_t) 0; node->last_cmd_hit = (time_t) 0; }
0
[]
chrony
8f72155b438494e6d8e9e75920c36fd88d90f5b2
26,860,329,874,451,673,000,000,000,000,000,000,000
10
Multiply clientlog node table size when reallocating
quicklist *quicklistAppendValuesFromZiplist(quicklist *quicklist, unsigned char *zl) { unsigned char *value; unsigned int sz; long long longval; char longstr[32] = {0}; unsigned char *p = ziplistIndex(zl, 0); while (ziplistGet(p, &value, &sz, &longval...
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
235,225,741,644,385,100,000,000,000,000,000,000,000
20
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...
void Http2Session::Consume(const FunctionCallbackInfo<Value>& args) { Http2Session* session; ASSIGN_OR_RETURN_UNWRAP(&session, args.Holder()); CHECK(args[0]->IsExternal()); session->Consume(args[0].As<External>()); }
0
[]
node
ce22d6f9178507c7a41b04ac4097b9ea902049e3
158,252,675,916,988,810,000,000,000,000,000,000,000
6
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>
CString CZNC::GetKeyLocation() const { return CDir::ChangeDir( "", m_sSSLKeyFile.empty() ? m_sSSLCertFile : m_sSSLKeyFile); }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
256,736,321,677,674,450,000,000,000,000,000,000,000
4
Don't crash if user specified invalid encoding. This is CVE-2019-9917
explicit TensorSliceReaderTable(RandomAccessFile* f, table::Table* t) : file_(f), table_(t) {}
0
[ "CWE-369", "CWE-345" ]
tensorflow
b619c6f865715ca3b15ef1842b5b95edbaa710ad
203,112,473,319,982,500,000,000,000,000,000,000,000
2
Use BuildTensorShapeBase when parsing unverified TensorShapes during checkpoint loading. This avoids crashing when the TensorShape has negative dimensions. PiperOrigin-RevId: 392769882 Change-Id: Id1f7ae7fcf8142193556af47abfda81b13d3cce4
static MemoryRegionSection *address_space_lookup_region(AddressSpaceDispatch *d, hwaddr addr, bool resolve_subpage) { MemoryRegionSection *section = qatomic_read(&d->mru_section); subpage_t *subpage; ...
0
[ "CWE-787" ]
qemu
4bfb024bc76973d40a359476dc0291f46e435442
156,200,367,784,452,290,000,000,000,000,000,000,000
18
memory: clamp cached translation in case it points to an MMIO region In using the address_space_translate_internal API, address_space_cache_init forgot one piece of advice that can be found in the code for address_space_translate_internal: /* MMIO registers can be expected to perform full-width accesses based onl...
static struct reg_code_blocks * S_alloc_code_blocks(pTHX_ int ncode) { struct reg_code_blocks *cbs; Newx(cbs, 1, struct reg_code_blocks); cbs->count = ncode; cbs->refcnt = 1; SAVEDESTRUCTOR_X(S_free_codeblocks, cbs); if (ncode) Newx(cbs->cb, ncode, struct reg_code_block); else ...
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
42,351,499,551,168,915,000,000,000,000,000,000,000
13
regcomp.c: Prevent integer overflow from nested regex quantifiers. (CVE-2020-10543) On 32bit systems the size calculations for nested regular expression quantifiers could overflow causing heap memory corruption. Fixes: Perl/perl5-security#125 (cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71)
static void _epilog_complete_msg_setup( slurm_msg_t *msg, epilog_complete_msg_t *req, uint32_t jobid, int rc) { slurm_msg_t_init(msg); memset(req, 0, sizeof(epilog_complete_msg_t)); req->job_id = jobid; req->return_code = rc; req->node_name = conf->node_name; msg->msg_type = MESSAGE_EPILOG_COMPLETE; ...
0
[ "CWE-20" ]
slurm
df545955e4f119974c278bff0c47155257d5afc7
77,612,612,703,709,555,000,000,000,000,000,000,000
13
Validate gid and user_name values provided to slurmd up front. Do not defer until later, and do not potentially miss out on proper validation of the user_name field which can lead to improper authentication handling. CVE-2018-10995.
void healthCheck(bool is_health_check) override { health_check_request_ = is_health_check; }
0
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
257,603,549,563,168,450,000,000,000,000,000,000,000
1
internal redirect: fix a lifetime bug (#785) Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
/*this is using chpl format according to some NeroRecode samples*/ GF_Err tfdt_box_read(GF_Box *s,GF_BitStream *bs) { GF_TFBaseMediaDecodeTimeBox *ptr = (GF_TFBaseMediaDecodeTimeBox *)s; if (ptr->version==1) { ISOM_DECREASE_SIZE(ptr, 8); ptr->baseMediaDecodeTime = gf_bs_read_u64(bs); } else { ISOM_DECREASE_SI...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
229,305,638,201,314,360,000,000,000,000,000,000,000
13
fixed #1587
void vrend_renderer_destroy_sub_ctx(struct vrend_context *ctx, int sub_ctx_id) { struct vrend_sub_context *sub, *tofree = NULL; /* never destroy sub context id 0 */ if (sub_ctx_id == 0) return; LIST_FOR_EACH_ENTRY(sub, &ctx->sub_ctxs, head) { if (sub->sub_ctx_id == sub_ctx_id) { tofre...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
236,768,258,626,726,700,000,000,000,000,000,000,000
22
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
static int build_i2c_fw_hdr(__u8 *header, struct device *dev) { __u8 *buffer; int buffer_size; int i; int err; __u8 cs = 0; struct ti_i2c_desc *i2c_header; struct ti_i2c_image_header *img_header; struct ti_i2c_firmware_rec *firmware_rec; const struct firmware *fw; const char *fw_name = "edgeport/down3.bin"; ...
0
[ "CWE-284", "CWE-264" ]
linux
1ee0a224bc9aad1de496c795f96bc6ba2c394811
3,631,212,810,915,067,000,000,000,000,000,000,000
82
USB: io_ti: Fix NULL dereference in chase_port() The tty is NULL when the port is hanging up. chase_port() needs to check for this. This patch is intended for stable series. The behavior was observed and tested in Linux 3.2 and 3.7.1. Johan Hovold submitted a more elaborate patch for the mainline kernel. [ 56.277...
IOBuf::SharedInfo::SharedInfo() : freeFn(nullptr), userData(nullptr), useHeapFullStorage(false) { // Use relaxed memory ordering here. Since we are creating a new SharedInfo, // no other threads should be referring to it yet. refcount.store(1, std::memory_order_relaxed); }
0
[ "CWE-787" ]
folly
4f304af1411e68851bdd00ef6140e9de4616f7d3
258,683,485,475,032,240,000,000,000,000,000,000,000
6
[folly] Add additional overflow checks to IOBuf - CVE-2021-24036 Summary: As per title CVE-2021-24036 Reviewed By: jan Differential Revision: D27938605 fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c
static int query_srq(PVRDMADev *dev, union pvrdma_cmd_req *req, union pvrdma_cmd_resp *rsp) { struct pvrdma_cmd_query_srq *cmd = &req->query_srq; struct pvrdma_cmd_query_srq_resp *resp = &rsp->query_srq_resp; memset(resp, 0, sizeof(*resp)); return rdma_rm_query_srq(&dev->rdma_dev_...
0
[ "CWE-787" ]
qemu
284f191b4abad213aed04cb0458e1600fd18d7c4
8,430,214,657,688,501,000,000,000,000,000,000,000
11
hw/rdma: Fix possible mremap overflow in the pvrdma device (CVE-2021-3582) Ensure mremap boundaries not trusting the guest kernel to pass the correct buffer length. Fixes: CVE-2021-3582 Reported-by: VictorV (Kunlun Lab) <vv474172261@gmail.com> Tested-by: VictorV (Kunlun Lab) <vv474172261@gmail.com> Signed-off-by: Mar...
pushEvent(int cmd, void *data) { Event *event; event = New(Event); event->cmd = cmd; event->data = data; event->next = NULL; if (CurrentEvent) LastEvent->next = event; else CurrentEvent = event; LastEvent = event; }
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
217,405,338,520,240,700,000,000,000,000,000,000,000
14
Make temporary directory safely when ~/.w3m is unwritable
static struct dentry *ext2_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { return mount_bdev(fs_type, flags, dev_name, data, ext2_fill_super); }
0
[ "CWE-241", "CWE-19" ]
linux
be0726d33cb8f411945884664924bed3cb8c70ee
60,148,637,238,153,850,000,000,000,000,000,000,000
5
ext2: convert to mbcache2 The conversion is generally straightforward. We convert filesystem from a global cache to per-fs one. Similarly to ext4 the tricky part is that xattr block corresponding to found mbcache entry can get freed before we get buffer lock for that block. So we have to check whether the entry is sti...
e_ews_connection_get_password_expiration_finish (EEwsConnection *cnc, GAsyncResult *result, gchar **exp_date, GError **error) { GSimpleAsyncResult *simple; EwsAsyncData *a...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
302,870,084,281,030,320,000,000,000,000,000,000,000
27
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
static inline void vrend_sync_shader_io(struct vrend_sub_context *sub_ctx, struct vrend_shader_selector *sel, struct vrend_shader_key *key) { unsigned type = sel->type; int prev_type = (type != PIPE_SHADER_VERTEX) ? PIPE_...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
221,498,477,429,351,980,000,000,000,000,000,000,000
133
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
static void reds_fill_channels(RedsState *reds, SpiceMsgChannels *channels_info) { int used_channels = 0; for (const auto channel: reds->channels) { if (reds->clients.size() > 1 && !channel_supports_multiple_clients(channel.get())) { continue; } channels_info->ch...
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
264,102,752,320,377,870,000,000,000,000,000,000,000
19
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>
static int add_double(zval* list, char* id, double num) { if(id) return add_assoc_double(list, id, num); else return add_next_index_double(list, num); }
0
[]
php-src
f3c1863aa2721343245b63ac7bd68cfdc3dd41f3
324,457,516,600,788,300,000,000,000,000,000,000,000
4
Fixed #70728 Conflicts: ext/xmlrpc/xmlrpc-epi-php.c
DetectPrefilterSetNonPrefilterList(const Packet *p, DetectEngineThreadCtx *det_ctx, DetectRunScratchpad *scratch) { if ((p->proto == IPPROTO_TCP) && (p->tcph != NULL) && (p->tcph->th_flags & TH_SYN)) { det_ctx->non_pf_store_ptr = scratch->sgh->non_pf_syn_store_array; det_ctx->non_pf_store_cnt = scra...
0
[ "CWE-347" ]
suricata
d8634daf74c882356659addb65fb142b738a186b
206,776,490,746,976,400,000,000,000,000,000,000,000
14
stream: fix false negative on bad RST If a bad RST was received the stream inspection would not happen for that packet, but it would still move the 'raw progress' tracker forward. Following good packets would then fail to detect anything before the 'raw progress' position. Bug #2770 Reported-by: Alexey Vishnyakov
static MagickBooleanType ReadTIM2ImageData(const ImageInfo *image_info, Image *image,TIM2ImageHeader *header,char clut_depth,char bits_per_pixel, ExceptionInfo *exception) { MagickBooleanType status; ssize_t x; Quantum *q; unsigned char *p; size_t bits_per_line, bytes_per_line;...
1
[ "CWE-617" ]
ImageMagick
716496e6df0add89e9679d6da9c0afca814cfe49
303,114,689,822,706,200,000,000,000,000,000,000,000
383
do not attempt to write a null image list (thanks to Vinay Rohila)
static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns) { /* Start with the same capabilities as init but useless for doing * anything as the capabilities are bound to the new user namespace. */ cred->securebits = SECUREBITS_DEFAULT; cred->cap_inheritable = CAP_EMPTY_SET; cred->cap_permi...
0
[ "CWE-20", "CWE-862", "CWE-863" ]
linux
d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd
252,476,540,531,654,500,000,000,000,000,000,000,000
18
userns: also map extents in the reverse map to kernel IDs The current logic first clones the extent array and sorts both copies, then maps the lower IDs of the forward mapping into the lower namespace, but doesn't map the lower IDs of the reverse mapping. This means that code in a nested user namespace with >5 extent...
static inline bool __is_back_mergeable(struct extent_info *cur, struct extent_info *back) { return __is_extent_mergeable(back, cur); }
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
197,962,727,090,259,030,000,000,000,000,000,000,000
5
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static int ohci_stop_iso(struct fw_iso_context *base) { struct fw_ohci *ohci = fw_ohci(base->card); struct iso_context *ctx = container_of(base, struct iso_context, base); int index; if (ctx->base.type == FW_ISO_CONTEXT_TRANSMIT) { index = ctx - ohci->it_context_list; reg_write(ohci, OHCI1394_IsoXmitIntMaskCle...
0
[ "CWE-399" ]
linux-2.6
8c0c0cc2d9f4c523fde04bdfe41e4380dec8ee54
197,085,825,105,413,530,000,000,000,000,000,000,000
18
firewire: ohci: handle receive packets with a data length of zero Queueing to receive an ISO packet with a payload length of zero silently does nothing in dualbuffer mode, and crashes the kernel in packet-per-buffer mode. Return an error in dualbuffer mode, because the DMA controller won't let us do what we want, and...
onig_node_conv_to_str_node(Node* node, int flag) { NODE_SET_TYPE(node, NODE_STRING); STR_(node)->flag = flag; STR_(node)->capa = 0; STR_(node)->s = STR_(node)->buf; STR_(node)->end = STR_(node)->buf; }
0
[ "CWE-476" ]
oniguruma
850bd9b0d8186eb1637722b46b12656814ab4ad2
123,758,738,163,936,500,000,000,000,000,000,000,000
8
fix #87: Read unknown address in onig_error_code_to_str()
static void i40e_fdir_sb_setup(struct i40e_pf *pf) { struct i40e_vsi *vsi; /* quick workaround for an NVM issue that leaves a critical register * uninitialized */ if (!rd32(&pf->hw, I40E_GLQF_HKEY(0))) { static const u32 hkey[] = { 0xe640d33f, 0xcdfe98ab, 0x73fa7161, 0x0d7a7d36, 0xeacb7d61, 0xaa4f05b6, ...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
213,818,143,795,789,820,000,000,000,000,000,000,000
39
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>
ldbm_config_entryrdn_noancestorid_set(void *arg __attribute__((unused)), void *value, char *errorbuf __attribute__((unused)), int phase __attribute__((unused)), int app...
0
[ "CWE-399", "CWE-203" ]
389-ds-base
cc0f69283abc082488824702dae485b8eae938bc
92,094,362,205,923,600,000,000,000,000,000,000,000
11
Issue 4480 - Unexpected info returned to ldap request (#4491) Bug description: If the bind entry does not exist, the bind result info reports that 'No such entry'. It should not give any information if the target entry exists or not Fix description: Does not return any additional information d...
int state_printf (STATE *s, const char *fmt, ...) { int rv; va_list ap; va_start (ap, fmt); rv = vfprintf (s->fpout, fmt, ap); va_end (ap); return rv; }
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
318,118,151,256,844,460,000,000,000,000,000,000,000
11
use a 64-bit random value in temporary filenames. closes #3158
static void mcryptd_queue_worker(struct work_struct *work) { struct mcryptd_cpu_queue *cpu_queue; struct crypto_async_request *req, *backlog; int i; /* * Need to loop through more than once for multi-buffer to * be effective. */ cpu_queue = container_of(work, struct mcryptd_cpu_queue, work); i = 0; while...
0
[ "CWE-476", "CWE-284" ]
linux
48a992727d82cb7db076fa15d372178743b1f4cd
149,017,142,871,892,880,000,000,000,000,000,000,000
40
crypto: mcryptd - Check mcryptd algorithm compatibility Algorithms not compatible with mcryptd could be spawned by mcryptd with a direct crypto_alloc_tfm invocation using a "mcryptd(alg)" name construct. This causes mcryptd to crash the kernel if an arbitrary "alg" is incompatible and not intended to be used with mcr...
void RateTransposer::setChannels(int nChannels) { assert(nChannels > 0); if (pTransposer->numChannels == nChannels) return; pTransposer->setChannels(nChannels); inputBuffer.setChannels(nChannels); midBuffer.setChannels(nChannels); outputBuffer.setChannels(nChannels); }
1
[ "CWE-617" ]
soundtouch
107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260
126,794,190,909,765,220,000,000,000,000,000,000,000
11
Replaced illegal-number-of-channel assertions with run-time exception
static bool process_reference_noreturn_cb(void *u, const ut64 k, const void *v) { RzCore *core = ((struct core_noretl *)u)->core; RzList *noretl = ((struct core_noretl *)u)->noretl; SetU *todo = ((struct core_noretl *)u)->todo; RzAnalysisXRef *xref = (RzAnalysisXRef *)v; if (xref->type == RZ_ANALYSIS_REF_TYPE_CALL...
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
317,048,184,972,979,600,000,000,000,000,000,000,000
29
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
au_del_group(char_u *name) { int i; i = au_find_group(name); if (i == AUGROUP_ERROR) // the group doesn't exist semsg(_(e_no_such_group_str), name); else if (i == current_augroup) emsg(_(e_cannot_delete_current_group)); else { event_T event; AutoPat *ap; int in_use = FALSE; for (even...
0
[ "CWE-122", "CWE-787" ]
vim
5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089
7,784,494,311,943,954,000,000,000,000,000,000,000
34
patch 9.0.0061: ml_get error with nested autocommand Problem: ml_get error with nested autocommand. Solution: Also check line numbers for a nested autocommand. (closes #10761)
std::vector<char*> get_list(const std::string& name, bool use_brackets = true) const { std::vector<char*> ret; std::string plus = name + (use_brackets ? "[]" : ""); char* element = nullptr; int count = 0; while (1) { ...
0
[ "CWE-703" ]
Crow
79eec91f00b5fb7df890d4e84b2f048b0841e044
39,605,634,547,299,680,000,000,000,000,000,000,000
16
Fixed issue where an index in qs_parse is incorrectly incremented beyond the maximum possible value
static int decode_attr_time_metadata(struct xdr_stream *xdr, uint32_t *bitmap, struct timespec64 *time) { int status = 0; time->tv_sec = 0; time->tv_nsec = 0; if (unlikely(bitmap[1] & (FATTR4_WORD1_TIME_METADATA - 1U))) return -EIO; if (likely(bitmap[1] & FATTR4_WORD1_TIME_METADATA)) { status = decode_attr_ti...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
20,334,921,903,811,711,000,000,000,000,000,000,000
17
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...
TEST_F(ExprMatchTest, FailGracefullyOnInvalidExpression) { ASSERT_THROWS_CODE(createMatcher(fromjson("{$expr: {$anyElementTrue: undefined}}")), AssertionException, 17041); ASSERT_THROWS_CODE( createMatcher(fromjson("{$and: [{x: 1},{$expr: {$anyElementTrue: u...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
304,490,175,317,498,940,000,000,000,000,000,000,000
17
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
template<typename T> CImgDisplay& render(const CImg<T>& img) { if (!img) throw CImgArgumentException(_cimgdisplay_instance "render(): Empty specified image.", cimgdisplay_instance); if (is_empty()) return *this; i...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
35,265,904,562,015,183,000,000,000,000,000,000,000
84
.
int StreamInfoWrapper::luaDynamicMetadata(lua_State* state) { if (dynamic_metadata_wrapper_.get() != nullptr) { dynamic_metadata_wrapper_.pushStack(); } else { dynamic_metadata_wrapper_.reset(DynamicMetadataMapWrapper::create(state, *this), true); } return 1; }
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
111,056,359,364,684,500,000,000,000,000,000,000,000
8
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...
process(register int code, unsigned char** fill) { int incode; static unsigned char firstchar; if (code == clear) { codesize = datasize + 1; codemask = (1 << codesize) - 1; avail = clear + 2; oldcode = -1; return 1; } if (oldcode == -1) { *(*fill)++ = suffix[code]; firstchar = oldcode = cod...
1
[ "CWE-119", "CWE-787" ]
libtiff
ce6841d9e41d621ba23cf18b190ee6a23b2cc833
114,389,091,137,169,320,000,000,000,000,000,000,000
48
fix possible OOB write in gif2tiff.c
replace_rw_async_data_free (ReplaceRWAsyncData *data) { g_free (data->etag); g_free (data); }
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
57,435,237,554,474,380,000,000,000,000,000,000,000
5
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
uc_list(char_u *name, size_t name_len) { int i, j; int found = FALSE; ucmd_T *cmd; int len; int over; long a; garray_T *gap; // In cmdwin, the alternative buffer should be used. gap = &prevwin_curwin()->w_buffer->b_ucmds; for (;;) { for (i = 0; i < gap->ga_len; ++i) { ...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
63,416,185,878,183,300,000,000,000,000,000,000,000
168
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
void imap_qualify_path(char *buf, size_t buflen, struct ConnAccount *cac, char *path) { struct Url url = { 0 }; mutt_account_tourl(cac, &url); url.path = path; url_tostring(&url, buf, buflen, U_NO_FLAGS); }
0
[ "CWE-125" ]
neomutt
fa1db5785e5cfd9d3cd27b7571b9fe268d2ec2dc
193,511,972,337,652,420,000,000,000,000,000,000,000
7
Fix seqset iterator when it ends in a comma If the seqset ended with a comma, the substr_end marker would be just before the trailing nul. In the next call, the loop to skip the marker would iterate right past the end of string too. The fix is simple: place the substr_end marker and skip past it immediately.