func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
TEST_F(QueryPlannerTest, MutationsFromFetchWithSort) { params.options = QueryPlannerParams::KEEP_MUTATIONS; addIndex(BSON("a" << 1)); runQuerySortProj(fromjson("{a: 5}"), fromjson("{b:1}"), BSONObj()); assertSolutionExists( "{sort: {pattern: {b:1}, limit: 0, node: {sortKeyGen: {node: " "...
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
130,562,391,370,393,400,000,000,000,000,000,000,000
8
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
TEST(EqOp, MatchesScalar) { BSONObj operand = BSON("a" << 5); EqualityMatchExpression eq("a", operand["a"]); ASSERT(eq.matchesBSON(BSON("a" << 5.0), NULL)); ASSERT(!eq.matchesBSON(BSON("a" << 4), NULL)); }
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
301,621,230,419,444,340,000,000,000,000,000,000,000
6
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
PyMemoTable_Copy(PyMemoTable *self) { PyMemoTable *new = PyMemoTable_New(); if (new == NULL) return NULL; new->mt_used = self->mt_used; new->mt_allocated = self->mt_allocated; new->mt_mask = self->mt_mask; /* The table we get from _New() is probably smaller than we wanted. Free i...
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
221,218,501,761,370,860,000,000,000,000,000,000,000
26
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
int TC_LOG_MMAP::open(const char *opt_name) { uint i; bool crashed=FALSE; PAGE *pg; DBUG_ASSERT(total_ha_2pc > 1); DBUG_ASSERT(opt_name && opt_name[0]); tc_log_page_size= my_getpagesize(); DBUG_ASSERT(TC_LOG_PAGE_SIZE % tc_log_page_size == 0); fn_format(logname,opt_name,mysql_data_home,"",MY_UNPACK_F...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
94,859,703,439,645,320,000,000,000,000,000,000,000
101
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
Binary::it_imported_symbols Binary::imported_symbols() { return {symbols_, [] (const std::unique_ptr<Symbol>& symbol) { return is_imported(*symbol); }}; }
0
[ "CWE-703" ]
LIEF
7acf0bc4224081d4f425fcc8b2e361b95291d878
200,728,508,047,911,000,000,000,000,000,000,000,000
5
Resolve #764
int bus_append_unit_property_assignment(sd_bus_message *m, UnitType t, const char *assignment) { const char *eq, *field; int r; assert(m); assert(assignment); eq = strchr(assignment, '='); if (!eq) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), ...
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
287,157,707,293,098,320,000,000,000,000,000,000,000
128
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
static void __sched_fork(struct task_struct *p) { p->se.exec_start = 0; p->se.sum_exec_runtime = 0; p->se.prev_sum_exec_runtime = 0; p->se.last_wakeup = 0; p->se.avg_overlap = 0; #ifdef CONFIG_SCHEDSTATS p->se.wait_start = 0; p->se.sum_sleep_runtime = 0; p->se.sleep_start = 0; p->se.block_start = 0; ...
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
261,408,464,030,316,200,000,000,000,000,000,000,000
36
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 ...
int hidp_connection_add(struct hidp_connadd_req *req, struct socket *ctrl_sock, struct socket *intr_sock) { u32 valid_flags = BIT(HIDP_VIRTUAL_CABLE_UNPLUG) | BIT(HIDP_BOOT_PROTOCOL_MODE); struct hidp_session *session; struct l2cap_conn *conn; struct l2cap_chan *chan; int ret; ret = hidp_verify_socket...
0
[ "CWE-787" ]
linux
7992c18810e568b95c869b227137a2215702a805
28,886,428,678,255,113,000,000,000,000,000,000,000
45
Bluetooth: hidp: buffer overflow in hidp_process_report CVE-2018-9363 The buffer length is unsigned at all layers, but gets cast to int and checked in hidp_process_report and can lead to a buffer overflow. Switch len parameter to unsigned int to resolve issue. This affects 3.18 and newer kernels. Signed-off-by: Mar...
void fastcall fd_install(unsigned int fd, struct file * file) { struct files_struct *files = current->files; struct fdtable *fdt; spin_lock(&files->file_lock); fdt = files_fdtable(files); BUG_ON(fdt->fd[fd] != NULL); rcu_assign_pointer(fdt->fd[fd], file); spin_unlock(&files->file_lock); }
0
[ "CWE-264" ]
linux-2.6
7b82dc0e64e93f430182f36b46b79fcee87d3532
97,054,828,135,007,650,000,000,000,000,000,000,000
10
Remove suid/sgid bits on [f]truncate() .. to match what we do on write(). This way, people who write to files by using [f]truncate + writable mmap have the same semantics as if they were using the write() family of system calls. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
static int mov_read_dac3(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; enum AVAudioServiceType *ast; int ac3info, acmod, lfeon, bsmod; uint64_t mask; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams-1]; ast = (enum AVAudioServiceType*)av_st...
0
[ "CWE-703" ]
FFmpeg
c953baa084607dd1d84c3bfcce3cf6a87c3e6e05
214,663,084,870,836,940,000,000,000,000,000,000,000
33
avformat/mov: Check count sums in build_open_gop_key_points() Fixes: ffmpeg.md Fixes: Out of array access Fixes: CVE-2022-2566 Found-by: Andy Nguyen <theflow@google.com> Found-by: 3pvd <3pvd@google.com> Reviewed-by: Andy Nguyen <theflow@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
PJ_DEF(pj_xml_attr*) pj_xml_find_attr( const pj_xml_node *node, const pj_str_t *name, const pj_str_t *value) { const pj_xml_attr *attr = node->attr_head.next; while (attr != (void*)&node->attr_head) { if (pj_stricmp(&attr->name, name)==0) { if (value) { if (pj_stricmp(&attr->value...
0
[ "CWE-703", "CWE-835" ]
pjproject
856f87c2e97a27b256482dbe0d748b1194355a21
74,710,935,900,247,200,000,000,000,000,000,000,000
18
Merge pull request from GHSA-5x45-qp78-g4p4 * Prevent infinite loop in scanning xml content * Simplify scanning method * Optimization
explicit NodeInfo(int i) : gdef_index(i), node(nullptr) {}
0
[ "CWE-125", "CWE-369", "CWE-908" ]
tensorflow
0cc38aaa4064fd9e79101994ce9872c6d91f816b
17,860,783,212,935,164,000,000,000,000,000,000,000
1
Prevent unitialized memory access in `GraphConstructor::MakeEdge` The `MakeEdge` implementation assumes that there exists an output at `output_index` of `src` node and an input at `input_index` of `dst` node. However, if this is not the case this results in accessing data out of bounds. Because we are accessing an arr...
static BOOL update_begin_paint(rdpContext* context) { wStream* s; rdpUpdate* update = context->update; if (update->us) update->EndPaint(context); s = fastpath_update_pdu_init_new(context->rdp->fastpath); if (!s) return FALSE; Stream_SealLength(s); Stream_Seek(s, 2); /* numberOrders (2 bytes) */ update->...
0
[ "CWE-119", "CWE-787" ]
FreeRDP
445a5a42c500ceb80f8fa7f2c11f3682538033f3
271,502,132,638,872,700,000,000,000,000,000,000,000
20
Fixed CVE-2018-8786 Thanks to Eyal Itkin from Check Point Software Technologies.
st_select_lex_node *st_select_lex_node:: insert_chain_before( st_select_lex_node **ptr_pos_to_insert, st_select_lex_node *end_chain_node) { end_chain_node->link_next= *ptr_pos_to_insert; (*ptr_pos_to_insert)->link_prev= &end_chain_nod...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
89,312,237,105,307,170,000,000,000,000,000,000,000
9
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
TEST_F(HttpConnectionManagerImplTest, DoNotStartSpanIfTracingIsNotEnabled) { setup(false, ""); // Disable tracing. tracing_config_.reset(); EXPECT_CALL(tracer_, startSpan_(_, _, _, _)).Times(0); ON_CALL(runtime_.snapshot_, featureEnabled("tracing.global_enabled", An<const envoy::type::FractionalPe...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
184,078,468,538,873,200,000,000,000,000,000,000,000
39
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static bool hufBuildDecTable(const long long *hcode, // i : encoding table int im, // i : min index in hcode int iM, // i : max index in hcode HufDec *hdecod) // o: (allocated by caller) // de...
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
256,661,189,239,562,500,000,000,000,000,000,000,000
83
Make line_no with too large value(2**20) invalid. Fixes #124
int security_xfrm_state_alloc(struct xfrm_state *x, struct xfrm_user_sec_ctx *sec_ctx) { return security_ops->xfrm_state_alloc_security(x, sec_ctx, 0); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
231,763,951,880,073,870,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
dnsc_load_local_data(struct dnsc_env* dnscenv, struct config_file *cfg) { size_t i, j; // Insert 'local-zone: "2.dnscrypt-cert.example.com" deny' if(!cfg_str2list_insert(&cfg->local_zones, strdup(dnscenv->provider_name), strdup("deny"))) { log_err...
0
[ "CWE-190" ]
unbound
02080f6b180232f43b77f403d0c038e9360a460f
266,716,018,858,102,030,000,000,000,000,000,000,000
75
- Fix Integer Overflows in Size Calculations, reported by X41 D-Sec.
void ide_atapi_io_error(IDEState *s, int ret) { /* XXX: handle more errors */ if (ret == -ENOMEDIUM) { ide_atapi_cmd_error(s, NOT_READY, ASC_MEDIUM_NOT_PRESENT); } else { ide_atapi_cmd_error(s, ILLEGAL_REQUEST, ASC_LOGICAL_BLOCK_OOR); ...
0
[]
qemu
ce560dcf20c14194db5ef3b9fc1ea592d4e68109
129,492,908,515,866,120,000,000,000,000,000,000,000
11
ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0 The START STOP UNIT command will only eject/load media if power condition is zero. If power condition is !0 then LOEJ and START will be ignored. From MMC (sbc contains similar wordings too) The Power Conditions field requests the block device to be ...
Status RoleGraph::removeAllRolesFromRole(const RoleName& victim) { typedef std::vector<RoleName> RoleNameVector; if (!roleExists(victim)) { return Status(ErrorCodes::RoleNotFound, str::stream() << "Role: " << victim.getFullName() << " does not exist"); } if (isBuiltinRole(v...
0
[ "CWE-863" ]
mongo
521e56b407ac72bc69a97a24d1253f51a5b6e81b
180,175,375,650,052,070,000,000,000,000,000,000,000
26
SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON
skipChannel (const char *& readPtr, PixelType typeInFile, size_t xSize) { switch (typeInFile) { case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: Xdr::skip <CharPtrIO> (readPtr, Xdr::size <unsigned int> () * xSize); break; case OPENEXR_IMF_INTERNAL_NAMESPACE::HA...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
46,823,622,012,940,810,000,000,000,000,000,000,000
26
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
TORRENT_TEST(integer) { char b[] = "i12453e"; bdecode_node e; error_code ec; int ret = bdecode(b, b + sizeof(b)-1, e, ec); TEST_CHECK(ret == 0); printf("%s\n", print_entry(e).c_str()); std::pair<const char*, int> section = e.data_section(); TEST_CHECK(std::memcmp(b, section.first, section.second) == 0); TEST_C...
0
[ "CWE-125" ]
libtorrent
ec30a5e9ec703afb8abefba757c6d401303b53db
99,085,537,708,009,280,000,000,000,000,000,000,000
14
fix out-of-bounds read in bdecode Fixes #2099
static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t size, int flags) { struct sock_iocb *siocb = kiocb_to_siocb(iocb); struct scm_cookie tmp_scm; struct sock *sk = sock->sk; struct unix_sock *u = unix_sk(sk); int noblock = flags & MSG_DONTWAIT; struc...
0
[]
linux-2.6
6209344f5a3795d34b7f2c0061f49802283b6bdd
163,054,465,201,881,160,000,000,000,000,000,000,000
85
net: unix: fix inflight counting bug in garbage collector Previously I assumed that the receive queues of candidates don't change during the GC. This is only half true, nothing can be received from the queues (see comment in unix_gc()), but buffers could be added through the other half of the socket pair, which may s...
my_decimal *Aggregator_distinct::arg_val_decimal(my_decimal * value) { return use_distinct_values ? table->field[0]->val_decimal(value) : item_sum->args[0]->val_decimal(value); }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
1,117,100,347,610,456,600,000,000,000,000,000,000
5
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...
static void kiocb_done(struct kiocb *kiocb, ssize_t ret, struct io_comp_state *cs) { struct io_kiocb *req = container_of(kiocb, struct io_kiocb, rw.kiocb); /* add previously done IO, if any */ if (req->io && req->io->rw.bytes_done > 0) { if (ret < 0) ret = req->io->rw.bytes_done; else ret += req-...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
14,582,182,574,079,145,000,000,000,000,000,000,000
20
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...
bool lxc_nic_exists(char *nic) { #define __LXC_SYS_CLASS_NET_LEN 15 + IFNAMSIZ + 1 char path[__LXC_SYS_CLASS_NET_LEN]; int ret; struct stat sb; if (!strcmp(nic, "none")) return true; ret = snprintf(path, __LXC_SYS_CLASS_NET_LEN, "/sys/class/net/%s", nic); if (ret < 0 || (size_t)ret >= __LXC_SYS_CLASS_NET_LEN)...
0
[ "CWE-417" ]
lxc
5eb45428b312e978fb9e294dde16efb14dd9fa4d
222,651,506,203,437,300,000,000,000,000,000,000,000
20
CVE 2018-6556: verify netns fd in lxc-user-nic Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
int vfs_readlink(struct dentry *dentry, char __user *buffer, int buflen) { struct inode *inode = d_inode(dentry); if (unlikely(!(inode->i_opflags & IOP_DEFAULT_READLINK))) { if (unlikely(inode->i_op->readlink)) return inode->i_op->readlink(dentry, buffer, buflen); if (!d_is_symlink(dentry)) return -EINVAL...
0
[ "CWE-362", "CWE-399" ]
linux
49d31c2f389acfe83417083e1208422b4091cd9e
220,197,322,367,638,460,000,000,000,000,000,000,000
18
dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same st...
static int _server_handle_qfThreadInfo(libgdbr_t *g, int (*cmd_cb) (void*, const char*, char*, size_t), void *core_ptr) { char *buf; int ret; size_t buf_len = 80; if ((ret = send_ack (g)) < 0) { return -1; } if (!(buf = malloc (buf_len))) { return -1; } if ((ret = cmd_cb (core_ptr, "dpt", buf, buf_len)) < 0...
0
[ "CWE-703", "CWE-787" ]
radare2
796dd28aaa6b9fa76d99c42c4d5ff8b257cc2191
171,189,941,955,011,640,000,000,000,000,000,000,000
18
Fix ext2 buffer overflow in r2_sbu_grub_memmove
static void mark_merge_entries(void) { int i; for (i = 0; i < active_nr; i++) { struct cache_entry *ce = active_cache[i]; if (!ce_stage(ce)) continue; ce->ce_flags |= CE_STAGEMASK; } }
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
205,511,767,295,591,240,000,000,000,000,000,000,000
10
Fix buffer overflow in git diff If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
rtl8xxxu_set_retry(struct rtl8xxxu_priv *priv, u16 short_retry, u16 long_retry) { u16 val16; val16 = ((short_retry << RETRY_LIMIT_SHORT_SHIFT) & RETRY_LIMIT_SHORT_MASK) | ((long_retry << RETRY_LIMIT_LONG_SHIFT) & RETRY_LIMIT_LONG_MASK); rtl8xxxu_write16(priv, REG_RETRY_LIMIT, val16); }
0
[ "CWE-400", "CWE-401" ]
linux
a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c
99,277,184,554,960,800,000,000,000,000,000,000,000
11
rtl8xxxu: prevent leaking urb In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
SparseTensor(Tensor ix, Tensor vals, const TensorShape& shape, const VarDimArray order) : SparseTensor(std::move(ix), std::move(vals), TensorShapeToVector(shape), order) {}
0
[ "CWE-703", "CWE-787" ]
tensorflow
8ba6fa29cd8bf9cef9b718dc31c78c73081f5b31
83,889,607,141,929,650,000,000,000,000,000,000,000
4
Fix heap-buffer-overflow issue with `tf.raw_ops.SparseSplit`. PiperOrigin-RevId: 371242872 Change-Id: I482bb3d12602c7c3cc9446f97fb9f584bb98e9a4
cluster_init (void) { cluster_hash = hash_create (cluster_hash_key_make, cluster_hash_cmp); }
0
[]
quagga
8794e8d229dc9fe29ea31424883433d4880ef408
103,370,703,666,836,890,000,000,000,000,000,000,000
4
bgpd: Fix regression in args consolidation, total should be inited from args * bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args.
ephy_string_get_host_name (const char *url) { g_autoptr (GUri) uri = NULL; if (url == NULL || g_str_has_prefix (url, "file://") || g_str_has_prefix (url, "about:") || g_str_has_prefix (url, "ephy-about:")) return NULL; uri = g_uri_parse (url, G_URI_FLAGS_NONE, NULL); /* If uri is NULL it...
0
[ "CWE-787" ]
epiphany
486da133569ebfc436c959a7419565ab102e8525
245,833,990,985,436,160,000,000,000,000,000,000,000
25
Fix memory corruption in ephy_string_shorten() This fixes a regression that I introduced in 232c613472b38ff0d0d97338f366024ddb9cd228. I got my browser stuck in a crash loop today while visiting a website with a page title greater than ephy-embed.c's MAX_TITLE_LENGTH, the only condition in which ephy_string_shorten() ...
_free_cached_dir(void *_d) { cached_dir_t *d; if (!_d) return; d = (cached_dir_t *)_d; cached_dir_decref(d); }
0
[ "CWE-264" ]
tor
00fffbc1a15e2696a89c721d0c94dc333ff419ef
64,925,732,608,977,040,000,000,000,000,000,000,000
9
Don't give the Guard flag to relays without the CVE-2011-2768 fix
rfbSendFramebufferUpdate(rfbClientPtr cl, sraRegionPtr givenUpdateRegion) { sraRectangleIterator* i=NULL; sraRect rect; int nUpdateRegionRects; rfbFramebufferUpdateMsg *fu = (rfbFramebufferUpdateMsg *)cl->updateBuf; sraRegionPtr updateRegion, updateCopyRegion, tmpRegion, cur...
0
[ "CWE-119" ]
vino
456dadbb5c5971d3448763a44c05b9ad033e522f
156,590,599,502,398,720,000,000,000,000,000,000,000
348
Avoid out-of-bounds memory accesses This fixes two critical security vulnerabilities that lead to an out-of-bounds memory access with a crafted client framebuffer update request packet. The dimensions of the update from the packet are checked to ensure that they are within the screen dimensions. Thanks to Kevin Chen ...
static void totem_volatile_config_read (struct totem_config *totem_config) { char *str; icmap_get_uint32("totem.token", &totem_config->token_timeout); icmap_get_uint32("totem.token_retransmit", &totem_config->token_retransmit_timeout); icmap_get_uint32("totem.hold", &totem_config->token_hold_timeout); icmap_get_u...
0
[]
corosync
55dc09ea237482f827333759fd45608bc9518d64
34,740,633,683,380,600,000,000,000,000,000,000,000
29
totemconfig: enforce hmac config when crypto is enabled Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com> Reviewed-by: Jan Friesse <jfriesse@redhat.com>
void ssl_cert_free(CERT *c) { int i; if(c == NULL) return; i=CRYPTO_add(&c->references,-1,CRYPTO_LOCK_SSL_CERT); #ifdef REF_PRINT REF_PRINT("CERT",c); #endif if (i > 0) return; #ifdef REF_CHECK if (i < 0) { fprintf(stderr,"ssl_cert_free, bad reference count\n"); abort(); /* ok */ } #endif #ifndef...
0
[]
openssl
c70a1fee71119a9005b1f304a3bf47694b4a53ac
51,407,656,962,864,290,000,000,000,000,000,000,000
39
Reorganise supported signature algorithm extension processing. Only store encoded versions of peer and configured signature algorithms. Determine shared signature algorithms and cache the result along with NID equivalents of each algorithm. (backport from HEAD)
static CURLcode brotli_init_writer(struct Curl_easy *data, struct contenc_writer *writer) { struct brotli_params *bp = (struct brotli_params *) &writer->params; (void) data; if(!writer->downstream) return CURLE_WRITE_ERROR; bp->br = BrotliDecoderCreateInstance(NULL, NULL...
0
[]
curl
3a09fbb7f264c67c438d01a30669ce325aa508e2
91,269,001,029,186,790,000,000,000,000,000,000,000
12
content_encoding: return error on too many compression steps The max allowed steps is arbitrarily set to 5. Bug: https://curl.se/docs/CVE-2022-32206.html CVE-2022-32206 Reported-by: Harry Sintonen Closes #9049
static void io_submit_flush_completions(struct io_comp_state *cs, struct io_ring_ctx *ctx) { int i, nr = cs->nr; struct io_kiocb *req; struct req_batch rb; io_init_req_batch(&rb); spin_lock_irq(&ctx->completion_lock); for (i = 0; i < nr; i++) { req = cs->reqs[i]; __io_cqring_fill_event(ctx, req->user_da...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
179,903,425,568,614,230,000,000,000,000,000,000,000
29
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
static int fifo_open(struct inode *inode, struct file *filp) { struct pipe_inode_info *pipe; bool is_pipe = inode->i_sb->s_magic == PIPEFS_MAGIC; int ret; filp->f_version = 0; spin_lock(&inode->i_lock); if (inode->i_pipe) { pipe = inode->i_pipe; pipe->files++; spin_unlock(&inode->i_lock); } else { spin...
0
[ "CWE-416" ]
linux
15fab63e1e57be9fdb5eec1bbc5916e9825e9acb
233,725,950,076,769,700,000,000,000,000,000,000,000
124
fs: prevent page refcount overflow in pipe_buf_get Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All callers converted to handle a failure. Reported-by:...
static int read_pack_info_file(const char *infofile) { FILE *fp; char line[1000]; int old_cnt = 0; fp = fopen(infofile, "r"); if (!fp) return 1; /* nonexistent is not an error. */ while (fgets(line, sizeof(line), fp)) { int len = strlen(line); if (len && line[len-1] == '\n') line[--len] = 0; if (!le...
1
[]
git
c173dad58787a7f11a526dbcdaa5a2fe9ff1c87f
58,635,535,560,331,130,000,000,000,000,000,000,000
40
update-server-info: Shorten read_pack_info_file() The correct responses to a D and a T line in .git/objects/info/packs are the same, so combine their case arms. In both cases we already ‘goto’ out of the switch so while at it, remove a redundant ‘break’ to avoid yet another line of code. Signed-off-by: Ralf Thielow ...
VOID ParaNdis6_ReturnNetBufferLists( NDIS_HANDLE miniportAdapterContext, PNET_BUFFER_LIST pNBL, ULONG returnFlags) { PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)miniportAdapterContext; UNREFERENCED_PARAMETER(returnFlags); DEBUG_ENTRY(5); while (pNBL) { PNET_BUFFER_LIST pTe...
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
188,824,470,756,956,260,000,000,000,000,000,000,000
22
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
mono_thread_set_state (MonoInternalThread *thread, MonoThreadState state) { ensure_synch_cs_set (thread); EnterCriticalSection (thread->synch_cs); thread->state |= state; LeaveCriticalSection (thread->synch_cs); }
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
137,744,603,384,383,800,000,000,000,000,000,000,000
8
Fix access to freed members of a dead thread * threads.c: Fix access to freed members of a dead thread. Found and fixed by Rodrigo Kumpera <rkumpera@novell.com> Ref: CVE-2011-0992
static int nfs4_xdr_dec_create(struct rpc_rqst *rqstp, struct xdr_stream *xdr, struct nfs4_create_res *res) { struct compound_hdr hdr; int status; status = decode_compound_hdr(xdr, &hdr); if (status) goto out; status = decode_sequence(xdr, &res->seq_res, rqstp); if (status) goto out; status = deco...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
11,999,629,135,136,865,000,000,000,000,000,000,000
35
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
uint32 pack_length() const { return (uint32) field_length+length_bytes; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
233,845,952,953,366,080,000,000,000,000,000,000,000
1
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...
nghttp2_session_get_effective_local_window_size(nghttp2_session *session) { return session->local_window_size; }
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
240,085,602,325,057,700,000,000,000,000,000,000,000
3
Add nghttp2_option_set_max_outbound_ack
initialize_readline () { rl_command_func_t *func; char kseq[2]; if (bash_readline_initialized) return; rl_terminal_name = get_string_value ("TERM"); rl_instream = stdin; rl_outstream = stderr; /* Allow conditional parsing of the ~/.inputrc file. */ rl_readline_name = "Bash"; /* Add bindable na...
0
[ "CWE-273", "CWE-787" ]
bash
951bdaad7a18cc0dc1036bba86b18b90874d39ff
147,861,360,119,265,110,000,000,000,000,000,000,000
198
commit bash-20190628 snapshot
int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index) { struct mlx4_mac_table *table = &mlx4_priv(dev)->port[port].mac_table; int i, err = 0; int free = -1; mlx4_dbg(dev, "Registering MAC: 0x%llx\n", (unsigned long long) mac); mutex_lock(&table->mutex); for (i = 0; i < MLX4_MAX_MAC_NUM - 1; i...
1
[ "CWE-119", "CWE-787" ]
linux
0926f91083f34d047abc74f1ca4fa6a9c161f7db
240,002,383,017,306,500,000,000,000,000,000,000,000
47
mlx4_en: Fix out of bounds array access When searching for a free entry in either mlx4_register_vlan() or mlx4_register_mac(), and there is no free entry, the loop terminates without updating the local variable free thus causing out of array bounds access. Fix this by adding a proper check outside the loop. Signed-of...
xmlParseConditionalSections(xmlParserCtxtPtr ctxt) { int id = ctxt->input->id; SKIP(3); SKIP_BLANKS; if (CMP7(CUR_PTR, 'I', 'N', 'C', 'L', 'U', 'D', 'E')) { SKIP(7); SKIP_BLANKS; if (RAW != '[') { xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL); xmlStopParser(ctxt); return; } else {...
1
[ "CWE-119" ]
libxml2
41ac9049a27f52e7a1f3b341f8714149fc88d450
298,381,328,621,608,850,000,000,000,000,000,000,000
149
Fix an error in previous Conditional section patch an off by one mistake in the change, led to error on correct document where the end of the included entity was exactly the end of the conditional section, leading to regtest failure
void Item_user_var_as_out_param::load_data_print_for_log_event(THD *thd, String *str) const { str->append('@'); append_identifier(thd, str, name.str, name.length); }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
199,791,708,954,226,930,000,000,000,000,000,000,000
7
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...
static int cit_set_sharpness(struct gspca_dev *gspca_dev, s32 val) { struct sd *sd = (struct sd *) gspca_dev; switch (sd->model) { case CIT_MODEL0: case CIT_MODEL2: case CIT_MODEL4: case CIT_IBM_NETCAM_PRO: /* These models do not have this control */ break; case CIT_MODEL1: { int i; static const unsigne...
0
[ "CWE-476" ]
linux
a246b4d547708f33ff4d4b9a7a5dbac741dc89d8
205,721,627,206,354,100,000,000,000,000,000,000,000
49
media: xirlink_cit: add missing descriptor sanity checks Make sure to check that we have two alternate settings and at least one endpoint before accessing the second altsetting structure and dereferencing the endpoint arrays. This specifically avoids dereferencing NULL-pointers or corrupting memory when a device does...
void operator()(const Option::size_t& v) const { out << v.value; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
89,711,016,334,402,860,000,000,000,000,000,000,000
3
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
static void ahci_restart(IDEDMA *dma) { AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma); int i; for (i = 0; i < AHCI_MAX_CMDS; i++) { NCQTransferState *ncq_tfs = &ad->ncq_tfs[i]; if (ncq_tfs->halt) { execute_ncq_command(ncq_tfs); } } }
0
[ "CWE-772", "CWE-401" ]
qemu
d68f0f778e7f4fbd674627274267f269e40f0b04
243,907,337,181,906,580,000,000,000,000,000,000,000
12
ide: ahci: call cleanup function in ahci unit This can avoid memory leak when hotunplug the ahci device. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Message-id: 1488449293-80280-4-git-send-email-liqiang6-s@360.cn Signed-off-by: John Snow <jsnow@redhat.com>
LosslessScan::LosslessScan(class Frame *frame,class Scan *scan,UBYTE predictor,UBYTE lowbit,bool differential) : PredictiveScan(frame,scan,predictor,lowbit,differential) { #if ACCUSOFT_CODE for(int i = 0;i < 4;i++) { m_pDCDecoder[i] = NULL; m_pDCCoder[i] = NULL; m_pDCStatistics[i] = NULL; } #...
0
[ "CWE-119", "CWE-703" ]
libjpeg
ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a
206,493,087,993,235,760,000,000,000,000,000,000,000
11
Added out-of-bounds checks for lossless symbol decoding and AC context indices. Worked around some gcc warnings. Bumped to 1.64.
static int v9fs_do_readdir_with_stat(V9fsPDU *pdu, V9fsFidState *fidp, uint32_t max_count) { V9fsPath path; V9fsStat v9stat; int len, err = 0; int32_t count = 0; struct stat stbuf; off_t saved_dir_pos; struct dirent *dent; /* save the directory posit...
0
[ "CWE-399", "CWE-772" ]
qemu
e95c9a493a5a8d6f969e86c9f19f80ffe6587e19
13,001,366,767,821,115,000,000,000,000,000,000,000
64
9pfs: fix potential host memory leak in v9fs_read In 9pfs read dispatch function, it doesn't free two QEMUIOVector object thus causing potential memory leak. This patch avoid this. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Signed-off-by: Greg Kurz <groug@kaod.org>
void AppendTensorShapeToFingerprint(const PartialTensorShape& shape, Fprint128* fingerprint) { if (shape.unknown_rank()) { char c = '?'; *fingerprint = FingerprintCat128(*fingerprint, c); } else { for (int i = 0; i < shape.dims(); i++) { int64_t dim = shape.dim_...
0
[ "CWE-476", "CWE-475" ]
tensorflow
a5b89cd68c02329d793356bda85d079e9e69b4e7
35,695,474,762,414,134,000,000,000,000,000,000,000
12
Fix empty resource handle vulnerability. Some ops that attempt to extract a resource handle from user input can lead to nullptr dereferences. This returns an error in such a case. PiperOrigin-RevId: 445571938
static void __release_extent_node(struct f2fs_sb_info *sbi, struct extent_tree *et, struct extent_node *en) { spin_lock(&sbi->extent_lock); f2fs_bug_on(sbi, list_empty(&en->list)); list_del_init(&en->list); spin_unlock(&sbi->extent_lock); __detach_extent_node(sbi, et, en); }
0
[ "CWE-119", "CWE-787" ]
linux
dad48e73127ba10279ea33e6dbc8d3905c4d31c0
101,666,929,318,723,370,000,000,000,000,000,000,000
10
f2fs: fix a bug caused by NULL extent tree Thread A: Thread B: -f2fs_remount -sbi->mount_opt.opt = 0; <--- -f2fs_iget -do_read_inode -f2fs_init_extent_tree -F2FS_I(inode)->extent_tree is NULL -default_options && parse_options -remount return ...
static SLJIT_INLINE void reset_early_fail(compiler_common *common) { DEFINE_COMPILER; sljit_u32 size = (sljit_u32)(common->early_fail_end_ptr - common->early_fail_start_ptr); sljit_u32 uncleared_size; sljit_s32 src = SLJIT_IMM; sljit_s32 i; struct sljit_label *loop; SLJIT_ASSERT(common->early_fail_start_ptr < common->...
0
[ "CWE-125" ]
pcre2
50a51cb7e67268e6ad417eb07c9de9bfea5cc55a
264,219,584,226,510,600,000,000,000,000,000,000,000
49
Fixed a unicode properrty matching issue in JIT
static void read_sse_reg(struct x86_emulate_ctxt *ctxt, sse128_t *data, int reg) { ctxt->ops->get_fpu(ctxt); switch (reg) { case 0: asm("movdqu %%xmm0, %0" : "=m"(*data)); break; case 1: asm("movdqu %%xmm1, %0" : "=m"(*data)); break; case 2: asm("movdqu %%xmm2, %0" : "=m"(*data)); break; case 3: asm("movdqu %%xmm...
0
[]
kvm
e28ba7bb020f07193bc000453c8775e9d2c0dda7
251,031,102,229,918,560,000,000,000,000,000,000,000
26
KVM: x86: fix missing checks in syscall emulation On hosts without this patch, 32bit guests will crash (and 64bit guests may behave in a wrong way) for example by simply executing following nasm-demo-application: [bits 32] global _start SECTION .text _start: syscall (I tested it with winxp and linux ...
pop3_stream_finalize (GObject *object) { CamelPOP3Stream *stream = CAMEL_POP3_STREAM (object); g_free (stream->buf); g_free (stream->linebuf); /* Chain up to parent's finalize() method. */ G_OBJECT_CLASS (camel_pop3_stream_parent_class)->finalize (object); }
0
[ "CWE-74" ]
evolution-data-server
ba82be72cfd427b5d72ff21f929b3a6d8529c4df
231,103,627,937,201,600,000,000,000,000,000,000,000
10
I#226 - CVE-2020-14928: Response Injection via STARTTLS in SMTP and POP3 Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/226
static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long address, pte_t *ptep, int full) { pte_t pte; pte = ptep_get_and_clear(mm, address, ptep); return pte; }
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
292,289,275,763,287,450,000,000,000,000,000,000,000
8
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
__init static int tracer_alloc_buffers(void) { int ring_buf_size; int ret = -ENOMEM; /* * Make sure we don't accidently add more trace options * than we have bits for. */ BUILD_BUG_ON(TRACE_ITER_LAST_BIT > TRACE_FLAGS_MAX_SIZE); if (!alloc_cpumask_var(&tracing_buffer_mask, GFP_KERNEL)) goto out; if (!a...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
92,434,229,960,145,690,000,000,000,000,000,000,000
121
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
void* IOBuf::operator new(size_t size) { size_t fullSize = offsetof(HeapStorage, buf) + size; auto storage = static_cast<HeapStorage*>(checkedMalloc(fullSize)); new (&storage->prefix) HeapPrefix(kIOBufInUse, fullSize); if (io_buf_alloc_cb) { io_buf_alloc_cb(storage, fullSize); } return &(storage->buf...
1
[ "CWE-787" ]
folly
4f304af1411e68851bdd00ef6140e9de4616f7d3
256,050,229,937,511,720,000,000,000,000,000,000,000
12
[folly] Add additional overflow checks to IOBuf - CVE-2021-24036 Summary: As per title CVE-2021-24036 Reviewed By: jan Differential Revision: D27938605 fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c
static int __device_attach(struct device *dev, bool allow_async) { int ret = 0; device_lock(dev); if (dev->p->dead) { goto out_unlock; } else if (dev->driver) { if (device_is_bound(dev)) { ret = 1; goto out_unlock; } ret = device_bind_driver(dev); if (ret == 0) ret = 1; else { dev->driver =...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
54,449,436,727,928,340,000,000,000,000,000,000,000
53
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...
static int selinux_task_prlimit(const struct cred *cred, const struct cred *tcred, unsigned int flags) { u32 av = 0; if (!flags) return 0; if (flags & LSM_PRLIMIT_WRITE) av |= PROCESS__SETRLIMIT; if (flags & LSM_PRLIMIT_READ) av |= PROCESS__GETRLIMIT; return avc_has_perm(&selinux_state, cred_sid(...
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
239,194,004,745,873,400,000,000,000,000,000,000,000
15
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
TEST_F(QueryPlannerTest, HintValidWithPredicate) { addIndex(BSON("a" << 1)); runQueryHint(fromjson("{a: {$gt: 1}}"), fromjson("{a: 1}")); assertNumSolutions(1U); assertSolutionExists( "{fetch: {filter: null, " "node: {ixscan: {filter: null, pattern: {a: 1}}}}}"); }
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
114,440,008,817,823,720,000,000,000,000,000,000,000
9
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
bool FileIo::eof() const { assert(p_->fp_ != 0); return feof(p_->fp_) != 0 || tell() >= (long) size() ; }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
119,161,751,119,835,570,000,000,000,000,000,000,000
5
Fix https://github.com/Exiv2/exiv2/issues/55
int LibRaw::setMakeFromIndex(unsigned makei) { if (makei <= LIBRAW_CAMERAMAKER_Unknown || makei >= LIBRAW_CAMERAMAKER_TheLastOne) return 0; for (int i = 0; i < int(sizeof CorpTable / sizeof *CorpTable); i++) if ((unsigned)CorpTable[i].CorpId == makei) { strcpy(normalized_make, CorpTable[i].CorpName); maker...
0
[ "CWE-787" ]
LibRaw
4feaed4dea636cee4fee010f615881ccf76a096d
30,253,259,839,647,453,000,000,000,000,000,000,000
13
limit loops to MIN(colors,4) in dng fields parser
wc_is_ucs_hangul(wc_uint32 ucs) { return (ucs <= WC_C_UCS2_END && wc_map_range_search((wc_uint16)ucs, ucs_hangul_map, N_ucs_hangul_map) != NULL); }
0
[ "CWE-119" ]
w3m
716bc126638393c733399d11d3228edb82877faa
109,587,906,173,570,230,000,000,000,000,000,000,000
6
Prevent global-buffer-overflow in wc_any_to_ucs() Bug-Debian: https://github.com/tats/w3m/issues/43
test_alpn_match (TestConnection *test, gconstpointer data) { const char * const client_protocols[] = { "one", "two", "three", NULL }; const char * const server_protocols[] = { "four", "seven", "nine", "two", NULL }; test_alpn (test, client_protocols, server_protocols, "two"); }
0
[ "CWE-295" ]
glib-networking
29513946809590c4912550f6f8620468f9836d94
249,495,639,397,761,340,000,000,000,000,000,000,000
8
Return bad identity error if identity is unset When the server-identity property of GTlsClientConnection is unset, the documentation sasy we need to fail the certificate verification with G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise, it's easy for applications to fail to specify server identity....
static int ntop_sqlite_exec_query(lua_State* vm) { char *db_path, *db_query; sqlite3 *db; char *zErrMsg = 0; struct ntopng_sqlite_state state; struct stat buf; ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TSTRING)) return(CONST_LUA_ER...
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
62,224,287,129,815,170,000,000,000,000,000,000,000
37
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
certificateExactNormalize( slap_mask_t usage, Syntax *syntax, MatchingRule *mr, struct berval *val, struct berval *normalized, void *ctx ) { BerElementBuffer berbuf; BerElement *ber = (BerElement *)&berbuf; ber_tag_t tag; ber_len_t len; ber_int_t i; char serialbuf2[SLAP_SN_BUFLEN]; struct berval sn, sn2 = ...
0
[ "CWE-617" ]
openldap
3539fc33212b528c56b716584f2c2994af7c30b0
99,279,730,507,462,540,000,000,000,000,000,000,000
93
ITS#9454 fix issuerAndThisUpdateCheck
bool CModules::OnIRCConnected() { MODUNLOADCHK(OnIRCConnected()); return false; }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
326,833,391,312,454,940,000,000,000,000,000,000,000
4
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
asmlinkage int sys_sigaction(int sig, const struct old_sigaction __user *act, struct old_sigaction __user *oact) { struct k_sigaction new_ka, old_ka; int ret; if (act) { old_sigset_t mask; if (!access_ok(VERIFY_READ, act, sizeof(*act)) || __get_user(new_ka.sa.sa_handler, &act->sa_handler) ...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
142,462,706,045,547,640,000,000,000,000,000,000,000
31
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
int caca_dither_bitmap(caca_canvas_t *cv, int x, int y, int w, int h, caca_dither_t const *d, void const *pixels) { int *floyd_steinberg, *fs_r, *fs_g, *fs_b; uint32_t savedattr; int fs_length; int x1, y1, x2, y2, pitch, deltax, deltay, dchmax; if(!d || !pixels) retu...
1
[ "CWE-369" ]
libcaca
84bd155087b93ab2d8d7cb5b1ac94ecd4cf4f93c
59,309,848,377,105,880,000,000,000,000,000,000,000
259
dither: fix integer overflows that were causing a division by zero. Fixes: #36 (CVE-2018-20544)
static void fq_recalc_backlog(struct fq *fq, struct fq_tin *tin, struct fq_flow *flow) { struct fq_flow *i; if (list_empty(&flow->backlogchain)) list_add_tail(&flow->backlogchain, &fq->backlogs); i = flow; list_for_each_entry_continue_reverse(i, &fq->backlogs, backlogchain) if (i->...
0
[ "CWE-330" ]
linux
55667441c84fa5e0911a0aac44fb059c15ba6da2
309,152,749,736,403,200,000,000,000,000,000,000,000
17
net/flow_dissector: switch to siphash UDP IPv6 packets auto flowlabels are using a 32bit secret (static u32 hashrnd in net/core/flow_dissector.c) and apply jhash() over fields known by the receivers. Attackers can easily infer the 32bit secret and use this information to identify a device and/or user, since this 32bi...
e_source_registry_debug_enabled (void) { static gint esr_debug = -1; if (esr_debug == -1) esr_debug = g_strcmp0 (g_getenv ("ESR_DEBUG"), "1") == 0 ? 1 : 0; return esr_debug == 1; }
0
[ "CWE-295" ]
evolution-data-server
6672b8236139bd6ef41ecb915f4c72e2a052dba5
224,211,310,329,434,970,000,000,000,000,000,000,000
9
Let child source with 'none' authentication method use collection source authentication That might be the same as having set NULL authentication method. Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
void report_linked_checkout_garbage(void) { struct strbuf sb = STRBUF_INIT; const struct common_dir *p; int len; if (!git_common_dir_env) return; strbuf_addf(&sb, "%s/", get_git_dir()); len = sb.len; for (p = common_list; p->dirname; p++) { const char *path = p->dirname; if (p->ignore_garbage) continue...
0
[ "CWE-125" ]
git
11a9f4d807a0d71dc6eff51bb87baf4ca2cccf1d
70,841,093,135,524,530,000,000,000,000,000,000,000
21
is_ntfs_dotgit: use a size_t for traversing string We walk through the "name" string using an int, which can wrap to a negative value and cause us to read random memory before our array (e.g., by creating a tree with a name >2GB, since "int" is still 32 bits even on most 64-bit platforms). Worse, this is easy to trigg...
static u32 get_link_mode(struct hci_conn *conn) { u32 link_mode = 0; if (conn->role == HCI_ROLE_MASTER) link_mode |= HCI_LM_MASTER; if (test_bit(HCI_CONN_ENCRYPT, &conn->flags)) link_mode |= HCI_LM_ENCRYPT; if (test_bit(HCI_CONN_AUTH, &conn->flags)) link_mode |= HCI_LM_AUTH; if (test_bit(HCI_CONN_SECURE,...
0
[ "CWE-327" ]
linux
d5bb334a8e171b262e48f378bd2096c0ea458265
120,582,967,981,932,350,000,000,000,000,000,000,000
21
Bluetooth: Align minimum encryption key size for LE and BR/EDR connections The minimum encryption key size for LE connections is 56 bits and to align LE with BR/EDR, enforce 56 bits of minimum encryption key size for BR/EDR connections as well. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan...
static const char *cmd_hash_method_pm(cmd_parms *cmd, void *_dcfg, const char *p1, const char *p2) { directory_config *dcfg = (directory_config *)_dcfg; rule_exception *re = apr_pcalloc(cmd->pool, sizeof(hash_method)); const char *_p2 = apr_pstrdup(cmd->pool, p2); ACMP *p = NULL; const char ...
0
[ "CWE-20", "CWE-611" ]
ModSecurity
d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe
201,600,666,585,906,920,000,000,000,000,000,000,000
79
Added SecXmlExternalEntity
static int ext4_ext_split(handle_t *handle, struct inode *inode, unsigned int flags, struct ext4_ext_path *path, struct ext4_extent *newext, int at) { struct buffer_head *bh = NULL; int depth = ext_depth(inode); struct ext4_extent_header *neh; struct ext4_extent_idx *fidx; int i = at, k, m, a; ext4...
0
[ "CWE-200", "CWE-908" ]
linux
592acbf16821288ecdc4192c47e3774a4c48bb64
177,441,143,989,280,700,000,000,000,000,000,000,000
242
ext4: zero out the unused memory region in the extent tree block This commit zeroes out the unused memory region in the buffer_head corresponding to the extent metablock after writing the extent header and the corresponding extent node entries. This is done to prevent random uninitialized data from getting into the f...
static int decode_layoutcommit(struct xdr_stream *xdr, struct rpc_rqst *req, struct nfs4_layoutcommit_res *res) { __be32 *p; __u32 sizechanged; int status; status = decode_op_hdr(xdr, OP_LAYOUTCOMMIT); res->status = status; if (status) return status; p = xdr_inline_decode(xdr, 4); if (un...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
88,463,090,715,712,540,000,000,000,000,000,000,000
26
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
void Http2Session::RefreshState(const FunctionCallbackInfo<Value>& args) { Http2Session* session; ASSIGN_OR_RETURN_UNWRAP(&session, args.Holder()); Debug(session, "refreshing state"); AliasedFloat64Array& buffer = session->http2_state()->session_state_buffer; nghttp2_session* s = session->session(); buff...
0
[ "CWE-416" ]
node
a3c33d4ce78f74d1cf1765704af5b427aa3840a6
256,371,222,788,504,530,000,000,000,000,000,000,000
28
http2: update handling of rst_stream with error code NGHTTP2_CANCEL The PR updates the handling of rst_stream frames and adds all streams to the pending list on receiving rst frames with the error code NGHTTP2_CANCEL. The changes will remove dependency on the stream state that may allow bypassing the checks in certai...
mrb_mod_initialize(mrb_state *mrb, mrb_value mod) { mrb_value b; struct RClass *m = mrb_class_ptr(mod); boot_initmod(mrb, m); /* bootstrap a newly initialized module */ mrb_get_args(mrb, "|&", &b); if (!mrb_nil_p(b)) { mrb_yield_with_class(mrb, b, 1, &mod, mod, m); } return mod; }
0
[ "CWE-476", "CWE-415" ]
mruby
faa4eaf6803bd11669bc324b4c34e7162286bfa3
236,501,379,676,248,200,000,000,000,000,000,000,000
11
`mrb_class_real()` did not work for `BasicObject`; fix #4037
static bool hufDecode(const long long *hcode, // i : encoding table const HufDec *hdecod, // i : decoding table const char *in, // i : compressed input buffer int ni, // i : input size (in bits) int rlc...
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
255,704,681,143,162,840,000,000,000,000,000,000,000
115
Make line_no with too large value(2**20) invalid. Fixes #124
xfs_reclaim_inodes_count( struct xfs_mount *mp) { struct xfs_perag *pag; xfs_agnumber_t ag = 0; int reclaimable = 0; while ((pag = xfs_perag_get_tag(mp, ag, XFS_ICI_RECLAIM_TAG))) { ag = pag->pag_agno + 1; reclaimable += pag->pag_ici_reclaimable; xfs_perag_put(pag); } return reclaimable; }
0
[ "CWE-476" ]
linux
afca6c5b2595fc44383919fba740c194b0b76aff
294,754,979,803,613,340,000,000,000,000,000,000,000
14
xfs: validate cached inodes are free when allocated A recent fuzzed filesystem image cached random dcache corruption when the reproducer was run. This often showed up as panics in lookup_slow() on a null inode->i_ops pointer when doing pathwalks. BUG: unable to handle kernel NULL pointer dereference at 00000000000000...
static char *get_path_name(struct fuse *f, fuse_ino_t nodeid, const char *name) { #ifdef __SOLARIS__ char buf[FUSE_MAX_PATH]; char *s = buf + FUSE_MAX_PATH - 1; struct node *node; *s = '\0'; if (name != NULL) { s = add_name(buf, s, name); if (s == NULL) return NULL; ...
0
[]
ntfs-3g
fb28eef6f1c26170566187c1ab7dc913a13ea43c
56,595,563,598,922,610,000,000,000,000,000,000,000
84
Hardened the checking of directory offset requested by a readdir When asked for the next directory entries, make sure the chunk offset is within valid values, otherwise return no more entries in chunk.
int handle_ud(struct kvm_vcpu *vcpu) { static const char kvm_emulate_prefix[] = { __KVM_EMULATE_PREFIX }; int emul_type = EMULTYPE_TRAP_UD; char sig[5]; /* ud2; .ascii "kvm" */ struct x86_exception e; if (unlikely(!kvm_can_emulate_insn(vcpu, emul_type, NULL, 0))) return 1; if (force_emulation_prefix && k...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
249,010,628,383,107,200,000,000,000,000,000,000,000
20
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...
create_worker_threads(uint n) { comp_thread_ctxt_t *threads; uint i; threads = (comp_thread_ctxt_t *) my_malloc(sizeof(comp_thread_ctxt_t) * n, MYF(MY_FAE)); for (i = 0; i < n; i++) { comp_thread_ctxt_t *thd = threads + i; thd->num = i + 1; thd->started = FALSE; thd->cancelled = FALSE; thd->data_a...
0
[ "CWE-703", "CWE-667" ]
server
7c30bc38a588b22b01f11130cfe99e7f36accf94
127,703,658,807,414,500,000,000,000,000,000,000,000
65
MDEV-26561 mariabackup release locks The previous threads locked need to be released too. This occurs if the initialization of any of the non-first mutex/conditition variables errors occurs.
static int walk_pud_range(pgd_t *pgd, unsigned long addr, unsigned long end, struct mm_walk *walk) { pud_t *pud; unsigned long next; int err = 0; pud = pud_offset(pgd, addr); do { next = pud_addr_end(addr, end); if (pud_none_or_clear_bad(pud)) { if (walk->pte_hole) err = walk->pte_hole(addr, next,...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
284,788,656,939,462,000,000,000,000,000,000,000,000
27
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
void FieldStore::append_last_header_key(const char *data, size_t len) { shrpx::append_last_header_key(balloc_, header_key_prev_, buffer_size_, headers_, data, len); }
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
284,387,196,501,170,000,000,000,000,000,000,000,000
4
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
load_data_close (struct archive *a, void *client_data) { LoadData *load_data = client_data; if (load_data->error != NULL) return ARCHIVE_FATAL; if (load_data->istream != NULL) { _g_object_unref (load_data->istream); load_data->istream = NULL; } return ARCHIVE_OK; }
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
33,510,124,011,644,043,000,000,000,000,000,000,000
15
libarchive: sanitize filenames before extracting
static int rdg_read_data_packet(rdpRdg* rdg, BYTE* buffer, int size) { RdgPacketHeader header; size_t readCount = 0; int readSize; int status; if (!rdg->packetRemainingCount) { assert(sizeof(RdgPacketHeader) < INT_MAX); while (readCount < sizeof(RdgPacketHeader)) { status = BIO_read(rdg->tlsOut->bio, (...
0
[ "CWE-125" ]
FreeRDP
6b485b146a1b9d6ce72dfd7b5f36456c166e7a16
131,690,367,814,369,200,000,000,000,000,000,000,000
80
Fixed oob read in irp_write and similar
bool kthread_queue_delayed_work(struct kthread_worker *worker, struct kthread_delayed_work *dwork, unsigned long delay) { struct kthread_work *work = &dwork->work; unsigned long flags; bool ret = false; spin_lock_irqsave(&worker->lock, flags); if (!queuing_blocked(worker, work)) { __kthread_queue_delay...
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
237,413,407,605,039,730,000,000,000,000,000,000,000
18
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
static int perf_event_task_match(struct perf_event *event) { if (event->state < PERF_EVENT_STATE_INACTIVE) return 0; if (!event_filter_match(event)) return 0; if (event->attr.comm || event->attr.mmap || event->attr.mmap_data || event->attr.task) return 1; return 0; }
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
100,883,400,507,956,470,000,000,000,000,000,000,000
14
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
ipmi_sdr_print_discrete_state(struct ipmi_intf *intf, const char *desc, uint8_t sensor_type, uint8_t event_type, uint8_t state1, uint8_t state2) { const struct ipmi_event_sensor_types *evt; int pre = 0, c = 0; if (state1 == 0 && (state2 & 0x7f) == 0) return; for (evt = ipmi_get_first_event_sen...
0
[ "CWE-120" ]
ipmitool
7ccea283dd62a05a320c1921e3d8d71a87772637
281,978,984,369,540,880,000,000,000,000,000,000,000
47
fru, sdr: Fix id_string buffer overflows Final part of the fixes for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp 9 variants of stack buffer overflow when parsing `id_string` field of SDR records returned from `CMD_GET_SDR` command. SDR record structs have an `id_co...
qemuProcessQMPFree(qemuProcessQMPPtr proc) { if (!proc) return; qemuProcessQMPStop(proc); g_object_unref(proc->eventThread); g_free(proc->binary); g_free(proc->libDir); g_free(proc->uniqDir); g_free(proc->monpath); g_free(proc->monarg); g_free(proc->pidfile); g_free(pr...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
140,244,207,229,114,660,000,000,000,000,000,000,000
18
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
static struct kern_ipc_perm *sysvipc_find_ipc(struct ipc_ids *ids, loff_t pos, loff_t *new_pos) { struct kern_ipc_perm *ipc; int total, id; total = 0; for (id = 0; id < pos && total < ids->in_use; id++) { ipc = idr_find(&ids->ipcs_idr, id); if (ipc != NULL) total++; } if (total >= ids->in_use)...
0
[ "CWE-362", "CWE-401" ]
linux
b9a532277938798b53178d5a66af6e2915cb27cf
33,081,378,510,268,666,000,000,000,000,000,000,000
29
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...
static inline int get_amv(Mpeg4DecContext *ctx, int n) { MpegEncContext *s = &ctx->m; int x, y, mb_v, sum, dx, dy, shift; int len = 1 << (s->f_code + 4); const int a = s->sprite_warping_accuracy; if (s->workaround_bugs & FF_BUG_AMV) len >>= s->quarter_sample; if (s->real_sprite_war...
0
[ "CWE-125" ]
FFmpeg
d227ed5d598340e719eff7156b1aa0a4469e9a6a
305,510,833,605,861,840,000,000,000,000,000,000,000
46
avcodec/mpeg4videodec: Check idx in mpeg4_decode_studio_block() Fixes: Out of array access Fixes: 13500/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5769760178962432 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Kieran Kunhya <kieran...
bool Item_cache_temporal::cache_value() { if (!example) return false; value_cached= true; value= example->val_datetime_packed_result(); null_value_inside= null_value= example->null_value; return true; }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
266,810,793,271,977,970,000,000,000,000,000,000,000
9
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.