func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
mrb_yield_with_class(mrb_state *mrb, mrb_value b, mrb_int argc, const mrb_value *argv, mrb_value self, struct RClass *c) { struct RProc *p; mrb_sym mid = mrb->c->ci->mid; mrb_callinfo *ci; mrb_value val; mrb_int n; check_block(mrb, b); ci = mrb->c->ci; n = mrb_ci_nregs(ci); p = mrb_proc_ptr(b); ci ...
0
[ "CWE-703", "CWE-125" ]
mruby
a4d97934d51cb88954cc49161dc1d151f64afb6b
54,608,613,763,983,400,000,000,000,000,000,000,000
43
vm.c: check if target_class is NULL (when prepended).
flatpak_run_add_x11_args (FlatpakBwrap *bwrap, gboolean allowed) { g_autofree char *x11_socket = NULL; const char *display; /* Always cover /tmp/.X11-unix, that way we never see the host one in case * we have access to the host /tmp. If you request X access we'll put the right ...
0
[ "CWE-94", "CWE-74" ]
flatpak
6d1773d2a54dde9b099043f07a2094a4f1c2f486
290,646,567,425,464,700,000,000,000,000,000,000,000
73
run: Convert all environment variables into bwrap arguments This avoids some of them being filtered out by a setuid bwrap. It also means that if they came from an untrusted source, they cannot be used to inject arbitrary code into a non-setuid bwrap via mechanisms like LD_PRELOAD. Because they get bundled into a memf...
GF_Err fdpa_Write(GF_Box *s, GF_BitStream *bs) { u32 i; GF_FDpacketBox *ptr = (GF_FDpacketBox *) s; if (!s) return GF_BAD_PARAM; gf_bs_write_int(bs, ptr->info.sender_current_time_present, 1); gf_bs_write_int(bs, ptr->info.expected_residual_time_present, 1); gf_bs_write_int(bs, ptr->info.session_close_bit, 1); g...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
142,569,144,363,937,850,000,000,000,000,000,000,000
26
fixed 2 possible heap overflows (inc. #1088)
proxy_C_SignEncryptUpdate (CK_X_FUNCTION_LIST *self, CK_SESSION_HANDLE handle, CK_BYTE_PTR part, CK_ULONG part_len, CK_BYTE_PTR enc_part, CK_ULONG_PTR enc_part_len) { State *state = (S...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
217,384,927,202,003,740,000,000,000,000,000,000,000
16
Check for arithmetic overflows before allocating
static void x509_fingerprint (char *s, int l, X509 * cert, const EVP_MD *(*hashfunc)(void)) { unsigned char md[EVP_MAX_MD_SIZE]; unsigned int n; int j; if (!X509_digest (cert, hashfunc(), md, &n)) { snprintf (s, l, "%s", _("[unable to calculate]")); } else { for (j = 0; j < (int) n; j++) { ...
0
[ "CWE-74" ]
mutt
c547433cdf2e79191b15c6932c57f1472bfb5ff4
337,792,773,824,526,300,000,000,000,000,000,000,000
20
Fix STARTTLS response injection attack. Thanks again to Damian Poddebniak and Fabian Ising from the Münster University of Applied Sciences for reporting this issue. Their summary in ticket 248 states the issue clearly: We found another STARTTLS-related issue in Mutt. Unfortunately, it affects SMTP, POP3 and IMAP...
static int ext3_commit_super(struct super_block *sb, struct ext3_super_block *es, int sync) { struct buffer_head *sbh = EXT3_SB(sb)->s_sbh; int error = 0; if (!sbh) return error; if (buffer_write_io_error(sbh)) { /* * Oh, dear. A previous attempt to write the * superblock failed. T...
0
[ "CWE-20" ]
linux
8d0c2d10dd72c5292eda7a06231056a4c972e4cc
305,901,677,406,415,840,000,000,000,000,000,000,000
51
ext3: Fix format string issues ext3_msg() takes the printk prefix as the second parameter and the format string as the third parameter. Two callers of ext3_msg omit the prefix and pass the format string as the second parameter and the first parameter to the format string as the third parameter. In both cases this stri...
static int udf_read_inode(struct inode *inode, bool hidden_inode) { struct buffer_head *bh = NULL; struct fileEntry *fe; struct extendedFileEntry *efe; uint16_t ident; struct udf_inode_info *iinfo = UDF_I(inode); struct udf_sb_info *sbi = UDF_SB(inode->i_sb); struct kernel_lb_addr *iloc = &iinfo->i_location; un...
0
[ "CWE-476" ]
linux
7fc3b7c2981bbd1047916ade327beccb90994eee
175,314,281,740,430,700,000,000,000,000,000,000,000
314
udf: Fix NULL ptr deref when converting from inline format udf_expand_file_adinicb() calls directly ->writepage to write data expanded into a page. This however misses to setup inode for writeback properly and so we can crash on inode->i_wb dereference when submitting page for IO like: BUG: kernel NULL pointer dere...
ldns_zone_print(FILE *output, const ldns_zone *z) { ldns_zone_print_fmt(output, ldns_output_format_default, z); }
0
[ "CWE-415" ]
ldns
070b4595981f48a21cc6b4f5047fdc2d09d3da91
50,600,514,562,499,790,000,000,000,000,000,000,000
4
CAA and URI
static void do_cmd(ESPState *s) { uint8_t busid = esp_fifo_pop(&s->cmdfifo); int len; s->cmdfifo_cdb_offset--; /* Ignore extended messages for now */ if (s->cmdfifo_cdb_offset) { len = MIN(s->cmdfifo_cdb_offset, fifo8_num_used(&s->cmdfifo)); esp_fifo_pop_buf(&s->cmdfifo, NULL, len)...
0
[ "CWE-476" ]
qemu
fa7505c154d4d00ad89a747be2eda556643ce00e
171,579,351,228,276,600,000,000,000,000,000,000,000
16
esp: don't underflow cmdfifo in do_cmd() If the guest tries to execute a CDB when cmdfifo is not empty before the start of the message out phase then clearing the message out phase data will cause cmdfifo to underflow due to cmdfifo_cdb_offset being larger than the amount of data within. Since this can only occur by ...
static int ext4_drop_inode(struct inode *inode) { int drop = generic_drop_inode(inode); trace_ext4_drop_inode(inode, drop); return drop; }
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
316,157,308,949,287,700,000,000,000,000,000,000,000
7
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
mbfl_buffer_converter_strncat(mbfl_buffer_converter *convd, const unsigned char *p, int n) { mbfl_convert_filter *filter; int (*filter_function)(int c, mbfl_convert_filter *filter); if (convd != NULL && p != NULL) { filter = convd->filter1; if (filter != NULL) { filter_function = filter->filter_function; ...
0
[ "CWE-119" ]
php-src
64f42c73efc58e88671ad76b6b6bc8e2b62713e1
330,194,490,754,083,750,000,000,000,000,000,000,000
20
Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
static RBinPlugin *get_plugin_from_buffer(RBin *bin, RBinFile *bf, const char *pluginname, RBuffer *buf) { RBinPlugin *plugin = bin->force? r_bin_get_binplugin_by_name (bin, bin->force): NULL; if (plugin) { return plugin; } plugin = pluginname? r_bin_get_binplugin_by_name (bin, pluginname): NULL; if (plugin) { ...
0
[ "CWE-125" ]
radare2
193f4fe01d7f626e2ea937450f2e0c4604420e9d
215,812,811,139,165,700,000,000,000,000,000,000,000
15
Fix integer overflow in string search causing oobread ##crash * Reported by @greatergoodest via huntrdev * BountyID: 8a3dc5cb-08b3-4807-82b2-77f08c137a04 * Reproducer bfileovf
static int xfrm6_tunnel_rcv(struct sk_buff *skb) { struct net *net = dev_net(skb->dev); const struct ipv6hdr *iph = ipv6_hdr(skb); __be32 spi; spi = xfrm6_tunnel_spi_lookup(net, (const xfrm_address_t *)&iph->saddr); return xfrm6_rcv_spi(skb, IPPROTO_IPV6, spi, NULL); }
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
96,672,992,975,476,900,000,000,000,000,000,000,000
9
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
write_short_policy(const short_policy_t *policy) { int i; char *answer; smartlist_t *sl = smartlist_new(); smartlist_add_asprintf(sl, "%s", policy->is_accept ? "accept " : "reject "); for (i=0; i < policy->n_entries; i++) { const short_policy_entry_t *e = &policy->entries[i]; if (e->min_port == e->m...
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
73,785,717,287,477,060,000,000,000,000,000,000,000
23
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
static inline void tcp_mark_push(struct tcp_sock *tp, struct sk_buff *skb) { TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH; tp->pushed_seq = tp->write_seq; }
0
[ "CWE-400", "CWE-119", "CWE-703" ]
linux
baff42ab1494528907bf4d5870359e31711746ae
307,963,994,136,587,300,000,000,000,000,000,000,000
5
net: Fix oops from tcp_collapse() when using splice() tcp_read_sock() can have a eat skbs without immediately advancing copied_seq. This can cause a panic in tcp_collapse() if it is called as a result of the recv_actor dropping the socket lock. A userspace program that splices data from a socket to either another soc...
static const char *get_type_string(cmark_syntax_extension *self, cmark_node *node) { if (node->type == CMARK_NODE_TABLE) { return "table"; } else if (node->type == CMARK_NODE_TABLE_ROW) { if (((node_table_row *)node->as.opaque)->is_header) return "table_header"; ...
0
[ "CWE-190" ]
cmark-gfm
b1687e6af1367c596ab75428b03af55666a66530
301,795,908,842,409,170,000,000,000,000,000,000,000
15
prevent integer overflow in row_from_string * added explicit check for UINT16_MAX boundary on row->n_columns * added additional checks for row_from_string NULL returns to prevent NULL dereferences on error cases * added additional check to ensure n_columns between marker and header rows always match prior to any ali...
ares_parse_naptr_reply (const unsigned char *abuf, int alen, struct ares_naptr_reply **naptr_out) { unsigned int qdcount, ancount, i; const unsigned char *aptr, *vptr; int status, rr_type, rr_class, rr_len; long len; char *hostname = NULL, *rr_name = NULL; struct ares_naptr_reply *na...
1
[ "CWE-200" ]
c-ares
18ea99693d63f957ecb670045adbd2c1da8a4641
92,817,310,620,354,770,000,000,000,000,000,000,000
145
ares_parse_naptr_reply: make buffer length check more accurate 9478908a490a6bf009ba58d81de8c1d06d50a117 introduced a length check for records parsed by `ares_parse_naptr_reply()`. However, that function is designed to parse replies which also contain non-NAPTR records; for A records, the `rr_len > 7` check will fail a...
TEST_F(HttpConnectionManagerConfigTest, DEPRECATED_FEATURE_TEST(DeprecatedExtensionFilterName)) { const std::string deprecated_name = "envoy.http_connection_manager"; ASSERT_NE( nullptr, Registry::FactoryRegistry<Server::Configuration::NamedNetworkFilterConfigFactory>::getFactory( deprecated_...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
3,097,148,148,299,997,000,000,000,000,000,000,000
8
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
int managesieve_parser_read_args (struct managesieve_parser *parser, unsigned int count, enum managesieve_parser_flags flags, const struct managesieve_arg **args_r) { parser->flags = flags; while ( !parser->eol && (count == 0 || IS_UNFINISHED(parser) || array_count(&parser->root_list) < count) ) { if ( !manages...
0
[ "CWE-787" ]
pigeonhole
7ce9990a5e6ba59e89b7fe1c07f574279aed922c
61,305,857,850,872,970,000,000,000,000,000,000,000
34
lib-managesieve: Don't accept strings with NULs ManageSieve doesn't allow NULs in strings. This fixes a bug with unescaping a string with NULs: str_unescape() could have been called for memory that points outside the allocated string, causing heap corruption. This could cause crashes or theoretically even result in r...
int blkid_partitions_strcpy_ptuuid(blkid_probe pr, char *str) { struct blkid_chain *chn = blkid_probe_get_chain(pr); if (chn->binary || !str || !*str) return 0; if (!blkid_probe_set_value(pr, "PTUUID", (unsigned char *) str, strlen(str) + 1)) return -ENOMEM; return 0; }
0
[]
util-linux
50d1594c2e6142a3b51d2143c74027480df082e0
282,200,330,723,627,080,000,000,000,000,000,000,000
12
libblkid: avoid non-empty recursion in EBR This is extension to the patch 7164a1c34d18831ac61c6744ad14ce916d389b3f. We also need to detect non-empty recursion in the EBR chain. It's possible to create standard valid logical partitions and in the last one points back to the EBR chain. In this case all offsets will be ...
static word32 IndefItems_Len(IndefItems* items) { return items->len[items->idx].len; }
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
151,297,463,294,470,220,000,000,000,000,000,000,000
4
OCSP: improve handling of OCSP no check extension
SCTP_STATIC int __sctp_setsockopt_connectx(struct sock* sk, struct sockaddr __user *addrs, int addrs_size, sctp_assoc_t *assoc_id) { int err = 0; struct sockaddr *kaddrs; SCTP_DEBUG_PRINTK("%s - sk %p addrs %p addrs_size %d\n", __func__, sk, addrs, addrs_size); if (unlikely(addr...
0
[]
linux-2.6
5e739d1752aca4e8f3e794d431503bfca3162df4
160,019,204,449,067,600,000,000,000,000,000,000,000
33
sctp: fix potential panics in the SCTP-AUTH API. All of the SCTP-AUTH socket options could cause a panic if the extension is disabled and the API is envoked. Additionally, there were some additional assumptions that certain pointers would always be valid which may not always be the case. This patch hardens the API a...
static int has_sha1_pack_kept_or_nonlocal(const unsigned char *sha1) { static struct packed_git *last_found = (void *)1; struct packed_git *p; p = (last_found != (void *)1) ? last_found : packed_git; while (p) { if ((!p->pack_local || p->pack_keep) && find_pack_entry_one(sha1, p)) { last_found = p; ret...
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
8,587,352,776,023,511,000,000,000,000,000,000,000
22
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
free_imported(cctx_T *cctx) { int idx; for (idx = 0; idx < cctx->ctx_imports.ga_len; ++idx) { imported_T *import = ((imported_T *)cctx->ctx_imports.ga_data) + idx; vim_free(import->imp_name); } ga_clear(&cctx->ctx_imports); }
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
277,474,446,676,106,800,000,000,000,000,000,000,000
12
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
void MainWindow::on_actionOpenOther_triggered() { // these static are used to open dialog with previous configuration OpenOtherDialog dialog(this); if (MLT.producer()) dialog.load(MLT.producer()); if (dialog.exec() == QDialog::Accepted) { closeProducer(); open(dialog.newProducer...
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
156,012,633,933,872,040,000,000,000,000,000,000,000
12
fix upgrade check is not using TLS correctly
static void run_again(struct ieee80211_sub_if_data *sdata, unsigned long timeout) { sdata_assert_lock(sdata); if (!timer_pending(&sdata->u.mgd.timer) || time_before(timeout, sdata->u.mgd.timer.expires)) mod_timer(&sdata->u.mgd.timer, timeout); }
0
[]
linux
79c92ca42b5a3e0ea172ea2ce8df8e125af237da
189,082,136,417,175,660,000,000,000,000,000,000,000
9
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...
Optimized(const boost::intrusive_ptr<ExpressionContext>& expCtx, const ValueSet& cachedRhsSet, const ExpressionVector& operands) : ExpressionSetIsSubset(expCtx), _cachedRhsSet(cachedRhsSet) { _children = operands; }
0
[ "CWE-190" ]
mongo
21d8699ed6c517b45e1613e20231cd8eba894985
176,722,287,246,534,020,000,000,000,000,000,000,000
6
SERVER-43699 $mod should not overflow for large negative values
static void remove_hugetlb_page_for_demote(struct hstate *h, struct page *page, bool adjust_surplus) { __remove_hugetlb_page(h, page, adjust_surplus, true); }
0
[]
linux
a4a118f2eead1d6c49e00765de89878288d4b890
330,930,930,551,887,640,000,000,000,000,000,000,000
5
hugetlbfs: flush TLBs correctly after huge_pmd_unshare When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB flush is missing. This TLB flush must be performed before releasing the i_mmap_rwsem, in order to prevent an unshared PMDs page from being released and reused before the TLB flush took place...
ecma_snapshot_get_literal (const uint8_t *literal_base_p, /**< literal start */ ecma_value_t literal_value) /**< string / number offset */ { JERRY_ASSERT ((literal_value & ECMA_VALUE_TYPE_MASK) == ECMA_TYPE_SNAPSHOT_OFFSET); const uint8_t *literal_p = literal_base_p + (literal_value >> J...
1
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
223,753,260,190,128,900,000,000,000,000,000,000,000
40
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static void nhmldump_send_frame(GF_NHMLDumpCtx *ctx, char *data, u32 data_size, GF_FilterPacket *pck) { GF_FilterPacket *dst_pck; char nhml[1024]; const GF_PropertyValue *p; u32 size; u8 *output; GF_FilterSAPType sap = gf_filter_pck_get_sap(pck); u64 dts = gf_filter_pck_get_dts(pck); u64 cts = gf_filter_pck_get...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
308,370,927,874,366,350,000,000,000,000,000,000,000
181
fixed #2138
compute_U_value_R3(std::string const& user_password, QPDF::EncryptionData const& data) { // Algorithm 3.5 from the PDF 1.7 Reference Manual std::string k1 = QPDF::compute_encryption_key(user_password, data); MD5 md5; md5.encodeDataIncrementally( pad_or_truncate_password_V4("").c_str(), key_bytes)...
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
159,706,500,661,063,770,000,000,000,000,000,000,000
27
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static void oz_hcd_stop(struct usb_hcd *hcd) { }
0
[ "CWE-703", "CWE-189" ]
linux
b1bb5b49373b61bf9d2c73a4d30058ba6f069e4c
179,744,483,976,964,360,000,000,000,000,000,000,000
3
ozwpan: Use unsigned ints to prevent heap overflow Using signed integers, the subtraction between required_size and offset could wind up being negative, resulting in a memcpy into a heap buffer with a negative length, resulting in huge amounts of network-supplied data being copied into the heap, which could potentiall...
void MainWindow::updateAutoSave() { if (!m_autosaveTimer.isActive()) m_autosaveTimer.start(); }
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
62,049,208,134,240,460,000,000,000,000,000,000,000
5
fix upgrade check is not using TLS correctly
static u32 ilog(u32 v, Bool dec) { u32 ret = 0; if (dec && v) --v; while (v) { ret++; v >>= 1; } return (ret); }
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
76,736,610,381,083,160,000,000,000,000,000,000,000
10
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
char *timelib_timezone_id_from_abbr(const char *abbr, timelib_long gmtoffset, int isdst) { const timelib_tz_lookup_table *tp; tp = abbr_search(abbr, gmtoffset, isdst); if (tp) { return (tp->full_tz_name); } else { return NULL; } }
0
[ "CWE-125" ]
php-src
5c0455bf2c8cd3c25401407f158e820aa3b239e1
241,803,949,217,302,800,000,000,000,000,000,000,000
11
Merge branch 'PHP-7.0' into PHP-7.1 * PHP-7.0: Fixed bug #75055 Out-Of-Bounds Read in timelib_meridian() Apply upstream patch for CVE-2016-1283
static unsigned long gfn_to_hva_many(struct kvm_memory_slot *slot, gfn_t gfn, gfn_t *nr_pages) { return __gfn_to_hva_many(slot, gfn, nr_pages, true);
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
57,953,947,549,919,850,000,000,000,000,000,000,000
5
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
err_readonly (s) const char *s; { report_error (_("%s: readonly variable"), s); }
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
201,659,239,858,027,600,000,000,000,000,000,000,000
5
commit bash-20120224 snapshot
struct ib_ucontext *ib_uverbs_get_ucontext_file(struct ib_uverbs_file *ufile) { /* * We do not hold the hw_destroy_rwsem lock for this flow, instead * srcu is used. It does not matter if someone races this with * get_context, we get NULL or valid ucontext. */ struct ib_ucontext *ucontext = smp_load_acquire(&u...
0
[ "CWE-362", "CWE-703", "CWE-667" ]
linux
04f5866e41fb70690e28397487d8bd8eea7d712a
112,555,516,952,396,940,000,000,000,000,000,000,000
18
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization on the processes bel...
static int psi_io_show(struct seq_file *m, void *v) { return psi_show(m, &psi_system, PSI_IO); }
0
[ "CWE-787" ]
linux
6fcca0fa48118e6d63733eb4644c6cd880c15b8f
43,068,382,344,452,130,000,000,000,000,000,000,000
4
sched/psi: Fix OOB write when writing 0 bytes to PSI files Issuing write() with count parameter set to 0 on any file under /proc/pressure/ will cause an OOB write because of the access to buf[buf_size-1] when NUL-termination is performed. Fix this by checking for buf_size to be non-zero. Signed-off-by: Suren Baghdasa...
static int __choose_path_in_pg(struct multipath *m, struct priority_group *pg, size_t nr_bytes) { struct dm_path *path; path = pg->ps.type->select_path(&pg->ps, &m->repeat_count, nr_bytes); if (!path) return -ENXIO; m->current_pgpath = path_to_pgpath(path); if (m->current_pg != pg) __switch_pg(m, ...
0
[ "CWE-284", "CWE-264" ]
linux
ec8013beddd717d1740cfefb1a9b900deef85462
194,090,205,753,367,100,000,000,000,000,000,000,000
16
dm: do not forward ioctls from logical volumes to the underlying device A logical volume can map to just part of underlying physical volume. In this case, it must be treated like a partition. Based on a patch from Alasdair G Kergon. Cc: Alasdair G Kergon <agk@redhat.com> Cc: dm-devel@redhat.com Signed-off-by: Paolo ...
int mutt_socket_write_d (CONNECTION *conn, const char *buf, int len, int dbg) { int rc; int sent = 0; dprint (dbg, (debugfile,"%d> %s", conn->fd, buf)); if (conn->fd < 0) { dprint (1, (debugfile, "mutt_socket_write: attempt to write to closed connection\n")); return -1; } if (len < 0) len =...
0
[ "CWE-74" ]
mutt
c547433cdf2e79191b15c6932c57f1472bfb5ff4
136,562,257,276,808,640,000,000,000,000,000,000,000
38
Fix STARTTLS response injection attack. Thanks again to Damian Poddebniak and Fabian Ising from the Münster University of Applied Sciences for reporting this issue. Their summary in ticket 248 states the issue clearly: We found another STARTTLS-related issue in Mutt. Unfortunately, it affects SMTP, POP3 and IMAP...
cib_recv_plaintext(int sock) { char *buf = NULL; ssize_t rc = 0; ssize_t len = 0; ssize_t chunk_size = 512; buf = calloc(1, chunk_size); while (1) { errno = 0; rc = read(sock, buf + len, chunk_size); crm_trace("Got %d more bytes. errno=%d", (int)rc, errno); if...
1
[ "CWE-399" ]
pacemaker
564f7cc2a51dcd2f28ab12a13394f31be5aa3c93
336,433,643,467,537,170,000,000,000,000,000,000,000
50
High: core: Internal tls api improvements for reuse with future LRMD tls backend.
int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo) { *geo = md->geometry; return 0; }
0
[ "CWE-362" ]
linux
b9a41d21dceadf8104812626ef85dc56ee8a60ed
141,450,142,856,970,200,000,000,000,000,000,000,000
6
dm: fix race between dm_get_from_kobject() and __dm_destroy() The following BUG_ON was hit when testing repeat creation and removal of DM devices: kernel BUG at drivers/md/dm.c:2919! CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44 Call Trace: [<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a ...
void update_font(ASS_Renderer *render_priv) { unsigned val; ASS_FontDesc desc; if (render_priv->state.family[0] == '@') { desc.vertical = 1; desc.family = strdup(render_priv->state.family + 1); } else { desc.vertical = 0; desc.family = strdup(render_priv->state.family); ...
0
[]
libass
6835731c2fe4164a0c50bc91d12c43b2a2b4e799
55,450,257,706,887,520,000,000,000,000,000,000,000
37
parse_tags: don't recurse for nested \t() This fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4892 (stack overflow on deeply nested \t()). This is possible because parentheses do not nest and the first ')' terminates the whole tag. Thus something like \t(\t(\t(\t(\t() can be read in a simple loop with no...
static int kvm_mmu_notifier_clear_young(struct mmu_notifier *mn, struct mm_struct *mm, unsigned long start, unsigned long end) { struct kvm *kvm = mmu_notifier_to_kvm(mn); int young, idx; idx = srcu_read_lock(&kvm->srcu); spin_lock(&kvm->mmu_lock); /* * Even though we do not flush TLB, this will ...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
98,415,859,645,318,400,000,000,000,000,000,000,000
29
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...
CImg<T>& load_analyze(std::FILE *const file, float *const voxel_size=0) { return _load_analyze(file,0,voxel_size); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
126,020,148,391,458,770,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
QPDFObjectHandle::setObjectDescriptionFromInput( QPDFObjectHandle object, QPDF* context, std::string const& description, PointerHolder<InputSource> input, qpdf_offset_t offset) { object.setObjectDescription( context, input->getName() + ", " + description + " at offset " + QUtil::...
0
[ "CWE-399", "CWE-674" ]
qpdf
b4d6cf6836ce025ba1811b7bbec52680c7204223
334,668,883,921,846,070,000,000,000,000,000,000,000
10
Limit depth of nesting in direct objects (fixes #202) This fixes CVE-2018-9918.
int ext4_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { struct inode *inode = file_inode(vma->vm_file); int err; down_read(&EXT4_I(inode)->i_mmap_sem); err = filemap_fault(vma, vmf); up_read(&EXT4_I(inode)->i_mmap_sem); return err; }
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
152,455,331,178,243,200,000,000,000,000,000,000,000
11
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
static void put_reqs_available(struct kioctx *ctx, unsigned nr) { struct kioctx_cpu *kcpu; preempt_disable(); kcpu = this_cpu_ptr(ctx->cpu); kcpu->reqs_available += nr; while (kcpu->reqs_available >= ctx->req_batch * 2) { kcpu->reqs_available -= ctx->req_batch; atomic_add(ctx->req_batch, &ctx->reqs_available...
0
[ "CWE-399" ]
linux
d558023207e008a4476a3b7bb8706b2a2bf5d84f
222,834,293,112,086,900,000,000,000,000,000,000,000
15
aio: prevent double free in ioctx_alloc ioctx_alloc() calls aio_setup_ring() to allocate a ring. If aio_setup_ring() fails to do so it would call aio_free_ring() before returning, but ioctx_alloc() would call aio_free_ring() again causing a double free of the ring. This is easily reproducible from userspace. Signed-...
ex_z(exarg_T *eap) { char_u *x; long bigness; char_u *kind; int minus = 0; linenr_T start, end, curs, i; int j; linenr_T lnum = eap->line2; // Vi compatible: ":z!" uses display height, without a count uses // 'scroll' if (eap->forceit) bigness = Rows - 1; else if (!ONE_WI...
0
[ "CWE-416" ]
vim
37f47958b8a2a44abc60614271d9537e7f14e51a
316,747,656,473,474,130,000,000,000,000,000,000,000
132
patch 8.2.4253: using freed memory when substitute with function call Problem: Using freed memory when substitute uses a recursive function call. Solution: Make a copy of the substitute text.
base_context::base_context() { set_acceleration_functions(de265_acceleration_AUTO); }
0
[ "CWE-416" ]
libde265
f538254e4658ef5ea4e233c2185dcbfd165e8911
181,458,493,577,876,600,000,000,000,000,000,000,000
4
fix streams where SPS image size changes without refreshing PPS (#299)
static int ext4_valid_extent(struct inode *inode, struct ext4_extent *ext) { ext4_fsblk_t block = ext4_ext_pblock(ext); int len = ext4_ext_get_actual_len(ext); ext4_lblk_t lblock = le32_to_cpu(ext->ee_block); /* * We allow neither: * - zero length * - overflow/wrap-around */ if (lblock + len <= lblock) ...
1
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
65,166,371,645,133,430,000,000,000,000,000,000,000
15
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...
static krb5_error_code hdb_samba4_set_sync(krb5_context context, struct HDB *db, int set_sync) { return 0; }
0
[ "CWE-288" ]
samba
484c6980befb86f7d81d708829ed4ceb819538eb
16,781,912,639,939,129,000,000,000,000,000,000,000
4
CVE-2022-32744 s4:kdc: Modify HDB plugin to only look up kpasswd principal This plugin is now only used by the kpasswd service. Thus, ensuring we only look up the kadmin/changepw principal means we can't be fooled into accepting tickets for other service principals. We make sure not to specify a specific kvno, to ensu...
\param reinit_path Force path to be recalculated (may take some time). \return Path containing the program files. **/ #if cimg_OS==2 inline const char* programfiles_path(const char *const user_path, const bool reinit_path) { static CImg<char> s_path; cimg::mutex(7); if (reinit_path) s_path.ass...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
189,147,604,983,129,800,000,000,000,000,000,000,000
24
Fix other issues in 'CImg<T>::load_bmp()'.
bgp_notify_send (struct peer *peer, u_char code, u_char sub_code) { bgp_notify_send_with_data (peer, code, sub_code, NULL, 0); }
0
[ "CWE-119" ]
quagga
5861739f8c38bc36ea9955e5cb2be2bf2f482d70
26,567,767,262,571,995,000,000,000,000,000,000,000
4
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...
BOOL security_decrypt(BYTE* data, int length, rdpRdp* rdp) { if (rdp->decrypt_use_count >= 4096) { security_key_update(rdp->decrypt_key, rdp->decrypt_update_key, rdp->rc4_key_len); crypto_rc4_free(rdp->rc4_decrypt_key); rdp->rc4_decrypt_key = crypto_rc4_init(rdp->decrypt_key, rdp->rc4_key_len); rdp->decrypt_u...
1
[ "CWE-476" ]
FreeRDP
7d58aac24fe20ffaad7bd9b40c9ddf457c1b06e7
205,657,723,076,012,400,000,000,000,000,000,000,000
14
security: add a NULL pointer check to fix a server crash.
static int compat_calc_match(struct ebt_entry_match *m, int *off) { *off += ebt_compat_match_offset(m->u.match, m->match_size); *off += ebt_compat_entry_padsize(); return 0; }
0
[ "CWE-787" ]
linux
b71812168571fa55e44cdd0254471331b9c4c4c6
83,456,839,401,766,640,000,000,000,000,000,000,000
6
netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets We need to make sure the offsets are not out of range of the total size. Also check that they are in ascending order. The WARN_ON triggered by syzkaller (it sets panic_on_warn) is changed to also bail out, no point in continuing parsing. Briefly tested...
DECLARESepPutFunc(putRGBAAseparate16bittile) { uint16 *wr = (uint16*) r; uint16 *wg = (uint16*) g; uint16 *wb = (uint16*) b; uint16 *wa = (uint16*) a; (void) img; (void) y; for( ; h > 0; --h) { for (x = 0; x < w; x++) *cp++ = PACK4(img->Bitdepth16To8[*wr++], img->Bitdepth16To8[*wg++], img->Bitd...
0
[ "CWE-787" ]
libtiff
4bb584a35f87af42d6cf09d15e9ce8909a839145
203,355,743,376,785,800,000,000,000,000,000,000,000
17
RGBA interface: fix integer overflow potentially causing write heap buffer overflow, especially on 32 bit builds. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16443. Credit to OSS Fuzz
SCTP_STATIC int sctp_setsockopt_bindx(struct sock* sk, struct sockaddr __user *addrs, int addrs_size, int op) { struct sockaddr *kaddrs; int err; int addrcnt = 0; int walk_size = 0; struct sockaddr *sa_addr; void *addr_buf; struct sctp_af *af; SCTP_DEBUG_PRINTK("sctp_setsocktopt_bindx: sk %...
0
[]
linux-2.6
5e739d1752aca4e8f3e794d431503bfca3162df4
254,491,089,165,664,000,000,000,000,000,000,000,000
76
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...
ConnStateData::stopSending(const char *error) { debugs(33, 4, HERE << "sending error (" << clientConnection << "): " << error << "; old receiving error: " << (stoppedReceiving() ? stoppedReceiving_ : "none")); if (const char *oldError = stoppedSending()) { debugs(33, 3, HERE << "a...
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
40,585,957,388,874,897,000,000,000,000,000,000,000
22
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
static PHP_GINIT_FUNCTION(xml) { xml_globals->default_encoding = "UTF-8"; }
0
[ "CWE-787" ]
php-src
7d163e8a0880ae8af2dd869071393e5dc07ef271
55,329,516,146,207,850,000,000,000,000,000,000,000
4
truncate results at depth of 255 to prevent corruption
_message_send_receipt(const char *const fulljid, const char *const message_id) { xmpp_ctx_t * const ctx = connection_get_ctx(); char *id = create_unique_id("receipt"); xmpp_stanza_t *message = xmpp_message_new(ctx, NULL, fulljid, id); free(id); xmpp_stanza_t *receipt = xmpp_stanza_new(ctx); xm...
0
[ "CWE-20", "CWE-346" ]
profanity
8e75437a7e43d4c55e861691f74892e666e29b0b
229,754,311,861,433,500,000,000,000,000,000,000,000
19
Add carbons from check
struct kern_ipc_perm *ipcctl_pre_down(struct ipc_namespace *ns, struct ipc_ids *ids, int id, int cmd, struct ipc64_perm *perm, int extra_perm) { struct kern_ipc_perm *ipcp; ipcp = ipcctl_pre_down_nolock(ns, ids, id, cmd, perm, extra_perm); if (IS_ERR(ipcp)) goto out; spin_lock(&ipcp->lock); ...
0
[ "CWE-703", "CWE-189" ]
linux
6062a8dc0517bce23e3c2f7d2fea5e22411269a3
84,834,754,559,869,450,000,000,000,000,000,000,000
14
ipc,sem: fine grained locking for semtimedop Introduce finer grained locking for semtimedop, to handle the common case of a program wanting to manipulate one semaphore from an array with multiple semaphores. If the call is a semop manipulating just one semaphore in an array with multiple semaphores, only take the loc...
int btrfs_ioctl_get_supported_features(void __user *arg) { static const struct btrfs_ioctl_feature_flags features[3] = { INIT_FEATURE_FLAGS(SUPP), INIT_FEATURE_FLAGS(SAFE_SET), INIT_FEATURE_FLAGS(SAFE_CLEAR) }; if (copy_to_user(arg, &features, sizeof(features))) return -EFAULT; return 0; }
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
261,444,287,984,716,200,000,000,000,000,000,000,000
13
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...
static void GetRootMeanSquarePixelList(PixelList *pixel_list, MagickPixelPacket *pixel) { MagickRealType sum; register SkipList *list; register ssize_t channel; size_t color; ssize_t count; unsigned short channels[ListChannels]; /* Find the root mean square value for ea...
0
[ "CWE-119", "CWE-787" ]
ImageMagick6
91e58d967a92250439ede038ccfb0913a81e59fe
136,641,173,214,208,860,000,000,000,000,000,000,000
45
https://github.com/ImageMagick/ImageMagick/issues/1615
static inline void drop_fpu(struct task_struct *tsk) { /* * Forget coprocessor state.. */ preempt_disable(); tsk->thread.fpu_counter = 0; __drop_fpu(tsk); clear_used_math(); preempt_enable(); }
0
[ "CWE-284", "CWE-264" ]
linux
26bef1318adc1b3a530ecc807ef99346db2aa8b0
239,937,444,810,003,900,000,000,000,000,000,000,000
11
x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround Before we do an EMMS in the AMD FXSAVE information leak workaround we need to clear any pending exceptions, otherwise we trap with a floating-point exception inside this code. Reported-by: halfdog <me@halfdog.net> Tested-by: Borislav Petkov <bp@suse.de> Link: h...
bool vmx_interrupt_blocked(struct kvm_vcpu *vcpu) { if (is_guest_mode(vcpu) && nested_exit_on_intr(vcpu)) return false; return !(vmx_get_rflags(vcpu) & X86_EFLAGS_IF) || (vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & (GUEST_INTR_STATE_STI | GUEST_INTR_STATE_MOV_SS)); }
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
177,415,953,467,357,200,000,000,000,000,000,000,000
9
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
nautilus_file_get_name (NautilusFile *file) { return g_strdup (eel_ref_str_peek (file->details->name)); }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
132,610,232,748,099,610,000,000,000,000,000,000,000
4
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-...
checkOpenEXRFile(const char* fileName, bool reduceMemory,bool reduceTime) { return runChecks( fileName , reduceMemory , reduceTime ); }
0
[ "CWE-787" ]
openexr
ae6d203892cc9311917a7f4f05354ef792b3e58e
317,615,714,893,969,300,000,000,000,000,000,000,000
4
Handle xsampling and bad seekg() calls in exrcheck (#872) * fix exrcheck xsampling!=1 Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> * fix handling bad seekg() calls in exrcheck Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> * fix deeptile detection in multipart files Signed-off-by: Peter Hillma...
bool git_path_does_fs_decompose_unicode(const char *root) { GIT_UNUSED(root); return false; }
0
[ "CWE-20", "CWE-706" ]
libgit2
3f7851eadca36a99627ad78cbe56a40d3776ed01
307,914,677,996,329,860,000,000,000,000,000,000,000
5
Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS A little-known feature of NTFS is that it offers to store metadata in so-called "Alternate Data Streams" (inspired by Apple's "resource forks") that are copied together with the file they are associated with. These Alternate Data Streams can be accessed ...
xmlZMemBuffExtend( xmlZMemBuffPtr buff, size_t ext_amt ) { int rc = -1; size_t new_size; size_t cur_used; unsigned char * tmp_ptr = NULL; if ( buff == NULL ) return ( -1 ); else if ( ext_amt == 0 ) return ( 0 ); cur_used = buff->zctrl.next_out - buff->zbuff; new_size = buff->s...
1
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
66,621,654,187,306,550,000,000,000,000,000,000,000
45
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
hostkey_method_ssh_ecdsa_signv(LIBSSH2_SESSION * session, unsigned char **signature, size_t *signature_len, int veccount, const struct iovec datavec[], void **abstra...
0
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
168,715,991,971,787,410,000,000,000,000,000,000,000
26
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...
void mp_buf_free(lua_State *L, mp_buf *buf) { mp_realloc(L, buf->b, buf->len + buf->free, 0); /* realloc to 0 = free */ mp_realloc(L, buf, sizeof(*buf), 0); }
0
[ "CWE-119", "CWE-787" ]
redis
52a00201fca331217c3b4b8b634f6a0f57d6b7d3
314,018,632,086,058,500,000,000,000,000,000,000,000
4
Security: fix Lua cmsgpack library stack overflow. During an auditing effort, the Apple Vulnerability Research team discovered a critical Redis security issue affecting the Lua scripting part of Redis. -- Description of the problem Several years ago I merged a pull request including many small changes at the Lua Msg...
static long kvm_s390_guest_sida_op(struct kvm_vcpu *vcpu, struct kvm_s390_mem_op *mop) { void __user *uaddr = (void __user *)mop->buf; int r = 0; if (mop->flags || !mop->size) return -EINVAL; if (mop->size + mop->sida_offset < mop->size) return -EINVAL; if (mop->size + mop->sida_offset > sida_size(vcpu...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
116,578,996,635,341,920,000,000,000,000,000,000,000
28
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...
Sequence(std::vector<std::shared_ptr<Ope>> &&opes) : opes_(opes) {}
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
771,277,851,122,894,000,000,000,000,000,000,000
1
Fix #122
static const char* format_s() { return "%s"; }
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
221,818,253,125,505,400,000,000,000,000,000,000,000
1
Fix other issues in 'CImg<T>::load_bmp()'.
static struct sock *llc_lookup_dgram(struct llc_sap *sap, const struct llc_addr *laddr) { struct sock *rc; struct hlist_nulls_node *node; int slot = llc_sk_laddr_hashfn(sap, laddr); struct hlist_nulls_head *laddr_hb = &sap->sk_laddr_hash[slot]; rcu_read_lock_bh(); again: sk_nulls_for_each_rcu(rc, node, ...
0
[ "CWE-20", "CWE-401" ]
linux
8b74d439e1697110c5e5c600643e823eb1dd0762
95,772,579,997,729,260,000,000,000,000,000,000,000
35
net/llc: avoid BUG_ON() in skb_orphan() It seems nobody used LLC since linux-3.12. Fortunately fuzzers like syzkaller still know how to run this code, otherwise it would be no fun. Setting skb->sk without skb->destructor leads to all kinds of bugs, we now prefer to be very strict about it. Ideally here we would use...
void PSOutputDev::cvtFunction(Function *func) { SampledFunction *func0; ExponentialFunction *func2; StitchingFunction *func3; PostScriptFunction *func4; int thisFunc, m, n, nSamples, i, j, k; switch (func->getType()) { case -1: // identity writePS("{}\n"); break; case 0: // sampled fu...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
135,564,037,139,989,370,000,000,000,000,000,000,000
151
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
const char * cli_get_last_virus_str(const cli_ctx * ctx) { const char * ret; if ((ret = cli_get_last_virus(ctx))) return ret; return ""; }
0
[]
clamav-devel
167c0079292814ec5523d0b97a9e1b002bf8819b
75,222,859,842,360,630,000,000,000,000,000,000,000
7
fix 0.99.3 false negative of virus Pdf.Exploit.CVE_2016_1046-1.
perf_lock_task_context(struct task_struct *task, int ctxn, unsigned long *flags) { struct perf_event_context *ctx; retry: /* * One of the few rules of preemptible RCU is that one cannot do * rcu_read_unlock() while holding a scheduler (or nested) lock when * part of the read side critical section was irqs-enab...
0
[ "CWE-362", "CWE-125" ]
linux
321027c1fe77f892f4ea07846aeae08cefbbb290
53,432,108,112,823,630,000,000,000,000,000,000,000
49
perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race Di Shen reported a race between two concurrent sys_perf_event_open() calls where both try and move the same pre-existing software group into a hardware context. The problem is exactly that described in commit: f63a8daa5812 ("perf: Fix event->ctx...
static int appendDynamic(dynamicPtr * dp, const void *src, int size) { int bytesNeeded; char *tmp; if(!dp->dataGood) { return FALSE; } /* bytesNeeded = dp->logicalSize + size; */ bytesNeeded = dp->pos + size; if(bytesNeeded > dp->realSize) { /* 2.0.21 */ if(!dp->freeOK) { return FALSE; } if(over...
0
[ "CWE-119", "CWE-787" ]
libgd
53110871935244816bbb9d131da0bccff734bfe9
53,218,732,506,537,070,000,000,000,000,000,000,000
43
Avoid potentially dangerous signed to unsigned conversion We make sure to never pass a negative `rlen` as size to memcpy(). See also <https://bugs.php.net/bug.php?id=73280>. Patch provided by Emmanuel Law.
qb_ipc_us_recv_at_most(struct qb_ipc_one_way *one_way, void *msg, size_t len, int32_t timeout) { int32_t result; int32_t final_rc = 0; int32_t to_recv = 0; char *data = msg; struct ipc_us_control *ctl = NULL; int32_t time_waited = 0; int32_t time_to_wait = timeout; if (timeout == -1) { time_to_wait ...
0
[ "CWE-59" ]
libqb
e322e98dc264bc5911d6fe1d371e55ac9f95a71e
93,453,098,895,810,540,000,000,000,000,000,000,000
77
ipc: use O_EXCL on SHM files, and randomize the names Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
static int sig_ignored(struct task_struct *t, int sig, int from_ancestor_ns) { /* * Blocked signals are never ignored, since the * signal handler may change by the time it is * unblocked. */ if (sigismember(&t->blocked, sig) || sigismember(&t->real_blocked, sig)) return 0; if (!sig_task_ignored(t, sig, fr...
0
[]
linux-2.6
0083fc2c50e6c5127c2802ad323adf8143ab7856
56,020,556,380,315,860,000,000,000,000,000,000,000
18
do_sigaltstack: avoid copying 'stack_t' as a structure to user space Ulrich Drepper correctly points out that there is generally padding in the structure on 64-bit hosts, and that copying the structure from kernel to user space can leak information from the kernel stack in those padding bytes. Avoid the whole issue b...
int in_caplist(int cap, struct lxc_list *caps) { struct lxc_list *iterator; int capid; lxc_list_for_each(iterator, caps) { capid = parse_cap(iterator->elem); if (capid == cap) return 1; } return 0; }
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
170,730,645,541,108,340,000,000,000,000,000,000,000
13
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
static void sub_remove(struct idr *idp, int shift, int id) { struct idr_layer *p = idp->top; struct idr_layer **pa[MAX_LEVEL]; struct idr_layer ***paa = &pa[0]; struct idr_layer *to_free; int n; *paa = NULL; *++paa = &idp->top; while ((shift > 0) && p) { n = (id >> shift) & IDR_MASK; __clear_bit(n, &p->bi...
0
[]
linux
2dcb22b346be7b7b7e630a8970d69cf3f1111ec1
285,481,430,249,634,560,000,000,000,000,000,000,000
36
idr: fix backtrack logic in idr_remove_all Currently idr_remove_all will fail with a use after free error if idr::layers is bigger than 2, which on 32 bit systems corresponds to items more than 1024. This is due to stepping back too many levels during backtracking. For simplicity let's assume that IDR_BITS=1 -> we h...
TEST(Random, FixedSeed) { // clang-format off struct ConstantRNG { typedef uint32_t result_type; result_type operator()() { return 4; // chosen by fair dice roll. // guaranteed to be random. } static constexpr result_type min() { return std::numeric_limits<result_type>::m...
0
[ "CWE-119", "CWE-787" ]
folly
8e927ee48b114c8a2f90d0cbd5ac753795a6761f
248,597,193,952,926,570,000,000,000,000,000,000,000
28
Flush secureRandom buffer on fork Summary: On fork, flush the secureRandom buffer, so that we don't share entropy between the parent and child. Reviewed By: ricklavoie Differential Revision: D9196474 fbshipit-source-id: 12ff8488d814466186df61328a5f1d4000beb27f
delegpt_set_name(struct delegpt* dp, struct regional* region, uint8_t* name) { log_assert(!dp->dp_type_mlc); dp->namelabs = dname_count_size_labels(name, &dp->namelen); dp->name = regional_alloc_init(region, name, dp->namelen); return dp->name != 0; }
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
259,026,295,615,259,600,000,000,000,000,000,000,000
7
- CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. - CVE-2020-12663 Malformed answers from upstream name servers can be used to make Unbound unresponsive.
bash_default_completion (text, start, end, qc, compflags) const char *text; int start, end, qc, compflags; { char **matches, *t; matches = (char **)NULL; /* New posix-style command substitution or variable name? */ if (!matches && *text == '$') { if (qc != '\'' && text[1] == '(') /* ) */ ...
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
306,731,397,501,749,000,000,000,000,000,000,000,000
116
Bash-4.4 patch 7
static int journal_unmap_buffer(journal_t *journal, struct buffer_head *bh, int partial_page) { transaction_t *transaction; struct journal_head *jh; int may_free = 1; BUFFER_TRACE(bh, "entry"); /* * It is safe to proceed here without the j_list_lock because the * buffers cannot be stolen by try_to_free_b...
0
[ "CWE-416" ]
linux
cc16eecae687912238ee6efbff71ad31e2bc414e
191,878,371,301,700,050,000,000,000,000,000,000,000
161
jbd2: fix use-after-free of transaction_t race jbd2_journal_wait_updates() is called with j_state_lock held. But if there is a commit in progress, then this transaction might get committed and freed via jbd2_journal_commit_transaction() -> jbd2_journal_free_transaction(), when we release j_state_lock. So check for jou...
static void add_pixels8_c(uint8_t *av_restrict pixels, int16_t *block, int line_size) { int i; for(i=0;i<8;i++) { pixels[0] += block[0]; pixels[1] += block[1]; pixels[2] += block[2]; pixels[3] += block[3]; pixels[4] += ...
0
[ "CWE-703", "CWE-189" ]
FFmpeg
454a11a1c9c686c78aa97954306fb63453299760
102,142,874,984,833,940,000,000,000,000,000,000,000
19
avcodec/dsputil: fix signedness in sizeof() comparissions Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
MagickExport Image *SampleImage(const Image *image,const size_t columns, const size_t rows,ExceptionInfo *exception) { #define SampleImageTag "Sample/Image" CacheView *image_view, *sample_view; Image *sample_image; MagickBooleanType status; MagickOffsetType progress; register ssize...
0
[ "CWE-369" ]
ImageMagick
43539e67a47d2f8de832d33a5b26dc2a7a12294f
163,912,684,132,589,960,000,000,000,000,000,000,000
172
https://github.com/ImageMagick/ImageMagick/issues/1718
char *get_interface_name(int index) { struct ifreq ifr; int sk, err; if (index < 0) return NULL; sk = socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0); if (sk < 0) { perror("Open socket error"); return NULL; } memset(&ifr, 0, sizeof(ifr)); ifr.ifr_ifindex = index; err = ioctl(sk, SIOCGIFNAME, &ifr); if...
0
[]
connman
58d397ba74873384aee449690a9070bacd5676fa
95,917,689,038,780,250,000,000,000,000,000,000,000
28
gdhcp: Avoid reading invalid data in dhcp_get_option
static int check_revocation(X509_STORE_CTX *ctx) { int i = 0, last = 0, ok = 0; if (!(ctx->param->flags & X509_V_FLAG_CRL_CHECK)) return 1; if (ctx->param->flags & X509_V_FLAG_CRL_CHECK_ALL) last = sk_X509_num(ctx->chain) - 1; else { /* If checking CRL paths this isn't the EE cer...
0
[]
openssl
33cc5dde478ba5ad79f8fd4acd8737f0e60e236e
95,159,220,083,980,590,000,000,000,000,000,000,000
21
Compat self-signed trust with reject-only aux data When auxiliary data contains only reject entries, continue to trust self-signed objects just as when no auxiliary data is present. This makes it possible to reject specific uses without changing what's accepted (and thus overring the underlying EKU). Added new suppo...
bool freeze_workqueues_busy(void) { bool busy = false; struct workqueue_struct *wq; struct pool_workqueue *pwq; mutex_lock(&wq_pool_mutex); WARN_ON_ONCE(!workqueue_freezing); list_for_each_entry(wq, &workqueues, list) { if (!(wq->flags & WQ_FREEZABLE)) continue; /* * nr_active is monotonically decrea...
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
178,242,711,808,574,470,000,000,000,000,000,000,000
32
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
xfs_attr_set( struct xfs_inode *dp, const unsigned char *name, unsigned char *value, int valuelen, int flags) { struct xfs_mount *mp = dp->i_mount; struct xfs_buf *leaf_bp = NULL; struct xfs_da_args args; struct xfs_defer_ops dfops; struct xfs_trans_res tres; xfs_fsblock_t firstblock; int rsvd = (f...
0
[ "CWE-241", "CWE-754" ]
linux
7b38460dc8e4eafba06c78f8e37099d3b34d473c
165,674,506,444,437,960,000,000,000,000,000,000,000
187
xfs: don't fail when converting shortform attr to long form during ATTR_REPLACE Kanda Motohiro reported that expanding a tiny xattr into a large xattr fails on XFS because we remove the tiny xattr from a shortform fork and then try to re-add it after converting the fork to extents format having not removed the ATTR_RE...
void AES128GCM_OnWireTxHandler::reset_tx_handler( std::initializer_list<std::uint32_t> update_size_sequence) { if (nonce == initial_nonce) { if (used_initial_nonce) { throw ceph::crypto::onwire::TxHandlerError("out of nonces"); } used_initial_nonce = true; } if(1 != EVP_EncryptInit_ex(ectx.ge...
0
[ "CWE-323" ]
ceph
dfd1d81cec62e21e21696dc87d4db5f920e51a67
159,294,792,468,414,920,000,000,000,000,000,000,000
20
msg/async/crypto_onwire: fix endianness of nonce_t As a AES-GCM IV, nonce_t is implicitly shared between server and client. Currently, if their endianness doesn't match, they are unable to communicate in secure mode because each gets its own idea of what the next nonce should be after the counter is incremented. Sev...
static int fanout_add(struct sock *sk, u16 id, u16 type_flags) { struct packet_rollover *rollover = NULL; struct packet_sock *po = pkt_sk(sk); struct packet_fanout *f, *match; u8 type = type_flags & 0xff; u8 flags = type_flags >> 8; int err; switch (type) { case PACKET_FANOUT_ROLLOVER: if (type_flags & PACKE...
0
[ "CWE-362" ]
linux
008ba2a13f2d04c947adc536d19debb8fe66f110
7,990,350,182,092,858,000,000,000,000,000,000,000
118
packet: hold bind lock when rebinding to fanout hook Packet socket bind operations must hold the po->bind_lock. This keeps po->running consistent with whether the socket is actually on a ptype list to receive packets. fanout_add unbinds a socket and its packet_rcv/tpacket_rcv call, then binds the fanout object to rec...
xsltCheckTopLevelElement(xsltStylesheetPtr style, xmlNodePtr inst, int err) { xmlNodePtr parent; if ((style == NULL) || (inst == NULL) || (inst->ns == NULL)) return(-1); parent = inst->parent; if (parent == NULL) { if (err) { xsltTransformError(NULL, style, inst, "internal pr...
0
[]
libxslt
7ca19df892ca22d9314e95d59ce2abdeff46b617
30,953,478,850,592,280,000,000,000,000,000,000,000
29
Fix for type confusion in preprocessing attributes CVE-2015-7995 http://www.openwall.com/lists/oss-security/2015/10/27/10 We need to check that the parent node is an element before dereferencing its namespace
hb_ot_layout_table_get_script_count (hb_ot_layout_t *layout, hb_ot_layout_table_type_t table_type) { const GSUBGPOS &g = get_gsubgpos_table (layout, table_type); return g.get_script_count (); }
0
[]
pango
336bb3201096bdd0494d29926dd44e8cca8bed26
261,130,101,278,912,050,000,000,000,000,000,000,000
7
[HB] Remove all references to the old code!
int kvm_read_guest_atomic(struct kvm *kvm, gpa_t gpa, void *data, unsigned long len) { int r; unsigned long addr; gfn_t gfn = gpa >> PAGE_SHIFT; int offset = offset_in_page(gpa); addr = gfn_to_hva(kvm, gfn); if (kvm_is_error_hva(addr)) return -EFAULT; pagefault_disable(); r = __copy_from_user_inatomic(d...
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
335,575,670,320,034,100,000,000,000,000,000,000,000
18
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...