func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void add_label_addr(compiler_common *common, sljit_uw *update_addr) { DEFINE_COMPILER; label_addr_list *label_addr; label_addr = sljit_alloc_memory(compiler, sizeof(label_addr_list)); if (label_addr == NULL) return; label_addr->label = LABEL(); label_addr->update_addr = update_addr; label_addr->next = common-...
0
[ "CWE-125" ]
php-src
8947fd9e9fdce87cd6c59817b1db58e789538fe9
40,783,796,136,574,407,000,000,000,000,000,000,000
13
Fix #78338: Array cross-border reading in PCRE We backport r1092 from pcre2.
void setup_servers(GArray *const servers, const gchar *const modernaddr, const gchar *const modernport) { int i; struct sigaction sa; int want_modern=0; for(i=0;i<servers->len;i++) { GError *gerror = NULL; SERVER *server = &g_array_index(servers, SERVER, i); ...
0
[ "CWE-399", "CWE-310" ]
nbd
741495cb08503fd32a9d22648e63b64390c601f4
132,737,004,326,377,300,000,000,000,000,000,000,000
51
nbd-server: handle modern-style negotiation in a child process Previously, the modern style negotiation was carried out in the root server (listener) process before forking the actual client handler. This made it possible for a malfunctioning or evil client to terminate the root process simply by querying a non-existe...
static void zipfilePutU32(u8 *aBuf, u32 val){ aBuf[0] = val & 0xFF; aBuf[1] = (val>>8) & 0xFF; aBuf[2] = (val>>16) & 0xFF; aBuf[3] = (val>>24) & 0xFF; }
0
[ "CWE-434" ]
sqlite
54d501092d88c0cf89bec4279951f548fb0b8618
210,095,237,811,339,700,000,000,000,000,000,000,000
6
Fix the zipfile extension so that INSERT works even if the pathname of the file being inserted is a NULL. Bug discovered by the Yongheng and Rui fuzzer. FossilOrigin-Name: a80f84b511231204658304226de3e075a55afc2e3f39ac063716f7a57f585c06
static unsigned long __thp_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, loff_t off, unsigned long flags, unsigned long size) { loff_t off_end = off + len; loff_t off_align = round_up(off, size); unsigned long len_pad, ret; if (off_end <= off_align || (off_end - off_align) < size)...
0
[ "CWE-362" ]
linux
c444eb564fb16645c172d550359cb3d75fe8a040
79,736,766,588,957,930,000,000,000,000,000,000,000
35
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 ...
static int macsec_del_rxsa(struct sk_buff *skb, struct genl_info *info) { struct nlattr **attrs = info->attrs; struct net_device *dev; struct macsec_secy *secy; struct macsec_rx_sc *rx_sc; struct macsec_rx_sa *rx_sa; u8 assoc_num; struct nlattr *tb_rxsc[MACSEC_RXSC_ATTR_MAX + 1]; struct nlattr *tb_sa[MACSEC_SA_...
0
[ "CWE-119" ]
net
5294b83086cc1c35b4efeca03644cf9d12282e5b
312,413,900,295,282,860,000,000,000,000,000,000,000
40
macsec: dynamically allocate space for sglist We call skb_cow_data, which is good anyway to ensure we can actually modify the skb as such (another error from prior). Now that we have the number of fragments required, we can safely allocate exactly that amount of memory. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 80...
Status AuthorizationSession::checkAuthForPrivilege(const Privilege& privilege) { if (_externalState->shouldIgnoreAuthChecks()) return Status::OK(); return _probeForPrivilege(privilege); }
0
[ "CWE-264" ]
mongo
c5ad04549e40b1069029026081d9324e9e06156c
338,203,015,638,660,370,000,000,000,000,000,000,000
6
SERVER-9983 Do not needlessly lock when looking up privileges for the __system@local user. Uncorrected, this can cause replica set heartbeats to stall behind operations that hold the read lock for a long time.
static const char *blob2string_talloc(TALLOC_CTX *mem_ctx, DATA_BLOB blob) { char *result = talloc_array(mem_ctx, char, blob.length+1); memcpy(result, blob.data, blob.length); result[blob.length] = '\0'; return result; }
0
[ "CWE-399" ]
samba
530d50a1abdcdf4d1775652d4c456c1274d83d8d
133,337,586,528,666,390,000,000,000,000,000,000,000
8
CVE-2015-7540: s4: libcli: ldap message - Ensure all asn1_XX returns are checked. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): F...
static void selinux_warning(struct libmnt_context *cxt, const char *tgt) { if (tgt && mnt_context_is_verbose(cxt) && is_selinux_enabled() > 0) { security_context_t raw = NULL, def = NULL; if (getfilecon(tgt, &raw) > 0 && security_get_initial_context("file", &def) == 0) { if (!selinux_file_context_cmp(ra...
0
[ "CWE-200" ]
util-linux
5ebbc3865d1e53ef42e5f121c41faab23dd59075
33,541,481,703,892,060,000,000,000,000,000,000,000
22
mount: sanitize paths from non-root users $ mount /root/.ssh/../../dev/sda2 mount: only root can mount UUID=17bc65ec-4125-4e7c-8a7d-e2795064c736 on /boot this is too promiscuous. It seems better to ignore on command line specified paths which are not resolve-able for non-root users. Fixed version: $ mount /root...
int Item::save_date_in_field(Field *field) { MYSQL_TIME ltime; if (get_date(&ltime, sql_mode_for_dates(field->table->in_use))) return set_field_to_null_with_conversions(field, 0); field->set_notnull(); return field->store_time_dec(&ltime, decimals); }
0
[ "CWE-89" ]
server
b5e16a6e0381b28b598da80b414168ce9a5016e5
260,570,280,334,869,400,000,000,000,000,000,000,000
8
MDEV-26061 MariaDB server crash at Field::set_default * Item_default_value::fix_fields creates a copy of its argument's field. * Field::default_value is changed when its expression is prepared in unpack_vcol_info_from_frm() This means we must unpack any vcol expression that includes DEFAULT(x) strictly after unpack...
static bool _gnutls_has_cert_credentials(gnutls_session_t session, gnutls_certificate_type_t cert_type) { unsigned i; unsigned cert_found = 0; gnutls_certificate_credentials_t cred; /* First, check for certificate credentials. If we have no certificate * credentials set then we don't support certificates a...
0
[]
gnutls
3d7fae761e65e9d0f16d7247ee8a464d4fe002da
220,751,995,143,344,830,000,000,000,000,000,000,000
36
valgrind: check if session ticket key is used without initialization This adds a valgrind client request for session->key.session_ticket_key to make sure that it is not used without initialization. Signed-off-by: Daiki Ueno <ueno@gnu.org>
sparse_fixup_header (struct tar_stat_info *st) { struct tar_sparse_file file; if (!tar_sparse_init (&file)) return false; file.stat_info = st; return tar_sparse_fixup_header (&file); }
0
[]
tar
c15c42ccd1e2377945fd0414eca1a49294bff454
163,255,202,310,333,920,000,000,000,000,000,000,000
9
Fix CVE-2018-20482 * NEWS: Update. * src/sparse.c (sparse_dump_region): Handle short read condition. (sparse_extract_region,check_data_region): Fix dumped_size calculation. Handle short read condition. (pax_decode_header): Fix dumped_size calculation. * tests/Makefile.am: Add new testcases. * tests/testsuite.at: Likew...
changed_window_setting(void) { changed_window_setting_win(curwin); }
0
[ "CWE-122" ]
vim
777e7c21b7627be80961848ac560cb0a9978ff43
261,533,461,055,875,870,000,000,000,000,000,000,000
4
patch 8.2.3564: invalid memory access when scrolling without valid screen Problem: Invalid memory access when scrolling without a valid screen. Solution: Do not set VALID_BOTLINE in w_valid.
rf64_command (SF_PRIVATE *psf, int command, void * UNUSED (data), int datasize) { WAVLIKE_PRIVATE *wpriv ; if ((wpriv = psf->container_data) == NULL) return SFE_INTERNAL ; switch (command) { case SFC_WAVEX_SET_AMBISONIC : if ((SF_CONTAINER (psf->sf.format)) == SF_FORMAT_WAVEX) { if (datasize == SF_AMBISONI...
0
[ "CWE-476" ]
libsndfile
6f3266277bed16525f0ac2f0f03ff4626f1923e5
324,834,320,821,303,300,000,000,000,000,000,000,000
36
Fix max channel count bug The code was allowing files to be written with a channel count of exactly `SF_MAX_CHANNELS` but was failing to read some file formats with the same channel count.
int OBJ_new_nid(int num) { int i; i=new_nid; new_nid+=num; return(i); }
0
[ "CWE-200" ]
openssl
0042fb5fd1c9d257d713b15a1f45da05cf5c1c87
183,174,148,037,879,750,000,000,000,000,000,000,000
8
Fix OID handling: - Upon parsing, reject OIDs with invalid base-128 encoding. - Always NUL-terminate the destination buffer in OBJ_obj2txt printing function. CVE-2014-3508 Reviewed-by: Dr. Stephen Henson <steve@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w) { return ((a->top == 1) && (a->d[0] == w)) || ((w == 0) && (a->top == 0)); }
0
[ "CWE-310" ]
openssl
aab7c770353b1dc4ba045938c8fb446dd1c4531e
272,023,311,622,811,720,000,000,000,000,000,000,000
4
Elliptic curve scalar multiplication with timing attack defenses Co-authored-by: Nicola Tuveri <nic.tuv@gmail.com> Co-authored-by: Cesar Pereida Garcia <cesar.pereidagarcia@tut.fi> Co-authored-by: Sohaib ul Hassan <soh.19.hassan@gmail.com> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt...
int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, int n) { int al = -1; if (ssl_scan_clienthello_tlsext(s, p, d, n, &al) <= 0) { ssl3_send_alert(s,SSL3_AL_FATAL,al); return 0; } if (ssl_check_clienthello_tlsext_early(s) <= 0) { SSLerr(SSL_F_SSL_PARSE_CLIENTHELLO_TLSEXT,S...
0
[]
openssl
80bd7b41b30af6ee96f519e629463583318de3b0
62,478,323,555,970,780,000,000,000,000,000,000,000
16
Fix SRP ciphersuite DoS vulnerability. If a client attempted to use an SRP ciphersuite and it had not been set up correctly it would crash with a null pointer read. A malicious server could exploit this in a DoS attack. Thanks to Joonas Kuorilehto and Riku Hietamäki from Codenomicon for reporting this issue. CVE-201...
lyd_dup_to_ctx(const struct lyd_node *node, int options, struct ly_ctx *ctx) { struct ly_ctx *log_ctx; struct lys_node_list *slist; struct lys_node *schema; const char *yang_data_name; const struct lys_module *trg_mod; const struct lyd_node *next, *elem; struct lyd_node *ret, *parent, *key, ...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
277,623,544,653,958,340,000,000,000,000,000,000,000
161
schema tree BUGFIX do not check features while still resolving schema Fixes #723
sendAssociationACTCP(PRIVATE_NETWORKKEY ** /*network*/, DUL_ASSOCIATESERVICEPARAMETERS * params, PRIVATE_ASSOCIATIONKEY ** association) { PRV_ASSOCIATEPDU associateReply; unsigned char buffer[4096], *b; unsigned long length = 0; int nbytes; ...
0
[ "CWE-415", "CWE-703", "CWE-401" ]
dcmtk
a9697dfeb672b0b9412c00c7d36d801e27ec85cb
207,937,307,665,909,300,000,000,000,000,000,000,000
63
Fixed poss. NULL pointer dereference/double free. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches.
wb_write_padding_to_temp(struct archive_write *a, int64_t csize) { size_t ns; int ret; ns = (size_t)(csize % LOGICAL_BLOCK_SIZE); if (ns != 0) ret = write_null(a, LOGICAL_BLOCK_SIZE - ns); else ret = ARCHIVE_OK; return (ret); }
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
179,304,167,079,388,200,000,000,000,000,000,000,000
12
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
TEST_P(Http2IntegrationTest, PauseAndResume) { config_helper_.addFilter(R"EOF( name: stop-iteration-and-continue-filter typed_config: "@type": type.googleapis.com/google.protobuf.Empty )EOF"); initialize(); // Send a request with a bit of data, to trigger the filter pausing. codec_client_ = makeHttpC...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
212,782,544,514,862,050,000,000,000,000,000,000,000
29
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
int kvm_vcpu_read_guest_page(struct kvm_vcpu *vcpu, gfn_t gfn, void *data, int offset, int len) { struct kvm_memory_slot *slot = kvm_vcpu_gfn_to_memslot(vcpu, gfn); return __kvm_read_guest_page(slot, gfn, data, offset, len); }
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
48,681,750,286,836,410,000,000,000,000,000,000,000
7
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...
m_wnum0(union DateData *x) { return m_wnumx(x, 0); }
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
253,114,552,645,316,040,000,000,000,000,000,000,000
4
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
process_bmpcache(STREAM s) { RD_HBITMAP bitmap; uint16 cache_idx, size; uint8 cache_id, width, height, bpp, Bpp; uint8 *data, *bmpdata; uint16 bufsize, pad2, row_size, final_size; uint8 pad1; pad2 = row_size = final_size = 0xffff; /* Shut the compiler up */ in_uint8(s, cache_id); in_uint8(s, pad1); /* pad */...
0
[ "CWE-119", "CWE-125", "CWE-703", "CWE-787" ]
rdesktop
4dca546d04321a610c1835010b5dad85163b65e1
282,569,396,435,044,000,000,000,000,000,000,000,000
55
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix ...
push_compress_filter(IOBUF out,compress_filter_context_t *zfx,int algo) { push_compress_filter2(out,zfx,algo,0); }
0
[ "CWE-20" ]
gnupg
11fdfcf82bd8d2b5bc38292a29876e10770f4b0a
233,730,233,451,741,200,000,000,000,000,000,000,000
4
gpg: Avoid infinite loop in uncompressing garbled packets. * g10/compress.c (do_uncompress): Limit the number of extra FF bytes. -- A packet like (a3 01 5b ff) leads to an infinite loop. Using --max-output won't help if it is a partial packet. This patch actually fixes a regression introduced on 1999-05-31 (c34c676...
int iscsi_host_get_param(struct Scsi_Host *shost, enum iscsi_host_param param, char *buf) { struct iscsi_host *ihost = shost_priv(shost); int len; switch (param) { case ISCSI_HOST_PARAM_NETDEV_NAME: len = sprintf(buf, "%s\n", ihost->netdev); break; case ISCSI_HOST_PARAM_HWADDRESS: len = sprintf(buf, "%s...
1
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
237,465,948,536,785,450,000,000,000,000,000,000,000
22
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
g_printf(const char* format, ...) { va_list ap; va_start(ap, format); vfprintf(stdout, format, ap); va_end(ap); }
0
[]
xrdp
d8f9e8310dac362bb9578763d1024178f94f4ecc
116,741,048,580,027,840,000,000,000,000,000,000,000
8
move temp files from /tmp to /tmp/.xrdp
static unsigned int _db_node_put(struct db_arg_chain_tree **node) { unsigned int cnt = 0; struct db_arg_chain_tree *n = *node; struct db_arg_chain_tree *lvl_p, *lvl_n, *nxt_t, *nxt_f; if (n == NULL) return 0; if (--(n->refcnt) == 0) { lvl_p = n->lvl_prv; lvl_n = n->lvl_nxt; nxt_t = n->nxt_t; nxt_f = n-...
0
[]
libseccomp
c5bf78de480b32b324e0f511c88ce533ed280b37
32,375,957,131,557,100,000,000,000,000,000,000,000
53
db: fix 64-bit argument comparisons Our approach to doing 64-bit comparisons using 32-bit operators was just plain wrong, leading to a number of potential problems with filters that used the LT, GT, LE, or GE operators. This patch fixes this problem and a few other related issues that came to light in the course of f...
skip_regexp_err( char_u *startp, int delim, int magic) { char_u *p = skip_regexp(startp, delim, magic); if (*p != delim) { semsg(_("E654: missing delimiter after search pattern: %s"), startp); return NULL; } return p; }
0
[ "CWE-416" ]
vim
4c13e5e6763c6eb36a343a2b8235ea227202e952
2,944,884,189,721,515,000,000,000,000,000,000,000
14
patch 8.2.3949: using freed memory with /\%V Problem: Using freed memory with /\%V. Solution: Get the line again after getvvcol().
mbfl_filt_conv_wchar_big5(int c, mbfl_convert_filter *filter) { int k; int c1, s, c2; s = 0; if (c >= ucs_a1_big5_table_min && c < ucs_a1_big5_table_max) { s = ucs_a1_big5_table[c - ucs_a1_big5_table_min]; } else if (c >= ucs_a2_big5_table_min && c < ucs_a2_big5_table_max) { s = ucs_a2_big5_table[c - ucs_a2_b...
0
[ "CWE-125" ]
php-src
2bcbc95f033c31b00595ed39f79c3a99b4ed0501
205,414,411,795,607,670,000,000,000,000,000,000,000
80
Fix bug #79037 (global buffer-overflow in `mbfl_filt_conv_big5_wchar`)
int tls1_check_ec_tmp_key(SSL *s) { unsigned char curve_id[2]; EC_KEY *ec = s->cert->ecdh_tmp; if (s->cert->ecdh_tmp_auto) { /* Need a shared curve */ if (tls1_shared_curve(s, 0)) return 1; else return 0; } if (!ec) { if (s->cert->ecdh_tmp_cb) return 1; else return 0; } if (!tls1_set_ec...
0
[]
openssl
c70a1fee71119a9005b1f304a3bf47694b4a53ac
119,022,293,411,902,540,000,000,000,000,000,000,000
22
Reorganise supported signature algorithm extension processing. Only store encoded versions of peer and configured signature algorithms. Determine shared signature algorithms and cache the result along with NID equivalents of each algorithm. (backport from HEAD)
void fileblobDestructiveDestroy(fileblob *fb) { if (fb->fp && fb->fullname) { fclose(fb->fp); cli_dbgmsg("fileblobDestructiveDestroy: %s\n", fb->fullname); if (!fb->ctx || !fb->ctx->engine->keeptmp) cli_unlink(fb->fullname); free(fb->fullname); fb->fp = NULL...
0
[ "CWE-476" ]
clamav-devel
8bb3716be9c7ab7c6a3a1889267b1072f48af87b
322,289,945,985,742,900,000,000,000,000,000,000,000
17
fuzz-22348 null deref in egg utf8 conversion Corrected memory leaks and a null dereference in the egg utf8 conversion.
static struct net_device_stats *veth_get_stats(struct net_device *dev) { struct veth_priv *priv; int cpu; struct veth_net_stats *stats, total = {0}; priv = netdev_priv(dev); for_each_possible_cpu(cpu) { stats = per_cpu_ptr(priv->stats, cpu); total.rx_packets += stats->rx_packets; total.tx_packets += stats...
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
138,089,808,062,251,030,000,000,000,000,000,000,000
27
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
u_undoredo(int undo) { undoline_T *newarray = NULL; linenr_T oldsize; linenr_T newsize; linenr_T top, bot; linenr_T lnum; linenr_T newlnum = MAXLNUM; pos_T new_curpos = curwin->w_cursor; long i; u_entry_T *uep, *nuep; u_entry_T *newlist = NULL; int old_flags; int new_fl...
0
[ "CWE-787" ]
vim
338f1fc0ee3ca929387448fe464579d6113fa76a
205,839,010,820,832,670,000,000,000,000,000,000,000
300
patch 8.2.5023: substitute overwrites allocated buffer Problem: Substitute overwrites allocated buffer. Solution: Disallow undo when in a substitute command.
static double mp_lte(_cimg_math_parser& mp) { return (double)(_mp_arg(2)<=_mp_arg(3)); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
92,687,109,630,564,510,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.
static void __sctp_hash_endpoint(struct sctp_endpoint *ep) { struct sctp_ep_common *epb; struct sctp_hashbucket *head; epb = &ep->base; epb->hashent = sctp_ep_hashfn(epb->bind_addr.port); head = &sctp_ep_hashtable[epb->hashent]; sctp_write_lock(&head->lock); hlist_add_head(&epb->node, &head->chain); sctp_wri...
0
[ "CWE-362" ]
linux
ae53b5bd77719fed58086c5be60ce4f22bffe1c6
287,822,301,578,980,640,000,000,000,000,000,000,000
14
sctp: Fix another socket race during accept/peeloff There is a race between sctp_rcv() and sctp_accept() where we have moved the association from the listening socket to the accepted socket, but sctp_rcv() processing cached the old socket and continues to use it. The easy solution is to check for the socket mismatch ...
xfs_attr3_leaf_list_int( struct xfs_buf *bp, struct xfs_attr_list_context *context) { struct attrlist_cursor_kern *cursor; struct xfs_attr_leafblock *leaf; struct xfs_attr3_icleaf_hdr ichdr; struct xfs_attr_leaf_entry *entries; struct xfs_attr_leaf_entry *entry; int retval; int i; trace_xfs_attr_list...
0
[ "CWE-241", "CWE-19" ]
linux
8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59
232,540,709,880,185,370,000,000,000,000,000,000,000
120
xfs: remote attribute overwrite causes transaction overrun Commit e461fcb ("xfs: remote attribute lookups require the value length") passes the remote attribute length in the xfs_da_args structure on lookup so that CRC calculations and validity checking can be performed correctly by related code. This, unfortunately h...
static struct page *__get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid, struct page *parent, int start) { struct page *page; int err; if (!nid) return ERR_PTR(-ENOENT); f2fs_bug_on(sbi, check_nid_range(sbi, nid)); repeat: page = f2fs_grab_cache_page(NODE_MAPPING(sbi), nid, false); if (!page) return E...
0
[ "CWE-200", "CWE-362" ]
linux
30a61ddf8117c26ac5b295e1233eaa9629a94ca3
233,398,456,362,243,440,000,000,000,000,000,000,000
44
f2fs: fix race condition in between free nid allocator/initializer In below concurrent case, allocated nid can be loaded into free nid cache and be allocated again. Thread A Thread B - f2fs_create - f2fs_new_inode - alloc_nid - __insert_nid_to_list(ALLOC_NID_LIST) - f2fs_balance_fs_bg - build_free...
void Callback::apply(jpeg_compress_struct*) { this->called = true; }
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
66,347,300,277,149,445,000,000,000,000,000,000,000
4
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
*/ int xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr res) { if ((ctxt == NULL) || (res == NULL)) return(0); switch (res->type) { case XPATH_BOOLEAN: return(res->boolval); case XPATH_NUMBER: #if defined(__BORLANDC__) || (def...
0
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
202,559,511,875,155,340,000,000,000,000,000,000,000
33
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification
void kvm_reload_remote_mmus(struct kvm *kvm) { make_all_cpus_request(kvm, KVM_REQ_MMU_RELOAD); }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
286,678,547,184,573,320,000,000,000,000,000,000,000
4
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 ...
SPL_METHOD(SplHeap, recoverFromCorruption) { spl_heap_object *intern; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) { return; } intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC); intern->heap->flags = intern->heap->flags & ~SPL_HEAP_CORRUPTED; RETURN_TRUE; }
0
[]
php-src
1cbd25ca15383394ffa9ee8601c5de4c0f2f90e1
275,283,737,624,364,500,000,000,000,000,000,000,000
14
Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error
static VOID ParaNdis_DeviceFiltersUpdateAddresses(PARANDIS_ADAPTER *pContext) { u32 u32UniCastEntries = 0; pContext->CXPath.SendControlMessage(VIRTIO_NET_CTRL_MAC, VIRTIO_NET_CTRL_MAC_TABLE_SET, &u32UniCastEntries, sizeof(u32UniCastEntries), ...
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
27,914,425,374,980,466,000,000,000,000,000,000,000
10
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
action_folder_sizes_cb (GtkAction *action, EShellView *shell_view) { GtkWindow *parent; CamelSession *session; CamelStore *store = NULL; ESourceRegistry *registry; ESource *source; if (!get_ews_store_from_folder_tree (shell_view, NULL, &store)) return; g_return_if_fail (store != NULL); parent = GTK_WIND...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
307,638,780,610,833,880,000,000,000,000,000,000,000
26
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
int begin_new_exec(struct linux_binprm * bprm) { struct task_struct *me = current; int retval; /* Once we are committed compute the creds */ retval = bprm_creds_from_file(bprm); if (retval) return retval; /* * Ensure all future errors are fatal. */ bprm->point_of_no_return = true; /* * Make this the ...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
134,231,193,168,621,130,000,000,000,000,000,000,000
151
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
nfsd4_decode_putfh(struct nfsd4_compoundargs *argp, struct nfsd4_putfh *putfh) { DECODE_HEAD; READ_BUF(4); putfh->pf_fhlen = be32_to_cpup(p++); if (putfh->pf_fhlen > NFS4_FHSIZE) goto xdr_error; READ_BUF(putfh->pf_fhlen); SAVEMEM(putfh->pf_fhval, putfh->pf_fhlen); DECODE_TAIL; }
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
107,226,064,181,253,440,000,000,000,000,000,000,000
13
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
Http::ConnectionManagerListenerStats& listenerStats() override { return listener_->stats_; }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
38,555,703,320,022,520,000,000,000,000,000,000,000
1
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
set_fflags_platform(struct archive_write_disk *a, int fd, const char *name, mode_t mode, unsigned long set, unsigned long clear) { int r; const int sf_mask = 0 #ifdef SF_APPEND | SF_APPEND #endif #ifdef SF_ARCHIVED | SF_ARCHIVED #endif #ifdef SF_IMMUTABLE | SF_IMMUTABLE #endif #ifdef SF_NOUNLINK ...
1
[ "CWE-59" ]
libarchive
e2ad1a2c3064fa9eba6274b3641c4c1beed25c0b
165,816,415,274,936,900,000,000,000,000,000,000,000
66
Never follow symlinks when setting file flags on Linux When opening a file descriptor to set file flags on linux, ensure no symbolic links are followed. This fixes the case when an archive contains a directory entry followed by a symlink entry with the same path. The fixup code would modify file flags of the symlink t...
int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len, int noblock, int flags, int *addr_len) { struct inet_sock *inet = inet_sk(sk); struct sockaddr_in *sin = (struct sockaddr_in *)msg->msg_name; struct sk_buff *skb; unsigned int ulen; int peeked; int err; int is_udplite = IS_UDP...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
53,857,461,313,128,320,000,000,000,000,000,000,000
94
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
evbuffer_read(struct evbuffer *buf, evutil_socket_t fd, int howmuch) { struct evbuffer_chain **chainp; int n; int result; #ifdef USE_IOVEC_IMPL int nvecs, i, remaining; #else struct evbuffer_chain *chain; unsigned char *p; #endif EVBUFFER_LOCK(buf); if (buf->freeze_end) { result = -1; goto done; } n =...
0
[ "CWE-189" ]
libevent
841ecbd96105c84ac2e7c9594aeadbcc6fb38bc4
196,648,277,020,762,670,000,000,000,000,000,000,000
129
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 ...
TEST_P(Http2CodecImplTest, InvalidHeadersFrameAllowed) { stream_error_on_invalid_http_messaging_ = true; initialize(); MockStreamCallbacks request_callbacks; request_encoder_->getStream().addCallbacks(request_callbacks); ON_CALL(client_connection_, write(_, _)) .WillByDefault( Invoke([&](Buf...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
131,999,819,953,402,370,000,000,000,000,000,000,000
16
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
poppler_layers_iter_get_layer (PopplerLayersIter *iter) { Layer *layer; PopplerLayer *poppler_layer = nullptr; g_return_val_if_fail (iter != nullptr, NULL); layer = (Layer *)g_list_nth_data (iter->items, iter->index); if (layer->oc) { GList *rb_group = nullptr; rb_group = _poppler_document_get_...
0
[ "CWE-476" ]
poppler
f162ecdea0dda5dbbdb45503c1d55d9afaa41d44
97,105,525,231,888,280,000,000,000,000,000,000,000
17
Fix crash on missing embedded file Check whether an embedded file is actually present in the PDF and show warning in that case. https://bugs.freedesktop.org/show_bug.cgi?id=106137 https://gitlab.freedesktop.org/poppler/poppler/issues/236
static MagickBooleanType WriteMAPImage(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { MagickBooleanType status; register const Quantum *p; register ssize_t i, x; register unsigned char *q; size_t depth, packet_size; ssize_t y; unsigned char ...
1
[ "CWE-399", "CWE-119" ]
ImageMagick
eedd0c35bb2d8af7aa05f215689fdebd11633fa1
47,496,651,061,076,945,000,000,000,000,000,000,000
102
Prevent buffer overflow in SIXEL, PDB, MAP, and CALS coders (bug report from Donghai Zhu)
static void bt_free(struct blk_mq_bitmap_tags *bt) { kfree(bt->map); kfree(bt->bs); }
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
222,516,399,038,700,800,000,000,000,000,000,000,000
5
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
static void tipc_crypto_rcv_complete(struct net *net, struct tipc_aead *aead, struct tipc_bearer *b, struct sk_buff **skb, int err) { struct tipc_skb_cb *skb_cb = TIPC_SKB_CB(*skb); struct tipc_crypto *rx = aead->crypto; struct tipc_aead *tmp = NULL; struct tipc_ehdr *ehdr; struct tipc_node *n; ...
0
[ "CWE-20" ]
linux
fa40d9734a57bcbfa79a280189799f76c88f7bb0
235,575,391,160,867,340,000,000,000,000,000,000,000
105
tipc: fix size validations for the MSG_CRYPTO type The function tipc_crypto_key_rcv is used to parse MSG_CRYPTO messages to receive keys from other nodes in the cluster in order to decrypt any further messages from them. This patch verifies that any supplied sizes in the message body are valid for the received message...
bool parsingCanProduceNoopMatchNodes(const ExtensionsCallback& extensionsCallback, MatchExpressionParser::AllowedFeatureSet allowedFeatures) { return extensionsCallback.hasNoopExtensions() && (allowedFeatures & MatchExpressionParser::AllowedFeatures::kText || al...
0
[ "CWE-755" ]
mongo
c8ced6df8f620daaa2e539f192f2eef356c63e9c
205,153,685,117,547,100,000,000,000,000,000,000,000
6
SERVER-47773 Error consistently when tailable cursors and $near are used together
SYSCALL_DEFINE1(setfsuid, uid_t, uid) { const struct cred *old; struct cred *new; uid_t old_fsuid; kuid_t kuid; old = current_cred(); old_fsuid = from_kuid_munged(old->user_ns, old->fsuid); kuid = make_kuid(old->user_ns, uid); if (!uid_valid(kuid)) return old_fsuid; new = prepare_creds(); if (!new) ret...
0
[ "CWE-16", "CWE-79" ]
linux
2702b1526c7278c4d65d78de209a465d4de2885e
95,706,107,548,965,100,000,000,000,000,000,000,000
35
kernel/sys.c: fix stack memory content leak via UNAME26 Calling uname() with the UNAME26 personality set allows a leak of kernel stack contents. This fixes it by defensively calculating the length of copy_to_user() call, making the len argument unsigned, and initializing the stack buffer to zero (now technically unne...
TPMS_PCR_SELECTION_Unmarshal(TPMS_PCR_SELECTION *target, BYTE **buffer, INT32 *size) { TPM_RC rc = TPM_RC_SUCCESS; if (rc == TPM_RC_SUCCESS) { rc = TPMI_ALG_HASH_Unmarshal(&target->hash, buffer, size, NO); } if (rc == TPM_RC_SUCCESS) { rc = UINT8_Unmarshal(&target->sizeofSelect, buffer, size); ...
1
[ "CWE-787" ]
libtpms
f16250b35aff6995e540143a9858c9cf0d1f9573
199,171,232,907,328,070,000,000,000,000,000,000,000
21
tpm2: Reset TPM2B buffer sizes after test fails for valid buffer size Reset the buffer size indicator in a TPM2B type of buffer after it failed the test for the maximum buffer size it allows. This prevents having bad buffer sizes in memory that can come to haunt us when writing the volatile state for example. Signed-...
static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt, int rtx_timeout, int *start_timer) { struct list_head *lqueue; struct sctp_transport *transport = pkt->transport; sctp_xmit_t status; struct sctp_chunk *chunk, *chunk1; int fast_rtx; int error = 0; int timer = 0; int done = 0...
0
[]
linux
196d67593439b03088913227093e374235596e33
244,902,674,693,433,870,000,000,000,000,000,000,000
160
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec) { return ((exec->batch_start_offset | exec->batch_len) & 0x7) == 0; }
0
[ "CWE-189" ]
linux-2.6
ed8cd3b2cd61004cab85380c52b1817aca1ca49b
3,554,473,790,188,773,000,000,000,000,000,000,000
4
drm/i915: fix integer overflow in i915_gem_execbuffer2() On 32-bit systems, a large args->buffer_count from userspace via ioctl may overflow the allocation size, leading to out-of-bounds access. This vulnerability was introduced in commit 8408c282 ("drm/i915: First try a normal large kmalloc for the temporary exec bu...
static void displayopenfailure(const char * const name) { char buffer[PATH_MAX + 42U]; const int e = errno; if (SNCHECK(snprintf(buffer, sizeof buffer, MSG_OPEN_FAILURE, name), sizeof buffer)) { _EXIT(EXIT_FAILURE); } errno = e; error(550, buffer); }
0
[ "CWE-434" ]
pure-ftpd
37ad222868e52271905b94afea4fc780d83294b4
218,822,404,096,549,430,000,000,000,000,000,000,000
12
Initialize the max upload file size when quotas are enabled Due to an unwanted check, files causing the quota to be exceeded were deleted after the upload, but not during the upload. The bug was introduced in 2009 in version 1.0.23 Spotted by @DroidTest, thanks!
static void sasl_step (IRC_SERVER_REC *server, const char *data, const char *from) { IRC_SERVER_CONNECT_REC *conn; GString *req; char *enc_req; conn = server->connrec; /* Stop the timer */ g_source_remove(server->sasl_timeout); switch (conn->sasl_mechanism) { case SASL_MECHANISM_PLAIN: /* At this point w...
0
[ "CWE-416" ]
irssi
b8d3301d34f383f039071214872570385de1bb59
151,488,916,183,516,040,000,000,000,000,000,000,000
44
SASL support The only supported methods are PLAIN and EXTERNAL, the latter is untested as of now. The code gets the values from the keys named sasl_{mechanism,username,password} specified for each chatnet.
LogLuvDecode24(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) { static const char module[] = "LogLuvDecode24"; LogLuvState* sp = DecoderState(tif); tmsize_t cc; tmsize_t i; tmsize_t npixels; unsigned char* bp; uint32* tp; assert(s == 0); assert(sp != NULL); npixels = occ / sp->pixel_size; if (sp->user_data...
1
[ "CWE-787" ]
libtiff
aaab5c3c9d2a2c6984f23ccbc79702610439bc65
316,057,958,484,250,500,000,000,000,000,000,000,000
48
* libtiff/tif_luv.c: fix potential out-of-bound writes in decode functions in non debug builds by replacing assert()s by regular if checks (bugzilla #2522). Fix potential out-of-bound reads in case of short input data.
static void load_xref_from_plaintext(FILE *fp, xref_t *xref) { int i, buf_idx, obj_id, added_entries; char c, buf[32] = {0}; long start, pos; start = ftell(fp); /* Get number of entries */ pos = xref->end; fseek(fp, pos, SEEK_SET); while (ftell(fp) != 0) if (SAFE_F(fp, (fgetc(fp...
1
[ "CWE-787" ]
pdfresurrect
0c4120fffa3dffe97b95c486a120eded82afe8a6
27,955,047,793,865,640,000,000,000,000,000,000,000
71
Zero and sanity check all dynamic allocs. This addresses the memory issues in Issue #6 expressed in calloc_some.pdf and malloc_some.pdf
static void set_maintenance_mode(void *send_info, bool enable) { struct smi_info *smi_info = send_info; if (!enable) atomic_set(&smi_info->req_events, 0); }
0
[ "CWE-416" ]
linux
401e7e88d4ef80188ffa07095ac00456f901b8c4
67,651,109,463,616,950,000,000,000,000,000,000,000
7
ipmi_si: fix use-after-free of resource->name When we excute the following commands, we got oops rmmod ipmi_si cat /proc/ioports [ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478 [ 1623.482382] Mem abort info: [ 1623.482383] ESR = 0x96000007 [ 1623.482385] Exception class =...
static int udf_load_pvoldesc(struct super_block *sb, sector_t block) { struct primaryVolDesc *pvoldesc; struct ustr *instr, *outstr; struct buffer_head *bh; uint16_t ident; int ret = 1; instr = kmalloc(sizeof(struct ustr), GFP_NOFS); if (!instr) return 1; outstr = kmalloc(sizeof(struct ustr), GFP_NOFS); if...
0
[ "CWE-119", "CWE-787" ]
linux
1df2ae31c724e57be9d7ac00d78db8a5dabdd050
332,873,367,048,162,840,000,000,000,000,000,000,000
54
udf: Fortify loading of sparing table Add sanity checks when loading sparing table from disk to avoid accessing unallocated memory or writing to it. Signed-off-by: Jan Kara <jack@suse.cz>
static int usb_req_set_sel(struct usb_device *udev, enum usb3_link_state state) { struct usb_set_sel_req *sel_values; unsigned long long u1_sel; unsigned long long u1_pel; unsigned long long u2_sel; unsigned long long u2_pel; int ret; if (udev->state != USB_STATE_CONFIGURED) return 0; /* Convert SEL and PEL...
0
[ "CWE-703" ]
linux
e50293ef9775c5f1cf3fcc093037dd6a8c5684ea
329,292,442,994,064,270,000,000,000,000,000,000,000
77
USB: fix invalid memory access in hub_activate() Commit 8520f38099cc ("USB: change hub initialization sleeps to delayed_work") changed the hub_activate() routine to make part of it run in a workqueue. However, the commit failed to take a reference to the usb_hub structure or to lock the hub interface while doing so. ...
static void compile_xclass_matchingpath(compiler_common *common, PCRE2_SPTR cc, jump_list **backtracks) { DEFINE_COMPILER; jump_list *found = NULL; jump_list **list = (cc[0] & XCL_NOT) == 0 ? &found : backtracks; sljit_uw c, charoffset, max = 256, min = READ_CHAR_MAX; struct sljit_jump *jump = NULL; PCRE2_SPTR ccbegin;...
0
[ "CWE-703", "CWE-125" ]
pcre2
03654e751e7f0700693526b67dfcadda6b42c9d0
165,646,641,053,072,400,000,000,000,000,000,000,000
734
Fixed an issue affecting recursions in JIT
static void r_bin_file_free(void /*RBinFile*/ *bf_) { RBinFile *a = bf_; RBinPlugin *plugin = r_bin_file_cur_plugin (a); if (!a) { return; } // Binary format objects are connected to the // RBinObject, so the plugin must destroy the // format data first if (plugin && plugin->destroy) { plugin->destroy (a)...
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
47,478,276,812,667,090,000,000,000,000,000,000,000
31
Fix #8748 - Fix oobread on string search
callout_name_table_clear(CalloutNameTable* t) { if (IS_NOT_NULL(t)) { onig_st_foreach(t, i_free_callout_name_entry, 0); } return 0; }
0
[ "CWE-400", "CWE-399", "CWE-674" ]
oniguruma
4097828d7cc87589864fecf452f2cd46c5f37180
77,496,208,961,225,530,000,000,000,000,000,000,000
7
fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves.
static char* binary_get_key(conn *c) { return c->rcurr - (c->binary_header.request.keylen); }
0
[ "CWE-189" ]
memcached
6695ccbc525c36d693aaa3e8337b36aa0c784424
249,226,956,284,479,160,000,000,000,000,000,000,000
3
Fix segfault on specially crafted packet.
static void qemu_chr_fe_write_log(CharDriverState *s, const uint8_t *buf, size_t len) { size_t done = 0; ssize_t ret; if (s->logfd < 0) { return; } while (done < len) { retry: ret = write(s->logfd, buf + done, len - done); if (ret == -1...
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
205,408,234,015,451,100,000,000,000,000,000,000,000
24
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
mono_custom_attrs_data_construct (MonoCustomAttrInfo *cinfo) { MonoArray *result; MonoObject *attr; int i; result = mono_array_new (mono_domain_get (), mono_defaults.customattribute_data_class, cinfo->num_attrs); for (i = 0; i < cinfo->num_attrs; ++i) { attr = create_custom_attr_data (cinfo->image, &cinfo->att...
0
[ "CWE-20" ]
mono
65292a69c837b8a5f7a392d34db63de592153358
247,847,777,663,724,240,000,000,000,000,000,000,000
13
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
static bool pb_field_next(pb_field_iterator_t *iter) { bool notwrapped = true; size_t prev_size = iter->pos->data_size; if (PB_ATYPE(iter->pos->type) == PB_ATYPE_STATIC && PB_HTYPE(iter->pos->type) == PB_HTYPE_REPEATED) { prev_size *= iter->pos->array_size; } else if (PB_ATY...
0
[ "CWE-125" ]
nanopb
7b396821ddd06df8e39143f16e1dc0a4645b89a3
64,559,596,038,679,460,000,000,000,000,000,000,000
37
Fix invalid free() after failed realloc() (GHSA-gcx3-7m76-287p)
static void free_hpage_workfn(struct work_struct *work) { struct llist_node *node; struct page *page; node = llist_del_all(&hpage_freelist); while (node) { page = container_of((struct address_space **)node, struct page, mapping); node = node->next; __free_huge_page(page); } }
0
[ "CWE-362" ]
linux
17743798d81238ab13050e8e2833699b54e15467
103,626,006,992,349,120,000,000,000,000,000,000,000
14
mm/hugetlb: fix a race between hugetlb sysctl handlers There is a race between the assignment of `table->data` and write value to the pointer of `table->data` in the __do_proc_doulongvec_minmax() on the other thread. CPU0: CPU1: proc_sys_write ...
void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh, const struct in6_addr *solicit, const struct in6_addr *daddr, const struct in6_addr *saddr) { struct sk_buff *skb; struct in6_addr addr_buf; int inc_opt = dev->addr_len; int optlen = 0; struct nd_msg *msg; if (saddr == NULL) { if (ip...
0
[ "CWE-17" ]
linux
6fd99094de2b83d1d4c8457f2c83483b2828e75a
123,337,540,164,858,540,000,000,000,000,000,000,000
40
ipv6: Don't reduce hop limit for an interface A local route may have a lower hop_limit set than global routes do. RFC 3756, Section 4.2.7, "Parameter Spoofing" > 1. The attacker includes a Current Hop Limit of one or another small > number which the attacker knows will cause legitimate packets to > be...
static const char **prepare_shell_cmd(struct argv_array *out, const char **argv) { if (!argv[0]) die("BUG: shell command is empty"); if (strcspn(argv[0], "|&;<>()$`\\\"' \t\n*?[#~=%") != strlen(argv[0])) { #ifndef GIT_WINDOWS_NATIVE argv_array_push(out, SHELL_PATH); #else argv_array_push(out, "sh"); #endif a...
0
[]
git
321fd82389742398d2924640ce3a61791fd27d60
125,333,975,476,502,610,000,000,000,000,000,000,000
26
run-command: mark path lookup errors with ENOENT Since commit e3a434468f (run-command: use the async-signal-safe execv instead of execvp, 2017-04-19), prepare_cmd() does its own PATH lookup for any commands we run (on non-Windows platforms). However, its logic does not match the old execvp call when we fail to find a...
static char *langFromHashbang(RCore *core, const char *file) { int fd = r_sandbox_open (file, O_RDONLY, 0); if (fd != -1) { char firstLine[128] = {0}; int len = r_sandbox_read (fd, (ut8*)firstLine, sizeof (firstLine) - 1); firstLine[len] = 0; if (!strncmp (firstLine, "#!/", 3)) { // I CAN HAS A HASHBANG ...
0
[ "CWE-78" ]
radare2
dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7
134,468,918,800,590,470,000,000,000,000,000,000,000
22
Fix #14990 - multiple quoted command parsing issue ##core > "?e hello""?e world" hello world" > "?e hello";"?e world" hello world
void jpc_ppxstabent_destroy(jpc_ppxstabent_t *ent) { if (ent->data) { jas_free(ent->data); } jas_free(ent); }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
324,844,966,789,788,160,000,000,000,000,000,000,000
7
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
static apr_byte_t oidc_save_in_session(request_rec *r, oidc_cfg *c, oidc_session_t *session, oidc_provider_t *provider, const char *remoteUser, const char *id_token, oidc_jwt_t *id_token_jwt, const char *claims, const char *access_token, const int expires_in, const char *refresh_token, const char *session_state...
0
[ "CWE-79" ]
mod_auth_openidc
132a4111bf3791e76437619a66336dce2ce4c79b
92,551,476,743,947,300,000,000,000,000,000,000,000
105
release 2.3.10.2: fix XSS vulnerability for poll parameter in OIDC Session Management RP iframe; CSNC-2019-001; thanks Mischa Bachmann Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
MagickExport MagickBooleanType SetImageProperty(Image *image, const char *property,const char *value,ExceptionInfo *exception) { MagickBooleanType status; MagickStatusType flags; assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) ...
0
[ "CWE-476" ]
ImageMagick
2c75f301d9ac84f91071393b02d8c88c8341c91c
157,733,018,753,952,640,000,000,000,000,000,000,000
460
https://github.com/ImageMagick/ImageMagick/issues/1225
static int ext4_commit_super(struct super_block *sb, int sync) { struct ext4_super_block *es = EXT4_SB(sb)->s_es; struct buffer_head *sbh = EXT4_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-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
103,806,241,776,312,950,000,000,000,000,000,000,000
60
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
void writegen_finalize(GF_Filter *filter) { GF_GenDumpCtx *ctx = gf_filter_get_udta(filter); if (ctx->bs) gf_bs_del(ctx->bs); if (ctx->ttml_root) gf_xml_dom_node_del(ctx->ttml_root); if (ctx->ttml_dash_pck) { gf_filter_pck_unref(ctx->ttml_dash_pck); ctx->ttml_dash_pck = NULL; } }
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
30,374,914,470,325,317,000,000,000,000,000,000,000
12
fixed #2138
static OPJ_UINT32 opj_j2k_get_max_coc_size(opj_j2k_t *p_j2k) { OPJ_UINT32 i,j; OPJ_UINT32 l_nb_comp; OPJ_UINT32 l_nb_tiles; OPJ_UINT32 l_max = 0; /* preconditions */ l_nb_tiles = p_j2k->m_cp.tw * p_j2k->m_cp.th ; l_nb_comp = p_j2k->m_private_image->numcomps; ...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
132,264,328,774,613,580,000,000,000,000,000,000,000
20
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) { u32 uninitialized_var(curval), uval, vpid = task_pid_vnr(current); union futex_key key = FUTEX_KEY_INIT; struct futex_hash_bucket *hb; struct futex_q *top_waiter; int ret; if (!IS_ENABLED(CONFIG_FUTEX_PI)) return -ENOSYS; retry: if (get_user...
0
[ "CWE-416" ]
tip
8019ad13ef7f64be44d4f892af9c840179009254
6,046,320,226,285,842,000,000,000,000,000,000,000
137
futex: Fix inode life-time issue As reported by Jann, ihold() does not in fact guarantee inode persistence. And instead of making it so, replace the usage of inode pointers with a per boot, machine wide, unique inode identifier. This sequence number is global, but shared (file backed) futexes are rare enough that thi...
static gboolean is_translit(const char *charset) { char *pos; pos = stristr(charset, "//translit"); return (pos != NULL); }
0
[ "CWE-416" ]
irssi
43e44d553d44e313003cee87e6ea5e24d68b84a1
298,819,306,208,486,260,000,000,000,000,000,000,000
7
Merge branch 'security' into 'master' Security Closes GL#12, GL#13, GL#14, GL#15, GL#16 See merge request irssi/irssi!23
static GCtrace *trace_save_alloc(jit_State *J) { size_t sztr = ((sizeof(GCtrace)+7)&~7); size_t szins = (J->cur.nins-J->cur.nk)*sizeof(IRIns); size_t sz = sztr + szins + J->cur.nsnap*sizeof(SnapShot) + J->cur.nsnapmap*sizeof(SnapEntry); return lj_mem_newt(J->L, (MSize)sz, GCtrace); }
0
[ "CWE-125" ]
LuaJIT
12ab596997b9cb27846a5b254d11230c3f9c50c8
317,357,786,155,597,160,000,000,000,000,000,000,000
9
Fix handling of errors during snapshot restore.
sh_get_env_value (v) const char *v; { return get_string_value (v); }
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
40,176,034,283,709,973,000,000,000,000,000,000,000
5
commit bash-20120224 snapshot
static void cmd_action(const char *data, IRC_SERVER_REC *server) { GHashTable *optlist; const char *target, *text; char *subtext; char **splittexts; int n = 0; void *free_arg; CMD_IRC_SERVER(server); if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_OPTIONS | PARAM_FLAG_UNKNOWN_OPTIONS | PARAM...
0
[ "CWE-416" ]
irssi
36564717c9f701e3a339da362ab46d220d27e0c1
131,310,541,150,363,940,000,000,000,000,000,000,000
32
Merge branch 'security' into 'master' Security See merge request irssi/irssi!34 (cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f)
static inline int put_sigset_t(compat_sigset_t __user *uset, sigset_t *set) { compat_sigset_t cset; switch (_NSIG_WORDS) { case 4: cset.sig[6] = set->sig[3] & 0xffffffffull; cset.sig[7] = set->sig[3] >> 32; case 3: cset.sig[4] = set->sig[2] & 0xffffffffull; cset.sig[5] = set->sig[2] >> 32; case 2: cset.sig[2]...
0
[ "CWE-20", "CWE-284", "CWE-369" ]
linux
d2b9d2a5ad5ef04ff978c9923d19730cb05efd55
81,581,265,511,615,380,000,000,000,000,000,000,000
16
powerpc/tm: Block signal return setting invalid MSR state Currently we allow both the MSR T and S bits to be set by userspace on a signal return. Unfortunately this is a reserved configuration and will cause a TM Bad Thing exception if attempted (via rfid). This patch checks for this case in both the 32 and 64 bit s...
size_t print_file_stack(char *s, const char *end) { char *start= s; struct st_test_file* err_file= cur_file; if (err_file == file_stack) return 0; for (;;) { err_file--; s+= my_snprintf(s, end - s, "included from %s at line %d:\n", err_file->file_name, err_file->lineno); ...
0
[]
server
01b39b7b0730102b88d8ea43ec719a75e9316a1e
100,231,919,928,554,520,000,000,000,000,000,000,000
17
mysqltest: don't eat new lines in --exec pass them through as is
void _process_finish(const list<PG *> &pgs) override { for (list<PG*>::const_iterator i = pgs.begin(); i != pgs.end(); ++i) { in_use.erase(*i); } }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
24,100,660,535,669,706,000,000,000,000,000,000,000
7
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
fr_window_go_to_location (FrWindow *window, const char *path, gboolean force_update) { char *dir; g_return_if_fail (window != NULL); g_return_if_fail (path != NULL); if (force_update) { g_free (window->priv->last_location); window->priv->last_location = NULL; } if (path[strlen (path) - 1] !=...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
38,439,673,122,478,597,000,000,000,000,000,000,000
30
libarchive: sanitize filenames before extracting
static int xen_irq_info_ipi_setup(unsigned cpu, unsigned irq, evtchn_port_t evtchn, enum ipi_vector ipi) { struct irq_info *info = info_for_irq(irq); info->u.ipi = ipi; per_cpu(ipi_to_irq, cpu)[ipi] = irq; return xen_irq_info_common_setup(info, irq, IRQT_IPI, evtchn, 0); }
0
[ "CWE-400", "CWE-703" ]
linux
e99502f76271d6bc4e374fe368c50c67a1fd3070
311,580,774,307,137,200,000,000,000,000,000,000,000
13
xen/events: defer eoi in case of excessive number of events In case rogue guests are sending events at high frequency it might happen that xen_evtchn_do_upcall() won't stop processing events in dom0. As this is done in irq handling a crash might be the result. In order to avoid that, delay further inter-domain events...
static int jas_iccprof_gettagtab(jas_stream_t *in, jas_icctagtab_t *tagtab) { int i; jas_icctagtabent_t *tagtabent; if (tagtab->ents) { jas_free(tagtab->ents); tagtab->ents = 0; } if (jas_iccgetuint32(in, &tagtab->numents)) goto error; if (!(tagtab->ents = jas_alloc2(tagtab->numents, sizeof(jas_icctagta...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
169,880,265,719,600,140,000,000,000,000,000,000,000
30
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
int Field_blob::cmp(const uchar *a,uint32 a_length, const uchar *b, uint32 b_length) { return field_charset->coll->strnncollsp(field_charset, a, a_length, b, b_length); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
193,150,648,858,418,130,000,000,000,000,000,000,000
6
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
template<typename t> CImg<_cimg_Tt> operator+(const t value) const { return CImg<_cimg_Tt>(*this,false)+=value;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
246,668,060,756,281,420,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static inline int cifs_convert_flags(unsigned int flags) { if ((flags & O_ACCMODE) == O_RDONLY) return GENERIC_READ; else if ((flags & O_ACCMODE) == O_WRONLY) return GENERIC_WRITE; else if ((flags & O_ACCMODE) == O_RDWR) { /* GENERIC_ALL is too much permission to request can cause unnecessary access denie...
0
[ "CWE-119", "CWE-787" ]
linux
5d81de8e8667da7135d3a32a964087c0faf5483f
142,511,104,753,601,250,000,000,000,000,000,000,000
17
cifs: ensure that uncached writes handle unmapped areas correctly It's possible for userland to pass down an iovec via writev() that has a bogus user pointer in it. If that happens and we're doing an uncached write, then we can end up getting less bytes than we expect from the call to iov_iter_copy_from_user. This is ...
static Image *DrawCompositeMask(Image *image,const DrawInfo *draw_info, const char *id,const char *mask_path,ExceptionInfo *exception) { Image *composite_mask, *separate_mask; DrawInfo *clone_info; MagickStatusType status; /* Draw a mask path. */ assert(image != (Image *) NULL); a...
0
[ "CWE-416" ]
ImageMagick
ecf7c6b288e11e7e7f75387c5e9e93e423b98397
234,712,354,929,076,250,000,000,000,000,000,000,000
58
...
transform_stat_info (int typeflag, struct tar_stat_info *stat_info) { if (typeflag == GNUTYPE_VOLHDR) /* Name transformations don't apply to volume headers. */ return; transform_member_name (&stat_info->file_name, XFORM_REGFILE); switch (typeflag) { case SYMTYPE: transform_member_name (&sta...
0
[ "CWE-125" ]
tar
d9d4435692150fa8ff68e1b1a473d187cc3fd777
95,381,807,520,892,920,000,000,000,000,000,000,000
20
Fix memory leak in read_header Bug reported in https://savannah.gnu.org/bugs/?59897 * src/list.c (read_header): Don't return directly from the loop. Instead set the status and break. Return the status. Free next_long_name and next_long_link before returning.
static const pjsip_cred_info* auth_find_cred( const pjsip_auth_clt_sess *sess, const pj_str_t *realm, const pj_str_t *auth_scheme) { unsigned i; int wildcard = -1; PJ_UNUSED_ARG(auth_scheme); for (i=0; i<sess->cred_cnt; ++i) { if (pj_stricmp(&sess->cred_info[i].realm, realm) == ...
0
[ "CWE-120", "CWE-787" ]
pjproject
d27f79da11df7bc8bb56c2f291d71e54df8d2c47
117,825,969,661,374,180,000,000,000,000,000,000,000
28
Use PJ_ASSERT_RETURN() on pjsip_auth_create_digest() and pjsua_init_tpselector() (#3009) * Use PJ_ASSERT_RETURN on pjsip_auth_create_digest * Use PJ_ASSERT_RETURN on pjsua_init_tpselector() * Fix incorrect check. * Add return value to pjsip_auth_create_digest() and pjsip_auth_create_digestSHA256() * Modifi...