func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void encode_named_val (MonoReflectionAssembly *assembly, char *buffer, char *p, char **retbuffer, char **retp, guint32 *buflen, MonoType *type, char *name, MonoObject *value) { int len; /* Preallocate a large enough buffer */ if (type->type == MONO_TYPE_VALUETYPE && type->data.klass->enumtype) { char *str =...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
250,835,788,797,470,400,000,000,000,000,000,000,000
36
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 long vmsplice_to_user(struct file *file, struct iov_iter *iter, unsigned int flags) { struct pipe_inode_info *pipe = get_pipe_info(file); struct splice_desc sd = { .total_len = iov_iter_count(iter), .flags = flags, .u.data = iter }; long ret = 0; if (!pipe) return -EBADF; if (sd.total_len...
0
[ "CWE-416" ]
linux
15fab63e1e57be9fdb5eec1bbc5916e9825e9acb
191,610,539,005,591,980,000,000,000,000,000,000,000
22
fs: prevent page refcount overflow in pipe_buf_get Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All callers converted to handle a failure. Reported-by:...
static void mboxlist_racl_key(int isuser, const char *keyuser, const char *mbname, struct buf *buf) { buf_setcstr(buf, "$RACL$"); buf_putc(buf, isuser ? 'U' : 'S'); buf_putc(buf, '$'); if (keyuser) { buf_appendcstr(buf, keyuser); buf_putc(buf, '$'); } if (mbname) { buf_ap...
0
[ "CWE-20" ]
cyrus-imapd
6bd33275368edfa71ae117de895488584678ac79
84,903,577,751,242,490,000,000,000,000,000,000,000
13
mboxlist: fix uninitialised memory use where pattern is "Other Users"
static void copy_password_acl_validation_control( struct ldb_request *req, struct ldb_reply *ares) { struct ldb_control *pav_ctrl = NULL; struct dsdb_control_password_acl_validation *pav = NULL; pav_ctrl = ldb_request_get_control( discard_const(req), DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID); if (pav_ctrl ==...
0
[ "CWE-20" ]
samba
b95431ab2303eb258e37e88d8841f2fb79fc4af5
272,089,700,683,482,260,000,000,000,000,000,000,000
26
CVE-2022-32743 dsdb: Implement validated dNSHostName write BUG: https://bugzilla.samba.org/show_bug.cgi?id=14833 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
add_account (GoaProvider *provider, GoaClient *client, GtkDialog *dialog, GtkBox *vbox, GError **error) { AddAccountData data; GVariantBuilder credentials; GVariantBuilder details; GoaHttpClient *http_client; GoaObject *ret; con...
1
[ "CWE-310" ]
gnome-online-accounts
edde7c63326242a60a075341d3fea0be0bc4d80e
324,422,806,046,503,800,000,000,000,000,000,000,000
165
Guard against invalid SSL certificates None of the branded providers (eg., Google, Facebook and Windows Live) should ever have an invalid certificate. So set "ssl-strict" on the SoupSession object being used by GoaWebView. Providers like ownCloud and Exchange might have to deal with certificates that are not up to th...
dataiterator_init(Dataiterator *di, Pool *pool, Repo *repo, Id p, Id keyname, const char *match, int flags) { memset(di, 0, sizeof(*di)); di->pool = pool; di->flags = flags & ~SEARCH_THISSOLVID; if (!pool || (repo && repo->pool != pool)) { di->state = di_bye; return -1; } if (match) { ...
0
[ "CWE-125" ]
libsolv
fdb9c9c03508990e4583046b590c30d958f272da
326,750,826,552,479,430,000,000,000,000,000,000,000
24
repodata_schema2id: fix heap-buffer-overflow in memcmp When the length of last schema in data->schemadata is less than length of input schema, we got a read overflow in asan test. Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
similar_sgr(char *a, char *b) { bool result = FALSE; if (a != 0 && b != 0) { int csi_a = is_csi(a); int csi_b = is_csi(b); size_t len_a; size_t len_b; TR(TRACE_DATABASE, ("similar_sgr:\n\t%s\n\t%s", _nc_visbuf2(1, a), _nc_visbuf2(2, b))); if (csi_a != 0 && csi_b != 0 && csi_a == csi_b) { ...
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
72,499,326,094,127,030,000,000,000,000,000,000,000
34
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
int ZEXPORT deflateResetKeep (strm) z_streamp strm; { deflate_state *s; if (deflateStateCheck(strm)) { return Z_STREAM_ERROR; } strm->total_in = strm->total_out = 0; strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */ strm->data_type = Z_UNKNOWN; s = (defla...
0
[ "CWE-284", "CWE-787" ]
zlib
5c44459c3b28a9bd3283aaceab7c615f8020c531
46,920,794,036,336,915,000,000,000,000,000,000,000
36
Fix a bug that can crash deflate on some input when using Z_FIXED. This bug was reported by Danilo Ramos of Eideticom, Inc. It has lain in wait 13 years before being found! The bug was introduced in zlib 1.2.2.2, with the addition of the Z_FIXED option. That option forces the use of fixed Huffman codes. For rare input...
NOEXPORT void socks5_server(CLI *c) { SOCKS5_UNION socks; uint8_t host_len; char *host_name, *port_name; u_short port_number; SOCKADDR_UNION addr; int close_connection=1; /* parse request */ memset(&socks, 0, sizeof socks); s_ssl_read(c, &socks, sizeof socks.req); if(socks.req.v...
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
23,425,833,817,706,478,000,000,000,000,000,000,000
122
stunnel-5.57
static int jpc_dec_dump(jpc_dec_t *dec, FILE *out) { jpc_dec_tile_t *tile; int tileno; jpc_dec_tcomp_t *tcomp; int compno; jpc_dec_rlvl_t *rlvl; int rlvlno; jpc_dec_band_t *band; int bandno; jpc_dec_prc_t *prc; int prcno; jpc_dec_cblk_t *cblk; int cblkno; for (tileno = 0, tile = dec->tiles; tileno < dec->...
0
[ "CWE-190" ]
jasper
d91198abd00fc435a397fe6bad906a4c1748e9cf
285,173,001,664,032,030,000,000,000,000,000,000,000
57
Fixed another integer overflow problem.
DLLEXPORT unsigned long tjPlaneSizeYUV(int componentID, int width, int stride, int height, int subsamp) { unsigned long retval = 0; int pw, ph; if (width < 1 || height < 1 || subsamp < 0 || subsamp >= NUMSUBOPT) THROWG("tjPlaneSizeYUV(): Invalid argument"); pw = tjPl...
1
[ "CWE-787" ]
libjpeg-turbo
2a9e3bd7430cfda1bc812d139e0609c6aca0b884
139,937,649,636,676,130,000,000,000,000,000,000,000
21
TurboJPEG: Properly handle gigapixel images Prevent several integer overflow issues and subsequent segfaults that occurred when attempting to compress or decompress gigapixel images with the TurboJPEG API: - Modify tjBufSize(), tjBufSizeYUV2(), and tjPlaneSizeYUV() to avoid integer overflow when computing the retur...
void MirrorJob::Bg() { source_session->SetPriority(0); target_session->SetPriority(0); Job::Bg(); }
0
[ "CWE-20", "CWE-401" ]
lftp
a27e07d90a4608ceaf928b1babb27d4d803e1992
84,536,779,402,897,620,000,000,000,000,000,000,000
6
mirror: prepend ./ to rm and chmod arguments to avoid URL recognition (fix #452)
static void hns_nic_update_link_status(struct net_device *netdev) { struct hns_nic_priv *priv = netdev_priv(netdev); struct hnae_handle *h = priv->ae_handle; if (h->phy_dev) { if (h->phy_if != PHY_INTERFACE_MODE_XGMII) return; (void)genphy_read_status(h->phy_dev); } hns_nic_adjust_link(netdev); }
0
[ "CWE-416" ]
linux
27463ad99f738ed93c7c8b3e2e5bc8c4853a2ff2
90,897,739,162,506,500,000,000,000,000,000,000,000
14
net: hns: Fix a skb used after free bug skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK, which cause hns_nic_net_xmit to use a freed skb. BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940... [17659.112635] alloc_debug_processing+0x18c/0x1a0 [17659.117208] __slab_alloc+0x52c/0x...
static bool exclusive_event_installable(struct perf_event *event, struct perf_event_context *ctx) { struct perf_event *iter_event; struct pmu *pmu = event->pmu; lockdep_assert_held(&ctx->mutex); if (!is_exclusive_pmu(pmu)) return true; list_for_each_entry(iter_event, &ctx->event_list, event_entry) { if...
0
[ "CWE-401" ]
tip
7bdb157cdebbf95a1cd94ed2e01b338714075d00
267,011,855,455,612,700,000,000,000,000,000,000,000
18
perf/core: Fix a memory leak in perf_event_parse_addr_filter() As shown through runtime testing, the "filename" allocation is not always freed in perf_event_parse_addr_filter(). There are three possible ways that this could happen: - It could be allocated twice on subsequent iterations through the loop, - or leake...
int gg_notify_ex(struct gg_session *sess, uin_t *userlist, char *types, int count) { struct gg_notify *n; uin_t *u; char *t; int i, res = 0; gg_debug_session(sess, GG_DEBUG_FUNCTION, "** gg_notify_ex(%p, %p, %p, %d);\n", sess, userlist, types, count); if (!sess) { errno = EFAULT; return -1; } if (sess->s...
0
[ "CWE-310" ]
libgadu
23644f1fb8219031b3cac93289a588b05f90226b
298,583,738,181,521,340,000,000,000,000,000,000,000
63
Poprawka ograniczania długości opisu.
static int usb_host_scan_dev(void *opaque, USBScanFunc *func) { FILE *f = NULL; char line[1024]; char buf[1024]; int bus_num, addr, speed, device_count, class_id, product_id, vendor_id; char product_name[512]; int ret = 0; if (!usb_host_device_path) { perror("husb: USB Host Device P...
0
[ "CWE-119" ]
qemu
babd03fde68093482528010a5435c14ce9128e3f
141,419,311,059,650,020,000,000,000,000,000,000,000
82
usb-linux.c: fix buffer overflow In usb-linux.c:usb_host_handle_control, we pass a 1024-byte buffer and length to the kernel. However, the length was provided by the caller of dev->handle_packet, and is not checked, so the kernel might provide too much data and overflow our buffer. For example, hw/usb-uhci.c could s...
e_named_parameters_to_strv (const ENamedParameters *parameters) { GPtrArray *array = (GPtrArray *) parameters; GPtrArray *ret = g_ptr_array_new (); if (array) { guint i; for (i = 0; i < array->len; i++) { g_ptr_array_add (ret, g_strdup (array->pdata[i])); } } g_ptr_array_add (ret, NULL); return (gchar...
0
[ "CWE-295" ]
evolution-data-server
6672b8236139bd6ef41ecb915f4c72e2a052dba5
327,492,630,684,591,440,000,000,000,000,000,000,000
16
Let child source with 'none' authentication method use collection source authentication That might be the same as having set NULL authentication method. Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
free_unref_items(int copyID) { int did_free = FALSE; // Let all "free" functions know that we are here. This means no // dictionaries, lists, channels or jobs are to be freed, because we will // do that here. in_free_unref_items = TRUE; /* * PASS 1: free the contents of the items. We d...
0
[ "CWE-122", "CWE-787" ]
vim
605ec91e5a7330d61be313637e495fa02a6dc264
106,803,141,971,489,260,000,000,000,000,000,000,000
50
patch 8.2.3847: illegal memory access when using a lambda with an error Problem: Illegal memory access when using a lambda with an error. Solution: Avoid skipping over the NUL after a string.
static INLINE int vp8_decode_value(BOOL_DECODER *br, int bits) { int z = 0; int bit; for (bit = bits - 1; bit >= 0; bit--) { z |= (vp8dx_decode_bool(br, 0x80) << bit); } return z; }
0
[ "CWE-125" ]
libvpx
46e17f0cb4a80b36755c84b8bf15731d3386c08f
270,941,809,387,927,100,000,000,000,000,000,000,000
10
Fix OOB memory access on fuzzed data vp8_norm table has 256 elements while index to it can be higher on fuzzed data. Typecasting it to unsigned char will ensure valid range and will trigger proper error later. Also declaring "shift" as unsigned char to avoid UB sanitizer warning BUG=b/122373286,b/122373822,b/12237111...
bool dns_name_is_static(struct dnsp_DnssrvRpcRecord *records, uint16_t rec_count) { int i = 0; for (i = 0; i < rec_count; i++) { if (records[i].wType == DNS_TYPE_TOMBSTONE) { continue; } if (records[i].wType == DNS_TYPE_SOA || records[i].dwTimeStamp == 0) { return true; } } return false; }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
302,963,138,065,547,200,000,000,000,000,000,000,000
16
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
static int sr_read_tocentry(struct cdrom_device_info *cdi, struct cdrom_tocentry *tocentry) { struct scsi_cd *cd = cdi->handle; struct packet_command cgc; int result; unsigned char *buffer; buffer = kmalloc(32, GFP_KERNEL | SR_GFP_DMA(cd)); if (!buffer) return -ENOMEM; memset(&cgc, 0, sizeof(struct packet_...
0
[ "CWE-119", "CWE-787" ]
linux
f7068114d45ec55996b9040e98111afa56e010fe
222,626,076,419,973,550,000,000,000,000,000,000,000
38
sr: pass down correctly sized SCSI sense buffer We're casting the CDROM layer request_sense to the SCSI sense buffer, but the former is 64 bytes and the latter is 96 bytes. As we generally allocate these on the stack, we end up blowing up the stack. Fix this by wrapping the scsi_execute() call with a properly sized s...
handle_ftp_ctl(struct conntrack *ct, const struct conn_lookup_ctx *ctx, struct dp_packet *pkt, const struct conn *conn_for_expectation, long long now, enum ftp_ctl_pkt ftp_ctl, bool nat) { struct ip_header *l3_hdr = dp_packet_l3(pkt); ovs_be32 v4_addr_rep = 0; st...
0
[ "CWE-400" ]
ovs
35c280072c1c3ed58202745b7d27fbbd0736999b
110,458,105,687,309,100,000,000,000,000,000,000,000
123
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
static void rawsock_report_error(struct sock *sk, int err) { pr_debug("sk=%p err=%d\n", sk, err); sk->sk_shutdown = SHUTDOWN_MASK; sk->sk_err = -err; sk->sk_error_report(sk); rawsock_write_queue_purge(sk); }
0
[ "CWE-276", "CWE-703" ]
linux
26896f01467a28651f7a536143fe5ac8449d4041
245,998,130,896,381,750,000,000,000,000,000,000,000
10
net/nfc/rawsock.c: add CAP_NET_RAW check. When creating a raw AF_NFC socket, CAP_NET_RAW needs to be checked first. Signed-off-by: Qingyu Li <ieatmuttonchuan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen) { struct evbuffer_chain *chain, *tmp; int result = -1; EVBUFFER_LOCK(buf); if (buf->freeze_start) { goto done; } chain = buf->first; if (chain == NULL) { chain = evbuffer_chain_new(datlen); if (!chain) goto done; evbuffer_chai...
1
[ "CWE-189" ]
libevent
20d6d4458bee5d88bda1511c225c25b2d3198d6c
92,378,287,987,602,610,000,000,000,000,000,000,000
72
Fix CVE-2014-6272 in Libevent 2.0 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
hook_process (struct t_weechat_plugin *plugin, const char *command, int timeout, t_hook_callback_process *callback, void *callback_data) { return hook_process_hashtable (plugin, command, NULL, timeout, callback, callback_data); }
0
[ "CWE-20" ]
weechat
efb795c74fe954b9544074aafcebb1be4452b03a
323,082,844,054,984,600,000,000,000,000,000,000,000
7
core: do not call shell to execute command in hook_process (fix security problem when a plugin/script gives untrusted command) (bug #37764)
static int csnmp_config_add_host_priv_protocol(host_definition_t *hd, oconfig_item_t *ci) { char buffer[4]; int status; status = cf_util_get_string_buffer(ci, buffer, sizeof(buffer)); if (status != 0) return status; if (strcasecmp("AES", buffer) == 0) { ...
0
[ "CWE-415" ]
collectd
d16c24542b2f96a194d43a73c2e5778822b9cb47
83,010,207,213,268,140,000,000,000,000,000,000,000
26
snmp plugin: Fix double free of request PDU snmp_sess_synch_response() always frees request PDU, in both case of request error and success. If error condition occurs inside of `while (status == 0)` loop, double free of `req` happens. Issue: #2291 Signed-off-by: Florian Forster <octo@collectd.org>
STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s) { if (s != NULL) { if (s->cipher_list != NULL) { return (s->cipher_list); } else if ((s->ctx != NULL) && (s->ctx->cipher_list != NULL)) { return (s->ctx->cipher_list); } } return (NULL); }
0
[ "CWE-310" ]
openssl
56f1acf5ef8a432992497a04792ff4b3b2c6f286
139,913,458,743,933,420,000,000,000,000,000,000,000
11
Disable SSLv2 default build, default negotiation and weak ciphers. SSLv2 is by default disabled at build-time. Builds that are not configured with "enable-ssl2" will not support SSLv2. Even if "enable-ssl2" is used, users who want to negotiate SSLv2 via the version-flexible SSLv23_method() will need to explicitly ca...
static struct stream_encoder *dce120_stream_encoder_create( enum engine_id eng_id, struct dc_context *ctx) { struct dce110_stream_encoder *enc110 = kzalloc(sizeof(struct dce110_stream_encoder), GFP_KERNEL); if (!enc110) return NULL; dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id, &str...
0
[ "CWE-400", "CWE-401" ]
linux
104c307147ad379617472dd91a5bcb368d72bd6d
333,534,071,345,663,400,000,000,000,000,000,000,000
15
drm/amd/display: prevent memory leak In dcn*_create_resource_pool the allocated memory should be released if construct pool fails. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
static int ieee80211_change_da(struct sk_buff *skb, struct sta_info *sta) { struct ethhdr *eth; int err; err = skb_ensure_writable(skb, ETH_HLEN); if (unlikely(err)) return err; eth = (void *)skb->data; ether_addr_copy(eth->h_dest, sta->sta.addr); return 0; }
0
[ "CWE-476" ]
linux
bddc0c411a45d3718ac535a070f349be8eca8d48
265,564,635,874,191,200,000,000,000,000,000,000,000
14
mac80211: Fix NULL ptr deref for injected rate info The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx queue") moved the code to validate the radiotap header from ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is possible to share more code with the new Tx queue selecti...
static bool is_inf(const signed char) { return false; }
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
289,932,771,682,988,370,000,000,000,000,000,000,000
1
Fix other issues in 'CImg<T>::load_bmp()'.
static uint8_t get_mode(const char *mode) { if (strcasecmp("off", mode) == 0) return MODE_OFF; else if (strcasecmp("connectable", mode) == 0) return MODE_CONNECTABLE; else if (strcasecmp("discoverable", mode) == 0) return MODE_DISCOVERABLE; else return MODE_UNKNOWN; }
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
101,869,172,356,970,460,000,000,000,000,000,000,000
11
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_property_address_read_helper_SPEC_UNUSED_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
60,865,467,857,442,840,000,000,000,000,000,000,000
4
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static inline int check_target(struct arpt_entry *e, const char *name) { struct xt_entry_target *t = arpt_get_target(e); struct xt_tgchk_param par = { .table = name, .entryinfo = e, .target = t->u.kernel.target, .targinfo = t->data, .hook_mask = e->comefrom, .family = NFPROTO_ARP, }; return ...
0
[ "CWE-476" ]
linux
57ebd808a97d7c5b1e1afb937c2db22beba3c1f8
245,098,743,972,145,260,000,000,000,000,000,000,000
14
netfilter: add back stackpointer size checks The rationale for removing the check is only correct for rulesets generated by ip(6)tables. In iptables, a jump can only occur to a user-defined chain, i.e. because we size the stack based on number of user-defined chains we cannot exceed stack size. However, the underlyi...
set_imsearch_global(void) { p_imsearch = curbuf->b_p_imsearch; }
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
54,596,089,685,307,275,000,000,000,000,000,000,000
4
patch 8.0.0056 Problem: When setting 'filetype' there is no check for a valid name. Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
ciEnv::ciEnv(Arena* arena) : _ciEnv_arena(mtCompiler) { ASSERT_IN_VM; // Set up ciEnv::current immediately, for the sake of ciObjectFactory, etc. CompilerThread* current_thread = CompilerThread::current(); assert(current_thread->env() == NULL, "must be"); current_thread->set_env(this); assert(ciEnv::curren...
0
[]
jdk17u
8be0fc09f0ba2dd1dbfd6627456fa929d5574b04
135,495,971,320,034,940,000,000,000,000,000,000,000
55
8281859: Improve class compilation Reviewed-by: mbaesken Backport-of: 3ac62a66efd05d0842076dd4cfbea0e53b12630f
void CLASS parse_kodak_ifd (int base) { unsigned entries, tag, type, len, save; int i, c, wbi=-2; float mul[3]={1,1,1}, num; static const int wbtag[] = { 64037,64040,64039,64041,-1,-1,64042 }; entries = get2(); if (entries > 1024) return; INT64 fsize = ifp->size(); while (entries--) { tiff_get (bas...
0
[ "CWE-119", "CWE-125", "CWE-787" ]
LibRaw
d13e8f6d1e987b7491182040a188c16a395f1d21
111,709,334,961,292,880,000,000,000,000,000,000,000
77
CVE-2017-1438 credits; fix for Kodak 65000 out of bounds access
static int br_mdb_parse(struct sk_buff *skb, struct nlmsghdr *nlh, struct net_device **pdev, struct br_mdb_entry **pentry) { struct net *net = sock_net(skb->sk); struct br_mdb_entry *entry; struct br_port_msg *bpm; struct nlattr *tb[MDBA_SET_ENTRY_MAX+1]; struct net_device *dev; int err; err = nlmsg_parse(nl...
0
[ "CWE-399" ]
linux-2.6
c085c49920b2f900ba716b4ca1c1a55ece9872cc
154,726,165,749,886,270,000,000,000,000,000,000,000
48
bridge: fix mdb info leaks The bridging code discloses heap and stack bytes via the RTM_GETMDB netlink interface and via the notify messages send to group RTNLGRP_MDB afer a successful add/del. Fix both cases by initializing all unset members/padding bytes with memset(0). Cc: Stephen Hemminger <stephen@networkplumbe...
pdf_filter_q(fz_context *ctx, pdf_processor *proc) { pdf_filter_processor *p = (pdf_filter_processor*)proc; filter_push(ctx, p); }
0
[ "CWE-125" ]
mupdf
97096297d409ec6f206298444ba00719607e8ba8
90,924,665,196,065,100,000,000,000,000,000,000,000
5
Bug 701292: Fix test for missing/empty string.
port::StatusOr<bool> UseTensorOps(Stream* stream, dnn::DataType type, absl::optional<dnn::AlgorithmDesc> desc) { bool use_tensor_ops; if (desc.has_value()) { use_tensor_ops = desc->tensor_ops_enabled(); if (use_tensor_ops && !IsTensorMathEnabled(stream, type)) { retur...
0
[ "CWE-20" ]
tensorflow
14755416e364f17fb1870882fa778c7fec7f16e3
83,422,914,970,364,160,000,000,000,000,000,000,000
14
Prevent CHECK-fail in LSTM/GRU with zero-length input. PiperOrigin-RevId: 346239181 Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f
void vterm_set_size(VTerm *vt, int rows, int cols) { vt->rows = rows; vt->cols = cols; if(vt->parser.callbacks && vt->parser.callbacks->resize) (*vt->parser.callbacks->resize)(rows, cols, vt->parser.cbdata); }
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
337,722,020,198,730,100,000,000,000,000,000,000,000
8
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
static int rmap_walk_anon(struct page *page, struct rmap_walk_control *rwc) { struct anon_vma *anon_vma; pgoff_t pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); struct anon_vma_chain *avc; int ret = SWAP_AGAIN; anon_vma = rmap_walk_anon_lock(page, rwc); if (!anon_vma) return ret; anon_vma_interval_tr...
0
[ "CWE-400", "CWE-703", "CWE-264" ]
linux
57e68e9cd65b4b8eb4045a1e0d0746458502554c
278,213,880,274,745,160,000,000,000,000,000,000,000
27
mm: try_to_unmap_cluster() should lock_page() before mlocking A BUG_ON(!PageLocked) was triggered in mlock_vma_page() by Sasha Levin fuzzing with trinity. The call site try_to_unmap_cluster() does not lock the pages other than its check_page parameter (which is already locked). The BUG_ON in mlock_vma_page() is not ...
cmsBool Type_MPEmatrix_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems) { cmsUInt32Number i, nElems; cmsStage* mpe = (cmsStage*) Ptr; _cmsStageMatrixData* Matrix = (_cmsStageMatrixData*) mpe ->Data; if (!_cmsWriteUInt16Number(io, (cmsUInt16Number) mpe ->...
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
300,362,448,532,042,900,000,000,000,000,000,000,000
32
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
rsvg_filter_primitive_component_transfer_set_atts (RsvgNode *node, gpointer impl, RsvgHandle *handle, RsvgPropertyBag *atts) { RsvgFilterPrimitiveComponentTransfer *filter = impl; const char *value; if ((value = rsvg_property_bag_lookup (atts, "result"))) g_string_assign (filter->super.result, valu...
0
[ "CWE-369" ]
librsvg
ecf9267a24b2c3c0cd211dbdfa9ef2232511972a
188,036,740,442,422,130,000,000,000,000,000,000,000
12
bgo#783835 - Don't divide by zero in box_blur_line() for gaussian blurs We were making the decision to use box blurs, instead of a true Gaussian kernel, based on the size of *both* x and y dimensions. Do them individually instead.
static int SD_Call(GGadget *g, GEvent *e) { if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) { char *fn; unichar_t *insert; fn = gwwv_open_filename(_("Call Script"), NULL, "*",NULL); if ( fn==NULL ) return(true); insert = malloc((strlen(fn)+10)*sizeof(unichar_t)); *insert = '"...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
276,958,425,781,202,100,000,000,000,000,000,000,000
18
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
static int ssl3_get_record(SSL *s) { int ssl_major,ssl_minor,al; int enc_err,n,i,ret= -1; SSL3_RECORD *rr; SSL_SESSION *sess; unsigned char *p; unsigned char md[EVP_MAX_MD_SIZE]; short version; int mac_size; int clear=0; size_t extra; int decryption_failed_or_bad_record_mac = 0; unsigned char *mac = NULL; ...
1
[ "CWE-310" ]
openssl
9c00a950604aca819cee977f1dcb4b45f2af3aa6
197,807,830,514,803,800,000,000,000,000,000,000,000
250
Add and use a constant-time memcmp. This change adds CRYPTO_memcmp, which compares two vectors of bytes in an amount of time that's independent of their contents. It also changes several MAC compares in the code to use this over the standard memcmp, which may leak information about the size of a matching prefix. (cher...
static int qrtr_port_assign(struct qrtr_sock *ipc, int *port) { u32 min_port; int rc; mutex_lock(&qrtr_port_lock); if (!*port) { min_port = QRTR_MIN_EPH_SOCKET; rc = idr_alloc_u32(&qrtr_ports, ipc, &min_port, QRTR_MAX_EPH_SOCKET, GFP_ATOMIC); if (!rc) *port = min_port; } else if (*port < QRTR_MIN_EPH_SOC...
0
[ "CWE-909" ]
linux
50535249f624d0072cd885bcdce4e4b6fb770160
320,223,795,268,845,800,000,000,000,000,000,000,000
33
net: qrtr: fix a kernel-infoleak in qrtr_recvmsg() struct sockaddr_qrtr has a 2-byte hole, and qrtr_recvmsg() currently does not clear it before copying kernel data to user space. It might be too late to name the hole since sockaddr_qrtr structure is uapi. BUG: KMSAN: kernel-infoleak in kmsan_copy_to_user+0x9c/0xb0 ...
static void smack_key_free(struct key *key) { key->security = NULL; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
231,342,268,943,993,570,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
ves_icall_System_Threading_Thread_MemoryBarrier (void) { mono_threads_lock (); mono_threads_unlock (); }
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
115,470,842,002,390,230,000,000,000,000,000,000,000
5
Fix access to freed members of a dead thread * threads.c: Fix access to freed members of a dead thread. Found and fixed by Rodrigo Kumpera <rkumpera@novell.com> Ref: CVE-2011-0992
InputBuffer(UChar32* buffer, char* widthArray, int bufferLen) : buf32(buffer), charWidths(widthArray), buflen(bufferLen - 1), len(0), pos(0) { buf32[0] = 0; }
0
[ "CWE-200" ]
mongo
035cf2afc04988b22cb67f4ebfd77e9b344cb6e0
245,721,462,537,529,470,000,000,000,000,000,000,000
4
SERVER-25335 avoid group and other permissions when creating .dbshell history file
static PHP_FUNCTION(xmlwriter_write_element) { zval *pind; xmlwriter_object *intern; xmlTextWriterPtr ptr; char *name, *content = NULL; int name_len, content_len, retval; #ifdef ZEND_ENGINE_2 zval *this = getThis(); if (this) { if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s!", &name, &name_len...
0
[ "CWE-20" ]
php-src
52b93f0cfd3cba7ff98cc5198df6ca4f23865f80
143,164,183,418,351,930,000,000,000,000,000,000,000
51
Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
cmd_spec_useragent (const char *com, const char *val, void *place_ignored _GL_UNUSED) { /* Disallow embedded newlines. */ if (strchr (val, '\n')) { fprintf (stderr, _("%s: %s: Invalid value %s.\n"), exec_name, com, quote (val)); return false; } xfree (opt.useragent); opt.user...
0
[ "CWE-200" ]
wget
c125d24762962d91050d925fbbd9e6f30b2302f8
124,250,913,996,575,620,000,000,000,000,000,000,000
13
Don't use extended attributes (--xattr) by default * src/init.c (defaults): Set enable_xattr to false by default * src/main.c (print_help): Reverse option logic of --xattr * doc/wget.texi: Add description for --xattr Users may not be aware that the origin URL and Referer are saved including credentials, and possibly ...
static void gdImageTileApply (gdImagePtr im, int x, int y) { gdImagePtr tile = im->tile; int srcx, srcy; int p; if (!tile) { return; } srcx = x % gdImageSX(tile); srcy = y % gdImageSY(tile); if (im->trueColor) { p = gdImageGetPixel(tile, srcx, srcy); if (p != gdImageGetTransparent (tile)) { if (!tile->...
0
[ "CWE-119" ]
php-src
e7f2356665c2569191a946b6fc35b437f0ae1384
306,931,785,885,693,430,000,000,000,000,000,000,000
35
Fix #66387: Stack overflow with imagefilltoborder The stack overflow is caused by the recursive algorithm in combination with a very large negative coordinate passed to gdImageFillToBorder(). As there is already a clipping for large positive coordinates to the width and height of the image, it seems to be consequent t...
static void test_bug11172() { MYSQL_STMT *stmt; MYSQL_BIND bind_in[1], bind_out[2]; MYSQL_TIME hired; int rc; const char *stmt_text; int i= 0, id; ulong type; myheader("test_bug11172"); mysql_query(mysql, "drop table if exists t1"); mysql_query(mysql, "create table t1 (id integer not null primary ...
0
[ "CWE-416" ]
server
eef21014898d61e77890359d6546d4985d829ef6
84,305,630,054,308,565,000,000,000,000,000,000,000
66
MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list mysql_prune_stmt_list() was walking the list following element->next pointers, but inside the loop it was invoking list_add(element) that modified element->next. So, mysql_prune_stmt_list() failed to visit and reset all elements, and some of them were left...
static int copy_altdest_file(const char *src, const char *dest, struct file_struct *file) { char buf[MAXPATHLEN]; const char *copy_to, *partialptr; int save_preserve_xattrs = preserve_xattrs; int ok, fd_w; if (inplace) { /* Let copy_file open the destination in place. */ fd_w = -1; copy_to = dest; } else {...
0
[ "CWE-59" ]
rsync
e12a6c087ca1eecdb8eae5977be239c24f4dd3d9
170,846,124,419,038,400,000,000,000,000,000,000,000
35
Add parent-dir validation for --no-inc-recurse too.
nsim_map_key_match(struct bpf_map *map, struct nsim_map_entry *e, void *key) { return e->key && !memcmp(key, e->key, map->key_size); }
0
[]
net
481221775d53d6215a6e5e9ce1cce6d2b4ab9a46
218,189,150,830,253,530,000,000,000,000,000,000,000
4
netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc Zero-initialize memory for new map's value in function nsim_bpf_map_alloc since it may cause a potential kernel information leak issue, as follows: 1. nsim_bpf_map_alloc calls nsim_map_alloc_elem to allocate elements for a new map. 2....
static int ttm_sg_tt_alloc_page_directory(struct ttm_dma_tt *ttm) { ttm->dma_address = kvmalloc_array(ttm->ttm.num_pages, sizeof(*ttm->dma_address), GFP_KERNEL | __GFP_ZERO); if (!ttm->dma_address) return -ENOMEM; return 0; }
0
[]
linux
5de5b6ecf97a021f29403aa272cb4e03318ef586
184,831,711,737,603,430,000,000,000,000,000,000,000
9
drm/ttm/nouveau: don't call tt destroy callback on alloc failure. This is confusing, and from my reading of all the drivers only nouveau got this right. Just make the API act under driver control of it's own allocation failing, and don't call destroy, if the page table fails to create there is nothing to cleanup here...
INTERNAL void vterm_push_output_sprintf_dcs(VTerm *vt, const char *fmt, ...) { size_t orig_cur = vt->outbuffer_cur; va_list args; if(!vt->mode.ctrl8bit) vterm_push_output_sprintf(vt, ESC_S "%c", C1_DCS - 0x40); else vterm_push_output_sprintf(vt, "%c", C1_DCS); va_start(args, fmt); vterm_push_outpu...
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
49,470,663,905,100,060,000,000,000,000,000,000,000
19
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
static int ath10k_usb_hif_diag_read(struct ath10k *ar, u32 address, void *buf, size_t buf_len) { struct ath10k_usb *ar_usb = ath10k_usb_priv(ar); struct ath10k_usb_ctrl_diag_cmd_read *cmd; u32 resp_len; int ret; if (buf_len < sizeof(struct ath10k_usb_ctrl_diag_resp_read)) return -EINVAL; cmd = (struct...
0
[ "CWE-476" ]
linux
bfd6e6e6c5d2ee43a3d9902b36e01fc7527ebb27
136,039,211,629,927,870,000,000,000,000,000,000,000
34
ath10k: Fix a NULL-ptr-deref bug in ath10k_usb_alloc_urb_from_pipe The `ar_usb` field of `ath10k_usb_pipe_usb_pipe` objects are initialized to point to the containing `ath10k_usb` object according to endpoint descriptors read from the device side, as shown below in `ath10k_usb_setup_pipe_resources`: for (i = 0; i < i...
void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm) { struct cmsghdr __user *cm = (__force struct cmsghdr __user*)msg->msg_control; int fdmax = 0; int fdnum = scm->fp->count; struct file **fp = scm->fp->fp; int __user *cmfptr; int err = 0, i; if (MSG_CMSG_COMPAT & msg->msg_flags) { scm_detach_f...
0
[ "CWE-284", "CWE-264" ]
linux
d661684cf6820331feae71146c35da83d794467e
189,006,816,207,470,730,000,000,000,000,000,000,000
73
net: Check the correct namespace when spoofing pid over SCM_RIGHTS This is a security bug. The follow-up will fix nsproxy to discourage this type of issue from happening again. Cc: stable@vger.kernel.org Signed-off-by: Andy Lutomirski <luto@amacapital.net> Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com> Sig...
goa_ews_client_autodiscover_sync (GoaEwsClient *client, const gchar *email, const gchar *password, const gchar *username, const gchar *server, ...
0
[ "CWE-310" ]
gnome-online-accounts
edde7c63326242a60a075341d3fea0be0bc4d80e
118,067,825,621,495,760,000,000,000,000,000,000,000
33
Guard against invalid SSL certificates None of the branded providers (eg., Google, Facebook and Windows Live) should ever have an invalid certificate. So set "ssl-strict" on the SoupSession object being used by GoaWebView. Providers like ownCloud and Exchange might have to deal with certificates that are not up to th...
static void delete_uprobe(struct uprobe *uprobe) { if (WARN_ON(!uprobe_is_active(uprobe))) return; spin_lock(&uprobes_treelock); rb_erase(&uprobe->rb_node, &uprobes_tree); spin_unlock(&uprobes_treelock); RB_CLEAR_NODE(&uprobe->rb_node); /* for uprobe_is_active() */ iput(uprobe->inode); put_uprobe(uprobe); }
0
[ "CWE-416" ]
linux
355627f518978b5167256d27492fe0b343aaf2f2
24,337,818,866,940,467,000,000,000,000,000,000,000
12
mm, uprobes: fix multiple free of ->uprobes_state.xol_area Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable") made it possible to kill a forking task while it is waiting to acquire its ->mmap_sem for write, in dup_mmap(). However, it was overlooked that this introduced an new error p...
static int handle_encls(struct kvm_vcpu *vcpu) { /* * SGX virtualization is not yet supported. There is no software * enable bit for SGX, so we have to trap ENCLS and inject a #UD * to prevent the guest from executing ENCLS. */ kvm_queue_exception(vcpu, UD_VECTOR); return 1; }
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
120,320,158,333,151,120,000,000,000,000,000,000,000
10
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...
void handshakeSuc(AsyncSSLSocket* /* socket */) noexcept override { LOG(INFO) << "Renegotiating server handshake success"; socket_->setReadCB(this); }
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
233,742,221,621,338,180,000,000,000,000,000,000,000
4
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
static int ext4_ui_proc_open(struct inode *inode, struct file *file) { return single_open(file, ext4_ui_proc_show, PDE(inode)->data); }
0
[ "CWE-20" ]
linux-2.6
4ec110281379826c5cf6ed14735e47027c3c5765
311,091,530,354,719,960,000,000,000,000,000,000,000
4
ext4: Add sanity checks for the superblock before mounting the filesystem This avoids insane superblock configurations that could lead to kernel oops due to null pointer derefences. http://bugzilla.kernel.org/show_bug.cgi?id=12371 Thanks to David Maciejak at Fortinet's FortiGuard Global Security Research Team who di...
static int nci_enable_se(struct nfc_dev *nfc_dev, u32 se_idx) { struct nci_dev *ndev = nfc_get_drvdata(nfc_dev); if (ndev->ops->enable_se) return ndev->ops->enable_se(ndev, se_idx); return 0; }
0
[]
linux
48b71a9e66c2eab60564b1b1c85f4928ed04e406
122,386,406,036,166,100,000,000,000,000,000,000,000
9
NFC: add NCI_UNREG flag to eliminate the race There are two sites that calls queue_work() after the destroy_workqueue() and lead to possible UAF. The first site is nci_send_cmd(), which can happen after the nci_close_device as below nfcmrvl_nci_unregister_dev | nfc_genl_dev_up nci_close_device | f...
R_API bool r_config_save_num(RConfigHold *h, ...) { va_list ap; char *key; if (!h->list_num) { h->list_num = r_list_newf ((RListFree) free); if (!h->list_num) { return false; } } va_start (ap, h); while ((key = va_arg (ap, char *))) { RConfigHoldNum *hc = R_NEW0 (RConfigHoldNum); if (!hc) { contin...
0
[ "CWE-416" ]
radare2
f85bc674b2a2256a364fe796351bc1971e106005
287,329,845,489,144,800,000,000,000,000,000,000,000
22
Fix #7698 - UAF in r_config_set when loading a dex
generic_file_splice_write_nolock(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags) { struct address_space *mapping = out->f_mapping; struct inode *inode = mapping->host; ssize_t ret; int err; ret = __splice_from_pipe(pipe, out, ppos, len, flags, pipe_to_file); if ...
1
[ "CWE-264" ]
linux-2.6
8c34e2d63231d4bf4852bac8521883944d770fe3
76,296,563,285,025,260,000,000,000,000,000,000,000
27
[PATCH] Remove SUID when splicing into an inode Originally from Mark Fasheh <mark.fasheh@oracle.com> generic_file_splice_write() does not remove S_ISUID or S_ISGID. This is inconsistent with the way we generally write to files. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com> Signed-off-by: Jens Axboe <jens.axboe...
void mi_check_print_warning(MI_CHECK *param, const char *fmt,...) { va_list args; DBUG_ENTER("mi_check_print_warning"); fflush(stdout); if (!param->warning_printed && !param->error_printed) { if (param->testflag & T_SILENT) fprintf(stderr,"%s: MyISAM file %s\n",my_progname_short, param->isam...
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
24,674,139,115,296,527,000,000,000,000,000,000,000
22
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file w...
int BPMDetect::decimate(SAMPLETYPE *dest, const SAMPLETYPE *src, int numsamples) { int count, outcount; LONG_SAMPLETYPE out; assert(channels > 0); assert(decimateBy > 0); outcount = 0; for (count = 0; count < numsamples; count ++) { int j; // convert to mono an...
0
[ "CWE-617" ]
soundtouch
a1c400eb2cff849c0e5f9d6916d69ffea3ad2c85
20,932,171,073,096,532,000,000,000,000,000,000,000
43
Fix issue CVE-2018-17096: Replace assert with runtime exception
static inline bool ok_inflater_load_bits(ok_inflater *inflater, unsigned int num_bits) { while (inflater->input_buffer_bits < num_bits) { if (inflater->input == inflater->input_end || inflater->input_buffer_bits + 8 > 32) { return false; } uint32_t input = *inflater->input++; ...
0
[ "CWE-787" ]
ok-file-formats
e49cdfb84fb5eca2a6261f3c51a3c793fab9f62e
31,415,511,028,232,630,000,000,000,000,000,000,000
11
ok_png: Disallow multiple IHDR chunks (#15)
int parse_submodule_fetchjobs(const char *var, const char *value) { int fetchjobs = git_config_int(var, value); if (fetchjobs < 0) die(_("negative values not allowed for submodule.fetchjobs")); return fetchjobs; }
0
[ "CWE-78" ]
git
e904deb89d9a9669a76a426182506a084d3f6308
116,860,443,476,534,960,000,000,000,000,000,000,000
7
submodule: reject submodule.update = !command in .gitmodules Since ac1fbbda2013 (submodule: do not copy unknown update mode from .gitmodules, 2013-12-02), Git has been careful to avoid copying [submodule "foo"] update = !run an arbitrary scary command from .gitmodules to a repository's local config, copying in th...
OPJ_BOOL opj_j2k_read_header( opj_stream_private_t *p_stream, opj_j2k_t* p_j2k, opj_image_t** p_image, opj_event_mgr_t* p_manager ) { ...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
85,558,253,811,447,450,000,000,000,000,000,000,000
59
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
win_drag_vsep_line(win_T *dragwin, int offset) { frame_T *curfr; frame_T *fr; int room; int left; // if TRUE, drag separator line left, otherwise right int n; fr = dragwin->w_frame; if (fr == topframe) // only one window (cannot happen?) return; curfr = fr; fr = fr->fr_parent; ...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
213,425,948,289,540,900,000,000,000,000,000,000,000
100
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
struct audit_chunk *audit_tree_lookup(const struct inode *inode) { struct list_head *list = chunk_hash(inode); struct audit_chunk *p; list_for_each_entry_rcu(p, list, hash) { if (p->watch.inode == inode) { get_inotify_watch(&p->watch); return p; } } return NULL; }
1
[ "CWE-362" ]
linux-2.6
8f7b0ba1c853919b85b54774775f567f30006107
305,548,466,206,123,730,000,000,000,000,000,000,000
13
Fix inotify watch removal/umount races Inotify watch removals suck violently. To kick the watch out we need (in this order) inode->inotify_mutex and ih->mutex. That's fine if we have a hold on inode; however, for all other cases we need to make damn sure we don't race with umount. We can *NOT* just grab a reference...
static void dasher_send_encode_hints(GF_DasherCtx *ctx, GF_DashStream *ds) { if (!ctx->sfile && !ds->stl && !ctx->use_cues) { GF_FilterEvent evt; GF_FEVT_INIT(evt, GF_FEVT_ENCODE_HINTS, ds->ipid) evt.encode_hints.intra_period = ds->dash_dur; gf_filter_pid_send_event(ds->ipid, &evt); } }
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
319,028,666,335,885,900,000,000,000,000,000,000,000
9
fixed #2138
dwarf_formstring(Dwarf_Attribute attr, char **return_str, Dwarf_Error * error) { Dwarf_CU_Context cu_context = 0; Dwarf_Debug dbg = 0; Dwarf_Unsigned offset = 0; int res = DW_DLV_ERROR; Dwarf_Small *secdataptr = 0; Dwarf_Small *secend = 0; Dwarf_Unsigned secdatalen = 0; Dwarf_Small *...
0
[ "CWE-703", "CWE-125" ]
libdwarf-code
7ef09e1fc9ba07653dd078edb2408631c7969162
29,103,162,508,517,620,000,000,000,000,000,000,000
140
Fixes old bug(which could result in Denial of Service) due to a missing check before reading the 8 bytes of a DW_FORM_ref_sig8. DW202206-001 modified: src/lib/libdwarf/dwarf_form.c
bool Downstream::request_buf_full() { auto handler = upstream_->get_client_handler(); auto faddr = handler->get_upstream_addr(); auto worker = handler->get_worker(); // We don't check buffer size here for API endpoint. if (faddr->alt_mode == UpstreamAltMode::API) { return false; } if (dconn_) { ...
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
323,330,415,963,636,300,000,000,000,000,000,000,000
18
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
cmsStage* _cmsStageNormalizeToLabFloat(cmsContext ContextID) { static const cmsFloat64Number a1[] = { 100.0, 0, 0, 0, 255.0, 0, 0, 0, 255.0 }; static const cmsFloat64Number o1[] = { 0, -128.0, -128.0 }; cmsStage *mpe = cmsStageAllocMatrix(ContextID,...
0
[]
Little-CMS
b0d5ffd4ad91cf8683ee106f13742db3dc66599a
52,914,944,673,402,130,000,000,000,000,000,000,000
19
Memory Squeezing: LCMS2: CLUTElemDup Check for allocation failures and tidy up if found.
static void snd_ctl_empty_read_queue(struct snd_ctl_file * ctl) { unsigned long flags; struct snd_kctl_event *cread; spin_lock_irqsave(&ctl->read_lock, flags); while (!list_empty(&ctl->events)) { cread = snd_kctl_event(ctl->events.next); list_del(&cread->list); kfree(cread); } spin_unlock_irqrestore(&ctl-...
0
[ "CWE-190", "CWE-189" ]
linux
ac902c112d90a89e59916f751c2745f4dbdbb4bd
239,645,538,141,054,450,000,000,000,000,000,000,000
13
ALSA: control: Handle numid overflow Each control gets automatically assigned its numids when the control is created. The allocation is done by incrementing the numid by the amount of allocated numids per allocation. This means that excessive creation and destruction of controls (e.g. via SNDRV_CTL_IOCTL_ELEM_ADD/REMO...
koi8_r_get_case_fold_codes_by_str(OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) { return onigenc_get_case_fold_codes_by_str_with_map( sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, flag, p, end, items); }
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
150,180,395,272,925,220,000,000,000,000,000,000,000
7
onig-5.9.2
void perf_sched_cb_inc(struct pmu *pmu) { struct perf_cpu_context *cpuctx = this_cpu_ptr(pmu->pmu_cpu_context); if (!cpuctx->sched_cb_usage++) list_add(&cpuctx->sched_cb_entry, this_cpu_ptr(&sched_cb_list)); this_cpu_inc(perf_sched_cb_usages); }
0
[ "CWE-362", "CWE-125" ]
linux
321027c1fe77f892f4ea07846aeae08cefbbb290
189,046,520,833,383,730,000,000,000,000,000,000,000
9
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...
string expectedResult() { return "b"; }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
207,540,824,293,301,030,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
static void writeobject(fz_context *ctx, pdf_document *doc, pdf_write_state *opts, int num, int gen, int skip_xrefs) { pdf_xref_entry *entry; pdf_obj *obj; pdf_obj *type; fz_try(ctx) { obj = pdf_load_object(ctx, doc, num); } fz_catch(ctx) { fz_rethrow_if(ctx, FZ_ERROR_TRYLATER); if (opts->continue_on_err...
0
[ "CWE-119" ]
mupdf
520cc26d18c9ee245b56e9e91f9d4fcae02be5f0
40,595,336,032,508,220,000,000,000,000,000,000,000
93
Bug 689699: Avoid buffer overrun. When cleaning a pdf file, various lists (of pdf_xref_len length) are defined early on. If we trigger a repair during the clean, this can cause pdf_xref_len to increase causing an overrun. Fix this by watching for changes in the length, and checking accesses to the list for validity....
check_for_chan_or_job_arg(typval_T *args, int idx) { if (args[idx].v_type != VAR_CHANNEL && args[idx].v_type != VAR_JOB) { semsg(_(e_chan_or_job_required_for_argument_nr), idx + 1); return FAIL; } return OK; }
0
[ "CWE-125", "CWE-122" ]
vim
1e56bda9048a9625bce6e660938c834c5c15b07d
13,527,258,414,271,878,000,000,000,000,000,000,000
9
patch 9.0.0104: going beyond allocated memory when evaluating string constant Problem: Going beyond allocated memory when evaluating string constant. Solution: Properly skip over <Key> form.
int Field_geom::store(const char *from, size_t length, CHARSET_INFO *cs) { if (!length) bzero(ptr, Field_blob::pack_length()); else { if (from == Geometry::bad_geometry_data.ptr()) goto err; // Check given WKB uint32 wkb_type; if (length < SRID_SIZE + WKB_HEADER_SIZE + 4) goto err;...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
98,407,529,964,914,750,000,000,000,000,000,000,000
64
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...
void mg_log_set_callback(void (*fn)(const void *, size_t, void *), void *fnd) { s_fn = fn; s_fn_param = fnd; }
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
147,723,784,791,069,440,000,000,000,000,000,000,000
4
Protect against the directory traversal in mg_upload()
int rom_add_elf_program(const char *name, void *data, size_t datasize, size_t romsize, hwaddr addr, AddressSpace *as) { Rom *rom; rom = g_malloc0(sizeof(*rom)); rom->name = g_strdup(name); rom->addr = addr; rom->datasize = datasize; rom->romsize = roms...
0
[ "CWE-787" ]
qemu
4f1c6cb2f9afafda05eab150fd2bd284edce6676
123,802,716,714,809,630,000,000,000,000,000,000,000
15
hw/core/loader: Fix possible crash in rom_copy() Both, "rom->addr" and "addr" are derived from the binary image that can be loaded with the "-kernel" paramer. The code in rom_copy() then calculates: d = dest + (rom->addr - addr); and uses "d" as destination in a memcpy() some lines later. Now with bad kernel ima...
TF_LITE_MICRO_TEST(GatherNd_SliceIndexingIntoRank3Tensor) { // For input_dims[], index_dims[], or output_dims[], element 0 is the // number of dimensions in that array, not the actual dimension data. int input_dims[] = {3, 3, 2, 3}; int index_dims[] = {2, 2, 1}; const int32_t index_data[] = {0, 2}; const fl...
0
[ "CWE-703" ]
tflite-micro
4142e47e9e31db481781b955ed3ff807a781b494
93,410,767,095,951,320,000,000,000,000,000,000,000
17
GatherNd verifies that an index is valid before reading. (#1286)
static void _ldm_printk (const char *level, const char *function, const char *fmt, ...) { static char buf[128]; va_list args; va_start (args, fmt); vsnprintf (buf, sizeof (buf), fmt, args); va_end (args); printk ("%s%s(): %s\n", level, function, buf); }
0
[ "CWE-119", "CWE-787" ]
linux
cae13fe4cc3f24820ffb990c09110626837e85d4
160,578,142,671,164,000,000,000,000,000,000,000,000
12
Fix for buffer overflow in ldm_frag_add not sufficient As Ben Hutchings discovered [1], the patch for CVE-2011-1017 (buffer overflow in ldm_frag_add) is not sufficient. The original patch in commit c340b1d64000 ("fs/partitions/ldm.c: fix oops caused by corrupted partition table") does not consider that, for subsequen...
static Token *make_tok_qstr_len(Token *next, const char *str, size_t len) { char *p = nasm_quote(str, &len); return new_Token_free(next, TOK_STRING, p, len); }
0
[]
nasm
6299a3114ce0f3acd55d07de201a8ca2f0a83059
296,230,919,608,142,200,000,000,000,000,000,000,000
5
BR 3392708: fix NULL pointer reference for invalid %stacksize After issuing an error message for a missing %stacksize argument, need to quit rather than continuing to try to access the pointer. Fold uses of tok_text() while we are at it. Reported-by: Suhwan <prada960808@gmail.com> Signed-off-by: H. Peter Anvin (Inte...
InputFile::compatibilityInitialize (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is) { is.seekg(0); // // Construct a MultiPartInputFile, initialize InputFile // with the part 0 data. // (TODO) may want to have a way to set the reconstruction flag. // _data->multiPartBackwardSupport = true; ...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
108,419,524,004,873,000,000,000,000,000,000,000,000
15
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static ssize_t sockfs_getxattr(struct dentry *dentry, const char *name, void *value, size_t size) { const char *proto_name; size_t proto_size; int error; error = -ENODATA; if (!strncmp(name, XATTR_NAME_SOCKPROTONAME, XATTR_NAME_SOCKPROTONAME_LEN)) { proto_name = dentry->d_name.name; proto_size = str...
0
[ "CWE-264" ]
net
4de930efc23b92ddf88ce91c405ee645fe6e27ea
51,653,496,279,175,630,000,000,000,000,000,000,000
25
net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom Cc: stable@vger.kernel.org # v3.19 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
void mlx5_stop_health_poll(struct mlx5_core_dev *dev, bool disable_health) { struct mlx5_core_health *health = &dev->priv.health; unsigned long flags; if (disable_health) { spin_lock_irqsave(&health->wq_lock, flags); set_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags); spin_unlock_irqrestore(&health->wq_lock, ...
0
[ "CWE-400", "CWE-401" ]
linux
c7ed6d0183d5ea9bc31bcaeeba4070bd62546471
226,568,248,040,863,200,000,000,000,000,000,000,000
13
net/mlx5: fix memory leak in mlx5_fw_fatal_reporter_dump In mlx5_fw_fatal_reporter_dump if mlx5_crdump_collect fails the allocated memory for cr_data must be released otherwise there will be memory leak. To fix this, this commit changes the return instruction into goto error handling. Fixes: 9b1f29823605 ("net/mlx5: ...
static inline int managed_dentry_rcu(struct dentry *dentry) { return (dentry->d_flags & DCACHE_MANAGE_TRANSIT) ? dentry->d_op->d_manage(dentry, true) : 0; }
0
[ "CWE-416" ]
linux
f15133df088ecadd141ea1907f2c96df67c729f0
93,971,110,023,286,590,000,000,000,000,000,000,000
5
path_openat(): fix double fput() path_openat() jumps to the wrong place after do_tmpfile() - it has already done path_cleanup() (as part of path_lookupat() called by do_tmpfile()), so doing that again can lead to double fput(). Cc: stable@vger.kernel.org # v3.11+ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
void drop_inmem_page(struct inode *inode, struct page *page) { struct f2fs_inode_info *fi = F2FS_I(inode); struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct list_head *head = &fi->inmem_pages; struct inmem_pages *cur = NULL; f2fs_bug_on(sbi, !IS_ATOMIC_WRITTEN_PAGE(page)); mutex_lock(&fi->inmem_lock); list_f...
0
[ "CWE-20" ]
linux
638164a2718f337ea224b747cf5977ef143166a4
168,225,587,753,567,050,000,000,000,000,000,000,000
29
f2fs: fix potential panic during fstrim As Ju Hyung Park reported: "When 'fstrim' is called for manual trim, a BUG() can be triggered randomly with this patch. I'm seeing this issue on both x86 Desktop and arm64 Android phone. On x86 Desktop, this was caused during Ubuntu boot-up. I have a cronjob installed which c...
static void handle_rx(struct vhost_net *net) { struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX]; struct vhost_virtqueue *vq = &nvq->vq; unsigned uninitialized_var(in), log; struct vhost_log *vq_log; struct msghdr msg = { .msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, /* FIXME: get and h...
1
[ "CWE-787" ]
linux
f5a4941aa6d190e676065e8f4ed35999f52a01c3
9,079,046,485,111,848,000,000,000,000,000,000,000
140
vhost_net: flush batched heads before trying to busy polling After commit e2b3b35eb989 ("vhost_net: batch used ring update in rx"), we tend to batch updating used heads. But it doesn't flush batched heads before trying to do busy polling, this will cause vhost to wait for guest TX which waits for the used RX. Fixing b...
int gnutls_x509_ext_import_proxy(const gnutls_datum_t * ext, int *pathlen, char **policyLanguage, char **policy, size_t * sizeof_policy) { ASN1_TYPE c2 = ASN1_TYPE_EMPTY; int result; gnutls_datum_t value = { NULL, 0 }; if ((result = asn1_create_element (_gnutls_get_pkix(), "PKIX1.ProxyCertI...
0
[]
gnutls
d6972be33264ecc49a86cd0958209cd7363af1e9
56,822,815,354,946,650,000,000,000,000,000,000,000
74
eliminated double-free in the parsing of dist points Reported by Robert Święcki.
static int atl2_close(struct net_device *netdev) { struct atl2_adapter *adapter = netdev_priv(netdev); WARN_ON(test_bit(__ATL2_RESETTING, &adapter->flags)); atl2_down(adapter); atl2_free_irq(adapter); atl2_free_ring_resources(adapter); return 0; }
0
[ "CWE-200" ]
linux
f43bfaeddc79effbf3d0fcb53ca477cca66f3db8
279,607,679,267,072,240,000,000,000,000,000,000,000
12
atl2: Disable unimplemented scatter/gather feature atl2 includes NETIF_F_SG in hw_features even though it has no support for non-linear skbs. This bug was originally harmless since the driver does not claim to implement checksum offload and that used to be a requirement for SG. Now that SG and checksum offload are i...
static void ima_adpcm_run_pull (_AFmoduleinst *module) { ima_adpcm_data *d = (ima_adpcm_data *) module->modspec; AFframecount frames2read = module->outc->nframes; AFframecount nframes = 0; int i, framesPerBlock, blockCount; ssize_t blocksRead, bytesDecoded; framesPerBlock = d->samplesPerBlock / d->track->f.cha...
1
[ "CWE-119" ]
audiofile
e8cf0095b3f319739f9aa1ab5a1aa52b76be8cdd
135,392,062,269,304,940,000,000,000,000,000,000,000
66
Fix decoding of multi-channel ADPCM audio files.
create_trace_option_file(struct trace_array *tr, struct trace_option_dentry *topt, struct tracer_flags *flags, struct tracer_opt *opt) { struct dentry *t_options; t_options = trace_options_init_dentry(tr); if (!t_options) return; topt->flags = flags; topt->opt = opt; topt->tr = tr; topt->entry =...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
321,644,912,274,922,500,000,000,000,000,000,000,000
19
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...