func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
int __init acpi_boot_init(void) { /* those are executed after early-quirks are executed */ dmi_check_system(acpi_dmi_table_late); /* * If acpi_disabled, bail out */ if (acpi_disabled) return 1; acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf); /* * set sci_int and PM timer address */ acpi_table_parse...
0
[ "CWE-120" ]
linux
dad5ab0db8deac535d03e3fe3d8f2892173fa6a4
49,710,005,781,842,570,000,000,000,000,000,000,000
32
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...
//! Test if one of the image list contains the specified referenced value. /** \param pixel Reference to pixel value to test. **/
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
200,299,137,488,448,400,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
void CModule::OnPartMessage(CPartMessage& Message) { OnPart(Message.GetNick(), *Message.GetChan(), Message.GetReason()); }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
290,470,817,672,563,480,000,000,000,000,000,000,000
3
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, SSL_SESSION *(*cb)(struct ssl_st *ssl, unsigned char *data,int len,int *copy)) { ctx->get_session_cb=cb; }
0
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
225,840,284,633,275,450,000,000,000,000,000,000,000
6
Add SRP support.
lept_write_proc(thandle_t cookie, tdata_t buff, tsize_t size) { FILE* fp = (FILE *)cookie; tsize_t done; if (!buff || !cookie || !fp) return (tsize_t)-1; done = fwrite(buff, 1, size, fp); return done; }
0
[ "CWE-125" ]
leptonica
5ba34b1fe741d69d43a6c8cf767756997eadd87c
172,133,172,137,561,230,000,000,000,000,000,000,000
11
Issue 23654 in oss-fuzz: Heap-buffer-overflow in pixReadFromTiffStream * Increase scanline buffer for reading gray+alpha and converting to RGBA
xbstream_deinit(ds_ctxt_t *ctxt) { ds_stream_ctxt_t *stream_ctxt; stream_ctxt = (ds_stream_ctxt_t *) ctxt->ptr; if (xb_stream_write_done(stream_ctxt->xbstream)) { msg("xb_stream_done() failed."); } if (stream_ctxt->dest_file) { ds_close(stream_ctxt->dest_file); stream_ctxt->dest_file = NULL; } pthread_...
0
[ "CWE-703", "CWE-667" ]
server
b1351c15946349f9daa7e5297fb2ac6f3139e4a8
90,702,535,550,803,740,000,000,000,000,000,000,000
19
MDEV-26574 An improper locking bug due to unreleased lock in the ds_xbstream.cc release lock in all as cases n xbstream_open, also fix the case where malloc would return NULL.
static void brcmf_fill_bss_param(struct brcmf_if *ifp, struct station_info *si) { struct { __le32 len; struct brcmf_bss_info_le bss_le; } *buf; u16 capability; int err; buf = kzalloc(WL_BSS_INFO_MAX, GFP_KERNEL); if (!buf) return; buf->len = cpu_to_le32(WL_BSS_INFO_MAX); err = brcmf_fil_cmd_data_get(ifp...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
337,403,990,886,160,160,000,000,000,000,000,000,000
31
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...
bytes_compare_eq(PyBytesObject *a, PyBytesObject *b) { int cmp; Py_ssize_t len; len = Py_SIZE(a); if (Py_SIZE(b) != len) return 0; if (a->ob_sval[0] != b->ob_sval[0]) return 0; cmp = memcmp(a->ob_sval, b->ob_sval, len); return (cmp == 0); }
0
[ "CWE-190" ]
cpython
6c004b40f9d51872d848981ef1a18bb08c2dfc42
35,301,290,865,950,030,000,000,000,000,000,000,000
15
bpo-30657: Fix CVE-2017-1000158 (#4758) Fixes possible integer overflow in PyBytes_DecodeEscape. Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com>
static inline void tcp_insert_write_queue_after(struct sk_buff *skb, struct sk_buff *buff, struct sock *sk) { __skb_queue_after(&sk->sk_write_queue, skb, buff); }
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
257,183,079,657,841,870,000,000,000,000,000,000,000
6
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...
void dousers(const gchar *const username, const gchar *const groupname) { struct passwd *pw; struct group *gr; gchar* str; if (groupname) { gr = getgrnam(groupname); if(!gr) { str = g_strdup_printf("Invalid group name: %s", groupname); err(str); } if(setgid(gr->gr_gid)<0) { err("Could not set GID: ...
0
[ "CWE-399", "CWE-310" ]
nbd
741495cb08503fd32a9d22648e63b64390c601f4
315,238,712,639,334,930,000,000,000,000,000,000,000
25
nbd-server: handle modern-style negotiation in a child process Previously, the modern style negotiation was carried out in the root server (listener) process before forking the actual client handler. This made it possible for a malfunctioning or evil client to terminate the root process simply by querying a non-existe...
SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, u32, to_submit, u32, min_complete, u32, flags, const void __user *, argp, size_t, argsz) { struct io_ring_ctx *ctx; int submitted = 0; struct fd f; long ret; io_run_task_work(); if (unlikely(flags & ~(IORING_ENTER_GETEVENTS | IORING_ENTER_SQ_WAKEUP | ...
0
[ "CWE-125" ]
linux
89c2b3b74918200e46699338d7bcc19b1ea12110
16,535,728,828,066,083,000,000,000,000,000,000,000
93
io_uring: reexpand under-reexpanded iters [ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900 [ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task syz-executor.0/828 [ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted 5.14.0-rc3-next-20210730 #1 [ 74.216525] Hardware n...
futex_wake(u32 __user *uaddr, unsigned int flags, int nr_wake, u32 bitset) { struct futex_hash_bucket *hb; struct futex_q *this, *next; union futex_key key = FUTEX_KEY_INIT; int ret; DEFINE_WAKE_Q(wake_q); if (!bitset) return -EINVAL; ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &key, VERIFY_READ); if (...
0
[ "CWE-190" ]
linux
fbe0e839d1e22d88810f3ee3e2f1479be4c0aa4a
222,413,995,595,823,730,000,000,000,000,000,000,000
47
futex: Prevent overflow by strengthen input validation UBSAN reports signed integer overflow in kernel/futex.c: UBSAN: Undefined behaviour in kernel/futex.c:2041:18 signed integer overflow: 0 - -2147483648 cannot be represented in type 'int' Add a sanity check to catch negative values of nr_wake and nr_requeue. ...
rb_str_s_try_convert(VALUE dummy, VALUE str) { return rb_check_string_type(str); }
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
33,365,951,643,336,735,000,000,000,000,000,000,000
4
* string.c (rb_str_justify): CVE-2009-4124. Fixes a bug reported by Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London; Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static void reds_mig_fill_wait_disconnect(RedsState *reds) { spice_assert(!reds->clients.empty()); /* tracking the clients, in order to ignore disconnection * of clients that got connected to the src after migration completion.*/ for (auto client: reds->clients) { reds->mig_wait_disconnect_clie...
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
111,070,661,309,409,480,000,000,000,000,000,000,000
12
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>
gen_S(codegen_scope *s, uint16_t i) { emit_S(s, s->pc, i); s->pc += 2; }
0
[ "CWE-415", "CWE-122" ]
mruby
38b164ace7d6ae1c367883a3d67d7f559783faad
130,943,454,607,941,730,000,000,000,000,000,000,000
5
codegen.c: fix a bug in `gen_values()`. - Fix limit handling that fails 15 arguments method calls. - Fix too early argument packing in arrays.
CameraMetaDataLR() : CameraMetaData() {}
0
[ "CWE-119", "CWE-787" ]
LibRaw
2f912f5b33582961b1cdbd9fd828589f8b78f21d
12,097,164,589,527,206,000,000,000,000,000,000,000
1
fixed wrong data_maximum calcluation; prevent out-of-buffer in exp_bef
static bool parse_rssi(DBusMessageIter *value, struct discovery_filter *filter) { if (dbus_message_iter_get_arg_type(value) != DBUS_TYPE_INT16) return false; dbus_message_iter_get_basic(value, &filter->rssi); /* -127 <= RSSI <= +20 (spec V4.2 [Vol 2, Part E] 7.7.65.2) */ if (filter->rssi > 20 || filter->rssi < -...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
77,816,604,774,840,520,000,000,000,000,000,000,000
12
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
mrb_module_get_under(mrb_state *mrb, struct RClass *outer, const char *name) { return module_from_sym(mrb, outer, mrb_intern_cstr(mrb, name)); }
0
[ "CWE-476", "CWE-415" ]
mruby
faa4eaf6803bd11669bc324b4c34e7162286bfa3
242,148,556,061,457,330,000,000,000,000,000,000,000
4
`mrb_class_real()` did not work for `BasicObject`; fix #4037
static inline struct rtable *bridge_parent_rtable(const struct net_device *dev) { struct net_bridge_port *port; port = br_port_get_rcu(dev); return port ? &port->br->fake_rtable : NULL; }
0
[]
linux-2.6
f8e9881c2aef1e982e5abc25c046820cd0b7cf64
309,666,262,866,819,480,000,000,000,000,000,000,000
7
bridge: reset IPCB in br_parse_ip_options Commit 462fb2af9788a82 (bridge : Sanitize skb before it enters the IP stack), missed one IPCB init before calling ip_options_compile() Thanks to Scot Doyle for his tests and bug reports. Reported-by: Scot Doyle <lkml@scotdoyle.com> Signed-off-by: Eric Dumazet <eric.dumazet@g...
static unsigned long __init find_function32(struct lib32_elfinfo *lib, const char *symname) { Elf32_Sym *sym = find_symbol32(lib, symname); if (sym == NULL) { printk(KERN_WARNING "vDSO32: function %s not found !\n", symname); return 0; } return sym->st_value - VDSO32_LBASE; }
0
[ "CWE-20" ]
linux-2.6
89f5b7da2a6bad2e84670422ab8192382a5aeb9f
211,875,206,615,587,950,000,000,000,000,000,000,000
12
Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit 557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed the ZERO_PAGE from the VM mappings, any users of get_user_pages() will generally now populate the VM with real emp...
cpl_searchbyname (name) const char *name; { struct cpelement *cp; for (cp = coproc_list.head ; cp; cp = cp->next) if (STREQ (cp->coproc->c_name, name)) return cp; return (struct cpelement *)NULL; }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
333,578,520,256,026,930,000,000,000,000,000,000,000
10
bash-4.4-rc2 release
int iommu_calculate_agaw(struct intel_iommu *iommu) { return __iommu_calculate_agaw(iommu, DEFAULT_DOMAIN_ADDRESS_WIDTH); }
0
[]
linux
d8b8591054575f33237556c32762d54e30774d28
29,286,298,182,803,966,000,000,000,000,000,000,000
4
iommu/vt-d: Disable ATS support on untrusted devices Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted devices") disables ATS support on the devices which have been marked as untrusted. Unfortunately this is not enough to fix the DMA attack vulnerabiltiies because IOMMU driver allows translated reques...
int vhost_init_used(struct vhost_virtqueue *vq) { __virtio16 last_used_idx; int r; if (!vq->private_data) { vq->is_le = virtio_legacy_is_little_endian(); return 0; } vhost_init_is_le(vq); r = vhost_update_used_flags(vq); if (r) return r; vq->signalled_used_valid = false; if (!access_ok(VERIFY_READ, &vq...
0
[ "CWE-399" ]
linux
7932c0bd7740f4cd2aa168d3ce0199e7af7d72d5
151,789,766,741,292,860,000,000,000,000,000,000,000
23
vhost: actually track log eventfd file While reviewing vhost log code, I found out that log_file is never set. Note: I haven't tested the change (QEMU doesn't use LOG_FD yet). Cc: stable@vger.kernel.org Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
static void spl_array_update_pos(spl_array_object* intern) /* {{{ */ { Bucket *pos = intern->pos; if (pos != NULL) { intern->pos_h = pos->h; } } /* }}} */
0
[]
php-src
a374dfab567ff7f0ab0dc150f14cc891b0340b47
260,028,908,772,339,800,000,000,000,000,000,000,000
7
Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion
int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) { int n, ret; unsigned int i, b, bl; if (ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) { ret = ctx->cipher->do_cipher(ctx, out, NULL, 0); if (ret < 0) return 0; else *outl = ret; ...
0
[ "CWE-189" ]
openssl
3f3582139fbb259a1c3cbb0a25236500a409bf26
276,413,593,307,769,800,000,000,000,000,000,000,000
41
Fix encrypt overflow An overflow can occur in the EVP_EncryptUpdate function. If an attacker is able to supply very large amounts of input data after a previous call to EVP_EncryptUpdate with a partial block then a length check can overflow resulting in a heap corruption. Following an analysis of all OpenSSL internal...
populate_lr_context(struct intel_context *ce, struct drm_i915_gem_object *ctx_obj, struct intel_engine_cs *engine, struct intel_ring *ring) { bool inhibit = true; void *vaddr; u32 *regs; int ret; vaddr = i915_gem_object_pin_map(ctx_obj, I915_MAP_WB); if (IS_ERR(vaddr)) { ret = PTR_ERR(vaddr);...
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
287,949,695,516,737,900,000,000,000,000,000,000,000
48
drm/i915/gen9: Clear residual context state on context switch Intel ID: PSIRT-TA-201910-001 CVEID: CVE-2019-14615 Intel GPU Hardware prior to Gen11 does not clear EU state during a context switch. This can result in information leakage between contexts. For Gen8 and Gen9, hardware provides a mechanism for fast clear...
static BOOL kerberos_mk_tgt_token(SecBuffer* buf, int msg_type, char* sname, char* host, const krb5_data* ticket) { WinPrAsn1Encoder* enc; WinPrAsn1_MemoryChunk data; wStream s; size_t len; sspi_gss_data token; BOOL ret = FALSE; WINPR_ASSERT(buf); if (msg_type != KRB_TGT_REQ ...
0
[]
FreeRDP
479e891545473f01c187daffdfa05fc752b54b72
186,606,726,004,245,640,000,000,000,000,000,000,000
85
check return values for SetCredentialsAttributes, throw warnings for unsupported attributes
static int vhost_net_buf_produce(struct vhost_net_virtqueue *nvq) { struct vhost_net_buf *rxq = &nvq->rxq; rxq->head = 0; rxq->tail = ptr_ring_consume_batched(nvq->rx_ring, rxq->queue, VHOST_NET_BATCH); return rxq->tail; }
0
[ "CWE-787" ]
linux
42d84c8490f9f0931786f1623191fcab397c3d64
46,281,853,078,227,520,000,000,000,000,000,000,000
9
vhost: Check docket sk_family instead of call getname Doing so, we save one call to get data we already have in the struct. Also, since there is no guarantee that getname use sockaddr_ll parameter beyond its size, we add a little bit of security here. It should do not do beyond MAX_ADDR_LEN, but syzbot found that ax2...
print_set_output(char *name, TBOOLEAN datablock, TBOOLEAN append_p) { if (print_out && print_out != stderr && print_out != stdout) { #ifdef PIPES if (print_out_name[0] == '|') { if (0 > pclose(print_out)) perror(print_out_name); } else #endif if (0 > fclose(print_out)) perror(print_out_name); print...
0
[ "CWE-415" ]
gnuplot
052cbd17c3cbbc602ee080b2617d32a8417d7563
335,994,289,631,102,400,000,000,000,000,000,000,000
61
successive failures of "set print <foo>" could cause double-free Bug #2312
static int svm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) { unsigned long host_cr4_mce = cr4_read_shadow() & X86_CR4_MCE; unsigned long old_cr4 = to_svm(vcpu)->vmcb->save.cr4; if (cr4 & X86_CR4_VMXE) return 1; if (npt_enabled && ((old_cr4 ^ cr4) & X86_CR4_PGE)) svm_flush_tlb(vcpu, true); vcpu->arch.c...
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
87,174,512,511,506,850,000,000,000,000,000,000,000
19
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
static int packet_create(struct net *net, struct socket *sock, int protocol, int kern) { struct sock *sk; struct packet_sock *po; __be16 proto = (__force __be16)protocol; /* weird, but documented */ int err; if (!ns_capable(net->user_ns, CAP_NET_RAW)) return -EPERM; if (sock->type != SOCK_DGRAM && sock->ty...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
319,463,875,446,106,560,000,000,000,000,000,000,000
64
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...
void HTTPSession::onChunkHeader(HTTPCodec::StreamID streamID, size_t length) { // The codec's parser detected a chunk header (meaning that this // connection probably is HTTP/1.1). // // After calling onChunkHeader(), the codec will call onBody() zero // or more times and then ...
0
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
118,849,041,877,102,440,000,000,000,000,000,000,000
24
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
void Alter_inplace_info::report_unsupported_error(const char *not_supported, const char *try_instead) const { if (unsupported_reason == NULL) my_error(ER_ALTER_OPERATION_NOT_SUPPORTED, MYF(0), not_supported, try_instead); else my_error(ER_ALTER_...
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
161,618,274,637,260,530,000,000,000,000,000,000,000
10
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
ZEND_API zval* ZEND_FASTCALL _zend_hash_str_update(HashTable *ht, const char *str, size_t len, zval *pData ZEND_FILE_LINE_DC) { zend_string *key = zend_string_init(str, len, ht->u.flags & HASH_FLAG_PERSISTENT); zval *ret = _zend_hash_add_or_update_i(ht, key, pData, HASH_UPDATE ZEND_FILE_LINE_RELAY_CC); zend_string_r...
0
[ "CWE-190" ]
php-src
4cc0286f2f3780abc6084bcdae5dce595daa3c12
322,166,908,650,269,970,000,000,000,000,000,000,000
7
Fix #73832 - leave the table in a safe state if the size is too big.
static bool should_end_transaction(struct btrfs_trans_handle *trans) { struct btrfs_fs_info *fs_info = trans->fs_info; if (btrfs_check_space_for_delayed_refs(fs_info)) return true; return !!btrfs_block_rsv_check(&fs_info->global_block_rsv, 5); }
0
[ "CWE-703", "CWE-667" ]
linux
1cb3db1cf383a3c7dbda1aa0ce748b0958759947
164,147,188,803,268,160,000,000,000,000,000,000,000
9
btrfs: fix deadlock with concurrent chunk allocations involving system chunks When a task attempting to allocate a new chunk verifies that there is not currently enough free space in the system space_info and there is another task that allocated a new system chunk but it did not finish yet the creation of the respecti...
std::string PngChunk::zlibCompress(const std::string& text) { uLongf compressedLen = static_cast<uLongf>(text.size() * 2); // just a starting point int zlibResult; DataBuf arr; do { arr.alloc(compressedLen); zlibResult = c...
0
[ "CWE-770" ]
exiv2
8cdb330743b7b7f1a8e34514effde34d67c77577
189,939,031,806,292,200,000,000,000,000,000,000,000
35
Merge two enforces into one. (cherry picked from commit 43f154f44b838e6b232193ccbd48e5a2e94bdd35)
static void S_pat_upgrade_to_utf8(pTHX_ RExC_state_t * const pRExC_state, char **pat_p, STRLEN *plen_p, int num_code_blocks) { U8 *const src = (U8*)*pat_p; U8 *dst, *d; int n=0; STRLEN s = 0; bool do_end = 0; GET_RE_DEBUG_FLAGS_DECL; DEBUG_PARSE_r(Perl_re_printf( aTHX_ "UTF8 m...
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
238,592,787,483,056,120,000,000,000,000,000,000,000
42
regcomp.c: Prevent integer overflow from nested regex quantifiers. (CVE-2020-10543) On 32bit systems the size calculations for nested regular expression quantifiers could overflow causing heap memory corruption. Fixes: Perl/perl5-security#125 (cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71)
static inline void hugetlb_set_vma_policy(struct vm_area_struct *vma, struct inode *inode, pgoff_t index) { }
0
[]
linux
9aacdd354d197ad64685941b36d28ea20ab88757
151,676,074,367,387,400,000,000,000,000,000,000,000
4
fs/hugetlbfs/inode.c: fix bugs in hugetlb_vmtruncate_list() Hillf Danton noticed bugs in the hugetlb_vmtruncate_list routine. The argument end is of type pgoff_t. It was being converted to a vaddr offset and passed to unmap_hugepage_range. However, end was also being used as an argument to the vma_interval_tree_for...
TEST_P(Http2IntegrationTest, RouterRequestAndResponseWithBodyNoBuffer) { testRouterRequestAndResponseWithBody(1024, 512, false, false); }
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
124,251,868,425,919,150,000,000,000,000,000,000,000
3
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
NOEXPORT char *tls_methods_check(SERVICE_OPTIONS *section) { (void)section; /* squash the unused parameter warning */ #ifdef USE_FIPS if(new_global_options.option.fips) { #ifndef OPENSSL_NO_SSL2 if(section->option.client ? section->client_method==(SSL_METHOD *)SSLv2_client_method() : ...
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
155,347,887,773,232,200,000,000,000,000,000,000,000
20
stunnel-5.57
cls(void) { int c; c = gchar_cursor(); if (c == ' ' || c == '\t' || c == NUL) return 0; if (enc_dbcs != 0 && c > 0xFF) { // If cls_bigword, report multi-byte chars as class 1. if (enc_dbcs == DBCS_KOR && cls_bigword) return 1; // process code leading/trailing bytes return dbcs_class(...
0
[ "CWE-126", "CWE-787" ]
vim
53a70289c2712808e6d4e88927e03cac01b470dd
288,997,157,465,713,840,000,000,000,000,000,000,000
32
patch 8.2.4925: trailing backslash may cause reading past end of line Problem: Trailing backslash may cause reading past end of line. Solution: Check for NUL after backslash.
CURLcode Curl_http_auth_act(struct connectdata *conn) { struct SessionHandle *data = conn->data; bool pickhost = FALSE; bool pickproxy = FALSE; CURLcode code = CURLE_OK; if(100 <= data->req.httpcode && 199 >= data->req.httpcode) /* this is a transient response code, ignore */ return CURLE_OK; if(d...
0
[ "CWE-284" ]
curl
f78ae415d24b9bd89d6c121c556e411fdb21c6aa
314,907,065,182,261,880,000,000,000,000,000,000,000
70
Don't clear GSSAPI state between each exchange in the negotiation GSSAPI doesn't work very well if we forget everything ever time. XX: Is Curl_http_done() the right place to do the final cleanup?
int ar6000_create_ap_interface(struct ar6_softc *ar, char *ap_ifname) { struct net_device *dev; struct ar_virtual_interface *arApDev; dev = alloc_etherdev(sizeof(struct ar_virtual_interface)); if (dev == NULL) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_create_ap_interface: can't alloc etherdev\n"...
1
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
266,722,780,082,755,960,000,000,000,000,000,000,000
32
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) { BN_ULONG t; int i; bn_wcheck_size(a, nwords); bn_wcheck_size(b, nwords); assert(a != b); assert((condition & (condition - 1)) == 0); assert(sizeof(BN_ULONG) >= sizeof(int)); condition = ((condition - 1) >> ...
0
[ "CWE-310" ]
openssl
aab7c770353b1dc4ba045938c8fb446dd1c4531e
288,486,101,575,260,870,000,000,000,000,000,000,000
66
Elliptic curve scalar multiplication with timing attack defenses Co-authored-by: Nicola Tuveri <nic.tuv@gmail.com> Co-authored-by: Cesar Pereida Garcia <cesar.pereidagarcia@tut.fi> Co-authored-by: Sohaib ul Hassan <soh.19.hassan@gmail.com> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt...
static MagickBooleanType RollFourier(const size_t width,const size_t height, const ssize_t x_offset,const ssize_t y_offset,double *roll_pixels) { double *source_pixels; MemoryInfo *source_info; register ssize_t i, x; ssize_t u, v, y; /* Move zero frequency (DC, average co...
0
[ "CWE-125" ]
ImageMagick
7c2c5ba5b8e3a0b2b82f56c71dfab74ed4006df7
338,757,496,126,753,200,000,000,000,000,000,000,000
48
https://github.com/ImageMagick/ImageMagick/issues/1588
void readcb(struct ev_loop *loop, ev_io *w, int revents) { auto conn = static_cast<Connection *>(w->data); auto handler = static_cast<ClientHandler *>(conn->data); if (handler->do_read() != 0) { delete handler; return; } }
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
210,862,715,723,056,530,000,000,000,000,000,000,000
9
Don't read too greedily
R_API ut64 r_bin_java_inner_class_attr_calc_size(RBinJavaClassesAttribute *icattr) { ut64 size = 0; if (icattr) { // icattr->inner_class_info_idx = R_BIN_JAVA_USHORT (buffer, offset); size += 2; // icattr->outer_class_info_idx = R_BIN_JAVA_USHORT (buffer, offset); size += 2; // icattr->inner_name_idx = R_BI...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
69,239,952,620,424,940,000,000,000,000,000,000,000
14
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
gif_initialise_frame_extensions(gif_animation *gif, const int frame) { const unsigned char *gif_data, *gif_end; ssize_t gif_bytes; ssize_t block_size; /* Get our buffer position etc. */ gif_data = (const unsigned char *)(gif->gif_data + gif->buffer_position); gif_end = (...
0
[ "CWE-476" ]
chafa
e4b777c7b7c144cd16a0ea96108267b1004fe6c9
285,157,356,279,119,100,000,000,000,000,000,000,000
114
libnsgif: Fix null pointer deref on frameless GIF input A crafted GIF file with no frame data could cause a null pointer dereference leading to denial of service (crash). Reported by @JieyongMa via huntr.dev.
void DilatedIm2col(const T* input_data, const Dims<4>& input_dims, const Dims<4>& filter_dims, int stride_width, int stride_height, int dilation_width_factor, int dilation_height_factor, int pad_width, int pad_height, const Dims<4>& output_dims...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
191,052,313,659,308,800,000,000,000,000,000,000,000
20
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
int X509_print(BIO *bp, X509 *x) { return X509_print_ex(bp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT); }
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
80,380,048,551,795,080,000,000,000,000,000,000,000
4
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
void krb5_auth_done(struct tevent_req *req) { int ret; struct be_req *be_req = tevent_req_callback_data(req, struct be_req); int pam_status; int dp_err; struct pam_data *pd; struct krb5_ctx *krb5_ctx; pd = talloc_get_type(be_req->req_data, struct pam_data); ret = krb5_auth_recv(req, &p...
0
[ "CWE-287" ]
sssd
fffdae81651b460f3d2c119c56d5caa09b4de42a
179,236,275,455,022,200,000,000,000,000,000,000,000
29
Fix bad password caching when using automatic TGT renewal Fixes CVE-2011-1758, https://fedorahosted.org/sssd/ticket/856
Zone::Zone(Isolate* isolate) : zone_excess_limit_(256 * MB), segment_bytes_allocated_(0), position_(0), limit_(0), scope_nesting_(0), segment_head_(NULL), isolate_(isolate) { }
0
[ "CWE-119" ]
node
fcb9145e291e8cb82164bc1fe3db1c1dae219b55
317,203,817,030,493,900,000,000,000,000,000,000,000
9
deps: backport 3a9bfec from v8 upstream Some of the logic from `zone.cc` is found in `zone-inl.h` in this release stream. Original commit message: Fix overflow issue in Zone::New When requesting a large allocation near the end of the address space, the computation could overflow and erroneously *not* grow the...
nbd_unlocked_set_uri_allow_transports (struct nbd_handle *h, uint32_t mask) { h->uri_allow_transports = mask; return 0; }
0
[ "CWE-252" ]
libnbd
c79706af4e7475bf58861a143b77b77a54e7a1cd
236,757,256,299,809,730,000,000,000,000,000,000,000
5
api: Add new API nbd_set_pread_initialize() The recent patch series for CVE-2022-0485 demonstrated that when applications using libnbd are not careful about error checking, the difference on whether a data leak is at least sanitized (all zeroes, partial reads, or data leftover from a prior read) vs. a dangerous inform...
get_id_from_digit_string (const char *digit_string, uid_t *id) { long scanned_id; char c; g_assert (id != NULL); /* Only accept string if it has one integer with nothing * afterwards. */ if (sscanf (digit_string, "%ld%c", &scanned_id, &c) != 1) { return FALSE; } *id = scanned_id; return TRUE; }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
41,559,093,794,204,504,000,000,000,000,000,000,000
16
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
const char* ExpressionIn::getOpName() const { return "$in"; }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
120,106,427,535,748,130,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
static inline unsigned int debug_guardpage_minorder(void) { return 0; }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
336,999,781,847,903,800,000,000,000,000,000,000,000
1
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static int uas_reset_resume(struct usb_interface *intf) { struct Scsi_Host *shost = usb_get_intfdata(intf); struct uas_dev_info *devinfo = (struct uas_dev_info *)shost->hostdata; unsigned long flags; int err; err = uas_configure_endpoints(devinfo); if (err) { shost_printk(KERN_ERR, shost, "%s: alloc st...
0
[ "CWE-125" ]
linux
786de92b3cb26012d3d0f00ee37adf14527f35c4
106,846,694,995,445,070,000,000,000,000,000,000,000
21
USB: uas: fix bug in handling of alternate settings The uas driver has a subtle bug in the way it handles alternate settings. The uas_find_uas_alt_setting() routine returns an altsetting value (the bAlternateSetting number in the descriptor), but uas_use_uas_driver() then treats that value as an index to the intf->al...
au_get_grouparg(char_u **argp) { char_u *group_name; char_u *p; char_u *arg = *argp; int group = AUGROUP_ALL; for (p = arg; *p && !VIM_ISWHITE(*p) && *p != '|'; ++p) ; if (p > arg) { group_name = vim_strnsave(arg, p - arg); if (group_name == NULL) // out of memory return AUGROUP_E...
0
[ "CWE-122", "CWE-787" ]
vim
5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089
197,752,686,962,188,360,000,000,000,000,000,000,000
23
patch 9.0.0061: ml_get error with nested autocommand Problem: ml_get error with nested autocommand. Solution: Also check line numbers for a nested autocommand. (closes #10761)
static int rtnetlink_event(struct notifier_block *this, unsigned long event, void *ptr) { struct net_device *dev = netdev_notifier_info_to_dev(ptr); switch (event) { case NETDEV_UP: case NETDEV_DOWN: case NETDEV_PRE_UP: case NETDEV_POST_INIT: case NETDEV_REGISTER: case NETDEV_CHANGE: case NETDEV_PRE_TYPE_CHAN...
0
[ "CWE-200" ]
net
5f8e44741f9f216e33736ea4ec65ca9ac03036e6
76,361,634,162,056,860,000,000,000,000,000,000,000
25
net: fix infoleak in rtnetlink The stack object “map” has a total size of 32 bytes. Its last 4 bytes are padding generated by compiler. These padding bytes are not initialized and sent out via “nla_put”. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
asmlinkage long sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid) { int retval; retval = security_task_setgid(rgid, egid, sgid, LSM_SETID_RES); if (retval) return retval; if (!capable(CAP_SETGID)) { if ((rgid != (gid_t) -1) && (rgid != current->gid) && (rgid != current->egid) && (rgid != current->sgid))...
0
[ "CWE-20" ]
linux-2.6
9926e4c74300c4b31dee007298c6475d33369df0
338,614,515,044,405,350,000,000,000,000,000,000,000
36
CPU time limit patch / setrlimit(RLIMIT_CPU, 0) cheat fix As discovered here today, the change in Kernel 2.6.17 intended to inhibit users from setting RLIMIT_CPU to 0 (as that is equivalent to unlimited) by "cheating" and setting it to 1 in such a case, does not make a difference, as the check is done in the wrong pla...
static bool checkreturn decode_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field) { #ifdef PB_ENABLE_MALLOC /* When decoding an oneof field, check if there is old data that must be * released first. */ if (PB_HTYPE(field->type) == PB_HTYPE_ONEOF) { if (!pb_release_uni...
0
[ "CWE-763" ]
nanopb
e2f0ccf939d9f82931d085acb6df8e9a182a4261
160,377,920,473,092,440,000,000,000,000,000,000,000
27
Fix invalid free() with oneof (#647) Nanopb would call free() or realloc() on an invalid (attacker controlled) pointer value when all the following conditions are true: - PB_ENABLE_MALLOC is defined at the compile time - Message definition contains an oneof field, and the oneof contains at least one pointer type fi...
static void do_utfmoveback_invalid(compiler_common *common) { /* Goes one character back. */ DEFINE_COMPILER; struct sljit_jump *exit_invalid[3]; sljit_emit_fast_enter(compiler, RETURN_ADDR, 0); exit_invalid[0] = CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, 0x400); exit_invalid[1] = CMP(SLJIT_GREATER_EQUAL, TMP2, 0, STR_PTR, ...
0
[ "CWE-125" ]
pcre2
50a51cb7e67268e6ad417eb07c9de9bfea5cc55a
177,211,139,369,416,740,000,000,000,000,000,000,000
27
Fixed a unicode properrty matching issue in JIT
static int may_delete(struct inode *dir,struct dentry *victim,int isdir) { int error; if (!victim->d_inode) return -ENOENT; BUG_ON(victim->d_parent->d_inode != dir); audit_inode_child(victim->d_name.name, victim, dir); error = inode_permission(dir, MAY_WRITE | MAY_EXEC); if (error) return error; if (IS_AP...
0
[ "CWE-20", "CWE-362", "CWE-416" ]
linux
86acdca1b63e6890540fa19495cfc708beff3d8b
255,091,471,220,555,950,000,000,000,000,000,000,000
31
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 int cmd_rap(void *data, const char *input) { RCore *core = (RCore *)data; switch (*input) { case '$': aliascmd (core, input + 1); break; case '\0': r_core_rtr_list (core); break; case 'h': r_core_rtr_http (core, getArg (input[1], 'h'), input + 1); break; case 'H': while (input[1] == ' ') { input++...
0
[ "CWE-119", "CWE-787" ]
radare2
00e8f205475332d7842d0f0d1481eeab4e83017c
90,573,022,601,249,650,000,000,000,000,000,000,000
38
Fix #7727 - undefined pointers and out of band string access fixes
static void smbXcli_conn_samba_suicide_done(struct tevent_req *subreq) { struct tevent_req *req = tevent_req_callback_data( subreq, struct tevent_req); struct smbXcli_conn_samba_suicide_state *state = tevent_req_data( req, struct smbXcli_conn_samba_suicide_state); ssize_t nwritten; int err; state->write_req =...
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
142,070,968,236,198,870,000,000,000,000,000,000,000
21
CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
static ssize_t slab_size_show(struct kmem_cache *s, char *buf) { return sprintf(buf, "%d\n", s->size); }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
277,419,760,409,466,930,000,000,000,000,000,000,000
4
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
_asn1_error_description_tag_error (asn1_node node, char *ErrorDescription) { Estrcpy (ErrorDescription, ":: tag error near element '"); _asn1_hierarchical_name (node, ErrorDescription + strlen (ErrorDescription), ASN1_MAX_ERROR_DESCRIPTION_SIZE - 40); Estrcat (ErrorDescription, "'"); }
0
[]
libtasn1
ff3b5c68cc32e30d19edbbc3a962b2266029f3cc
260,828,310,894,019,120,000,000,000,000,000,000,000
9
Corrected an off-by-one error. The issue was discovered using the codenomicon TLS suite.
test_bson_append_code_with_scope (void) { const uint8_t *scope_buf = NULL; uint32_t scopelen = 0; uint32_t len = 0; bson_iter_t iter; bool r; const char *code = NULL; bson_t *b; bson_t *b2; bson_t *scope; /* Test with NULL bson, which converts to just CODE type. */ b = bson_new (); ...
1
[ "CWE-125" ]
libbson
42900956dc461dfe7fb91d93361d10737c1602b3
190,485,542,827,594,900,000,000,000,000,000,000,000
57
CDRIVER-2269 Check for zero string length in codewscope
htmlCtxtReadIO(htmlParserCtxtPtr ctxt, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options) { xmlParserInputBufferPtr input; xmlParserInputPtr stream; if (ioread == NULL) return (NULL); if...
0
[ "CWE-399" ]
libxml2
de0cc20c29cb3f056062925395e0f68d2250a46f
182,912,780,418,081,000,000,000,000,000,000,000,000
30
Fix some buffer conversion issues https://bugzilla.gnome.org/show_bug.cgi?id=690202 Buffer overflow errors originating from xmlBufGetInputBase in 2.9.0 The pointers from the context input were not properly reset after that call which can do reallocations.
static int open_url(HLSContext *c, URLContext **uc, const char *url, AVDictionary *opts) { AVDictionary *tmp = NULL; int ret; const char *proto_name = avio_find_protocol_name(url); if (!proto_name) return AVERROR_INVALIDDATA; // only http(s) & file are allowed if (av_strstart(proto_nam...
0
[ "CWE-416" ]
FFmpeg
6959358683c7533f586c07a766acc5fe9544d8b2
10,429,006,717,406,580,000,000,000,000,000,000,000
43
avformat/hls: check segment duration value of EXTINF fix ticket: 8673 set the default EXTINF duration to 1ms if duration is smaller than 1ms Signed-off-by: Steven Liu <lq@chinaffmpeg.org> (cherry picked from commit 9dfb19baeb86a8bb02c53a441682c6e9a6e104cc)
xsltNumberFormat(xsltTransformContextPtr ctxt, xsltNumberDataPtr data, xmlNodePtr node) { xmlBufferPtr output = NULL; int amount, i; double number; xsltFormat tokens; if (data->format != NULL) { xsltNumberFormatTokenize(data->format, &tokens); } else { xmlChar *format;...
0
[ "CWE-119" ]
libxslt
d182d8f6ba3071503d96ce17395c9d55871f0242
108,837,664,887,797,480,000,000,000,000,000,000,000
109
Fix xsltNumberFormatGetMultipleLevel Namespace nodes are actually an xmlNs, not an xmlNode. They must be special-cased in xsltNumberFormatGetMultipleLevel to avoid an out-of-bounds heap access. Move the test whether a node matches the "count" pattern to a separate function to make the code more readable. As a side ef...
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { const TfLitePackParams* data = reinterpret_cast<TfLitePackParams*>(node->builtin_data); TfLiteTensor* output; TF_LITE_ENSURE_OK(context, GetOutputSafe(context, node, kOutputTensor, &output)); switch (output->type) { cas...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
11,242,992,935,237,330,000,000,000,000,000,000,000
41
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC) { xmlParserCtxtPtr ctxt = NULL; xmlDocPtr ret; zend_bool old_allow_url_fopen; /* xmlInitParser(); */ old_allow_url_fopen = PG(allow_url_fopen); PG(allow_url_fopen) = 1; ctxt = xmlCreateFileParserCtxt(filename); PG(allow_url_fopen) = old_allow_url_fop...
1
[ "CWE-200" ]
php-src
8e76d0404b7f664ee6719fd98f0483f0ac4669d6
203,463,314,448,798,470,000,000,000,000,000,000,000
47
Fixed external entity loading
void hci_uart_set_speeds(struct hci_uart *hu, unsigned int init_speed, unsigned int oper_speed) { hu->init_speed = init_speed; hu->oper_speed = oper_speed; }
0
[ "CWE-416" ]
linux
56897b217a1d0a91c9920cb418d6b3fe922f590a
42,899,506,248,617,390,000,000,000,000,000,000,000
6
Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto() task A: task B: hci_uart_set_proto flush_to_ldisc - p->open(hu) -> h5_open //alloc h5 - receive_buf - set_bit HCI_UART_PROTO_READY - tty_port_default_receive_buf - hci_uar...
static int inet_gro_complete(struct sk_buff *skb, int nhoff) { __be16 newlen = htons(skb->len - nhoff); struct iphdr *iph = (struct iphdr *)(skb->data + nhoff); const struct net_offload *ops; int proto = iph->protocol; int err = -ENOSYS; if (skb->encapsulation) skb_set_inner_network_header(skb, nhoff); csum_...
0
[]
net
79462ad02e861803b3840cc782248c7359451cd9
90,277,364,616,522,030,000,000,000,000,000,000,000
30
net: add validation for the socket syscall protocol argument 郭永刚 reported that one could simply crash the kernel as root by using a simple program: int socket_fd; struct sockaddr_in addr; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_family = 10; socket_fd = socket(10,3,0x40000000); connect(s...
const StreamInfo::StreamInfoImpl& streamInfo() const { return stream_info_; }
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
247,179,722,835,802,350,000,000,000,000,000,000,000
1
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
inet_csk_find_open_port(struct sock *sk, struct inet_bind_bucket **tb_ret, int *port_ret) { struct inet_hashinfo *hinfo = sk->sk_prot->h.hashinfo; int port = 0; struct inet_bind_hashbucket *head; struct net *net = sock_net(sk); int i, low, high, attempt_half; struct inet_bind_bucket *tb; u32 remaining, offset; ...
0
[ "CWE-200", "CWE-415" ]
linux
657831ffc38e30092a2d5f03d385d710eb88b09a
19,986,613,715,625,788,000,000,000,000,000,000,000
72
dccp/tcp: do not inherit mc_list from parent syzkaller found a way to trigger double frees from ip_mc_drop_socket() It turns out that leave a copy of parent mc_list at accept() time, which is very bad. Very similar to commit 8b485ce69876 ("tcp: do not inherit fastopen_req from parent") Initial report from Pray3r, c...
is_beginning_char(unsigned char *ch) { switch (*ch) { case '(': case '[': case '{': case '`': case '<': return 1; default: return 0; } }
0
[ "CWE-476" ]
w3m
59b91cd8e30c86f23476fa81ae005cabff49ebb6
228,980,633,146,202,020,000,000,000,000,000,000,000
13
Prevent segfault with malformed input type Bug-Debian: https://github.com/tats/w3m/issues/7
static Image *ReadOneMNGImage(MngInfo* mng_info, const ImageInfo *image_info, ExceptionInfo *exception) { char page_geometry[MagickPathExtent]; Image *image; MagickBooleanType logging; volatile int first_mng_object, object_id, term_chunk_found, skip_to_iend; volatile ssize...
0
[ "CWE-787" ]
ImageMagick
1f450bb5ba53d275de6d1cd086c98a0b549ad393
183,914,877,067,282,320,000,000,000,000,000,000,000
2,430
https://github.com/ImageMagick/ImageMagick/issues/1716
int sys_fcntl_ptr(int fd, int cmd, void *arg) { int ret; do { ret = fcntl(fd, cmd, arg); } while (ret == -1 && errno == EINTR); return ret; }
0
[ "CWE-20" ]
samba
d77a74237e660dd2ce9f1e14b02635f8a2569653
9,316,278,548,099,773,000,000,000,000,000,000,000
9
s3: nmbd: Fix bug 10633 - nmbd denial of service The Linux kernel has a bug in that it can give spurious wakeups on a non-blocking UDP socket for a non-deliverable packet. When nmbd was changed to use non-blocking sockets it became vulnerable to a spurious wakeup from poll/epoll. Fix sys_recvfile() to return on EWOU...
void trgt_box_del(GF_Box *s) { GF_TrackGroupTypeBox *ptr = (GF_TrackGroupTypeBox *)s; if (ptr == NULL) return; gf_free(ptr); }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
101,698,196,035,347,600,000,000,000,000,000,000,000
6
fixed #2255
void mdesc_populate_present_mask(cpumask_t *mask) { if (tlb_type != hypervisor) return; ncpus_probed = 0; mdesc_iterate_over_cpus(record_one_cpu, NULL, mask); }
0
[ "CWE-476" ]
sparc
80caf43549e7e41a695c6d1e11066286538b336f
330,384,070,180,357,600,000,000,000,000,000,000,000
8
mdesc: fix a missing-check bug in get_vdev_port_node_info() In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated by kstrdup_const(), and it returns NULL when fails. So 'node_info->vdev_port.name' should be checked. Signed-off-by: Gen Zhang <blackgod016574@gmail.com> Signed-off-by: David S. Miller <d...
ssize_t generic_file_splice_read(struct file *in, loff_t *ppos, struct pipe_inode_info *pipe, size_t len, unsigned int flags) { ssize_t spliced; int ret; ret = 0; spliced = 0; while (len) { ret = __generic_file_splice_read(in, ppos, pipe, len, flags); if (ret < 0) break; else if (!ret) { i...
0
[ "CWE-264" ]
linux-2.6
8c34e2d63231d4bf4852bac8521883944d770fe3
40,510,603,707,795,210,000,000,000,000,000,000,000
34
[PATCH] Remove SUID when splicing into an inode Originally from Mark Fasheh <mark.fasheh@oracle.com> generic_file_splice_write() does not remove S_ISUID or S_ISGID. This is inconsistent with the way we generally write to files. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com> Signed-off-by: Jens Axboe <jens.axboe...
fascist_firewall_allows_rs(const routerstatus_t *rs, firewall_connection_t fw_connection, int pref_only) { if (!rs) { return 0; } /* We don't have access to the node-specific IPv6 preference, so use the * generic IPv6 preference instead. */ const or_options_t *options = get_op...
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
43,753,164,226,344,895,000,000,000,000,000,000,000
17
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
http_IsStatus(const struct http *hp, int val) { CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC); assert(val >= 100 && val <= 999); return (val == (hp->status % 1000)); }
0
[ "CWE-703" ]
varnish-cache
c5fd097e5cce8b461c6443af02b3448baef2491d
27,139,463,529,196,210,000,000,000,000,000,000,000
7
Do not call http_hdr_flags() on pseudo-headers In http_EstimateWS(), all headers are passed to the http_isfiltered() function to calculate how many bytes is needed to serialize the entire struct http. http_isfiltered() will check the headers for whether they are going to be filtered out later and if so skip them. How...
static int snd_seq_ioctl_get_subscription(struct snd_seq_client *client, void __user *arg) { int result; struct snd_seq_client *sender = NULL; struct snd_seq_client_port *sport = NULL; struct snd_seq_port_subscribe subs; struct snd_seq_subscribers *p; if (copy_from_user(&subs, arg, sizeof(subs))) return...
0
[ "CWE-703" ]
linux
030e2c78d3a91dd0d27fef37e91950dde333eba1
223,051,655,112,861,830,000,000,000,000,000,000,000
35
ALSA: seq: Fix missing NULL check at remove_events ioctl snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear() unconditionally even if there is no FIFO assigned, and this leads to an Oops due to NULL dereference. The fix is just to add a proper NULL check. Reported-by: Dmitry Vyukov <dvyukov@google.com> Tested-by...
void sev_es_vcpu_reset(struct vcpu_svm *svm) { /* * Set the GHCB MSR value as per the GHCB specification when emulating * vCPU RESET for an SEV-ES guest. */ set_ghcb_msr(svm, GHCB_MSR_SEV_INFO(GHCB_VERSION_MAX, GHCB_VERSION_MIN, sev_enc_bit)); }
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
338,414,185,251,184,200,000,000,000,000,000,000,000
10
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
static void l2cap_monitor_timeout(struct work_struct *work) { struct l2cap_chan *chan = container_of(work, struct l2cap_chan, monitor_timer.work); BT_DBG("chan %p", chan); l2cap_chan_lock(chan); if (!chan->conn) { l2cap_chan_unlock(chan); l2cap_chan_put(chan); return; } l2cap_tx(chan, NULL, ...
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
273,325,023,291,127,900,000,000,000,000,000,000,000
20
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
spnego_gss_wrap_size_limit( OM_uint32 *minor_status, const gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, OM_uint32 req_output_size, OM_uint32 *max_input_size) { OM_uint32 ret; ret = gss_wrap_size_limit(minor_status, context_handle, conf_req_flag, qop_req, req_output_size, ...
1
[ "CWE-18", "CWE-763" ]
krb5
b51b33f2bc5d1497ddf5bd107f791c101695000d
317,009,457,326,357,870,000,000,000,000,000,000,000
17
Fix SPNEGO context aliasing bugs [CVE-2015-2695] The SPNEGO mechanism currently replaces its context handle with the mechanism context handle upon establishment, under the assumption that most GSS functions are only called after context establishment. This assumption is incorrect, and can lead to aliasing violations ...
get_groupset (self) SHELL_VAR *self; { register int i; int ng; ARRAY *a; static char **group_set = (char **)NULL; if (group_set == 0) { group_set = get_group_list (&ng); a = array_cell (self); for (i = 0; i < ng; i++) array_insert (a, i, group_set[i]); } return (self); }
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
286,525,271,584,431,760,000,000,000,000,000,000,000
17
commit bash-20120224 snapshot
static SLJIT_INLINE void compile_braminzero_backtrackingpath(compiler_common *common, struct backtrack_common *current) { assert_backtrack backtrack; current->top = NULL; current->topbacktracks = NULL; current->nextbacktracks = NULL; if (current->cc[1] > OP_ASSERTBACK_NOT) { /* Manual call of compile_bracket_match...
0
[ "CWE-125" ]
php-src
8947fd9e9fdce87cd6c59817b1db58e789538fe9
166,061,187,441,921,680,000,000,000,000,000,000,000
23
Fix #78338: Array cross-border reading in PCRE We backport r1092 from pcre2.
gst_message_parse_mpegts_section (GstMessage * message) { const GstStructure *st; GstMpegtsSection *section; if (message->type != GST_MESSAGE_ELEMENT) return NULL; st = gst_message_get_structure (message); /* FIXME : Add checks against know section names */ if (!gst_structure_id_get (st, QUARK_SECTION...
0
[ "CWE-125" ]
gst-plugins-bad
d58f668ece8795bddb3316832e1848c7b7cf38ac
75,637,845,733,638,240,000,000,000,000,000,000,000
16
mpegtssection: Add more section size checks The smallest section ever needs to be at least 3 bytes (i.e. just the short header). Non-short headers need to be at least 11 bytes long (3 for the minimum header, 5 for the non-short header, and 4 for the CRC). https://bugzilla.gnome.org/show_bug.cgi?id=775048
xfs_get_extsz_hint( struct xfs_inode *ip) { /* * No point in aligning allocations if we need to COW to actually * write to them. */ if (xfs_is_always_cow_inode(ip)) return 0; if ((ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) && ip->i_d.di_extsize) return ip->i_d.di_extsize; if (XFS_IS_REALTIME_INODE(ip)) ret...
0
[]
linux
01ea173e103edd5ec41acec65b9261b87e123fc2
287,736,216,469,407,400,000,000,000,000,000,000,000
15
xfs: fix up non-directory creation in SGID directories XFS always inherits the SGID bit if it is set on the parent inode, while the generic inode_init_owner does not do this in a few cases where it can create a possible security problem, see commit 0fa3ecd87848 ("Fix up non-directory creation in SGID directories") for...
struct MACH0_(obj_t) * MACH0_(new_buf)(RzBuffer *buf, struct MACH0_(opts_t) * options) { rz_return_val_if_fail(buf, NULL); struct MACH0_(obj_t) *bin = RZ_NEW0(struct MACH0_(obj_t)); if (bin) { bin->b = rz_buf_ref(buf); bin->main_addr = UT64_MAX; bin->kv = sdb_new(NULL, "bin.mach0", 0); bin->hash = rz_hash_ne...
0
[ "CWE-787" ]
rizin
348b1447d1452f978b69631d6de5b08dd3bdf79d
145,272,615,149,598,050,000,000,000,000,000,000,000
18
fix #2956 - oob write in mach0.c
static void BuildAndStoreHuffmanTree(const uint32_t* histogram, const size_t histogram_length, const size_t alphabet_size, HuffmanTree* tree, uint8_t* depth, ...
0
[ "CWE-120" ]
brotli
223d80cfbec8fd346e32906c732c8ede21f0cea6
38,193,753,488,960,450,000,000,000,000,000,000,000
49
Update (#826) * IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB * simplify max Huffman table size calculation * eliminate symbol duplicates (static arrays in .h files) * minor combing in research/ code
int device_for_each_child(struct device *parent, void *data, int (*fn)(struct device *dev, void *data)) { struct klist_iter i; struct device *child; int error = 0; if (!parent->p) return 0; klist_iter_init(&parent->p->klist_children, &i); while (!error && (child = next_device(&i))) error = fn(child, da...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
11,506,336,433,754,677,000,000,000,000,000,000,000
16
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
GF_Err gf_node_dom_listener_add(GF_Node *node, GF_Node *listener) { if (!node || !listener) return GF_BAD_PARAM; if (listener->sgprivate->tag!=TAG_SVG_listener) return GF_BAD_PARAM; if (!node->sgprivate->interact) { GF_SAFEALLOC(node->sgprivate->interact, struct _node_interactive_ext); if (!node->sgprivate->i...
0
[ "CWE-416" ]
gpac
9723dd0955894f2cb7be13b94cf7a47f2754b893
192,756,214,564,658,300,000,000,000,000,000,000,000
17
fixed #2109
static void read_pnm_header(FILE *reader, struct pnm_header *ph) { int format, end, ttype; char idf[256], type[256]; char line[256]; if (fgets(line, 250, reader) == NULL) { fprintf(stderr, "\nWARNING: fgets return a NULL value"); return; } if (line[0] != 'P') { fprintf(...
0
[ "CWE-787" ]
openjpeg
e5285319229a5d77bf316bb0d3a6cbd3cb8666d9
269,470,884,660,111,860,000,000,000,000,000,000,000
173
pgxtoimage(): fix write stack buffer overflow (#997)
ctx->template = new_template; } } return GF_OK; } static GF_Err dasher_initialize(GF_Filter *filter) { GF_Err e; GF_DasherCtx *ctx = gf_filter_get_udta(filter); gf_filter_set_max_extra_input_pids(filter, -1); ctx->pids = gf_list_new(); ctx->postponed_pids = gf_list_new(); ctx->tpl_records = gf_list_new(...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
170,895,126,588,487,100,000,000,000,000,000,000,000
70
fixed #2138
xmlUnsetProp(xmlNodePtr node, const xmlChar *name) { xmlAttrPtr prop; prop = xmlGetPropNodeInternal(node, name, NULL, 0); if (prop == NULL) return(-1); xmlUnlinkNode((xmlNodePtr) prop); xmlFreeProp(prop); return(0); }
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
296,665,583,342,815,160,000,000,000,000,000,000,000
10
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...