func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void printer_func_unbind(struct usb_configuration *c, struct usb_function *f) { struct printer_dev *dev; struct usb_request *req; dev = func_to_printer(f); device_destroy(usb_gadget_class, MKDEV(major, dev->minor)); /* Remove Character Device */ cdev_del(&dev->printer_cdev); /* we must already have ...
0
[ "CWE-416" ]
linux
e8d5f92b8d30bb4ade76494490c3c065e12411b1
148,995,604,759,837,180,000,000,000,000,000,000,000
43
usb: gadget: function: printer: fix use-after-free in __lock_acquire Fix this by increase object reference count. BUG: KASAN: use-after-free in __lock_acquire+0x3fd4/0x4180 kernel/locking/lockdep.c:3831 Read of size 8 at addr ffff8880683b0018 by task syz-executor.0/3377 CPU: 1 PID: 3377 Comm: syz-executor.0 Not tain...
static int xt_jumpstack_alloc(struct xt_table_info *i) { unsigned int size; int cpu; size = sizeof(void **) * nr_cpu_ids; if (size > PAGE_SIZE) i->jumpstack = vzalloc(size); else i->jumpstack = kzalloc(size, GFP_KERNEL); if (i->jumpstack == NULL) return -ENOMEM; /* ruleset without jumps -- no stack neede...
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
197,074,379,385,490,320,000,000,000,000,000,000,000
46
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static FILE *inc_fopen_search(const char *file, StrList **slpath, enum incopen_mode omode, enum file_flags fmode) { FILE *fp; char *prefix = ""; const IncPath *ip = ipath; int len = strlen(file); size_t prefix_len = 0; StrList *sl; size_t path_len; bool foun...
0
[ "CWE-125" ]
nasm
3144e84add8b152cc7a71e44617ce6f21daa4ba3
126,751,505,252,031,970,000,000,000,000,000,000,000
42
preproc: Don't access offsting byte on unterminated strings https://bugzilla.nasm.us/show_bug.cgi?id=3392446 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
static int ZEND_FASTCALL ZEND_DIV_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; div_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRML...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
29,447,887,647,577,695,000,000,000,000,000,000,000
12
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static OPJ_BOOL opj_jp2_write_ftyp(opj_jp2_t *jp2, opj_stream_private_t *cio, opj_event_mgr_t * p_manager) { OPJ_UINT32 i; OPJ_UINT32 l_ftyp_size; OPJ_BYTE * l_ftyp_data, * l_current_data_ptr; OPJ_BOOL l_result; /* preconditions ...
0
[ "CWE-20" ]
openjpeg
4edb8c83374f52cd6a8f2c7c875e8ffacccb5fa5
296,098,202,312,996,940,000,000,000,000,000,000,000
51
Add support for generation of PLT markers in encoder * -PLT switch added to opj_compress * Add a opj_encoder_set_extra_options() function that accepts a PLT=YES option, and could be expanded later for other uses. ------- Testing with a Sentinel2 10m band, T36JTT_20160914T074612_B02.jp2, coming from S2A_MSIL1C_20...
static int ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *varptr; if (opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) { /* Had function_ptr at compile_time */ if (!(opline->extended_value & ZEND_ARG_SEND_BY_REF)) {...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
161,733,369,139,263,800,000,000,000,000,000,000,000
49
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
int regset_tls_active(struct task_struct *target, const struct user_regset *regset) { struct thread_struct *t = &target->thread; int n = GDT_ENTRY_TLS_ENTRIES; while (n > 0 && desc_empty(&t->tls_array[n - 1])) --n; return n; }
0
[ "CWE-284", "CWE-264" ]
linux
41bdc78544b8a93a9c6814b8bbbfef966272abbe
174,057,325,243,302,100,000,000,000,000,000,000,000
9
x86/tls: Validate TLS entries to protect espfix Installing a 16-bit RW data segment into the GDT defeats espfix. AFAICT this will not affect glibc, Wine, or dosemu at all. Signed-off-by: Andy Lutomirski <luto@amacapital.net> Acked-by: H. Peter Anvin <hpa@zytor.com> Cc: stable@vger.kernel.org Cc: Konrad Rzeszutek Wilk...
static struct Mailbox *find_mailbox(struct ImapAccountData *adata, const char *name) { if (!adata || !adata->account || !name) return NULL; struct MailboxNode *np = NULL; STAILQ_FOREACH(np, &adata->account->mailboxes, entries) { struct ImapMboxData *mdata = imap_mdata_get(np->mailbox); if (mutt_str...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
67,991,427,439,804,990,000,000,000,000,000,000,000
15
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
static int __init acpi_parse_madt_ioapic_entries(void) { int count; /* * ACPI interpreter is required to complete interrupt setup, * so if it is off, don't enumerate the io-apics with ACPI. * If MPS is present, it will handle them, * otherwise the system will stay in PIC mode */ if (acpi_disabled || acpi_...
0
[ "CWE-120" ]
linux
dad5ab0db8deac535d03e3fe3d8f2892173fa6a4
245,327,513,506,133,360,000,000,000,000,000,000,000
65
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...
void kvm_inject_apic_timer_irqs(struct kvm_vcpu *vcpu) { struct kvm_lapic *apic = vcpu->arch.apic; if (atomic_read(&apic->lapic_timer.pending) > 0) { kvm_apic_inject_pending_timer_irqs(apic); atomic_set(&apic->lapic_timer.pending, 0); } }
0
[ "CWE-703", "CWE-459" ]
linux
f7d8a19f9a056a05c5c509fa65af472a322abfee
89,313,738,494,580,190,000,000,000,000,000,000,000
9
Revert "KVM: x86: Open code necessary bits of kvm_lapic_set_base() at vCPU RESET" Revert a change to open code bits of kvm_lapic_set_base() when emulating APIC RESET to fix an apic_hw_disabled underflow bug due to arch.apic_base and apic_hw_disabled being unsyncrhonized when the APIC is created. If kvm_arch_vcpu_crea...
void ax25_dev_device_down(struct net_device *dev) { ax25_dev *s, *ax25_dev; if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) return; ax25_unregister_dev_sysctl(ax25_dev); spin_lock_bh(&ax25_dev_lock); #ifdef CONFIG_AX25_DAMA_SLAVE ax25_ds_del_timer(ax25_dev); #endif /* * Remove any packet forwarding that ...
1
[ "CWE-416" ]
linux
d01ffb9eee4af165d83b08dd73ebdf9fe94a519b
122,860,793,678,625,880,000,000,000,000,000,000,000
46
ax25: add refcount in ax25_dev to avoid UAF bugs If we dereference ax25_dev after we call kfree(ax25_dev) in ax25_dev_device_down(), it will lead to concurrency UAF bugs. There are eight syscall functions suffer from UAF bugs, include ax25_bind(), ax25_release(), ax25_connect(), ax25_ioctl(), ax25_getname(), ax25_send...
sortassoc(void) { if (numassoc > 1) qsort(assoc_cache, (size_t)numassoc, sizeof(assoc_cache[0]), &assoccmp); }
0
[ "CWE-20" ]
ntp
07a5b8141e354a998a52994c3c9cd547927e56ce
276,113,112,094,902,430,000,000,000,000,000,000,000
6
[TALOS-CAN-0063] avoid buffer overrun in ntpq
void hugetlb_put_quota(struct address_space *mapping, long delta) { struct hugetlbfs_sb_info *sbinfo = HUGETLBFS_SB(mapping->host->i_sb); if (sbinfo->free_blocks > -1) { spin_lock(&sbinfo->stat_lock); sbinfo->free_blocks += delta; spin_unlock(&sbinfo->stat_lock); } }
1
[ "CWE-399" ]
linux
90481622d75715bfcb68501280a917dbfe516029
106,530,360,409,057,700,000,000,000,000,000,000,000
10
hugepages: fix use after free bug in "quota" handling hugetlbfs_{get,put}_quota() are badly named. They don't interact with the general quota handling code, and they don't much resemble its behaviour. Rather than being about maintaining limits on on-disk block usage by particular users, they are instead about maintai...
static TEE_Result get_prop_ta_app_id(struct tee_ta_session *sess, void *buf, size_t *blen) { if (*blen < sizeof(TEE_UUID)) { *blen = sizeof(TEE_UUID); return TEE_ERROR_SHORT_BUFFER; } *blen = sizeof(TEE_UUID); return tee_svc_copy_to_user(buf, &sess->ctx->uuid, sizeof(TEE_UUID)); }
0
[ "CWE-119", "CWE-787" ]
optee_os
d5c5b0b77b2b589666024d219a8007b3f5b6faeb
251,897,341,730,868,250,000,000,000,000,000,000,000
10
core: svc: always check ta parameters Always check TA parameters from a user TA. This prevents a user TA from passing invalid pointers to a pseudo TA. Fixes: OP-TEE-2018-0007: "Buffer checks missing when calling pseudo TAs". Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Joakim Bech <joakim.bec...
njs_promise_value_constructor(njs_vm_t *vm, njs_value_t *value, njs_value_t *dst) { njs_int_t ret; static const njs_value_t string_constructor = njs_string("constructor"); if (njs_is_function(value)) { *dst = *value; return NJS_OK; } ret = njs_value_property(vm, value, njs_v...
0
[ "CWE-416", "CWE-703" ]
njs
31ed93a5623f24ca94e6d47e895ba735d9d97d46
34,790,667,019,414,580,000,000,000,000,000,000,000
25
Fixed aggregation methods of Promise ctor with array-like object. Previously, while iterating over an array-like object the methods may be resolved with INVALID values. INVALID value is a special internal type which should never be visible by ordinary functions. The fix is to ensure that absent elements are represent...
md_get_unicode_fold_info(unsigned codepoint, MD_UNICODE_FOLD_INFO* info) { info->codepoints[0] = codepoint; if(ISUPPER_(codepoint)) info->codepoints[0] += 'a' - 'A'; info->n_codepoints = 1; }
0
[ "CWE-125", "CWE-908" ]
md4c
4fc808d8fe8d8904f8525bb4231d854f45e23a19
111,529,958,809,296,220,000,000,000,000,000,000,000
7
md_analyze_line: Avoid reading 1 byte beyond the input size. Fixes #155.
shell_new_rows(void) { int h = (int)ROWS_AVAIL; if (firstwin == NULL) // not initialized yet return; if (h < frame_minheight(topframe, NULL)) h = frame_minheight(topframe, NULL); // First try setting the heights of windows with 'winfixheight'. If // that doesn't result in the right height, for...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
121,839,279,973,473,600,000,000,000,000,000,000,000
25
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
get_dconf_data (const char *app_id, const char **settings, char **defaults, gsize *defaults_size, char **locks, gsize *locks_size) { #ifdef HAVE_DCONF DConfClient *client = NULL; g_autofree char *prefix = NULL; #endif g_autoptr(GKeyF...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
105,334,974,783,290,960,000,000,000,000,000,000,000
63
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
dns_zone_setcheckns(dns_zone_t *zone, dns_checknsfunc_t checkns) { REQUIRE(DNS_ZONE_VALID(zone)); zone->checkns = checkns; }
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
168,284,371,634,695,580,000,000,000,000,000,000,000
4
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
OFBool DcmSCP::getProgressNotificationMode() const { return m_cfg->getProgressNotificationMode(); }
0
[ "CWE-264" ]
dcmtk
beaf5a5c24101daeeafa48c375120b16197c9e95
197,637,668,727,385,270,000,000,000,000,000,000,000
4
Make sure to handle setuid() return code properly. In some tools the return value of setuid() is not checked. In the worst case this could lead to privilege escalation since the process does not give up its root privileges and continue as root.
Statement_Ptr Expand::operator()(Media_Block_Ptr m) { Media_Block_Obj cpy = SASS_MEMORY_COPY(m); // Media_Blocks are prone to have circular references // Copy could leak memory if it does not get picked up // Looks like we are able to reset block reference for copy // Good as it will ensure a lo...
0
[ "CWE-476" ]
libsass
0bc35e3d26922229d5a3e3308860cf0fcee5d1cf
37,079,255,011,253,510,000,000,000,000,000,000,000
26
Fix segfault on empty custom properties Originally reported in sass/sassc#225 Fixes sass/sassc#225 Spec sass/sass-spec#1249
static int kill_something_info(int sig, struct kernel_siginfo *info, pid_t pid) { int ret; if (pid > 0) { rcu_read_lock(); ret = kill_pid_info(sig, info, find_vpid(pid)); rcu_read_unlock(); return ret; } /* -INT_MIN is undefined. Exclude this case to avoid a UBSAN warning */ if (pid == INT_MIN) return...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
314,737,051,425,769,760,000,000,000,000,000,000,000
39
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
size_t ZSTD_compress_generic (ZSTD_CCtx* cctx, ZSTD_outBuffer* output, ZSTD_inBuffer* input, ZSTD_EndDirective endOp) { DEBUGLOG(5, "ZSTD_compress_generic, endOp=%u ", (U32)endOp); /* check conditions */ if (output->po...
0
[ "CWE-362" ]
zstd
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
36,010,842,008,659,840,000,000,000,000,000,000,000
73
fixed T36302429
PyObject* Zeros(PyObject* shape, PyObject* dtype) const { if (PyErr_Occurred()) { return nullptr; } PyObject* arg_list = Py_BuildValue("OO", shape, dtype); PyObject* result = PyEval_CallObject(zeros_fn_, arg_list); Py_DECREF(arg_list); return result; }
0
[ "CWE-476", "CWE-908" ]
tensorflow
237822b59fc504dda2c564787f5d3ad9c4aa62d9
307,858,598,021,588,820,000,000,000,000,000,000,000
9
Fix tf.compat.v1.placeholder_with_default vulnerability with quantized types. When iterating through the tensor to extract shape values, an underlying missing kernel (`StridedSlice` for quantized types) causes an error, which then results in a `nullptr` being passed to `ParseDimensionValue()`, causing a segfault. The...
static void __napi_gro_flush_chain(struct napi_struct *napi, u32 index, bool flush_old) { struct list_head *head = &napi->gro_hash[index].list; struct sk_buff *skb, *p; list_for_each_entry_safe_reverse(skb, p, head, list) { if (flush_old && NAPI_GRO_CB(skb)->age == jiffies) return; skb_list_del_init(...
0
[ "CWE-416" ]
linux
a4270d6795b0580287453ea55974d948393e66ef
174,903,090,812,929,600,000,000,000,000,000,000
17
net-gro: fix use-after-free read in napi_gro_frags() If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might be freed and reused. Reading eth->h_proto at the en...
png_push_read_chunk(png_structrp png_ptr, png_inforp info_ptr) { png_uint_32 chunk_name; #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED int keep; /* unknown handling method */ #endif /* First we make sure we have enough data for the 4-byte chunk name * and the 4-byte chunk length before proceeding with decoding t...
1
[ "CWE-20" ]
libpng
347538efbdc21b8df684ebd92d37400b3ce85d55
110,075,645,941,751,200,000,000,000,000,000,000,000
251
[libng16] Check length of all chunks except IDAT against user limit.
_outRangeTblFunction(StringInfo str, const RangeTblFunction *node) { WRITE_NODE_TYPE("RANGETBLFUNCTION"); WRITE_NODE_FIELD(funcexpr); WRITE_INT_FIELD(funccolcount); WRITE_NODE_FIELD(funccolnames); WRITE_NODE_FIELD(funccoltypes); WRITE_NODE_FIELD(funccoltypmods); WRITE_NODE_FIELD(funccolcollations); WRITE_BITMA...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
101,059,558,194,807,450,000,000,000,000,000,000,000
12
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
TEST_F(ExprMatchTest, AndWithDistinctMatchAndNonMatchSubTreeMatchesCorrectly) { createMatcher(fromjson("{$expr: {$and: [{$eq: ['$x', 1]}, {$eq: ['$y', '$z']}]}}")); ASSERT_TRUE(matches(BSON("x" << 1 << "y" << 2 << "z" << 2))); ASSERT_FALSE(matches(BSON("x" << 2 << "y" << 2 << "z" << 2))); ASSERT_FALSE...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
154,538,792,072,372,120,000,000,000,000,000,000,000
9
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
static int rawsock_release(struct socket *sock) { struct sock *sk = sock->sk; pr_debug("sock=%p sk=%p\n", sock, sk); if (!sk) return 0; if (sock->type == SOCK_RAW) nfc_sock_unlink(&raw_sk_list, sk); sock_orphan(sk); sock_put(sk); return 0; }
0
[ "CWE-276", "CWE-703" ]
linux
26896f01467a28651f7a536143fe5ac8449d4041
229,886,445,869,372,030,000,000,000,000,000,000,000
17
net/nfc/rawsock.c: add CAP_NET_RAW check. When creating a raw AF_NFC socket, CAP_NET_RAW needs to be checked first. Signed-off-by: Qingyu Li <ieatmuttonchuan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static int bond_del_vlan(struct bonding *bond, unsigned short vlan_id) { struct vlan_entry *vlan; int res = -ENODEV; pr_debug("bond: %s, vlan id %d\n", bond->dev->name, vlan_id); block_netpoll_tx(); write_lock_bh(&bond->lock); list_for_each_entry(vlan, &bond->vlan_list, vlan_list) { if (vlan->vlan_id == vlan...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
331,211,401,191,075,200,000,000,000,000,000,000,000
35
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...
static int pidlist_uniq(pid_t *list, int length) { int src, dest = 1; /* * we presume the 0th element is unique, so i starts at 1. trivial * edge cases first; no work needs to be done for either */ if (length == 0 || length == 1) return length; /* src and dest walk down the list; dest counts unique element...
0
[ "CWE-416" ]
linux
3b0462726e7ef281c35a7a4ae33e93ee2bc9975b
132,231,362,521,118,700,000,000,000,000,000,000,000
25
cgroup: verify that source is a string The following sequence can be used to trigger a UAF: int fscontext_fd = fsopen("cgroup"); int fd_null = open("/dev/null, O_RDONLY); int fsconfig(fscontext_fd, FSCONFIG_SET_FD, "source", fd_null); close_range(3, ~0U, 0); The cgroup v1 specific fs parser expects a...
parser_is_constructor_literal (parser_context_t *context_p) /**< context */ { return (LEXER_IS_IDENT_OR_STRING (context_p->token.lit_location.type) && lexer_compare_literal_to_string (context_p, "constructor", 11)); } /* parser_is_constructor_literal */
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
183,597,999,612,556,060,000,000,000,000,000,000,000
5
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
cql_server::connection::make_schema_change_event(const event::schema_change& event) const { auto response = std::make_unique<cql_server::response>(-1, cql_binary_opcode::EVENT, tracing::trace_state_ptr()); response->write_string("SCHEMA_CHANGE"); response->serialize(event, _version); return response; }
0
[]
scylladb
1c2eef384da439b0457b6d71c7e37d7268e471cb
127,189,695,811,769,140,000,000,000,000,000,000,000
7
transport/server.cc: Return correct size of decompressed lz4 buffer An incorrect size is returned from the function, which could lead to crashes or undefined behavior. Fix by erroring out in these cases. Fixes #11476
Init_date_core(void) { #ifdef HAVE_RB_EXT_RACTOR_SAFE RB_EXT_RACTOR_SAFE(true); #endif id_cmp = rb_intern_const("<=>"); id_le_p = rb_intern_const("<="); id_ge_p = rb_intern_const(">="); id_eqeq_p = rb_intern_const("=="); half_days_in_day = rb_rational_new2(INT2FIX(1), INT2FIX(2)); #if (LO...
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
294,403,008,757,483,500,000,000,000,000,000,000,000
640
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
int hfsplus_delete_cat(u32 cnid, struct inode *dir, struct qstr *str) { struct super_block *sb; struct hfs_find_data fd; struct hfsplus_fork_raw fork; struct list_head *pos; int err, off; u16 type; dprint(DBG_CAT_MOD, "delete_cat: %s,%u\n", str ? str->name : NULL, cnid); sb = dir->i_sb; hfs_find_init(HFSPLUS_...
0
[ "CWE-119" ]
linux-2.6
efc7ffcb4237f8cb9938909041c4ed38f6e1bf40
140,532,638,066,930,830,000,000,000,000,000,000,000
75
hfsplus: fix Buffer overflow with a corrupted image When an hfsplus image gets corrupted it might happen that the catalog namelength field gets b0rked. If we mount such an image the memcpy() in hfsplus_cat_build_key_uni() writes more than the 255 that fit in the name field. Depending on the size of the overwritten d...
DECLAREContigPutFunc(putcontig8bitYCbCr21tile) { (void) y; fromskew = (fromskew * 4) / 2; do { x = w>>1; do { int32 Cb = pp[2]; int32 Cr = pp[3]; YCbCrtoRGB(cp[0], pp[0]); YCbCrtoRGB(cp[1], pp[1]); cp += 2; pp += 4; } while (--x); if( (w&1) != 0 ) { int32 Cb = pp[2]; int32 Cr = p...
1
[ "CWE-119" ]
libtiff
40a5955cbf0df62b1f9e9bd7d9657b0070725d19
69,093,473,467,940,370,000,000,000,000,000,000,000
32
* libtiff/tif_next.c: add new tests to check that we don't read outside of the compressed input stream buffer. * libtiff/tif_getimage.c: in OJPEG case, fix checks on strile width/height
template<> struct type<bool> {
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
327,585,519,970,602,850,000,000,000,000,000,000,000
1
Fix other issues in 'CImg<T>::load_bmp()'.
void SetAttrValue(const TensorShape& value, AttrValue* out) { value.AsProto(out->mutable_shape()); }
0
[ "CWE-369", "CWE-674" ]
tensorflow
e07e1c3d26492c06f078c7e5bf2d138043e199c1
210,631,265,641,398,080,000,000,000,000,000,000,000
3
Prevent memory overflow in ParseAttrValue from nested tensors. PiperOrigin-RevId: 370108442 Change-Id: I84d64a5e8895a6aeffbf4749841b4c54d51b5889
void generate_inter_prediction_samples(base_context* ctx, const slice_segment_header* shdr, de265_image* img, int xC,int yC, int xB,int yB, ...
1
[ "CWE-787" ]
libde265
697aa4f7c774abd6374596e6707a6f4f54265355
274,813,485,195,215,560,000,000,000,000,000,000,000
383
fix MC with HDR chroma, but SDR luma (#301)
static double mp_list_Joff(_cimg_math_parser& mp) { double *ptrd = &_mp_arg(1) + 1; const unsigned int ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.imglist.width()), boundary_conditions = (unsigned int)_mp_arg(4), vsiz = (unsigned int)mp.opcode[5]; const i...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
12,425,444,378,446,960,000,000,000,000,000,000,000
40
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
handle_mic(OM_uint32 *minor_status, gss_buffer_t mic_in, int send_mechtok, spnego_gss_ctx_id_t sc, gss_buffer_t *mic_out, OM_uint32 *negState, send_token_flag *tokflag) { OM_uint32 ret; ret = GSS_S_FAILURE; *mic_out = GSS_C_NO_BUFFER; if (mic_in != GSS_C_NO_BUFFER) { if (sc->mic_rcvd) { /* Reject ...
0
[ "CWE-415" ]
krb5
f18ddf5d82de0ab7591a36e465bc24225776940f
117,129,440,035,512,410,000,000,000,000,000,000,000
57
Fix double-free in SPNEGO [CVE-2014-4343] In commit cd7d6b08 ("Verify acceptor's mech in SPNEGO initiator") the pointer sc->internal_mech became an alias into sc->mech_set->elements, which should be considered constant for the duration of the SPNEGO context. So don't free it. CVE-2014-4343: In MIT krb5 releases 1.1...
char_str (gunichar c, gchar *buf) { memset (buf, 0, 8); g_unichar_to_utf8 (c, buf); return buf; }
0
[ "CWE-476" ]
glib
fccef3cc822af74699cca84cd202719ae61ca3b9
198,354,657,061,265,250,000,000,000,000,000,000,000
7
gmarkup: Fix crash in error handling path for closing elements If something which looks like a closing tag is left unfinished, but isn’t paired to an opening tag in the document, the error handling code would do a null pointer dereference. Avoid that, at the cost of introducing a new translatable error message. Inclu...
backend_pread (struct backend *b, struct connection *conn, void *buf, uint32_t count, uint64_t offset, uint32_t flags, int *err) { int r; assert (backend_valid_range (b, conn, offset, count)); assert (flags == 0); debug ("%s: pread count=%" PRIu32 " offset=%" PRIu64, b->n...
0
[ "CWE-406" ]
nbdkit
a6b88b195a959b17524d1c8353fd425d4891dc5f
252,243,514,986,763,950,000,000,000,000,000,000,000
16
server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO Most known NBD clients do not bother with NBD_OPT_INFO (except for clients like 'qemu-nbd --list' that don't ever intend to connect), but go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu to add in an extra client step (whether info on the ...
bool Item_func_last_value::fix_length_and_dec() { last_value= args[arg_count -1]; Type_std_attributes::set(last_value); maybe_null= last_value->maybe_null; return FALSE; }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
86,923,455,445,971,730,000,000,000,000,000,000,000
7
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
get_lan_param_select(struct ipmi_intf * intf, uint8_t chan, int param, int select) { struct lan_param * p = NULL; struct ipmi_rs * rsp; struct ipmi_rq req; int i = 0; uint8_t msg_data[4]; for (i = 0; ipmi_lan_params[i].cmd != (-1); i++) { if (ipmi_lan_params[i].cmd == param) { p = &ipmi_lan_params[i]; br...
0
[ "CWE-120" ]
ipmitool
d45572d71e70840e0d4c50bf48218492b79c1a10
268,413,688,952,040,000,000,000,000,000,000,000,000
66
lanp: Fix buffer overflows in get_lan_param_select Partial fix for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp The `get_lan_param_select` function is missing a validation check on the response’s `data_len`, which it then returns to caller functions, where stack buff...
CURLcode Curl_init_userdefined(struct UserDefined *set) { CURLcode result = CURLE_OK; set->out = stdout; /* default output to stdout */ set->in_set = stdin; /* default input from stdin */ set->err = stderr; /* default stderr to stderr */ /* use fwrite as default function to store output */ set->fwrite_...
0
[ "CWE-287" ]
curl
d41dcba4e9b69d6b761e3460cc6ae7e8fd8f621f
339,236,888,081,757,950,000,000,000,000,000,000,000
129
NTLM: Fix ConnectionExists to compare Proxy credentials Proxy NTLM authentication should compare credentials when re-using a connection similar to host authentication, as it authenticate the connection. Example: curl -v -x http://proxy:port http://host/ -U good_user:good_pwd --proxy-ntlm --next -x http://proxy:port...
int main(int argc, char* argv[]) { if (argc != 4) { std::cerr << "Usage: rc4 hex-key infile outfile" << std::endl; exit(2); } char* hexkey = argv[1]; char* infilename = argv[2]; char* outfilename = argv[3]; unsigned int hexkeylen = strlen(hexkey); unsigned int keylen = hexkeylen / 2; ...
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
80,082,636,893,410,700,000,000,000,000,000,000,000
56
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
GetArrayData ( IN VOID *Array, IN UINT8 Type, IN UINTN Index ) { UINT64 Data; ASSERT (Array != NULL); Data = 0; switch (Type) { case EFI_IFR_TYPE_NUM_SIZE_8: Data = (UINT64) *(((UINT8 *) Array) + Index); break; case...
0
[]
edk2
f1d78c489a39971b5aac5d2fc8a39bfa925c3c5d
43,712,451,578,424,510,000,000,000,000,000,000,000
34
MdeModulePkg/DisplayEngine: Zero memory before free (CVE-2019-14558) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1611 Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.do...
PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS) /* {{{ */ { PHP_MD5_CTX md5_context; PHP_SHA1_CTX sha1_context; #if defined(HAVE_HASH_EXT) && !defined(COMPILE_DL_HASH) void *hash_context; #endif unsigned char *digest; int digest_len; int j; char *buf, *outid; struct timeval tv; zval **array; zval **tok...
0
[ "CWE-264" ]
php-src
25e8fcc88fa20dc9d4c47184471003f436927cde
32,841,950,519,793,960,000,000,000,000,000,000,000
147
Strict session
bool ContentSettingsObserver::AllowMutationEvents(bool default_value) { if (IsWhitelistedForContentSettings()) return true; bool allow = default_value; if (content_settings_manager_->content_settings()) { allow = content_settings_manager_->GetSetting( ContentSettingsManager::GetOrigin...
0
[ "CWE-20", "CWE-200" ]
muon
c18663aa171c6cdf03da3e8c70df8663645b97c4
123,114,738,755,696,130,000,000,000,000,000,000,000
19
Issue: 15232 AllowScript should use atom::ContentSettingsManager like other Allow* methods in the observer
fatalErrorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) { va_list args; callbacks++; if (quiet) return; va_start(args, msg); fprintf(SAXdebug, "SAX.fatalError: "); vfprintf(SAXdebug, msg, args); va_end(args); }
0
[ "CWE-125" ]
libxml2
a820dbeac29d330bae4be05d9ecd939ad6b4aa33
264,914,926,222,037,480,000,000,000,000,000,000,000
12
Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605> Reviewed by David Kilzer. * HTMLparser.c: (htmlParseName): Add bounds check. (htmlParseNameComplex): Ditto. * result/HTML/758605.html: Added. * result/HTML/758605.html.err: Added. * result/HTML/758605.html.s...
md_rollback(MD_CTX* ctx, int opener_index, int closer_index, int how) { int i; int mark_index; /* Cut all unresolved openers at the mark index. */ for(i = OPENERS_CHAIN_FIRST; i < OPENERS_CHAIN_LAST+1; i++) { MD_MARKCHAIN* chain = &ctx->mark_chains[i]; while(chain->tail >= opener_index...
0
[ "CWE-125", "CWE-908" ]
md4c
4fc808d8fe8d8904f8525bb4231d854f45e23a19
93,786,345,238,145,140,000,000,000,000,000,000,000
63
md_analyze_line: Avoid reading 1 byte beyond the input size. Fixes #155.
static struct net_device *inet_fib_lookup_dev(struct net *net, const void *addr) { return ERR_PTR(-EAFNOSUPPORT); }
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
98,569,784,041,250,270,000,000,000,000,000,000,000
5
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
static void test22(char const* infile, char const* password, char const* outfile, char const* outfile2) { qpdf_read(qpdf, infile, password); qpdf_init_write(qpdf, outfile); qpdf_set_static_ID(qpdf, QPDF_TRUE); qpdf_set_static_aes_IV(qpdf, QPDF_TRUE); qpdf_set_compress_streams(qpdf, QP...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
198,172,218,440,052,160,000,000,000,000,000,000,000
14
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static void parse_argv(void) { unsigned int i; for (i = 1; i < global_argc; i++) { const char *a = global_argv[i]; if (*a != '-' || !strcmp(a, "--")) break; if (!skip_prefix(a, "--", &a)) die("unknown option %s", a); if (parse_one_option(a)) continue; if (parse_one_feature(a, 0)) continue; ...
0
[]
git
68061e3470210703cb15594194718d35094afdc0
15,944,280,110,201,374,000,000,000,000,000,000,000
33
fast-import: disallow "feature export-marks" by default The fast-import stream command "feature export-marks=<path>" lets the stream write marks to an arbitrary path. This may be surprising if you are running fast-import against an untrusted input (which otherwise cannot do anything except update Git objects and refs)...
gdm_manager_stop (GdmManager *manager) { g_debug ("GdmManager: GDM stopping"); if (manager->priv->local_factory != NULL) { gdm_display_factory_stop (GDM_DISPLAY_FACTORY (manager->priv->local_factory)); } #ifdef HAVE_LIBXDMCP if (manager->priv->xdmcp_factory != NULL) { ...
0
[]
gdm
ff98b2817014684ae1acec78ff06f0f461a56a9f
71,307,007,611,424,870,000,000,000,000,000,000,000
16
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
void CLASS process_Sony_0x0116(uchar *buf, unsigned id) { if ((id == 257) || (id == 262) || (id == 269) || (id == 270)) imgdata.other.BatteryTemperature = (float) (buf[1]-32) / 1.8f; else if ((id != 263) && (id != 264) && (id != 265) && (id != 266)) imgdat...
0
[ "CWE-119", "CWE-125" ]
LibRaw
f1394822a0152ceed77815eafa5cac4e8baab10a
66,907,458,441,406,460,000,000,000,000,000,000,000
14
SECUNIA advisory 76000 #1 (wrong fuji width set via tiff tag
} static void date_object_free_storage_period(void *object TSRMLS_DC) { php_period_obj *intern = (php_period_obj *)object; if (intern->start) { timelib_time_dtor(intern->start); } if (intern->current) { timelib_time_dtor(intern->current); } if (intern->end) { timelib_time_dtor(intern->end); } timelib...
0
[]
php-src
bb057498f7457e8b2eba98332a3bad434de4cf12
95,811,029,851,738,850,000,000,000,000,000,000,000
20
Fix #70277: new DateTimeZone($foo) is ignoring text after null byte The DateTimeZone constructors are not binary safe. They're parsing the timezone as string, but discard the length when calling timezone_initialize(). This patch adds a tz_len parameter and a respective check to timezone_initialize().
void remove_cpu_topology(unsigned int cpu) { int sibling; for_each_cpu(sibling, topology_core_cpumask(cpu)) cpumask_clear_cpu(cpu, topology_core_cpumask(sibling)); for_each_cpu(sibling, topology_sibling_cpumask(cpu)) cpumask_clear_cpu(cpu, topology_sibling_cpumask(sibling)); for_each_cpu(sibling, topology_llc_...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
165,386,830,946,846,000,000,000,000,000,000,000,000
13
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...
__acquires(&port_dev->status_lock) { mutex_lock(&port_dev->status_lock); __acquire(&port_dev->status_lock); }
0
[ "CWE-703" ]
linux
e50293ef9775c5f1cf3fcc093037dd6a8c5684ea
62,965,735,894,672,000,000,000,000,000,000,000,000
5
USB: fix invalid memory access in hub_activate() Commit 8520f38099cc ("USB: change hub initialization sleeps to delayed_work") changed the hub_activate() routine to make part of it run in a workqueue. However, the commit failed to take a reference to the usb_hub structure or to lock the hub interface while doing so. ...
static POLICYQUALINFO *notice_section(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *unot, int ia5org) { int i, ret, len, tag; unsigned int tag_len; CONF_VALUE *cnf; USERNOTICE *not; POLICYQUALINFO *qual; char *value = NULL; if ((qual = POLICYQUALINFO_new()) ==...
0
[ "CWE-125" ]
openssl
5f54e57406ca17731b9ade3afd561d3c652e07f2
269,747,152,670,207,570,000,000,000,000,000,000,000
89
Fix POLICYINFO printing to not assume NUL terminated strings ASN.1 strings may not be NUL terminated. Don't assume they are. CVE-2021-3712 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org>
xfs_inactive( xfs_inode_t *ip) { struct xfs_mount *mp; int error; int truncate = 0; /* * If the inode is already free, then there can be nothing * to clean up here. */ if (ip->i_d.di_mode == 0) { ASSERT(ip->i_df.if_real_bytes == 0); ASSERT(ip->i_df.if_broot_bytes == 0); return; } mp = ip->i_mo...
0
[ "CWE-19" ]
linux
fc0561cefc04e7803c0f6501ca4f310a502f65b8
67,712,123,400,633,260,000,000,000,000,000,000,000
78
xfs: optimise away log forces on timestamp updates for fdatasync xfs: timestamp updates cause excessive fdatasync log traffic Sage Weil reported that a ceph test workload was writing to the log on every fdatasync during an overwrite workload. Event tracing showed that the only metadata modification being made was the...
void rds_rdma_send_complete(struct rds_message *rm, int status) { struct rds_sock *rs = NULL; struct rm_rdma_op *ro; struct rds_notifier *notifier; unsigned long flags; spin_lock_irqsave(&rm->m_rs_lock, flags); ro = &rm->rdma; if (test_bit(RDS_MSG_ON_SOCK, &rm->m_flags) && ro->op_active && ro->op_notify &...
0
[ "CWE-362" ]
linux
8c7188b23474cca017b3ef354c4a58456f68303a
755,751,349,780,862,200,000,000,000,000,000,000
31
RDS: fix race condition when sending a message on unbound socket Sasha's found a NULL pointer dereference in the RDS connection code when sending a message to an apparently unbound socket. The problem is caused by the code checking if the socket is bound in rds_sendmsg(), which checks the rs_bound_addr field without ...
void CClient::DemoRecorder_HandleAutoStart() { if(g_Config.m_ClAutoDemoRecord) { DemoRecorder_Stop(); DemoRecorder_Start("auto/autorecord", true); if(g_Config.m_ClAutoDemoMax) { // clean up auto recorded demos CFileCollection AutoDemos; AutoDemos.Init(Storage(), "demos/auto", "autorecord", ".demo", g...
0
[ "CWE-119", "CWE-787" ]
teeworlds
ff254722a2683867fcb3e67569ffd36226c4bc62
277,389,834,908,285,530,000,000,000,000,000,000,000
14
added some checks to snap handling
int SSL_CTX_set_purpose(SSL_CTX *s, int purpose) { return X509_VERIFY_PARAM_set_purpose(s->param, purpose); }
0
[ "CWE-310" ]
openssl
56f1acf5ef8a432992497a04792ff4b3b2c6f286
56,720,254,304,666,045,000,000,000,000,000,000,000
4
Disable SSLv2 default build, default negotiation and weak ciphers. SSLv2 is by default disabled at build-time. Builds that are not configured with "enable-ssl2" will not support SSLv2. Even if "enable-ssl2" is used, users who want to negotiate SSLv2 via the version-flexible SSLv23_method() will need to explicitly ca...
ref_param_read_float_array(gs_param_list * plist, gs_param_name pkey, gs_param_float_array * pvalue) { iparam_list *const iplist = (iparam_list *) plist; iparam_loc loc; ref aref, elt; int code = ref_param_read_array(iplist, pkey, &loc); float *pfv; uint size; long...
0
[]
ghostpdl
bfa6b2ecbe48edc69a7d9d22a12419aed25960b8
160,181,942,510,809,820,000,000,000,000,000,000,000
34
Bug 697548: use the correct param list enumerator When we encountered dictionary in a ref_param_list, we were using the enumerator for the "parent" param_list, rather than the enumerator for the param_list we just created for the dictionary. That parent was usually the stack list enumerator, and caused a segfault. Us...
SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param) { struct sched_param lp; struct task_struct *p; int retval; if (!param || pid < 0) return -EINVAL; rcu_read_lock(); p = find_process_by_pid(pid); retval = -ESRCH; if (!p) goto out_unlock; retval = security_task_getscheduler(...
0
[ "CWE-200" ]
linux
4efbc454ba68def5ef285b26ebfcfdb605b52755
50,201,138,032,102,660,000,000,000,000,000,000,000
37
sched: Fix information leak in sys_sched_getattr() We're copying the on-stack structure to userspace, but forgot to give the right number of bytes to copy. This allows the calling process to obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent kernel memory). This fix copies only as much as we actually ...
TEST_F(LoaderTest, ResourceLeakTest) { SavedModelBundle bundle; SessionOptions session_options; RunOptions run_options; const string export_dir = io::JoinPath(testing::TensorFlowSrcRoot(), kTestDataSharded); for (int i = 0; i < 100; ++i) { TF_ASSERT_OK(LoadSavedModel(session_options, run_options, e...
0
[ "CWE-20", "CWE-703" ]
tensorflow
adf095206f25471e864a8e63a0f1caef53a0e3a6
243,797,281,384,299,300,000,000,000,000,000,000,000
13
Validate `NodeDef`s from `FunctionDefLibrary` of a `GraphDef`. We already validated `NodeDef`s from a `GraphDef` but missed validating those from the `FunctionDefLibrary`. Thus, some maliciously crafted models could evade detection and cause denial of service due to a `CHECK`-fail. PiperOrigin-RevId: 332536309 Change...
int term_addstr(TERM_WINDOW *window, const char *str) { int len, raw_len; unichar tmp; const char *ptr; if (vcmove) term_move_real(); len = 0; raw_len = strlen(str); /* The string length depends on the terminal encoding */ ptr = str; if (term_type == TERM_TYPE_UTF8) { while (*ptr != '\0') { tmp = g_u...
0
[ "CWE-476" ]
irssi
6c6c42e3d1b49d90aacc0b67f8540471cae02a1d
131,538,885,354,813,690,000,000,000,000,000,000,000
38
Merge branch 'security' into 'master' See merge request !7
static inline void set_comp_state(struct hfi1_user_sdma_pkt_q *pq, struct hfi1_user_sdma_comp_q *cq, u16 idx, enum hfi1_sdma_comp_state state, int ret) { if (state == ERROR) cq->comps[idx].errcode = -ret; smp_wmb(); /* make sure errcode is visible first */ cq->comps[idx].status = state; trace_hf...
0
[ "CWE-416" ]
linux
3d2a9d642512c21a12d19b9250e7a835dcb41a79
6,313,160,244,644,534,000,000,000,000,000,000,000
12
IB/hfi1: Ensure correct mm is used at all times Two earlier bug fixes have created a security problem in the hfi1 driver. One fix aimed to solve an issue where current->mm was not valid when closing the hfi1 cdev. It attempted to do this by saving a cached value of the current->mm pointer at file open time. This is a ...
TfLiteStatus EvalHybridPerChannel(TfLiteContext* context, TfLiteNode* node, TfLiteConvParams* params, OpData* data, const TfLiteTensor* input, const TfLiteTensor* filter, const TfLiteT...
0
[ "CWE-369" ]
tensorflow
ff489d95a9006be080ad14feb378f2b4dac35552
260,889,719,209,757,100,000,000,000,000,000,000,000
103
Prevent division by 0. PiperOrigin-RevId: 370962554 Change-Id: I0b9b62f4d8e1046dd88f9433f8dfeaf61a901680
void log_problem_data(problem_data_t *problem_data, const char *pfx) { GHashTableIter iter; char *name; struct problem_item *value; g_hash_table_iter_init(&iter, problem_data); while (g_hash_table_iter_next(&iter, (void**)&name, (void**)&value)) { log("%s[%s]:'%s' 0x%x", ...
0
[ "CWE-20" ]
libreport
1951e7282043dfe1268d492aea056b554baedb75
221,011,269,472,624,740,000,000,000,000,000,000,000
15
lib: fix races in dump directory handling code Florian Weimer <fweimer@redhat.com>: dd_opendir() should keep a file handle (opened with O_DIRECTORY) and use openat() and similar functions to access files in it. ... The file system manipulation functions should guard against hard links (check tha...
set_open_for_write_attributes (GVfsJobOpenForWrite *open_write_job, GFileOutputStream *stream) { GSeekable *seekable = G_SEEKABLE (stream); g_vfs_job_open_for_write_set_handle (open_write_job, stream); g_vfs_job_open_for_write_set_can_seek (open_write_job, g_seekable_can_seek (...
0
[]
gvfs
d7d362995aa0cb8905c8d5c2a2a4c305d2ffff80
331,178,258,425,072,300,000,000,000,000,000,000,000
11
admin: Use fsuid to ensure correct file ownership Files created over admin backend should be owned by root, but they are owned by the user itself. This is because the daemon drops the uid to make dbus connection work. Use fsuid and euid to fix this issue. Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/21
static int handle_apic_access(struct kvm_vcpu *vcpu) { return emulate_instruction(vcpu, 0, 0, 0) == EMULATE_DONE; }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
243,447,504,875,561,730,000,000,000,000,000,000,000
4
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
CAMLexport value caml_alloc_final (mlsize_t len, final_fun fun, mlsize_t mem, mlsize_t max) { return caml_alloc_custom(caml_final_custom_operations(fun), len * sizeof(value), mem, max); }
0
[ "CWE-200" ]
ocaml
659615c7b100a89eafe6253e7a5b9d84d0e8df74
104,486,904,629,072,460,000,000,000,000,000,000,000
6
fix PR#7003 and a few other bugs caused by misuse of Int_val git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16525 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
static void process_touch_command(conn *c, token_t *tokens, const size_t ntokens) { char *key; size_t nkey; int32_t exptime_int = 0; item *it; assert(c != NULL); set_noreply_maybe(c, tokens, ntokens); if (tokens[KEY_TOKEN].length > KEY_MAX_LENGTH) { out_string(c, "CLIENT_ERROR bad...
0
[ "CWE-189" ]
memcached
6695ccbc525c36d693aaa3e8337b36aa0c784424
91,457,749,910,981,150,000,000,000,000,000,000,000
42
Fix segfault on specially crafted packet.
reg_nextline(void) { rex.line = reg_getline(++rex.lnum); rex.input = rex.line; fast_breakcheck(); }
0
[ "CWE-416" ]
vim
4c13e5e6763c6eb36a343a2b8235ea227202e952
210,859,939,055,097,750,000,000,000,000,000,000,000
6
patch 8.2.3949: using freed memory with /\%V Problem: Using freed memory with /\%V. Solution: Get the line again after getvvcol().
static int cqspi_indirect_write_setup(struct spi_nor *nor, const unsigned int to_addr) { unsigned int reg; struct cqspi_flash_pdata *f_pdata = nor->priv; struct cqspi_st *cqspi = f_pdata->cqspi; void __iomem *reg_base = cqspi->iobase; /* Set opcode. */ reg = nor->program_opcode << CQSPI_REG_WR_INSTR_OP...
0
[ "CWE-119", "CWE-787" ]
linux
193e87143c290ec16838f5368adc0e0bc94eb931
81,000,740,067,205,250,000,000,000,000,000,000,000
22
mtd: spi-nor: Off by one in cqspi_setup_flash() There are CQSPI_MAX_CHIPSELECT elements in the ->f_pdata array so the > should be >=. Fixes: 140623410536 ('mtd: spi-nor: Add driver for Cadence Quad SPI Flash Controller') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Marek Vasut <marex@denx.de> ...
int gfs2_shrink_qd_memory(int nr, gfp_t gfp_mask) { struct gfs2_quota_data *qd; struct gfs2_sbd *sdp; if (nr == 0) goto out; if (!(gfp_mask & __GFP_FS)) return -1; spin_lock(&qd_lru_lock); while (nr && !list_empty(&qd_lru_list)) { qd = list_entry(qd_lru_list.next, struct gfs2_quota_data, qd_reclaim);...
0
[ "CWE-399" ]
linux-2.6
7e619bc3e6252dc746f64ac3b486e784822e9533
110,734,850,626,551,420,000,000,000,000,000,000,000
40
GFS2: Fix writing to non-page aligned gfs2_quota structures This is the upstream fix for this bug. This patch differs from the RHEL5 fix (Red Hat bz #555754) which simply writes to the 8-byte value field of the quota. In upstream quota code, we're required to write the entire quota (88 bytes) which can be split across...
void esp_reg_write(ESPState *s, uint32_t saddr, uint64_t val) { trace_esp_mem_writeb(saddr, s->wregs[saddr], val); switch (saddr) { case ESP_TCHI: s->tchi_written = true; /* fall through */ case ESP_TCLO: case ESP_TCMID: s->rregs[ESP_RSTAT] &= ~STAT_TC; break; cas...
0
[ "CWE-787" ]
qemu
926cde5f3e4d2504ed161ed0cb771ac7cad6fd11
35,729,814,920,846,270,000,000,000,000,000,000,000
127
scsi: esp: make cmdbuf big enough for maximum CDB size While doing DMA read into ESP command buffer 's->cmdbuf', it could write past the 's->cmdbuf' area, if it was transferring more than 16 bytes. Increase the command buffer size to 32, which is maximum when 's->do_cmd' is set, and add a check on 'len' to avoid OOB ...
is_valid_cert(CERTCertificate *cert, void *data) { struct validity_cbdata *cbd = (struct validity_cbdata *)data; PK11SlotInfo *slot = cbd->slot; SECKEYPrivateKey *privkey = NULL; int errnum; errnum = PORT_GetError(); if (errnum == SEC_ERROR_EXTENSION_NOT_FOUND) { dprintf("Got SEC_ERROR_EXTENSION_NOT_FOUND; cle...
0
[ "CWE-787" ]
pesign
b879dda52f8122de697d145977c285fb0a022d76
102,897,564,750,908,050,000,000,000,000,000,000,000
31
Handle NULL pwdata in cms_set_pw_data() When 12f16710ee44ef64ddb044a3523c3c4c4d90039a rewrote this function, it didn't handle the NULL pwdata invocation from daemon.c. This leads to a explicit NULL dereference and crash on all attempts to daemonize pesign. Signed-off-by: Robbie Harwood <rharwood@redhat.com>
f_screenrow(typval_T *argvars UNUSED, typval_T *rettv) { rettv->vval.v_number = screen_screenrow() + 1; }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
7,862,575,098,260,136,000,000,000,000,000,000,000
4
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
fm_sm_status_query ( IN p_fm_config_conx_hdlt hdl, IN fm_mgr_action_t action, OUT fm_sm_status_t *info, OUT fm_msg_ret_code_t *ret_code ) { p_hsm_com_client_hdl_t client_hdl; if ( (client_hdl = get_mgr_hdl(hdl,FM_MGR_SM)) != NULL ) { return fm_mgr_general_query(client_hdl,...
0
[ "CWE-362" ]
opa-fm
c5759e7b76f5bf844be6c6641cc1b356bbc83869
261,353,136,612,927,660,000,000,000,000,000,000,000
17
Fix scripts and code that use well-known tmp files.
xfs_bmap_add_attrfork_extents( xfs_trans_t *tp, /* transaction pointer */ xfs_inode_t *ip, /* incore inode pointer */ xfs_fsblock_t *firstblock, /* first block allocated */ struct xfs_defer_ops *dfops, /* blocks to free at commit */ int *flags) /* inode logging flags */ { xfs_btree_cur_t *cur; /* bmap ...
0
[]
linux
2c4306f719b083d17df2963bc761777576b8ad1b
11,218,535,774,735,046,000,000,000,000,000,000,000
22
xfs: set format back to extents if xfs_bmap_extents_to_btree If xfs_bmap_extents_to_btree fails in a mode where we call xfs_iroot_realloc(-1) to de-allocate the root, set the format back to extents. Otherwise we can assume we can dereference ifp->if_broot based on the XFS_DINODE_FMT_BTREE format, and crash. Bugzilla...
static int proc_BSSList_open( struct inode *inode, struct file *file ) { struct proc_data *data; struct proc_dir_entry *dp = PDE(inode); struct net_device *dev = dp->data; struct airo_info *ai = dev->ml_priv; char *ptr; BSSListRid BSSList_rid; int rc; /* If doLoseSync is not 1, we won't do a Lose Sync */ int d...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
52,717,638,642,143,540,000,000,000,000,000,000,000
63
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...
static int nntp_path_pretty(char *buf, size_t buflen, const char *folder) { /* Succeed, but don't do anything, for now */ return 0; }
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
240,965,238,095,298,300,000,000,000,000,000,000,000
5
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
h2_rx_goaway(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2) { CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); ASSERT_RXTHR(h2); CHECK_OBJ_NOTNULL(r2, H2_REQ_MAGIC); assert(r2 == h2->req0); h2->goaway_last_stream = vbe32dec(h2->rxf_data); h2->error = h2_connectionerror(vbe32dec(h2->rxf_data + 4)); Lck_Lock(&h...
0
[ "CWE-444" ]
varnish-cache
d4c67d2a1a05304598895c24663c58a2e2932708
250,835,023,688,971,580,000,000,000,000,000,000,000
15
Take content length into account on H/2 request bodies When receiving H/2 data frames, make sure to take the advertised content length into account, and fail appropriately if the combined sum of the data frames does not match the content length.
static int __init hugetlb_init(void) { /* Some platform decide whether they support huge pages at boot * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when * there is no such support */ if (HPAGE_SHIFT == 0) return 0; if (!size_to_hstate(default_hstate_size)) { default_hstate_size = HPAGE_SIZE;...
0
[ "CWE-399" ]
linux
90481622d75715bfcb68501280a917dbfe516029
289,519,696,105,095,900,000,000,000,000,000,000,000
30
hugepages: fix use after free bug in "quota" handling hugetlbfs_{get,put}_quota() are badly named. They don't interact with the general quota handling code, and they don't much resemble its behaviour. Rather than being about maintaining limits on on-disk block usage by particular users, they are instead about maintai...
static int xfrm_alloc_userspi(struct sk_buff *skb, struct nlmsghdr *nlh, struct nlattr **attrs) { struct net *net = sock_net(skb->sk); struct xfrm_state *x; struct xfrm_userspi_info *p; struct sk_buff *resp_skb; xfrm_address_t *daddr; int family; int err; u32 mark; struct xfrm_mark m; u32 if_id = 0; p = n...
0
[ "CWE-125" ]
linux
b805d78d300bcf2c83d6df7da0c818b0fee41427
272,327,446,463,117,570,000,000,000,000,000,000,000
63
xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink UBSAN report this: UBSAN: Undefined behaviour in net/xfrm/xfrm_policy.c:1289:24 index 6 is out of range for type 'unsigned int [6]' CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.162-514.55.6.9.x86_64+ #13 Hardware name: QEMU Standard PC (i440FX + P...
static int skcipher_alloc_sgl(struct sock *sk) { struct alg_sock *ask = alg_sk(sk); struct skcipher_ctx *ctx = ask->private; struct skcipher_sg_list *sgl; struct scatterlist *sg = NULL; sgl = list_entry(ctx->tsgl.prev, struct skcipher_sg_list, list); if (!list_empty(&ctx->tsgl)) sg = sgl->sg; if (!sg || sgl-...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
312,624,535,059,587,000,000,000,000,000,000,000,000
29
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...
static int init_mp_dev(struct pci_dev *pcidev, mppcibrd_t brd) { static struct mp_device_t *sbdev = mp_devs; unsigned long addr = 0; int j; struct resource *ret = NULL; sbdev->device_id = brd.device_id; pci_read_config_byte(pcidev, PCI_CLASS_REVISION, &(sbdev->revision)); sbdev->name = brd.name; sbdev->uart_ac...
0
[ "CWE-200" ]
linux
a8b33654b1e3b0c74d4a1fed041c9aae50b3c427
310,301,904,408,871,100,000,000,000,000,000,000,000
183
Staging: sb105x: info leak in mp_get_count() The icount.reserved[] array isn't initialized so it leaks stack information to userspace. Reported-by: Nico Golde <nico@ngolde.de> Reported-by: Fabian Yamaguchi <fabs@goesec.de> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Li...
void luaD_reallocCI (lua_State *L, int newsize) { CallInfo *oldci = L->base_ci; luaM_reallocvector(L, L->base_ci, L->size_ci, newsize, CallInfo); L->size_ci = newsize; L->ci = (L->ci - oldci) + L->base_ci; L->end_ci = L->base_ci + L->size_ci - 1; }
0
[ "CWE-200", "CWE-17" ]
redis
fdf9d455098f54f7666c702ae464e6ea21e25411
162,530,101,047,133,480,000,000,000,000,000,000,000
7
disable loading lua bytecode
TfLiteRegistration* Register_DEPTHWISE_CONVOLUTION_NEON_OPT_UINT8() { static TfLiteRegistration r = { depthwise_conv::Init, depthwise_conv::Free, depthwise_conv::Prepare, depthwise_conv::EvalImpl<depthwise_conv::kNeonOptimized, kTfLiteUInt8>}; return &r; }
0
[ "CWE-908" ]
tensorflow
8933b8a21280696ab119b63263babdb54c298538
259,511,075,250,531,720,000,000,000,000,000,000,000
6
Fix a null pointer exception caused by branching on uninitialized data. This is due to not checking that the params for the quantization exists. If there is no quantization, we should not access the `.params` field. PiperOrigin-RevId: 385173491 Change-Id: I8fc476c4b274fdb21ba741caa0fbc6d1b8840663
static void _no_display_exception() { throw CImgDisplayException("CImgDisplay(): No display available.");
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
199,877,388,646,634,820,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
my_unescape(CHARSET_INFO *cs, char *to, const char *str, const char *end, int sep, bool backslash_escapes) { char *start= to; for ( ; str != end ; str++) { #ifdef USE_MB int l; if (use_mb(cs) && (l= my_ismbchar(cs, str, end))) { while (l--) *to++ = *str++; str--; ...
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
294,657,798,226,642,300,000,000,000,000,000,000,000
54
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
static void busy_sleep(unsigned msec) { pj_time_val timeout, now; pj_gettickcount(&timeout); timeout.msec += msec; pj_time_val_normalize(&timeout); do { int i; i = msec / 10; while (pjsua_handle_events(10) > 0 && i > 0) --i; pj_gettickcount(&now); } while (PJ_TIME_VAL_LT(now, timeout)...
0
[ "CWE-120", "CWE-787" ]
pjproject
d27f79da11df7bc8bb56c2f291d71e54df8d2c47
174,334,896,846,006,700,000,000,000,000,000,000,000
16
Use PJ_ASSERT_RETURN() on pjsip_auth_create_digest() and pjsua_init_tpselector() (#3009) * Use PJ_ASSERT_RETURN on pjsip_auth_create_digest * Use PJ_ASSERT_RETURN on pjsua_init_tpselector() * Fix incorrect check. * Add return value to pjsip_auth_create_digest() and pjsip_auth_create_digestSHA256() * Modifi...
static GFINLINE GF_Err stbl_AddOffset(GF_SampleTableBox *stbl, GF_Box **old_stco, u64 offset) { GF_ChunkOffsetBox *stco; GF_ChunkLargeOffsetBox *co64; u32 i; if ((*old_stco)->type == GF_ISOM_BOX_TYPE_STCO) { stco = (GF_ChunkOffsetBox *) *old_stco; //if dataOffset is bigger than 0xFFFFFFFF, move to LARGE offset...
0
[ "CWE-120", "CWE-787" ]
gpac
77ed81c069e10b3861d88f72e1c6be1277ee7eae
204,447,783,260,229,900,000,000,000,000,000,000,000
58
fixed #1774 (fuzz)
CImg<T>& draw_axis(const CImg<t>& values_x, const int y, const tc *const color, const float opacity=1, const unsigned int pattern=~0U, const unsigned int font_height=13, const bool allow_zero=true, const float round_x=0) { if (is_empty()) re...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
167,168,261,225,204,160,000,000,000,000,000,000,000
38
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
StringVal() : len(0), ptr(nullptr) {}
0
[ "CWE-200" ]
incubator-doris
246ac4e37aa4da6836b7850cb990f02d1c3725a3
139,666,300,462,750,820,000,000,000,000,000,000,000
1
[fix] fix a bug of encryption function with iv may return wrong result (#8277)
void set_null_ref_table() { if (!view->is_inner_table_of_outer_join() || !(null_ref_table= view->get_real_join_table())) null_ref_table= NO_NULL_TABLE; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
234,702,209,892,710,150,000,000,000,000,000,000,000
6
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....