func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
char * copy_fifo_list (sizep) int *sizep; { if (sizep) *sizep = 0; return (char *)NULL;
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
317,783,823,912,346,900,000,000,000,000,000,000,000
7
Bash-4.4 patch 7
static int check_ptr_to_btf_access(struct bpf_verifier_env *env, struct bpf_reg_state *regs, int regno, int off, int size, enum bpf_access_type atype, int value_regno) { struct bpf_reg_state *reg = regs + regno; const struct btf_type *t = btf_type_by_id(btf_vmlinux, reg->btf_id); const ch...
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
276,655,852,367,498,960,000,000,000,000,000,000,000
49
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
ptaInsertPt(PTA *pta, l_int32 index, l_int32 x, l_int32 y) { l_int32 i, n; PROCNAME("ptaInsertPt"); if (!pta) return ERROR_INT("pta not defined", procName, 1); n = ptaGetCount(pta); if (index < 0 || index > n) return ERROR_INT("index not in {...
0
[ "CWE-119", "CWE-787" ]
leptonica
ee301cb2029db8a6289c5295daa42bba7715e99a
334,633,466,613,805,970,000,000,000,000,000,000,000
26
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 tg3_process_error(struct tg3 *tp) { u32 val; bool real_error = false; if (tg3_flag(tp, ERROR_PROCESSED)) return; /* Check Flow Attention register */ val = tr32(HOSTCC_FLOW_ATTN); if (val & ~HOSTCC_FLOW_ATTN_MBUF_LWM) { netdev_err(tp->dev, "FLOW Attention error. Resetting chip.\n"); real_error...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
197,916,589,157,046,500,000,000,000,000,000,000,000
33
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 void h2_destroy(struct connection *conn) { struct h2c *h2c = conn->ctx; if (eb_is_empty(&h2c->streams_by_id)) h2_release(h2c->conn); }
0
[ "CWE-125" ]
haproxy
a01f45e3ced23c799f6e78b5efdbd32198a75354
190,015,984,733,671,440,000,000,000,000,000,000,000
7
BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder when the PRIORITY flag is present. A check is missing to ensure the 5 extra bytes needed with this flag are actually part of the frame. As per RFC7540#4.2, let's return a connec...
static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation, int broadcast_flags, struct sock *one_sk, struct net *net) { struct netns_pfkey *net_pfkey = net_generic(net, pfkey_net_id); struct sock *sk; struct sk_buff *skb2 = NULL; int err = -ESRCH; /* XXX Do we need something like netlink_overru...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
289,439,744,223,542,400,000,000,000,000,000,000,000
56
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 kdb_help(int argc, const char **argv) { kdbtab_t *kt; kdb_printf("%-15.15s %-20.20s %s\n", "Command", "Usage", "Description"); kdb_printf("-----------------------------" "-----------------------------\n"); list_for_each_entry(kt, &kdb_cmds_head, list_node) { char *space = ""; if (KDB_FLAG(CMD_I...
0
[ "CWE-787" ]
linux
eadb2f47a3ced5c64b23b90fd2a3463f63726066
53,716,144,507,530,735,000,000,000,000,000,000,000
20
lockdown: also lock down previous kgdb use KGDB and KDB allow read and write access to kernel memory, and thus should be restricted during lockdown. An attacker with access to a serial port (for example, via a hypervisor console, which some cloud vendors provide over the network) could trigger the debugger so it is i...
bgp_write_notify (struct peer *peer) { int ret, val; u_char type; struct stream *s; /* There should be at least one packet. */ s = stream_fifo_head (peer->obuf); if (!s) return 0; assert (stream_get_endp (s) >= BGP_HEADER_SIZE); /* Put socket in blocking mode. */ val = fcntl (peer->fd, F_GETFL,...
0
[ "CWE-119" ]
quagga
5861739f8c38bc36ea9955e5cb2be2bf2f482d70
70,698,109,488,154,910,000,000,000,000,000,000,000
43
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...
AsyncUDPSocket& getSocket() { return *socket_; }
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
139,624,842,802,262,380,000,000,000,000,000,000,000
3
Close connection if we derive an extra 1-rtt write cipher Summary: Fixes CVE-2021-24029 Reviewed By: mjoras, lnicco Differential Revision: D26613890 fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945
void ConnectionManagerImpl::ActiveStream::onStreamMaxDurationReached() { ENVOY_STREAM_LOG(debug, "Stream max duration time reached", *this); connection_manager_.stats_.named_.downstream_rq_max_duration_reached_.inc(); connection_manager_.doEndStream(*this); }
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
292,963,207,476,131,570,000,000,000,000,000,000,000
5
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
static sector_t ext4_bmap(struct address_space *mapping, sector_t block) { struct inode *inode = mapping->host; journal_t *journal; int err; /* * We can get here for an inline file via the FIBMAP ioctl */ if (ext4_has_inline_data(inode)) return 0; if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY) && tes...
0
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
316,743,682,948,340,240,000,000,000,000,000,000,000
54
ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently...
TEST(ParseOperand, ShouldRecognizeNumberLiteral) { auto resultExpression = parseOperand(BSON("" << 5)); auto constantExpression = dynamic_cast<ExpressionConstant*>(resultExpression.get()); ASSERT_TRUE(constantExpression); ASSERT_VALUE_EQ(constantExpression->serialize(false), Value(Document{{"$const", 5}...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
14,155,221,077,736,097,000,000,000,000,000,000,000
6
SERVER-38070 fix infinite loop in agg expression
lex(struct scanner *s, union lvalue *val) { skip_more_whitespace_and_comments: /* Skip spaces. */ while (is_space(peek(s))) if (next(s) == '\n') return TOK_END_OF_LINE; /* Skip comments. */ if (chr(s, '#')) { skip_to_eol(s); goto skip_more_whitespace_and_comments; ...
1
[ "CWE-835" ]
libxkbcommon
842e4351c2c97de6051cab6ce36b4a81e709a0e1
201,779,090,834,516,580,000,000,000,000,000,000,000
116
compose: fix infinite loop in parser on some inputs The parser would enter an infinite loop if an unterminated keysym literal occurs at EOF. Found with the afl fuzzer. Signed-off-by: Ran Benita <ran234@gmail.com>
int cdrom_mode_select(struct cdrom_device_info *cdi, struct packet_command *cgc) { const struct cdrom_device_ops *cdo = cdi->ops; memset(cgc->cmd, 0, sizeof(cgc->cmd)); memset(cgc->buffer, 0, 2); cgc->cmd[0] = GPCMD_MODE_SELECT_10; cgc->cmd[1] = 0x10; /* PF */ cgc->cmd[7] = cgc->buflen >> 8; cgc->cmd[8...
0
[ "CWE-119", "CWE-787" ]
linux
9de4ee40547fd315d4a0ed1dd15a2fa3559ad707
300,596,598,460,445,900,000,000,000,000,000,000,000
14
cdrom: information leak in cdrom_ioctl_media_changed() This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned long. The way the check is written now, if one of the high 32 bits is set then we could read outside the info->slots[] array. This bug is pretty old and it predates git. Reviewed-by: Christ...
TEST_F(QueryPlannerTest, MaxMinSortInequalityFirstSortSecond) { addIndex(BSON("a" << 1 << "b" << 1)); // Run an empty query, sort {b: 1}, max/min arguments. runQueryFull(BSONObj(), fromjson("{b: 1}"), BSONObj(), 0, 0, BSON...
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
340,009,197,622,907,300,000,000,000,000,000,000,000
20
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
int regexp_c_locale(char **u, size_t *len) { /* Without uselocale, we need to expand character ranges */ int r; char *s = *u; size_t s_len, u_len; if (len == NULL) { len = &u_len; s_len = strlen(s); } else { s_len = *len; } r = fa_expand_char_ranges(s, s_len, u, l...
0
[]
augeas
1a66739c3fc14b3257af5d4a32d0a2a714a7b39d
131,531,422,041,905,340,000,000,000,000,000,000,000
24
* src/transform.c (xread_file): catch failed fopen, e.g. EACCES
memory_read_privatekey(LIBSSH2_SESSION * session, const LIBSSH2_HOSTKEY_METHOD ** hostkey_method, void **hostkey_abstract, const unsigned char *method, int method_len, const char *privkeyfiledata, size_t privkeyfiledata_len, ...
0
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
55,897,827,482,040,340,000,000,000,000,000,000,000
36
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
static int hci_req_add_le_interleaved_scan(struct hci_request *req, unsigned long opt) { struct hci_dev *hdev = req->hdev; int ret = 0; hci_dev_lock(hdev); if (hci_dev_test_flag(hdev, HCI_LE_SCAN)) hci_req_add_le_scan_disable(req, false); hci_req_add_le_passive_scan(req); switch (hdev->interleave_sca...
0
[ "CWE-362" ]
linux
e2cb6b891ad2b8caa9131e3be70f45243df82a80
118,057,993,764,912,050,000,000,000,000,000,000,000
30
bluetooth: eliminate the potential race condition when removing the HCI controller There is a possible race condition vulnerability between issuing a HCI command and removing the cont. Specifically, functions hci_req_sync() and hci_dev_do_close() can race each other like below: thread-A in hci_req_sync() | th...
vc4_cl_lookup_bos(struct drm_device *dev, struct drm_file *file_priv, struct vc4_exec_info *exec) { struct drm_vc4_submit_cl *args = exec->args; uint32_t *handles; int ret = 0; int i; exec->bo_count = args->bo_handle_count; if (!exec->bo_count) { /* See comment on bo_index for why we have to check ...
0
[ "CWE-190", "CWE-703" ]
linux
0f2ff82e11c86c05d051cae32b58226392d33bbf
28,257,515,780,899,937,000,000,000,000,000,000,000
61
drm/vc4: Fix an integer overflow in temporary allocation layout. We copy the unvalidated ioctl arguments from the user into kernel temporary memory to run the validation from, to avoid a race where the user updates the unvalidate contents in between validating them and copying them into the validated BO. However, in ...
void vrend_set_single_ssbo(struct vrend_context *ctx, uint32_t shader_type, uint32_t index, uint32_t offset, uint32_t length, uint32_t handle) { struct vrend_ssbo *ssbo = &ctx->sub->ssbo[shader_type][index]; ...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
5,229,854,211,678,195,000,000,000,000,000,000,000
29
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>
parseMaxPDU(DUL_MAXLENGTH * max, unsigned char *buf, unsigned long *itemLength, unsigned long availData) { // We want to read 8 bytes of data, is there enough data? if (availData < 8) return makeLengthError("Max PDU", availData, 8); max->type = *buf++; max->rsv1 = *buf++; EXTRAC...
0
[ "CWE-415", "CWE-703", "CWE-401" ]
dcmtk
a9697dfeb672b0b9412c00c7d36d801e27ec85cb
163,177,917,272,488,370,000,000,000,000,000,000,000
25
Fixed poss. NULL pointer dereference/double free. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches.
void mddev_unlock(struct mddev *mddev) { if (mddev->to_remove) { /* These cannot be removed under reconfig_mutex as * an access to the files will try to take reconfig_mutex * while holding the file unremovable, which leads to * a deadlock. * So hold set sysfs_active while the remove in happeing, * and...
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
110,179,796,029,992,220,000,000,000,000,000,000,000
42
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
rb_str_aref(str, indx) VALUE str; VALUE indx; { long idx; switch (TYPE(indx)) { case T_FIXNUM: idx = FIX2LONG(indx); num_index: if (idx < 0) { idx = RSTRING(str)->len + idx; } if (idx < 0 || RSTRING(str)->len <= idx) { return Qnil; } return INT2FIX(RSTRING(str)->ptr[idx] & ...
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
197,023,519,829,661,170,000,000,000,000,000,000,000
49
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
explicit CollectiveBcastSendV2OpKernel(OpKernelConstruction* c) : CollectiveOpV2Kernel(c) { const bool is_source = true; name_ = strings::StrCat(name(), ": Broadcast(", is_source, ")"); }
0
[ "CWE-416" ]
tensorflow
ca38dab9d3ee66c5de06f11af9a4b1200da5ef75
121,060,510,396,229,640,000,000,000,000,000,000,000
5
Fix undefined behavior in CollectiveReduceV2 and others We should not call done after it's moved. PiperOrigin-RevId: 400838185 Change-Id: Ifc979740054b8f8c6f4d50acc89472fe60c4fdb1
parameter_brace_substring (varname, value, ind, substr, quoted, flags) char *varname, *value; int ind; char *substr; int quoted, flags; { intmax_t e1, e2; int vtype, r, starsub; char *temp, *val, *tt, *oname; SHELL_VAR *v; if (value == 0 && ((varname[0] != '@' && varname[0] != '*') || var...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
202,903,533,609,240,660,000,000,000,000,000,000,000
86
bash-4.4-rc2 release
int crypto_has_ahash(const char *alg_name, u32 type, u32 mask) { return crypto_type_has_alg(alg_name, &crypto_ahash_type, type, mask); }
0
[ "CWE-835" ]
linux
ef0579b64e93188710d48667cb5e014926af9f1b
192,711,503,507,643,060,000,000,000,000,000,000,000
4
crypto: ahash - Fix EINPROGRESS notification callback The ahash API modifies the request's callback function in order to clean up after itself in some corner cases (unaligned final and missing finup). When the request is complete ahash will restore the original callback and everything is fine. However, when the requ...
explicit AddOpsRewriteStage(const GraphOptimizerContext& ctx, const ArithmeticOptimizerContext& ctx_ext) : ArithmeticNodesGroupOptimizerStage("AddOpsRewrite", ctx, ctx_ext) {}
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
21,479,876,630,254,176,000,000,000,000,000,000,000
3
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
RecordDisableContext(RecordContextPtr pContext) { RecordClientsAndProtocolPtr pRCAP; int i; if (!pContext->pRecordingClient) return; if (!pContext->pRecordingClient->clientGone) { RecordAProtocolElement(pContext, NULL, XRecordEndOfData, NULL, 0, 0, 0); RecordFlushReplyBuffer(pCo...
0
[ "CWE-191" ]
xserver
2902b78535ecc6821cc027351818b28a5c7fdbdc
200,653,983,551,854,250,000,000,000,000,000,000,000
33
Fix XRecordRegisterClients() Integer underflow CVE-2020-14362 ZDI-CAN-11574 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
xsltDefaultProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node, xsltStackElemPtr params) { xmlNodePtr copy; xmlNodePtr delete = NULL, cur; int nbchild = 0, oldSize; int childno = 0, oldPos; xsltTemplatePtr template; CHECK_STOPPED; /* * Handling of leaves */ switc...
0
[]
libxslt
e03553605b45c88f0b4b2980adfbbb8f6fca2fd6
52,886,267,465,473,320,000,000,000,000,000,000,000
235
Fix security framework bypass xsltCheckRead and xsltCheckWrite return -1 in case of error but callers don't check for this condition and allow access. With a specially crafted URL, xsltCheckRead could be tricked into returning an error because of a supposedly invalid URL that would still be loaded succesfully later on...
static void handle_RMD(ctrl_t *ctrl, char *arg) { handle_DELE(ctrl, arg); }
0
[ "CWE-120", "CWE-787" ]
uftpd
0fb2c031ce0ace07cc19cd2cb2143c4b5a63c9dd
286,084,565,394,783,000,000,000,000,000,000,000,000
4
FTP: Fix buffer overflow in PORT parser, reported by Aaron Esau Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
static void b43_short_slot_timing_disable(struct b43_wldev *dev) { b43_set_slot_time(dev, 20); }
0
[ "CWE-134" ]
wireless
9538cbaab6e8b8046039b4b2eb6c9d614dc782bd
120,991,387,906,729,580,000,000,000,000,000,000,000
4
b43: stop format string leaking into error msgs The module parameter "fwpostfix" is userspace controllable, unfiltered, and is used to define the firmware filename. b43_do_request_fw() populates ctx->errors[] on error, containing the firmware filename. b43err() parses its arguments as a format string. For systems with...
static void tcf_proto_put(struct tcf_proto *tp, bool rtnl_held, struct netlink_ext_ack *extack) { if (refcount_dec_and_test(&tp->refcnt)) tcf_proto_destroy(tp, rtnl_held, true, extack); }
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
90,178,259,932,599,340,000,000,000,000,000,000,000
6
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...
size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count) { size_t ret = 0; if (s->s3 != NULL) { ret = s->s3->tmp.peer_finish_md_len; if (count > ret) count = ret; memcpy(buf, s->s3->tmp.peer_finish_md, count); } return ret; }
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
98,897,796,779,007,380,000,000,000,000,000,000,000
13
Add Next Protocol Negotiation.
int ext4_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh_result, int create) { handle_t *handle = ext4_journal_current_handle(); int ret = 0, started = 0; unsigned max_blocks = bh_result->b_size >> inode->i_blkbits; int dio_credits; if (create && !handle) { /* Direct IO write... */ ...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
330,215,994,617,483,450,000,000,000,000,000,000,000
32
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
evbuffer_expand(struct evbuffer *buf, size_t datlen) { struct evbuffer_chain *chain; EVBUFFER_LOCK(buf); chain = evbuffer_expand_singlechain(buf, datlen); EVBUFFER_UNLOCK(buf); return chain ? 0 : -1; }
0
[ "CWE-189" ]
libevent
20d6d4458bee5d88bda1511c225c25b2d3198d6c
271,237,291,003,032,850,000,000,000,000,000,000,000
9
Fix CVE-2014-6272 in Libevent 2.0 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
static inline int dev_requeue_skb(struct sk_buff *skb, struct net_device *dev, struct Qdisc *q) { if (unlikely(skb->next)) dev->gso_skb = skb; else q->ops->requeue(skb, q); netif_schedule(dev); return 0; }
0
[ "CWE-399" ]
linux-2.6
2ba2506ca7ca62c56edaa334b0fe61eb5eab6ab0
223,019,746,771,586,040,000,000,000,000,000,000,000
11
[NET]: Add preemption point in qdisc_run The qdisc_run loop is currently unbounded and runs entirely in a softirq. This is bad as it may create an unbounded softirq run. This patch fixes this by calling need_resched and breaking out if necessary. It also adds a break out if the jiffies value changes since that woul...
int ssl2_shutdown(SSL *s) { s->shutdown = (SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); return (1); }
0
[ "CWE-20" ]
openssl
86f8fb0e344d62454f8daf3e15236b2b59210756
177,812,147,112,798,140,000,000,000,000,000,000,000
5
Fix reachable assert in SSLv2 servers. This assert is reachable for servers that support SSLv2 and export ciphers. Therefore, such servers can be DoSed by sending a specially crafted SSLv2 CLIENT-MASTER-KEY. Also fix s2_srvr.c to error out early if the key lengths are malformed. These lengths are sent unencrypted, so...
add_tree_first_ipv4(const u_char *data, const int len, const int datalink) { tcpr_tree_t *newnode, *findnode; const u_char *packet = data; uint32_t _U_ vlan_offset; uint32_t pkt_len = len; uint16_t ether_type; uint32_t l2offset; ipv4_hdr_t ip_hdr; uint32_t l2len; int res; assert...
1
[ "CWE-476" ]
tcpreplay
46cf964a7db636da76abeebf10482acf6f682a87
100,694,689,434,345,540,000,000,000,000,000,000,000
71
Bug #677 - fixes for tcpprep tree
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); array_init(&EX_T(opline->result.u.var).tmp_var); if (IS_VAR == IS_UNUSED) { ZEND_VM_NEXT_OPCODE(); #if 0 || IS_VAR != IS_UNUSED } else { return ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CONST_HANDLE...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
312,607,084,606,594,800,000,000,000,000,000,000,000
13
- 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
srtp_protect_aead (srtp_ctx_t *ctx, srtp_stream_ctx_t *stream, void *rtp_hdr, unsigned int *pkt_octet_len) { srtp_hdr_t *hdr = (srtp_hdr_t*)rtp_hdr; uint32_t *enc_start; /* pointer to start of encrypted portion */ unsigned int enc_octet_len = 0; /* number of octets in encrypted portion ...
1
[ "CWE-119" ]
libsrtp
be95365fbb4788b688cab7af61c65b7989055fb4
88,340,226,123,085,920,000,000,000,000,000,000,000
121
Apply a7216c19582827cdbd5cacce5618db0b6be8d851 to 1.5.x throttle
TEST_F(OAuth2Test, OAuthErrorQueryString) { Http::TestRequestHeaderMapImpl request_headers{ {Http::Headers::get().Path.get(), "/_oauth?error=someerrorcode"}, {Http::Headers::get().Host.get(), "traffic.example.com"}, {Http::Headers::get().Method.get(), Http::Headers::get().MethodValues.Get}, }; ...
0
[ "CWE-416" ]
envoy
7ffda4e809dec74449ebc330cebb9d2f4ab61360
97,175,582,113,237,600,000,000,000,000,000,000,000
25
oauth2: do not blindly accept requests with a token in the Authorization headera (781) The logic was broken because it assumed an additional call would be performed to the auth server, which isn't the case. Per the filter documentation, a request is only considered subsequently authenticated if there's valid cookie th...
repinfo_copy_rrsets(struct reply_info* dest, struct reply_info* from, struct regional* region) { size_t i, s; struct packed_rrset_data* fd, *dd; struct ub_packed_rrset_key* fk, *dk; for(i=0; i<dest->rrset_count; i++) { fk = from->rrsets[i]; dk = dest->rrsets[i]; fd = (struct packed_rrset_data*)fk->entry.dat...
0
[ "CWE-787" ]
unbound
6c3a0b54ed8ace93d5b5ca7b8078dc87e75cd640
132,811,705,259,801,660,000,000,000,000,000,000,000
33
- Fix Out of Bound Write Compressed Names in rdata_copy(), reported by X41 D-Sec.
void Downstream::set_request_downstream_host(const StringRef &host) { request_downstream_host_ = host; }
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
166,039,217,095,061,890,000,000,000,000,000,000,000
3
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
S_invlist_previous_index(SV* const invlist) { /* Returns cached index of previous search */ PERL_ARGS_ASSERT_INVLIST_PREVIOUS_INDEX; return *get_invlist_previous_index_addr(invlist); }
0
[ "CWE-125" ]
perl5
43b2f4ef399e2fd7240b4eeb0658686ad95f8e62
71,281,672,501,605,660,000,000,000,000,000,000,000
8
regcomp.c: Convert some strchr to memchr This allows things to work properly in the face of embedded NULs. See the branch merge message for more information.
u32 __tcp_select_window(struct sock *sk) { struct inet_connection_sock *icsk = inet_csk(sk); struct tcp_sock *tp = tcp_sk(sk); /* MSS for the peer's data. Previous versions used mss_clamp * here. I don't know if the value based on our guesses * of peer's MSS is better for the performance. It's more correct ...
0
[ "CWE-190" ]
net
3b4929f65b0d8249f19a50245cd88ed1a2f78cff
27,062,373,953,850,233,000,000,000,000,000,000,000
77
tcp: limit payload size of sacked skbs Jonathan Looney reported that TCP can trigger the following crash in tcp_shifted_skb() : BUG_ON(tcp_skb_pcount(skb) < pcount); This can happen if the remote peer has advertized the smallest MSS that linux TCP accepts : 48 An skb can hold 17 fragments, and each fragment can ho...
static DnsStream *dns_stream_free(DnsStream *s) { DnsPacket *p; Iterator i; assert(s); dns_stream_stop(s); if (s->server && s->server->stream == s) s->server->stream = NULL; if (s->manager) { LIST_REMOVE(streams, s->manager->dns_streams...
0
[ "CWE-416", "CWE-703" ]
systemd
d973d94dec349fb676fdd844f6fe2ada3538f27c
235,641,531,743,469,300,000,000,000,000,000,000,000
32
resolved: pin stream while calling callbacks for it These callbacks might unref the stream, but we still have to access it, let's hence ref it explicitly. Maybe fixes: #10725
static noinline_for_stack int ethtool_get_rxnfc(struct net_device *dev, void __user *useraddr) { struct ethtool_rxnfc info; const struct ethtool_ops *ops = dev->ethtool_ops; int ret; void *rule_buf = NULL; if (!ops->get_rxnfc) return -EOPNOTSUPP; if (copy_from_user(&info, useraddr, sizeof(info))) retu...
1
[ "CWE-190" ]
linux-2.6
db048b69037e7fa6a7d9e95a1271a50dc08ae233
256,352,693,318,403,330,000,000,000,000,000,000,000
44
ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL On a 32-bit machine, info.rule_cnt >= 0x40000000 leads to integer overflow and the buffer may be smaller than needed. Since ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at least denial of service. Signed-off-by: Ben Hutching...
dt_lite_to_s(VALUE self) { return strftimev("%Y-%m-%dT%H:%M:%S%:z", self, set_tmx); }
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
70,650,362,064,189,440,000,000,000,000,000,000,000
4
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) { audit_inode_child(inode, dentry, AUDIT_TYPE_CHILD_CREATE); fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); }
0
[ "CWE-362", "CWE-399" ]
linux
49d31c2f389acfe83417083e1208422b4091cd9e
69,434,350,152,555,590,000,000,000,000,000,000,000
6
dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same st...
xmlBufResize(xmlBufPtr buf, size_t size) { unsigned int newSize; xmlChar* rebuf = NULL; size_t start_buf; if ((buf == NULL) || (buf->error)) return(0); CHECK_COMPAT(buf) if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0); if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) { /...
1
[ "CWE-190" ]
libxml2
6c283d83eccd940bcde15634ac8c7f100e3caefd
320,104,047,698,532,970,000,000,000,000,000,000,000
109
[CVE-2022-29824] Fix integer overflows in xmlBuf and xmlBuffer In several places, the code handling string buffers didn't check for integer overflow or used wrong types for buffer sizes. This could result in out-of-bounds writes or other memory errors when working on large, multi-gigabyte buffers. Thanks to Felix Wil...
circle_diameter(PG_FUNCTION_ARGS) { CIRCLE *circle = PG_GETARG_CIRCLE_P(0); PG_RETURN_FLOAT8(2 * circle->radius); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
105,949,840,910,826,460,000,000,000,000,000,000,000
6
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
static struct array_cache *alloc_arraycache(int node, int entries, int batchcount, gfp_t gfp) { size_t memsize = sizeof(void *) * entries + sizeof(struct array_cache); struct array_cache *ac = NULL; ac = kmalloc_node(memsize, gfp, node); init_arraycache(ac, entries, batchcount); return ac; }
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
14,528,903,392,654,502,000,000,000,000,000,000,000
10
mm/slab.c: fix SLAB freelist randomization duplicate entries This patch fixes a bug in the freelist randomization code. When a high random number is used, the freelist will contain duplicate entries. It will result in different allocations sharing the same chunk. It will result in odd behaviours and crashes. It sh...
TfLiteRegistration* Register_SPACE_TO_BATCH_ND() { // return Register_SPACE_TO_BATCH_ND_REF(); return Register_SPACE_TO_BATCH_ND_GENERIC_OPT(); }
0
[ "CWE-369" ]
tensorflow
6d36ba65577006affb272335b7c1abd829010708
146,264,596,586,993,180,000,000,000,000,000,000,000
4
Prevent division by 0 PiperOrigin-RevId: 370984990 Change-Id: Ib324955bbeb1cbd97c82fd5d61a00a2697c9a2de
static void stimer_cleanup(struct kvm_vcpu_hv_stimer *stimer) { struct kvm_vcpu *vcpu = hv_stimer_to_vcpu(stimer); trace_kvm_hv_stimer_cleanup(hv_stimer_to_vcpu(stimer)->vcpu_id, stimer->index); hrtimer_cancel(&stimer->timer); clear_bit(stimer->index, to_hv_vcpu(vcpu)->stimer_pending_bitmap); stimer-...
0
[ "CWE-476" ]
linux
919f4ebc598701670e80e31573a58f1f2d2bf918
288,630,239,026,670,400,000,000,000,000,000,000,000
13
KVM: x86: hyper-v: Fix Hyper-V context null-ptr-deref Reported by syzkaller: KASAN: null-ptr-deref in range [0x0000000000000140-0x0000000000000147] CPU: 1 PID: 8370 Comm: syz-executor859 Not tainted 5.11.0-syzkaller #0 RIP: 0010:synic_get arch/x86/kvm/hyperv.c:165 [inline] RIP: 0010:kvm_hv_set_sint_gs...
size_t bgp_packet_mpattr_start(struct stream *s, struct peer *peer, afi_t afi, safi_t safi, struct bpacket_attr_vec_arr *vecarr, struct attr *attr) { size_t sizep; iana_afi_t pkt_afi; iana_safi_t pkt_safi; afi_t nh_afi; /* Set extended bit always to encode the attribute length as 2 bytes */ s...
0
[ "CWE-20", "CWE-436" ]
frr
943d595a018e69b550db08cccba1d0778a86705a
79,299,797,337,651,340,000,000,000,000,000,000,000
122
bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined Signed-off-by: Lou Berger <lberger@labn.net>
static int vfio_pci_set_msi_trigger(struct vfio_pci_device *vdev, unsigned index, unsigned start, unsigned count, uint32_t flags, void *data) { int i; bool msix = (index == VFIO_PCI_MSIX_IRQ_INDEX) ? true : false; if (irq_is(vdev, index) && !count && (flags & VFIO_IRQ_SET_DATA_NONE)) { vfio_msi_di...
0
[ "CWE-399", "CWE-190" ]
linux
05692d7005a364add85c6e25a6c4447ce08f913a
252,793,958,502,744,530,000,000,000,000,000,000,000
50
vfio/pci: Fix integer overflows, bitmask check The VFIO_DEVICE_SET_IRQS ioctl did not sufficiently sanitize user-supplied integers, potentially allowing memory corruption. This patch adds appropriate integer overflow checks, checks the range bounds for VFIO_IRQ_SET_DATA_NONE, and also verifies that only single element...
key_ref_t lookup_user_key(key_serial_t id, unsigned long lflags, key_perm_t perm) { struct keyring_search_context ctx = { .match_data.cmp = lookup_user_key_possessed, .match_data.lookup_type = KEYRING_SEARCH_LOOKUP_DIRECT, .flags = KEYRING_SEARCH_NO_STATE_CHECK, }; struct request_key_auth *rka; struct...
0
[ "CWE-20" ]
linux
363b02dab09b3226f3bd1420dad9c72b79a42a76
270,789,946,000,235,960,000,000,000,000,000,000,000
225
KEYS: Fix race between updating and finding a negative key Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection error into one field such that: (1) The instantiation state can be modified/read atomically. (2) The error can be accessed atomically with the state. (3) The error isn't stored unione...
static void Rp_exec(js_State *J) { js_RegExp_prototype_exec(J, js_toregexp(J, 0), js_tostring(J, 1)); }
0
[ "CWE-400", "CWE-674", "CWE-787" ]
mujs
00d4606c3baf813b7b1c176823b2729bf51002a2
69,215,517,374,774,240,000,000,000,000,000,000,000
4
Bug 700937: Limit recursion in regexp matcher. Also handle negative return code as an error in the JS bindings.
trnext(t) struct tr *t; { for (;;) { if (!t->gen) { if (t->p == t->pend) return -1; if (t->p < t->pend - 1 && *t->p == '\\') { t->p++; } t->now = *(USTR)t->p++; if (t->p < t->pend - 1 && *t->p == '-') { t->p++; if (t->p < t->pend) { if (t->now > *(USTR)t->p) { t->p++; ...
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
298,914,096,854,153,140,000,000,000,000,000,000,000
32
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static JSValue js_sys_prompt_echo_off(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) { Bool echo_off; if (!argc) return GF_JS_EXCEPTION(ctx); echo_off = JS_ToBool(ctx, argv[0]); if (argc<2) gf_prompt_set_echo_off(echo_off); return JS_UNDEFINED; }
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
215,592,758,371,428,440,000,000,000,000,000,000,000
9
fixed #2138
static u32 *avic_get_logical_id_entry(struct kvm_vcpu *vcpu, u32 ldr, bool flat) { struct kvm_svm *kvm_svm = to_kvm_svm(vcpu->kvm); int index; u32 *logical_apic_id_table; int dlid = GET_APIC_LOGICAL_ID(ldr); if (!dlid) return NULL; if (flat) { /* flat */ index = ffs(dlid) - 1; if (index > 7) return NUL...
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
211,718,659,853,731,450,000,000,000,000,000,000,000
28
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...
SPL_METHOD(FilesystemIterator, key) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (zend_parse_parameters_none() == FAILURE) { return; } if (SPL_FILE_DIR_KEY(intern, SPL_FILE_DIR_KEY_AS_FILENAME)) { RETURN_STRING(intern->u.dir.entry.d_name, 1);...
1
[ "CWE-190" ]
php-src
7245bff300d3fa8bacbef7897ff080a6f1c23eba
246,450,915,863,881,470,000,000,000,000,000,000,000
15
Fix bug #72262 - do not overflow int
static int tcp_v4_send_synack(const struct sock *sk, struct dst_entry *dst, struct flowi *fl, struct request_sock *req, struct tcp_fastopen_cookie *foc, enum tcp_synack_type synack_type) { const struct inet_request_sock *ireq = inet_rsk(req); struct flowi4 fl4; int err = -1; stru...
0
[ "CWE-284" ]
linux
ac6e780070e30e4c35bd395acfe9191e6268bdd3
281,017,652,615,394,050,000,000,000,000,000,000,000
28
tcp: take care of truncations done by sk_filter() With syzkaller help, Marco Grassi found a bug in TCP stack, crashing in tcp_collapse() Root cause is that sk_filter() can truncate the incoming skb, but TCP stack was not really expecting this to happen. It probably was expecting a simple DROP or ACCEPT behavior. We ...
int kvm_dev_ioctl_check_extension(long ext) { int r; switch (ext) { case KVM_CAP_IRQCHIP: case KVM_CAP_HLT: case KVM_CAP_MMU_SHADOW_CACHE_CONTROL: case KVM_CAP_SET_TSS_ADDR: case KVM_CAP_EXT_CPUID: case KVM_CAP_CLOCKSOURCE: case KVM_CAP_PIT: case KVM_CAP_NOP_IO_DELAY: case KVM_CAP_MP_STATE: case KVM_CAP_SY...
0
[]
kvm
0769c5de24621141c953fbe1f943582d37cb4244
137,811,468,008,432,440,000,000,000,000,000,000,000
78
KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid" In order to be able to proceed checks on CPU-specific properties within the emulator, function "get_cpuid" is introduced. With "get_cpuid" it is possible to virtually call the guests "cpuid"-opcode without changing the VM's context. [mtosatti: cleanup/beautif...
find_minimal_sface_of_shell(T& D, SFace_visited_hash& Vi) : Base(D), Done(Vi), SORT(D) {}
0
[ "CWE-125" ]
cgal
5a1ab45058112f8647c14c02f58905ecc597ec76
235,129,216,872,096,460,000,000,000,000,000,000,000
2
Fix Nef_3
_outSubqueryScan(StringInfo str, const SubqueryScan *node) { WRITE_NODE_TYPE("SUBQUERYSCAN"); _outScanInfo(str, (const Scan *) node); WRITE_NODE_FIELD(subplan); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
150,223,053,742,601,510,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...
ext4_readpages(struct file *file, struct address_space *mapping, struct list_head *pages, unsigned nr_pages) { struct inode *inode = mapping->host; /* If the file has inline data, no need to do readpages. */ if (ext4_has_inline_data(inode)) return 0; return ext4_mpage_readpages(mapping, pages, NULL, nr_pages,...
0
[ "CWE-416", "CWE-401" ]
linux
4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a
326,638,903,904,422,730,000,000,000,000,000,000,000
11
ext4: add more paranoia checking in ext4_expand_extra_isize handling It's possible to specify a non-zero s_want_extra_isize via debugging option, and this can cause bad things(tm) to happen when using a file system with an inode size of 128 bytes. Add better checking when the file system is mounted, as well as when w...
static uint16_t nvme_map_addr_pmr(NvmeCtrl *n, QEMUIOVector *iov, hwaddr addr, size_t len) { if (!len) { return NVME_SUCCESS; } if (!nvme_addr_is_pmr(n, addr) || !nvme_addr_is_pmr(n, addr + len - 1)) { return NVME_DATA_TRAS_ERROR; } qemu_iovec_add(...
0
[]
qemu
736b01642d85be832385063f278fe7cd4ffb5221
256,735,362,771,553,900,000,000,000,000,000,000,000
15
hw/nvme: fix CVE-2021-3929 This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the device itself. This still allows DMA to MMIO regions of other devices (e.g. doing P2P DMA to the controller memory buffer of another NVMe device). Fixes: CVE-2021-3929 Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com> Review...
join_read_last_key(JOIN_TAB *tab) { int error; TABLE *table= tab->table; if (!table->file->inited && (error= table->file->ha_index_init(tab->ref.key, tab->sorted))) { (void) report_error(table, error); return 1; } if (cp_buffer_from_ref(tab->join->thd, table, &tab->ref)) return -1; if ...
0
[ "CWE-89" ]
server
5ba77222e9fe7af8ff403816b5338b18b342053c
181,728,711,006,414,130,000,000,000,000,000,000,000
30
MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view if the view has algorithm=temptable it is not updatable, so DEFAULT() for its fields is meaningless, and thus it's NULL or 0/'' for NOT NULL columns.
static int b_unpack (lua_State *L) { Header h; const char *fmt = luaL_checkstring(L, 1); size_t ld; const char *data = luaL_checklstring(L, 2, &ld); size_t pos = luaL_optinteger(L, 3, 1) - 1; defaultoptions(&h); lua_settop(L, 2); while (*fmt) { int opt = *fmt++; size_t size = optsize(L, opt, &fm...
1
[ "CWE-190", "CWE-787" ]
redis
1eb08bcd4634ae42ec45e8284923ac048beaa4c3
22,297,221,737,219,190,000,000,000,000,000,000,000
65
Security: update Lua struct package for security. During an auditing Apple found that the "struct" Lua package we ship with Redis (http://www.inf.puc-rio.br/~roberto/struct/) contains a security problem. A bound-checking statement fails because of integer overflow. The bug exists since we initially integrated this pac...
Value ExpressionRandom::evaluate(const Document& root, Variables* variables) const { return Value(getRandomValue()); }
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
200,154,399,937,294,700,000,000,000,000,000,000,000
3
SERVER-49404 Enforce additional checks in $arrayToObject
static u32 mp4box_cleanup(u32 ret_code) { if (mpd_base_urls) { gf_free(mpd_base_urls); mpd_base_urls = NULL; } if (sdp_lines) { gf_free(sdp_lines); sdp_lines = NULL; } if (metas) { u32 i; for (i=0; i<nb_meta_act; i++) { if (metas[i].enc_type) gf_free(metas[i].enc_type); if (metas[i].mime_type) g...
0
[ "CWE-787" ]
gpac
4e56ad72ac1afb4e049a10f2d99e7512d7141f9d
264,239,850,165,742,040,000,000,000,000,000,000,000
121
fixed #2216
static int test_unaligned_bulk( struct usbtest_dev *tdev, int pipe, unsigned length, int iterations, unsigned transfer_flags, const char *label) { int retval; struct urb *urb = usbtest_alloc_urb(testdev_to_usbdev(tdev), pipe, length, transfer_flags, 1, 0, simple_callback); if (!urb) return -ENOMEM; ret...
0
[ "CWE-476" ]
linux
7c80f9e4a588f1925b07134bb2e3689335f6c6d8
197,877,331,208,853,300,000,000,000,000,000,000,000
19
usb: usbtest: fix NULL pointer dereference If the usbtest driver encounters a device with an IN bulk endpoint but no OUT bulk endpoint, it will try to dereference a NULL pointer (out->desc.bEndpointAddress). The problem can be solved by adding a missing test. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Rep...
bool LEX::stmt_create_udf_function(const DDL_options_st &options, enum_sp_aggregate_type agg_type, const Lex_ident_sys_st &name, Item_result return_type, const LEX_CSTRING &soname)...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
58,847,578,718,747,020,000,000,000,000,000,000,000
23
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
HTC_Status(enum htc_status_e e) { switch (e) { #define HTC_STATUS(e, n, s, l) \ case HTC_S_ ## e: return (s); #include "tbl/htc.h" default: WRONG("HTC_Status"); } NEEDLESS(return (NULL)); }
0
[ "CWE-617" ]
varnish-cache
2d8fc1a784a1e26d78c30174923a2b14ee2ebf62
283,154,987,654,548,450,000,000,000,000,000,000,000
11
Take sizeof pool_task into account when reserving WS in SES_Wait The assert on WS_ReserveSize() in ses_handle() can not trip because sizeof (struct pool_task) is less than sizeof (struct waited). But to safe guard against future problems if that were to change, this patch makes sure that the session workspace can hold...
static void CompressZip(unsigned char *dst, tinyexr::tinyexr_uint64 &compressedSize, const unsigned char *src, unsigned long src_size) { std::vector<unsigned char> tmpBuf(src_size); // // Apply EXR-specific? postprocess. Grabbed from OpenEXR's // ImfZipCompressor...
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
334,068,664,508,901,450,000,000,000,000,000,000,000
80
Make line_no with too large value(2**20) invalid. Fixes #124
static int acm_start_wb(struct acm *acm, struct acm_wb *wb) { int rc; acm->transmitting++; wb->urb->transfer_buffer = wb->buf; wb->urb->transfer_dma = wb->dmah; wb->urb->transfer_buffer_length = wb->len; wb->urb->dev = acm->dev; rc = usb_submit_urb(wb->urb, GFP_ATOMIC); if (rc < 0) { dev_err(&acm->data->de...
0
[ "CWE-703" ]
linux
8835ba4a39cf53f705417b3b3a94eb067673f2c9
40,762,902,776,299,246,000,000,000,000,000,000,000
20
USB: cdc-acm: more sanity checking An attack has become available which pretends to be a quirky device circumventing normal sanity checks and crashes the kernel by an insufficient number of interfaces. This patch adds a check to the code path for quirky devices. Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: sta...
nfs4_opendata_to_nfs4_state(struct nfs4_opendata *data) { if (data->o_arg.claim == NFS4_OPEN_CLAIM_PREVIOUS) return _nfs4_opendata_reclaim_to_nfs4_state(data); return _nfs4_opendata_to_nfs4_state(data); }
0
[ "CWE-119", "CWE-401" ]
linux
7d3e91a89b7adbc2831334def9e494dd9892f9af
103,136,065,957,576,920,000,000,000,000,000,000,000
6
NFSv4: Check for buffer length in __nfs4_get_acl_uncached Commit 1f1ea6c "NFSv4: Fix buffer overflow checking in __nfs4_get_acl_uncached" accidently dropped the checking for too small result buffer length. If someone uses getxattr on "system.nfs4_acl" on an NFSv4 mount supporting ACLs, the ACL has not been cached and...
psf_close_handle (HANDLE handle) { if (handle == NULL) return 0 ; if (CloseHandle (handle) == 0) return -1 ; return 0 ; } /* psf_close_handle */
0
[ "CWE-369", "CWE-189" ]
libsndfile
725c7dbb95bfaf8b4bb7b04820e3a00cceea9ce6
319,551,029,346,683,130,000,000,000,000,000,000,000
9
src/file_io.c : Prevent potential divide-by-zero. Closes: https://github.com/erikd/libsndfile/issues/92
XML_GetInputContext(XML_Parser parser, int *offset, int *size) { #ifdef XML_CONTEXT_BYTES if (parser == NULL) return NULL; if (eventPtr && buffer) { if (offset != NULL) *offset = (int)(eventPtr - buffer); if (size != NULL) *size = (int)(bufferEnd - buffer); return buffer; } #else (...
0
[ "CWE-611" ]
libexpat
c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f
33,389,823,142,760,390,000,000,000,000,000,000,000
19
xmlparse.c: Fix external entity infinite loop bug (CVE-2017-9233)
void mnt_pin(struct vfsmount *mnt) { spin_lock(&vfsmount_lock); mnt->mnt_pinned++; spin_unlock(&vfsmount_lock); }
0
[ "CWE-269" ]
linux-2.6
ee6f958291e2a768fd727e7a67badfff0b67711a
271,180,373,454,972,630,000,000,000,000,000,000,000
6
check privileges before setting mount propagation There's a missing check for CAP_SYS_ADMIN in do_change_type(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torva...
R_API RBinJavaAttrInfo *r_bin_java_read_next_attr_from_buffer(ut8 *buffer, st64 sz, st64 buf_offset) { RBinJavaAttrInfo *attr = NULL; ut64 offset = 0; ut16 name_idx; st64 nsz; if (!buffer || ((int) sz) < 4 || buf_offset < 0) { eprintf ("r_bin_Java_read_next_attr_from_buffer: invalid buffer size %d\n", (int) sz)...
0
[ "CWE-125" ]
radare2
e9ce0d64faf19fa4e9c260250fbdf25e3c11e152
247,442,855,713,269,700,000,000,000,000,000,000,000
37
Fix #10498 - Fix crash in fuzzed java files (#10511)
lacks_directory_count (NautilusFile *file) { return !file->details->directory_count_is_up_to_date && nautilus_file_should_show_directory_item_count (file); }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
283,634,785,936,165,900,000,000,000,000,000,000,000
5
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
validate_cname_response(struct module_env* env, struct val_env* ve, struct query_info* qchase, struct reply_info* chase_reply, struct key_entry_key* kkey) { uint8_t* wc = NULL; size_t wl; int wc_NSEC_ok = 0; int nsec3s_seen = 0; size_t i; struct ub_packed_rrset_key* s; /* validate the ANSWER section - this wi...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
225,322,211,921,176,480,000,000,000,000,000,000,000
101
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
xfs_zero_last_block( struct xfs_inode *ip, xfs_fsize_t offset, xfs_fsize_t isize) { struct xfs_mount *mp = ip->i_mount; xfs_fileoff_t last_fsb = XFS_B_TO_FSBT(mp, isize); int zero_offset = XFS_B_FSB_OFFSET(mp, isize); int zero_len; int nimaps = 1; int error = 0; struct xfs_bmbt_irec imap; xfs_ilo...
0
[ "CWE-284", "CWE-264" ]
linux
8d0207652cbe27d1f962050737848e5ad4671958
19,844,329,483,926,859,000,000,000,000,000,000,000
33
->splice_write() via ->write_iter() iter_file_splice_write() - a ->splice_write() instance that gathers the pipe buffers, builds a bio_vec-based iov_iter covering those and feeds it to ->write_iter(). A bunch of simple cases coverted to that... [AV: fixed the braino spotted by Cyrill] Signed-off-by: Al Viro <viro@z...
cmsBool Type_LUT16_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems) { cmsUInt32Number nTabSize; cmsPipeline* NewLUT = (cmsPipeline*) Ptr; cmsStage* mpe; _cmsStageToneCurvesData* PreMPE = NULL, *PostMPE = NULL; _cmsStageMatrixData* MatMPE = NULL; _...
0
[ "CWE-125" ]
Little-CMS
5ca71a7bc18b6897ab21d815d15e218e204581e2
172,523,376,558,700,200,000,000,000,000,000,000,000
131
Added an extra check to MLU bounds Thanks to Ibrahim el-sayed for spotting the bug
typeToCodecType(Http::CodecClient::Type type) { switch (type) { case Http::CodecClient::Type::HTTP1: return envoy::config::filter::network::http_connection_manager::v2::HttpConnectionManager:: HTTP1; case Http::CodecClient::Type::HTTP2: return envoy::config::filter::network::http_connection_manage...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
198,616,319,294,548,500,000,000,000,000,000,000,000
12
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static void unit_status_log_starting_stopping_reloading(Unit *u, JobType t) { const char *format; char buf[LINE_MAX]; sd_id128_t mid; assert(u); if (t != JOB_START && t != JOB_STOP && t != JOB_RELOAD) return; if (log_on_console()) return...
0
[]
systemd
5ba6985b6c8ef85a8bcfeb1b65239c863436e75b
304,404,789,677,293,720,000,000,000,000,000,000,000
32
core: allow PIDs to be watched by two units at the same time In some cases it is interesting to map a PID to two units at the same time. For example, when a user logs in via a getty, which is reexeced to /sbin/login that binary will be explicitly referenced as main pid of the getty service, as well as implicitly refer...
static int hns_roce_init_hem(struct hns_roce_dev *hr_dev) { int ret; struct device *dev = hr_dev->dev; ret = hns_roce_init_hem_table(hr_dev, &hr_dev->mr_table.mtt_table, HEM_TYPE_MTT, hr_dev->caps.mtt_entry_sz, hr_dev->caps.num_mtt_segs, 1); if (ret) { dev_err(dev, "Failed to init MTT context...
0
[ "CWE-665" ]
kernel
72be029e947510dd6cbbbaf51879622af26e4200
84,987,613,601,237,950,000,000,000,000,000,000,000
98
RDMA/hns: Fix init resp when alloc ucontext (bsc#1104427 FATE#326416). suse-commit: 8e5436bc2806cbe952f043cc995804c188ce047a
void shash_free_instance(struct crypto_instance *inst) { crypto_drop_spawn(crypto_instance_ctx(inst)); kfree(shash_instance(inst)); }
0
[ "CWE-787" ]
linux
af3ff8045bbf3e32f1a448542e73abb4c8ceb6f1
183,054,519,917,431,480,000,000,000,000,000,000,000
5
crypto: hmac - require that the underlying hash algorithm is unkeyed Because the HMAC template didn't check that its underlying hash algorithm is unkeyed, trying to use "hmac(hmac(sha3-512-generic))" through AF_ALG or through KEYCTL_DH_COMPUTE resulted in the inner HMAC being used without having been keyed, resulting ...
kvm_pfn_t gfn_to_pfn_memslot(struct kvm_memory_slot *slot, gfn_t gfn) { return __gfn_to_pfn_memslot(slot, gfn, false, NULL, true, NULL); }
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
37,026,052,342,131,464,000,000,000,000,000,000,000
4
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
SPL_METHOD(FilesystemIterator, getFlags) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (zend_parse_parameters_none() == FAILURE) { return; } RETURN_LONG(intern->flags & (SPL_FILE_DIR_KEY_MODE_MASK | SPL_FILE_DIR_CURRENT_MODE_MASK | SPL_FILE_DIR_O...
0
[ "CWE-190" ]
php-src
7245bff300d3fa8bacbef7897ff080a6f1c23eba
27,053,984,519,713,964,000,000,000,000,000,000,000
10
Fix bug #72262 - do not overflow int
void *sock_kmalloc(struct sock *sk, int size, gfp_t priority) { if ((unsigned int)size <= sysctl_optmem_max && atomic_read(&sk->sk_omem_alloc) + size < sysctl_optmem_max) { void *mem; /* First do the add, to avoid the race if kmalloc * might sleep. */ atomic_add(size, &sk->sk_omem_alloc); mem = kmal...
0
[ "CWE-119", "CWE-787" ]
linux
b98b0bc8c431e3ceb4b26b0dfc8db509518fb290
94,342,296,770,926,850,000,000,000,000,000,000,000
16
net: avoid signed overflows for SO_{SND|RCV}BUFFORCE CAP_NET_ADMIN users should not be allowed to set negative sk_sndbuf or sk_rcvbuf values, as it can lead to various memory corruptions, crashes, OOM... Note that before commit 82981930125a ("net: cleanups in sock_setsockopt()"), the bug was even more serious, since ...
struct razer_report razer_chroma_misc_set_orochi2011_poll_dpi(unsigned short poll_rate, unsigned char dpi_x, unsigned char dpi_y) { struct razer_report report = {0}; memcpy(&report, &orochi2011_dpi, sizeof(orochi2011_dpi)); switch(poll_rate) { case 1000: poll_rate = 0x01; break; cas...
0
[ "CWE-787" ]
openrazer
7e8a04feb378a679f1bcdcae079a5100cc45663b
291,510,171,618,935,200,000,000,000,000,000,000,000
27
Fix oob memcpy in matrix_custom_frame methods Adjust row_length if it exeeds the arguments array
static inline int crypto_rng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen) { return crypto_rng_alg(tfm)->generate(tfm, src, slen, dst, dlen); }
0
[ "CWE-476", "CWE-703" ]
linux
94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6
139,521,051,229,510,440,000,000,000,000,000,000,000
6
crypto: rng - Remove old low-level rng interface Now that all rng implementations have switched over to the new interface, we can remove the old low-level interface. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
worker_err_ratelimit(struct worker* worker, int err) { if(worker->err_limit_time == *worker->env.now) { /* see if limit is exceeded for this second */ if(worker->err_limit_count++ > ERROR_RATELIMIT) return -1; } else { /* new second, new limits */ worker->err_limit_time = *worker->env.now; worker->err_li...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
5,719,998,935,179,149,000,000,000,000,000,000,000
13
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb) { int ret; int size; if (ud->side == USBIP_STUB) { /* the direction of urb must be OUT. */ if (usb_pipein(urb->pipe)) return 0; size = urb->transfer_buffer_length; } else { /* the direction of urb must be IN. */ if (usb_pipeout(urb->pipe)...
1
[ "CWE-200", "CWE-119" ]
linux
b348d7dddb6c4fbfc810b7a0626e8ec9e29f7cbb
305,454,016,037,161,200,000,000,000,000,000,000,000
36
USB: usbip: fix potential out-of-bounds write Fix potential out-of-bounds write to urb->transfer_buffer usbip handles network communication directly in the kernel. When receiving a packet from its peer, usbip code parses headers according to protocol. As part of this parsing urb->actual_length is filled. Since the inp...
static int atrtr_delete(struct atalk_addr * addr) { struct atalk_route **r = &atalk_routes; int retval = 0; struct atalk_route *tmp; write_lock_bh(&atalk_routes_lock); while ((tmp = *r) != NULL) { if (tmp->target.s_net == addr->s_net && (!(tmp->flags&RTF_GATEWAY) || tmp->target.s_node == addr->s_no...
0
[]
history
7ab442d7e0a76402c12553ee256f756097cae2d2
62,613,400,245,905,870,000,000,000,000,000,000,000
23
[DDP]: Convert to new protocol interface. Convert ddp to the new protocol interface which means it has to handle fragmented skb's. The only big change is in the checksum routine which has to do more work (like skb_checksum). Minor speedup is folding the carry to avoid a branch. Tested against a 2.4 system and by ru...
void Compute(OpKernelContext* context) override { ResourceHandle handle; OP_REQUIRES_OK(context, HandleFromInput(context, kResourceHandleName, &handle)); core::RefCountPtr<QuantileStreamResource> stream_resource; // Create a reference to the underlying resource using the handle. ...
0
[ "CWE-703", "CWE-681" ]
tensorflow
8a84f7a2b5a2b27ecf88d25bad9ac777cd2f7992
146,768,006,737,553,280,000,000,000,000,000,000,000
51
Ensure num_streams >= 0 in tf.raw_ops.BoostedTreesCreateQuantileStreamResource PiperOrigin-RevId: 387452765 Change-Id: I9990c760e177fabca6a3b9b4612ceeaeeba51495
void bn_init(BIGNUM *a) { static BIGNUM nilbn; *a = nilbn; bn_check_top(a); }
0
[ "CWE-310" ]
openssl
aab7c770353b1dc4ba045938c8fb446dd1c4531e
165,014,393,623,226,940,000,000,000,000,000,000,000
7
Elliptic curve scalar multiplication with timing attack defenses Co-authored-by: Nicola Tuveri <nic.tuv@gmail.com> Co-authored-by: Cesar Pereida Garcia <cesar.pereidagarcia@tut.fi> Co-authored-by: Sohaib ul Hassan <soh.19.hassan@gmail.com> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt...