func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
int MonClient::_check_auth_tickets() { ceph_assert(ceph_mutex_is_locked(monc_lock)); if (active_con && auth) { if (auth->need_tickets()) { ldout(cct, 10) << __func__ << " getting new tickets!" << dendl; auto m = ceph::make_message<MAuth>(); m->protocol = auth->get_protocol(); auth->prepa...
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
337,930,170,133,636,900,000,000,000,000,000,000,000
17
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...
static krb5_error_code hdb_samba4_open(krb5_context context, HDB *db, int flags, mode_t mode) { if (db->hdb_master_key_set) { krb5_error_code ret = HDB_ERR_NOENTRY; krb5_warnx(context, "hdb_samba4_open: use of a master key incompatible with LDB\n"); krb5_set_error_message(context, ret, "hdb_samba4_open: use of a...
0
[ "CWE-288" ]
samba
484c6980befb86f7d81d708829ed4ceb819538eb
65,336,859,136,619,700,000,000,000,000,000,000,000
11
CVE-2022-32744 s4:kdc: Modify HDB plugin to only look up kpasswd principal This plugin is now only used by the kpasswd service. Thus, ensuring we only look up the kadmin/changepw principal means we can't be fooled into accepting tickets for other service principals. We make sure not to specify a specific kvno, to ensu...
dir_s_chroot(VALUE dir, VALUE path) { path = check_dirname(path); if (chroot(RSTRING_PTR(path)) == -1) rb_sys_fail_path(path); return INT2FIX(0); }
0
[ "CWE-22" ]
ruby
bd5661a3cbb38a8c3a3ea10cd76c88bbef7871b8
148,166,035,596,356,300,000,000,000,000,000,000,000
8
dir.c: check NUL bytes * dir.c (GlobPathValue): should be used in rb_push_glob only. other methods should use FilePathValue. https://hackerone.com/reports/302338 * dir.c (rb_push_glob): expand GlobPathValue git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
void testcompressDecompressWithUncommonParams( const uint32_t quality, const uint32_t window_bits, const uint32_t input_block_bits, const bool disable_literal_context_modeling, const Compression::Brotli::Compressor::BrotliCompressorImpl::EncoderMode encoder_mode, const bool disable_ring_buffer...
0
[]
envoy
cb4ef0b09200c720dfdb07e097092dd105450343
201,463,960,548,565,000,000,000,000,000,000,000,000
39
decompressors: stop decompressing upon excessive compression ratio (#733) Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com> Co-authored-by: Ryan Hamilton <rch@google.com> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static int calipso_tlv_len(struct ipv6_opt_hdr *opt, unsigned int offset) { unsigned char *tlv = (unsigned char *)opt; unsigned int opt_len = ipv6_optlen(opt), tlv_len; if (offset < sizeof(*opt) || offset >= opt_len) return -EINVAL; if (tlv[offset] == IPV6_TLV_PAD1) return 1; if (offset + 1 >= opt_len) retu...
0
[ "CWE-416" ]
linux
ad5d07f4a9cd671233ae20983848874731102c08
191,879,854,405,802,070,000,000,000,000,000,000,000
16
cipso,calipso: resolve a number of problems with the DOI refcounts The current CIPSO and CALIPSO refcounting scheme for the DOI definitions is a bit flawed in that we: 1. Don't correctly match gets/puts in netlbl_cipsov4_list(). 2. Decrement the refcount on each attempt to remove the DOI from the DOI list, only re...
RefreshHStatus() { char *buf; #ifdef UTF8 int extrabytes = strlen(hstatusstring) - strlen_onscreen(hstatusstring, NULL); #else int extrabytes = 0; #endif evdeq(&D_hstatusev); if (D_status == STATUS_ON_HS) return; buf = MakeWinMsgEv(hstatusstring, D_fore, '%', (D_HS && D_has_hstatus == HSTATUS_HS && D_WS...
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
336,874,971,337,055,780,000,000,000,000,000,000,000
21
ansi: add support for xterm OSC 11 It allows for getting and setting the background color. Notably, Vim uses OSC 11 to learn whether it's running on a light or dark colored terminal and choose a color scheme accordingly. Tested with gnome-terminal and xterm. When called with "?" argument the current background color ...
inline void Dictionary::accept(Visitor &v) { v.visit(*this); }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
332,625,429,945,932,100,000,000,000,000,000,000,000
1
Fix #122
static const char *applicationType(Uint32 i) { if (i==DVPSIPCMessage::clientOther) return "unspecified"; if (i==DVPSIPCMessage::clientStoreSCP) return "Receiver (Store SCP)"; if (i==DVPSIPCMessage::clientStoreSCU) return "Sender (Store SCU)"; if (i==DVPSIPCMessage::clientPrintSCP) return "Printer (Print SCP)"; ...
0
[ "CWE-264" ]
dcmtk
beaf5a5c24101daeeafa48c375120b16197c9e95
70,000,165,622,135,290,000,000,000,000,000,000,000
10
Make sure to handle setuid() return code properly. In some tools the return value of setuid() is not checked. In the worst case this could lead to privilege escalation since the process does not give up its root privileges and continue as root.
cmsBool Type_Text_Description_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems) { cmsMLU* mlu = (cmsMLU*) Ptr; char *Text = NULL; wchar_t *Wide = NULL; cmsUInt32Number len, len_aligned, len_filler_alignment; cmsBool rc = FALSE; char Filler[68]; ...
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
95,403,743,522,728,260,000,000,000,000,000,000,000
86
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
static int cpia2_streamon(struct file *file, void *fh, enum v4l2_buf_type type) { struct camera_data *cam = video_drvdata(file); int ret = -EINVAL; DBG("VIDIOC_STREAMON, streaming=%d\n", cam->streaming); if (!cam->mmapped || type != V4L2_BUF_TYPE_VIDEO_CAPTURE) return -EINVAL; if (!cam->streaming) { ret = cp...
0
[ "CWE-416" ]
linux
dea37a97265588da604c6ba80160a287b72c7bfd
251,665,476,227,831,320,000,000,000,000,000,000,000
17
media: cpia2: Fix use-after-free in cpia2_exit Syzkaller report this: BUG: KASAN: use-after-free in sysfs_remove_file_ns+0x5f/0x70 fs/sysfs/file.c:468 Read of size 8 at addr ffff8881f59a6b70 by task syz-executor.0/8363 CPU: 0 PID: 8363 Comm: syz-executor.0 Not tainted 5.0.0-rc8+ #3 Hardware name: QEMU Standard PC (i...
void __put_user_ns(struct user_namespace *ns) { schedule_work(&ns->work); }
0
[ "CWE-20", "CWE-862", "CWE-863" ]
linux
d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd
72,035,985,205,661,690,000,000,000,000,000,000,000
4
userns: also map extents in the reverse map to kernel IDs The current logic first clones the extent array and sorts both copies, then maps the lower IDs of the forward mapping into the lower namespace, but doesn't map the lower IDs of the reverse mapping. This means that code in a nested user namespace with >5 extent...
struct socket_context *tls_init_server(struct tls_params *params, struct socket_context *socket_ctx, struct tevent_fd *fde, const char *plain_chars) { struct tls_context *tls; int ret; struct socket_context *new_sock; NTSTATUS nt_status; nt_status = socket_create_with_ops(socke...
0
[]
samba
22af043d2f20760f27150d7d469c7c7b944c6b55
244,710,459,977,423,100,000,000,000,000,000,000,000
71
CVE-2013-4476: s4:libtls: check for safe permissions of tls private key file (key.pem) If the tls key is not owned by root or has not mode 0600 samba will not start up. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Björn Baumbach <bb@s...
std::vector<float> GetBuckets(const int32_t feature, const OpInputList& buckets_list) { const auto& buckets = buckets_list[feature].flat<float>(); std::vector<float> buckets_vector(buckets.data(), buckets.data() + buckets.size()); return buckets_ve...
0
[ "CWE-703", "CWE-681" ]
tensorflow
8a84f7a2b5a2b27ecf88d25bad9ac777cd2f7992
210,371,579,509,877,300,000,000,000,000,000,000,000
7
Ensure num_streams >= 0 in tf.raw_ops.BoostedTreesCreateQuantileStreamResource PiperOrigin-RevId: 387452765 Change-Id: I9990c760e177fabca6a3b9b4612ceeaeeba51495
int task_current_syscall(struct task_struct *target, struct syscall_info *info) { long state; unsigned long ncsw; if (target == current) return collect_syscall(target, info); state = target->state; if (unlikely(!state)) return -EAGAIN; ncsw = wait_task_inactive(target, state); if (unlikely(!ncsw) || ...
0
[ "CWE-681" ]
linux
4f134b89a24b965991e7c345b9a4591821f7c2a6
330,443,678,467,787,880,000,000,000,000,000,000,000
20
lib/syscall: fix syscall registers retrieval on 32-bit platforms Lilith >_> and Claudio Bozzato of Cisco Talos security team reported that collect_syscall() improperly casts the syscall registers to 64-bit values leaking the uninitialized last 24 bytes on 32-bit platforms, that are visible in /proc/self/syscall. The ...
Opal::Call::get_duration () const { std::stringstream duration; if (start_time.IsValid () && IsEstablished ()) { PTimeInterval t = PTime () - start_time; duration << setfill ('0') << setw (2) << t.GetHours () << ":"; duration << setfill ('0') << setw (2) << (t.GetMinutes () % 60) << ":"; duration...
0
[]
ekiga
7d09807257963a4f5168a01aec1795a398746372
304,340,703,809,881,000,000,000,000,000,000,000,000
15
Validate UTF-8 strings before showing them Closes bug #653009.
void skb_scrub_packet(struct sk_buff *skb, bool xnet) { if (xnet) skb_orphan(skb); skb->tstamp.tv64 = 0; skb->pkt_type = PACKET_HOST; skb->skb_iif = 0; skb->local_df = 0; skb_dst_drop(skb); skb->mark = 0; secpath_reset(skb); nf_reset(skb); nf_reset_trace(skb); }
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
79,909,980,407,033,360,000,000,000,000,000,000,000
14
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
static int ldb_wildcard_compare(struct ldb_context *ldb, const struct ldb_parse_tree *tree, const struct ldb_val value, bool *matched) { const struct ldb_schema_attribute *a; struct ldb_val val; struct ldb_val cnk; struct ldb_val *chunk; uint8_t *save_p = NULL; unsigned int c = 0; a = ldb_schema_attribu...
1
[ "CWE-125" ]
samba
34383981a0c40860f71a4451ff8fd752e1b67666
264,293,216,438,188,540,000,000,000,000,000,000,000
126
CVE-2019-3824 ldb: wildcard_match check tree operation Check the operation type of the passed parse tree, and return LDB_INAPPROPRIATE_MATCH if the operation is not LDB_OP_SUBSTRING. A query of "attribute=*" gets parsed as LDB_OP_PRESENT, checking the operation and failing ldb_wildcard_match should help prevent confu...
print_hline (unsigned int ids, unsigned int screenwidth) { unsigned int i, width; width = ids ? 6 : 20; for (i = 0; i < width; i++) fputc ('-', stdout); fputc ('+', stdout); for (i = 0; i < screenwidth - 2 - width; i++) fputc ('-', stdout); fputc ('\n', stdout); }
0
[ "CWE-476" ]
exif
f6334d9d32437ef13dc902f0a88a2be0063d9d1c
217,933,750,688,730,100,000,000,000,000,000,000,000
12
added empty strign check, which would lead to NULL ptr deref/crash in exif XML display. fixes https://github.com/libexif/exif/issues/4
bool compute_window_func(THD *thd, List<Item_window_func>& window_functions, List<Cursor_manager>& cursor_managers, TABLE *tbl, SORT_INFO *filesort_result) { List_iterator_fast<Item_window_func> iter_win_funcs(window_f...
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
163,248,281,345,766,580,000,000,000,000,000,000,000
84
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
parse_enclosure(Node** np, OnigToken* tok, int term, UChar** src, UChar* end, ScanEnv* env) { int r, num; Node *target; OnigOptionType option; OnigCodePoint c; #ifdef USE_NAMED_GROUP int list_capture; #endif OnigEncoding enc = env->enc; UChar* p = *src; PFETCH_READY; *np = NULL; if (PEND) r...
0
[ "CWE-787" ]
oniguruma
ddbf55698b5f7ffdfa737b0b8e0079af1fdd7cb1
207,017,364,011,615,960,000,000,000,000,000,000,000
244
re-fix #60 by check val_type
static void hns_nic_rx_checksum(struct hns_nic_ring_data *ring_data, struct sk_buff *skb, u32 flag) { struct net_device *netdev = ring_data->napi.dev; u32 l3id; u32 l4id; /* check if RX checksum offload is enabled */ if (unlikely(!(netdev->features & NETIF_F_RXCSUM))) return; /* In hardware, we only suppo...
0
[ "CWE-416" ]
linux
27463ad99f738ed93c7c8b3e2e5bc8c4853a2ff2
13,454,033,961,970,375,000,000,000,000,000,000,000
64
net: hns: Fix a skb used after free bug skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK, which cause hns_nic_net_xmit to use a freed skb. BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940... [17659.112635] alloc_debug_processing+0x18c/0x1a0 [17659.117208] __slab_alloc+0x52c/0x...
UTI_DiffTimespecsToDouble(struct timespec *a, struct timespec *b) { return ((double)a->tv_sec - (double)b->tv_sec) + 1.0e-9 * (a->tv_nsec - b->tv_nsec); }
0
[ "CWE-59" ]
chrony
7a4c396bba8f92a3ee8018620983529152050c74
36,065,628,844,783,095,000,000,000,000,000,000,000
4
util: add functions for common file operations Add a function to open a file for reading, writing, or appending. In uppercase modes errors are handled as fatal, i.e. the caller doesn't need to check for NULL. To avoid string manipulations in the callers, the function accepts an optional directory and suffix. New files...
int perf_event_task_disable(void) { struct perf_event_context *ctx; struct perf_event *event; mutex_lock(&current->perf_event_mutex); list_for_each_entry(event, &current->perf_event_list, owner_entry) { ctx = perf_event_ctx_lock(event); perf_event_for_each_child(event, _perf_event_disable); perf_event_ctx_un...
0
[ "CWE-284", "CWE-264" ]
linux
f63a8daa5812afef4f06c962351687e1ff9ccb2b
331,575,783,901,910,420,000,000,000,000,000,000,000
15
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of ...
process_update_pdu(STREAM s) { uint16 update_type, count; in_uint16_le(s, update_type); ui_begin_update(); switch (update_type) { case RDP_UPDATE_ORDERS: logger(Protocol, Debug, "%s(), RDP_UPDATE_ORDERS", __func__); in_uint8s(s, 2); /* pad */ in_uint16_le(s, count); in_uint8s(s, 2); /* pad */ p...
0
[ "CWE-119", "CWE-125", "CWE-703", "CWE-787" ]
rdesktop
4dca546d04321a610c1835010b5dad85163b65e1
184,484,585,726,260,900,000,000,000,000,000,000,000
38
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix ...
xfrout_senddone(isc_task_t *task, isc_event_t *event) { isc_socketevent_t *sev = (isc_socketevent_t *)event; xfrout_ctx_t *xfr = (xfrout_ctx_t *)event->ev_arg; isc_result_t evresult = sev->result; UNUSED(task); INSIST(event->ev_type == ISC_SOCKEVENT_SENDDONE); isc_event_free(&event); xfr->sends--; INSIST(xfr...
0
[ "CWE-732" ]
bind9
34348d9ee4db15307c6c42db294419b4df569f76
160,698,297,071,096,370,000,000,000,000,000,000,000
28
denied axfr requests were not effective for writable DLZ zones (cherry picked from commit d9077cd0038e59726e1956de18b4b7872038a283)
int ssl3_write_pending(SSL *s, int type, const unsigned char *buf, unsigned int len) { int i; SSL3_BUFFER *wb=&(s->s3->wbuf); /* XXXX */ if ((s->s3->wpend_tot > (int)len) || ((s->s3->wpend_buf != buf) && !(s->mode & SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER)) || (s->s3->wpend_type != type)) { SSLerr(SSL_F_SS...
1
[]
openssl
8671b898609777c95aedf33743419a523874e6e8
287,417,867,062,840,000,000,000,000,000,000,000,000
44
Memory saving patch.
void Item_copy_decimal::copy() { my_decimal *nr= item->val_decimal(&cached_value); if (nr && nr != &cached_value) my_decimal2decimal (nr, &cached_value); null_value= item->null_value; }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
275,047,479,146,482,000,000,000,000,000,000,000,000
7
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'...
static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb) { if (skb->protocol == htons(ETH_P_IP)) return tcp_v4_conn_request(sk, skb); if (!ipv6_unicast_destination(skb)) goto drop; return tcp_conn_request(&tcp6_request_sock_ops, &tcp_request_sock_ipv6_ops, sk, skb); drop: NET_INC_STATS_BH(soc...
0
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
82,457,008,163,599,750,000,000,000,000,000,000,000
15
ipv6: add complete rcu protection around np->opt This patch addresses multiple problems : UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions while socket is not locked : Other threads can change np->opt concurrently. Dmitry posted a syzkaller (http://github.com/google/syzkaller) program desmonstrating use-a...
int __init ipv6_exthdrs_init(void) { int ret; ret = inet6_add_protocol(&rthdr_protocol, IPPROTO_ROUTING); if (ret) goto out; ret = inet6_add_protocol(&destopt_protocol, IPPROTO_DSTOPTS); if (ret) goto out_rthdr; ret = inet6_add_protocol(&nodata_protocol, IPPROTO_NONE); if (ret) goto out_destopt; out: ...
0
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
176,299,515,962,278,430,000,000,000,000,000,000,000
24
ipv6: add complete rcu protection around np->opt This patch addresses multiple problems : UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions while socket is not locked : Other threads can change np->opt concurrently. Dmitry posted a syzkaller (http://github.com/google/syzkaller) program desmonstrating use-a...
TEST_F(QueryPlannerTest, MergeSort) { addIndex(BSON("a" << 1 << "c" << 1)); addIndex(BSON("b" << 1 << "c" << 1)); runQuerySortProj(fromjson("{$or: [{a:1}, {b:1}]}"), fromjson("{c:1}"), BSONObj()); ASSERT_EQUALS(getNumSolutions(), 2U); assertSolutionExists( "{sort: {pattern: {c: 1}, limit: 0...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
304,608,409,789,006,150,000,000,000,000,000,000,000
13
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
PHP_FUNCTION(sqrt) { double num; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &num) == FAILURE) { return; } RETURN_DOUBLE(sqrt(num)); }
0
[]
php-src
0d822f6df946764f3f0348b82efae2e1eaa83aa0
40,125,822,576,762,690,000,000,000,000,000,000,000
9
Bug #71201 round() segfault on 64-bit builds
_Pickler_ClearBuffer(PicklerObject *self) { Py_XSETREF(self->output_buffer, PyBytes_FromStringAndSize(NULL, self->max_output_len)); if (self->output_buffer == NULL) return -1; self->output_len = 0; self->frame_start = -1; return 0; }
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
91,244,220,457,265,330,000,000,000,000,000,000,000
10
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
on_timer (GCancellable *cancel) { g_cancellable_cancel (cancel); return G_SOURCE_REMOVE; }
0
[ "CWE-754" ]
glib
d553d92d6e9f53cbe5a34166fcb919ba652c6a8e
271,146,775,171,350,730,000,000,000,000,000,000,000
5
gsocketclient: Fix criticals This ensures the parent GTask is kept alive as long as an enumeration is running and trying to connect. Closes #1646 Closes #1649
int unit_merge_by_name(Unit *u, const char *name) { Unit *other; int r; _cleanup_free_ char *s = NULL; assert(u); assert(name); if (unit_name_is_template(name)) { if (!u->instance) return -EINVAL; s = unit_name_re...
0
[]
systemd
5ba6985b6c8ef85a8bcfeb1b65239c863436e75b
34,622,614,286,667,814,000,000,000,000,000,000,000
27
core: allow PIDs to be watched by two units at the same time In some cases it is interesting to map a PID to two units at the same time. For example, when a user logs in via a getty, which is reexeced to /sbin/login that binary will be explicitly referenced as main pid of the getty service, as well as implicitly refer...
BOOL rdp_read_security_header(wStream* s, UINT16* flags, UINT16* length) { /* Basic Security Header */ if ((Stream_GetRemainingLength(s) < 4) || (length && (*length < 4))) return FALSE; Stream_Read_UINT16(s, *flags); /* flags */ Stream_Seek(s, 2); /* flagsHi (unused) */ if (length) *length -= 4; ...
0
[ "CWE-125" ]
FreeRDP
9301bfe730c66180263248b74353daa99f5a969b
197,997,154,100,921,600,000,000,000,000,000,000,000
14
Fixed #6007: Boundary checks in rdp_read_flow_control_pdu
int tipc_link_max_win(struct tipc_link *l) { return l->max_win; }
0
[ "CWE-787" ]
linux
9aa422ad326634b76309e8ff342c246800621216
266,563,766,083,917,480,000,000,000,000,000,000,000
4
tipc: improve size validations for received domain records The function tipc_mon_rcv() allows a node to receive and process domain_record structs from peer nodes to track their views of the network topology. This patch verifies that the number of members in a received domain record does not exceed the limit defined b...
TEST_F(HttpConnectionManagerImplTest, RouteOverride) { setup(false, ""); EXPECT_CALL(*codec_, dispatch(_)).WillOnce(Invoke([&](Buffer::Instance&) -> Http::Status { decoder_ = &conn_manager_->newStream(response_encoder_); RequestHeaderMapPtr headers{ new TestRequestHeaderMapImpl{{":authority", "host...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
177,379,045,041,100,040,000,000,000,000,000,000,000
199
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
int acpi_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity) { return __acpi_register_gsi(dev, gsi, trigger, polarity); }
0
[ "CWE-120" ]
linux
dad5ab0db8deac535d03e3fe3d8f2892173fa6a4
14,181,415,660,574,220,000,000,000,000,000,000,000
4
x86/acpi: Prevent out of bound access caused by broken ACPI tables The bus_irq argument of mp_override_legacy_irq() is used as the index into the isa_irq_to_gsi[] array. The bus_irq argument originates from ACPI_MADT_TYPE_IO_APIC and ACPI_MADT_TYPE_INTERRUPT items in the ACPI tables, but is nowhere sanity checked. Th...
MagickExport Image *HoughLineImage(const Image *image,const size_t width, const size_t height,const size_t threshold,ExceptionInfo *exception) { #define HoughLineImageTag "HoughLine/Image" CacheView *image_view; char message[MaxTextExtent], path[MaxTextExtent]; const char *artifact; doubl...
0
[ "CWE-369" ]
ImageMagick6
b522d2d857d2f75b659936b59b0da9df1682c256
195,443,476,675,279,500,000,000,000,000,000,000,000
286
https://github.com/ImageMagick/ImageMagick/issues/1552
CImg<T>& draw_image(const int x0, const int y0, const int z0, const int c0, const CImg<t>& sprite, const float opacity=1) { if (is_empty() || !sprite) return *this; if (is_overlapped(sprite)) return draw_image(x0,y0,z0,c0,+sprite,opacity); if (x0==0 && y0==0 && z0==0 && c0=...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
81,035,286,702,658,840,000,000,000,000,000,000,000
28
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void spl_ptr_llist_pop(spl_ptr_llist *llist, zval *ret) /* {{{ */ { spl_ptr_llist_element *tail = llist->tail; if (tail == NULL) { ZVAL_UNDEF(ret); return; } if (tail->prev) { tail->prev->next = NULL; } else { llist->head = NULL; } llist->tail = tail->prev; llist->count--; ZVAL_COPY(ret, &...
0
[ "CWE-415" ]
php-src
28a6ed9f9a36b9c517e4a8a429baf4dd382fc5d5
36,525,181,553,786,556,000,000,000,000,000,000,000
27
Fix bug #71735: Double-free in SplDoublyLinkedList::offsetSet
static char *append_path(const char *path, char *pos, const char *name) { int namelen; namelen = strlen(name); if (((pos - path) + namelen + 2) >= PATH_MAX) return NULL; memcpy(pos, name, namelen); pos[namelen] = '/'; pos[namelen + 1] = '\0'; pos += namelen + 1; return pos; }
0
[ "CWE-20", "CWE-399" ]
linux
93362fa47fe98b62e4a34ab408c4a418432e7939
125,303,744,308,907,030,000,000,000,000,000,000,000
12
sysctl: Drop reference added by grab_header in proc_sys_readdir Fixes CVE-2016-9191, proc_sys_readdir doesn't drop reference added by grab_header when return from !dir_emit_dots path. It can cause any path called unregister_sysctl_table will wait forever. The calltrace of CVE-2016-9191: [ 5535.960522] Call Trace: [ ...
R_API char *r_bin_java_get_utf8_from_bin_cp_list(RBinJavaObj *bin, ut64 idx) { /* Search through the Constant Pool list for the given CP Index. If the idx not found by directly going to the list index, the list will be walked and then the IDX will be checked. rvalue: new char* for caller to free. */ if (bin == N...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
216,739,160,339,670,920,000,000,000,000,000,000,000
12
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
static void __meminit init_reserved_page(unsigned long pfn) { pg_data_t *pgdat; int nid, zid; if (!early_page_uninitialised(pfn)) return; nid = early_pfn_to_nid(pfn); pgdat = NODE_DATA(nid); for (zid = 0; zid < MAX_NR_ZONES; zid++) { struct zone *zone = &pgdat->node_zones[zid]; if (pfn >= zone->zone_sta...
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
281,482,039,480,515,300,000,000,000,000,000,000,000
19
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
TEST_F(QueryPlannerTest, ContainedOrOfAndCollapseIndenticalScans) { addIndex(BSON("a" << 1 << "b" << 1)); runQuery(fromjson("{c: 1, $or: [{a:1, b:2}, {a:1, b:2}]}")); assertNumSolutions(2U); assertSolutionExists("{cscan: {dir: 1}}"); assertSolutionExists( "{fetch: {filter: {c: 1}, node: {ix...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
314,626,882,257,712,040,000,000,000,000,000,000,000
11
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
float operator()(const float x, const float y, const float z, const unsigned int c) const { #define _cimg_vecalign3d(i,j,k) if (I(i,j,k,0)*I(0,0,0,0) + I(i,j,k,1)*I(0,0,0,1) + I(i,j,k,2)*I(0,0,0,2)<0) { \ I(i,j,k,0) = -I(i,j,k,0); I(i,j,k,1) = -I(i,j,k,1); I(i,j,k,2) = -I(i,j,k,2); } int xi = ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
333,368,097,994,575,880,000,000,000,000,000,000,000
42
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void hog_remove(struct btd_service *service) { struct hog_device *dev = btd_service_get_user_data(service); struct btd_device *device = btd_service_get_device(service); const char *path = device_get_path(device); DBG("path %s", path); hog_device_free(dev); }
0
[]
bluez
8cdbd3b09f29da29374e2f83369df24228da0ad1
194,294,583,884,277,900,000,000,000,000,000,000,000
10
HOGP must only accept data from bonded devices. HOGP 1.0 Section 6.1 establishes that the HOGP must require bonding. Reference: https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00352.htm
static uint64_t pauth_strip(CPUARMState *env, uint64_t ptr, bool data) { ARMMMUIdx mmu_idx = arm_stage1_mmu_idx(env); ARMVAParameters param = aa64_va_parameters(env, ptr, mmu_idx, data); return pauth_original_ptr(ptr, param); }
0
[]
qemu
de0b1bae6461f67243282555475f88b2384a1eb9
25,092,397,950,348,240,000,000,000,000,000,000,000
7
target/arm: Fix PAuth sbox functions In the PAC computation, sbox was applied over wrong bits. As this is a 4-bit sbox, bit index should be incremented by 4 instead of 16. Test vector from QARMA paper (https://eprint.iacr.org/2016/444.pdf) was used to verify one computation of the pauth_computepac() function which us...
PyString_Fini(void) { int i; for (i = 0; i < UCHAR_MAX + 1; i++) Py_CLEAR(characters[i]); Py_CLEAR(nullstring); }
0
[ "CWE-190" ]
cpython
c3c9db89273fabc62ea1b48389d9a3000c1c03ae
209,652,539,934,813,700,000,000,000,000,000,000,000
7
[2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174)
bool vma_migratable(struct vm_area_struct *vma) { if (vma->vm_flags & (VM_IO | VM_PFNMAP)) return false; /* * DAX device mappings require predictable access latency, so avoid * incurring periodic faults. */ if (vma_is_dax(vma)) return false; if (is_vm_hugetlb_page(vma) && !hugepage_migration_supported...
0
[ "CWE-787" ]
linux
aa9f7d5172fac9bf1f09e678c35e287a40a7b7dd
59,966,299,901,369,800,000,000,000,000,000,000,000
27
mm: mempolicy: require at least one nodeid for MPOL_PREFERRED Using an empty (malformed) nodelist that is not caught during mount option parsing leads to a stack-out-of-bounds access. The option string that was used was: "mpol=prefer:,". However, MPOL_PREFERRED requires a single node number, which is not being provi...
struct mg_str mg_url_pass(const char *url) { struct url u = urlparse(url); struct mg_str s = mg_str_n("", 0UL); if (u.pass && u.host) { size_t n = u.host - u.pass - 1; s = mg_str_n(url + u.pass, n); } return s; }
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
67,580,591,451,638,860,000,000,000,000,000,000,000
9
Protect against the directory traversal in mg_upload()
GF_Err clap_box_read(GF_Box *s, GF_BitStream *bs) { GF_CleanApertureBox *ptr = (GF_CleanApertureBox*)s; ISOM_DECREASE_SIZE(ptr, 32); ptr->cleanApertureWidthN = gf_bs_read_u32(bs); ptr->cleanApertureWidthD = gf_bs_read_u32(bs); ptr->cleanApertureHeightN = gf_bs_read_u32(bs); ptr->cleanApertureHeightD = gf_bs_read_...
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
118,443,285,448,614,630,000,000,000,000,000,000,000
14
fixed #2255
int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm, unsigned long address, unsigned int fault_flags, bool *unlocked) { struct vm_area_struct *vma; int ret, major = 0; if (unlocked) fault_flags |= FAULT_FLAG_ALLOW_RETRY; retry: vma = find_extend_vma(mm, address); if (!vma || addres...
0
[ "CWE-362" ]
linux
19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619
202,812,260,998,651,040,000,000,000,000,000,000,000
48
mm: remove gup_flags FOLL_WRITE games from __get_user_pages() This is an ancient bug that was actually attempted to be fixed once (badly) by me eleven years ago in commit 4ceb5db9757a ("Fix get_user_pages() race for write access") but that was then undone due to problems on s390 by commit f33ea7f404e5 ("fix get_user_p...
cd_device_db_load (CdDeviceDb *ddb, const gchar *filename, GError **error) { CdDeviceDbPrivate *priv = GET_PRIVATE (ddb); const gchar *statement; gchar *error_msg = NULL; gint rc; g_autofree gchar *path = NULL; g_return_val_if_fail (CD_IS_DEVICE_DB (ddb), FALSE); g_return_val_if_fail (priv->db == N...
0
[ "CWE-200" ]
colord
adf41f36cf7214d7d6fa8d528b74eba47c377405
216,030,912,862,245,680,000,000,000,000,000,000,000
60
Fix a small memory leak in sqlite3_exec() Fixes https://github.com/hughsie/colord/issues/110
static inline void compress_rounds(SSL& ssl, int rounds, const byte* dummy) { if (rounds) { Digest* digest = NULL; MACAlgorithm ma = ssl.getSecurity().get_parms().mac_algorithm_; if (ma == sha) digest = NEW_YS SHA; else if (ma == md5) digest = NEW_YS MD5; ...
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
268,715,351,242,632,140,000,000,000,000,000,000,000
21
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
static void print_verifier_state(struct bpf_verifier_env *env, const struct bpf_func_state *state, bool print_all) { const struct bpf_reg_state *reg; enum bpf_reg_type t; int i; if (state->frameno) verbose(env, " frame%d:", state->frameno); for (i = 0; i < MAX_BPF_REG; i++) { reg = &state->regs[i]; ...
0
[ "CWE-787" ]
linux
64620e0a1e712a778095bd35cbb277dc2259281f
11,983,941,121,608,409,000,000,000,000,000,000,000
133
bpf: Fix out of bounds access for ringbuf helpers Both bpf_ringbuf_submit() and bpf_ringbuf_discard() have ARG_PTR_TO_ALLOC_MEM in their bpf_func_proto definition as their first argument. They both expect the result from a prior bpf_ringbuf_reserve() call which has a return type of RET_PTR_TO_ALLOC_MEM_OR_NULL. Meani...
_outLimit(StringInfo str, const Limit *node) { WRITE_NODE_TYPE("LIMIT"); _outPlanInfo(str, (const Plan *) node); WRITE_NODE_FIELD(limitOffset); WRITE_NODE_FIELD(limitCount); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
105,991,238,049,774,100,000,000,000,000,000,000,000
9
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...
ModuleExport void UnregisterPESImage(void) { (void) UnregisterMagickInfo("PES"); }
0
[ "CWE-835" ]
ImageMagick
787ee25e9fb0e4e0509121342371d925fe5044f8
78,355,823,093,994,230,000,000,000,000,000,000,000
4
https://github.com/ImageMagick/ImageMagick/issues/537
parse_mime(struct magic_set *ms, struct magic_entry *me, const char *line) { struct magic *m = &me->mp[0]; return parse_extra(ms, me, line, offsetof(struct magic, mimetype), sizeof(m->mimetype), "MIME", "+-/.", 1); }
0
[ "CWE-399" ]
file
90018fe22ff8b74a22fcd142225b0a00f3f12677
239,553,819,488,132,370,000,000,000,000,000,000,000
7
bump recursion to 15, and allow it to be set from the command line.
int processInlineBuffer(client *c) { char *newline; int argc, j; sds *argv, aux; size_t querylen; /* Search for end of line */ newline = strchr(c->querybuf,'\n'); /* Nothing to do without a \r\n */ if (newline == NULL) { if (sdslen(c->querybuf) > PROTO_INLINE_MAX_SIZE) { ...
0
[ "CWE-254" ]
redis
874804da0c014a7d704b3d285aa500098a931f50
207,414,661,822,780,570,000,000,000,000,000,000,000
60
Security: Cross Protocol Scripting protection. This is an attempt at mitigating problems due to cross protocol scripting, an attack targeting services using line oriented protocols like Redis that can accept HTTP requests as valid protocol, by discarding the invalid parts and accepting the payloads sent, for example, ...
//! Convert pixel values from HSL to RGB color spaces \newinstance. CImg<Tuchar> get_HSLtoRGB() const { return CImg<Tuchar>(*this,false).HSLtoRGB();
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
139,010,023,435,759,600,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
Status processRoles(OperationContext* opCtx, AuthorizationManager* authzManager, StringData rolesCollName, StringData db, bool drop) { // When the "drop" argument has been provided, we use this set to store the r...
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
170,317,219,236,515,640,000,000,000,000,000,000,000
71
SERVER-38984 Validate unique User ID on UserCache hit
static void rtl8139_set_next_tctr_time(RTL8139State *s) { const uint64_t ns_per_period = (uint64_t)PCI_PERIOD << 32; DPRINTF("entered rtl8139_set_next_tctr_time\n"); /* This function is called at least once per period, so it is a good * place to update the timer base. * * After one iteratio...
0
[ "CWE-835" ]
qemu
5311fb805a4403bba024e83886fa0e7572265de4
138,350,150,529,804,100,000,000,000,000,000,000,000
27
rtl8139: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Buglink: https://bugs.launchpad.net/qemu/+bug/1910826...
void set_wild_chars (my_bool set) { static char old_many= 0, old_one, old_prefix; if (set) { if (wild_many == '*') return; // No need old_many= wild_many; old_one= wild_one; old_prefix= wild_prefix; wild_many= '*'; wild_one= '?'; wild_prefix= 0; } else { if (! old_many) re...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
284,211,902,085,580,530,000,000,000,000,000,000,000
22
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...
SPICE_GNUC_VISIBLE int spice_server_set_noauth(SpiceServer *s) { memset(s->config->taTicket.password, 0, sizeof(s->config->taTicket.password)); s->config->ticketing_enabled = FALSE; return 0; }
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
126,901,525,095,874,500,000,000,000,000,000,000,000
6
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
__bsg_read(char __user *buf, size_t count, struct bsg_device *bd, const struct iovec *iov, ssize_t *bytes_read) { struct bsg_command *bc; int nr_commands, ret; if (count % sizeof(struct sg_io_v4)) return -EINVAL; ret = 0; nr_commands = count / sizeof(struct sg_io_v4); while (nr_commands) { bc = bsg_get_...
0
[ "CWE-399" ]
linux-2.6
f2f1fa78a155524b849edf359e42a3001ea652c0
8,206,027,731,592,719,000,000,000,000,000,000,000
41
Enforce a minimum SG_IO timeout There's no point in having too short SG_IO timeouts, since if the command does end up timing out, we'll end up through the reset sequence that is several seconds long in order to abort the command that timed out. As a result, shorter timeouts than a few seconds simply do not make sense...
static bool add_mmio_extended_flag_cb(void *user, const ut64 addr, const void *v) { const char *name = v; RzFlag *flags = (RzFlag *)user; rz_flag_space_push(flags, RZ_FLAGS_FS_MMIO_REGISTERS_EXTENDED); rz_flag_set(flags, name, addr, 1); rz_flag_space_pop(flags); return true; }
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
163,292,077,616,135,180,000,000,000,000,000,000,000
8
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
writeSelections(TIFF *in, TIFF **out, struct crop_mask *crop, struct image_data *image, struct dump_opts *dump, struct buffinfo seg_buffs[], char *mp, char *filename, unsigned int *page, unsigned int total_pages) { int i, page_count; int autoindex = 0; unsigned ...
0
[ "CWE-125" ]
libtiff
21d39de1002a5e69caa0574b2cc05d795d6fbfad
13,880,521,363,590,170,000,000,000,000,000,000,000
105
* tools/tiffcrop.c: fix multiple uint32 overflows in writeBufferToSeparateStrips(), writeBufferToContigTiles() and writeBufferToSeparateTiles() that could cause heap buffer overflows. Reported by Henri Salo from Nixu Corporation. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592
void sftp_client_message_free(sftp_client_message msg) { if (msg == NULL) { return; } SAFE_FREE(msg->filename); SAFE_FREE(msg->submessage); SSH_STRING_FREE(msg->data); SSH_STRING_FREE(msg->handle); sftp_attributes_free(msg->attr); SSH_BUFFER_FREE(msg->complete_message); SAFE_FREE(msg->str_data); ...
0
[ "CWE-476" ]
libssh-mirror
533d881b0f4b24c72b35ecc97fa35d295d063e53
289,105,626,360,009,280,000,000,000,000,000,000,000
15
sftpserver: Add missing NULL check for ssh_buffer_new() Thanks to Ramin Farajpour Cami for spotting this. Fixes T232 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
nv_tabmenu(cmdarg_T *cap) { if (cap->oap->op_type != OP_NOP) clearopbeep(cap->oap); // Even if an operator was pending, we still want to jump tabs. handle_tabmenu(); }
0
[ "CWE-416" ]
vim
35a9a00afcb20897d462a766793ff45534810dc3
250,152,015,553,595,570,000,000,000,000,000,000,000
8
patch 8.2.3428: using freed memory when replacing Problem: Using freed memory when replacing. (Dhiraj Mishra) Solution: Get the line pointer after calling ins_copychar().
static int find_stream_bounds(const char *start, off_t bytesleft, off_t bytesleft2, off_t *stream, off_t *endstream) { const char *q2, *q; if ((q2 = cli_memstr(start, bytesleft, "stream", 6))) { q2 += 6; bytesleft -= q2 - start; if (bytesleft < 0) return 0; if (bytesleft >= 2 && q2[0] == '\xd' && q2[1]...
0
[ "CWE-119", "CWE-189", "CWE-79" ]
clamav-devel
24ff855c82d3f5c62bc5788a5776cefbffce2971
84,273,010,984,071,130,000,000,000,000,000,000,000
27
pdf: bb #7053
static RList *oneshotall_buffer(RBin *bin, RBuffer *b) { RBinXtrData *meta = get_the_meta (bin, b); if (!meta) { return NULL; } RList *list = r_list_newf (free); if (!list) { free (meta); return NULL; } r_list_append (list, meta); return list; }
0
[ "CWE-125" ]
radare2
fc285cecb8469f0262db0170bf6dd7c01d9b8ed5
99,634,597,680,570,200,000,000,000,000,000,000,000
13
Fix #20354
static void __perf_event_output_stop(struct perf_event *event, void *data) { struct perf_event *parent = event->parent; struct remote_output *ro = data; struct perf_buffer *rb = ro->rb; struct stop_event_data sd = { .event = event, }; if (!has_aux(event)) return; if (!parent) parent = event; /* * In ...
0
[ "CWE-401" ]
tip
7bdb157cdebbf95a1cd94ed2e01b338714075d00
149,982,037,819,278,600,000,000,000,000,000,000,000
28
perf/core: Fix a memory leak in perf_event_parse_addr_filter() As shown through runtime testing, the "filename" allocation is not always freed in perf_event_parse_addr_filter(). There are three possible ways that this could happen: - It could be allocated twice on subsequent iterations through the loop, - or leake...
PHPAPI php_stream *_php_stream_fopen_from_fd(int fd, const char *mode, const char *persistent_id STREAMS_DC) { php_stream *stream = php_stream_fopen_from_fd_int_rel(fd, mode, persistent_id); if (stream) { php_stdio_stream_data *self = (php_stdio_stream_data*)stream->abstract; #ifdef S_ISFIFO /* detect if this i...
0
[ "CWE-264" ]
php-src
e3133e4db70476fb7adfdedb738483e2255ce0e1
42,477,166,810,101,707,000,000,000,000,000,000,000
38
Fix bug #77630 - safer rename() procedure In order to rename safer, we do the following: - set umask to 077 (unfortunately, not TS, so excluding ZTS) - chown() first, to set proper group before allowing group access - chmod() after, even if chown() fails
void ath_tx_tasklet(struct ath_softc *sc) { struct ath_hw *ah = sc->sc_ah; u32 qcumask = ((1 << ATH9K_NUM_TX_QUEUES) - 1) & ah->intr_txqs; int i; for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) { if (ATH_TXQ_SETUP(sc, i) && (qcumask & (1 << i))) ath_tx_processq(sc, &sc->tx.txq[i]); } }
0
[ "CWE-362", "CWE-241" ]
linux
21f8aaee0c62708654988ce092838aa7df4d25d8
15,717,414,484,101,400,000,000,000,000,000,000,000
11
ath9k: protect tid->sched check We check tid->sched without a lock taken on ath_tx_aggr_sleep(). That is race condition which can result of doing list_del(&tid->list) twice (second time with poisoned list node) and cause crash like shown below: [424271.637220] BUG: unable to handle kernel paging request at 00100104 [...
v9fs_vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) { int retval; char name[1 + U32_MAX_DIGITS + 2]; /* sign + number + \n + \0 */ struct p9_fid *oldfid; p9_debug(P9_DEBUG_VFS, " %lu,%pd,%pd\n", dir->i_ino, dentry, old_dentry); oldfid = v9fs_fid_clone(old_dentry); if (IS...
0
[ "CWE-835" ]
linux
5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f
189,626,841,182,623,860,000,000,000,000,000,000,000
23
9p: use inode->i_lock to protect i_size_write() under 32-bit Use inode->i_lock to protect i_size_write(), else i_size_read() in generic_fillattr() may loop infinitely in read_seqcount_begin() when multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl() simultaneously under 32-bit SMP environment, and a...
int ext4_orphan_del(handle_t *handle, struct inode *inode) { struct list_head *prev; struct ext4_inode_info *ei = EXT4_I(inode); struct ext4_sb_info *sbi; __u32 ino_next; struct ext4_iloc iloc; int err = 0; if (!EXT4_SB(inode->i_sb)->s_journal) return 0; mutex_lock(&EXT4_SB(inode->i_sb)->s_orphan_lock); if...
1
[ "CWE-399" ]
linux
0e9a9a1ad619e7e987815d20262d36a2f95717ca
65,859,544,271,351,670,000,000,000,000,000,000,000
71
ext4: avoid hang when mounting non-journal filesystems with orphan list When trying to mount a file system which does not contain a journal, but which does have a orphan list containing an inode which needs to be truncated, the mount call with hang forever in ext4_orphan_cleanup() because ext4_orphan_del() will return...
init_remote_listener(int port, gboolean encrypted) { int rc; int *ssock = NULL; struct sockaddr_in saddr; int optval; static struct mainloop_fd_callbacks remote_listen_fd_callbacks = { .dispatch = cib_remote_listen, .destroy = remote_connection_destroy, }; ...
0
[ "CWE-399" ]
pacemaker
564f7cc2a51dcd2f28ab12a13394f31be5aa3c93
193,701,525,507,265,220,000,000,000,000,000,000,000
76
High: core: Internal tls api improvements for reuse with future LRMD tls backend.
void unpin_process(ProcessHandle process) { close(process->fd); free(process); }
0
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
335,749,138,406,420,930,000,000,000,000,000,000,000
4
fixing CVE-2022-31214
static int datablob_hmac_verify(struct encrypted_key_payload *epayload, const u8 *format, const u8 *master_key, size_t master_keylen) { u8 derived_key[HASH_SIZE]; u8 digest[HASH_SIZE]; int ret; char *p; unsigned short len; ret = get_derived_key(derived_key, AUTH_KEY, master_key, master_keylen); if (ret ...
0
[ "CWE-284", "CWE-264", "CWE-269" ]
linux
096fe9eaea40a17e125569f9e657e34cdb6d73bd
89,621,419,221,182,810,000,000,000,000,000,000,000
36
KEYS: Fix handling of stored error in a negatively instantiated user key If a user key gets negatively instantiated, an error code is cached in the payload area. A negatively instantiated key may be then be positively instantiated by updating it with valid data. However, the ->update key type method must be aware th...
static void io_req_task_queue_fail(struct io_kiocb *req, int ret) { req->cqe.res = ret; req->io_task_work.func = io_req_task_cancel; io_req_task_work_add(req); }
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
93,126,073,989,956,270,000,000,000,000,000,000,000
6
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
Status insertPrivilegeDocument(OperationContext* opCtx, const BSONObj& userObj) { Status status = insertAuthzDocument(opCtx, AuthorizationManager::usersCollectionNamespace, userObj); if (status.isOK()) { return status; } if (status.code() == ErrorCodes::DuplicateKey) { std::strin...
0
[ "CWE-613" ]
mongo
6dfb92b1299de04677d0bd2230e89a52eb01003c
194,337,849,017,929,450,000,000,000,000,000,000,000
17
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
TEST_F(ExtractorTest, TestDoubleCustomHeaderToken) { auto headers = TestRequestHeaderMapImpl{{"token-header", "jwt_token"}, {"token-header", "foo"}}; auto tokens = extractor_->extract(headers); EXPECT_EQ(tokens.size(), 1); EXPECT_EQ(tokens[0]->token(), "jwt_token,foo"); }
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
114,883,091,832,336,600,000,000,000,000,000,000,000
6
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
InputBlockKind Scanner::echo(Output &out, std::string &block_name) { const opt_t *opts = out.block().opts; code_alc_t &alc = out.allocator; const char *x, *y; if (is_eof()) return INPUT_END; next: tok = cur; loop: location = cur_loc(); ptr = cur; #line 55 "src/parse/lex.cc" { unsigned ch...
1
[ "CWE-787" ]
re2c
039c18949190c5de5397eba504d2c75dad2ea9ca
104,863,913,490,048,680,000,000,000,000,000,000,000
1,096
Emit an error when repetition lower bound exceeds upper bound. Historically this was allowed and re2c swapped the bounds. However, it most likely indicates an error in user code and there is only a single occurrence in the tests (and the test in an artificial one), so although the change is backwards incompatible ther...
static void svm_set_dr6(struct vcpu_svm *svm, unsigned long value) { struct vmcb *vmcb = svm->vmcb; if (svm->vcpu.arch.guest_state_protected) return; if (unlikely(value != vmcb->save.dr6)) { vmcb->save.dr6 = value; vmcb_mark_dirty(vmcb, VMCB_DR); } }
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
52,631,169,643,482,950,000,000,000,000,000,000,000
12
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
bool ContentSettingsObserver::OnMessageReceived(const IPC::Message& message) { // Don't swallow LoadBlockedPlugins messages, as they're sent to every // blocked plugin. IPC_BEGIN_MESSAGE_MAP(ContentSettingsObserver, message) IPC_MESSAGE_HANDLER(ChromeViewMsg_LoadBlockedPlugins, OnLoadBlockedPlugins) IPC_END...
0
[ "CWE-20", "CWE-200" ]
muon
c18663aa171c6cdf03da3e8c70df8663645b97c4
4,264,213,716,897,026,000,000,000,000,000,000,000
9
Issue: 15232 AllowScript should use atom::ContentSettingsManager like other Allow* methods in the observer
static __always_inline void set_root(struct nameidata *nd) { if (!nd->root.mnt) { struct fs_struct *fs = current->fs; read_lock(&fs->lock); nd->root = fs->root; path_get(&nd->root); read_unlock(&fs->lock); } }
0
[ "CWE-20", "CWE-362", "CWE-416" ]
linux
86acdca1b63e6890540fa19495cfc708beff3d8b
15,494,060,761,451,345,000,000,000,000,000,000,000
10
fix autofs/afs/etc. magic mountpoint breakage We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT) if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type is bogus here; we want LAST_BIND for everything of that kind and we get LAST_NORM left over from finding parent directory. So make...
static void nf_tables_rule_notify(const struct nft_ctx *ctx, const struct nft_rule *rule, int event) { struct nftables_pernet *nft_net = nft_pernet(ctx->net); struct sk_buff *skb; int err; if (!ctx->report && !nfnetlink_has_listeners(ctx->net, NFNLGRP_NFTABLES)) return; skb = nlmsg_new(NLMSG_GOODSIZ...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
280,782,292,227,456,840,000,000,000,000,000,000,000
28
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
SPL_METHOD(SplObjectStorage, getHash) { zval *obj; if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) { return; } RETURN_NEW_STR(php_spl_object_hash(obj)); } /* }}} */
0
[ "CWE-119", "CWE-787" ]
php-src
61cdd1255d5b9c8453be71aacbbf682796ac77d4
227,725,645,618,272,900,000,000,000,000,000,000,000
11
Fix bug #73257 and bug #73258 - SplObjectStorage unserialize allows use of non-object as key
s32 i2c_smbus_read_byte_data(const struct i2c_client *client, u8 command) { union i2c_smbus_data data; int status; status = i2c_smbus_xfer(client->adapter, client->addr, client->flags, I2C_SMBUS_READ, command, I2C_SMBUS_BYTE_DATA, &data); return (status < 0) ? status : data.byte; }
0
[ "CWE-787" ]
linux
89c6efa61f5709327ecfa24bff18e57a4e80c7fa
258,896,879,553,592,340,000,000,000,000,000,000,000
10
i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA On a I2C_SMBUS_I2C_BLOCK_DATA read request, if data->block[0] is greater than I2C_SMBUS_BLOCK_MAX + 1, the underlying I2C driver writes data out of the msgbuf1 array boundary. It is possible from a user application to run into that issue by calling the ...
assert_next_is_bind (FlatpakBwrap *bwrap, gsize i, const char *how, const char *path, const char *dest) { g_assert_cmpuint (i, <, bwrap->argv->len); g_assert_cmpstr (bwrap->argv->pdata[i++], ==, how); g_assert_cmpuint (i, <, bwrap...
0
[ "CWE-74" ]
flatpak
4108e022452303093d8b90c838695a0476cb09c7
123,233,484,627,772,940,000,000,000,000,000,000,000
14
context: Add --unset-env option and a corresponding override This follows up from GHSA-4ppf-fxf6-vxg2 to fix missing functionality that I noticed while resolving that vulnerability, but is not required for fixing the vulnerability. Signed-off-by: Simon McVittie <smcv@collabora.com>
sprint_realloc_object_identifier(u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const netsnmp_variable_list * var, const struct enum_list *enums, const char *hint, c...
0
[ "CWE-59", "CWE-61" ]
net-snmp
4fd9a450444a434a993bc72f7c3486ccce41f602
10,963,486,376,357,202,000,000,000,000,000,000,000
45
CHANGES: snmpd: Stop reading and writing the mib_indexes/* files Caching directory contents is something the operating system should do and is not something Net-SNMP should do. Instead of storing a copy of the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a MIB directory.
static pci_ers_result_t tg3_io_slot_reset(struct pci_dev *pdev) { struct net_device *netdev = pci_get_drvdata(pdev); struct tg3 *tp = netdev_priv(netdev); pci_ers_result_t rc = PCI_ERS_RESULT_DISCONNECT; int err; rtnl_lock(); if (pci_enable_device(pdev)) { netdev_err(netdev, "Cannot re-enable PCI device after...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
52,941,416,041,198,190,000,000,000,000,000,000,000
34
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp) { register struct mbuf *m = dtom(slirp, ip); register struct ipasfrag *q; int hlen = ip->ip_hl << 2; int i, next; DEBUG_CALL("ip_reass"); DEBUG_ARG("ip = %p", ip); DEBUG_ARG("fp = %p", fp); DEBUG_ARG("m = %p", m); ...
0
[ "CWE-416" ]
libslirp
c59279437eda91841b9d26079c70b8a540d41204
313,612,611,393,177,500,000,000,000,000,000,000,000
152
ip_reass: Fix use after free Using ip_deq after m_free might read pointers from an allocation reuse. This would be difficult to exploit, but that is still related with CVE-2019-14378 which generates fragmented IP packets that would trigger this issue and at least produce a DoS. Signed-off-by: Samuel Thibault <samuel...
static int atalk_create(struct net *net, struct socket *sock, int protocol) { struct sock *sk; int rc = -ESOCKTNOSUPPORT; if (net != &init_net) return -EAFNOSUPPORT; /* * We permit SOCK_DGRAM and RAW is an extension. It is trivial to do * and gives you the full ELAP frame. Should be handy for CAP 8) */ i...
0
[ "CWE-200" ]
linux-2.6
3d392475c873c10c10d6d96b94d092a34ebd4791
339,582,068,234,185,100,000,000,000,000,000,000,000
27
appletalk: fix atalk_getname() leak atalk_getname() can leak 8 bytes of kernel memory to user Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
bool Item_cache_decimal::cache_value() { if (!example) return FALSE; value_cached= TRUE; my_decimal *val= example->val_decimal_result(&decimal_value); if (!(null_value_inside= null_value= example->null_value) && val != &decimal_value) my_decimal2decimal(val, &decimal_value); return TRUE; }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
188,118,464,672,674,900,000,000,000,000,000,000,000
11
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.
static const char *set_allow_opts(cmd_parms *cmd, allow_options_t *opts, const char *l) { allow_options_t opt; int first = 1; char *w, *p = (char *) l; char *tok_state; while ((w = apr_strtok(p, ",", &tok_state)) != NULL) { if (first) { p = NU...
0
[ "CWE-416", "CWE-284" ]
httpd
4cc27823899e070268b906ca677ee838d07cf67a
38,238,549,381,747,607,000,000,000,000,000,000,000
60
core: Disallow Methods' registration at run time (.htaccess), they may be used only if registered at init time (httpd.conf). Calling ap_method_register() in children processes is not the right scope since it won't be shared for all requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7...
static void print_stuff(BIO *bio, SSL *s, int full) { X509 *peer=NULL; char *p; static const char *space=" "; char buf[BUFSIZ]; STACK_OF(X509) *sk; STACK_OF(X509_NAME) *sk2; SSL_CIPHER *c; X509_NAME *xn; int j,i; #ifndef OPENSSL_NO_COMP const COMP_METHOD *comp, *expansion; #endif if (full) ...
0
[ "CWE-310" ]
openssl
c6a876473cbff0fd323c8abcaace98ee2d21863d
207,120,890,350,973,320,000,000,000,000,000,000,000
133
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
virDomainVsockDefFormat(virBufferPtr buf, virDomainVsockDefPtr vsock) { g_auto(virBuffer) childBuf = VIR_BUFFER_INIT_CHILD(buf); g_auto(virBuffer) attrBuf = VIR_BUFFER_INITIALIZER; g_auto(virBuffer) cidAttrBuf = VIR_BUFFER_INITIALIZER; if (vsock->model) { virBufferAsprin...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
113,049,892,525,887,760,000,000,000,000,000,000,000
27
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
static void set_vma_resv_flags(struct vm_area_struct *vma, unsigned long flags) { VM_BUG_ON_VMA(!is_vm_hugetlb_page(vma), vma); VM_BUG_ON_VMA(vma->vm_flags & VM_MAYSHARE, vma); set_vma_private_data(vma, get_vma_private_data(vma) | flags); }
0
[ "CWE-703" ]
linux
5af10dfd0afc559bb4b0f7e3e8227a1578333995
135,021,452,589,417,520,000,000,000,000,000,000,000
7
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...