func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int rbd_obj_copyup_current_snapc(struct rbd_obj_request *obj_req, u32 bytes) { struct ceph_osd_request *osd_req; int num_ops = count_write_ops(obj_req); int which = 0; int ret; dout("%s obj_req %p bytes %u\n", __func__, obj_req, bytes); if (bytes != MODS_ONLY) num_ops++; /* copyup */ osd_req = r...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
129,828,732,894,609,540,000,000,000,000,000,000,000
33
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
static int parse_next_body_message_rfc822_init(struct message_parser_ctx *ctx, struct message_block *block_r) { message_part_append(ctx); return parse_next_header_init(ctx, block_r); }
0
[ "CWE-20" ]
core
fb97a1cddbda4019e327fa736972a1c7433fedaa
20,000,228,276,414,352,000,000,000,000,000,000,000
6
lib-mail: message-parser - Fix assert-crash when enforcing MIME part limit The limit could have been exceeded with message/rfc822 parts.
static struct nsid_cache *netns_map_get_by_nsid(int nsid) { uint32_t h = NSID_HASH_NSID(nsid); struct hlist_node *n; hlist_for_each(n, &nsid_head[h]) { struct nsid_cache *c = container_of(n, struct nsid_cache, nsid_hash); if (c->nsid == nsid) return c; } return NULL; }
0
[ "CWE-416" ]
iproute2
9bf2c538a0eb10d66e2365a655bf6c52f5ba3d10
48,138,501,704,960,310,000,000,000,000,000,000,000
14
ipnetns: use-after-free problem in get_netnsid_from_name func Follow the following steps: # ip netns add net1 # export MALLOC_MMAP_THRESHOLD_=0 # ip netns list then Segmentation fault (core dumped) will occur. In get_netnsid_from_name func, answer is freed before rta_getattr_u32(tb[NETNSA_NSID]), where tb[] refers...
size_t Magick::Image::channels() const { return(constImage()->number_channels); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
170,643,364,628,948,130,000,000,000,000,000,000,000
4
Added missing return to avoid use after free.
appendInstructionChar( const FileInfo *file, widechar *passInstructions, int *passIC, widechar ch) { if (*passIC >= MAXSTRING) { compileError(file, "multipass operand too long"); return 0; } passInstructions[(*passIC)++] = ch; return 1; }
0
[ "CWE-787" ]
liblouis
2e4772befb2b1c37cb4b9d6572945115ee28630a
30,460,265,145,993,846,000,000,000,000,000,000,000
9
Prevent an invalid memory writes in compileRule Thanks to Han Zheng for reporting it Fixes #1214
ciMethod* ciEnv::get_method_by_index(constantPoolHandle cpool, int index, Bytecodes::Code bc, ciInstanceKlass* accessor) { GUARDED_VM_ENTRY(return get_method_by_index_impl(cpool, index, bc, accessor);) }
0
[]
jdk8u
1dafef08cc922ee85a8e216387100dc681a5484d
210,507,877,265,029,600,000,000,000,000,000,000,000
5
8281859: Improve class compilation Reviewed-by: andrew Backport-of: 3ac62a66efd05d0842076dd4cfbea0e53b12630f
static int __init enable_swap_account(char *s) { /* consider enabled if no parameter or 1 is given */ if (!strcmp(s, "1")) really_do_swap_account = 1; else if (!strcmp(s, "0")) really_do_swap_account = 0; return 1; }
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
11,143,123,882,435,855,000,000,000,000,000,000,000
9
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(...
static __init int rb_hammer_test(void *arg) { while (!kthread_should_stop()) { /* Send an IPI to all cpus to write data! */ smp_call_function(rb_ipi, NULL, 1); /* No sleep, but for non preempt, let others run */ schedule(); } return 0; }
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
129,299,904,802,249,730,000,000,000,000,000,000,000
12
ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this...
lexer_hex_to_character (parser_context_t *context_p, /**< context */ const uint8_t *source_p, /**< current source position */ int length) /**< source length */ { uint32_t result = 0; do { uint32_t byte = *source_p++; result <<= 4; if (byte >= LIT_CHAR...
0
[ "CWE-476" ]
jerryscript
e58f2880df608652aff7fd35c45b242467ec0e79
43,526,773,460,379,700,000,000,000,000,000,000,000
33
Do not allocate memory for zero length strings. (#1844) Fixes #1821. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
napi_status napi_escape_handle(napi_env env, napi_escapable_handle_scope scope, napi_value escapee, napi_value* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. CH...
0
[ "CWE-191" ]
node
656260b4b65fec3b10f6da3fdc9f11fb941aafb5
295,811,786,881,047,400,000,000,000,000,000,000,000
20
napi: fix memory corruption vulnerability Fixes: https://hackerone.com/reports/784186 CVE-ID: CVE-2020-8174 PR-URL: https://github.com/nodejs-private/node-private/pull/195 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_da...
cmd_str_r(const notify_script_t *script, char *buf, size_t len) { char *str_p; int i; size_t str_len; str_p = buf; for (i = 0; i < script->num_args; i++) { /* Check there is enough room for the next word */ str_len = strlen(script->args[i]); if (str_p + str_len + 2 + (i ? 1 : 0) >= buf + len) return NUL...
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
25,335,271,424,374,764,000,000,000,000,000,000,000
25
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
R_API RList *r_anal_bb_list_new() { RList *list = r_list_newf ((RListFree)r_anal_bb_free); if (!list) { return NULL; } return list; }
0
[ "CWE-416" ]
radare2
90b71c017a7fa9732fe45fd21b245ee051b1f548
261,566,654,837,646,600,000,000,000,000,000,000,000
7
Fix #10293 - Use-after-free in r_anal_bb_free()
int tls1_alert_code(int code) { switch (code) { case SSL_AD_CLOSE_NOTIFY: return(SSL3_AD_CLOSE_NOTIFY); case SSL_AD_UNEXPECTED_MESSAGE: return(SSL3_AD_UNEXPECTED_MESSAGE); case SSL_AD_BAD_RECORD_MAC: return(SSL3_AD_BAD_RECORD_MAC); case SSL_AD_DECRYPTION_FAILED: return(TLS1_AD_DECRYPTION_FAILED); case SSL_AD_R...
1
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
221,298,453,108,972,230,000,000,000,000,000,000,000
41
Add SRP support.
static void hns_nic_drop_rx_fetch(struct hns_nic_ring_data *ring_data, struct sk_buff *skb) { dev_kfree_skb_any(skb); }
0
[ "CWE-416" ]
linux
27463ad99f738ed93c7c8b3e2e5bc8c4853a2ff2
174,630,959,378,011,830,000,000,000,000,000,000,000
5
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...
static int uvc_scan_chain_entity(struct uvc_video_chain *chain, struct uvc_entity *entity) { switch (UVC_ENTITY_TYPE(entity)) { case UVC_VC_EXTENSION_UNIT: if (uvc_trace_param & UVC_TRACE_PROBE) printk(KERN_CONT " <- XU %d", entity->id); if (entity->bNrInPins != 1) { uvc_trace(UVC_TRACE_DESCR, "Extension ...
0
[ "CWE-269" ]
linux
68035c80e129c4cfec659aac4180354530b26527
158,672,920,257,125,290,000,000,000,000,000,000,000
82
media: uvcvideo: Avoid cyclic entity chains due to malformed USB descriptors Way back in 2017, fuzzing the 4.14-rc2 USB stack with syzkaller kicked up the following WARNING from the UVC chain scanning code: | list_add double add: new=ffff880069084010, prev=ffff880069084010, | next=ffff880067d22298. | ----------...
String *val_str(String *to) { return has_value() ? Date(this).to_string(to) : NULL; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
174,353,533,427,953,100,000,000,000,000,000,000,000
4
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
xfrm_policy_lookup(struct net *net, const struct flowi *fl, u16 family, u8 dir, struct flow_cache_object *old_obj, void *ctx) { struct xfrm_policy *pol; if (old_obj) xfrm_pol_put(container_of(old_obj, struct xfrm_policy, flo)); pol = __xfrm_policy_lookup(net, fl, family, flow_to_policy_dir(dir)); if (IS_ER...
0
[ "CWE-125" ]
ipsec
7bab09631c2a303f87a7eb7e3d69e888673b9b7e
180,823,233,955,164,430,000,000,000,000,000,000,000
18
xfrm: policy: check policy direction value The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used as an array index. This can lead to an out-of-bound access, kernel lockup and DoS. Add a check for the 'dir' value. This fixes CVE-2017-11600. References: https://bugzilla.redhat.com/show_bug.cgi?...
fill_rectangles (void *_dst, cairo_operator_t op, const cairo_color_t *color, cairo_rectangle_int_t *rects, int num_rects) { cairo_image_surface_t *dst = _dst; uint32_t pixel; int i; TRACE ((stderr, "%s\n", __FUNCTION__)); if (fill_reduces_to_source (op, color, dst, &pixel)) { f...
0
[]
cairo
03a820b173ed1fdef6ff14b4468f5dbc02ff59be
85,111,554,050,739,900,000,000,000,000,000,000,000
40
Fix mask usage in image-compositor
static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x) { int i; X509 *issuer, *rv = NULL; for (i = 0; i < sk_X509_num(sk); i++) { issuer = sk_X509_value(sk, i); if (ctx->check_issued(ctx, x, issuer) && (((x->ex_flags & EXFLAG_SI) != 0 && sk_X509_num(ctx->chai...
0
[ "CWE-295" ]
openssl
2a40b7bc7b94dd7de897a74571e7024f0cf0d63b
198,235,576,472,052,340,000,000,000,000,000,000,000
17
check_chain_extensions: Do not override error return value by check_curve The X509_V_FLAG_X509_STRICT flag enables additional security checks of the certificates present in a certificate chain. It is not set by default. Starting from OpenSSL version 1.1.1h a check to disallow certificates with explicitly encoded elli...
GF_Err stsz_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; u32 i; GF_SampleSizeBox *ptr = (GF_SampleSizeBox *)s; e = gf_isom_full_box_write(s, bs); if (e) return e; //in both versions this is still valid if (ptr->type == GF_ISOM_BOX_TYPE_STSZ) { gf_bs_write_u32(bs, ptr->sampleSize); } else { gf_bs_write_u2...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
16,176,520,240,806,798,000,000,000,000,000,000,000
45
prevent dref memleak on invalid input (#1183)
void posixtimer_rearm(struct siginfo *info) { struct k_itimer *timr; unsigned long flags; timr = lock_timer(info->si_tid, &flags); if (!timr) return; if (timr->it_requeue_pending == info->si_sys_private) { timr->kclock->timer_rearm(timr); timr->it_active = 1; timr->it_overrun_last = timr->it_overrun; ...
0
[ "CWE-190" ]
linux
78c9c4dfbf8c04883941445a195276bb4bb92c76
166,408,312,872,166,350,000,000,000,000,000,000,000
22
posix-timers: Sanitize overrun handling The posix timer overrun handling is broken because the forwarding functions can return a huge number of overruns which does not fit in an int. As a consequence timer_getoverrun(2) and siginfo::si_overrun can turn into random number generators. The k_clock::timer_forward() callb...
Integer& BER_Decoder::GetInteger(Integer& integer) { if (!source_.GetError().What()) integer.Decode(source_); return integer; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
55,845,786,421,744,410,000,000,000,000,000,000,000
6
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev) { struct brcmf_if *ifp = netdev_priv(ndev); s32 err; struct brcmf_fil_bss_enable_le bss_enable; struct brcmf_join_params join_params; brcmf_dbg(TRACE, "Enter\n"); if (ifp->vif->wdev.iftype == NL80211_IFTYPE_AP) { /* Due to most li...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
334,235,425,063,467,120,000,000,000,000,000,000,000
63
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap() User-space can choose to omit NL80211_ATTR_SSID and only provide raw IE TLV data. When doing so it can provide SSID IE with length exceeding the allowed size. The driver further processes this IE copying it into a local variable without checking the...
void arch_prepare_kretprobe(struct kretprobe_instance *ri, struct pt_regs *regs) { unsigned long *sara = stack_addr(regs); ri->ret_addr = (kprobe_opcode_t *) *sara; /* Replace the return addr with trampoline addr */ *sara = (unsigned long) &kretprobe_trampoline; }
0
[ "CWE-264" ]
linux
548acf19234dbda5a52d5a8e7e205af46e9da840
211,321,243,335,554,820,000,000,000,000,000,000,000
9
x86/mm: Expand the exception table logic to allow new handling options Huge amounts of help from Andy Lutomirski and Borislav Petkov to produce this. Andy provided the inspiration to add classes to the exception table with a clever bit-squeezing trick, Boris pointed out how much cleaner it would all be if we just had...
static inline void __tcp_add_write_queue_head(struct sock *sk, struct sk_buff *skb) { __skb_queue_head(&sk->sk_write_queue, skb); }
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
275,665,182,148,590,750,000,000,000,000,000,000,000
4
tcp: fix use after free in tcp_xmit_retransmit_queue() When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the tail of the write queue using tcp_add_write_queue_tail() Then it attempts to copy user data into this fresh skb. If the copy fails, we undo the work and remove the fresh skb. Unfortunately, t...
static noinline int search_ioctl(struct inode *inode, struct btrfs_ioctl_search_key *sk, size_t *buf_size, char __user *ubuf) { struct btrfs_root *root; struct btrfs_key key; struct btrfs_path *path; struct btrfs_fs_info *info = BTRFS_I(inode)->root->fs_info; int ret; int num_found = 0; unsigned l...
0
[ "CWE-200" ]
linux
8039d87d9e473aeb740d4fdbd59b9d2f89b2ced9
26,804,953,347,467,755,000,000,000,000,000,000,000
63
Btrfs: fix file corruption and data loss after cloning inline extents Currently the clone ioctl allows to clone an inline extent from one file to another that already has other (non-inlined) extents. This is a problem because btrfs is not designed to deal with files having inline and regular extents, if a file has an ...
std::string HttpIntegrationTest::listenerStatPrefix(const std::string& stat_name) { if (version_ == Network::Address::IpVersion::v4) { return "listener.127.0.0.1_0." + stat_name; } return "listener.[__1]_0." + stat_name; }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
183,056,808,179,796,200,000,000,000,000,000,000,000
6
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...
int fib6_del(struct rt6_info *rt, struct nl_info *info) { struct net *net = info->nl_net; struct fib6_node *fn = rt->rt6i_node; struct rt6_info **rtp; #if RT6_DEBUG >= 2 if (rt->dst.obsolete>0) { WARN_ON(fn != NULL); return -ENOENT; } #endif if (!fn || rt == net->ipv6.ip6_null_entry) return -ENOENT; WARN...
0
[ "CWE-399" ]
linux
307f2fb95e9b96b3577916e73d92e104f8f26494
81,195,022,790,075,810,000,000,000,000,000,000,000
42
ipv6: only static routes qualify for equal cost multipathing Static routes in this case are non-expiring routes which did not get configured by autoconf or by icmpv6 redirects. To make sure we actually get an ecmp route while searching for the first one in this fib6_node's leafs, also make sure it matches the ecmp ro...
void __init trace_init(void) { trace_event_init(); }
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
253,365,684,591,997,220,000,000,000,000,000,000,000
4
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...
static int ct_rewind(struct media_player *mp, void *user_data) { struct avrcp_player *player = user_data; return ct_hold(player, AVC_REWIND); }
0
[ "CWE-200" ]
bluez
e2b0f0d8d63e1223bb714a9efb37e2257818268b
125,469,163,235,459,980,000,000,000,000,000,000,000
6
avrcp: Fix not checking if params_len match number of received bytes This makes sure the number of bytes in the params_len matches the remaining bytes received so the code don't end up accessing invalid memory.
op_on_lines(int op) { return opchars[op][2] & OPF_LINES; }
0
[ "CWE-416", "CWE-787" ]
vim
9f8c304c8a390ade133bac29963dc8e56ab14cbc
174,336,989,655,479,230,000,000,000,000,000,000,000
4
patch 8.2.4120: block insert goes over the end of the line Problem: Block insert goes over the end of the line. Solution: Handle invalid byte better. Fix inserting the wrong text.
int valid_phys_addr_range(unsigned long addr, size_t size) { if (addr < PHYS_OFFSET) return 0; if (addr + size > __pa(high_memory - 1) + 1) return 0; return 1; }
0
[]
linux
1d18c47c735e8adfe531fc41fae31e98f86b68fe
171,403,487,503,070,370,000,000,000,000,000,000,000
9
arm64: MMU fault handling and page table management This patch adds support for the handling of the MMU faults (exception entry code introduced by a previous patch) and page table management. The user translation table is pointed to by TTBR0 and the kernel one (swapper_pg_dir) by TTBR1. There is no translation inform...
CtPtr ProtocolV1::handle_message_footer(char *buffer, int r) { ldout(cct, 20) << __func__ << " r=" << r << dendl; if (r < 0) { ldout(cct, 1) << __func__ << " read footer data error " << dendl; return _fault(); } ceph_msg_footer footer; ceph_msg_footer_old old_footer; if (connection->has_feature(C...
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
183,352,044,799,684,560,000,000,000,000,000,000,000
173
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...
mono_loader_lock_track_ownership (gboolean track) { loader_lock_track_ownership = track; }
0
[]
mono
8e890a3bf80a4620e417814dc14886b1bbd17625
39,789,779,075,617,055,000,000,000,000,000,000,000
4
Search for dllimported shared libs in the base directory, not cwd. * loader.c: we don't search the current directory anymore for shared libraries referenced in DllImport attributes, as it has a slight security risk. We search in the same directory where the referencing image was loaded from, instead. Fixes bug# 641915...
GF_Err tsel_box_size(GF_Box *s) { GF_TrackSelectionBox *ptr = (GF_TrackSelectionBox *) s; ptr->size += 4 + (4*ptr->attributeListCount); return GF_OK; }
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
333,168,642,479,944,520,000,000,000,000,000,000,000
6
fixed #1768
xmlElemDump(FILE * f, xmlDocPtr doc, xmlNodePtr cur) { xmlOutputBufferPtr outbuf; xmlInitParser(); if (cur == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlElemDump : cur == NULL\n"); #endif return; } #ifdef DEBUG_TREE if (doc == NULL...
0
[ "CWE-502" ]
libxml2
c97750d11bb8b6f3303e7131fe526a61ac65bcfd
178,039,943,965,938,260,000,000,000,000,000,000,000
33
Avoid an out of bound access when serializing malformed strings For https://bugzilla.gnome.org/show_bug.cgi?id=766414 * xmlsave.c: xmlBufAttrSerializeTxtContent() if an attribute value is not UTF-8 be more careful when serializing it as we may do an out of bound access as a result.
static __always_inline int do_insn_fetch_bytes(struct x86_emulate_ctxt *ctxt, unsigned size) { unsigned done_size = ctxt->fetch.end - ctxt->fetch.ptr; if (unlikely(done_size < size)) return __do_insn_fetch_bytes(ctxt, size - done_size); else return X86EMUL_CONTINUE; }
0
[ "CWE-399" ]
kvm
13e457e0eebf0a0c82c38ceb890d93eb826d62a6
242,738,953,655,044,330,000,000,000,000,000,000,000
10
KVM: x86: Emulator does not decode clflush well Currently, all group15 instructions are decoded as clflush (e.g., mfence, xsave). In addition, the clflush instruction requires no prefix (66/f2/f3) would exist. If prefix exists it may encode a different instruction (e.g., clflushopt). Creating a group for clflush, an...
get_uncompressed_data(struct archive_read *a, const void **buff, size_t size, size_t minimum) { struct _7zip *zip = (struct _7zip *)a->format->data; ssize_t bytes_avail; if (zip->codec == _7Z_COPY && zip->codec2 == (unsigned long)-1) { /* Copy mode. */ /* * Note: '1' here is a performance optimization. ...
1
[ "CWE-125" ]
libarchive
65a23f5dbee4497064e9bb467f81138a62b0dae1
31,051,076,667,023,103,000,000,000,000,000,000,000
57
7zip: fix crash when parsing certain archives Fuzzing with CRCs disabled revealed that a call to get_uncompressed_data() would sometimes fail to return at least 'minimum' bytes. This can cause the crc32() invocation in header_bytes to read off into invalid memory. A specially crafted archive can use this to cause a c...
static struct ewah_bitmap *read_bitmap_1(struct bitmap_index *index) { struct ewah_bitmap *b = ewah_pool_new(); int bitmap_size = ewah_read_mmap(b, index->map + index->map_pos, index->map_size - index->map_pos); if (bitmap_size < 0) { error("Failed to load bitmap index (corrupted?)"); ewah_pool_free(b); ...
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
26,631,550,437,634,030,000,000,000,000,000,000,000
17
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
void* Type_U16Fixed16_Dup(struct _cms_typehandler_struct* self, const void *Ptr, cmsUInt32Number n) { return _cmsDupMem(self ->ContextID, Ptr, n * sizeof(cmsFloat64Number)); }
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
181,022,965,290,059,150,000,000,000,000,000,000,000
4
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...
struct sock *ax25_make_new(struct sock *osk, struct ax25_dev *ax25_dev) { struct sock *sk; ax25_cb *ax25, *oax25; sk = sk_alloc(sock_net(osk), PF_AX25, GFP_ATOMIC, osk->sk_prot); if (sk == NULL) return NULL; if ((ax25 = ax25_create_cb()) == NULL) { sk_free(sk); return NULL; } switch (osk->sk_type) { ca...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
221,447,642,808,834,000,000,000,000,000,000,000,000
69
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem) { unsigned int i, head, max; hwaddr desc_pa = vq->vring.desc; if (!virtqueue_num_heads(vq, vq->last_avail_idx)) return 0; /* When we start there are none of either input nor output. */ elem->out_num = elem->in_num = 0; max = vq-...
0
[ "CWE-94" ]
qemu
cc45995294b92d95319b4782750a3580cabdbc0c
218,538,161,143,472,700,000,000,000,000,000,000,000
70
virtio: out-of-bounds buffer write on invalid state load CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in virtio_load@hw/virtio/virtio.c So we have this code since way back when: num = qemu_get_be32(f); for (i = 0; i < num; i++) { vdev->vq[i].vring.num = qemu_get_be32(f); array of vqs has size ...
nautilus_file_operations_delete (GList *files, GtkWindow *parent_window, NautilusDeleteCallback done_callback, gpointer done_callback_data) { trash_or_delete_internal (files, parent_window, FALSE, done_callback, done_callback_data); }
0
[]
nautilus
ca2fd475297946f163c32dcea897f25da892b89d
12,279,326,107,511,298,000,000,000,000,000,000,000
9
Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if th...
pop_showcmd(void) { if (!p_sc) return; STRCPY(showcmd_buf, old_showcmd_buf); display_showcmd(); }
0
[ "CWE-416" ]
vim
35a9a00afcb20897d462a766793ff45534810dc3
153,333,867,390,518,450,000,000,000,000,000,000,000
9
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 bool parseOperands(char* str, ArmOp *op) { char *t = strdup (str); int operand = 0; char *token = t; char *x; int imm_count = 0; int mem_opt = 0; if (!token) { return false; } while (token) { char *next = strchr (token, ','); if (next) { *next++ = 0; } while (token[0] == ' ') { token++;...
0
[ "CWE-125", "CWE-787" ]
radare2
e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7
198,292,456,631,788,930,000,000,000,000,000,000,000
138
Fix #12417/#12418 (arm assembler heap overflows)
Statement_Ptr Expand::operator()(Ruleset_Ptr r) { LOCAL_FLAG(old_at_root_without_rule, at_root_without_rule); if (in_keyframes) { Block_Ptr bb = operator()(r->block()); Keyframe_Rule_Obj k = SASS_MEMORY_NEW(Keyframe_Rule, r->pstate(), bb); if (r->selector()) { if (Selector_List_Pt...
0
[ "CWE-476" ]
libsass
0bc35e3d26922229d5a3e3308860cf0fcee5d1cf
191,010,609,221,070,580,000,000,000,000,000,000,000
79
Fix segfault on empty custom properties Originally reported in sass/sassc#225 Fixes sass/sassc#225 Spec sass/sass-spec#1249
static bool is_xmm_fast_hypercall(struct kvm_hv_hcall *hc) { switch (hc->code) { case HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST: case HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE: case HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST_EX: case HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX: case HVCALL_SEND_IPI_EX: return true; } return false; }
0
[ "CWE-476" ]
linux
7ec37d1cbe17d8189d9562178d8b29167fe1c31a
238,829,125,946,659,230,000,000,000,000,000,000,000
13
KVM: x86: Check lapic_in_kernel() before attempting to set a SynIC irq When KVM_CAP_HYPERV_SYNIC{,2} is activated, KVM already checks for irqchip_in_kernel() so normally SynIC irqs should never be set. It is, however, possible for a misbehaving VMM to write to SYNIC/STIMER MSRs causing erroneous behavior. The immedi...
void ip_rt_get_source(u8 *addr, struct sk_buff *skb, struct rtable *rt) { __be32 src; if (rt_is_output_route(rt)) src = ip_hdr(skb)->saddr; else { struct fib_result res; struct iphdr *iph = ip_hdr(skb); struct flowi4 fl4 = { .daddr = iph->daddr, .saddr = iph->saddr, .flowi4_tos = RT_TOS(iph->tos), ...
0
[ "CWE-327" ]
linux
aa6dd211e4b1dde9d5dc25d699d35f789ae7eeba
359,054,203,419,884,750,000,000,000,000,000,000
29
inet: use bigger hash table for IP ID generation In commit 73f156a6e8c1 ("inetpeer: get rid of ip_id_count") I used a very small hash table that could be abused by patient attackers to reveal sensitive information. Switch to a dynamic sizing, depending on RAM size. Typical big hosts will now use 128x more storage (2...
const char * olm_pk_encryption_last_error( OlmPkEncryption * encryption ) { auto error = encryption->last_error; return _olm_error_to_string(error); }
0
[ "CWE-787" ]
olm
ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b
23,084,313,783,276,715,000,000,000,000,000,000,000
6
olm_pk_decrypt: Ensure inputs are of correct length.
static void add_child(pid_t pid, struct sockaddr *addr, int addrlen) { struct child *newborn, **cradle; /* * This must be xcalloc() -- we'll compare the whole sockaddr_storage * but individual address may be shorter. */ newborn = xcalloc(1, sizeof(*newborn)); live_children++; newborn->pid = pid; memcpy(&ne...
0
[]
git
73bb33a94ec67a53e7d805b12ad9264fa25f4f8d
56,345,121,297,387,060,000,000,000,000,000,000,000
19
daemon: Strictly parse the "extra arg" part of the command Since 1.4.4.5 (49ba83fb67 "Add virtualization support to git-daemon") git daemon enters an infinite loop and never terminates if a client hides any extra arguments in the initial request line which is not exactly "\0host=blah\0". Since that change, a client m...
static int create_raw_packet_qp_tis(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp, struct mlx5_ib_sq *sq, u32 tdn) { u32 in[MLX5_ST_SZ_DW(create_tis_in)] = {0}; void *tisc = MLX5_ADDR_OF(create_tis_in, in, ctx); MLX5_SET(tisc, tisc, transport_domain, tdn); if (qp->flags & MLX5_IB_QP_UNDERLAY) ML...
0
[ "CWE-119", "CWE-787" ]
linux
0625b4ba1a5d4703c7fb01c497bd6c156908af00
171,220,468,399,583,140,000,000,000,000,000,000,000
13
IB/mlx5: Fix leaking stack memory to userspace mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: <stable@vger.kernel.org> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <...
ExecAssignScanTypeFromOuterPlan(ScanState *scanstate) { PlanState *outerPlan; TupleDesc tupDesc; outerPlan = outerPlanState(scanstate); tupDesc = ExecGetResultType(outerPlan); ExecAssignScanType(scanstate, tupDesc); }
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
15,252,072,717,406,730,000,000,000,000,000,000,000
10
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
_public_ int sd_bus_get_exit_on_disconnect(sd_bus *bus) { assert_return(bus, -EINVAL); assert_return(bus = bus_resolve(bus), -ENOPKG); return bus->exit_on_disconnect; }
0
[ "CWE-416" ]
systemd
1068447e6954dc6ce52f099ed174c442cb89ed54
72,486,465,211,245,030,000,000,000,000,000,000,000
6
sd-bus: introduce API for re-enqueuing incoming messages When authorizing via PolicyKit we want to process incoming method calls twice: once to process and figure out that we need PK authentication, and a second time after we aquired PK authentication to actually execute the operation. With this new call sd_bus_enqueu...
FLAC_API FLAC__bool FLAC__stream_encoder_set_rice_parameter_search_dist(FLAC__StreamEncoder *encoder, uint32_t value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); FLAC__ASSERT(0 != encoder->protected_); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) return false; #if 0...
0
[ "CWE-787" ]
flac
e1575e4a7c5157cbf4e4a16dbd39b74f7174c7be
314,032,663,791,153,760,000,000,000,000,000,000,000
15
libFlac: Exit at EOS in verify mode When verify mode is enabled, once decoder flags end of stream, encode processing is considered complete. CVE-2021-0561 Signed-off-by: Ralph Giles <giles@thaumas.net>
void icmpv6_flow_init(struct sock *sk, struct flowi6 *fl6, u8 type, const struct in6_addr *saddr, const struct in6_addr *daddr, int oif) { memset(fl6, 0, sizeof(*fl6)); fl6->saddr = *saddr; fl6->daddr = *daddr; fl6->flowi6_proto = IPPROTO_ICMPV6; fl6->fl6_icmp_type = type; fl6->fl6...
0
[ "CWE-20", "CWE-200" ]
linux
79dc7e3f1cd323be4c81aa1a94faa1b3ed987fb2
41,267,044,418,174,507,000,000,000,000,000,000,000
15
net: handle no dst on skb in icmp6_send Andrey reported the following while fuzzing the kernel with syzkaller: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked in: CPU: 0 PID: 3859 Comm: a.out Not tainted...
static void FVMenuCopyWidth(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) { FontView *fv = (FontView *) GDrawGetUserData(gw); if ( FVAnyCharSelected(fv)==-1 ) return; if ( mi->mid==MID_CopyVWidth && !fv->b.sf->hasvmetrics ) return; FVCopyWidth((FontViewBase *) fv, mi->mid==MID_CopyWidth?ut_...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
285,499,905,503,902,620,000,000,000,000,000,000,000
13
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
static gboolean lo_key_equal(gconstpointer a, gconstpointer b) { const struct lo_key *la = a; const struct lo_key *lb = b; return la->ino == lb->ino && la->dev == lb->dev; }
0
[]
qemu
6084633dff3a05d63176e06d7012c7e15aba15be
285,942,089,346,274,270,000,000,000,000,000,000,000
7
tools/virtiofsd: xattr name mappings: Add option Add an option to define mappings of xattr names so that the client and server filesystems see different views. This can be used to have different SELinux mappings as seen by the guest, to run the virtiofsd with less privileges (e.g. in a case where it can't set trusted/...
build_pathname(struct archive_string *as, struct file_info *file, int depth) { // Plain ISO9660 only allows 8 dir levels; if we get // to 1000, then something is very, very wrong. if (depth > 1000) { return NULL; } if (file->parent != NULL && archive_strlen(&file->parent->name) > 0) { if (build_pathname(as, fi...
0
[ "CWE-125" ]
libarchive
f9569c086ff29259c73790db9cbf39fe8fb9d862
32,048,783,471,010,700,000,000,000,000,000,000,000
19
iso9660: validate directory record length
sg_start_req(Sg_request *srp, unsigned char *cmd) { int res; struct request *rq; struct scsi_request *req; Sg_fd *sfp = srp->parentfp; sg_io_hdr_t *hp = &srp->header; int dxfer_len = (int) hp->dxfer_len; int dxfer_dir = hp->dxfer_direction; unsigned int iov_count = hp->iovec_count; Sg_scatter_hold *req_schp = ...
0
[ "CWE-200" ]
linux
3e0097499839e0fe3af380410eababe5a47c4cf9
208,153,856,791,990,770,000,000,000,000,000,000,000
132
scsi: sg: fixup infoleak when using SG_GET_REQUEST_TABLE When calling SG_GET_REQUEST_TABLE ioctl only a half-filled table is returned; the remaining part will then contain stale kernel memory information. This patch zeroes out the entire table to avoid this issue. Signed-off-by: Hannes Reinecke <hare@suse.com> Revie...
void uwsgi_emulate_cow_for_apps(int id) { int i; // check if we need to emulate fork() COW if (uwsgi.mywid == 0) { for (i = 1; i <= uwsgi.numproc; i++) { memcpy(&uwsgi.workers[i].apps[id], &uwsgi.workers[0].apps[id], sizeof(struct uwsgi_app)); uwsgi.workers[i].apps_cnt = uwsgi_apps_cnt; } } }
0
[ "CWE-119", "CWE-703", "CWE-787" ]
uwsgi
cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe
65,568,442,820,357,500,000,000,000,000,000,000,000
10
improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue
static void imap_login_preinit(void) { login_set_roots = imap_login_setting_roots; }
0
[]
core
62061e8cf68f506c0ccaaba21fd4174764ca875f
321,676,649,634,654,700,000,000,000,000,000,000,000
4
imap-login: Split off client_invalid_command()
libraw_processed_image_t *LibRaw::dcraw_make_mem_image(int *errcode) { int width, height, colors, bps; get_mem_image_format(&width, &height, &colors, &bps); int stride = width * (bps/8) * colors; unsigned ds = height * stride; libraw_processed_image_t *ret = (libraw_processed_image_t*)::malloc(size...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
112,563,906,367,239,100,000,000,000,000,000,000,000
26
fixed two more problems found by fuzzer
ssize_t cpu_show_spec_store_bypass(struct device *dev, struct device_attribute *attr, char *buf) { return cpu_show_common(dev, attr, buf, X86_BUG_SPEC_STORE_BYPASS); }
0
[]
linux
a2059825986a1c8143fd6698774fa9d83733bb11
2,652,098,715,897,922,000,000,000,000,000,000,000
4
x86/speculation: Enable Spectre v1 swapgs mitigations The previous commit added macro calls in the entry code which mitigate the Spectre v1 swapgs issue if the X86_FEATURE_FENCE_SWAPGS_* features are enabled. Enable those features where applicable. The mitigations may be disabled with "nospectre_v1" or "mitigations...
void do_notify_resume(struct pt_regs *regs, sigset_t *oldset, __u32 thread_info_flags) { /* Pending single-step? */ if (thread_info_flags & _TIF_SINGLESTEP) clear_thread_flag(TIF_SINGLESTEP); /* deal with pending signal delivery */ if (thread_info_flags & _TIF_SIGPENDING) do_signal(regs,oldset); if (...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
170,294,807,008,701,900,000,000,000,000,000,000,000
20
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...
static inline bool intel_vgpu_in_aperture(struct intel_vgpu *vgpu, uint64_t off) { return off >= vgpu_aperture_offset(vgpu) && off < vgpu_aperture_offset(vgpu) + vgpu_aperture_sz(vgpu); }
0
[ "CWE-20" ]
linux
51b00d8509dc69c98740da2ad07308b630d3eb7d
229,521,181,008,533,200,000,000,000,000,000,000,000
5
drm/i915/gvt: Fix mmap range check This is to fix missed mmap range check on vGPU bar2 region and only allow to map vGPU allocated GMADDR range, which means user space should support sparse mmap to get proper offset for mmap vGPU aperture. And this takes care of actual pgoff in mmap request as original code always doe...
CredentialData() : password(""), scram(), isExternal(false) {}
0
[ "CWE-613" ]
mongo
db19e7ce84cfd702a4ba9983ee2ea5019f470f82
89,568,138,844,150,700,000,000,000,000,000,000,000
1
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
R_API const char *r_core_anal_optype_colorfor(RCore *core, ut64 addr, bool verbose) { ut64 type; if (!(core->print->flags & R_PRINT_FLAGS_COLOR)) { return NULL; } if (!r_config_get_i (core->config, "scr.color")) { return NULL; } type = r_core_anal_address (core, addr); if (type & R_ANAL_ADDR_TYPE_EXEC) { r...
0
[ "CWE-415", "CWE-703" ]
radare2
cb8b683758edddae2d2f62e8e63a738c39f92683
261,781,924,886,620,440,000,000,000,000,000,000,000
26
Fix #16303 - c->table_query double free (#16318)
int ip_route_input_rcu(struct sk_buff *skb, __be32 daddr, __be32 saddr, u8 tos, struct net_device *dev, struct fib_result *res) { /* Multicast recognition logic is moved from route cache to here. * The problem was that too many Ethernet cards have broken/missing * hardware multicast filters :-( As result ...
0
[ "CWE-327" ]
linux
aa6dd211e4b1dde9d5dc25d699d35f789ae7eeba
158,856,833,068,806,880,000,000,000,000,000,000,000
49
inet: use bigger hash table for IP ID generation In commit 73f156a6e8c1 ("inetpeer: get rid of ip_id_count") I used a very small hash table that could be abused by patient attackers to reveal sensitive information. Switch to a dynamic sizing, depending on RAM size. Typical big hosts will now use 128x more storage (2...
static ssize_t netdev_queue_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) { const struct netdev_queue_attribute *attribute = to_netdev_queue_attr(attr); struct netdev_queue *queue = to_netdev_queue(kobj); if (!attribute->show) return -EIO; return attribute->show(queue, buf);
0
[ "CWE-401" ]
linux
895a5e96dbd6386c8e78e5b78e067dcc67b7f0ab
119,406,569,786,271,520,000,000,000,000,000,000,000
12
net-sysfs: Fix mem leak in netdev_register_kobject syzkaller report this: BUG: memory leak unreferenced object 0xffff88837a71a500 (size 256): comm "syz-executor.2", pid 9770, jiffies 4297825125 (age 17.843s) hex dump (first 32 bytes): 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... ff ff ...
void setup_new_exec(struct linux_binprm * bprm) { arch_pick_mmap_layout(current->mm); /* This is the point of no return */ current->sas_ss_sp = current->sas_ss_size = 0; if (uid_eq(current_euid(), current_uid()) && gid_eq(current_egid(), current_gid())) set_dumpable(current->mm, SUID_DUMP_USER); else set_dum...
0
[]
linux
98da7d08850fb8bdeb395d6368ed15753304aa0c
46,642,757,276,650,250,000,000,000,000,000,000,000
36
fs/exec.c: account for argv/envp pointers When limiting the argv/envp strings during exec to 1/4 of the stack limit, the storage of the pointers to the strings was not included. This means that an exec with huge numbers of tiny strings could eat 1/4 of the stack limit in strings and then additional space would be lat...
bool Item_sum_and::add() { ulonglong value= (ulonglong) args[0]->val_int(); if (!args[0]->null_value) { if (as_window_function) return add_as_window(value); bits&=value; } return 0; }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
223,779,360,688,196,020,000,000,000,000,000,000,000
11
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...
UUIDNormalize( slap_mask_t usage, Syntax *syntax, MatchingRule *mr, struct berval *val, struct berval *normalized, void *ctx ) { unsigned char octet = '\0'; int i; int j; if ( SLAP_MR_IS_DENORMALIZE( usage ) ) { /* NOTE: must be a normalized UUID */ assert( val->bv_len == 16 ); normalized->bv_val = sl...
0
[ "CWE-617" ]
openldap
67670f4544e28fb09eb7319c39f404e1d3229e65
23,492,407,327,006,870,000,000,000,000,000,000,000
59
ITS#9383 remove assert in certificateListValidate
static rfbBool MallocFrameBuffer(rfbClient* client) { uint64_t allocSize; if(client->frameBuffer) free(client->frameBuffer); /* SECURITY: promote 'width' into uint64_t so that the multiplication does not overflow 'width' and 'height' are 16-bit integers per RFB protocol design SIZE_MAX is the maxi...
0
[ "CWE-703", "CWE-835" ]
libvncserver
57433015f856cc12753378254ce4f1c78f5d9c7b
102,273,844,770,207,630,000,000,000,000,000,000,000
24
libvncclient: handle half-open TCP connections When a connection is not reset properly at the TCP level (e.g. sudden power loss or process crash) the TCP connection becomes half-open and read() always returns -1 with errno = EAGAIN while select() always returns 0. This leads to an infinite loop and can be fixed by clo...
_libssh2_channel_flush(LIBSSH2_CHANNEL *channel, int streamid) { if(channel->flush_state == libssh2_NB_state_idle) { LIBSSH2_PACKET *packet = _libssh2_list_first(&channel->session->packets); channel->flush_refund_bytes = 0; channel->flush_flush_bytes = 0; while(packet) {...
1
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
271,367,579,830,276,080,000,000,000,000,000,000,000
67
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page *page) { struct file *file = desc->file; struct inode *inode = file->f_path.dentry->d_inode; struct rpc_cred *cred = nfs_file_cred(file); unsigned long timestamp; int error; dfprintk(DIRCACHE, "NFS: %s: reading cookie %Lu into page %lu\n", __...
0
[ "CWE-20" ]
linux-2.6
54af3bb543c071769141387a42deaaab5074da55
306,465,394,569,828,730,000,000,000,000,000,000,000
49
NFS: Fix an Oops in encode_lookup() It doesn't look as if the NFS file name limit is being initialised correctly in the struct nfs_server. Make sure that we limit whatever is being set in nfs_probe_fsinfo() and nfs_init_server(). Also ensure that readdirplus and nfs4_path_walk respect our file name limits. Signed-of...
static int perf_event_stop(struct perf_event *event, int restart) { struct stop_event_data sd = { .event = event, .restart = restart, }; int ret = 0; do { if (READ_ONCE(event->state) != PERF_EVENT_STATE_ACTIVE) return 0; /* matches smp_wmb() in event_sched_in() */ smp_rmb(); /* * We only want ...
0
[ "CWE-362", "CWE-125" ]
linux
321027c1fe77f892f4ea07846aeae08cefbbb290
51,819,340,412,472,050,000,000,000,000,000,000,000
26
perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race Di Shen reported a race between two concurrent sys_perf_event_open() calls where both try and move the same pre-existing software group into a hardware context. The problem is exactly that described in commit: f63a8daa5812 ("perf: Fix event->ctx...
CString CZNC::GetConfPath(bool bAllowMkDir) const { CString sConfPath = m_sZNCPath + "/configs"; if (bAllowMkDir && !CFile::Exists(sConfPath)) { CDir::MakeDir(sConfPath); } return sConfPath; }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
69,267,561,492,691,010,000,000,000,000,000,000,000
8
Don't crash if user specified invalid encoding. This is CVE-2019-9917
other_wireless_activate_cb (GtkWidget *menu_item, NMApplet *applet) { GtkWidget *dialog; dialog = nma_wireless_dialog_new_for_other (applet); if (!dialog) return; g_signal_connect (dialog, "response", G_CALLBACK (wireless_dialog_response_cb), app...
0
[ "CWE-310" ]
network-manager-applet
4020594dfbf566f1852f0acb36ad631a9e73a82b
287,673,235,231,355,320,000,000,000,000,000,000,000
15
core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793) If a connection was created with a CA certificate, but the user later moved or deleted that CA certificate, the applet would simply provide the connection to NetworkManager without any CA certificate. This could cause NM to connect to t...
SM_io_parser<Decorator_>:: SM_io_parser(std::ostream& iout, const Base& D) : Base(D), in(std::cin), out(iout), VI(this->svertices_begin(),this->svertices_end(),'v'), EI(this->shalfedges_begin(),this->shalfedges_end(),'e'), FI(this->sfaces_begin(),this->sfaces_end(),'f'), vn(this->number_of_svertices()), en(...
0
[ "CWE-269" ]
cgal
618b409b0fbcef7cb536a4134ae3a424ef5aae45
116,608,554,412,191,050,000,000,000,000,000,000,000
13
Fix Nef_2 and Nef_S2 IO
LEX_USER *create_definer(THD *thd, LEX_CSTRING *user_name, LEX_CSTRING *host_name) { LEX_USER *definer; /* Create and initialize. */ if (unlikely(!(definer= (LEX_USER*) thd->alloc(sizeof(LEX_USER))))) return 0; definer->user= *user_name; definer->host= *host_name; definer->au...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
147,070,318,723,130,490,000,000,000,000,000,000,000
16
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(HeaderMapImplTest, InlineHeaderByteSize) { { TestRequestHeaderMapImpl headers; std::string foo = "foo"; headers.setHost(foo); EXPECT_EQ(headers.byteSize(), 13); } { // Overwrite an inline headers with set. TestRequestHeaderMapImpl headers; std::string foo = "foo"; headers.setH...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
87,119,269,160,961,580,000,000,000,000,000,000,000
53
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...
static __inline__ int __sk_nulls_del_node_init_rcu(struct sock *sk) { if (sk_hashed(sk)) { hlist_nulls_del_init_rcu(&sk->sk_nulls_node); return 1; } return 0; }
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
121,699,187,988,652,950,000,000,000,000,000,000,000
8
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
TEE_Result syscall_cryp_obj_get_info(unsigned long obj, TEE_ObjectInfo *info) { TEE_Result res; struct tee_ta_session *sess; struct tee_obj *o; res = tee_ta_get_current_session(&sess); if (res != TEE_SUCCESS) goto exit; res = tee_obj_get(to_user_ta_ctx(sess->ctx), tee_svc_uref_to_vaddr(obj), &o); if (re...
0
[ "CWE-119", "CWE-787" ]
optee_os
a637243270fc1faae16de059091795c32d86e65e
2,766,648,136,780,979,000,000,000,000,000,000,000
20
svc: check for allocation overflow in crypto calls Without checking for overflow there is a risk of allocating a buffer with size smaller than anticipated and as a consequence of that it might lead to a heap based overflow with attacker controlled data written outside the boundaries of the buffer. Fixes: OP-TEE-2018-...
static int tcp_peek_sndq(struct sock *sk, struct msghdr *msg, int len) { struct sk_buff *skb; int copied = 0, err = 0; /* XXX -- need to support SO_PEEK_OFF */ skb_queue_walk(&sk->sk_write_queue, skb) { err = skb_copy_datagram_msg(skb, 0, msg, skb->len); if (err) break; copied += skb->len; } return e...
0
[ "CWE-399", "CWE-835" ]
linux
ccf7abb93af09ad0868ae9033d1ca8108bdaec82
195,646,805,350,110,400,000,000,000,000,000,000,000
17
tcp: avoid infinite loop in tcp_splice_read() Splicing from TCP socket is vulnerable when a packet with URG flag is received and stored into receive queue. __tcp_splice_read() returns 0, and sk_wait_data() immediately returns since there is the problematic skb in queue. This is a nice way to burn cpu (aka infinite l...
static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb) { int idx; int s_idx = cb->family; if (s_idx == 0) s_idx = 1; for (idx = 1; idx <= RTNL_FAMILY_MAX; idx++) { int type = cb->nlh->nlmsg_type-RTM_BASE; struct rtnl_link *handlers; rtnl_dumpit_func dumpit; if (idx < s_idx || idx ==...
0
[ "CWE-476" ]
linux
f428fe4a04cc339166c8bbd489789760de3a0cee
293,619,444,131,425,100,000,000,000,000,000,000,000
36
rtnetlink: give a user socket to get_target_net() This function is used from two places: rtnl_dump_ifinfo and rtnl_getlink. In rtnl_getlink(), we give a request skb into get_target_net(), but in rtnl_dump_ifinfo, we give a response skb into get_target_net(). The problem here is that NETLINK_CB() isn't initialized for ...
static int decode_pixdata(deark *c, lctx *d, struct fmtutil_macbitmap_info *bi, i64 pos) { int retval = 0; de_dbg_indent(c, 1); if(bi->npwidth==0 || bi->height==0) { de_warn(c, "Ignoring zero-size bitmap (%d"DE_CHAR_TIMES"%d)", (int)bi->npwidth, (int)bi->height); goto done; } if(!de_good_image_dimensions(...
0
[ "CWE-476" ]
deark
287f5ac31dfdc074669182f51ece637706070eeb
336,469,903,190,616,630,000,000,000,000,000,000,000
62
pict: Fixed a bug with ICC profile extraction Could cause a NULL pointer dereference. Found by F. Çelik.
int numa_zonelist_order_handler(struct ctl_table *table, int write, void __user *buffer, size_t *length, loff_t *ppos) { char *str; int ret; if (!write) return proc_dostring(table, write, buffer, length, ppos); str = memdup_user_nul(buffer, 16); if (IS_ERR(str)) return PTR_ERR(str); ret = __parse_numa_z...
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
93,665,319,128,016,260,000,000,000,000,000,000,000
17
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...
static const char* format() { return "%.17g"; }
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
338,005,108,986,134,200,000,000,000,000,000,000,000
1
Fix other issues in 'CImg<T>::load_bmp()'.
CtPtr ProtocolV1::read_message_data_prepare() { ldout(cct, 20) << __func__ << dendl; unsigned data_len = current_header.data_len; unsigned data_off = current_header.data_off; if (data_len) { // get a buffer #if 0 // rx_buffers is broken by design... see // http://tracker.ceph.com/issues/22480 ...
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
242,382,627,456,153,940,000,000,000,000,000,000,000
40
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 void keep_sockalive(SOCKETTYPE fd) { const int tcp_one = 1; #ifndef WIN32 const int tcp_keepidle = 45; const int tcp_keepintvl = 30; int flags = fcntl(fd, F_GETFL, 0); fcntl(fd, F_SETFL, O_NONBLOCK | flags); #else u_long flags = 1; ioctlsocket(fd, FIONBIO, &flags); #endif setsockopt(fd, SOL_SOCKET, SO...
0
[ "CWE-20", "CWE-703" ]
sgminer
910c36089940e81fb85c65b8e63dcd2fac71470c
28,197,108,781,907,504,000,000,000,000,000,000,000
31
stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime. Might have introduced a memory leak, don't have time to check. :( Should the other hex2bin()'s be checked? Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this.
static PyObject *Input_close(InputObject *self, PyObject *args) { if (!self->r) { PyErr_SetString(PyExc_RuntimeError, "request object has expired"); return NULL; } if (!PyArg_ParseTuple(args, ":close")) return NULL; Py_INCREF(Py_None); return Py_None; }
0
[ "CWE-264" ]
mod_wsgi
d9d5fea585b23991f76532a9b07de7fcd3b649f4
137,662,448,633,373,120,000,000,000,000,000,000,000
13
Local privilege escalation when using daemon mode. (CVE-2014-0240)
static void f2fs_put_super(struct super_block *sb) { struct f2fs_sb_info *sbi = F2FS_SB(sb); if (sbi->s_proc) { remove_proc_entry("segment_info", sbi->s_proc); remove_proc_entry("segment_bits", sbi->s_proc); remove_proc_entry(sb->s_id, f2fs_proc_root); } kobject_del(&sbi->s_kobj); stop_gc_thread(sbi); /*...
0
[ "CWE-20", "CWE-129" ]
linux
15d3042a937c13f5d9244241c7a9c8416ff6e82a
340,252,574,903,581,340,000,000,000,000,000,000,000
75
f2fs: sanity check checkpoint segno and blkoff Make sure segno and blkoff read from raw image are valid. Cc: stable@vger.kernel.org Signed-off-by: Jin Qian <jinqian@google.com> [Jaegeuk Kim: adjust minor coding style] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static int zlib_wrap_decompress(const char* input, size_t compressed_length, char* output, size_t maxout) { int status; uLongf ul = (uLongf)maxout; status = uncompress( (Bytef*)output, &ul, (Bytef*)input, (uLong)compressed_length); if (status != Z_OK) { return 0; } ...
0
[ "CWE-787" ]
c-blosc2
c4c6470e88210afc95262c8b9fcc27e30ca043ee
146,064,921,760,417,230,000,000,000,000,000,000,000
11
Fixed asan heap buffer overflow when not enough space to write compressed block size.
void ComparisonMatchExpressionBase::serialize(BSONObjBuilder* out) const { out->append(path(), BSON(name() << _rhs)); }
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
319,051,095,833,872,030,000,000,000,000,000,000,000
3
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
create_display_for_user_session (GdmManager *self, GdmSession *session, const char *session_id) { GdmDisplay *display; /* at the moment we only create GdmLocalDisplay objects on seat0 */ const char *seat_id = "seat0"; dis...
0
[]
gdm
ff98b2817014684ae1acec78ff06f0f461a56a9f
39,528,340,421,942,616,000,000,000,000,000,000,000
19
manager: if falling back to X11 retry autologin Right now, we get one shot to autologin. If it fails, we fall back to the greeter. We should give it another go if the reason for the failure was wayland fallback to X. https://bugzilla.gnome.org/show_bug.cgi?id=780520
write_pid_file(const char *path) { FILE *file; unsigned long pid; file = fopen(path, "w"); if (file == NULL) return errno; pid = (unsigned long) getpid(); if (fprintf(file, "%ld\n", pid) < 0 || fclose(file) == EOF) return errno; return 0; }
0
[ "CWE-476" ]
krb5
5d2d9a1abe46a2c1a8614d4672d08d9d30a5f8bf
128,433,977,669,026,770,000,000,000,000,000,000,000
13
Multi-realm KDC null deref [CVE-2013-1418] If a KDC serves multiple realms, certain requests can cause setup_server_realm() to dereference a null pointer, crashing the KDC. CVSSv2: AV:N/AC:M/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C A related but more minor vulnerability requires authentication to exploit, and is only prese...
parser_set_continues_to_current_position (parser_context_t *context_p, /**< context */ parser_branch_node_t *current_p) /**< branch list */ { while (current_p != NULL) { if (current_p->branch.offset & CBC_HIGHEST_BIT_MASK) { parser_set_branch_to_current_positi...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
253,312,294,480,172,800,000,000,000,000,000,000,000
12
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
void send_nt_replies(connection_struct *conn, struct smb_request *req, NTSTATUS nt_error, char *params, int paramsize, char *pdata, int datasize) { int data_to_send = datasize; int params_to_send = paramsize; int useable_space; char *pp = params; char *pd = pdata; int params_sent_thistime, data_s...
0
[ "CWE-189" ]
samba
efdbcabbe97a594572d71d714d258a5854c5d8ce
109,472,872,616,177,600,000,000,000,000,000,000,000
220
Fix bug #10010 - Missing integer wrap protection in EA list reading can cause server to loop with DOS. Ensure we never wrap whilst adding client provided input. CVE-2013-4124 Signed-off-by: Jeremy Allison <jra@samba.org>
static void tcp_v6_send_ack(const struct sock *sk, struct sk_buff *skb, u32 seq, u32 ack, u32 win, u32 tsval, u32 tsecr, int oif, struct tcp_md5sig_key *key, u8 tclass, u32 label) { tcp_v6_send_response(sk, skb, seq, ack, win, tsval, tsecr, oif, key, 0, tclass, label); }
0
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
71,620,936,399,864,660,000,000,000,000,000,000,000
8
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...
virtual uint exists2in_reserved_items() { return 0; };
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
199,525,163,383,755,500,000,000,000,000,000,000,000
1
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....