func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
MATCHER_P(JsonStringEq, expected, "") { const bool equal = TestUtility::jsonStringEqual(arg, expected); if (!equal) { *result_listener << "\n" << TestUtility::addLeftAndRightPadding("Expected JSON string:") << "\n" << expected << TestUtility::addLef...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
52,140,733,481,122,810,000,000,000,000,000,000,000
13
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...
static int test_rand(void) { BIGNUM *bn = NULL; int st = 0; if (!TEST_ptr(bn = BN_new())) return 0; /* Test BN_rand for degenerate cases with |top| and |bottom| parameters. */ if (!TEST_false(BN_rand(bn, 0, 0 /* top */ , 0 /* bottom */ )) || !TEST_false(BN_rand(bn, 0, 1 /* top ...
0
[]
openssl
336923c0c8d705cb8af5216b29a205662db0d590
305,141,342,293,072,800,000,000,000,000,000,000,000
25
Fix a carry overflow bug in bn_sqr_comba4/8 for mips 32-bit targets bn_sqr_comba8 does for instance compute a wrong result for the value: a=0x4aaac919 62056c84 fba7334e 1a6be678 022181ba fd3aa878 899b2346 ee210f45 The correct result is: r=0x15c72e32 605a3061 d11b1012 3c187483 6df96999 bd0c22ba d3e7d437 4724a82f 9...
decode_xterm_X10(SCREEN *sp, MEVENT * eventp) { #define MAX_KBUF 3 unsigned char kbuf[MAX_KBUF + 1]; size_t grabbed; int res; bool result; # if USE_PTHREADS_EINTR # if USE_WEAK_SYMBOLS if ((pthread_self) && (pthread_kill) && (pthread_equal)) # endif _nc_globals.read_thread = pthread_self(); # en...
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
234,493,032,209,139,930,000,000,000,000,000,000,000
45
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
void rtl_p2p_ps_cmd(struct ieee80211_hw *hw , u8 p2p_ps_state) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_ps_ctl *rtlps = rtl_psc(rtl_priv(hw)); struct rtl_p2p_ps_info *p2pinfo = &(rtlpriv->psc.p2p_ps_info); RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD, " p2p state %x\n" , p2p_ps_state); switch (p2p_ps_state) ...
0
[ "CWE-120" ]
linux
8c55dedb795be8ec0cf488f98c03a1c2176f7fb1
115,915,296,823,827,370,000,000,000,000,000,000,000
71
rtlwifi: Fix potential overflow on P2P code Nicolas Waisman noticed that even though noa_len is checked for a compatible length it's still possible to overrun the buffers of p2pinfo since there's no check on the upper bound of noa_num. Bound noa_num against P2P_MAX_NOA_NUM. Reported-by: Nicolas Waisman <nico@semmle.c...
static int packet_do_bind(struct sock *sk, struct net_device *dev, __be16 protocol) { struct packet_sock *po = pkt_sk(sk); /* * Detach an existing hook if present. */ lock_sock(sk); spin_lock(&po->bind_lock); if (po->running) { __sock_put(sk); po->running = 0; po->num = 0; spin_unlock(&po->bind_lock)...
0
[ "CWE-909" ]
linux-2.6
67286640f638f5ad41a946b9a3dc75327950248f
99,984,031,255,295,510,000,000,000,000,000,000,000
43
net: packet: fix information leak to userland packet_getname_spkt() doesn't initialize all members of sa_data field of sockaddr struct if strlen(dev->name) < 13. This structure is then copied to userland. It leads to leaking of contents of kernel stack memory. We have to fully fill sa_data with strncpy() instead of ...
int nghttp2_session_terminate_session(nghttp2_session *session, uint32_t error_code) { return session_terminate_session(session, session->last_proc_stream_id, error_code, NULL); }
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
129,209,078,605,875,410,000,000,000,000,000,000,000
5
Add nghttp2_option_set_max_outbound_ack
Tag* Segment::AddTag() { return tags_.AddTag(); }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
193,374,099,501,633,260,000,000,000,000,000,000,000
1
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
client_conn_register_skeleton (GDBusConnection *dbus_conn, gpointer value, RegisteredPath *reg_path) { peer_register_skeleton (reg_path->obj_path, reg_path, dbus_conn); }
0
[ "CWE-276" ]
gvfs
e3808a1b4042761055b1d975333a8243d67b8bfe
222,003,732,573,422,150,000,000,000,000,000,000,000
6
gvfsdaemon: Check that the connecting client is the same user Otherwise, an attacker who learns the abstract socket address from netstat(8) or similar could connect to it and issue D-Bus method calls. Signed-off-by: Simon McVittie <smcv@collabora.com>
dup_error (oldd, newd) int oldd, newd; { sys_error (_("cannot duplicate fd %d to fd %d"), oldd, newd); }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
137,595,412,257,082,930,000,000,000,000,000,000,000
5
bash-4.4-rc2 release
static void __init htab_finish_init(void) { extern unsigned int *htab_call_hpte_insert1; extern unsigned int *htab_call_hpte_insert2; extern unsigned int *htab_call_hpte_remove; extern unsigned int *htab_call_hpte_updatepp; #ifdef CONFIG_PPC_64K_PAGES extern unsigned int *ht64_call_hpte_insert1; extern unsigned ...
0
[ "CWE-200" ]
linux-2.6
721151d004dcf01a71b12bb6b893f9160284cf6e
139,873,521,196,194,830,000,000,000,000,000,000,000
24
[POWERPC] Allow drivers to map individual 4k pages to userspace Some drivers have resources that they want to be able to map into userspace that are 4k in size. On a kernel configured with 64k pages we currently end up mapping the 4k we want plus another 60k of physical address space, which could contain anything. T...
void dumpState(std::ostream& os, int indent_level = 0) const { const char* spaces = spacesForLevel(indent_level); os << spaces << "StreamInfoImpl " << this << DUMP_OPTIONAL_MEMBER(protocol_) << DUMP_OPTIONAL_MEMBER(response_code_) << DUMP_OPTIONAL_MEMBER(response_code_details_) << DUMP_OPTIONAL_...
0
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
223,041,362,725,897,470,000,000,000,000,000,000,000
8
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>
static void dp8393x_write(void *opaque, hwaddr addr, uint64_t data, unsigned int size) { dp8393xState *s = opaque; int reg = addr >> s->it_shift; uint32_t val = s->big_endian ? data >> 16 : data; DPRINTF("write 0x%04x to reg %s\n", (uint16_t)val, reg_names[reg]); switch (...
0
[]
qemu
915976bd98a9286efe6f2e573cb4f1360603adf9
225,913,505,397,192,560,000,000,000,000,000,000,000
85
hw/net/dp8393x: fix integer underflow in dp8393x_do_transmit_packets() An integer underflow could occur during packet transmission due to 'tx_len' not being updated if SONIC_TFC register is set to zero. Check for negative 'tx_len' when removing existing FCS. RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1899722 S...
ssize_t elv_iosched_show(struct request_queue *q, char *name) { struct elevator_queue *e = q->elevator; struct elevator_type *elv = NULL; struct elevator_type *__e; int len = 0; if (!queue_is_mq(q)) return sprintf(name, "none\n"); if (!q->elevator) len += sprintf(name+len, "[none] "); else elv = e->type;...
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
116,721,556,000,392,250,000,000,000,000,000,000,000
32
block: free sched's request pool in blk_cleanup_queue In theory, IO scheduler belongs to request queue, and the request pool of sched tags belongs to the request queue too. However, the current tags allocation interfaces are re-used for both driver tags and sched tags, and driver tags is definitely host wide, and doe...
static int smtp_open(struct Connection *conn, bool esmtp) { int rc; if (mutt_socket_open(conn)) return -1; /* get greeting string */ rc = smtp_get_resp(conn); if (rc != 0) return rc; rc = smtp_helo(conn, esmtp); if (rc != 0) return rc; #ifdef USE_SSL enum QuadOption ans = MUTT_NO; if (...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
59,675,672,601,519,500,000,000,000,000,000,000,000
65
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
compileTranslationTable(const char *tableList, CharacterClass **characterClasses, TranslationTableCharacterAttributes *characterClassAttribute, short opcodeLengths[], TranslationTableOffset *newRuleOffset, TranslationTableRule **newRule, RuleName **ruleNames) { TranslationTableHeader *table = NULL; char **table...
0
[ "CWE-787" ]
liblouis
fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde
220,557,619,543,456,830,000,000,000,000,000,000,000
63
Fix yet another buffer overflow in the braille table parser Reported by Henri Salo Fixes #592
__archive_write_allocate_filter(struct archive *_a) { struct archive_write *a = (struct archive_write *)_a; struct archive_write_filter *f; f = calloc(1, sizeof(*f)); f->archive = _a; if (a->filter_first == NULL) a->filter_first = f; else a->filter_last->next_filter = f; a->filter_last = f; return f; }
0
[ "CWE-703", "CWE-189" ]
libarchive
22531545514043e04633e1c015c7540b9de9dbe4
273,289,812,099,520,300,000,000,000,000,000,000,000
14
Limit write requests to at most INT_MAX. This prevents a certain common programming error (passing -1 to write) from leading to other problems deeper in the library.
static inline u64 sta_get_stats_bytes(struct ieee80211_sta_rx_stats *rxstats) { unsigned int start; u64 value; do { start = u64_stats_fetch_begin(&rxstats->syncp); value = rxstats->bytes; } while (u64_stats_fetch_retry(&rxstats->syncp, start)); return value; }
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
80,671,567,804,341,650,000,000,000,000,000,000,000
12
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
static int __netdev_adjacent_dev_insert(struct net_device *dev, struct net_device *adj_dev, struct list_head *dev_list, void *private, bool master) { struct netdev_adjacent *adj; int ret; adj = __netdev_find_adj(dev, adj_dev, dev_list); if (adj) { adj->ref_nr++; return 0; } adj = kmalloc(si...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
185,709,668,922,364,770,000,000,000,000,000,000,000
57
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) { struct page *page = vmf->page; struct inode *inode = file_inode(vma->vm_file); struct btrfs_root *root = BTRFS_I(inode)->root; struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; struct btrfs_ordered_extent *ordered; struct extent_s...
0
[ "CWE-200" ]
linux
0305cd5f7fca85dae392b9ba85b116896eb7c1c7
302,173,084,329,475,640,000,000,000,000,000,000,000
119
Btrfs: fix truncation of compressed and inlined extents When truncating a file to a smaller size which consists of an inline extent that is compressed, we did not discard (or made unusable) the data between the new file size and the old file size, wasting metadata space and allowing for the truncated data to be leaked...
static bool need_read_all(struct io_kiocb *req) { return req->flags & REQ_F_ISREG || S_ISBLK(file_inode(req->file)->i_mode); }
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
287,624,083,541,847,400,000,000,000,000,000,000,000
5
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
void mutt_display_sanitize (char *s) { for (; *s; s++) { if (!IsPrint (*s)) *s = '?'; } }
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
326,078,760,714,953,540,000,000,000,000,000,000,000
8
use a 64-bit random value in temporary filenames. closes #3158
static int chmd_fast_find(struct mschm_decompressor *base, struct mschmd_header *chm, const char *filename, struct mschmd_file *f_ptr, int f_size) { struct mschm_decompressor_p *self = (struct mschm_decompressor_p *) base; struct mspack_system *sys; struct mspack_file *fh; const unsigned char ...
0
[ "CWE-20", "CWE-193", "CWE-682" ]
libmspack
72e70a921f0f07fee748aec2274b30784e1d312a
37,106,863,844,325,385,000,000,000,000,000,000,000
83
Fix off-by-one bounds check on CHM PMGI/PMGL chunk numbers and reject empty filenames. Thanks to Hanno Böck for reporting
static struct vxlanhdr *vxlan_gro_remcsum(struct sk_buff *skb, unsigned int off, struct vxlanhdr *vh, size_t hdrlen, __be32 vni_field, struct gro_remcsum *grc, bool nopartial) { size_t start, offset; if (skb->remcsum_offload) return vh; if (!NAPI_GRO_CB(skb)->csum_valid) retu...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
18,406,974,248,256,180,000,000,000,000,000,000,000
25
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
openpgp_cipher_test_algo (cipher_algo_t algo) { enum gcry_cipher_algos ga; ga = map_cipher_openpgp_to_gcry (algo); if (!ga) return gpg_error (GPG_ERR_CIPHER_ALGO); return gcry_cipher_test_algo (ga); }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
302,877,977,027,731,830,000,000,000,000,000,000,000
10
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static u64 __sched_period(unsigned long nr_running) { if (unlikely(nr_running > sched_nr_latency)) return nr_running * sysctl_sched_min_granularity; else return sysctl_sched_latency; }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
237,184,613,154,907,940,000,000,000,000,000,000,000
7
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
int SSL_CTX_get_verify_depth(SSL_CTX* ctx) { return ctx->GetStats().verifyDepth_; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
142,346,171,911,085,060,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
InitialiseRFBConnection(rfbClient* client) { rfbProtocolVersionMsg pv; int major,minor; uint32_t authScheme; uint32_t subAuthScheme; rfbClientInitMsg ci; /* if the connection is immediately closed, don't report anything, so that pmw's monitor can make test connections */ if (client->listenSpecifi...
0
[ "CWE-787" ]
libvncserver
a83439b9fbe0f03c48eb94ed05729cb016f8b72f
248,803,415,135,932,080,000,000,000,000,000,000,000
238
LibVNCClient: fix three possible heap buffer overflows An attacker could feed `0xffffffff`, causing a `malloc(0)` for the buffers which are subsequently written to. Closes #247
static int is_qp0(enum ib_qp_type qp_type) { return qp_type == IB_QPT_SMI; }
0
[ "CWE-119", "CWE-787" ]
linux
0625b4ba1a5d4703c7fb01c497bd6c156908af00
108,391,513,033,639,390,000,000,000,000,000,000,000
4
IB/mlx5: Fix leaking stack memory to userspace mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: <stable@vger.kernel.org> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <...
static int restore_iwmmxt_context(struct iwmmxt_sigframe *frame) { char kbuf[sizeof(*frame) + 8]; struct iwmmxt_sigframe *kframe; /* the iWMMXt context must be 64 bit aligned */ kframe = (struct iwmmxt_sigframe *)((unsigned long)(kbuf + 8) & ~7); if (__copy_from_user(kframe, frame, sizeof(*frame))) return -1; ...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
230,290,542,132,726,600,000,000,000,000,000,000,000
15
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static int ieee80211_do_assoc(struct ieee80211_sub_if_data *sdata) { struct ieee80211_mgd_assoc_data *assoc_data = sdata->u.mgd.assoc_data; struct ieee80211_local *local = sdata->local; sdata_assert_lock(sdata); assoc_data->tries++; if (assoc_data->tries > IEEE80211_ASSOC_MAX_TRIES) { sdata_info(sdata, "associ...
0
[]
linux
79c92ca42b5a3e0ea172ea2ce8df8e125af237da
283,384,174,769,420,200,000,000,000,000,000,000,000
40
mac80211: handle deauthentication/disassociation from TDLS peer When receiving a deauthentication/disassociation frame from a TDLS peer, a station should not disconnect the current AP, but only disable the current TDLS link if it's enabled. Without this change, a TDLS issue can be reproduced by following the steps as...
int __init cma_init_reserved_mem(phys_addr_t base, phys_addr_t size, unsigned int order_per_bit, struct cma **res_cma) { struct cma *cma; phys_addr_t alignment; /* Sanity checks */ if (cma_area_count == ARRAY_SIZE(cma_areas)) { pr_err("Not enough slots for CMA reserved regions!\n"); return -ENOSPC; ...
0
[ "CWE-682" ]
linux
67a2e213e7e937c41c52ab5bc46bf3f4de469f6e
111,347,007,209,960,300,000,000,000,000,000,000,000
40
mm: cma: fix incorrect type conversion for size during dma allocation This was found during userspace fuzzing test when a large size dma cma allocation is made by driver(like ion) through userspace. show_stack+0x10/0x1c dump_stack+0x74/0xc8 kasan_report_error+0x2b0/0x408 kasan_report+0x34/0x40 __asan_storeN...
static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep, struct sock *sk, gfp_t gfp) { struct sctp_hmac_algo_param *auth_hmacs = NULL; struct sctp_chunks_param *auth_chunks = NULL; struct sctp_shared_key *null_key; int err; memset(ep, 0, sizeof(struct sctp_endpoint)); ep->digest = k...
0
[]
linux-2.6
5e739d1752aca4e8f3e794d431503bfca3162df4
162,097,427,297,325,820,000,000,000,000,000,000,000
124
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...
qb_ipcs_poll_handlers_set(struct qb_ipcs_service *s, struct qb_ipcs_poll_handlers *handlers) { s->poll_fns.job_add = handlers->job_add; s->poll_fns.dispatch_add = handlers->dispatch_add; s->poll_fns.dispatch_mod = handlers->dispatch_mod; s->poll_fns.dispatch_del = handlers->dispatch_del; }
0
[ "CWE-59" ]
libqb
e322e98dc264bc5911d6fe1d371e55ac9f95a71e
177,710,007,966,803,530,000,000,000,000,000,000,000
8
ipc: use O_EXCL on SHM files, and randomize the names Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
friend H AbslHashValue(H h, const TensorKey& k) { if (DataTypeCanUseMemcpy(k.dtype())) { return H::combine(std::move(h), k.tensor_data()); } else if (k.dtype() == DT_STRING) { const auto strs = k.unaligned_flat<tstring>(); for (int64_t i = 0, n = k.NumElements(); i < n; ++i) { h = H:...
0
[ "CWE-122", "CWE-787" ]
tensorflow
1b85a28d395dc91f4d22b5f9e1e9a22e92ccecd6
84,188,470,987,242,710,000,000,000,000,000,000,000
15
Fix TensorKey hash function. The original hash function only used total estimated `AllocatedBytes()`, which (a) is an estimate per tensor, and (b) is a very poor hash function for constants (e.g. `int32_t`). It also tried to access individual tensor bytes through `tensor.data()` of size `AllocatedBytes()`. This led t...
bool can_split_huge_page(struct page *page, int *pextra_pins) { int extra_pins; /* Additional pins from page cache */ if (PageAnon(page)) extra_pins = PageSwapCache(page) ? HPAGE_PMD_NR : 0; else extra_pins = HPAGE_PMD_NR; if (pextra_pins) *pextra_pins = extra_pins; return total_mapcount(page) == page_coun...
0
[ "CWE-362" ]
linux
c444eb564fb16645c172d550359cb3d75fe8a040
141,971,627,184,867,530,000,000,000,000,000,000,000
13
mm: thp: make the THP mapcount atomic against __split_huge_pmd_locked() Write protect anon page faults require an accurate mapcount to decide if to break the COW or not. This is implemented in the THP path with reuse_swap_page() -> page_trans_huge_map_swapcount()/page_trans_huge_mapcount(). If the COW triggers while ...
*/ void bfq_put_async_queues(struct bfq_data *bfqd, struct bfq_group *bfqg) { int i, j; for (i = 0; i < 2; i++) for (j = 0; j < IOPRIO_BE_NR; j++) __bfq_put_async_bfqq(bfqd, &bfqg->async_bfqq[i][j]); __bfq_put_async_bfqq(bfqd, &bfqg->async_idle_bfqq);
0
[ "CWE-416" ]
linux
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
168,476,230,682,110,180,000,000,000,000,000,000,000
10
block, bfq: fix use-after-free in bfq_idle_slice_timer_body In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is not in bfqd-lock critical section. The bfqq, which is not equal to NULL in bfq_idle_slice_timer, may be freed after passing to bfq_idle_slice_timer_body. So we will access the freed memory. In ad...
static int ext4_enable_quotas(struct super_block *sb) { int type, err = 0; unsigned long qf_inums[EXT4_MAXQUOTAS] = { le32_to_cpu(EXT4_SB(sb)->s_es->s_usr_quota_inum), le32_to_cpu(EXT4_SB(sb)->s_es->s_grp_quota_inum), le32_to_cpu(EXT4_SB(sb)->s_es->s_prj_quota_inum) }; bool quota_mopt[EXT4_MAXQUOTAS] = { te...
0
[ "CWE-416", "CWE-401" ]
linux
4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a
116,764,680,192,640,370,000,000,000,000,000,000,000
34
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...
mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc) { /* mrb_assert(mrb_proc_cfunc_p(proc)) */ mrb_irep *irep = proc->body.irep; mrb_value *pool = irep->pool; mrb_sym *syms = irep->syms; mrb_code i; int ai = mrb_gc_arena_save(mrb); struct mrb_jmpbuf *prev_jmp = mrb->jmp; struct mrb_jmpbuf c_jm...
0
[ "CWE-416", "CWE-190" ]
mruby
1905091634a6a2925c911484434448e568330626
209,631,407,419,848,270,000,000,000,000,000,000,000
2,029
Check length of env stack before accessing upvar; fix #3995
longlong Item_cache_wrapper::val_int() { Item *cached_value; DBUG_ENTER("Item_cache_wrapper::val_int"); if (!expr_cache) { longlong tmp= orig_item->val_int(); null_value= orig_item->null_value; DBUG_RETURN(tmp); } if ((cached_value= check_cache())) { longlong tmp= cached_value->val_int();...
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
209,133,632,647,277,300,000,000,000,000,000,000,000
21
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
void stq_be_phys(AddressSpace *as, hwaddr addr, uint64_t val) { address_space_stq_be(as, addr, val, MEMTXATTRS_UNSPECIFIED, NULL); }
0
[]
qemu
e4a511f8cc6f4a46d409fb5c9f72c38ba45f8d83
109,855,988,269,017,550,000,000,000,000,000,000,000
4
exec: clamp accesses against the MemoryRegionSection Because the clamping was done against the MemoryRegion, address_space_rw was effectively broken if a write spanned multiple sections that are not linear in underlying memory (with the memory not being under an IOMMU). This is visible with the MIPS rc4030 IOMMU, whi...
find_kfunc_desc(const struct bpf_prog *prog, u32 func_id) { struct bpf_kfunc_desc desc = { .func_id = func_id, }; struct bpf_kfunc_desc_tab *tab; tab = prog->aux->kfunc_tab; return bsearch(&desc, tab->descs, tab->nr_descs, sizeof(tab->descs[0]), kfunc_desc_cmp_by_id); }
0
[ "CWE-125" ]
bpf
049c4e13714ecbca567b4d5f6d563f05d431c80e
54,757,681,324,223,270,000,000,000,000,000,000,000
11
bpf: Fix alu32 const subreg bound tracking on bitwise operations Fix a bug in the verifier's scalar32_min_max_*() functions which leads to incorrect tracking of 32 bit bounds for the simulation of and/or/xor bitops. When both the src & dst subreg is a known constant, then the assumption is that scalar_min_max_*() will...
SQClass::SQClass(SQSharedState *ss,SQClass *base) { _base = base; _typetag = 0; _hook = NULL; _udsize = 0; _locked = false; _constructoridx = -1; if(_base) { _constructoridx = _base->_constructoridx; _udsize = _base->_udsize; _defaultvalues.copy(base->_defaultvalues);...
0
[ "CWE-125" ]
squirrel
23a0620658714b996d20da3d4dd1a0dcf9b0bd98
267,878,277,095,183,640,000,000,000,000,000,000,000
22
check max member count in class
static OPJ_BOOL opj_j2k_write_siz( opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t * p_manager ) { OPJ_UINT32 i; OPJ_UINT32 l_size_len; OPJ_BYTE * l_current_ptr; ...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
107,560,298,121,466,560,000,000,000,000,000,000,000
94
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
static enum hrtimer_restart hrtimer_wakeup(struct hrtimer *timer) { struct hrtimer_sleeper *t = container_of(timer, struct hrtimer_sleeper, timer); struct task_struct *task = t->task; t->task = NULL; if (task) wake_up_process(task); return HRTIMER_NORESTART; }
0
[ "CWE-189" ]
linux-2.6
13788ccc41ceea5893f9c747c59bc0b28f2416c2
329,074,388,801,588,200,000,000,000,000,000,000,000
12
[PATCH] hrtimer: prevent overrun DoS in hrtimer_forward() hrtimer_forward() does not check for the possible overflow of timer->expires. This can happen on 64 bit machines with large interval values and results currently in an endless loop in the softirq because the expiry value becomes negative and therefor the timer...
evbuffer_enable_locking(struct evbuffer *buf, void *lock) { #ifdef EVENT__DISABLE_THREAD_SUPPORT return -1; #else if (buf->lock) return -1; if (!lock) { EVTHREAD_ALLOC_LOCK(lock, EVTHREAD_LOCKTYPE_RECURSIVE); if (!lock) return -1; buf->lock = lock; buf->own_lock = 1; } else { buf->lock = lock; buf...
0
[ "CWE-189" ]
libevent
841ecbd96105c84ac2e7c9594aeadbcc6fb38bc4
18,200,948,231,687,879,000,000,000,000,000,000,000
22
Fix CVE-2014-6272 in Libevent 2.1 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
static void emit_insn_suffix(u8 **pprog, u32 ptr_reg, u32 val_reg, int off) { u8 *prog = *pprog; int cnt = 0; if (is_imm8(off)) { /* 1-byte signed displacement. * * If off == 0 we could skip this and save one extra byte, but * special case of x86 R13 which always needs an offset is not * worth the has...
0
[ "CWE-77" ]
linux
e4d4d456436bfb2fe412ee2cd489f7658449b098
190,074,356,063,294,500,000,000,000,000,000,000,000
19
bpf, x86: Validate computation of branch displacements for x86-64 The branch displacement logic in the BPF JIT compilers for x86 assumes that, for any generated branch instruction, the distance cannot increase between optimization passes. But this assumption can be violated due to how the distances are computed. Spec...
static inline void cr4_toggle_bits_irqsoff(unsigned long mask) { unsigned long newval, cr4 = this_cpu_read(cpu_tlbstate.cr4); newval = cr4 ^ mask; if (newval != cr4) { this_cpu_write(cpu_tlbstate.cr4, newval); __write_cr4(newval); } }
0
[ "CWE-276" ]
linux
cadfad870154e14f745ec845708bc17d166065f2
65,017,194,887,753,495,000,000,000,000,000,000,000
10
x86/ioperm: Fix io bitmap invalidation on Xen PV tss_invalidate_io_bitmap() wasn't wired up properly through the pvop machinery, so the TSS and Xen's io bitmap would get out of sync whenever disabling a valid io bitmap. Add a new pvop for tss_invalidate_io_bitmap() to fix it. This is XSA-329. Fixes: 22fe5b0439dd ("...
xmlRelaxNGValidateValue(xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGDefinePtr define) { int ret = 0, oldflags; xmlChar *value; value = ctxt->state->value; switch (define->type) { case XML_RELAXNG_EMPTY:{ if ((value != NULL) && (value[0] != 0)) { ...
0
[ "CWE-134" ]
libxml2
502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b
293,169,569,587,794,100,000,000,000,000,000,000,000
278
More format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 adds a new xmlEscapeFormatString() function to escape composed format strings
write_viminfo_bufferlist(FILE *fp) { buf_T *buf; win_T *win; tabpage_T *tp; char_u *line; int max_buffers; if (find_viminfo_parameter('%') == NULL) return; // Without a number -1 is returned: do all buffers. max_buffers = get_viminfo_parameter('%'); // Allocate room for the file...
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
236,920,534,259,558,200,000,000,000,000,000,000,000
48
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.
bool ValidateGOST() { std::cout << "\nGOST validation suite running...\n\n"; bool pass1 = true, pass2 = true; GOSTEncryption enc; // 256-bit only pass1 = GOSTEncryption::KEYLENGTH == 32 && pass1; pass1 = enc.StaticGetValidKeyLength(16) == 32 && pass1; pass1 = enc.StaticGetValidKeyLength(24) == 32 && pa...
0
[ "CWE-190", "CWE-125" ]
cryptopp
07dbcc3d9644b18e05c1776db2a57fe04d780965
177,249,769,617,361,960,000,000,000,000,000,000,000
25
Add Inflator::BadDistanceErr exception (Issue 414) The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings
yang_check_notif(struct lys_module *module, struct lys_node_notif *notif, struct lys_node **child, int options, struct unres_schema *unres) { if (yang_check_typedef(module, (struct lys_node *)notif, unres)) { goto error; } if (yang_check_iffeatures(module, NULL, notif, NOTIFICATION...
0
[ "CWE-415" ]
libyang
d9feacc4a590d35dbc1af21caf9080008b4450ed
287,167,484,280,932,000,000,000,000,000,000,000,000
39
yang parser BUGFIX double free Fixes #742
apdu_enum_reader (int slot, int *used) { if (slot < 0 || slot >= MAX_READER) return SW_HOST_NO_DRIVER; *used = reader_table[slot].used; return 0; }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
235,668,004,954,047,650,000,000,000,000,000,000,000
7
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static inline void io_ring_set_wakeup_flag(struct io_ring_ctx *ctx) { /* Tell userspace we may need a wakeup call */ spin_lock(&ctx->completion_lock); WRITE_ONCE(ctx->rings->sq_flags, ctx->rings->sq_flags | IORING_SQ_NEED_WAKEUP); spin_unlock(&ctx->completion_lock);
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
172,195,912,045,412,800,000,000,000,000,000,000,000
8
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
eval_index( char_u **arg, typval_T *rettv, evalarg_T *evalarg, int verbose) // give error messages { int evaluate = evalarg != NULL && (evalarg->eval_flags & EVAL_EVALUATE); int empty1 = FALSE, empty2 = FALSE; typval_T var1, var2; int range = FALSE; char_u *key = NULL; ...
0
[ "CWE-823" ]
vim
8b91e71441069b1dde9ac9ff9d9a829b1b4aecca
134,825,791,637,277,000,000,000,000,000,000,000,000
139
patch 8.2.4774: crash when using a number for lambda name Problem: Crash when using a number for lambda name. Solution: Check the type of the lambda reference.
compile_member(int is_slice, int *keeping_dict, cctx_T *cctx) { type2_T *typep; garray_T *stack = &cctx->ctx_type_stack; vartype_T vartype; type_T *idxtype; // We can index a list, dict and blob. If we don't know the type // we can use the index value type. If we still don't know use an "ANY"...
0
[ "CWE-200", "CWE-122" ]
vim
5f25c3855071bd7e26255c68bf458b1b5cf92f39
30,403,647,258,151,000,000,000,000,000,000,000,000
154
patch 8.2.4049: Vim9: reading before the start of the line with "$" Problem: Vim9: reading before the start of the line with "$" by itself. Solution: Do not subtract one when reporting the error.
u32 ip_idents_reserve(u32 hash, int segs) { struct ip_ident_bucket *bucket = ip_idents + hash % IP_IDENTS_SZ; u32 old = ACCESS_ONCE(bucket->stamp32); u32 now = (u32)jiffies; u32 delta = 0; if (old != now && cmpxchg(&bucket->stamp32, old, now) == old) delta = prandom_u32_max(now - old); return atomic_add_retur...
0
[ "CWE-17" ]
linux
df4d92549f23e1c037e83323aff58a21b3de7fe0
132,141,840,629,395,620,000,000,000,000,000,000,000
12
ipv4: try to cache dst_entries which would cause a redirect Not caching dst_entries which cause redirects could be exploited by hosts on the same subnet, causing a severe DoS attack. This effect aggravated since commit f88649721268999 ("ipv4: fix dst race in sk_dst_get()"). Lookups causing redirects will be allocated...
bool Router::MatchView(const std::string& method, const std::string& url, bool* stream) { assert(stream != nullptr); *stream = false; for (auto& route : routes_) { if (std::find(route.methods.begin(), route.methods.end(), method) == route.methods.end()) { continue; } ...
1
[ "CWE-22" ]
webcc
55a45fd5039061d5cc62e9f1b9d1f7e97a15143f
172,808,740,241,849,300,000,000,000,000,000,000,000
28
fix static file serving security issue; fix url path encoding issue
static NTSTATUS dcesrv_lsa_QuerySecret(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct lsa_QuerySecret *r) { struct auth_session_info *session_info = dcesrv_call_session_info(dce_call); struct dcesrv_handle *h; struct lsa_secret_state *secret_state; struct ldb_message *msg; DATA_BLOB session_...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
55,650,605,386,404,660,000,000,000,000,000,000,000
123
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
psutil_get_nic_addresses() { // allocate a 15 KB buffer to start with int outBufLen = 15000; DWORD dwRetVal = 0; ULONG attempts = 0; PIP_ADAPTER_ADDRESSES pAddresses = NULL; do { pAddresses = (IP_ADAPTER_ADDRESSES *) malloc(outBufLen); if (pAddresses == NULL) { PyErr...
0
[ "CWE-415" ]
psutil
7d512c8e4442a896d56505be3e78f1156f443465
310,217,697,253,001,040,000,000,000,000,000,000,000
35
Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creat...
void HGraphBuilder::GenerateRegExpConstructResult(CallRuntime* call) { ASSERT_EQ(3, call->arguments()->length()); CHECK_ALIVE(VisitArgumentList(call->arguments())); HValue* context = environment()->LookupContext(); HCallStub* result = new(zone()) HCallStub(context, CodeStub::RegExpConstructResult, 3); D...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
21,720,688,809,735,385,000,000,000,000,000,000,000
9
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
hugetlb_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { struct hstate *h = hstate_file(file); struct mm_struct *mm = current->mm; struct vm_area_struct *vma; if (len & ~huge_page_mask(h)) return -EINVAL; if (len > TASK_SIZE) return -ENO...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
236,230,769,952,187,600,000,000,000,000,000,000,000
32
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
short js_toint16(js_State *J, int idx) { return jsV_numbertoint16(jsV_tonumber(J, stackidx(J, idx))); }
0
[ "CWE-476" ]
mujs
77ab465f1c394bb77f00966cd950650f3f53cb24
214,802,725,870,434,100,000,000,000,000,000,000,000
4
Fix 697401: Error when dropping extra arguments to lightweight functions.
static int do_add_mount(struct mount *newmnt, struct path *path, int mnt_flags) { int err; mnt_flags &= ~(MNT_SHARED | MNT_WRITE_HOLD | MNT_INTERNAL); err = lock_mount(path); if (err) return err; err = -EINVAL; if (unlikely(!check_mnt(real_mount(path->mnt)))) { /* that's acceptable only for automounts done...
0
[ "CWE-284", "CWE-264" ]
linux
3151527ee007b73a0ebd296010f1c0454a919c7d
187,395,905,589,332,360,000,000,000,000,000,000,000
37
userns: Don't allow creation if the user is chrooted Guarantee that the policy of which files may be access that is established by setting the root directory will not be violated by user namespaces by verifying that the root directory points to the root of the mount namespace at the time of user namespace creation. ...
static inline bool cpu_watchpoint_address_matches(CPUWatchpoint *wp, vaddr addr, vaddr len) { /* We know the lengths are non-zero, but a little caution is * required to avoid errors in the case where the range e...
0
[]
qemu
c3c1bb99d1c11978d9ce94d1bdcf0705378c1459
15,750,320,896,831,429,000,000,000,000,000,000,000
14
exec: Respect as_tranlsate_internal length clamp address_space_translate_internal will clamp the *plen length argument based on the size of the memory region being queried. The iommu walker logic in addresss_space_translate was ignoring this by discarding the post fn call value of *plen. Fix by just always using *plen...
static inline MagickSizeType ScaleQuantumToLongLong(const Quantum quantum) { #if !defined(MAGICKCORE_HDRI_SUPPORT) return((MagickSizeType) (MagickULLConstant(4294967297)*quantum)); #else if (quantum <= 0.0) return(0UL); if ((4294967297.0*quantum) >= 18446744073709551615.0) return(MagickULLConstant(1844674...
1
[ "CWE-190" ]
ImageMagick
95d4e94e0353e503b71a53f5e6fad173c7c70c90
254,412,852,218,178,440,000,000,000,000,000,000,000
12
https://github.com/ImageMagick/ImageMagick/issues/1751
convert_type_name(text *typename) { char *typname = text_to_cstring(typename); Oid oid; oid = DatumGetObjectId(DirectFunctionCall1(regtypein, CStringGetDatum(typname))); if (!OidIsValid(oid)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), errmsg("type \"%s\" does not exist", typn...
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
89,259,624,396,677,170,000,000,000,000,000,000,000
15
Shore up ADMIN OPTION restrictions. Granting a role without ADMIN OPTION is supposed to prevent the grantee from adding or removing members from the granted role. Issuing SET ROLE before the GRANT bypassed that, because the role itself had an implicit right to add or remove members. Plug that hole by recognizing tha...
static void hci_cc_read_data_block_size(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_rp_read_data_block_size *rp = (void *) skb->data; BT_DBG("%s status 0x%2.2x", hdev->name, rp->status); if (rp->status) return; hdev->block_mtu = __le16_to_cpu(rp->max_acl_len); hdev->block_len = __le16_to_cpu(...
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
4,766,836,271,438,724,000,000,000,000,000,000,000
19
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
pk_mk_padata(krb5_context context, krb5_pk_init_ctx ctx, const KDC_REQ_BODY *req_body, unsigned nonce, METHOD_DATA *md) { struct ContentInfo content_info; krb5_error_code ret; const heim_oid *oid = NULL; size_t size = 0; krb5_data buf, sd_buf; int pa_type = -1; krb5_...
0
[ "CWE-320" ]
heimdal
2f7f3d9960aa6ea21358bdf3687cee5149aa35cf
206,303,217,288,492,230,000,000,000,000,000,000,000
163
CVE-2019-12098: krb5: always confirm PA-PKINIT-KX for anon PKINIT RFC8062 Section 7 requires verification of the PA-PKINIT-KX key excahnge when anonymous PKINIT is used. Failure to do so can permit an active attacker to become a man-in-the-middle. Introduced by a1ef548600c5bb51cf52a9a9ea12676506ede19f. First tagged...
R_API void r_bin_iobind(RBin *bin, RIO *io) { r_io_bind (io, &bin->iob); }
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
297,727,989,069,103,340,000,000,000,000,000,000,000
3
Fix #8748 - Fix oobread on string search
utf_uint2cells(UINT32_T c) { if (c >= 0x100 && utf_iscomposing((int)c)) return 0; return utf_char2cells((int)c); }
0
[ "CWE-122", "CWE-787" ]
vim
f6d39c31d2177549a986d170e192d8351bd571e2
222,062,643,163,223,400,000,000,000,000,000,000,000
6
patch 9.0.0220: invalid memory access with for loop over NULL string Problem: Invalid memory access with for loop over NULL string. Solution: Make sure mb_ptr2len() consistently returns zero for NUL.
static inline void perf_event_exit_cpu(int cpu) { }
1
[ "CWE-416", "CWE-362" ]
linux
12ca6ad2e3a896256f086497a7c7406a547ee373
334,455,533,806,160,370,000,000,000,000,000,000,000
1
perf: Fix race in swevent hash There's a race on CPU unplug where we free the swevent hash array while it can still have events on. This will result in a use-after-free which is BAD. Simply do not free the hash array on unplug. This leaves the thing around and no use-after-free takes place. When the last swevent die...
static void netif_reset_xps_queues(struct net_device *dev, u16 offset, u16 count) { struct xps_dev_maps *dev_maps; int cpu, i; bool active = false; mutex_lock(&xps_map_mutex); dev_maps = xmap_dereference(dev->xps_maps); if (!dev_maps) goto out_no_maps; for_each_possible_cpu(cpu) active |= remove_x...
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
20,615,340,568,266,560,000,000,000,000,000,000,000
29
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
int nft_set_elem_expr_clone(const struct nft_ctx *ctx, struct nft_set *set, struct nft_expr *expr_array[]) { struct nft_expr *expr; int err, i, k; for (i = 0; i < set->num_exprs; i++) { expr = kzalloc(set->exprs[i]->ops->size, GFP_KERNEL); if (!expr) goto err_expr; err = nft_expr_clone(expr, set->e...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
14,955,134,426,417,916,000,000,000,000,000,000,000
27
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
ipp_read_http(http_t *http, /* I - Client connection */ ipp_uchar_t *buffer, /* O - Buffer for data */ size_t length) /* I - Total length */ { ssize_t tbytes, /* Total bytes read */ bytes; /* Bytes read this pass */ DEBUG_printf(("7ipp_read_http(http=%p, buffer=%p, length=%d)"...
0
[ "CWE-120" ]
cups
f24e6cf6a39300ad0c3726a41a4aab51ad54c109
101,862,859,766,031,160,000,000,000,000,000,000,000
82
Fix multiple security/disclosure issues: - CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251) - Fixed IPP buffer overflow (rdar://50035411) - Fixed memory disclosure issue in the scheduler (rdar://51373853) - Fixed DoS issues in the scheduler (rdar://51373929)
static __init int raw_module_init(void) { int err; printk(banner); err = can_proto_register(&raw_can_proto); if (err < 0) printk(KERN_ERR "can: registration of raw protocol failed\n"); return err; }
0
[ "CWE-200" ]
linux-2.6
e84b90ae5eb3c112d1f208964df1d8156a538289
207,362,989,474,710,730,000,000,000,000,000,000,000
12
can: Fix raw_getname() leak raw_getname() can leak 10 bytes of kernel memory to user (two bytes hole between can_family and can_ifindex, 8 bytes at the end of sockaddr_can structure) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Oliver Hartkopp <oliver@hartkopp.net> Signed-off-by: David S. Miller <d...
ossl_asn1obj_get_sn(VALUE self) { VALUE val, ret = Qnil; int nid; val = ossl_asn1_get_value(self); if ((nid = OBJ_txt2nid(StringValueCStr(val))) != NID_undef) ret = rb_str_new2(OBJ_nid2sn(nid)); return ret; }
0
[ "CWE-119" ]
openssl
1648afef33c1d97fb203c82291b8a61269e85d3b
8,638,974,127,043,717,000,000,000,000,000,000,000
11
asn1: fix out-of-bounds read in decoding constructed objects OpenSSL::ASN1.{decode,decode_all,traverse} have a bug of out-of-bounds read. int_ossl_asn1_decode0_cons() does not give the correct available length to ossl_asn1_decode() when decoding the inner components of a constructed object. This can cause out-of-bound...
size_t WireFormat::ByteSize(const Message& message) { const Descriptor* descriptor = message.GetDescriptor(); const Reflection* message_reflection = message.GetReflection(); size_t our_size = 0; std::vector<const FieldDescriptor*> fields; // Fields of map entry should always be serialized. if (descriptor...
0
[ "CWE-703" ]
protobuf
d1635e1496f51e0d5653d856211e8821bc47adc4
300,786,819,938,694,550,000,000,000,000,000,000,000
31
Apply patch
get_case_fold_codes_by_str(OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) { return onigenc_unicode_get_case_fold_codes_by_str(ONIG_ENCODING_UTF8, flag, p, end, items); }
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
241,606,537,828,025,680,000,000,000,000,000,000,000
6
onig-5.9.2
ByteVector Ogg::XiphComment::render(bool addFramingBit) const { ByteVector data; // Add the vendor ID length and the vendor ID. It's important to use the // length of the data(String::UTF8) rather than the length of the the string // since this is UTF8 text and there may be more characters in the data than ...
0
[ "CWE-20" ]
taglib
ab8a0ee8937256311e649a88e8ddd7c7f870ad59
267,938,056,530,322,100,000,000,000,000,000,000,000
48
Don't store the output of ByteVector::toUInt() in int, use uint instead
u32 i40e_get_global_fd_count(struct i40e_pf *pf) { u32 val, fcnt_prog; val = rd32(&pf->hw, I40E_GLQF_FDCNT_0); fcnt_prog = (val & I40E_GLQF_FDCNT_0_GUARANT_CNT_MASK) + ((val & I40E_GLQF_FDCNT_0_BESTCNT_MASK) >> I40E_GLQF_FDCNT_0_BESTCNT_SHIFT); return fcnt_prog; }
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
247,857,783,115,275,760,000,000,000,000,000,000,000
10
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>
bool UTFstring::wcscmp_internal(const wchar_t *str1, const wchar_t *str2) { size_t Index=0; while (str1[Index] == str2[Index] && str1[Index] != 0) { Index++; } return (str1[Index] == str2[Index]); }
0
[ "CWE-200", "CWE-703" ]
libebml
ababb64e0c792ad2a314245233db0833ba12036b
121,500,400,275,455,550,000,000,000,000,000,000,000
8
EbmlUnicodeString: don't read beyond end of string The conversion from an UTF-8 encoded string into a wchar_t one was reading from beyond the end of the source buffer if the length indicated by a UTF-8 character's first byte exceeds the number of bytes actually present afterwards. Fixes the issue reported as Cisco TA...
static void nfs_alloc_unique_id(struct rb_root *root, struct nfs_unique_id *new, __u64 minval, int maxbits) { struct rb_node **p, *parent; struct nfs_unique_id *pos; __u64 mask = ~0ULL; if (maxbits < 64) mask = (1ULL << maxbits) - 1ULL; /* Ensure distribution is more or less flat */ get_random_bytes(&new->i...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
193,747,431,115,426,960,000,000,000,000,000,000,000
49
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static int add_attribute(STACK_OF(X509_ATTRIBUTE) **sk, int nid, int atrtype, void *value) { X509_ATTRIBUTE *attr = NULL; if (*sk == NULL) { if ((*sk = sk_X509_ATTRIBUTE_new_null()) == NULL) return 0; new_attrib: if ((attr = X509_ATTRIBUTE_create(nid, atrty...
0
[ "CWE-327" ]
openssl
631f94db0065c78181ca9ba5546ebc8bb3884b97
129,629,387,535,439,200,000,000,000,000,000,000,000
37
Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey An attack is simple, if the first CMS_recipientInfo is valid but the second CMS_recipientInfo is chosen ciphertext. If the second recipientInfo decodes to PKCS #1 v1.5 form plaintext, the correct encryption key will be replaced by garbage, and the mess...
static unsigned int touint32(double d) { return (unsigned int)toint32(d); }
0
[ "CWE-674" ]
mujs
4d45a96e57fbabf00a7378b337d0ddcace6f38c1
118,268,262,921,313,470,000,000,000,000,000,000,000
4
Guard binary expressions from too much recursion.
static void MYSQLND_METHOD(mysqlnd_protocol, init_change_user_response_packet)(struct st_mysqlnd_packet_chg_user_resp *packet) { DBG_ENTER("mysqlnd_protocol::init_change_user_response_packet"); memset(packet, 0, sizeof(*packet)); packet->header.m = &packet_methods[PROT_CHG_USER_RESP_PACKET]; DBG_VOID_RETURN;
0
[ "CWE-120" ]
php-src
58006537fc5f133ae8549efe5118cde418b3ace9
273,443,443,012,817,370,000,000,000,000,000,000,000
7
Fix bug #81719: mysqlnd/pdo password buffer overflow
server_client_push_stderr(struct client *c) { struct msg_stderr_data data; size_t sent, left; if (c->stderr_data == c->stdout_data) { server_client_push_stdout(c); return; } left = EVBUFFER_LENGTH(c->stderr_data); while (left != 0) { sent = left; if (sent > sizeof data.data) sent = sizeof dat...
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
96,717,642,883,274,300,000,000,000,000,000,000,000
32
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
do_add_counters(struct net *net, const void __user *user, unsigned int len, int compat) { unsigned int i; struct xt_counters_info tmp; struct xt_counters *paddc; struct xt_table *t; const struct xt_table_info *private; int ret = 0; struct ip6t_entry *iter; unsigned int addend; paddc = xt_copy_counters_from_...
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
184,814,960,801,618,130,000,000,000,000,000,000,000
47
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
loop_info( sockaddr_u *srcadr, endpt *inter, struct req_pkt *inpkt ) { struct info_loop *li; l_fp ltmp; li = (struct info_loop *)prepare_pkt(srcadr, inter, inpkt, sizeof(struct info_loop)); DTOLFP(last_offset, &ltmp); HTONL_FP(&ltmp, &li->last_offset); DTOLFP(drift_comp * 1e6, &ltmp); HTONL_FP(&ltmp, ...
0
[ "CWE-476" ]
ntp
8a0c765f3c47633fa262356b0818788d1cf249b1
5,510,872,812,515,471,000,000,000,000,000,000,000
22
[Bug 2939] reslist NULL pointer dereference [Bug 2940] Stack exhaustion in recursive traversal of restriction list -- these two where fixed together --
static struct dmaengine_unmap_pool *__get_unmap_pool(int nr) { int order = get_count_order(nr); switch (order) { case 0 ... 1: return &unmap_pool[0]; case 2 ... 4: return &unmap_pool[1]; case 5 ... 7: return &unmap_pool[2]; case 8: return &unmap_pool[3]; default: BUG(); return NULL; } }
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
205,739,496,595,455,660,000,000,000,000,000,000,000
18
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
static bcon_error_t bson_append_bcon_with_state(bson *b, const bcon *bc, bcon_state_t start_state) { bcon_error_t ret = BCON_OK; bcon_state_t state = start_state; char *key = 0; char *typespec = 0; unsigned char doc_stack[DOC_STACK_SIZE]; size_t doc_stack_pointer = 0; size_t array_index = 0;...
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
259,487,165,113,127,100,000,000,000,000,000,000,000
105
don't mix up int and size_t (first pass to fix that)
memory_show(struct device *dev, struct device_attribute *attr, char *buf) { struct mdev_state *mdev_state = dev_get_drvdata(dev); return sprintf(buf, "%d MB\n", mdev_state->type->mbytes); }
0
[ "CWE-200", "CWE-401" ]
linux
de5494af4815a4c9328536c72741229b7de88e7f
294,677,051,402,050,000,000,000,000,000,000,000,000
7
vfio/mbochs: Fix missing error unwind of mbochs_used_mbytes Convert mbochs to use an atomic scheme for this like mtty was changed into. The atomic fixes various race conditions with probing. Add the missing error unwind. Also add the missing kfree of mdev_state->pages. Fixes: 681c1615f891 ("vfio/mbochs: Convert to us...
static inline void io_file_bitmap_clear(struct io_file_table *table, int bit) { __clear_bit(bit, table->bitmap); table->alloc_hint = bit;
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
111,928,268,996,668,490,000,000,000,000,000,000,000
5
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...
write_lnum_adjust(linenr_T offset) { if (curbuf->b_no_eol_lnum != 0) /* only if there is a missing eol */ curbuf->b_no_eol_lnum += offset; }
0
[ "CWE-200", "CWE-668" ]
vim
5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8
261,942,616,275,545,160,000,000,000,000,000,000,000
5
patch 8.0.1263: others can read the swap file if a user is careless Problem: Others can read the swap file if a user is careless with his primary group. Solution: If the group permission allows for reading but the world permissions doesn't, make sure the group is right.
static int sock_getbindtodevice(struct sock *sk, char __user *optval, int __user *optlen, int len) { int ret = -ENOPROTOOPT; #ifdef CONFIG_NETDEVICES struct net *net = sock_net(sk); char devname[IFNAMSIZ]; if (sk->sk_bound_dev_if == 0) { len = 0; goto zero; } ret = -EINVAL; if (len < IFNAMSIZ) goto o...
0
[ "CWE-119", "CWE-787" ]
linux
b98b0bc8c431e3ceb4b26b0dfc8db509518fb290
151,586,953,787,465,700,000,000,000,000,000,000,000
39
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 ...
utils_check_ap_compatible (NMAccessPoint *ap, NMConnection *connection) { NMSettingWireless *s_wireless; NMSettingWirelessSecurity *s_wireless_sec; const GByteArray *setting_bssid; const char *setting_mode; const char *setting_band; NM80211Mode ap_mode; guint32 freq; g_return_val_if_...
0
[ "CWE-310" ]
network-manager-applet
4020594dfbf566f1852f0acb36ad631a9e73a82b
326,207,622,925,257,750,000,000,000,000,000,000,000
66
core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793) If a connection was created with a CA certificate, but the user later moved or deleted that CA certificate, the applet would simply provide the connection to NetworkManager without any CA certificate. This could cause NM to connect to t...
void free_thread_context(struct thread_context* thread_context) { destroy_thread_context(thread_context); my_free(thread_context); }
0
[ "CWE-787" ]
c-blosc2
c4c6470e88210afc95262c8b9fcc27e30ca043ee
307,044,102,310,577,100,000,000,000,000,000,000,000
4
Fixed asan heap buffer overflow when not enough space to write compressed block size.
static int scrub_find_csum(struct scrub_ctx *sctx, u64 logical, u8 *csum) { struct btrfs_ordered_sum *sum = NULL; unsigned long index; unsigned long num_sectors; while (!list_empty(&sctx->csum_list)) { sum = list_first_entry(&sctx->csum_list, struct btrfs_ordered_sum, list); if (sum->bytenr > logica...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
334,694,297,985,109,670,000,000,000,000,000,000,000
33
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
s32 i2c_smbus_read_byte(const struct i2c_client *client) { union i2c_smbus_data data; int status; status = i2c_smbus_xfer(client->adapter, client->addr, client->flags, I2C_SMBUS_READ, 0, I2C_SMBUS_BYTE, &data); return (status < 0) ? status : data.byte; }
0
[ "CWE-787" ]
linux
89c6efa61f5709327ecfa24bff18e57a4e80c7fa
48,478,071,741,377,250,000,000,000,000,000,000,000
10
i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA On a I2C_SMBUS_I2C_BLOCK_DATA read request, if data->block[0] is greater than I2C_SMBUS_BLOCK_MAX + 1, the underlying I2C driver writes data out of the msgbuf1 array boundary. It is possible from a user application to run into that issue by calling the ...
static int opl3_ioctl(int dev, unsigned int cmd, void __user * arg) { struct sbi_instrument ins; switch (cmd) { case SNDCTL_FM_LOAD_INSTR: printk(KERN_WARNING "Warning: Obsolete ioctl(SNDCTL_FM_LOAD_INSTR) used. Fix the program.\n"); if (copy_from_user(&ins, arg, sizeof(ins))) return -EFAULT; if (ins...
0
[ "CWE-119", "CWE-264", "CWE-284" ]
linux
4d00135a680727f6c3be78f8befaac009030e4df
67,616,759,916,304,660,000,000,000,000,000,000,000
33
sound/oss/opl3: validate voice and channel indexes User-controllable indexes for voice and channel values may cause reading and writing beyond the bounds of their respective arrays, leading to potentially exploitable memory corruption. Validate these indexes. Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com> C...
struct inode *ext4_iget(struct super_block *sb, unsigned long ino) { struct ext4_iloc iloc; struct ext4_inode *raw_inode; struct ext4_inode_info *ei; struct inode *inode; journal_t *journal = EXT4_SB(sb)->s_journal; long ret; loff_t size; int block; uid_t i_uid; gid_t i_gid; projid_t i_projid; inode = iget...
0
[]
linux
8e4b5eae5decd9dfe5a4ee369c22028f90ab4c44
138,253,491,681,914,730,000,000,000,000,000,000,000
261
ext4: fail ext4_iget for root directory if unallocated If the root directory has an i_links_count of zero, then when the file system is mounted, then when ext4_fill_super() notices the problem and tries to call iput() the root directory in the error return path, ext4_evict_inode() will try to free the inode on disk, b...