func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
is_ftp_ctl(const struct dp_packet *pkt) { uint8_t ip_proto = get_ip_proto(pkt); struct tcp_header *th = dp_packet_l4(pkt); /* CT_IPPORT_FTP is used because IPPORT_FTP in not defined in OSX, * at least in in.h. Since this value will never change, just remove * the external dependency. */ #define C...
0
[ "CWE-400" ]
ovs
35c280072c1c3ed58202745b7d27fbbd0736999b
47,685,162,938,280,910,000,000,000,000,000,000,000
15
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 int pragmaVtabFilter( sqlite3_vtab_cursor *pVtabCursor, int idxNum, const char *idxStr, int argc, sqlite3_value **argv ){ PragmaVtabCursor *pCsr = (PragmaVtabCursor*)pVtabCursor; PragmaVtab *pTab = (PragmaVtab*)(pVtabCursor->pVtab); int rc; int i, j; StrAccum acc; char *zSql; UNUSED_PARAMET...
0
[ "CWE-754" ]
sqlite
ebd70eedd5d6e6a890a670b5ee874a5eae86b4dd
7,894,807,290,068,400,000,000,000,000,000,000,000
46
Fix the NOT NULL verification logic in PRAGMA integrity_check so that it works for generated columns whose value is the result of a comparison operator. Ticket [bd8c280671ba44a7] FossilOrigin-Name: f3b39c71b88cb6721f443de56cdce4c08252453a5e340b00a2bd88dc10c42400
int wc_RsaPSS_Sign_ex(const byte* in, word32 inLen, byte* out, word32 outLen, enum wc_HashType hash, int mgf, int saltLen, RsaKey* key, WC_RNG* rng) { return RsaPublicEncryptEx(in, inLen, out, outLen, key, RSA_PRIVATE_ENCRYPT, RSA_BLOCK_TYPE_1, WC_RSA_PSS_PAD, ...
0
[ "CWE-310", "CWE-787" ]
wolfssl
fb2288c46dd4c864b78f00a47a364b96a09a5c0f
159,379,562,172,154,920,000,000,000,000,000,000,000
8
RSA-PSS: Handle edge case with encoding message to hash When the key is small relative to the digest (1024-bit key, 64-byte hash, 61-byte salt length), the internal message to hash is larger than the output size. Allocate a buffer for the message when this happens.
const Char *c_str() const { return data_; }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
321,787,995,536,346,900,000,000,000,000,000,000,000
1
Fix segfault on complex pointer formatting (#642)
bool mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result) { DBUG_ENTER("mysql_explain_union"); bool res= 0; SELECT_LEX *first= unit->first_select(); bool is_pushed_union= unit->derived && unit->derived->pushdown_derived; for (SELECT_LEX *sl= first; sl; sl= sl->next_select()) { sl...
0
[]
server
8c34eab9688b4face54f15f89f5d62bdfd93b8a7
335,951,959,231,044,370,000,000,000,000,000,000,000
59
MDEV-28094 Window function in expression in ORDER BY call item->split_sum_func() in setup_order() just as it's done in setup_fields()
static void kbd_rawcode(unsigned char data) { struct vc_data *vc = vc_cons[fg_console].d; kbd = kbd_table + vc->vc_num; if (kbd->kbdmode == VC_RAW) put_queue(vc, data); }
0
[ "CWE-416" ]
linux
6ca03f90527e499dd5e32d6522909e2ad390896b
275,466,711,016,702,200,000,000,000,000,000,000,000
8
vt: keyboard, simplify vt_kdgkbsent Use 'strlen' of the string, add one for NUL terminator and simply do 'copy_to_user' instead of the explicit 'for' loop. This makes the KDGKBSENT case more compact. The only thing we need to take care about is NULL 'func_table[i]'. Use an empty string in that case. The original che...
Status readUTF8String( StringData* out ) { int sz; if ( !readNumber<int>( &sz ) ) return makeError("invalid bson", _idElem); if ( out ) { *out = StringData( _buffer + _position, sz ); } ...
1
[ "CWE-20" ]
mongo
8f1c734c7f1862180f607c241fb167640889efba
319,911,383,086,614,630,000,000,000,000,000,000,000
21
SERVER-17264: improve bson validation for utf-8 strings (cherry picked from commit 394a8569ff14a215c0691aa34440227b2e62a4de)
static void usage(void) { printf(EXEC_NAME " Copyright (C) 2008-2010, 2012, 2013, 2017, 2019" "Matt Davis (enferex)\n" "Special thanks to all contributors and the 757 crew.\n" "This program comes with ABSOLUTELY NO WARRANTY\n" "This is free software, and you are welcome t...
0
[ "CWE-787" ]
pdfresurrect
0c4120fffa3dffe97b95c486a120eded82afe8a6
144,965,733,253,784,430,000,000,000,000,000,000,000
20
Zero and sanity check all dynamic allocs. This addresses the memory issues in Issue #6 expressed in calloc_some.pdf and malloc_some.pdf
packet_setsockopt(struct socket *sock, int level, int optname, sockptr_t optval, unsigned int optlen) { struct sock *sk = sock->sk; struct packet_sock *po = pkt_sk(sk); int ret; if (level != SOL_PACKET) return -ENOPROTOOPT; switch (optname) { case PACKET_ADD_MEMBERSHIP: case PACKET_DROP_MEMBERSHIP: { ...
0
[ "CWE-787" ]
linux
acf69c946233259ab4d64f8869d4037a198c7f06
310,102,491,789,672,120,000,000,000,000,000,000,000
266
net/packet: fix overflow in tpacket_rcv Using tp_reserve to calculate netoff can overflow as tp_reserve is unsigned int and netoff is unsigned short. This may lead to macoff receving a smaller value then sizeof(struct virtio_net_hdr), and if po->has_vnet_hdr is set, an out-of-bounds write will occur when calling virt...
int __encode_packet(struct resolv_header *h, struct resolv_question **q, struct resolv_answer **an, struct resolv_answer **ns, struct resolv_answer **ar, unsigned char *dest, int maxlen) { int i, total = 0; unsigned j; i = __encode_header(h, dest, maxlen); if (i < 0) return i; dest += i; maxlen -= i...
0
[ "CWE-79" ]
uclibc-ng
0f822af0445e5348ce7b7bd8ce1204244f31d174
77,737,583,841,954,630,000,000,000,000,000,000,000
54
libc/inet/resolv.c: add __hnbad to check DNS entries for validity… … using the same rules glibc does also call __hnbad in some places to check answers
xmlCopyElement(void *payload, const xmlChar *name ATTRIBUTE_UNUSED) { xmlElementPtr elem = (xmlElementPtr) payload; xmlElementPtr cur; cur = (xmlElementPtr) xmlMalloc(sizeof(xmlElement)); if (cur == NULL) { xmlVErrMemory(NULL, "malloc failed"); return(NULL); } memset(cur, 0, sizeof(xmlElement...
0
[ "CWE-416" ]
libxml2
652dd12a858989b14eed4e84e453059cd3ba340e
126,029,091,448,246,060,000,000,000,000,000,000,000
25
[CVE-2022-23308] Use-after-free of ID and IDREF attributes If a document is parsed with XML_PARSE_DTDVALID and without XML_PARSE_NOENT, the value of ID attributes has to be normalized after potentially expanding entities in xmlRemoveID. Otherwise, later calls to xmlGetID can return a pointer to previously freed memory...
void Mounter::mountResult(int st) { QProcess *proc=dynamic_cast<QProcess *>(sender()); qWarning() << "MOUNT RESULT" << st << (void *)proc; if (proc) { procCount--; proc->close(); proc->deleteLater(); if (tempFiles.contains(proc)) { tempFiles[proc]->close(); ...
1
[ "CWE-20", "CWE-22" ]
cantata
afc4f8315d3e96574925fb530a7004cc9e6ce3d3
184,604,215,866,044,000,000,000,000,000,000,000,000
17
Remove internal Samba shre mounting code, this had some privilege escalation issues, and is not well tested
dbus_create_object(vrrp_t *vrrp) { dbus_create_object_params(vrrp->iname, IF_NAME(IF_BASE_IFP(vrrp->ifp)), vrrp->vrid, vrrp->family, false); }
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
150,482,166,873,434,110,000,000,000,000,000,000,000
4
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
int ath_txq_update(struct ath_softc *sc, int qnum, struct ath9k_tx_queue_info *qinfo) { struct ath_hw *ah = sc->sc_ah; int error = 0; struct ath9k_tx_queue_info qi; BUG_ON(sc->tx.txq[qnum].axq_qnum != qnum); ath9k_hw_get_txq_props(ah, qnum, &qi); qi.tqi_aifs = qinfo->tqi_aifs; qi.tqi_cwmin = qinfo->tqi_cw...
0
[ "CWE-362", "CWE-241" ]
linux
21f8aaee0c62708654988ce092838aa7df4d25d8
77,113,132,242,944,510,000,000,000,000,000,000,000
26
ath9k: protect tid->sched check We check tid->sched without a lock taken on ath_tx_aggr_sleep(). That is race condition which can result of doing list_del(&tid->list) twice (second time with poisoned list node) and cause crash like shown below: [424271.637220] BUG: unable to handle kernel paging request at 00100104 [...
void regfreex(void *(*alloc)(void *ctx, void *p, int n), void *ctx, Reprog *prog) { if (prog) { alloc(ctx, prog->start, 0); alloc(ctx, prog, 0); } }
0
[ "CWE-703", "CWE-674" ]
mujs
160ae29578054dc09fd91e5401ef040d52797e61
98,458,673,631,776,650,000,000,000,000,000,000,000
7
Issue #162: Check stack overflow during regexp compilation. Only bother checking during the first compilation pass that counts the size of the program.
xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt, xmlXPathFuncLookupFunc f, void *funcCtxt) { if (ctxt == NULL) return; ctxt->funcLookupFunc = f; ctxt->funcLookupData = funcCtxt; }
0
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
47,680,041,269,049,390,000,000,000,000,000,000,000
8
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification
bool CTransaction::FetchInputs(CTxDB& txdb, const map<uint256, CTxIndex>& mapTestPool, bool fBlock, bool fMiner, MapPrevTx& inputsRet, bool& fInvalid) { // FetchInputs can return false either because we just haven't seen some inputs // (in which case the transaction should be stor...
0
[ "CWE-16", "CWE-787" ]
bitcoin
a206b0ea12eb4606b93323268fc81a4f1f952531
322,462,606,990,137,500,000,000,000,000,000,000,000
74
Do not allow overwriting unspent transactions (BIP 30) Introduce the following network rule: * a block is not valid if it contains a transaction whose hash already exists in the block chain, unless all that transaction's outputs were already spent before said block. Warning: this is effectively a network rule ...
mem_log_init(const char* prog_name, const char *banner) { size_t log_name_len; char *log_name; if (__test_bit(LOG_CONSOLE_BIT, &debug)) { log_op = stderr; return; } if (log_op) fclose(log_op); log_name_len = 5 + strlen(prog_name) + 5 + 7 + 4 + 1; /* "/tmp/" + prog_name + "_mem." + PID + ".log" + '\0" */ ...
0
[ "CWE-200" ]
keepalived
ac8e2ef053de273ce7a0cf0cb611e599dca4b298
310,551,882,669,274,130,000,000,000,000,000,000,000
45
When opening files for write, ensure files can only be read by root Issue #1048 referred to CVE-2018-19046 regarding files used for debugging purposes could potentially be read by non root users. This commit ensures that such log files cannot be opened by non root users. Signed-off-by: Quentin Armitage <quentin@armi...
TEST_F(ExpressionNaryTest, ValidateFieldPathExpressionDependency) { intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest()); _notAssociativeNorCommutative->addOperand(ExpressionFieldPath::create(expCtx, "ab.c")); assertDependencies(_notAssociativeNorCommutative, BSON_ARRAY("ab.c")); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
113,512,627,722,944,600,000,000,000,000,000,000,000
5
SERVER-38070 fix infinite loop in agg expression
static void complete_move(Set **s, Set **other) { assert(s); assert(other); if (!*other) return; if (*s) set_move(*s, *other); else { *s = *other; *other = NULL; } }
0
[]
systemd
5ba6985b6c8ef85a8bcfeb1b65239c863436e75b
314,513,117,356,219,600,000,000,000,000,000,000,000
14
core: allow PIDs to be watched by two units at the same time In some cases it is interesting to map a PID to two units at the same time. For example, when a user logs in via a getty, which is reexeced to /sbin/login that binary will be explicitly referenced as main pid of the getty service, as well as implicitly refer...
int ipv6_setsockopt(struct sock *sk, int level, int optname, char __user *optval, unsigned int optlen) { int err; if (level == SOL_IP && sk->sk_type != SOCK_RAW) return udp_prot.setsockopt(sk, level, optname, optval, optlen); if (level != SOL_IPV6) return -ENOPROTOOPT; err = do_ipv6_setsockopt(sk, leve...
0
[ "CWE-476" ]
net
95baa60a0da80a0143e3ddd4d3725758b4513825
240,662,629,557,546,830,000,000,000,000,000,000,000
20
ipv6_sockglue: Fix a missing-check bug in ip6_ra_control() In function ip6_ra_control(), the pointer new_ra is allocated a memory space via kmalloc(). And it is used in the following codes. However, when there is a memory allocation error, kmalloc() fails. Thus null pointer dereference may happen. And it will cause th...
void HGraphBuilder::VisitCountOperation(CountOperation* expr) { ASSERT(!HasStackOverflow()); ASSERT(current_block() != NULL); ASSERT(current_block()->HasPredecessor()); Expression* target = expr->expression(); VariableProxy* proxy = target->AsVariableProxy(); Property* prop = target->AsProperty(); if (pro...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
193,700,203,830,679,150,000,000,000,000,000,000,000
179
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
int ssl3_client_hello(SSL *s) { unsigned char *buf; unsigned char *p,*d; int i; unsigned long Time,l; #ifndef OPENSSL_NO_COMP int j; SSL_COMP *comp; #endif buf=(unsigned char *)s->init_buf->data; if (s->state == SSL3_ST_CW_CLNT_HELLO_A) { if ((s->session == NULL) || (s->session->ssl_version != s->versi...
1
[]
openssl
36ca4ba63d083da6f9d4598f18f17a8c32c8eca2
57,516,037,165,290,920,000,000,000,000,000,000,000
109
Implement the Supported Point Formats Extension for ECC ciphersuites Submitted by: Douglas Stebila
onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at, OnigRegion* region, OnigOptionType option) { int r; UChar *prev; OnigMatchArg msa; MATCH_ARG_INIT(msa, reg, option, region, at); #ifdef USE_COMBINATION_EXPLOSION_CHECK { int offset = at - str; STATE_CHECK_BUFF_INIT(msa...
0
[ "CWE-125" ]
oniguruma
690313a061f7a4fa614ec5cc8368b4f2284e059b
257,947,539,504,251,500,000,000,000,000,000,000,000
45
fix #57 : DATA_ENSURE() check must be before data access
PHP_MINIT_FUNCTION(wddx) { le_wddx = zend_register_list_destructors_ex(release_wddx_packet_rsrc, NULL, "wddx", module_number); #if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION) php_session_register_serializer("wddx", PS_SERIALIZER_ENCODE_NAME(wddx), PS_SERIALIZER_DECODE_NAME(wddx)); #endif re...
1
[]
php-src
1785d2b805f64eaaacf98c14c9e13107bf085ab1
288,779,748,716,143,330,000,000,000,000,000,000,000
12
Fixed bug #70741: Session WDDX Packet Deserialization Type Confusion Vulnerability
off_t PackLinuxElf32::pack3(OutputFile *fo, Filter &ft) { off_t flen = super::pack3(fo, ft); // loader follows compressed PT_LOADs // NOTE: PackLinuxElf::pack3 adjusted xct_off for the extra page unsigned v_hole = sz_pack2 + lsize; set_te32(&elfout.phdr[0].p_filesz, v_hole); set_te32(&elfout.phdr...
0
[ "CWE-476", "CWE-190" ]
upx
8be9da8280dfa69d5df4417d4d81bda1cab78010
239,602,562,645,734,680,000,000,000,000,000,000,000
121
Avoid bogus values in PT_DYNAMIC segment. Detect duplicate DT_*. Detect out-of-bounds hashtab and gashtab. Detect missing DT_REL, DT_RELA. Detect out-of-bounds d_val. https://github.com/upx/upx/issues/317 modified: p_lx_elf.cpp
static ssize_t valid_zones_show(struct device *dev, struct device_attribute *attr, char *buf) { struct memory_block *mem = to_memory_block(dev); unsigned long start_pfn = section_nr_to_pfn(mem->start_section_nr); unsigned long nr_pages = PAGES_PER_SECTION * sections_per_block; struct zone *default_zone; int ni...
1
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
118,765,830,092,924,030,000,000,000,000,000,000,000
40
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
asn1_get_octet_der (const unsigned char *der, int der_len, int *ret_len, unsigned char *str, int str_size, int *str_len) { int len_len = 0; if (der_len <= 0) return ASN1_GENERIC_ERROR; *str_len = asn1_get_length_der (der, der_len, &len_len); if (*str_len < 0) return ASN1_DER_ERROR; *re...
0
[ "CWE-476" ]
libtasn1
53958290ab731c8486531a3bdef54a933533579d
21,019,458,574,754,959,000,000,000,000,000,000,000
27
Allow a NULL value in asn1_read_value() for all types.
int WavInFile::read(unsigned char *buffer, int maxElems) { int numBytes; uint afterDataRead; // ensure it's 8 bit format if (header.format.bits_per_sample != 8) { ST_THROW_RT_ERROR("Error: WavInFile::read(char*, int) works only with 8bit samples."); } assert(sizeof(char) =...
0
[ "CWE-119" ]
soundtouch
9e02d9b04fda6c1f44336ff00bb5af1e2ffc039e
118,562,360,128,385,660,000,000,000,000,000,000,000
27
Added minimum size check for WAV header block lengh values
void seq_put_decimal_ull_width(struct seq_file *m, const char *delimiter, unsigned long long num, unsigned int width) { int len; if (m->count + 2 >= m->size) /* we'll write 2 bytes at least */ goto overflow; if (delimiter && delimiter[0]) { if (delimiter[1] == 0) seq_putc(m, delimiter[0]); else seq...
0
[ "CWE-120", "CWE-787" ]
linux
8cae8cd89f05f6de223d63e6d15e31c8ba9cf53b
284,498,859,047,652,480,000,000,000,000,000,000,000
31
seq_file: disallow extremely large seq buffer allocations There is no reasonable need for a buffer larger than this, and it avoids int overflow pitfalls. Fixes: 058504edd026 ("fs/seq_file: fallback to vmalloc allocation") Suggested-by: Al Viro <viro@zeniv.linux.org.uk> Reported-by: Qualys Security Advisory <qsa@qualy...
void ogs_sbi_response_free(ogs_sbi_response_t *response) { ogs_assert(response); if (response->h.uri) ogs_free(response->h.uri); ogs_sbi_header_free(&response->h); http_message_free(&response->http); ogs_pool_free(&response_pool, response); }
0
[ "CWE-476", "CWE-787" ]
open5gs
d919b2744cd05abae043490f0a3dd1946c1ccb8c
235,020,820,333,821,900,000,000,000,000,000,000,000
12
[AMF] fix the memory problem (#1247) 1. memory corruption - Overflow num_of_part in SBI message 2. null pointer dereference - n2InfoContent->ngap_ie_type
conf_err(const char *msg) { logmsg(LOG_ERR, "%s line %d: %s", f_name[cur_fin], n_lin[cur_fin], msg); exit(1); }
0
[]
pound
a0c52c542ca9620a96750f9877b26bf4c84aef1b
108,204,243,242,940,500,000,000,000,000,000,000,000
5
SSL Compression Disable patch for 2.6f This patch disables SSL/TLS compression entirely. There is no config option. This prevents CRIME attacks against SSL. Note that HTTP compression is still an option. Test your server at https://www.ssllabs.com/ssldb/ Original patch by Hereward Cooper <coops@fawk.eu> Openssl 0...
get_last_end_pos(asdl_seq *s, int *end_lineno, int *end_col_offset) { Py_ssize_t tot = asdl_seq_LEN(s); // There must be no empty suites. assert(tot > 0); stmt_ty last = asdl_seq_GET(s, tot - 1); *end_lineno = last->end_lineno; *end_col_offset = last->end_col_offset; }
0
[ "CWE-125" ]
cpython
a4d78362397fc3bced6ea80fbc7b5f4827aec55e
144,049,851,302,041,930,000,000,000,000,000,000,000
9
bpo-36495: Fix two out-of-bounds array reads (GH-12641) Research and fix by @bradlarsen.
static void __vmx_load_host_state(struct vcpu_vmx *vmx) { unsigned long flags; if (!vmx->host_state.loaded) return; ++vmx->vcpu.stat.host_state_reload; vmx->host_state.loaded = 0; if (vmx->host_state.fs_reload_needed) kvm_load_fs(vmx->host_state.fs_sel); if (vmx->host_state.gs_ldt_reload_needed) { kvm_loa...
0
[ "CWE-20" ]
linux-2.6
16175a796d061833aacfbd9672235f2d2725df65
102,809,501,975,835,080,000,000,000,000,000,000,000
29
KVM: VMX: Don't allow uninhibited access to EFER on i386 vmx_set_msr() does not allow i386 guests to touch EFER, but they can still do so through the default: label in the switch. If they set EFER_LME, they can oops the host. Fix by having EFER access through the normal channel (which will check for EFER_LME) even o...
void addReplyBulkLen(client *c, robj *obj) { size_t len; if (sdsEncodedObject(obj)) { len = sdslen(obj->ptr); } else { long n = (long)obj->ptr; /* Compute how many bytes will take this integer as a radix 10 string */ len = 1; if (n < 0) { len++; ...
0
[ "CWE-254" ]
redis
874804da0c014a7d704b3d285aa500098a931f50
332,071,664,489,360,800,000,000,000,000,000,000,000
24
Security: Cross Protocol Scripting protection. This is an attempt at mitigating problems due to cross protocol scripting, an attack targeting services using line oriented protocols like Redis that can accept HTTP requests as valid protocol, by discarding the invalid parts and accepting the payloads sent, for example, ...
int dccp_rcv_established(struct sock *sk, struct sk_buff *skb, const struct dccp_hdr *dh, const unsigned int len) { if (dccp_check_seqno(sk, skb)) goto discard; if (dccp_parse_options(sk, NULL, skb)) return 1; dccp_handle_ackvec_processing(sk, skb); dccp_deliver_input_to_ccids(sk, skb); return __dccp_rc...
0
[ "CWE-200", "CWE-415" ]
linux
5edabca9d4cff7f1f2b68f0bac55ef99d9798ba4
268,846,733,481,985,500,000,000,000,000,000,000,000
17
dccp: fix freeing skb too early for IPV6_RECVPKTINFO In the current DCCP implementation an skb for a DCCP_PKT_REQUEST packet is forcibly freed via __kfree_skb in dccp_rcv_state_process if dccp_v6_conn_request successfully returns. However, if IPV6_RECVPKTINFO is set on a socket, the address of the skb is saved to ire...
int RGWInitMultipart_ObjStore_S3::prepare_encryption(map<string, bufferlist>& attrs) { int res = 0; res = rgw_s3_prepare_encrypt(s, attrs, nullptr, nullptr, crypt_http_responses); return res; }
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
138,301,188,706,199,810,000,000,000,000,000,000,000
6
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
JNICALL JVM_GetPortLibrary(void) { return &j9portLibrary; }
0
[ "CWE-119" ]
openj9
0971f22d88f42cf7332364ad7430e9bd8681c970
50,911,545,084,242,950,000,000,000,000,000,000,000
4
Clean up jio_snprintf and jio_vfprintf Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659 Signed-off-by: Peter Bain <peter_bain@ca.ibm.com>
static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) { struct page *page; int ret; unsigned int gup_flags = FOLL_FORCE; #ifdef CONFIG_STACK_GROWSUP if (write) { ret = expand_downwards(bprm->vma, pos); if (ret < 0) return NULL; } #endif if (write) gup_flags |= FOLL...
0
[ "CWE-401" ]
linux
f612acfae86af7ecad754ae6a46019be9da05b8e
310,910,882,914,841,900,000,000,000,000,000,000,000
32
exec: Fix mem leak in kernel_read_file syzkaller report this: BUG: memory leak unreferenced object 0xffffc9000488d000 (size 9195520): comm "syz-executor.0", pid 2752, jiffies 4294787496 (age 18.757s) hex dump (first 32 bytes): ff ff ff ff ff ff ff ff a8 00 00 00 01 00 00 00 ................ 02 00 00 00 00...
static int php_stream_temp_flush(php_stream *stream TSRMLS_DC) { php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; assert(ts != NULL); return ts->innerstream ? php_stream_flush(ts->innerstream) : -1; }
0
[ "CWE-20" ]
php-src
6297a117d77fa3a0df2e21ca926a92c231819cd5
308,733,648,406,968,600,000,000,000,000,000,000,000
7
Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its input
krb5_gss_process_context_token(minor_status, context_handle, token_buffer) OM_uint32 *minor_status; gss_ctx_id_t context_handle; gss_buffer_t token_buffer; { krb5_gss_ctx_id_rec *ctx; OM_uint32 majerr; ctx = (krb5_gss_ctx_id_t) context_handle; if (ctx->termin...
0
[ "CWE-703" ]
krb5
82dc33da50338ac84c7b4102dc6513d897d0506a
167,513,407,943,906,450,000,000,000,000,000,000,000
36
Fix gss_process_context_token() [CVE-2014-5352] [MITKRB5-SA-2015-001] The krb5 gss_process_context_token() should not actually delete the context; that leaves the caller with a dangling pointer and no way to know that it is invalid. Instead, mark the context as terminated, and check for terminated contexts in the GSS...
xfrm_policy_flush_secctx_check(struct net *net, u8 type, bool task_valid) { int dir, err = 0; for (dir = 0; dir < XFRM_POLICY_MAX; dir++) { struct xfrm_policy *pol; int i; hlist_for_each_entry(pol, &net->xfrm.policy_inexact[dir], bydst) { if (pol->type != type) continue; err = security_xfrm...
0
[ "CWE-125" ]
ipsec
7bab09631c2a303f87a7eb7e3d69e888673b9b7e
289,540,654,417,486,450,000,000,000,000,000,000,000
36
xfrm: policy: check policy direction value The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used as an array index. This can lead to an out-of-bound access, kernel lockup and DoS. Add a check for the 'dir' value. This fixes CVE-2017-11600. References: https://bugzilla.redhat.com/show_bug.cgi?...
static const char *dccp_state_name(const int state) { static const char *const dccp_state_names[] = { [DCCP_OPEN] = "OPEN", [DCCP_REQUESTING] = "REQUESTING", [DCCP_PARTOPEN] = "PARTOPEN", [DCCP_LISTEN] = "LISTEN", [DCCP_RESPOND] = "RESPOND", [DCCP_CLOSING] = "CLOSING", [DCCP_ACTIVE_CLOSEREQ] = "CLOSEREQ", ...
0
[ "CWE-416" ]
linux
69c64866ce072dea1d1e59a0d61e0f66c0dffb76
266,767,858,901,247,270,000,000,000,000,000,000,000
21
dccp: CVE-2017-8824: use-after-free in DCCP code Whenever the sock object is in DCCP_CLOSED state, dccp_disconnect() must free dccps_hc_tx_ccid and dccps_hc_rx_ccid and set to NULL. Signed-off-by: Mohamed Ghannam <simo.ghannam@gmail.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <...
int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self, struct hw_atl_utils_fw_rpc **rpc) { struct aq_hw_atl_utils_fw_rpc_tid_s sw; struct aq_hw_atl_utils_fw_rpc_tid_s fw; int err = 0; do { sw.val = aq_hw_read_reg(self, HW_ATL_RPC_CONTROL_ADR); self->rpc_tid = sw.tid; err = readx_poll_timeout_atomic(hw_...
0
[ "CWE-787" ]
net
b922f622592af76b57cbc566eaeccda0b31a3496
69,048,327,491,036,490,000,000,000,000,000,000,000
60
atlantic: Fix OOB read and write in hw_atl_utils_fw_rpc_wait This bug report shows up when running our research tools. The reports is SOOB read, but it seems SOOB write is also possible a few lines below. In details, fw.len and sw.len are inputs coming from io. A len over the size of self->rpc triggers SOOB. The patc...
static void hostdev_unlink(USBHostDevice *dev) { USBHostDevice *pdev = hostdev_list; USBHostDevice **prev = &hostdev_list; while (pdev) { if (pdev == dev) { *prev = dev->next; return; } prev = &pdev->next; pdev = pdev->next; } }
0
[ "CWE-119" ]
qemu
babd03fde68093482528010a5435c14ce9128e3f
77,907,681,220,802,410,000,000,000,000,000,000,000
15
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...
static void makeColumnPartOfPrimaryKey(Parse *pParse, Column *pCol){ pCol->colFlags |= COLFLAG_PRIMKEY; #ifndef SQLITE_OMIT_GENERATED_COLUMNS if( pCol->colFlags & COLFLAG_GENERATED ){ testcase( pCol->colFlags & COLFLAG_VIRTUAL ); testcase( pCol->colFlags & COLFLAG_STORED ); sqlite3ErrorMsg(pParse, ...
0
[ "CWE-674", "CWE-787" ]
sqlite
38096961c7cd109110ac21d3ed7dad7e0cb0ae06
104,372,714,555,985,530,000,000,000,000,000,000,000
11
Avoid infinite recursion in the ALTER TABLE code when a view contains an unused CTE that references, directly or indirectly, the view itself. FossilOrigin-Name: 1d2e53a39b87e364685e21de137655b6eee725e4c6d27fc90865072d7c5892b5
void sqlite3NestedParse(Parse *pParse, const char *zFormat, ...){ va_list ap; char *zSql; char *zErrMsg = 0; sqlite3 *db = pParse->db; char saveBuf[PARSE_TAIL_SZ]; if( pParse->nErr ) return; assert( pParse->nested<10 ); /* Nesting should only be of limited depth */ va_start(ap, zFormat); zSql = sqli...
0
[ "CWE-674", "CWE-787" ]
sqlite
38096961c7cd109110ac21d3ed7dad7e0cb0ae06
75,114,494,466,398,220,000,000,000,000,000,000,000
29
Avoid infinite recursion in the ALTER TABLE code when a view contains an unused CTE that references, directly or indirectly, the view itself. FossilOrigin-Name: 1d2e53a39b87e364685e21de137655b6eee725e4c6d27fc90865072d7c5892b5
static int jas_iccgetuint16(jas_stream_t *in, jas_iccuint16_t *val) { ulonglong tmp; if (jas_iccgetuint(in, 2, &tmp)) return -1; *val = tmp; return 0; }
1
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
305,537,781,067,142,500,000,000,000,000,000,000,000
8
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
static ssize_t show_read_buffer_kb(struct device *dev, struct device_attribute *attr, char *buf) { ssize_t retval; struct comedi_device_file_info *info = dev_get_drvdata(dev); unsigned buffer_size_kb = 0; struct comedi_subdevice *const read_subdevice = comedi_get_read_subdevice(info); mutex_lock(&info...
0
[ "CWE-200" ]
linux
819cbb120eaec7e014e5abd029260db1ca8c5735
68,237,730,483,302,790,000,000,000,000,000,000,000
21
staging: comedi: fix infoleak to userspace driver_name and board_name are pointers to strings, not buffers of size COMEDI_NAMELEN. Copying COMEDI_NAMELEN bytes of a string containing less than COMEDI_NAMELEN-1 bytes would leak some unrelated bytes. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Cc: stable <sta...
int cmp_item_timestamp::compare(cmp_item *arg) { cmp_item_timestamp *tmp= static_cast<cmp_item_timestamp*>(arg); return type_handler_timestamp2.cmp_native(m_native, tmp->m_native); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
290,310,054,160,304,340,000,000,000,000,000,000,000
5
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
static size_t parse_mb_utf8(unsigned *wc, const char *ptr, const char *end) { unsigned wchar; size_t consumed = utf8towc(&wchar, (const unsigned char *) ptr, end - ptr); if (!consumed || consumed == (size_t) -1) { return 0; } if (wc) { *wc = wchar; } return consumed; }
0
[ "CWE-119" ]
ext-http
3724cd76a28be1d6049b5537232e97ac567ae1f5
103,472,249,984,045,030,000,000,000,000,000,000,000
14
fix bug #71719 (Buffer overflow in HTTP url parsing functions) The parser's offset was not reset when we softfail in scheme parsing and continue to parse a path. Thanks to hlt99 at blinkenshell dot org for the report.
static inline ut16 r_read_at_le16(const void *src, size_t offset) { const ut8 *s = (const ut8*)src + offset; return r_read_le16 (s); }
1
[ "CWE-476" ]
radare2
1ea23bd6040441a21fbcfba69dce9a01af03f989
271,758,588,580,111,330,000,000,000,000,000,000,000
4
Fix #6816 - null deref in r_read_*
static void del_session(SSL_CTX *sctx, SSL_SESSION *session) { simple_ssl_session *sess, *prev = NULL; const unsigned char *id; unsigned int idlen; id = SSL_SESSION_get_id(session, &idlen); for (sess = first; sess; sess = sess->next) { if (idlen == sess->idlen && !memcmp(sess->id, id, idlen)) { if(prev...
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
300,960,575,241,225,000,000,000,000,000,000,000,000
22
New functions to check a hostname email or IP address against a certificate. Add options to s_client, s_server and x509 utilities to print results of checks.
static void SFDDumpGasp(FILE *sfd, SplineFont *sf) { int i; if ( sf->gasp_cnt==0 ) return; fprintf( sfd, "GaspTable: %d", sf->gasp_cnt ); for ( i=0; i<sf->gasp_cnt; ++i ) fprintf( sfd, " %d %d", sf->gasp[i].ppem, sf->gasp[i].flags ); fprintf( sfd, " %d", sf->gasp_version); putc('\n',sfd); }
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
3,976,252,525,407,796,000,000,000,000,000,000,000
12
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
CtPtr ProtocolV2::handle_ident_missing_features(ceph::bufferlist &payload) { ldout(cct, 20) << __func__ << " payload.length()=" << payload.length() << dendl; if (state != SESSION_CONNECTING) { lderr(cct) << __func__ << " not in session connect state!" << dendl; return _fault(); } auto ident_missing...
0
[ "CWE-323" ]
ceph
20b7bb685c5ea74c651ca1ea547ac66b0fee7035
258,080,676,826,579,760,000,000,000,000,000,000,000
18
msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities The secure mode uses AES-128-GCM with 96-bit nonces consisting of a 32-bit counter followed by a 64-bit salt. The counter is incremented after processing each frame, the salt is fixed for the duration of the session. Both are initialized from the sessio...
NOEXPORT unsigned psk_server_callback(SSL *ssl, const char *identity, unsigned char *psk, unsigned max_psk_len) { CLI *c; PSK_KEYS *found; c=SSL_get_ex_data(ssl, index_ssl_cli); found=psk_find(&c->opt->psk_sorted, identity); if(!found) { s_log(LOG_INFO, "PSK identity not found (session ...
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
35,233,956,406,967,540,000,000,000,000,000,000,000
20
stunnel-5.57
void ip6_update_pmtu(struct sk_buff *skb, struct net *net, __be32 mtu, int oif, u32 mark) { const struct ipv6hdr *iph = (struct ipv6hdr *) skb->data; struct dst_entry *dst; struct flowi6 fl6; memset(&fl6, 0, sizeof(fl6)); fl6.flowi6_oif = oif; fl6.flowi6_mark = mark ? mark : IP6_REPLY_MARK(net, skb->mark)...
0
[ "CWE-17" ]
linux-stable
9d289715eb5c252ae15bd547cb252ca547a3c4f2
147,067,107,890,576,330,000,000,000,000,000,000,000
19
ipv6: stop sending PTB packets for MTU < 1280 Reduce the attack vector and stop generating IPv6 Fragment Header for paths with an MTU smaller than the minimum required IPv6 MTU size (1280 byte) - called atomic fragments. See IETF I-D "Deprecating the Generation of IPv6 Atomic Fragments" [1] for more information and h...
CImg<T>& LabtoXYZ(const bool use_D65=true) { if (_spectrum!=3) throw CImgInstanceException(_cimg_instance "LabtoXYZ(): Instance is not a Lab image.", cimg_instance); const CImg<Tfloat> white = CImg<Tfloat>(1,1,1,3,255).RGBto...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
309,267,100,103,690,700,000,000,000,000,000,000,000
26
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void cstm(JF, js_Ast *stm) { js_Ast *target; int loop, cont, then, end; emitline(J, F, stm); switch (stm->type) { case AST_FUNDEC: break; case STM_BLOCK: cstmlist(J, F, stm->a); break; case STM_EMPTY: if (F->script) { emit(J, F, OP_POP); emit(J, F, OP_UNDEF); } break; case STM_VAR:...
1
[ "CWE-476" ]
mujs
5008105780c0b0182ea6eda83ad5598f225be3ee
127,900,263,787,103,350,000,000,000,000,000,000,000
206
Fix 697172: degenerate labeled break/continue statement. A labeled break statement will look for a matching label through its chain of parent statements. We start looking at the break statement though, so if the label is attached to the break, we'll return the break statement itself as a break target. Start looking f...
printtree(parser_state *ps) { if (Py_DebugFlag) { printf("Parse tree:\n"); dumptree(ps->p_grammar, ps->p_tree); printf("\n"); printf("Tokens:\n"); showtree(ps->p_grammar, ps->p_tree); printf("\n"); } printf("Listing:\n"); PyNode_ListTree(ps->p_tree); p...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
332,187,464,709,002,000,000,000,000,000,000,000,000
14
bpo-35766: Merge typed_ast back into CPython (GH-11645)
static int nf_tables_newset(struct sk_buff *skb, const struct nfnl_info *info, const struct nlattr * const nla[]) { const struct nfgenmsg *nfmsg = nlmsg_data(info->nlh); u32 ktype, dtype, flags, policy, gc_int, objtype; struct netlink_ext_ack *extack = info->extack; u8 genmask = nft_genmask_next(info->net); ...
1
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
193,021,357,358,532,200,000,000,000,000,000,000,000
269
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
check_linecomment(char_u *line) { char_u *p; p = line; // skip Lispish one-line comments if (curbuf->b_p_lisp) { if (vim_strchr(p, ';') != NULL) // there may be comments { int in_str = FALSE; // inside of string p = line; // scan from start while ((p = vim_strpbrk(p, (char_u *)"...
0
[ "CWE-416" ]
vim
409510c588b1eec1ae33511ae97a21eb8e110895
314,630,001,794,507,800,000,000,000,000,000,000,000
53
patch 8.2.5050: using freed memory when searching for pattern in path Problem: Using freed memory when searching for pattern in path. Solution: Make a copy of the line.
ut32 armass_assemble(const char *str, ut64 off, int thumb) { int i, j; char buf[128]; ArmOpcode aop = {.off = off}; for (i = j = 0; i < sizeof (buf) - 1 && str[j]; i++, j++) { if (str[j] == '#') { i--; continue; } buf[i] = tolower ((const ut8)str[j]); } buf[i] = 0; arm_opcode_parse (&aop, buf); aop.off...
0
[ "CWE-125", "CWE-787" ]
radare2
e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7
150,611,367,167,696,450,000,000,000,000,000,000,000
22
Fix #12417/#12418 (arm assembler heap overflows)
p_bracket(p) register struct parse *p; { register cset *cs = allocset(p); register int invert = 0; /* Dept of Truly Sickening Special-Case Kludges */ if (p->next + 5 < p->end && strncmp(p->next, "[:<:]]", 6) == 0) { EMIT(OBOW, 0); NEXTn(6); return; } if (p->next + 5 < p->end && strncmp(p->next, "[:>:]]", 6...
0
[ "CWE-190" ]
mysql-server
dc45e408250c582eb532417a42cef5b5a8e2fe77
222,148,934,706,969,200,000,000,000,000,000,000,000
68
Bug#20642505: HENRY SPENCER REGULAR EXPRESSIONS (REGEX) LIBRARY The MySQL server uses Henry Spencer's library for regular expressions to support the REGEXP/RLIKE string operator. This changeset adapts a recent fix from the upstream for better 32-bit compatiblity. (Note that we cannot simply use the current upstream ve...
static void mwifiex_pcie_device_dump(struct mwifiex_adapter *adapter) { struct pcie_service_card *card = adapter->card; if (!test_and_set_bit(MWIFIEX_IFACE_WORK_DEVICE_DUMP, &card->work_flags)) schedule_work(&card->work); }
0
[ "CWE-400", "CWE-200", "CWE-401" ]
linux
d10dcb615c8e29d403a24d35f8310a7a53e3050c
117,499,388,045,655,340,000,000,000,000,000,000,000
8
mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring In mwifiex_pcie_init_evt_ring, a new skb is allocated which should be released if mwifiex_map_pci_memory() fails. The release for skb and card->evtbd_ring_vbase is added. Fixes: 0732484b47b5 ("mwifiex: separate ring initialization and ring creation routines...
immedhook(ENTRY * ep GCC_UNUSED) /* write out entries with no use capabilities immediately to save storage */ { #if !HAVE_BIG_CORE /* * This is strictly a core-economy kluge. The really clean way to handle * compilation is to slurp the whole file into core and then do all the * name-collision checks...
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
65,161,558,883,175,360,000,000,000,000,000,000,000
48
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...
archive_mstring_get_wcs(struct archive *a, struct archive_mstring *aes, const wchar_t **wp) { int r, ret = 0; (void)a;/* UNUSED */ /* Return WCS form if we already have it. */ if (aes->aes_set & AES_SET_WCS) { *wp = aes->aes_wcs.s; return (ret); } *wp = NULL; /* Try converting MBS to WCS using native l...
0
[ "CWE-476" ]
libarchive
42a3408ac7df1e69bea9ea12b72e14f59f7400c0
207,542,043,705,092,050,000,000,000,000,000,000,000
26
archive_strncat_l(): allocate and do not convert if length == 0 This ensures e.g. that archive_mstring_copy_mbs_len_l() does not set aes_set = AES_SET_MBS with aes_mbs.s == NULL. Resolves possible null-pointer dereference reported by OSS-Fuzz. Reported-By: OSS-Fuzz issue 286
dissect_usb_video_extension_unit(proto_tree *tree, tvbuff_t *tvb, int offset) { guint8 num_inputs; guint8 control_size; proto_tree_add_item(tree, hf_usb_vid_exten_guid, tvb, offset, 16, ENC_LITTLE_ENDIAN); proto_tree_add_item(tree, hf_usb_vid_exten_num_controls, tvb, offset+16, 1, ENC_LITTL...
0
[ "CWE-476" ]
wireshark
2cb5985bf47bdc8bea78d28483ed224abdd33dc6
290,261,309,233,399,880,000,000,000,000,000,000,000
46
Make class "type" for USB conversations. USB dissectors can't assume that only their class type has been passed around in the conversation. Make explicit check that class type expected matches the dissector and stop/prevent dissection if there isn't a match. Bug: 12356 Change-Id: Ib23973a4ebd0fbb51952ffc118daf95e338...
static int vfs_parse_sb_flag(struct fs_context *fc, const char *key) { unsigned int token; token = lookup_constant(common_set_sb_flag, key, 0); if (token) { fc->sb_flags |= token; fc->sb_flags_mask |= token; return 0; } token = lookup_constant(common_clear_sb_flag, key, 0); if (token) { fc->sb_flags &= ...
0
[ "CWE-787" ]
linux
722d94847de29310e8aa03fcbdb41fc92c521756
253,943,488,672,576,030,000,000,000,000,000,000,000
20
vfs: fs_context: fix up param length parsing in legacy_parse_param The "PAGE_SIZE - 2 - size" calculation in legacy_parse_param() is an unsigned type so a large value of "size" results in a high positive value instead of a negative value as expected. Fix this by getting rid of the subtraction. Signed-off-by: Jamie H...
static int nf_tables_newtable(struct sk_buff *skb, const struct nfnl_info *info, const struct nlattr * const nla[]) { struct nftables_pernet *nft_net = nft_pernet(info->net); struct netlink_ext_ack *extack = info->extack; u8 genmask = nft_genmask_next(info->net); u8 family = info->nfmsg->nfgen_family; str...
0
[ "CWE-787" ]
linux
6e1acfa387b9ff82cfc7db8cc3b6959221a95851
336,895,721,977,467,000,000,000,000,000,000,000,000
89
netfilter: nf_tables: validate registers coming from userspace. Bail out in case userspace uses unsupported registers. Fixes: 49499c3e6e18 ("netfilter: nf_tables: switch registers to 32 bit addressing") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
void CLASS parseOlympus_ImageProcessing (unsigned tag, unsigned type, unsigned len, unsigned dng_writer) { // uptag 0x2040 int i, c, wb[4], nWB, tWB, wbG; ushort CT; short sorder; if ((tag == 0x0100) && (dng_writer == nonDNG)) { cam_mul[0] = get2() / 256.0; cam_mul[2] = get2() / 256.0; } else...
0
[ "CWE-400" ]
LibRaw
e67a9862d10ebaa97712f532eca1eb5e2e410a22
71,372,867,647,022,510,000,000,000,000,000,000,000
136
Fixed Secunia Advisory SA86384 - possible infinite loop in unpacked_load_raw() - possible infinite loop in parse_rollei() - possible infinite loop in parse_sinar_ia() Credits: Laurent Delosieres, Secunia Research at Flexera
static inline int insn_const_size(TCGMemOp ot) { if (ot <= MO_32) { return 1 << ot; } else { return 4; } }
0
[ "CWE-94" ]
qemu
30663fd26c0307e414622c7a8607fbc04f92ec14
47,067,025,685,185,220,000,000,000,000,000,000,000
8
tcg/i386: Check the size of instruction being translated This fixes the bug: 'user-to-root privesc inside VM via bad translation caching' reported by Jann Horn here: https://bugs.chromium.org/p/project-zero/issues/detail?id=1122 Reviewed-by: Richard Henderson <rth@twiddle.net> CC: Peter Maydell <peter.maydell@linaro....
do_record(int c) { char_u *p; static int regname; yankreg_T *old_y_previous, *old_y_current; int retval; if (reg_recording == 0) // start recording { // registers 0-9, a-z and " are allowed if (c < 0 || (!ASCII_ISALNUM(c) && c != '"')) retval = FAIL; else { re...
0
[ "CWE-122", "CWE-787" ]
vim
d25f003342aca9889067f2e839963dfeccf1fe05
229,847,821,389,481,800,000,000,000,000,000,000,000
48
patch 9.0.0011: reading beyond the end of the line with put command Problem: Reading beyond the end of the line with put command. Solution: Adjust the end mark position.
static time_t mkgmtime(struct tm *tm) { static const int mdays[12] = {0,31,59,90,120,151,181,212,243,273,304,334}; return ((((((tm->tm_year - 70) * 365) + mdays[tm->tm_mon] + tm->tm_mday-1 + (tm->tm_year-68-1+(tm->tm_mon>=2))/4) * 24) + tm->tm_hour) * 60 + tm->tm_min) * 60 + tm->tm_se...
0
[ "CWE-119" ]
php-src
88412772d295ebf7dd34409534507dc9bcac726e
148,632,443,571,441,930,000,000,000,000,000,000,000
8
Fix bug #68027 - fix date parsing in XMLRPC lib
static int pn533_usb_probe(struct usb_interface *interface, const struct usb_device_id *id) { struct pn533 *priv; struct pn533_usb_phy *phy; struct usb_host_interface *iface_desc; struct usb_endpoint_descriptor *endpoint; int in_endpoint = 0; int out_endpoint = 0; int rc = -ENOMEM; int i; u32 protocols; en...
0
[ "CWE-416" ]
linux
6af3aa57a0984e061f61308fe181a9a12359fecc
267,612,672,589,941,470,000,000,000,000,000,000,000
130
NFC: pn533: fix use-after-free and memleaks The driver would fail to deregister and its class device and free related resources on late probe errors. Reported-by: syzbot+cb035c75c03dbe34b796@syzkaller.appspotmail.com Fixes: 32ecc75ded72 ("NFC: pn533: change order operations in dev registation") Signed-off-by: Johan H...
static int mov_write_trkn_tag(AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s, int disc) { AVDictionaryEntry *t = av_dict_get(s->metadata, disc ? "disc" : "track", NULL, 0); int size = 0, track = ...
0
[ "CWE-369" ]
FFmpeg
2c0e98a0b478284bdff6d7a4062522605a8beae5
262,620,631,609,210,630,000,000,000,000,000,000,000
26
avformat/movenc: Write version 2 of audio atom if channels is not known The version 1 needs the channel count and would divide by 0 Fixes: division by 0 Fixes: fpe_movenc.c_1108_1.ogg Fixes: fpe_movenc.c_1108_2.ogg Fixes: fpe_movenc.c_1108_3.wav Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg> Signed-off-by: Michael N...
isdn_dc2minor(int di, int ch) { int i; for (i = 0; i < ISDN_MAX_CHANNELS; i++) if (dev->chanmap[i] == ch && dev->drvmap[i] == di) return i; return -1; }
0
[ "CWE-119" ]
linux-2.6
eafe1aa37e6ec2d56f14732b5240c4dd09f0613a
204,633,404,752,955,420,000,000,000,000,000,000,000
8
I4L: fix isdn_ioctl memory overrun vulnerability Fix possible memory overrun issue in the isdn ioctl code. Found by ADLAB <adlab@venustech.com.cn> Signed-off-by: Karsten Keil <kkeil@suse.de> Cc: ADLAB <adlab@venustech.com.cn> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off...
static inline void writer_print_integer(WriterContext *wctx, const char *key, long long int val) { const struct section *section = wctx->section[wctx->level]; if (section->show_all_entries || av_dict_get(section->entries_to_show, key, NULL, 0)) { wctx->writer->pr...
0
[ "CWE-476" ]
FFmpeg
837cb4325b712ff1aab531bf41668933f61d75d2
203,160,760,739,291,360,000,000,000,000,000,000,000
10
ffprobe: Fix null pointer dereference with color primaries Found-by: AD-lab of venustech Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
struct posix_acl *jffs2_get_acl(struct inode *inode, int type) { struct posix_acl *acl; char *value = NULL; int rc, xprefix; switch (type) { case ACL_TYPE_ACCESS: xprefix = JFFS2_XPREFIX_ACL_ACCESS; break; case ACL_TYPE_DEFAULT: xprefix = JFFS2_XPREFIX_ACL_DEFAULT; break; default: BUG(); } rc = do_j...
0
[ "CWE-862", "CWE-285" ]
linux
073931017b49d9458aa351605b43a7e34598caef
46,481,626,605,742,890,000,000,000,000,000,000,000
33
posix_acl: Clear SGID bit when setting file permissions When file permissions are modified via chmod(2) and the user is not in the owning group or capable of CAP_FSETID, the setgid bit is cleared in inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file permissions as well as the new ACL, but doesn't cl...
Item_func_trig_cond::add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level, table_map usable_tables, SARGABLE_PARAM **sargables) { /* Subquery optimization: Conditions that are pushed down into subqueries are wrapped into It...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
87,509,156,789,211,200,000,000,000,000,000,000,000
22
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
string_concat(register PyStringObject *a, register PyObject *bb) { register Py_ssize_t size; register PyStringObject *op; if (!PyString_Check(bb)) { #ifdef Py_USING_UNICODE if (PyUnicode_Check(bb)) return PyUnicode_Concat((PyObject *)a, bb); #endif if (PyByteArray_Check(bb)) ...
0
[ "CWE-190" ]
cpython
c3c9db89273fabc62ea1b48389d9a3000c1c03ae
59,990,384,992,072,270,000,000,000,000,000,000,000
57
[2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174)
Http::FilterHeadersStatus Filter::decodeHeaders(Http::RequestHeaderMap& headers, bool end_stream) { downstream_headers_ = &headers; // Extract debug configuration from filter state. This is used further along to determine whether // we should append cluster and host headers to the response, and whether to forwar...
0
[ "CWE-703" ]
envoy
511b35e7c59f4e78a1dd8538b0f3c97ea6718e64
322,620,141,692,880,870,000,000,000,000,000,000,000
296
[1.19] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
static void unaccount_freq_event(void) { if (tick_nohz_full_enabled()) unaccount_freq_event_nohz(); else atomic_dec(&nr_freq_events); }
0
[ "CWE-362", "CWE-125" ]
linux
321027c1fe77f892f4ea07846aeae08cefbbb290
253,113,034,550,394,900,000,000,000,000,000,000,000
7
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...
xmlSchemaIDCFreeBinding(xmlSchemaPSVIIDCBindingPtr bind) { if (bind->nodeTable != NULL) xmlFree(bind->nodeTable); if (bind->dupls != NULL) xmlSchemaItemListFree(bind->dupls); xmlFree(bind); }
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
303,479,912,268,794,460,000,000,000,000,000,000,000
8
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
void php_gd_error_method(int type, const char *format, va_list args) { switch (type) { case GD_DEBUG: case GD_INFO: case GD_NOTICE: type = E_NOTICE; break; case GD_WARNING: type = E_WARNING; break; default: type = E_ERROR; } php_verror(NULL, "", type, format, args TSRMLS_CC); }
0
[ "CWE-787" ]
php-src
28022c9b1fd937436ab67bb3d61f652c108baf96
128,122,801,127,093,500,000,000,000,000,000,000,000
17
Fix bug#72697 - select_colors write out-of-bounds (cherry picked from commit b6f13a5ef9d6280cf984826a5de012a32c396cd4) Conflicts: ext/gd/gd.c
ParseAttrColor(s1, s2, msgok) char *s1, *s2; int msgok; { int i, n; char *s, *ss; int r = 0; s = s1; while (*s == ' ') s++; ss = s; while (*ss && *ss != ' ') ss++; while (*ss == ' ') ss++; if (*s && (s2 || *ss || !((*s >= 'a' && *s <= 'z') || (*s >= 'A' && *s <= 'Z') || *s == '.'))) {...
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
225,083,232,029,662,300,000,000,000,000,000,000,000
172
ansi: add support for xterm OSC 11 It allows for getting and setting the background color. Notably, Vim uses OSC 11 to learn whether it's running on a light or dark colored terminal and choose a color scheme accordingly. Tested with gnome-terminal and xterm. When called with "?" argument the current background color ...
string t_go_generator::declare_argument(t_field* tfield) { std::ostringstream result; result << publicize(tfield->get_name()) << "="; if (tfield->get_value() != NULL) { result << "thrift_spec[" << tfield->get_key() << "][4]"; } else { result << "nil"; } return result.str(); }
0
[ "CWE-77" ]
thrift
2007783e874d524a46b818598a45078448ecc53e
94,245,640,742,384,870,000,000,000,000,000,000,000
12
THRIFT-3893 Command injection in format_go_output Client: Go Patch: Jens Geyer
PHP_FUNCTION(xsl_xsltprocessor_get_parameter) { zval *id; int name_len = 0, namespace_len = 0; char *name, *namespace; zval **value; xsl_object *intern; DOM_GET_THIS(id); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &namespace, &namespace_len, &name, &name_len) == FAILURE) { RETURN_FALSE; } ...
1
[]
php-src
1744be2d17befc69bf00033993f4081852a747d6
201,374,605,636,371,300,000,000,000,000,000,000,000
21
Fix for bug #69782
static int strncmp_skip_color_codes(const char *s1, const char *s2, int n) { int i = 0, j = 0; int count = 0; for (i = 0, j = 0; s1[i] && s2[j] && count < n; i++, j++, count++) { while (s1[i] == 0x1b) { while (s1[i] && s1[i] != 'm') { i++; } if (s1[i]) { i++; } } while (s2[j] == 0x1b) { ...
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
177,766,802,417,804,300,000,000,000,000,000,000,000
31
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
void ms_deliver_handle_reset(Connection *con) { for (list<Dispatcher*>::iterator p = dispatchers.begin(); p != dispatchers.end(); ++p) { if ((*p)->ms_handle_reset(con)) return; } }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
339,612,279,787,445,030,000,000,000,000,000,000,000
8
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 ...
disconnect_server(Connection *conn, PRUint64 opconnid, int opid, PRErrorCode reason, PRInt32 error) { pthread_mutex_lock(&(conn->c_mutex)); disconnect_server_nomutex(conn, opconnid, opid, reason, error); pthread_mutex_unlock(&(conn->c_mutex)); }
0
[ "CWE-415" ]
389-ds-base
a3c298f8140d3e4fa1bd5a670f1bb965a21a9b7b
168,795,290,821,020,770,000,000,000,000,000,000,000
6
Issue 5218 - double-free of the virtual attribute context in persistent search (#5219) description: A search is processed by a worker using a private pblock. If the search is persistent, the worker spawn a thread and kind of duplicate its private pblock so that the spawn thread continue to process the p...
static struct dentry *btrfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) { struct dentry *ret; ret = d_splice_alias(btrfs_lookup_dentry(dir, dentry), dentry); if (unlikely(d_need_lookup(dentry))) { spin_lock(&dentry->d_lock); dentry->d_flags &= ~DCACHE_NEED_LOOKUP; spin_unlock(&...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
72,763,823,201,604,470,000,000,000,000,000,000,000
13
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
void fxSetArrayBufferLength(txMachine* the, txSlot* slot, txInteger target) { txSlot* instance = fxCheckArrayBufferInstance(the, slot); txSlot* arrayBuffer = instance->next; txSlot* bufferInfo = arrayBuffer->next; txInteger length = bufferInfo->value.bufferInfo.length; txByte* address = arrayBuffer->value.arrayBuf...
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
88,838,047,620,038,530,000,000,000,000,000,000,000
29
XS: #896
static int io_accept_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct io_accept *accept = &req->accept; if (unlikely(req->ctx->flags & (IORING_SETUP_IOPOLL|IORING_SETUP_SQPOLL))) return -EINVAL; if (sqe->ioprio || sqe->len || sqe->buf_index) return -EINVAL; accept->addr = u64_to_user_ptr(RE...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
69,566,040,350,832,200,000,000,000,000,000,000,000
15
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
static void smm_disable(void) { mp_state.do_smm = 0; }
0
[ "CWE-269" ]
coreboot
afb7a814783cda12f5b72167163b9109ee1d15a7
130,123,623,473,083,660,000,000,000,000,000,000,000
4
cpu/x86/smm: Introduce SMM module loader version 2 Xeon-SP Skylake Scalable Processor can have 36 CPU threads (18 cores). Current coreboot SMM is unable to handle more than ~32 CPU threads. This patch introduces a version 2 of the SMM module loader which addresses this problem. Having two versions of the SMM module lo...
void LIRGenerator::do_If(If* x) { assert(x->number_of_sux() == 2, "inconsistency"); ValueTag tag = x->x()->type()->tag(); bool is_safepoint = x->is_safepoint(); If::Condition cond = x->cond(); LIRItem xitem(x->x(), this); LIRItem yitem(x->y(), this); LIRItem* xin = &xitem; LIRItem* yin = &yitem; if...
0
[]
jdk11u-dev
9a62b8af48af6c506d2fc4a3482116de26357f16
241,760,247,471,163,470,000,000,000,000,000,000,000
58
8272014: Better array indexing Backport-of: 937c31d896d05aa24543b74e98a2ea9f05b5d86f
static inline int memcpy_from_msg(void *data, struct msghdr *msg, int len) { return copy_from_iter_full(data, len, &msg->msg_iter) ? 0 : -EFAULT;
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
331,220,314,194,563,100,000,000,000,000,000,000,000
4
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
Status AuthorizationSessionImpl::checkAuthForAggregate(const NamespaceString& nss, const BSONObj& cmdObj, bool isMongos) { if (!nss.isValid()) { return Status(ErrorCodes::InvalidNamespace, ...
0
[ "CWE-613" ]
mongo
6dfb92b1299de04677d0bd2230e89a52eb01003c
191,259,673,045,049,880,000,000,000,000,000,000,000
68
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
static void tun_sock_write_space(struct sock *sk) { struct tun_file *tfile; wait_queue_head_t *wqueue; if (!sock_writeable(sk)) return; if (!test_and_clear_bit(SOCKWQ_ASYNC_NOSPACE, &sk->sk_socket->flags)) return; wqueue = sk_sleep(sk); if (wqueue && waitqueue_active(wqueue)) wake_up_interruptible_sync_p...
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
118,925,155,312,125,230,000,000,000,000,000,000,000
19
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
d_lite_next_year(int argc, VALUE *argv, VALUE self) { VALUE n; rb_scan_args(argc, argv, "01", &n); if (argc < 1) n = INT2FIX(1); return d_lite_rshift(self, f_mul(n, INT2FIX(12))); }
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
317,059,307,176,775,160,000,000,000,000,000,000,000
9
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...