func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static ssize_t _hostsock_sendto( oe_fd_t* sock_, const void* buf, size_t count, int flags, const struct oe_sockaddr* dest_addr, oe_socklen_t addrlen) { ssize_t ret = -1; sock_t* sock = _cast_sock(sock_); oe_errno = 0; if (!sock || (count && !buf)) OE_RAISE_ERRNO(OE_EINV...
1
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
130,588,312,735,210,700,000,000,000,000,000,000,000
31
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
dp_packet_l4_checksum_valid(struct dp_packet *p) { #ifdef DPDK_NETDEV return (p->mbuf.ol_flags & PKT_RX_L4_CKSUM_MASK) == PKT_RX_L4_CKSUM_GOOD; #else return 0 && p; #endif }
0
[ "CWE-400" ]
ovs
35c280072c1c3ed58202745b7d27fbbd0736999b
809,835,770,303,769,400,000,000,000,000,000,000
9
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...
void tracing_reset_all_online_cpus(void) { struct trace_array *tr; list_for_each_entry(tr, &ftrace_trace_arrays, list) { if (!tr->clear_trace) continue; tr->clear_trace = false; tracing_reset_online_cpus(&tr->trace_buffer); #ifdef CONFIG_TRACER_MAX_TRACE tracing_reset_online_cpus(&tr->max_buffer); #endif ...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
85,101,791,834,152,390,000,000,000,000,000,000,000
14
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...
void tm_recheckpoint(struct thread_struct *thread, unsigned long orig_msr) { unsigned long flags; /* We really can't be interrupted here as the TEXASR registers can't * change and later in the trecheckpoint code, we have a userspace R1. * So let's hard disable over this region. */ local_irq_save(flags)...
1
[]
linux
5d176f751ee3c6eededd984ad409bff201f436a7
145,633,752,421,284,100,000,000,000,000,000,000,000
21
powerpc: tm: Enable transactional memory (TM) lazily for userspace Currently the MSR TM bit is always set if the hardware is TM capable. This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and TFAIR) must be swapped for each process regardless of if they use TM. For processes that don't use TM the TM MSR ...
static int rtsx_usb_ms_runtime_suspend(struct device *dev) { struct rtsx_usb_ms *host = dev_get_drvdata(dev); if (host->system_suspending) return 0; if (host->msh->card || host->power_mode != MEMSTICK_POWER_OFF) return -EAGAIN; return 0; }
0
[ "CWE-416" ]
linux
42933c8aa14be1caa9eda41f65cde8a3a95d3e39
144,237,062,365,209,970,000,000,000,000,000,000,000
12
memstick: rtsx_usb_ms: fix UAF This patch fixes the following issues: 1. memstick_free_host() will free the host, so the use of ms_dev(host) after it will be a problem. To fix this, move memstick_free_host() after when we are done with ms_dev(host). 2. In rtsx_usb_ms_drv_remove(), pm need to be disabled before we remo...
PHP_FUNCTION(dom_document_xinclude) { zval *id; xmlDoc *docp; xmlNodePtr root; long flags = 0; int err; dom_object *intern; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", &id, dom_document_class_entry, &flags) == FAILURE) { return; } DOM_GET_OBJ(docp, id, xmlDocPtr, intern); ...
0
[ "CWE-20" ]
php-src
f7d7befae8bcc2db0093f8adaa9f72eeb7ad891e
285,365,403,904,557,100,000,000,000,000,000,000,000
36
Fix #69719 - more checks for nulls in paths
append_command(char_u *cmd) { char_u *s = cmd; char_u *d; STRCAT(IObuff, ": "); d = IObuff + STRLEN(IObuff); while (*s != NUL && d - IObuff < IOSIZE - 7) { if (enc_utf8 ? (s[0] == 0xc2 && s[1] == 0xa0) : *s == 0xa0) { s += enc_utf8 ? 2 : 1; STRCPY(d, "<a0>"); d += 4; } else ...
1
[ "CWE-416" ]
vim
d88934406c5375d88f8f1b65331c9f0cab68cc6c
134,818,511,108,757,280,000,000,000,000,000,000,000
20
patch 8.2.4895: buffer overflow with invalid command with composing chars Problem: Buffer overflow with invalid command with composing chars. Solution: Check that the whole character fits in the buffer.
_kdc_is_anon_request(const KDC_REQ_BODY *b) { /* some versions of heimdal use bit 14 instead of 16 for request_anonymous, as indicated in the anonymous draft prior to version 11. Bit 14 is assigned to S4U2Proxy, but all S4U2Proxy requests will have a second ticket; don't consider those anonymous */ return...
0
[ "CWE-476" ]
heimdal
1a6a6e462dc2ac6111f9e02c6852ddec4849b887
157,815,204,129,751,260,000,000,000,000,000,000,000
9
Security: Avoid NULL structure pointer member dereference This can happen in the error path when processing malformed AS requests with a NULL client name. Bug originally introduced on Fri Feb 13 09:26:01 2015 +0100 in commit: a873e21d7c06f22943a90a41dc733ae76799390d kdc: base _kdc_fast_mk_error() on krb5_mk...
static CURLcode http_perhapsrewind(struct connectdata *conn) { struct SessionHandle *data = conn->data; struct HTTP *http = data->req.protop; curl_off_t bytessent; curl_off_t expectsend = -1; /* default is unknown */ if(!http) /* If this is still NULL, we have not reach very far and we can safely ...
0
[ "CWE-284" ]
curl
79b9d5f1a42578f807a6c94914bc65cbaa304b6d
92,606,060,485,783,930,000,000,000,000,000,000,000
100
http_done: close Negotiate connections when done When doing HTTP requests Negotiate authenticated, the entire connnection may become authenticated and not just the specific HTTP request which is otherwise how HTTP works, as Negotiate can basically use NTLM under the hood. curl was not adhering to this fact but would a...
static u16 bnx2x_update_dsb_idx(struct bnx2x *bp) { struct host_sp_status_block *def_sb = bp->def_status_blk; u16 rc = 0; barrier(); /* status block is written to by the chip */ if (bp->def_att_idx != def_sb->atten_status_block.attn_bits_index) { bp->def_att_idx = def_sb->atten_status_block.attn_bits_index; rc...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
115,824,185,322,137,060,000,000,000,000,000,000,000
20
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
void LibRaw::nikon_load_sraw() { // We're already seeked to data! unsigned char *rd = (unsigned char *)malloc(3*(imgdata.sizes.raw_width+2)); if(!rd) throw LIBRAW_EXCEPTION_ALLOC; try { int row,col; for(row = 0; row < imgdata.sizes.raw_height; row++) { checkCancel(); libraw_interna...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
117,951,063,835,022,110,000,000,000,000,000,000,000
81
fixed two more problems found by fuzzer
void Curl_cleanup_negotiate(struct SessionHandle *data) { cleanup(&data->state.negotiate); cleanup(&data->state.proxyneg); }
0
[ "CWE-284" ]
curl
f78ae415d24b9bd89d6c121c556e411fdb21c6aa
247,319,127,650,138,100,000,000,000,000,000,000,000
5
Don't clear GSSAPI state between each exchange in the negotiation GSSAPI doesn't work very well if we forget everything ever time. XX: Is Curl_http_done() the right place to do the final cleanup?
void SSL_CTX_free(SSL_CTX *a) { int i; if (a == NULL) return; i = CRYPTO_add(&a->references, -1, CRYPTO_LOCK_SSL_CTX); #ifdef REF_PRINT REF_PRINT("SSL_CTX", a); #endif if (i > 0) return; #ifdef REF_CHECK if (i < 0) { fprintf(stderr, "SSL_CTX_free, bad reference count\n"...
0
[ "CWE-310" ]
openssl
56f1acf5ef8a432992497a04792ff4b3b2c6f286
181,674,553,257,640,120,000,000,000,000,000,000,000
86
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...
Silence_log_table_errors() { m_message[0]= '\0'; }
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
276,103,867,908,542,400,000,000,000,000,000,000,000
4
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
static inline void assert_list_leaf_cfs_rq(struct rq *rq) { SCHED_WARN_ON(rq->tmp_alone_branch != &rq->leaf_cfs_rq_list); }
0
[ "CWE-400", "CWE-703" ]
linux
de53fd7aedb100f03e5d2231cfce0e4993282425
46,453,036,215,906,010,000,000,000,000,000,000,000
4
sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices It has been observed, that highly-threaded, non-cpu-bound applications running under cpu.cfs_quota_us constraints can hit a high percentage of periods throttled while simultaneously not consuming the allocated amount of quota...
long ssl2_ctrl(SSL *s, int cmd, long larg, void *parg) { int ret = 0; switch (cmd) { case SSL_CTRL_GET_SESSION_REUSED: ret = s->hit; break; case SSL_CTRL_CHECK_PROTO_VERSION: return ssl3_ctrl(s, SSL_CTRL_CHECK_PROTO_VERSION, larg, parg); default: break; } ret...
0
[ "CWE-20" ]
openssl
86f8fb0e344d62454f8daf3e15236b2b59210756
287,857,253,742,669,300,000,000,000,000,000,000,000
15
Fix reachable assert in SSLv2 servers. This assert is reachable for servers that support SSLv2 and export ciphers. Therefore, such servers can be DoSed by sending a specially crafted SSLv2 CLIENT-MASTER-KEY. Also fix s2_srvr.c to error out early if the key lengths are malformed. These lengths are sent unencrypted, so...
void CSoundFile::FineVolumeDown(ModChannel *pChn, ModCommand::PARAM param, bool volCol) const { if(GetType() == MOD_TYPE_XM) { // FT2 compatibility: EAx / EBx memory is not linked // Test case: FineVol-LinkMem.xm if(param) pChn->nOldFineVolUpDown = param | (pChn->nOldFineVolUpDown & 0xF0); else param = (pChn->n...
0
[ "CWE-125" ]
openmpt
7ebf02af2e90f03e0dbd0e18b8b3164f372fb97c
286,709,257,813,975,000,000,000,000,000,000,000,000
22
[Fix] Possible out-of-bounds read when computing length of some IT files with pattern loops (OpenMPT: formats that are converted to IT, libopenmpt: IT/ITP/MO3), caught with afl-fuzz. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@10027 56274372-70c3-4bfc-bfc3-4c3a0b034d27
bool TABLE::vers_check_update(List<Item> &items) { List_iterator<Item> it(items); if (!versioned_write()) return false; while (Item *item= it++) { if (Item_field *item_field= item->field_for_view_update()) { Field *field= item_field->field; if (field->table == this && !field->vers_updat...
0
[ "CWE-617" ]
server
ecb6f9c894d3ebafeff1c6eb3b65cd248062296f
332,764,127,789,507,200,000,000,000,000,000,000,000
20
MDEV-28095 crash in multi-update and implicit grouping disallow implicit grouping in multi-update. explicit GROUP BY is not allowed by the grammar.
static int afiucv_hs_callback_fin(struct sock *sk, struct sk_buff *skb) { struct iucv_sock *iucv = iucv_sk(sk); /* other end of connection closed */ if (!iucv) goto out; bh_lock_sock(sk); if (sk->sk_state == IUCV_CONNECTED) { sk->sk_state = IUCV_DISCONN; sk->sk_state_change(sk); } bh_unlock_sock(sk); out:...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
220,760,120,831,382,900,000,000,000,000,000,000,000
17
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static long vma_needs_reservation(struct hstate *h, struct vm_area_struct *vma, unsigned long addr) { return __vma_reservation_common(h, vma, addr, VMA_NEEDS_RESV); }
0
[ "CWE-703" ]
linux
5af10dfd0afc559bb4b0f7e3e8227a1578333995
151,599,106,343,715,700,000,000,000,000,000,000,000
5
userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page before returning in case of errors. The error returned was -EEXIST by running UFFDIO_COPY on a non-hole offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that t...
void authCommand(redisClient *c) { if (!server.requirepass || !strcmp(c->argv[1]->ptr, server.requirepass)) { c->authenticated = 1; addReply(c,shared.ok); } else { c->authenticated = 0; addReplyError(c,"invalid password"); } }
0
[ "CWE-20" ]
redis
697af434fbeb2e3ba2ba9687cd283ed1a2734fa5
334,618,778,177,723,370,000,000,000,000,000,000,000
9
initial changes needed to turn the current VM code into a cache system. Tons of work to do still.
pk_transaction_get_files (PkTransaction *transaction, GVariant *params, GDBusMethodInvocation *context) { gboolean ret; guint length; g_autoptr(GError) error = NULL; g_autofree gchar **package_ids = NULL; g_autofree gchar *package_ids_temp = NULL; g_return_if_fail (PK_IS_TRANSACTION (transaction)); g_...
0
[ "CWE-287" ]
PackageKit
7e8a7905ea9abbd1f384f05f36a4458682cd4697
278,328,653,760,458,140,000,000,000,000,000,000,000
60
Do not set JUST_REINSTALL on any kind of auth failure If we try to continue the auth queue when it has been cancelled (or failed) then we fall upon the obscure JUST_REINSTALL transaction flag which only the DNF backend actually verifies. Many thanks to Matthias Gerstner <mgerstner@suse.de> for spotting the problem.
*/ PHP_FUNCTION(date_date_set) { zval *object; php_date_obj *dateobj; long y, m, d; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Olll", &object, date_ce_date, &y, &m, &d) == FAILURE) { RETURN_FALSE; } dateobj = (php_date_obj *) zend_object_store_get_object(object TSR...
0
[]
php-src
7b1898183032eeabc64a086ff040af991cebcd93
321,106,689,895,951,500,000,000,000,000,000,000,000
18
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone) Conflicts: ext/date/php_date.c
bytes_maketrans_impl(Py_buffer *frm, Py_buffer *to) /*[clinic end generated code: output=a36f6399d4b77f6f input=de7a8fc5632bb8f1]*/ { return _Py_bytes_maketrans(frm, to); }
0
[ "CWE-190" ]
cpython
fd8614c5c5466a14a945db5b059c10c0fb8f76d9
132,759,059,542,604,850,000,000,000,000,000,000,000
5
bpo-30657: Fix CVE-2017-1000158 (#4664) Fixes possible integer overflow in PyBytes_DecodeEscape. Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com>
static void __fanout_unlink(struct sock *sk, struct packet_sock *po) { struct packet_fanout *f = po->fanout; int i; spin_lock(&f->lock); for (i = 0; i < f->num_members; i++) { if (rcu_dereference_protected(f->arr[i], lockdep_is_held(&f->lock)) == sk) break; } BUG_ON(i >= f->num_members); rcu_ass...
0
[ "CWE-415" ]
linux
ec6af094ea28f0f2dda1a6a33b14cd57e36a9755
330,941,688,133,599,070,000,000,000,000,000,000,000
20
net/packet: rx_owner_map depends on pg_vec Packet sockets may switch ring versions. Avoid misinterpreting state between versions, whose fields share a union. rx_owner_map is only allocated with a packet ring (pg_vec) and both are swapped together. If pg_vec is NULL, meaning no packet ring was allocated, then neither w...
bool OSDService::is_failsafe_full() const { Mutex::Locker l(full_status_lock); return cur_state == FAILSAFE; }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
339,101,743,241,304,060,000,000,000,000,000,000,000
5
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 ...
CAMLprim value caml_ml_string_length(value s) { mlsize_t temp; temp = Bosize_val(s) - 1; Assert (Byte (s, temp - Byte (s, temp)) == 0); return Val_long(temp - Byte (s, temp)); }
0
[ "CWE-200" ]
ocaml
659615c7b100a89eafe6253e7a5b9d84d0e8df74
255,471,050,453,872,040,000,000,000,000,000,000,000
7
fix PR#7003 and a few other bugs caused by misuse of Int_val git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16525 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
static VALUE from_document(VALUE klass, VALUE document) { xmlDocPtr doc; xmlRelaxNGParserCtxtPtr ctx; xmlRelaxNGPtr schema; VALUE errors; VALUE rb_schema; Data_Get_Struct(document, xmlDoc, doc); /* In case someone passes us a node. ugh. */ doc = doc->doc; ctx = xmlRelaxNGNewDocParserCtxt(doc); e...
1
[ "CWE-611", "CWE-703" ]
nokogiri
9c87439d9afa14a365ff13e73adc809cb2c3d97b
278,629,349,903,674,150,000,000,000,000,000,000,000
46
feat: XML::Schema and RelaxNG creation accept optional ParseOptions I'm trying out a new pattern, which is that the parsed object carries around the ParseOptions it was created with, which should make some testing a bit easier. I'm also not implementing the "config block" pattern in use for Documents, because I think...
static size_t php_mysqlnd_sha256_pk_request_write(MYSQLND_CONN_DATA * conn, void * _packet) { MYSQLND_ERROR_INFO * error_info = conn->error_info; MYSQLND_PFC * pfc = conn->protocol_frame_codec; MYSQLND_VIO * vio = conn->vio; MYSQLND_STATS * stats = conn->stats; zend_uchar buffer[MYSQLND_HEADER_SIZE + 1]; size_t s...
0
[ "CWE-120" ]
php-src
58006537fc5f133ae8549efe5118cde418b3ace9
64,908,506,512,794,730,000,000,000,000,000,000,000
16
Fix bug #81719: mysqlnd/pdo password buffer overflow
zopen_file(i_ctx_t *i_ctx_p, const gs_parsed_file_name_t *pfn, const char *file_access, stream **ps, gs_memory_t *mem) { gx_io_device *const iodev = pfn->iodev; int code = 0; if (pfn->fname == NULL) { /* just a device */ iodev->state = i_ctx_p; code = iodev->procs.open_device...
0
[ "CWE-200" ]
ghostpdl
ab109aaeb3ddba59518b036fb288402a65cf7ce8
176,785,924,533,400,600,000,000,000,000,000,000,000
29
Bug 694724: Have filenameforall and getenv honor SAFER
SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{ */ { zval **val = NULL; char *cafile = NULL; char *capath = NULL; char *certfile = NULL; char *cipherlist = NULL; int ok = 1; ERR_clear_error(); /* look at context options in the stream and set appropriate verification flags */ ...
0
[ "CWE-200" ]
php-src
270a406ac94b5fc5cc9ef59fc61e3b4b95648a3e
131,433,080,982,431,830,000,000,000,000,000,000,000
108
Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only
static int dict_load(const char *fname) { FILE *f; char *ptr[4], *endptr; int r, n = 0; struct rad_dict_attr_t *attr = NULL; struct rad_dict_value_t *val; struct rad_dict_vendor_t *vendor; struct list_head *items; struct list_head *parent_items = NULL; f = fopen(fname, "r"); if (!f) { log_emerg("radius: op...
0
[ "CWE-787" ]
accel-ppp
d4cb89721cc8e5b3dd3fbefaf173eb77ecb85615
111,489,660,655,839,450,000,000,000,000,000,000,000
199
fix buffer overflow when receive radius packet This patch fixes buffer overflow if radius packet contains invalid atribute length and attrubute type from the following list: ipv4addr, ipv6addr, ipv6prefix or ifid Reported-by: Chloe Ong Reported-by: Eugene Lim <spaceraccoon@users.noreply.github.com> Reported-by: Kar We...
static struct cgroup_meta_data *lxc_cgroup_put_meta(struct cgroup_meta_data *meta_data) { size_t i; if (!meta_data) return NULL; if (--meta_data->ref > 0) return meta_data; lxc_free_array((void **)meta_data->mount_points, (lxc_free_fn)lxc_cgroup_mount_point_free); if (meta_data->hierarchies) { for (i = 0; i ...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
287,904,002,616,587,440,000,000,000,000,000,000,000
16
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
static __u32 __packet_set_timestamp(struct packet_sock *po, void *frame, struct sk_buff *skb) { union tpacket_uhdr h; struct timespec ts; __u32 ts_status; if (!(ts_status = tpacket_get_timestamp(skb, &ts, po->tp_tstamp))) return 0; h.raw = frame; switch (po->tp_version) { case TPACKET_V1: h.h1->tp_...
0
[ "CWE-416", "CWE-362" ]
linux
84ac7260236a49c79eede91617700174c2c19b0c
230,208,553,999,004,530,000,000,000,000,000,000,000
32
packet: fix race condition in packet_set_ring When packet_set_ring creates a ring buffer it will initialize a struct timer_list if the packet version is TPACKET_V3. This value can then be raced by a different thread calling setsockopt to set the version to TPACKET_V1 before packet_set_ring has finished. This leads to...
static uint name_add(char *dest, const char *first_name, const char *sec_name) { return (uint) (strxmov(dest, first_name, "#SP#", sec_name, NullS) -dest) + 1; }
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
89,687,969,953,735,700,000,000,000,000,000,000,000
4
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
inline uint8x8_t ComputeLerpx8Tmpl(const quint8* const yl, const quint8* yu, const int64* xl, const int64* xu, const int16* xlp, const int16x8_t ys_lerpsx) { return ComputeLerpx8<RESOLUTION>( yl + xl[ID0] + ...
0
[ "CWE-787" ]
tensorflow
f6c40f0c6cbf00d46c7717a26419f2062f2f8694
201,872,082,362,609,100,000,000,000,000,000,000,000
17
Validate min and max arguments to `QuantizedResizeBilinear`. PiperOrigin-RevId: 369765091 Change-Id: I33be8b78273ab7d08b97541692fe05cb7f94963a
void kfree_skb_partial(struct sk_buff *skb, bool head_stolen) { if (head_stolen) { skb_release_head_state(skb); kmem_cache_free(skbuff_head_cache, skb); } else { __kfree_skb(skb); }
0
[ "CWE-703", "CWE-125" ]
linux
8605330aac5a5785630aec8f64378a54891937cc
253,143,968,966,410,100,000,000,000,000,000,000,000
9
tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs __sock_recv_timestamp can be called for both normal skbs (for receive timestamps) and for skbs on the error queue (for transmit timestamps). Commit 1c885808e456 (tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING) assumes any skb passed to __sock_recv_timest...
static CURLcode imap_easy_statemach(struct connectdata *conn) { struct imap_conn *imapc = &conn->proto.imapc; struct pingpong *pp = &imapc->pp; CURLcode result = CURLE_OK; while(imapc->state != IMAP_STOP) { result = Curl_pp_easy_statemach(pp); if(result) break; } return result; }
0
[ "CWE-89" ]
curl
75ca568fa1c19de4c5358fed246686de8467c238
213,898,717,468,564,280,000,000,000,000,000,000,000
14
URL sanitize: reject URLs containing bad data Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a decoded manner now use the new Curl_urldecode() function to reject URLs with embedded control codes (anything that is or decodes to a byte value less than 32). URLs containing such codes could easily oth...
ex_copy(linenr_T line1, linenr_T line2, linenr_T n) { linenr_T count; char_u *p; count = line2 - line1 + 1; if ((cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0) { curbuf->b_op_start.lnum = n + 1; curbuf->b_op_end.lnum = n + count; curbuf->b_op_start.col = curbuf->b_op_end.col = 0; } /* *...
0
[ "CWE-416" ]
vim
37f47958b8a2a44abc60614271d9537e7f14e51a
119,592,445,784,710,740,000,000,000,000,000,000,000
55
patch 8.2.4253: using freed memory when substitute with function call Problem: Using freed memory when substitute uses a recursive function call. Solution: Make a copy of the substitute text.
static int eval_map_show(struct seq_file *m, void *v) { union trace_eval_map_item *ptr = v; seq_printf(m, "%s %ld (%s)\n", ptr->map.eval_string, ptr->map.eval_value, ptr->map.system); return 0; }
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
30,688,489,493,753,780,000,000,000,000,000,000,000
10
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...
int rdma_set_min_rnr_timer(struct rdma_cm_id *id, u8 min_rnr_timer) { struct rdma_id_private *id_priv; /* It is a five-bit value */ if (min_rnr_timer & 0xe0) return -EINVAL; if (WARN_ON(id->qp_type != IB_QPT_RC && id->qp_type != IB_QPT_XRC_TGT)) return -EINVAL; id_priv = container_of(id, struct rdma_id_priv...
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
218,104,421,537,997,800,000,000,000,000,000,000,000
19
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
epsc_print_page(gx_device_printer * pdev, gp_file * prn_stream) { static int graphics_modes_9[5] = { -1, 0 /*60 */ , 1 /*120 */ , -1, DD + 3 /*240 */ }; static int graphics_modes_24[7] = { -1, 32 /*60 */ , 33 /*120 */ , 39 /*180 */ , -1, -1, DD + 40 /*360 */ }; int y_24pin =...
0
[ "CWE-120" ]
ghostpdl
89f58f1aa95b3482cadf6977da49457194ee5358
234,391,078,230,245,680,000,000,000,000,000,000,000
295
Bug 701794: check for x_dpi out of range in epsc_print_page(). Avoids out-of-bounds of local arrays graphics_modes_9 and graphics_modes_24. Larger diff than would like, because can't return error from within declarations in old-style C. Fixes: ./sanbin/gs -r680 -sOutputFile=tmp -sDEVICE=epsonc ../bug-701794.pdf
void test_nghttp2_submit_headers_continuation_extra_large(void) { nghttp2_session *session; nghttp2_session_callbacks callbacks; nghttp2_nv nv[] = { MAKE_NV("h1", ""), MAKE_NV("h1", ""), MAKE_NV("h1", ""), MAKE_NV("h1", ""), MAKE_NV("h1", ""), MAKE_NV("h1", ""), }; nghttp2_outbound_item *item; u...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
210,303,486,819,510,160,000,000,000,000,000,000,000
44
Add nghttp2_option_set_max_outbound_ack
static void ndp_msg_type_set(struct ndp_msg *msg, enum ndp_msg_type msg_type) { msg->icmp6_hdr->icmp6_type = ndp_msg_type_info(msg_type)->raw_type; }
0
[ "CWE-284" ]
libndp
a4892df306e0532487f1634ba6d4c6d4bb381c7f
129,140,671,345,641,350,000,000,000,000,000,000,000
4
libndp: validate the IPv6 hop limit None of the NDP messages should ever come from a non-local network; as stated in RFC4861's 6.1.1 (RS), 6.1.2 (RA), 7.1.1 (NS), 7.1.2 (NA), and 8.1. (redirect): - The IP Hop Limit field has a value of 255, i.e., the packet could not possibly have been forwarded by a router. T...
static int smack_task_getpgid(struct task_struct *p) { return smk_curacc_on_task(p, MAY_READ, __func__); }
0
[ "CWE-416" ]
linux
a3727a8bac0a9e77c70820655fd8715523ba3db7
74,234,932,336,032,090,000,000,000,000,000,000,000
4
selinux,smack: fix subjective/objective credential use mixups Jann Horn reported a problem with commit eb1231f73c4d ("selinux: clarify task subjective and objective credentials") where some LSM hooks were attempting to access the subjective credentials of a task other than the current task. Generally speaking, it is ...
ZEND_VM_HANDLER(8, ZEND_CONCAT, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(NO_CONST_CONST)) { USE_OPLINE zend_free_op free_op1, free_op2; zval *op1, *op2; op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R); if ((OP1_TYPE == IS_CONST || EXPECTED(Z_TYPE_P(op1) == IS_STRING)) && (OP2_T...
1
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
211,660,610,411,190,700,000,000,000,000,000,000,000
71
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
virtio_device_cfg_read(struct pci_vdev *dev, uint64_t offset, int size) { struct virtio_base *base = dev->arg; struct virtio_ops *vops; const char *name; uint32_t value; uint64_t max; int error = -1; vops = base->vops; name = vops->name; value = size == 1 ? 0xff : size == 2 ? 0xffff : 0xffffffff; max = vops-...
0
[ "CWE-476" ]
acrn-hypervisor
154fe59531c12b82e26d1b24b5531f5066d224f5
54,437,989,977,359,760,000,000,000,000,000,000,000
31
dm: validate inputs in vq_endchains inputs shall be validated to avoid NULL pointer access. Tracked-On: #6129 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
int ossl_gost18_cke_cipher_nid(const SSL *s) { if ((s->s3.tmp.new_cipher->algorithm_enc & SSL_MAGMA) != 0) return NID_magma_ctr; else if ((s->s3.tmp.new_cipher->algorithm_enc & SSL_KUZNYECHIK) != 0) return NID_kuznyechik_ctr; return NID_undef; }
0
[ "CWE-835" ]
openssl
758754966791c537ea95241438454aa86f91f256
196,466,267,351,084,450,000,000,000,000,000,000,000
9
Fix invalid handling of verify errors in libssl In the event that X509_verify() returned an internal error result then libssl would mishandle this and set rwstate to SSL_RETRY_VERIFY. This subsequently causes SSL_get_error() to return SSL_ERROR_WANT_RETRY_VERIFY. That return code is supposed to only ever be returned i...
static inline __sum16 dccp_v6_csum_finish(struct sk_buff *skb, const struct in6_addr *saddr, const struct in6_addr *daddr) { return csum_ipv6_magic(saddr, daddr, skb->len, IPPROTO_DCCP, skb->csum); }
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
42,744,913,143,783,490,000,000,000,000,000,000,000
6
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...
size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags) { tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp); status = tinfl_decompress(&decomp, (const...
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
36,097,626,985,469,165,000,000,000,000,000,000,000
14
Make line_no with too large value(2**20) invalid. Fixes #124
static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) { struct sock *sk = sock->sk; struct nfc_llcp_sock *llcp_sock = nfc_llcp_sock(sk); struct nfc_llcp_local *local; struct nfc_dev *dev; struct sockaddr_nfc_llcp llcp_addr; int len, ret = 0; if (!addr || addr->sa_family != AF_NFC) re...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
244,941,519,853,737,330,000,000,000,000,000,000,000
72
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
RZ_API void rz_core_analysis_paths(RzCore *core, ut64 from, ut64 to, bool followCalls, int followDepth, bool is_json) { RzAnalysisBlock *b0 = rz_analysis_find_most_relevant_block_in(core->analysis, from); RzAnalysisBlock *b1 = rz_analysis_find_most_relevant_block_in(core->analysis, to); PJ *pj = NULL; if (!b0) { ...
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
172,605,874,579,071,900,000,000,000,000,000,000,000
46
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
static void vmx_free_vcpu_nested(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); vcpu_load(vcpu); vmx_switch_vmcs(vcpu, &vmx->vmcs01); free_nested(vmx); vcpu_put(vcpu); }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
242,666,696,575,877,320,000,000,000,000,000,000,000
9
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
TensorSliceReader::~TensorSliceReader() { for (auto& temp : tensors_) { delete temp.second; } tensors_.clear(); }
0
[ "CWE-369", "CWE-345" ]
tensorflow
b619c6f865715ca3b15ef1842b5b95edbaa710ad
51,269,979,966,861,770,000,000,000,000,000,000,000
6
Use BuildTensorShapeBase when parsing unverified TensorShapes during checkpoint loading. This avoids crashing when the TensorShape has negative dimensions. PiperOrigin-RevId: 392769882 Change-Id: Id1f7ae7fcf8142193556af47abfda81b13d3cce4
static void print_comment(FILE *sql_file, my_bool is_error, const char *format, ...) { static char comment_buff[COMMENT_LENGTH]; va_list args; /* If its an error message, print it ignoring opt_comments. */ if (!is_error && !opt_comments) return; va_start(args, format); my_vsn...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
163,154,071,286,368,750,000,000,000,000,000,000,000
23
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static void task_clear_group_stop_trapping(struct task_struct *task) { if (unlikely(task->group_stop & GROUP_STOP_TRAPPING)) { task->group_stop &= ~GROUP_STOP_TRAPPING; __wake_up_sync_key(&task->parent->signal->wait_chldexit, TASK_UNINTERRUPTIBLE, 1, task); } }
0
[ "CWE-400" ]
linux-stable-rt
bcf6b1d78c0bde228929c388978ed3af9a623463
28,799,333,913,393,614,000,000,000,000,000,000,000
8
signal/x86: Delay calling signals in atomic On x86_64 we must disable preemption before we enable interrupts for stack faults, int3 and debugging, because the current task is using a per CPU debug stack defined by the IST. If we schedule out, another task can come in and use the same stack and cause the stack to be co...
static vm_fault_t vma_fault(struct vm_fault *vmf) { struct page *page; page = vmalloc_to_page((void *)(vmf->pgoff << PAGE_SHIFT)); if (!page) return VM_FAULT_SIGBUS; get_page(page); vmf->page = page; return 0; }
0
[ "CWE-416" ]
linux
3d2a9d642512c21a12d19b9250e7a835dcb41a79
46,345,327,427,442,760,000,000,000,000,000,000,000
13
IB/hfi1: Ensure correct mm is used at all times Two earlier bug fixes have created a security problem in the hfi1 driver. One fix aimed to solve an issue where current->mm was not valid when closing the hfi1 cdev. It attempted to do this by saving a cached value of the current->mm pointer at file open time. This is a ...
static int link_schedule_user(struct tipc_link *l, struct tipc_msg *hdr) { u32 dnode = tipc_own_addr(l->net); u32 dport = msg_origport(hdr); struct sk_buff *skb; /* Create and schedule wakeup pseudo message */ skb = tipc_msg_create(SOCK_WAKEUP, 0, INT_H_SIZE, 0, dnode, l->addr, dport, 0, 0); if (!skb) ...
0
[ "CWE-787" ]
linux
9aa422ad326634b76309e8ff342c246800621216
181,693,274,084,389,500,000,000,000,000,000,000,000
18
tipc: improve size validations for received domain records The function tipc_mon_rcv() allows a node to receive and process domain_record structs from peer nodes to track their views of the network topology. This patch verifies that the number of members in a received domain record does not exceed the limit defined b...
static void ext4_xattr_inode_free_quota(struct inode *parent, struct inode *ea_inode, size_t len) { if (ea_inode && ext4_test_inode_state(ea_inode, EXT4_STATE_LUSTRE_EA_INODE)) return; dquot_free_space_nodirty(parent, round_up_cluster(parent, len)); dquot_free_inode(parent); }
0
[]
linux
54dd0e0a1b255f115f8647fc6fb93273251b01b9
206,725,768,331,729,500,000,000,000,000,000,000,000
10
ext4: add extra checks to ext4_xattr_block_get() Add explicit checks in ext4_xattr_block_get() just in case the e_value_offs and e_value_size fields in the the xattr block are corrupted in memory after the buffer_verified bit is set on the xattr block. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.or...
jint InstanceKlass::compute_modifier_flags(TRAPS) const { jint access = access_flags().as_int(); // But check if it happens to be member class. InnerClassesIterator iter(this); for (; !iter.done(); iter.next()) { int ioff = iter.inner_class_info_index(); // Inner class attribute can be zero, skip it. ...
0
[]
jdk11u-dev
41825fa33d605f8501164f9296572e4378e8183b
29,244,076,544,924,614,000,000,000,000,000,000,000
23
8270386: Better verification of scan methods Reviewed-by: mbaesken Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
int __attribute__((weak)) kvm_vm_ioctl_enable_cap(struct kvm *kvm, struct kvm_enable_cap *cap) { return -EINVAL; }
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
255,083,166,200,203,800,000,000,000,000,000,000,000
5
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...
static void vhost_work_flush(struct vhost_dev *dev, struct vhost_work *work) { unsigned seq; int flushing; spin_lock_irq(&dev->work_lock); seq = work->queue_seq; work->flushing++; spin_unlock_irq(&dev->work_lock); wait_event(work->done, vhost_work_seq_done(dev, work, seq)); spin_lock_irq(&dev->work_lock); flu...
0
[]
linux-2.6
bd97120fc3d1a11f3124c7c9ba1d91f51829eb85
164,354,457,103,737,100,000,000,000,000,000,000,000
15
vhost: fix length for cross region descriptor If a single descriptor crosses a region, the second chunk length should be decremented by size translated so far, instead it includes the full descriptor length. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: D...
GC_INNER void GC_init_win32(void) { # if defined(_WIN64) || (defined(_MSC_VER) && _MSC_VER >= 1800) /* MS Visual Studio 2013 deprecates GetVersion, but on the other */ /* hand it cannot be used to target pre-Win2K. */ GC_wnt = TRUE; # else /* Set GC_wnt. If we're run...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
34,709,056,765,900,086,000,000,000,000,000,000,000
22
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
static int __init serial_ir_init_module(void) { int result; switch (type) { case IR_HOMEBREW: case IR_IRDEO: case IR_IRDEO_REMOTE: case IR_ANIMAX: case IR_IGOR: /* if nothing specified, use ttyS0/com1 and irq 4 */ io = io ? io : 0x3f8; irq = irq ? irq : 4; break; default: return -EINVAL; } if (!sof...
1
[ "CWE-416" ]
linux
56cd26b618855c9af48c8301aa6754ced8dd0beb
123,847,673,145,329,600,000,000,000,000,000,000,000
38
media: serial_ir: Fix use-after-free in serial_ir_init_module Syzkaller report this: BUG: KASAN: use-after-free in sysfs_remove_file_ns+0x5f/0x70 fs/sysfs/file.c:468 Read of size 8 at addr ffff8881dc7ae030 by task syz-executor.0/6249 CPU: 1 PID: 6249 Comm: syz-executor.0 Not tainted 5.0.0-rc8+ #3 Hardware name: QEMU...
BOOL rfx_context_reset(RFX_CONTEXT* context, UINT32 width, UINT32 height) { if (!context) return FALSE; context->width = width; context->height = height; context->state = RFX_STATE_SEND_HEADERS; context->expectedDataBlockType = WBT_FRAME_BEGIN; context->frameIdx = 0; return TRUE; }
0
[ "CWE-125" ]
FreeRDP
3a06ce058f690b7fc1edad2f352c453376c2ebfe
225,260,835,685,013,150,000,000,000,000,000,000,000
12
Fixed oob read in rfx_process_message_tileset Check input data length Thanks to hac425 CVE-2020-11043
sctp_disposition_t sctp_sf_eat_fwd_tsn(const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *chunk = arg; struct sctp_fwdtsn_hdr *fwdtsn_hdr; __u16 len; __u32 tsn; if (!s...
0
[]
linux
bbd0d59809f923ea2b540cbd781b32110e249f6e
323,504,035,113,617,670,000,000,000,000,000,000,000
58
[SCTP]: Implement the receive and verification of AUTH chunk This patch implements the receive path needed to process authenticated chunks. Add ability to process the AUTH chunk and handle edge cases for authenticated COOKIE-ECHO as well. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David ...
static inline int cap_block_setpcap(struct task_struct *t) { return 0; }
0
[]
linux-2.6
3318a386e4ca68c76e0294363d29bdc46fcad670
309,275,699,907,062,030,000,000,000,000,000,000,000
1
file caps: always start with clear bprm->caps_* While Linux doesn't honor setuid on scripts. However, it mistakenly behaves differently for file capabilities. This patch fixes that behavior by making sure that get_file_caps() begins with empty bprm->caps_*. That way when a script is loaded, its bprm->caps_* may be ...
void ssh_crypto_finalize(void) { if (!libcrypto_initialized) { return; } ENGINE_cleanup(); #if OPENSSL_VERSION_NUMBER < 0x10100000L EVP_cleanup(); CRYPTO_cleanup_all_ex_data(); #endif libcrypto_initialized = 0; }
0
[ "CWE-476" ]
libssh
b36272eac1b36982598c10de7af0a501582de07a
331,655,332,811,029,400,000,000,000,000,000,000,000
14
CVE-2020-1730: Fix a possible segfault when zeroing AES-CTR key Fixes T213 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
static void mark_btf_ld_reg(struct bpf_verifier_env *env, struct bpf_reg_state *regs, u32 regno, enum bpf_reg_type reg_type, u32 btf_id) { if (reg_type == SCALAR_VALUE) { mark_reg_unknown(env, regs, regno); return; } mark_reg_known_zero(env, regs, regno); regs[regno].type = PTR_TO_BTF_ID; regs[re...
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
177,419,760,591,610,020,000,000,000,000,000,000,000
12
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
juniper_atm2_print(netdissect_options *ndo, const struct pcap_pkthdr *h, register const u_char *p) { int llc_hdrlen; struct juniper_l2info_t l2info; l2info.pictype = DLT_JUNIPER_ATM2; if (juniper_parse_header(ndo, p, h, &l2info) == 0) return l2info.header...
1
[ "CWE-125", "CWE-787" ]
tcpdump
b534e304568585707c4a92422aeca25cf908ff02
337,398,931,215,587,860,000,000,000,000,000,000,000
46
CVE-2017-12993/Juniper: Add more bounds checks. This fixes a buffer over-read discovered by Kamil Frankowicz. Add tests using the capture files supplied by the reporter(s).
static int de_fmtutil_default_iff_chunk_handler(deark *c, struct de_iffctx *ictx) { i64 dpos = ictx->chunkctx->dpos; i64 dlen = ictx->chunkctx->dlen; u32 chunktype = ictx->chunkctx->chunk4cc.id; switch(chunktype) { // Note that chunks appearing here should also be listed below, // in de_fmtutil_is_standard_iff...
0
[ "CWE-369" ]
deark
62acb7753b0e3c0d3ab3c15057b0a65222313334
189,727,562,406,793,030,000,000,000,000,000,000,000
29
pict,macrsrc: Fixed a bug that could cause division by 0 Found by F. Çelik.
bool CModule::CancelJob(const CString& sJobName) { for (CModuleJob* pJob : m_sJobs) { if (pJob->GetName().Equals(sJobName)) { CancelJob(pJob); return true; } } return false; }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
105,039,868,724,172,860,000,000,000,000,000,000,000
9
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
static long bio_zlib_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) { if(!b->next_bio) return 0; return BIO_callback_ctrl(b->next_bio, cmd, fp); }
0
[ "CWE-399" ]
openssl
1b31b5ad560b16e2fe1cad54a755e3e6b5e778a3
98,438,626,371,639,220,000,000,000,000,000,000,000
7
Modify compression code so it avoids using ex_data free functions. This stops applications that call CRYPTO_free_all_ex_data() prematurely leaking memory.
static void strip_username_password (char *host) { char *p; assert (host); assert (strlen (host) > 0); if ((p = strchr (host, '@')) == NULL) return; /* * Move the pointer past the "@" and then copy from that point * until the NUL to the beginn...
0
[ "CWE-200" ]
tinyproxy
3764b8551463b900b5b4e3ec0cd9bb9182191cb7
338,748,902,498,775,130,000,000,000,000,000,000,000
19
prevent junk from showing up in error page in invalid requests fixes #457
GF_Err gf_isom_get_sample_padding_bits(GF_ISOFile *the_file, u32 trackNumber, u32 sampleNumber, u8 *NbBits) { GF_TrackBox *trak; trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak) return GF_BAD_PARAM; //Padding info return stbl_GetPaddingBits(trak->Media->information->sampleTable->PaddingBits...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
243,225,993,337,513,200,000,000,000,000,000,000,000
13
fixed #1706
static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries, const unsigned int *underflows, unsigned int valid_hooks) { unsigned int...
1
[ "CWE-119", "CWE-787" ]
linux
54d83fc74aa9ec72794373cb47432c5f7fb1a309
165,482,155,979,293,660,000,000,000,000,000,000,000
51
netfilter: x_tables: fix unconditional helper Ben Hawkes says: In the mark_source_chains function (net/ipv4/netfilter/ip_tables.c) it is possible for a user-supplied ipt_entry structure to have a large next_offset field. This field is not bounds checked prior to writing a counter value at the supplied offset. Pr...
gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) { TIFF* tif = img->tif; tileSeparateRoutine put = img->put.separate; unsigned char *buf = NULL; unsigned char *p0 = NULL, *p1 = NULL, *p2 = NULL, *pa = NULL; uint32 row, y, nrow, rowstoread; tmsize_t pos; tmsize_t scanline; uint32 rowsperst...
1
[ "CWE-787" ]
libtiff
4bb584a35f87af42d6cf09d15e9ce8909a839145
189,879,546,201,224,670,000,000,000,000,000,000,000
140
RGBA interface: fix integer overflow potentially causing write heap buffer overflow, especially on 32 bit builds. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16443. Credit to OSS Fuzz
transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_clause) { AttrNumber parent_attno; Relation relation; TupleDesc tupleDesc; AclResult aclresult; char *comment; ParseCallbackState pcbstate; setup_parser_errposition_callback(&pcbstate, cxt->pstate, table_like_clause->rela...
0
[ "CWE-94" ]
postgres
b9b21acc766db54d8c337d508d0fe2f5bf2daab0
93,310,751,541,119,930,000,000,000,000,000,000,000
228
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
TRIO_PUBLIC_STRING int trio_append_max TRIO_ARGS3((target, max, source), char* target, size_t max, TRIO_CONST char* source) { size_t length; assert(target); assert(source); length = trio_length(target); if (max > length) { strncat(target, source, max - length...
0
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
135,435,130,394,653,630,000,000,000,000,000,000,000
16
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.
do_ed_script (char const *inname, char const *outname, bool *outname_needs_removal, FILE *ofp) { static char const editor_program[] = EDITOR_PROGRAM; file_offset beginning_of_this_line; FILE *pipefp = 0; size_t chars_read; if (! dry_run && ! skip_rest_of_patch) { int exclusive = *outname_n...
1
[ "CWE-20" ]
patch
123eaff0d5d1aebe128295959435b9ca5909c26d
139,060,822,862,497,360,000,000,000,000,000,000,000
75
Fix arbitrary command execution in ed-style patches (CVE-2018-1000156) * src/pch.c (do_ed_script): Write ed script to a temporary file instead of piping it to ed: this will cause ed to abort on invalid commands instead of rejecting them and carrying on. * tests/ed-style: New test case. * tests/Makefile.am (TESTS): Add...
void btrfs_set_item_key_safe(struct btrfs_root *root, struct btrfs_path *path, struct btrfs_key *new_key) { struct btrfs_disk_key disk_key; struct extent_buffer *eb; int slot; eb = path->nodes[0]; slot = path->slots[0]; if (slot > 0) { btrfs_item_key(eb, &disk_key, slot - 1); BUG_ON(comp_keys(&disk_k...
0
[ "CWE-416", "CWE-362" ]
linux
5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339
25,875,461,378,131,260,000,000,000,000,000,000,000
24
Btrfs: make xattr replace operations atomic Replacing a xattr consists of doing a lookup for its existing value, delete the current value from the respective leaf, release the search path and then finally insert the new value. This leaves a time window where readers (getxattr, listxattrs) won't see any value for the x...
act_on_fds_3_and_up (void (*func) (int fd)) { int maxfds, i; #ifdef __linux__ DIR *d; /* On Linux we can optimize this a bit if /proc is available. If it isn't available, fall back to the brute force way. */ d = opendir ("/proc/self/fd"); if (d) { for (;;) { struct dirent *...
0
[ "CWE-404" ]
dbus
872b085f12f56da25a2dbd9bd0b2dff31d5aea63
55,640,467,532,499,890,000,000,000,000,000,000,000
59
sysdeps-unix: On MSG_CTRUNC, close the fds we did receive MSG_CTRUNC indicates that we have received fewer fds that we should have done because the buffer was too small, but we were treating it as though it indicated that we received *no* fds. If we received any, we still have to make sure we close them, otherwise the...
GF_Err gf_isom_text_set_utf16_marker(GF_TextSample *samp) { /*we MUST have an empty sample*/ if (!samp || samp->text) return GF_BAD_PARAM; samp->text = (char*)gf_malloc(sizeof(char) * 2); if (!samp->text) return GF_OUT_OF_MEM; samp->text[0] = (char) 0xFE; samp->text[1] = (char) 0xFF; samp->len = 2; return GF_OK...
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
299,447,792,835,275,150,000,000,000,000,000,000,000
11
fixed #1768
Bool gf_isom_has_keep_utc_times(GF_ISOFile *file) { if (!file) return GF_FALSE; return file->keep_utc; }
0
[ "CWE-787" ]
gpac
f0a41d178a2dc5ac185506d9fa0b0a58356b16f7
248,681,676,899,761,100,000,000,000,000,000,000,000
5
fixed #2120
static int ext4_mb_discard_preallocations(struct super_block *sb, int needed) { ext4_group_t i, ngroups = ext4_get_groups_count(sb); int ret; int freed = 0; trace_ext4_mb_discard_preallocations(sb, needed); for (i = 0; i < ngroups && needed > 0; i++) { ret = ext4_mb_discard_group_preallocations(sb, i, needed); ...
0
[ "CWE-416" ]
linux
8844618d8aa7a9973e7b527d038a2a589665002c
16,591,204,695,239,800,000,000,000,000,000,000,000
15
ext4: only look at the bg_flags field if it is valid The bg_flags field in the block group descripts is only valid if the uninit_bg or metadata_csum feature is enabled. We were not consistently looking at this field; fix this. Also block group #0 must never have uninitialized allocation bitmaps, or need to be zeroed...
virtual void redactForLogging(mutablebson::Document* cmdObj) { auth::redactPasswordData(cmdObj->root()); }
0
[ "CWE-613" ]
mongo
db19e7ce84cfd702a4ba9983ee2ea5019f470f82
283,576,156,216,215,180,000,000,000,000,000,000,000
3
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
static void cleanup_delay(void *ctx) { REQUEST *request = ctx; rad_assert(request->magic == REQUEST_MAGIC); rad_assert((request->child_state == REQUEST_CLEANUP_DELAY) || (request->child_state == REQUEST_DONE)); remove_from_request_hash(request); #ifdef WITH_PROXY if (request->proxy && request->in_proxy_has...
0
[ "CWE-399" ]
freeradius-server
ff94dd35673bba1476594299d31ce8293b8bd223
228,540,085,210,156,600,000,000,000,000,000,000,000
23
Do not delete "old" requests until they are free. If the request is in the queue for 30+ seconds, do NOT delete it. Instead, mark it as "STOP PROCESSING", and do "wait_for_child_to_die", which waits for a child thread to pick it up, and acknowledge that it's done. Once it's marked done, we can finally clean it up. T...
void dictListDestructor(void *privdata, void *val) { DICT_NOTUSED(privdata); listRelease((list*)val); }
0
[ "CWE-20" ]
redis
697af434fbeb2e3ba2ba9687cd283ed1a2734fa5
248,525,646,157,856,600,000,000,000,000,000,000,000
5
initial changes needed to turn the current VM code into a cache system. Tons of work to do still.
GF_Err stbl_unpackCTS(GF_SampleTableBox *stbl) { GF_DttsEntry *packed; u32 i, j, count; GF_CompositionOffsetBox *ctts; ctts = stbl->CompositionOffset; if (!ctts || ctts->unpack_mode) return GF_OK; ctts->unpack_mode = 1; packed = ctts->entries; count = ctts->nb_entries; ctts->entries = NULL; ctts->nb_entries ...
0
[ "CWE-120", "CWE-787" ]
gpac
77ed81c069e10b3861d88f72e1c6be1277ee7eae
232,519,623,103,022,300,000,000,000,000,000,000,000
43
fixed #1774 (fuzz)
StringVal EncryptionFunctions::sm3sum(FunctionContext* ctx, int num_args, const StringVal* args) { SM3Digest digest; for (int i = 0; i < num_args; ++i) { const StringVal& arg = args[i]; if (arg.is_null) { continue; } digest.update(arg.ptr, arg.len); } digest.d...
0
[ "CWE-200" ]
incubator-doris
246ac4e37aa4da6836b7850cb990f02d1c3725a3
59,671,898,357,333,350,000,000,000,000,000,000,000
12
[fix] fix a bug of encryption function with iv may return wrong result (#8277)
void tcp_done(struct sock *sk) { struct request_sock *req = tcp_sk(sk)->fastopen_rsk; if (sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV) TCP_INC_STATS(sock_net(sk), TCP_MIB_ATTEMPTFAILS); tcp_set_state(sk, TCP_CLOSE); tcp_clear_xmit_timers(sk); if (req) reqsk_fastopen_remove(sk, req, false); ...
0
[ "CWE-399", "CWE-835" ]
linux
ccf7abb93af09ad0868ae9033d1ca8108bdaec82
241,426,781,445,029,200,000,000,000,000,000,000,000
19
tcp: avoid infinite loop in tcp_splice_read() Splicing from TCP socket is vulnerable when a packet with URG flag is received and stored into receive queue. __tcp_splice_read() returns 0, and sk_wait_data() immediately returns since there is the problematic skb in queue. This is a nice way to burn cpu (aka infinite l...
eval7t( char_u **arg, typval_T *rettv, evalarg_T *evalarg, int want_string) // after "." operator { type_T *want_type = NULL; garray_T type_list; // list of pointers to allocated types int res; int evaluate = evalarg == NULL ? 0 : (evalarg->eval_flags & EVAL_EVALUATE); ...
0
[ "CWE-122", "CWE-787" ]
vim
605ec91e5a7330d61be313637e495fa02a6dc264
249,164,609,931,845,230,000,000,000,000,000,000,000
72
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.
expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_something) WORD_DESC *word; int quoted, isexp; int *contains_dollar_at; int *expanded_something; { WORD_LIST *list; WORD_DESC *tword; /* The intermediate string that we build while expanding. */ char *istring; /* The...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
78,482,078,512,202,510,000,000,000,000,000,000,000
819
bash-4.4-rc2 release
GF_Box *saiz_New() { ISOM_DECL_BOX_ALLOC(GF_SampleAuxiliaryInfoSizeBox, GF_ISOM_BOX_TYPE_SAIZ); return (GF_Box *)tmp;
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
186,943,210,665,864,620,000,000,000,000,000,000,000
5
prevent dref memleak on invalid input (#1183)
static void auth_sess_reinit_ev(const void *event_data, void *user_data) { int res; /* A HOST command changed the main_server pointer, reinitialize ourselves. */ pr_event_unregister(&auth_module, "core.exit", auth_exit_ev); pr_event_unregister(&auth_module, "core.session-reinit", auth_sess_reinit_ev); pr_t...
0
[ "CWE-59", "CWE-295" ]
proftpd
349addc3be4fcdad9bd4ec01ad1ccd916c898ed8
80,467,077,841,303,810,000,000,000,000,000,000,000
27
Walk the entire DefaultRoot path, checking for symlinks of any component, when AllowChrootSymlinks is disabled.
int bpf_check(struct bpf_prog **prog, union bpf_attr *attr, bpfptr_t uattr) { u64 start_time = ktime_get_ns(); struct bpf_verifier_env *env; struct bpf_verifier_log *log; int i, len, ret = -EINVAL; bool is_priv; /* no program is valid */ if (ARRAY_SIZE(bpf_verifier_ops) == 0) return -EINVAL; /* 'struct bpf_...
0
[ "CWE-843" ]
bpf
5b029a32cfe4600f5e10e36b41778506b90fd4de
194,945,024,270,417,600,000,000,000,000,000,000,000
233
bpf: Fix ringbuf helper function compatibility Commit 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it") extended check_map_func_compatibility() by enforcing map -> helper function match, but not helper -> map type match. Due to this all of the bpf_ringbuf_*() helper functions could be used w...
static inline double LevelPixel(const double black_point, const double white_point,const double gamma,const double pixel) { double level_pixel, scale; scale=PerceptibleReciprocal(white_point-black_point); level_pixel=QuantumRange*gamma_pow(scale*((double) pixel-black_point), 1.0/gamma); return(le...
1
[ "CWE-369" ]
ImageMagick
c5fcdea6a6ae27cf3db20c28b176e87b1a584e06
149,262,296,101,177,490,000,000,000,000,000,000,000
12
https://github.com/ImageMagick/ImageMagick/issues/1717
int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) { size_t retlen; int truncated; _dopr(&buf, NULL, &n, &retlen, &truncated, format, args); if (truncated) /* * In case of truncation, return -1 like traditional snprintf. * (Current drafts for ISO/IEC 989...
1
[ "CWE-119" ]
openssl
9cb177301fdab492e4cfef376b28339afe3ef663
57,312,578,701,665,120,000,000,000,000,000,000,000
18
Fix memory issues in BIO_*printf functions The internal |fmtstr| function used in processing a "%s" format string in the BIO_*printf functions could overflow while calculating the length of a string and cause an OOB read when printing very long strings. Additionally the internal |doapr_outch| function can attempt to ...
static void WriteProfile(j_compress_ptr jpeg_info,Image *image, ExceptionInfo *exception) { const char *name; const StringInfo *profile; MagickBooleanType iptc; register ssize_t i; size_t length, tag_length; StringInfo *custom_profile; /* Save image profile as a APP...
0
[ "CWE-200", "CWE-703" ]
ImageMagick
f6463ca9588579633bbaed9460899d892aa3c64a
290,458,438,401,774,200,000,000,000,000,000,000,000
128
Zero pixel buffer
int strict_strtoul_scaled(const char *cp, unsigned long *res, int scale) { unsigned long result = 0; long decimals = -1; while (isdigit(*cp) || (*cp == '.' && decimals < 0)) { if (*cp == '.') decimals = 0; else if (decimals < scale) { unsigned int value; value = *cp - '0'; result = result * 10 + valu...
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
134,670,128,143,643,350,000,000,000,000,000,000,000
29
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...