func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int ext4_data_block_valid_rcu(struct ext4_sb_info *sbi, struct ext4_system_blocks *system_blks, ext4_fsblk_t start_blk, unsigned int count) { struct ext4_system_zone *entry; struct rb_node *n; if ((start_blk <= le32_to_cpu(sbi->s_es->s_first_data_block)) || (start_blk + count ...
1
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
29,526,685,505,615,170,000,000,000,000,000,000,000
28
ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently...
LoRaMacStatus_t LoRaMacMlmeRequest( MlmeReq_t* mlmeRequest ) { LoRaMacStatus_t status = LORAMAC_STATUS_SERVICE_UNKNOWN; MlmeConfirmQueue_t queueElement; uint8_t macCmdPayload[2] = { 0x00, 0x00 }; if( mlmeRequest == NULL ) { return LORAMAC_STATUS_PARAMETER_INVALID; } if( Lo...
0
[ "CWE-120", "CWE-787" ]
LoRaMac-node
e3063a91daa7ad8a687223efa63079f0c24568e4
89,555,880,887,914,100,000,000,000,000,000,000,000
150
Added received buffer size checks.
Field_string(uchar *ptr_arg, uint32 len_arg,uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg, const DTCollation &collation) :Field_longstr(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_ar...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
41,035,991,726,269,710,000,000,000,000,000,000,000
7
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static int sev_launch_update_data(struct kvm *kvm, struct kvm_sev_cmd *argp) { unsigned long vaddr, vaddr_end, next_vaddr, npages, pages, size, i; struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info; struct kvm_sev_launch_update_data params; struct sev_data_launch_update_data *data; struct page **inpages; int r...
0
[]
linux
7be74942f184fdfba34ddd19a0d995deb34d4a03
169,613,976,698,129,780,000,000,000,000,000,000,000
75
KVM: SVM: Periodically schedule when unregistering regions on destroy There may be many encrypted regions that need to be unregistered when a SEV VM is destroyed. This can lead to soft lockups. For example, on a host running 4.15: watchdog: BUG: soft lockup - CPU#206 stuck for 11s! [t_virtual_machi:194348] CPU: 206...
Pl_ASCIIHexDecoder::write(unsigned char* buf, size_t len) { if (this->eod) { return; } for (size_t i = 0; i < len; ++i) { char ch = static_cast<char>(toupper(buf[i])); switch (ch) { case ' ': case '\f': case '\v': case '\t': case '\r': case '\n': QTC::TC("libtests", "Pl_AS...
0
[ "CWE-787" ]
qpdf
dc92574c10f3e2516ec6445b88c5d584f40df4e5
169,585,356,666,111,210,000,000,000,000,000,000,000
53
Fix some pipelines to be safe if downstream write fails (fuzz issue 28262)
static inline void tcp_init_wl(struct tcp_sock *tp, u32 seq) { tp->snd_wl1 = seq; }
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
103,536,775,211,796,450,000,000,000,000,000,000,000
4
tcp: fix use after free in tcp_xmit_retransmit_queue() When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the tail of the write queue using tcp_add_write_queue_tail() Then it attempts to copy user data into this fresh skb. If the copy fails, we undo the work and remove the fresh skb. Unfortunately, t...
int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx) { X509 *err_cert; int err,depth; err_cert=X509_STORE_CTX_get_current_cert(ctx); err= X509_STORE_CTX_get_error(ctx); depth= X509_STORE_CTX_get_error_depth(ctx); BIO_printf(bio_err,"depth=%d ",depth); if (err_cert) { X509_NAME_print_ex(bio_err, X5...
0
[]
openssl
4817504d069b4c5082161b02a22116ad75f822b1
17,608,063,952,935,202,000,000,000,000,000,000,000
64
PR: 2658 Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Reviewed by: steve Support for TLS/DTLS heartbeats.
int table_is_an_array(lua_State *L) { int count = 0, max = 0; #if LUA_VERSION_NUM < 503 lua_Number n; #else lua_Integer n; #endif /* Stack top on function entry */ int stacktop; stacktop = lua_gettop(L); lua_pushnil(L); while(lua_next(L,-2)) { /* Stack: ... key value */ ...
0
[ "CWE-119", "CWE-787" ]
redis
52a00201fca331217c3b4b8b634f6a0f57d6b7d3
101,554,030,902,298,250,000,000,000,000,000,000,000
39
Security: fix Lua cmsgpack library stack overflow. During an auditing effort, the Apple Vulnerability Research team discovered a critical Redis security issue affecting the Lua scripting part of Redis. -- Description of the problem Several years ago I merged a pull request including many small changes at the Lua Msg...
void set_item_result_field(Item_result_field *item) { m_item_result_field= item; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
159,752,975,846,514,260,000,000,000,000,000,000,000
2
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 void cmd_parse_capability(struct ImapAccountData *adata, char *s) { mutt_debug(LL_DEBUG3, "Handling CAPABILITY\n"); s = imap_next_word(s); char *bracket = strchr(s, ']'); if (bracket) *bracket = '\0'; FREE(&adata->capstr); adata->capstr = mutt_str_strdup(s); adata->capabilities = 0; while (...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
28,106,255,804,577,530,000,000,000,000,000,000,000
26
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
static int DecodeKeyUsage(const byte* input, int sz, DecodedCert* cert) { word32 idx = 0; int length; int ret; WOLFSSL_ENTER("DecodeKeyUsage"); ret = CheckBitString(input, &idx, &length, sz, 0, NULL); if (ret != 0) return ret; cert->extKeyUsage = (word16)(input[idx]); if (lengt...
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
87,550,274,753,323,380,000,000,000,000,000,000,000
17
OCSP: improve handling of OCSP no check extension
ciKlass* ciEnv::get_klass_by_index_impl(constantPoolHandle cpool, int index, bool& is_accessible, ciInstanceKlass* accessor) { EXCEPTION_CONTEXT; KlassHandle klass; // = NULL; Symbol* klass_name...
0
[]
jdk8u
1dafef08cc922ee85a8e216387100dc681a5484d
127,838,252,253,545,740,000,000,000,000,000,000,000
67
8281859: Improve class compilation Reviewed-by: andrew Backport-of: 3ac62a66efd05d0842076dd4cfbea0e53b12630f
show_autocmd(AutoPat *ap, event_T event) { AutoCmd *ac; // Check for "got_int" (here and at various places below), which is set // when "q" has been hit for the "--more--" prompt if (got_int) return; if (ap->pat == NULL) // pattern has been removed return; msg_putchar('\n'); if (got_int...
0
[ "CWE-122", "CWE-787" ]
vim
5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089
10,168,906,037,710,880,000,000,000,000,000,000,000
59
patch 9.0.0061: ml_get error with nested autocommand Problem: ml_get error with nested autocommand. Solution: Also check line numbers for a nested autocommand. (closes #10761)
static void _pgsql_close(void *conn) { PQfinish(conn); }
0
[ "CWE-89" ]
cyrus-sasl
9eff746c9daecbcc0041b09a5a51ba30738cdcbc
175,314,401,010,263,740,000,000,000,000,000,000,000
4
CVE-2022-24407 Escape password for SQL insert/update commands. Signed-off-by: Klaus Espenlaub <klaus@espenlaub.com>
static int cxusb_dualdig4_rev2_frontend_attach(struct dvb_usb_adapter *adap) { struct dib0700_adapter_state *state = adap->priv; if (usb_set_interface(adap->dev->udev, 0, 1) < 0) err("set interface failed"); cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1)...
0
[ "CWE-119", "CWE-787" ]
linux
3f190e3aec212fc8c61e202c51400afa7384d4bc
136,880,439,181,650,370,000,000,000,000,000,000,000
27
[media] cxusb: Use a dma capable buffer also for reading Commit 17ce039b4e54 ("[media] cxusb: don't do DMA on stack") added a kmalloc'ed bounce buffer for writes, but missed to do the same for reads. As the read only happens after the write is finished, we can reuse the same buffer. As dvb_usb_generic_rw handles a re...
static MYSQL *db_connect(char *host, char *database, char *user, char *passwd) { MYSQL *mysql; if (verbose) fprintf(stdout, "Connecting to %s\n", host ? host : "localhost"); if (!(mysql= mysql_init(NULL))) return 0; if (opt_compress) mysql_options(mysql,MYSQL_OPT_COMPRESS,Nu...
0
[ "CWE-295" ]
mysql-server
b3e9211e48a3fb586e88b0270a175d2348935424
100,787,740,894,806,270,000,000,000,000,000,000,000
55
WL#9072: Backport WL#8785 to 5.5
blk_get_flush_queue(struct request_queue *q, struct blk_mq_ctx *ctx) { return blk_mq_map_queue(q, REQ_OP_FLUSH, ctx)->fq; }
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
280,115,922,772,509,650,000,000,000,000,000,000,000
4
block: free sched's request pool in blk_cleanup_queue In theory, IO scheduler belongs to request queue, and the request pool of sched tags belongs to the request queue too. However, the current tags allocation interfaces are re-used for both driver tags and sched tags, and driver tags is definitely host wide, and doe...
void cql_server::response::write_int(int32_t n) { auto u = htonl(n); auto *s = reinterpret_cast<const int8_t*>(&u); _body.write(bytes_view(s, sizeof(u))); }
0
[]
scylladb
1c2eef384da439b0457b6d71c7e37d7268e471cb
171,603,316,385,185,950,000,000,000,000,000,000,000
6
transport/server.cc: Return correct size of decompressed lz4 buffer An incorrect size is returned from the function, which could lead to crashes or undefined behavior. Fix by erroring out in these cases. Fixes #11476
bool Item_int::eq(const Item *arg, bool binary_cmp) const { /* No need to check for null value as basic constant can't be NULL */ if (arg->basic_const_item() && arg->type() == type()) { /* We need to cast off const to call val_int(). This should be OK for a basic constant. */ Item *item= (...
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
252,427,448,255,097,000,000,000,000,000,000,000,000
16
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
int32_t cli_bcapi_file_byteat(struct cli_bc_ctx *ctx, uint32_t off) { unsigned char c; if (!ctx->fmap) { cli_dbgmsg("bcapi_file_byteat: no fmap\n"); return -1; } cli_event_int(EV, BCEV_OFFSET, off); if (fmap_readn(ctx->fmap, &c, off, 1) != 1) { cli_dbgmsg("bcapi_file_byteat: fmap_readn failed at ...
0
[ "CWE-189" ]
clamav-devel
3d664817f6ef833a17414a4ecea42004c35cc42f
35,079,659,011,900,564,000,000,000,000,000,000,000
14
fix recursion level crash (bb #3706). Thanks to Stephane Chazelas for the analysis.
TEST_F(HttpHealthCheckerImplTest, Disconnect) { setupNoServiceValidationHC(); EXPECT_CALL(event_logger_, logUnhealthy(_, _, _, true)); EXPECT_CALL(*this, onHostStatus(_, HealthTransition::ChangePending)); cluster_->prioritySet().getMockHostSet(0)->hosts_ = { makeTestHost(cluster_->info_, "tcp://127.0.0.1...
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
332,962,134,083,613,840,000,000,000,000,000,000,000
33
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static ut32 mov(ArmOp *op) { int k = 0; ut32 data = UT32_MAX; if (!strncmp (op->mnemonic, "movz", 4)) { if (op->operands[0].reg_type & ARM_REG64) { k = 0x80d2; } else if (op->operands[0].reg_type & ARM_REG32) { k = 0x8052; } } else if (!strncmp (op->mnemonic, "movk", 4)) { if (op->operands[0].reg_type...
0
[ "CWE-119", "CWE-787" ]
radare2
df167c7db545953bb7f71c72e98e7a3ca0c793bf
63,644,125,337,641,280,000,000,000,000,000,000,000
47
Fix #12376 - crash in: rasm2 -a arm -b 64 '0 ,0,0,0,0,0,0,'
static inline size_t buf_room_for_htx_data(const struct buffer *buf) { size_t room; room = b_room(buf); if (room <= sizeof(struct htx) + 2 * sizeof(struct htx_blk)) room = 0; else room -= sizeof(struct htx) + 2 * sizeof(struct htx_blk); return room; }
0
[ "CWE-190" ]
haproxy
3b69886f7dcc3cfb3d166309018e6cfec9ce2c95
67,554,173,888,224,000,000,000,000,000,000,000,000
12
BUG/MAJOR: htx: fix missing header name length check in htx_add_header/trailer Ori Hollander of JFrog Security reported that htx_add_header() and htx_add_trailer() were missing a length check on the header name. While this does not allow to overwrite any memory area, it results in bits of the header name length to sli...
void NumberFormatTest::Test13391_chakmaParsing() { UErrorCode status = U_ZERO_ERROR; LocalPointer<DecimalFormat> df(dynamic_cast<DecimalFormat*>( NumberFormat::createInstance(Locale("ccp"), status))); if (df == nullptr) { dataerrln("%s %d Chakma df is null", __FILE__, __LINE__); ret...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
649,793,240,873,645,600,000,000,000,000,000,000
33
ICU-20246 Fixing another integer overflow in number parsing.
static int __kvm_io_bus_write(struct kvm_vcpu *vcpu, struct kvm_io_bus *bus, struct kvm_io_range *range, const void *val) { int idx; idx = kvm_io_bus_get_first_dev(bus, range->addr, range->len); if (idx < 0) return -EOPNOTSUPP; while (idx < bus->dev_count && kvm_io_bus_cmp(range, &bus->range[idx]) =...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
166,255,312,524,958,830,000,000,000,000,000,000,000
19
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
static void __init hugetlb_hstate_alloc_pages(struct hstate *h) { unsigned long i; for (i = 0; i < h->max_huge_pages; ++i) { if (hstate_is_gigantic(h)) { if (!alloc_bootmem_huge_page(h)) break; } else if (!alloc_fresh_huge_page(h, &node_states[N_MEMORY])) break; cond_resched(); } if (i < h->m...
0
[ "CWE-703" ]
linux
5af10dfd0afc559bb4b0f7e3e8227a1578333995
131,943,758,508,492,210,000,000,000,000,000,000,000
22
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...
static int vidioc_enum_freq_bands(struct file *file, void *priv, struct v4l2_frequency_band *band) { if (band->tuner != 0) return -EINVAL; if (band->index >= ARRAY_SIZE(bands)) return -EINVAL; *band = bands[band->index]; return 0; }
0
[ "CWE-416" ]
linux
c666355e60ddb4748ead3bdd983e3f7f2224aaf0
244,292,222,353,733,430,000,000,000,000,000,000,000
13
media: radio-raremono: change devm_k*alloc to k*alloc Change devm_k*alloc to k*alloc to manually allocate memory The manual allocation and freeing of memory is necessary because when the USB radio is disconnected, the memory associated with devm_k*alloc is freed. Meaning if we still have unresolved references to the ...
void decrCommand(client *c) { incrDecrCommand(c,-1); }
0
[ "CWE-190" ]
redis
92e3b1802f72ca0c5b0bde97f01d9b57a758d85c
116,745,687,020,395,870,000,000,000,000,000,000,000
3
Fix integer overflow in STRALGO LCS (CVE-2021-29477) An integer overflow bug in Redis version 6.0 or newer could be exploited using the STRALGO LCS command to corrupt the heap and potentially result with remote code execution. (cherry picked from commit f0c5f920d0f88bd8aa376a2c05af4902789d1ef9)
int cil_gen_default(struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor) { int rc = SEPOL_ERR; struct cil_default *def = NULL; char *object; enum cil_syntax syntax[] = { CIL_SYN_STRING, CIL_SYN_STRING | CIL_SYN_LIST, CIL_SYN_STRING, CIL_SYN_END }; int syntax_len = s...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
168,931,260,270,264,070,000,000,000,000,000,000,000
53
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
static void rebalance_domains(int cpu, enum cpu_idle_type idle) { int balance = 1; struct rq *rq = cpu_rq(cpu); unsigned long interval; struct sched_domain *sd; /* Earliest time when we have to do rebalance again */ unsigned long next_balance = jiffies + 60*HZ; int update_next_balance = 0; cpumask_t tmp; for_...
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
34,972,104,749,429,980,000,000,000,000,000,000,000
68
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
art_pdf_composite_group_8(byte *gs_restrict dst, byte *gs_restrict dst_alpha_g, byte *gs_restrict src, int n_chan, byte alpha) { byte src_alpha = src[n_chan]; /* $\alpha g_n$ */ if (src_alpha == 0) return 0; if (alpha != 255) { int tmp = src_alpha * alpha + 0x80; src[n_cha...
0
[ "CWE-476" ]
ghostpdl
7870f4951bcc6a153f317e3439e14d0e929fd231
292,863,774,989,432,500,000,000,000,000,000,000,000
20
Bug 701795: Segv due to image mask issue
void sctp_generate_t3_rtx_event(unsigned long peer) { int error; struct sctp_transport *transport = (struct sctp_transport *) peer; struct sctp_association *asoc = transport->asoc; struct net *net = sock_net(asoc->base.sk); /* Check whether a task is in the sock. */ bh_lock_sock(asoc->base.sk); if (sock_owned...
1
[ "CWE-362" ]
linux
635682a14427d241bab7bbdeebb48a7d7b91638e
52,756,620,435,291,090,000,000,000,000,000,000,000
39
sctp: Prevent soft lockup when sctp_accept() is called during a timeout event A case can occur when sctp_accept() is called by the user during a heartbeat timeout event after the 4-way handshake. Since sctp_assoc_migrate() changes both assoc->base.sk and assoc->ep, the bh_sock_lock in sctp_generate_heartbeat_event() ...
unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) { int extdatalen=0; unsigned char *ret = p; ret+=2; if (ret>=limit) return NULL; /* this really never occurs, but ... */ if (!s->hit && s->servername_done == 1 && s->session->tlsext_hostname != NULL) { if (limit - p -...
1
[]
openssl
36ca4ba63d083da6f9d4598f18f17a8c32c8eca2
280,821,303,405,468,260,000,000,000,000,000,000,000
22
Implement the Supported Point Formats Extension for ECC ciphersuites Submitted by: Douglas Stebila
static inline int pipelined_send(struct msg_queue *msq, struct msg_msg *msg) { struct msg_receiver *msr, *t; list_for_each_entry_safe(msr, t, &msq->q_receivers, r_list) { if (testmsg(msg, msr->r_msgtype, msr->r_mode) && !security_msg_queue_msgrcv(msq, msg, msr->r_tsk, msr->r_msgtype, msr->r_mode)...
0
[ "CWE-362", "CWE-401" ]
linux
b9a532277938798b53178d5a66af6e2915cb27cf
295,007,335,857,141,980,000,000,000,000,000,000,000
39
Initialize msg/shm IPC objects before doing ipc_addid() As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before having initialized the IPC object state. Yes, we initialize the IPC object in a locked state, but with all the lockless RCU lookup work, that IPC object lock no longer means that the state c...
int nft_parse_register_store(const struct nft_ctx *ctx, const struct nlattr *attr, u8 *dreg, const struct nft_data *data, enum nft_data_types type, unsigned int len) { int err; u32 reg; err = nft_parse_register(attr, &reg); if (err < 0) return err; err = nft_validate_register_store(ctx,...
0
[]
net
520778042ccca019f3ffa136dd0ca565c486cedd
191,411,461,914,314,750,000,000,000,000,000,000,000
19
netfilter: nf_tables: disallow non-stateful expression in sets earlier Since 3e135cd499bf ("netfilter: nft_dynset: dynamic stateful expression instantiation"), it is possible to attach stateful expressions to set elements. cd5125d8f518 ("netfilter: nf_tables: split set destruction in deactivate and destroy phase") in...
reindex_relation(Oid relid, int flags) { Relation rel; Oid toast_relid; List *indexIds; bool is_pg_class; bool result; /* * Open and lock the relation. ShareLock is sufficient since we only need * to prevent schema and data changes in it. The lock level used here * should match ReindexTable(). */...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
67,168,041,852,806,210,000,000,000,000,000,000,000
117
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
static int handle_NPP_Destroy(rpc_connection_t *connection) { D(bug("handle_NPP_Destroy\n")); int error; PluginInstance *plugin; error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_INVALID); if (error != RPC_ERROR_NO_ERROR) { npw_perror("NPP_Destroy() g...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
259,763,028,518,804,500,000,000,000,000,000,000,000
49
Support all the new variables added
static void jas_stream_destroy(jas_stream_t *stream) { /* If the memory for the buffer was allocated with malloc, free this memory. */ if ((stream->bufmode_ & JAS_STREAM_FREEBUF) && stream->bufbase_) { jas_free(stream->bufbase_); stream->bufbase_ = 0; } jas_free(stream); }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
209,240,346,952,838,600,000,000,000,000,000,000,000
10
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
const char *CServer::ClientClan(int ClientID) const { if(ClientID < 0 || ClientID >= MAX_CLIENTS || m_aClients[ClientID].m_State == CServer::CClient::STATE_EMPTY) return ""; if(m_aClients[ClientID].m_State == CServer::CClient::STATE_INGAME) return m_aClients[ClientID].m_aClan; else return ""; }
0
[ "CWE-20", "CWE-703", "CWE-400" ]
teeworlds
c68402fa7e279d42886d5951d1ea8ac2facc1ea5
307,938,373,889,410,200,000,000,000,000,000,000,000
9
changed a check
static int nl80211_parse_wowlan_nd(struct cfg80211_registered_device *rdev, const struct wiphy_wowlan_support *wowlan, struct nlattr *attr, struct cfg80211_wowlan *trig) { struct nlattr **tb; int err; tb = kcalloc(NUM_NL80211_ATTR, sizeof(*tb), GFP_KERNEL); if (!tb) return -ENOMEM; if (!(w...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
90,863,732,780,190,820,000,000,000,000,000,000,000
32
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
static void vhost_net_vq_reset(struct vhost_net *n) { int i; vhost_net_clear_ubuf_info(n); for (i = 0; i < VHOST_NET_VQ_MAX; i++) { n->vqs[i].done_idx = 0; n->vqs[i].upend_idx = 0; n->vqs[i].ubufs = NULL; n->vqs[i].vhost_hlen = 0; n->vqs[i].sock_hlen = 0; } }
0
[ "CWE-20", "CWE-787" ]
linux
d8316f3991d207fe32881a9ac20241be8fa2bad0
141,371,320,340,080,130,000,000,000,000,000,000,000
15
vhost: fix total length when packets are too short When mergeable buffers are disabled, and the incoming packet is too large for the rx buffer, get_rx_bufs returns success. This was intentional in order for make recvmsg truncate the packet and then handle_rx would detect err != sock_len and drop it. Unfortunately we...
static inline void preempt_conditional_cli(struct pt_regs *regs) { if (regs->flags & X86_EFLAGS_IF) local_irq_disable(); preempt_count_dec(); }
0
[ "CWE-17" ]
linux-2.6
6f442be2fb22be02cafa606f1769fa1e6f894441
118,075,788,974,846,140,000,000,000,000,000,000,000
6
x86_64, traps: Stop using IST for #SS On a 32-bit kernel, this has no effect, since there are no IST stacks. On a 64-bit kernel, #SS can only happen in user code, on a failed iret to user space, a canonical violation on access via RSP or RBP, or a genuine stack segment violation in 32-bit kernel code. The first two ...
static void on_stream_state_event(void *ctx, h2_stream *stream, h2_stream_event_t ev) { h2_session *session = ctx; switch (ev) { case H2_SEV_CANCELLED: if (session->state != H2_SESSION_ST_DONE) { nghttp2_submit_rst_stream(session->ngh2, NGHT...
0
[]
mod_h2
5e75e5685dd043fe93a5a08a15edd087a43f6968
308,315,974,891,874,400,000,000,000,000,000,000,000
16
v1.11.0 -------------------------------------------------------------------------------- * connection IO event handling reworked. Instead of reacting on incoming bytes, the state machine now acts on incoming frames that are affecting it. This reduces state transitions. * pytest suite now covers some basic tests...
onig_number_of_names(const regex_t* reg) { NameTable* t = (NameTable* )reg->name_table; if (IS_NOT_NULL(t)) return t->num; else return 0; }
0
[ "CWE-476" ]
Onigmo
00cc7e28a3ed54b3b512ef3b58ea737a57acf1f9
254,570,401,112,137,370,000,000,000,000,000,000,000
9
Fix SEGV in onig_error_code_to_str() (Fix #132) When onig_new(ONIG_SYNTAX_PERL) fails with ONIGERR_INVALID_GROUP_NAME, onig_error_code_to_str() crashes. onig_scan_env_set_error_string() should have been used when returning ONIGERR_INVALID_GROUP_NAME.
void Http2Stream::Respond(const FunctionCallbackInfo<Value>& args) { Environment* env = Environment::GetCurrent(args); Local<Context> context = env->context(); Isolate* isolate = env->isolate(); Http2Stream* stream; ASSIGN_OR_RETURN_UNWRAP(&stream, args.Holder()); Local<Array> headers = args[0].As<Array>()...
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
277,466,623,219,877,800,000,000,000,000,000,000,000
16
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
const uint8_t* ZRtp::getSignatureData() { return signatureData; }
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
177,284,818,265,922,130,000,000,000,000,000,000,000
3
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
gplotSimpleXY1(NUMA *nax, NUMA *nay, l_int32 plotstyle, l_int32 outformat, const char *outroot, const char *title) { GPLOT *gplot; PROCNAME("gplotSimpleXY1"); if (!nay) return ERROR_INT("nay not defin...
0
[ "CWE-119", "CWE-787" ]
leptonica
ee301cb2029db8a6289c5295daa42bba7715e99a
55,889,260,931,117,470,000,000,000,000,000,000,000
28
Security fixes: expect final changes for release 1.75.3. * Fixed a debian security issue with fscanf() reading a string with possible buffer overflow. * There were also a few similar situations with sscanf().
static void FVEncodingMenuBuild(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) { FontView *fv = (FontView *) GDrawGetUserData(gw); if ( mi->sub!=NULL ) { GMenuItemArrayFree(mi->sub); mi->sub = NULL; } mi->sub = GetEncodingMenu(FVMenuReencode,fv->b.map->enc); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
258,120,589,035,824,420,000,000,000,000,000,000,000
9
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
new(PyTypeObject UNUSED *type, PyObject UNUSED *args, PyObject UNUSED *kwds) { PyObject *ans = (PyObject*)grman_alloc(); if (ans == NULL) PyErr_NoMemory(); return ans; }
0
[ "CWE-787" ]
kitty
82c137878c2b99100a3cdc1c0f0efea069313901
178,874,438,618,714,740,000,000,000,000,000,000,000
5
Graphics protocol: Dont return filename in the error message when opening file fails, since filenames can contain control characters Fixes #3128
int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt, const char *name, unsigned int flags, struct path *path) { struct filename *filename = getname_kernel(name); int err = PTR_ERR(filename); BUG_ON(flags & LOOKUP_PARENT); /* the first argument of filename_lookup() is ignored with LOOKUP_RO...
0
[ "CWE-416" ]
linux
f15133df088ecadd141ea1907f2c96df67c729f0
222,755,529,718,694,100,000,000,000,000,000,000,000
22
path_openat(): fix double fput() path_openat() jumps to the wrong place after do_tmpfile() - it has already done path_cleanup() (as part of path_lookupat() called by do_tmpfile()), so doing that again can lead to double fput(). Cc: stable@vger.kernel.org # v3.11+ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
PHP_ME_MAPPING(flush, xmlwriter_flush, arginfo_xmlwriter_method_flush, 0) {NULL, NULL, NULL}
0
[ "CWE-20" ]
php-src
52b93f0cfd3cba7ff98cc5198df6ca4f23865f80
315,932,845,519,497,450,000,000,000,000,000,000,000
2
Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
static sqlite3_stmt *rtreeCheckPrepare( RtreeCheck *pCheck, /* RtreeCheck object */ const char *zFmt, ... /* Format string and trailing args */ ){ va_list ap; char *z; sqlite3_stmt *pRet = 0; va_start(ap, zFmt); z = sqlite3_vmprintf(zFmt, ap); if( pCheck->rc==SQLITE_OK ){ if(...
0
[ "CWE-125" ]
sqlite
e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8
318,843,926,332,420,800,000,000,000,000,000,000,000
23
Enhance the rtreenode() function of rtree (used for testing) so that it uses the newer sqlite3_str object for better performance and improved error reporting. FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377
static Handle<Value> Execute(const Arguments& args) { HandleScope scope; Parser* parser = ObjectWrap::Unwrap<Parser>(args.This()); assert(!current_buffer); assert(!current_buffer_data); if (current_buffer) { return ThrowException(Exception::TypeError( String::New("Already pars...
0
[]
node
7b3fb22290c3b6acb497ca85cf2f1648d75c8154
207,778,413,026,481,900,000,000,000,000,000,000,000
70
typo in node_http_parser
static int ssl_scan_serverhello_tlsext(SSL *s, PACKET *pkt, int *al) { unsigned int length, type, size; int tlsext_servername = 0; int renegotiate_seen = 0; #ifndef OPENSSL_NO_NEXTPROTONEG s->s3->next_proto_neg_seen = 0; #endif s->tlsext_ticket_expected = 0; OPENSSL_free(s->s3->alpn_selected);...
0
[ "CWE-20" ]
openssl
4ad93618d26a3ea23d36ad5498ff4f59eff3a4d2
338,822,844,836,560,400,000,000,000,000,000,000,000
304
Don't change the state of the ETM flags until CCS processing Changing the ciphersuite during a renegotiation can result in a crash leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS so this is TLS only. The problem is caused by changing the flag indicating whether to use ETM or not immediately on...
xmlSchemaCheckCTComponent(xmlSchemaParserCtxtPtr ctxt, xmlSchemaTypePtr type) { int ret; /* * Complex Type Definition Properties Correct */ ret = xmlSchemaCheckCTPropsCorrect(ctxt, type); if (ret != 0) return (ret); if (WXS_IS_EXTENSION(type)) ret = xmlSchemaCheckCOSCTExtends(ctxt, ty...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
38,493,454,690,558,140,000,000,000,000,000,000,000
16
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.
TEST(QueryProjectionTest, IdSubfieldExclusionProjectionDoesNotPreserveId) { auto proj = createProjection("{}", "{'_id.a': 0}"); ASSERT_TRUE(proj.isFieldRetainedExactly("b")); ASSERT_FALSE(proj.isFieldRetainedExactly("_id")); ASSERT_FALSE(proj.isFieldRetainedExactly("_id.a")); }
0
[ "CWE-732" ]
mongo
cd583b6c4d8aa2364f255992708b9bb54e110cf4
307,132,802,461,001,930,000,000,000,000,000,000,000
6
SERVER-53929 Add stricter parser checks around positional projection
static int http_shutdown(URLContext *h, int flags) { int ret = 0; char footer[] = "0\r\n\r\n"; HTTPContext *s = h->priv_data; /* signal end of chunked encoding if used */ if (((flags & AVIO_FLAG_WRITE) && s->chunked_post) || ((flags & AVIO_FLAG_READ) && s->chunked_post && s->listen)) { ...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
2a05c8f813de6f2278827734bf8102291e7484aa
166,520,069,637,405,350,000,000,000,000,000,000,000
16
http: make length/offset-related variables unsigned. Fixes #5992, reported and found by Paul Cher <paulcher@icloud.com>.
int32_t cli_bcapi_seek(struct cli_bc_ctx* ctx, int32_t pos, uint32_t whence) { off_t off; if (!ctx->fmap) { cli_dbgmsg("bcapi_seek: no fmap\n"); API_MISUSE(); return -1; } switch (whence) { case 0: off = pos; break; case 1: off = ctx->off + pos; break; case 2: off = ctx->f...
0
[ "CWE-189" ]
clamav-devel
3d664817f6ef833a17414a4ecea42004c35cc42f
9,377,781,207,773,382,000,000,000,000,000,000,000
32
fix recursion level crash (bb #3706). Thanks to Stephane Chazelas for the analysis.
struct sk_buff *__pskb_copy_fclone(struct sk_buff *skb, int headroom, gfp_t gfp_mask, bool fclone) { unsigned int size = skb_headlen(skb) + headroom; int flags = skb_alloc_rx_flag(skb) | (fclone ? SKB_ALLOC_FCLONE : 0); struct sk_buff *n = __alloc_skb(size, gfp_mask, flags, NUMA_NO_NODE); if (!n) goto ou...
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
136,789,219,929,347,780,000,000,000,000,000,000,000
46
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...
add_dconf_key_to_keyfile (GKeyFile *keyfile, DConfClient *client, const char *key, DConfReadFlags flags) { g_autofree char *group = g_path_get_dirname (key); g_autofree char *k = g_path_get_basename (key); GVariant *value = dc...
0
[ "CWE-20" ]
flatpak
a9107feeb4b8275b78965b36bf21b92d5724699e
297,016,791,195,870,600,000,000,000,000,000,000,000
15
run: Only compare the lowest 32 ioctl arg bits for TIOCSTI Closes #2782. Closes: #2783 Approved by: alexlarsson
size_t mobi_get_attribute_value(char *value, const unsigned char *data, const size_t size, const char *attribute, bool only_quoted) { /* FIXME: this function could be replaced by mobi_find_attrvalue()? */ if (!data) { debug_print("Data is null%s", "\n"); return SIZE_MAX; } size_t length ...
0
[ "CWE-703", "CWE-125" ]
libmobi
fb1ab50e448ddbed746fd27ae07469bc506d838b
32,080,651,371,220,075,000,000,000,000,000,000,000
74
Fix array boundary check when parsing inflections which could result in buffer over-read with corrupt input
uchar * get_attr_key(LEX_STRING *part, size_t *length, my_bool not_used __attribute__((unused))) { *length= part[0].length; return (uchar *) part[0].str;
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
240,193,310,898,399,100,000,000,000,000,000,000,000
6
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...
enum Item_result Item_func_get_system_var::result_type() const { switch (var->show_type()) { case SHOW_BOOL: case SHOW_MY_BOOL: case SHOW_SINT: case SHOW_SLONG: case SHOW_SLONGLONG: case SHOW_UINT: case SHOW_ULONG: case SHOW_ULONGLONG: case SHOW_HA_ROWS: return INT_RESULT; ...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
112,161,134,531,379,320,000,000,000,000,000,000,000
25
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
flatpak_run_add_environment_args (GPtrArray *argv_array, GArray *fd_array, char ***envp_p, GPtrArray *session_bus_proxy_argv, GPtrArray *system_bus_proxy...
0
[ "CWE-20" ]
flatpak
902fb713990a8f968ea4350c7c2a27ff46f1a6c4
187,647,296,894,370,600,000,000,000,000,000,000,000
344
Use seccomp to filter out TIOCSTI ioctl This would otherwise let the sandbox add input to the controlling tty.
static void rbd_osd_setup_data(struct ceph_osd_request *osd_req, int which) { struct rbd_obj_request *obj_req = osd_req->r_priv; switch (obj_req->img_request->data_type) { case OBJ_REQUEST_BIO: osd_req_op_extent_osd_data_bio(osd_req, which, &obj_req->bio_pos, obj_req->ex.oe_len); break; ...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
328,977,985,106,139,340,000,000,000,000,000,000,000
22
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
GF_Err mvex_dump(GF_Box *a, FILE * trace) { GF_MovieExtendsBox *p; p = (GF_MovieExtendsBox *)a; gf_isom_box_dump_start(a, "MovieExtendsBox", trace); fprintf(trace, ">\n"); if (p->mehd) gf_isom_box_dump(p->mehd, trace); gf_isom_box_array_dump(p->TrackExList, trace); gf_isom_box_array_dump(p->TrackExPropList, trac...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
297,541,606,456,750,060,000,000,000,000,000,000,000
12
fixed 2 possible heap overflows (inc. #1088)
rb_str_chomp_bang(int argc, VALUE *argv, VALUE str) { rb_encoding *enc; VALUE rs; int newline; char *p, *pp, *e; long len, rslen; str_modify_keep_cr(str); len = RSTRING_LEN(str); if (len == 0) return Qnil; p = RSTRING_PTR(str); e = p + len; if (argc == 0) { rs = rb_rs; if ...
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
284,403,221,863,364,100,000,000,000,000,000,000,000
98
* string.c (rb_str_justify): CVE-2009-4124. Fixes a bug reported by Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London; Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static int clean_item_instance(Item *i, const char* instance) { _cleanup_closedir_ DIR *d = NULL; struct stat s, ps; bool mountpoint; usec_t cutoff, n; char timestamp[FORMAT_TIMESTAMP_MAX]; assert(i); if (!i->age_set) return 0; n = now(C...
0
[ "CWE-59" ]
systemd
5579f85663d10269e7ac7464be6548c99cea4ada
224,130,224,136,948,640,000,000,000,000,000,000,000
49
tmpfiles: refuse to chown()/chmod() files which are hardlinked, unless protected_hardlinks sysctl is on Let's add some extra safety. Fixes: #7736
static int on_message_complete(http_parser *parser) { parser_context *ctx = (parser_context *) parser->data; http_subtransport *t = ctx->t; t->parse_finished = 1; return 0; }
0
[ "CWE-284" ]
libgit2
b5c6a1b407b7f8b952bded2789593b68b1876211
215,356,246,560,657,050,000,000,000,000,000,000,000
9
http: check certificate validity before clobbering the error variable
Elf32_Shdr const *PackLinuxElf32::elf_find_section_name( char const *const name ) const { Elf32_Shdr const *shdr = shdri; if (!shdr) { return 0; } int j = e_shnum; for (; 0 <=--j; ++shdr) { if (0==strcmp(name, &shstrtab[get_te32(&shdr->sh_name)])) { return shdr; ...
0
[ "CWE-415" ]
upx
d9288213ec156dffc435566b9d393d23e87c6914
163,266,457,074,784,620,000,000,000,000,000,000,000
16
More checking of PT_DYNAMIC and its contents. https://github.com/upx/upx/issues/206 modified: p_lx_elf.cpp
int compare_files(const char* filename1, const char* filename2) { File fd; int error; if ((fd= my_open(filename1, O_RDONLY, MYF(0))) < 0) die("Failed to open first file: '%s'", filename1); error= compare_files2(fd, filename2); my_close(fd, MYF(0)); return error; }
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
94,677,719,341,016,810,000,000,000,000,000,000,000
14
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...
_outWindowClause(StringInfo str, const WindowClause *node) { WRITE_NODE_TYPE("WINDOWCLAUSE"); WRITE_STRING_FIELD(name); WRITE_STRING_FIELD(refname); WRITE_NODE_FIELD(partitionClause); WRITE_NODE_FIELD(orderClause); WRITE_INT_FIELD(frameOptions); WRITE_NODE_FIELD(startOffset); WRITE_NODE_FIELD(endOffset); WRIT...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
301,334,894,213,314,950,000,000,000,000,000,000,000
14
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
RoleNameIterator RoleGraph::getDirectMembers(const RoleName& role) { if (!roleExists(role)) return RoleNameIterator(nullptr); return makeRoleNameIteratorForContainer(_roleToMembers[role]); }
0
[ "CWE-863" ]
mongo
521e56b407ac72bc69a97a24d1253f51a5b6e81b
143,228,559,865,017,050,000,000,000,000,000,000,000
5
SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON
generic_arguments_respect_constraints (VerifyContext *ctx, MonoGenericContainer *gc, MonoGenericContext *context, MonoGenericInst *ginst) { int i; for (i = 0; i < ginst->type_argc; ++i) { MonoType *type = ginst->type_argv [i]; MonoGenericParam *target = mono_generic_container_get_param (gc, i); MonoGenericParam...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
33,381,224,881,300,780,000,000,000,000,000,000,000
23
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
TRIO_PRIVATE void TrioInStreamFile TRIO_ARGS2((self, intPointer), trio_class_t* self, int* intPointer) { FILE* file = (FILE*)self->location; assert(VALID(self)); assert(VALID(file)); self->actually.cached = 0; /* The initial value of self->current is zero */ if (se...
0
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
468,694,951,109,921,900,000,000,000,000,000,000
29
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.
ast_for_async_funcdef(struct compiling *c, const node *n, asdl_seq *decorator_seq) { /* async_funcdef: 'async' funcdef */ REQ(n, async_funcdef); REQ(CHILD(n, 0), NAME); assert(strcmp(STR(CHILD(n, 0)), "async") == 0); REQ(CHILD(n, 1), funcdef); return ast_for_funcdef_impl(c, n, decorator_seq, ...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
24,411,659,771,207,720,000,000,000,000,000,000,000
11
bpo-35766: Merge typed_ast back into CPython (GH-11645)
finish_idle (GdmDisplay *self) { GdmDisplayPrivate *priv; priv = gdm_display_get_instance_private (self); priv->finish_idle_id = 0; /* finish may end up finalizing object */ gdm_display_finish (self); return FALSE; }
0
[ "CWE-754" ]
gdm
4e6e5335d29c039bed820c43bfd1c19cb62539ff
149,695,178,691,650,800,000,000,000,000,000,000,000
10
display: Use autoptr to handle errors in look for existing users It will make things just cleaner
do_delete (GVfsBackend *backend, GVfsJobDelete *job, const char *filename) { SoupMessage *msg; SoupURI *uri; GFileType file_type; gboolean res; guint num_children; guint status; GError *error; error = NULL; uri = g_vfs_backend_dav_uri_for_path...
0
[]
gvfs
f81ff2108ab3b6e370f20dcadd8708d23f499184
170,786,000,081,011,770,000,000,000,000,000,000,000
44
dav: don't unescape the uri twice path_equal tries to unescape path before comparing. Unfortunately this function is used also for already unescaped paths. Therefore unescaping can fail. This commit reverts changes which was done in commit 50af53d and unescape just uris, which aren't unescaped yet. https://bugzilla.g...
ldns_rdf2buffer_str_apl(ldns_buffer *output, const ldns_rdf *rdf) { uint8_t *data = ldns_rdf_data(rdf); uint16_t address_family; uint8_t prefix; bool negation; uint8_t adf_length; size_t i; size_t pos = 0; while (pos < (unsigned int) ldns_rdf_size(rdf)) { if(pos + 3 >= (unsigned)ldns_rdf_size(r...
0
[ "CWE-415" ]
ldns
070b4595981f48a21cc6b4f5047fdc2d09d3da91
189,889,855,934,881,100,000,000,000,000,000,000,000
75
CAA and URI
#endif } // Open a file (with wide character support on Windows). inline std::FILE *win_fopen(const char *const path, const char *const mode) { #if cimg_OS==2 // Convert 'path' to a wide-character string. int err = MultiByteToWideChar(CP_UTF8,0,path,-1,0,0); if (!err) return std_fopen(path,mode); ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
122,146,094,200,767,170,000,000,000,000,000,000,000
20
Fix other issues in 'CImg<T>::load_bmp()'.
} static JSValue js_sys_dir_exists(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) { return js_sys_file_opt(ctx, this_val, argc, argv, OPT_DIREXISTS);
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
124,525,490,307,712,370,000,000,000,000,000,000,000
4
fixed #2138
PHP_FUNCTION(sqlite_key) { zval *zres; struct php_sqlite_result *res; zval *object = getThis(); if (object) { if (zend_parse_parameters_none() == FAILURE) { return; } RES_FROM_OBJECT(res, object); } else { if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zres)) { return; } Z...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
219,636,027,436,323,380,000,000,000,000,000,000,000
20
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static ut64 bbBegin(RAnalFunction *fcn, ut64 addr) { RListIter *iter; RAnalBlock *bb; r_list_foreach (fcn->bbs, iter, bb) { if (R_BETWEEN (bb->addr, addr, bb->addr + bb->size - 1)) { return bb->addr; } } return UT64_MAX; }
0
[ "CWE-415", "CWE-703" ]
radare2
cb8b683758edddae2d2f62e8e63a738c39f92683
278,693,676,005,512,670,000,000,000,000,000,000,000
10
Fix #16303 - c->table_query double free (#16318)
int rom_copy(uint8_t *dest, hwaddr addr, size_t size) { hwaddr end = addr + size; uint8_t *s, *d = dest; size_t l = 0; Rom *rom; QTAILQ_FOREACH(rom, &roms, next) { if (rom->fw_file) { continue; } if (rom->mr) { continue; } if (rom->add...
1
[ "CWE-787" ]
qemu
e423455c4f23a1a828901c78fe6d03b7dde79319
3,950,169,506,491,128,300,000,000,000,000,000,000
56
hw/core/loader: Fix possible crash in rom_copy() Both, "rom->addr" and "addr" are derived from the binary image that can be loaded with the "-kernel" paramer. The code in rom_copy() then calculates: d = dest + (rom->addr - addr); and uses "d" as destination in a memcpy() some lines later. Now with bad kernel ima...
ZEND_VM_HANDLER(84, ZEND_FETCH_DIM_W, VAR|CV, CONST|TMPVAR|UNUSED|NEXT|CV) { USE_OPLINE zend_free_op free_op1, free_op2; zval *container; SAVE_OPLINE(); container = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W); zend_fetch_dimension_address_W(container, GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R), OP2_TYPE OPLINE_CC EXECUTE_DATA_CC...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
328,619,948,389,993,830,000,000,000,000,000,000,000
16
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.
static int cardos_acl_to_bytes(sc_card_t *card, const sc_file_t *file, u8 *buf, size_t *outlen) { int i, byte; const int *idx; if (buf == NULL || *outlen < 9) return SC_ERROR_INVALID_ARGUMENTS; idx = (file->type == SC_FILE_TYPE_DF) ? df_acl : ef_acl; for (i = 0; i < 9; i++) { if (idx[i] < 0) byte ...
0
[]
OpenSC
1252aca9f10771ef5ba8405e73cf2da50827958f
116,603,371,760,897,070,000,000,000,000,000,000,000
25
cardos: Correctly calculate the left bytes to avoid buffer overrun Thanks oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29912
vlog_message(const int facility, const char* format, va_list args) { #if !HAVE_VSYSLOG char buf[MAX_LOG_MSG+1]; vsnprintf(buf, sizeof(buf), format, args); #endif /* Don't write syslog if testing configuration */ if (__test_bit(CONFIG_TEST_BIT, &debug)) return; if (log_file || (__test_bit(DONT_FORK_BIT, &debug...
1
[ "CWE-200" ]
keepalived
26c8d6374db33bcfcdcd758b1282f12ceef4b94f
174,723,498,833,231,770,000,000,000,000,000,000,000
45
Disable fopen_safe() append mode by default If a non privileged user creates /tmp/keepalived.log and has it open for read (e.g. tail -f), then even though keepalived will change the owner to root and remove all read/write permissions from non owners, the application which already has the file open will be able to read...
void * headerExport(Header h, unsigned int *bsize) { void *blob = NULL; if (h) { blob = doExport(h->index, h->indexUsed, h->flags, bsize); } return blob; }
0
[ "CWE-125" ]
rpm
8f4b3c3cab8922a2022b9e47c71f1ecf906077ef
39,746,379,978,805,904,000,000,000,000,000,000,000
10
hdrblobInit() needs bounds checks too Users can pass untrusted data to hdrblobInit() and it must be robust against this.
void ndisc_send_rs(struct net_device *dev, const struct in6_addr *saddr, const struct in6_addr *daddr) { struct sk_buff *skb; struct rs_msg *msg; int send_sllao = dev->addr_len; int optlen = 0; #ifdef CONFIG_IPV6_OPTIMISTIC_DAD /* * According to section 2.2 of RFC 4429, we must not * send router solicita...
0
[ "CWE-17" ]
linux
6fd99094de2b83d1d4c8457f2c83483b2828e75a
42,954,093,856,010,440,000,000,000,000,000,000,000
50
ipv6: Don't reduce hop limit for an interface A local route may have a lower hop_limit set than global routes do. RFC 3756, Section 4.2.7, "Parameter Spoofing" > 1. The attacker includes a Current Hop Limit of one or another small > number which the attacker knows will cause legitimate packets to > be...
static void ieee80211_set_beacon_cntdwn(struct ieee80211_sub_if_data *sdata, struct beacon_data *beacon) { struct probe_resp *resp; u8 *beacon_data; size_t beacon_data_len; int i; u8 count = beacon->cntdwn_current_counter; switch (sdata->vif.type) { case NL80211_IFTYPE_AP: beacon_data = beacon->tail; b...
0
[ "CWE-476" ]
linux
bddc0c411a45d3718ac535a070f349be8eca8d48
318,378,610,472,403,970,000,000,000,000,000,000,000
45
mac80211: Fix NULL ptr deref for injected rate info The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx queue") moved the code to validate the radiotap header from ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is possible to share more code with the new Tx queue selecti...
static void network_send_buffer_plain(sockent_t *se, /* {{{ */ const char *buffer, size_t buffer_size) { int status; while (42) { status = sockent_client_connect(se); if (status != 0) return; status = sendto(se->data.client.fd, buffer, buffer_size, ...
0
[ "CWE-835" ]
collectd
f6be4f9b49b949b379326c3d7002476e6ce4f211
276,837,702,989,440,900,000,000,000,000,000,000,000
27
network plugin: Fix endless loop DOS in parse_packet() When correct 'Signature part' is received by Collectd, configured without AuthFile option, condition for endless loop occurs due to missing increase of pointer to next unprocessed part. This is a forward-port of #2233. Fixes: CVE-2017-7401 Closes: #2174 Signed-o...
rad_put_addr(struct rad_handle *h, int type, struct in_addr addr) { return rad_put_attr(h, type, &addr.s_addr, sizeof addr.s_addr); }
0
[ "CWE-119", "CWE-787" ]
php-radius
13c149b051f82b709e8d7cc32111e84b49d57234
22,722,515,440,260,180,000,000,000,000,000,000,000
4
Fix a security issue in radius_get_vendor_attr(). The underlying rad_get_vendor_attr() function assumed that it would always be given valid VSA data. Indeed, the buffer length wasn't even passed in; the assumption was that the length field within the VSA structure would be valid. This could result in denial of servic...
static int fscrypt_d_revalidate(struct dentry *dentry, unsigned int flags) { struct dentry *dir; struct fscrypt_info *ci; int dir_has_key, cached_with_key; if (flags & LOOKUP_RCU) return -ECHILD; dir = dget_parent(dentry); if (!d_inode(dir)->i_sb->s_cop->is_encrypted(d_inode(dir))) { dput(dir); return 0; ...
1
[ "CWE-416", "CWE-476" ]
linux
1b53cf9815bb4744958d41f3795d5d5a1d365e2d
109,881,678,488,698,250,000,000,000,000,000,000,000
45
fscrypt: remove broken support for detecting keyring key revocation Filesystem encryption ostensibly supported revoking a keyring key that had been used to "unlock" encrypted files, causing those files to become "locked" again. This was, however, buggy for several reasons, the most severe of which was that when key r...
rsvg_node_light_source_set_atts (RsvgNode *node, gpointer impl, RsvgHandle *handle, RsvgPropertyBag *atts) { RsvgNodeLightSource *data = impl; const char *value; if ((value = rsvg_property_bag_lookup (atts, "azimuth"))) data->azimuth = g_ascii_strtod (value, NULL) / 180.0 * M_PI; if ((value = r...
0
[ "CWE-369" ]
librsvg
ecf9267a24b2c3c0cd211dbdfa9ef2232511972a
236,868,965,176,688,640,000,000,000,000,000,000,000
26
bgo#783835 - Don't divide by zero in box_blur_line() for gaussian blurs We were making the decision to use box blurs, instead of a true Gaussian kernel, based on the size of *both* x and y dimensions. Do them individually instead.
xmlSchemaCheckCVCWildcardNamespace(xmlSchemaWildcardPtr wild, const xmlChar* ns) { if (wild == NULL) return(-1); if (wild->any) return(0); else if (wild->nsSet != NULL) { xmlSchemaWildcardNsPtr cur; cur = wild->nsSet; while (cur != NULL) { if (xmlStrEqual(cur->value, ns)) return(0); ...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
218,907,930,602,287,840,000,000,000,000,000,000,000
23
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.
static int load_dh_params(SSL_CTX *ctx, char *file) { DH *dh = NULL; BIO *bio; if (!ctx || !file) return 0; if ((bio = BIO_new_file(file, "r")) == NULL) { radlog(L_ERR, "rlm_eap_tls: Unable to open DH file - %s", file); return -1; } dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); BIO_free(bio); if (!d...
0
[ "CWE-295" ]
freeradius-server
5e698b407dcac2bc45cf03484bac4398109d25c3
282,015,268,373,809,480,000,000,000,000,000,000,000
29
Set X509_V_FLAG_CRL_CHECK_ALL
xmlXPathFormatNumber(double number, char buffer[], int buffersize) { switch (xmlXPathIsInf(number)) { case 1: if (buffersize > (int)sizeof("Infinity")) snprintf(buffer, buffersize, "Infinity"); break; case -1: if (buffersize > (int)sizeof("-Infinity")) snprintf(buffer, buffersize, "-Infinity");...
0
[ "CWE-416" ]
libxml2
0f3b843b3534784ef57a4f9b874238aa1fda5a73
40,245,482,977,919,125,000,000,000,000,000,000,000
115
Fix XPath stack frame logic Move the calls to xmlXPathSetFrame and xmlXPathPopFrame around in xmlXPathCompOpEvalPositionalPredicate to make sure that the context object on the stack is actually protected. Otherwise, memory corruption can occur when calling sloppily coded XPath extension functions. Fixes bug 783160.
*iwl_trans_pcie_dump_data(struct iwl_trans *trans, u32 dump_mask) { struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); struct iwl_fw_error_dump_data *data; struct iwl_txq *cmdq = trans_pcie->txq[trans_pcie->cmd_queue]; struct iwl_fw_error_dump_txcmd *txcmd; struct iwl_trans_dump_data *dump_d...
0
[ "CWE-476" ]
linux
8188a18ee2e48c9a7461139838048363bfce3fef
236,867,445,560,869,300,000,000,000,000,000,000,000
145
iwlwifi: pcie: fix rb_allocator workqueue allocation We don't handle failures in the rb_allocator workqueue allocation correctly. To fix that, move the code earlier so the cleanup is easier and we don't have to undo all the interrupt allocations in this case. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Sig...
static void kvm_load_guest_fpu(struct kvm_vcpu *vcpu) { /* Exclude PKRU, it's restored separately immediately after VM-Exit. */ fpu_swap_kvm_fpstate(&vcpu->arch.guest_fpu, true); trace_kvm_fpu(1); }
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
161,517,479,284,855,220,000,000,000,000,000,000,000
6
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
static long kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg) { switch (arg) { case KVM_CAP_USER_MEMORY: case KVM_CAP_DESTROY_MEMORY_REGION_WORKS: case KVM_CAP_JOIN_MEMORY_REGIONS_WORKS: case KVM_CAP_INTERNAL_ERROR_DATA: #ifdef CONFIG_HAVE_KVM_MSI case KVM_CAP_SIGNAL_MSI: #endif #ifdef CONFIG_HAVE_K...
0
[ "CWE-119" ]
linux
f8be156be163a052a067306417cd0ff679068c97
58,741,517,141,527,970,000,000,000,000,000,000,000
50
KVM: do not allow mapping valid but non-reference-counted pages It's possible to create a region which maps valid but non-refcounted pages (e.g., tail pages of non-compound higher order allocations). These host pages can then be returned by gfn_to_page, gfn_to_pfn, etc., family of APIs, which take a reference to the p...