func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
autoar_extractor_set_notify_interval (AutoarExtractor *self, gint64 notify_interval) { g_return_if_fail (AUTOAR_IS_EXTRACTOR (self)); g_return_if_fail (notify_interval >= 0); self->notify_interval = notify_interval; }
0
[ "CWE-22" ]
gnome-autoar
adb067e645732fdbe7103516e506d09eb6a54429
296,542,043,480,970,600,000,000,000,000,000,000,000
7
AutoarExtractor: Do not extract files outside the destination dir Currently, a malicious archive can cause that the files are extracted outside of the destination dir. This can happen if the archive contains a file whose parent is a symbolic link, which points outside of the destination dir. This is potentially a secu...
mb_cptr2char_adv(char_u **pp) { int c; c = (*mb_ptr2char)(*pp); if (enc_utf8) *pp += utf_ptr2len(*pp); else *pp += (*mb_ptr2len)(*pp); return c; }
0
[ "CWE-122", "CWE-787" ]
vim
f6d39c31d2177549a986d170e192d8351bd571e2
298,405,139,754,566,400,000,000,000,000,000,000,000
11
patch 9.0.0220: invalid memory access with for loop over NULL string Problem: Invalid memory access with for loop over NULL string. Solution: Make sure mb_ptr2len() consistently returns zero for NUL.
UpdateDerivedKeymapFields(struct xkb_keymap *keymap) { struct xkb_key *key; struct xkb_mod *mod; struct xkb_led *led; unsigned int i, j; /* Find all the interprets for the key and bind them to actions, * which will also update the vmodmap. */ xkb_keys_foreach(key, keymap) if (!Appl...
0
[ "CWE-476" ]
libxkbcommon
917636b1d0d70205a13f89062b95e3a0fc31d4ff
143,384,168,629,001,000,000,000,000,000,000,000,000
46
xkbcomp: fix crash when parsing an xkb_geometry section xkb_geometry sections are ignored; previously the had done so by returning NULL for the section's XkbFile, however some sections of the code do not expect this. Instead, create an XkbFile for it, it will never be processes and discarded later. Caught with the af...
static size_t PCLDeltaCompressImage(const size_t length, const unsigned char *previous_pixels,const unsigned char *pixels, unsigned char *compress_pixels) { int delta, j, replacement; register ssize_t i, x; register unsigned char *q; q=compress_pixels; for (x=0; x < (ssize_t) le...
0
[ "CWE-401" ]
ImageMagick6
ff840181f631b1b7f29160cae24d792fcd176bae
26,843,647,043,110,090,000,000,000,000,000,000,000
70
https://github.com/ImageMagick/ImageMagick/issues/1520
static void rowlog_done(RCore *core) { int use_color = core->print->flags & R_PRINT_FLAGS_COLOR; bool verbose = r_config_get_i (core->config, "scr.prompt"); if (verbose) { if (use_color) eprintf ("\r"Color_GREEN"[x]"Color_RESET" %s\n", oldstr); else eprintf ("\r[x] %s\n", oldstr); } }
0
[ "CWE-416", "CWE-908" ]
radare2
9d348bcc2c4bbd3805e7eec97b594be9febbdf9a
175,221,560,432,402,540,000,000,000,000,000,000,000
9
Fix #9943 - Invalid free on RAnal.avr
void mono_reflection_setup_generic_class (MonoReflectionTypeBuilder *tb) { g_assert_not_reached ();
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
321,048,050,223,474,630,000,000,000,000,000,000,000
4
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
static value input_val_from_block(void) { mlsize_t num_objects, whsize; value obj; num_objects = read32u(); #ifdef ARCH_SIXTYFOUR intern_src += 4; /* skip size_32 */ whsize = read32u(); #else whsize = read32u(); intern_src += 4; /* skip size_64 */ #endif /* Allocate result */ intern_alloc(whsize, n...
0
[ "CWE-200" ]
ocaml
659615c7b100a89eafe6253e7a5b9d84d0e8df74
236,775,957,527,519,920,000,000,000,000,000,000,000
22
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 ssize_t cdc_ncm_show_min_tx_pkt(struct device *d, struct device_attribute *attr, char *buf) { struct usbnet *dev = netdev_priv(to_net_dev(d)); struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0]; return sprintf(buf, "%u\n", ctx->min_tx_pkt); }
0
[ "CWE-703" ]
linux
4d06dd537f95683aba3651098ae288b7cbff8274
128,690,594,962,202,510,000,000,000,000,000,000,000
7
cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind usbnet_link_change will call schedule_work and should be avoided if bind is failing. Otherwise we will end up with scheduled work referring to a netdev which has gone away. Instead of making the call conditional, we can just defer it to usbnet_probe, using the...
static int get_dotl_openflags(V9fsState *s, int oflags) { int flags; /* * Filter the client open flags */ flags = dotl_to_open_flags(oflags); flags &= ~(O_NOCTTY | O_ASYNC | O_CREAT); /* * Ignore direct disk access hint until the server supports it. */ flags &= ~O_DIRECT; ...
0
[ "CWE-362" ]
qemu
89fbea8737e8f7b954745a1ffc4238d377055305
255,309,514,179,465,900,000,000,000,000,000,000,000
14
9pfs: Fully restart unreclaim loop (CVE-2021-20181) Depending on the client activity, the server can be asked to open a huge number of file descriptors and eventually hit RLIMIT_NOFILE. This is currently mitigated using a reclaim logic : the server closes the file descriptors of idle fids, based on the assumption that...
update_ownertrust (PKT_public_key *pk, unsigned int new_trust) { #ifdef NO_TRUST_MODELS (void)pk; (void)new_trust; #else tdb_update_ownertrust (pk, new_trust); #endif }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
278,342,220,010,944,300,000,000,000,000,000,000,000
9
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static void __migrate_swap_task(struct task_struct *p, int cpu) { if (task_on_rq_queued(p)) { struct rq *src_rq, *dst_rq; src_rq = task_rq(p); dst_rq = cpu_rq(cpu); p->on_rq = TASK_ON_RQ_MIGRATING; deactivate_task(src_rq, p, 0); set_task_cpu(p, cpu); activate_task(dst_rq, p, 0); p->on_rq = TASK_ON_RQ...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
288,272,356,000,097,860,000,000,000,000,000,000
23
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
void gf_sleep(u32 ms) { #ifdef WIN32 Sleep(ms); #else s32 sel_err; struct timeval tv; #ifndef SLEEP_ABS_SELECT u32 prev, now, elapsed; #endif #ifdef SLEEP_ABS_SELECT tv.tv_sec = ms/1000; tv.tv_usec = (ms%1000)*1000; #else prev = gf_sys_clock(); #endif do { errno = 0; #ifndef SLEEP_ABS_SELECT now = gf_sy...
0
[ "CWE-787" ]
gpac
f3698bb1bce62402805c3fda96551a23101a32f9
123,090,230,284,184,500,000,000,000,000,000,000,000
38
fix buffer overrun in gf_bin128_parse closes #1204 closes #1205
static bool spte_wrprot_for_clear_dirty(u64 *sptep) { bool was_writable = test_and_clear_bit(PT_WRITABLE_SHIFT, (unsigned long *)sptep); if (was_writable && !spte_ad_enabled(*sptep)) kvm_set_pfn_dirty(spte_to_pfn(*sptep)); return was_writable; }
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
44,050,336,939,235,150,000,000,000,000,000,000,000
9
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
get_glyph_cache (void) { if (!global_glyph_cache) global_glyph_cache = pixman_glyph_cache_create (); return global_glyph_cache; }
0
[ "CWE-787" ]
cairo
c986a7310bb06582b7d8a566d5f007ba4e5e75bf
43,869,432,611,752,000,000,000,000,000,000,000,000
7
image: Enable inplace compositing with opacities for general routines On a SNB i5-2500: Speedups ======== firefox-chalkboard 34284.16 -> 19637.40: 1.74x speedup swfdec-giant-steps 778.35 -> 665.37: 1.17x speedup ocitysmap 485.64 -> 431.94: 1.12x speedup Slowdowns ===...
int am_handler(request_rec *r) { am_dir_cfg_rec *cfg = am_get_dir_cfg(r); #ifdef HAVE_ECP am_req_cfg_rec *req_cfg = am_get_req_cfg(r); #endif /* HAVE_ECP */ const char *endpoint; /* * Normally this content handler is used to dispatch to the SAML * endpoints implmented by mod_auth_mellon. SAML...
0
[]
mod_auth_mellon
6bdda9170a8f1757dabc5b109958657417728018
320,343,930,663,555,900,000,000,000,000,000,000,000
68
Fix segmentation fault when receiving badly formed logout message. If the logout message is badly formed, we won't get the entityID in `logout->parent.remote_providerID`. If we call `apr_hash_get()` with a null pointer, it will cause a segmentation fault. Add a check to validate that the entityID is correctly set.
static void vmx_queue_exception(struct kvm_vcpu *vcpu, unsigned nr, bool has_error_code, u32 error_code, bool reinject) { struct vcpu_vmx *vmx = to_vmx(vcpu); u32 intr_info = nr | INTR_INFO_VALID_MASK; if (!reinject && is_guest_mode(vcpu) && nested_vmx_check_exception(vcpu, nr)) return; if (has_err...
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
133,402,066,846,300,710,000,000,000,000,000,000,000
34
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
int git_index_reuc_find(size_t *at_pos, git_index *index, const char *path) { return git_vector_bsearch2(at_pos, &index->reuc, index->reuc_search, path); }
0
[ "CWE-415", "CWE-190" ]
libgit2
3db1af1f370295ad5355b8f64b865a2a357bcac0
36,284,034,903,769,200,000,000,000,000,000,000,000
4
index: error out on unreasonable prefix-compressed path lengths When computing the complete path length from the encoded prefix-compressed path, we end up just allocating the complete path without ever checking what the encoded path length actually is. This can easily lead to a denial of service by just encoding an un...
bool string_equal(char const* str1, char const* str2, int len2) { while (len2 > 0) { if (*str1 != *str2) return false; if (*str1 == 0) return false; ++str1; ++str2; --len2; } return *str1 == 0; }
0
[ "CWE-125" ]
libtorrent
ec30a5e9ec703afb8abefba757c6d401303b53db
2,645,969,773,557,339,500,000,000,000,000,000,000
12
fix out-of-bounds read in bdecode Fixes #2099
xsltGenerateIdFunction(xmlXPathParserContextPtr ctxt, int nargs){ xmlNodePtr cur = NULL; unsigned long val; xmlChar str[20]; if (nargs == 0) { cur = ctxt->context->node; } else if (nargs == 1) { xmlXPathObjectPtr obj; xmlNodeSetPtr nodelist; int i, ret; if ((ctxt->value == NULL) || (ctxt->val...
1
[ "CWE-200" ]
libxslt
ecb6bcb8d1b7e44842edde3929f412d46b40c89f
218,814,172,311,437,360,000,000,000,000,000,000,000
47
Fix generate-id() to not expose object addresses As pointed out by Chris Evans <scarybeasts@gmail.com> it's better security wise to not expose object addresses directly, use a diff w.r.t. the document root own address to avoid this * libxslt/functions.c: fix IDs generation code
static void enter_svm_guest_mode(struct vcpu_svm *svm, u64 vmcb_gpa, struct vmcb *nested_vmcb, struct kvm_host_map *map) { if (kvm_get_rflags(&svm->vcpu) & X86_EFLAGS_IF) svm->vcpu.arch.hflags |= HF_HIF_MASK; else svm->vcpu.arch.hflags &= ~HF_HIF_MASK; if (nested_vmcb->control.nested_ctl & SVM_NESTED_CTL_N...
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
223,341,233,138,669,640,000,000,000,000,000,000,000
102
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 bool is_macro_id(const Token *t) { return tok_type(t, TOK_ID) || tok_type(t, TOK_LOCAL_MACRO); }
0
[]
nasm
6299a3114ce0f3acd55d07de201a8ca2f0a83059
172,803,386,729,618,400,000,000,000,000,000,000,000
4
BR 3392708: fix NULL pointer reference for invalid %stacksize After issuing an error message for a missing %stacksize argument, need to quit rather than continuing to try to access the pointer. Fold uses of tok_text() while we are at it. Reported-by: Suhwan <prada960808@gmail.com> Signed-off-by: H. Peter Anvin (Inte...
static int stub_send_ret_submit(struct stub_device *sdev) { unsigned long flags; struct stub_priv *priv, *tmp; struct msghdr msg; size_t txsize; size_t total_size = 0; while ((priv = dequeue_from_priv_tx(sdev)) != NULL) { int ret; struct urb *urb = priv->urb; struct usbip_header pdu_header; struct usbi...
1
[ "CWE-476" ]
linux
be6123df1ea8f01ee2f896a16c2b7be3e4557a5a
278,365,628,264,432,670,000,000,000,000,000,000,000
132
usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer stub_send_ret_submit() handles urb with a potential null transfer_buffer, when it replays a packet with potential malicious data that could contain a null buffer. Add a check for the condition when actual_length > 0 and transfer_buffer is null. R...
static int php_zip_has_property(zval *object, zval *member, int type TSRMLS_DC) /* {{{ */ { ze_zip_object *obj; zval tmp_member; zip_prop_handler *hnd; zend_object_handlers *std_hnd; int ret, retval = 0; if (member->type != IS_STRING) { tmp_member = *member; zval_copy_ctor(&tmp_member); convert_to_string(&...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
64,040,800,001,054,900,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
Bool gf_prompt_has_input() { return kbhit(); }
0
[ "CWE-787" ]
gpac
f3698bb1bce62402805c3fda96551a23101a32f9
39,141,084,366,228,890,000,000,000,000,000,000,000
4
fix buffer overrun in gf_bin128_parse closes #1204 closes #1205
mremap_chunk (mchunkptr p, size_t new_size) { size_t pagesize = GLRO (dl_pagesize); INTERNAL_SIZE_T offset = prev_size (p); INTERNAL_SIZE_T size = chunksize (p); char *cp; assert (chunk_is_mmapped (p)); assert (((size + offset) & (GLRO (dl_pagesize) - 1)) == 0); /* Note the extra SIZE_SZ overhead as in ...
0
[ "CWE-787" ]
glibc
d6db68e66dff25d12c3bc5641b60cbd7fb6ab44f
50,322,796,819,954,650,000,000,000,000,000,000,000
36
malloc: Mitigate null-byte overflow attacks * malloc/malloc.c (_int_free): Check for corrupt prev_size vs size. (malloc_consolidate): Likewise.
void sk_stop_timer(struct sock *sk, struct timer_list* timer) { if (timer_pending(timer) && del_timer(timer)) __sock_put(sk); }
0
[ "CWE-264" ]
linux-2.6
df0bca049d01c0ee94afb7cd5dfd959541e6c8da
340,230,797,024,456,570,000,000,000,000,000,000,000
5
net: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2 In function sock_getsockopt() located in net/core/sock.c, optval v.val is not correctly initialized and directly returned in userland in case we have SO_BSDCOMPAT option set. This dummy code should trigger the bug: int main(void) { unsigned char buf...
FLAC_API FLAC__bool FLAC__stream_encoder_set_do_escape_coding(FLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); FLAC__ASSERT(0 != encoder->protected_); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) return false; #if 0 /*@@@ ...
0
[]
flac
c06a44969c1145242a22f75fc8fb2e8b54c55303
289,090,326,333,380,150,000,000,000,000,000,000,000
15
flac : Fix for https://sourceforge.net/p/flac/bugs/425/ * flac/encode.c : Validate num_tracks field of cuesheet. * libFLAC/stream_encoder.c : Add check for a NULL pointer. * flac/encode.c : Improve bounds checking. Closes: https://sourceforge.net/p/flac/bugs/425/
eval_spell_expr(char_u *badword, char_u *expr) { typval_T save_val; typval_T rettv; list_T *list = NULL; char_u *p = skipwhite(expr); sctx_T saved_sctx = current_sctx; sctx_T *ctx; // Set "v:val" to the bad word. prepare_vimvar(VV_VAL, &save_val); set_vim_var_string(VV_VAL, badword,...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
158,647,477,153,897,660,000,000,000,000,000,000,000
34
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.
__ioat3_prep_xor_lock(struct dma_chan *c, enum sum_check_flags *result, dma_addr_t dest, dma_addr_t *src, unsigned int src_cnt, size_t len, unsigned long flags) { struct ioat2_dma_chan *ioat = to_ioat2_chan(c); struct ioat_ring_ent *compl_desc; struct ioat_ring_ent *desc; struct ioat_ring_ent *ext; ...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
202,994,083,125,429,430,000,000,000,000,000,000,000
89
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
emulate_sysexit(struct x86_emulate_ctxt *ctxt) { struct decode_cache *c = &ctxt->decode; struct kvm_segment cs, ss; u64 msr_data; int usermode; /* inject #UD if LOCK prefix is used */ if (c->lock_prefix) return -1; /* inject #GP if in real mode or paging is disabled */ if (ctxt->mode == X86EMUL_MODE_REAL ...
0
[ "CWE-20" ]
kvm
e42d9b8141d1f54ff72ad3850bb110c95a5f3b88
127,875,192,273,974,820,000,000,000,000,000,000,000
65
KVM: x86 emulator: limit instructions to 15 bytes While we are never normally passed an instruction that exceeds 15 bytes, smp games can cause us to attempt to interpret one, which will cause large latencies in non-preempt hosts. Cc: stable@kernel.org Signed-off-by: Avi Kivity <avi@redhat.com>
void cgroup_sk_free(struct sock_cgroup_data *skcd) { struct cgroup *cgrp = sock_cgroup_ptr(skcd); cgroup_bpf_put(cgrp); cgroup_put(cgrp); }
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
331,959,099,248,628,140,000,000,000,000,000,000,000
7
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
static void client(int fd, int *resume, unsigned rounds, const char *prio) { gnutls_session_t session; gnutls_datum_t session_data; gnutls_certificate_credentials_t clientx509cred = NULL; for (unsigned i = 0; i < rounds; i++) { assert(gnutls_certificate_allocate_credentials(&clientx509cred)>=0); assert(gnutls...
0
[]
gnutls
c2646aeee94e71cb15c90a3147cf3b5b0ca158ca
189,084,729,534,346,600,000,000,000,000,000,000,000
31
stek: differentiate initial state from valid time window of TOTP There was a confusion in the TOTP implementation in stek.c. When the mechanism is initialized at the first time, it records the timestamp but doesn't initialize the key. This removes the timestamp recording at the initialization phase, so the key is pr...
void tls1_clear(SSL *s) { ssl3_clear(s); s->version = s->method->version; }
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
52,327,167,778,496,460,000,000,000,000,000,000,000
5
Add Next Protocol Negotiation.
static inline void mark_as_seen(struct object *object) { ALLOC_GROW(seen_objects, seen_objects_nr + 1, seen_objects_alloc); seen_objects[seen_objects_nr++] = object; }
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
247,939,116,114,837,080,000,000,000,000,000,000,000
5
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
void sync_nested_vmcb_control(struct vcpu_svm *svm) { u32 mask; svm->nested.ctl.event_inj = svm->vmcb->control.event_inj; svm->nested.ctl.event_inj_err = svm->vmcb->control.event_inj_err; /* Only a few fields of int_ctl are written by the processor. */ mask = V_IRQ_MASK | V_TPR_MASK; if (!(svm->nested.ctl...
0
[ "CWE-416" ]
linux
a58d9166a756a0f4a6618e4f593232593d6df134
259,701,405,835,801,540,000,000,000,000,000,000,000
23
KVM: SVM: load control fields from VMCB12 before checking them Avoid races between check and use of the nested VMCB controls. This for example ensures that the VMRUN intercept is always reflected to the nested hypervisor, instead of being processed by the host. Without this patch, it is possible to end up with svm->...
sg_unlink_reserve(Sg_fd * sfp, Sg_request * srp) { Sg_scatter_hold *req_schp = &srp->data; SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, srp->parentfp->parentdp, "sg_unlink_reserve: req->k_use_sg=%d\n", (int) req_schp->k_use_sg)); req_schp->k_use_sg = 0; req_schp->bufflen = 0; req_schp->pages = NUL...
0
[ "CWE-190", "CWE-189" ]
linux
fdc81f45e9f57858da6351836507fbcf1b7583ee
12,202,207,095,301,095,000,000,000,000,000,000,000
15
sg_start_req(): use import_iovec() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
static int srpt_check_stop_free(struct se_cmd *cmd) { struct srpt_send_ioctx *ioctx = container_of(cmd, struct srpt_send_ioctx, cmd); return target_put_sess_cmd(&ioctx->cmd); }
0
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
156,755,299,195,220,130,000,000,000,000,000,000,000
7
IB/srpt: Simplify srpt_handle_tsk_mgmt() Let the target core check task existence instead of the SRP target driver. Additionally, let the target core check the validity of the task management request instead of the ib_srpt driver. This patch fixes the following kernel crash: BUG: unable to handle kernel NULL pointer...
static void wmi_evt_addba_rx_req(struct wil6210_priv *wil, int id, void *d, int len) { struct wmi_rcp_addba_req_event *evt = d; wil_addba_rx_request(wil, evt->cidxtid, evt->dialog_token, evt->ba_param_set, evt->ba_timeout, evt->ba_seq_ctrl); }
0
[ "CWE-119" ]
linux
b5a8ffcae4103a9d823ea3aa3a761f65779fbe2a
328,196,700,331,172,500,000,000,000,000,000,000,000
9
wil6210: missing length check in wmi_set_ie Add a length check in wmi_set_ie to detect unsigned integer overflow. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
static pyc_object *get_tuple_object(RBuffer *buffer) { bool error = false; ut32 n = get_ut32 (buffer, &error); if (n > ST32_MAX) { eprintf ("bad marshal data (tuple size out of range)\n"); return NULL; } if (error) { return NULL; } pyc_object *ret = get_array_object_generic (buffer, n); if (ret) { ret->...
0
[ "CWE-119", "CWE-825" ]
radare2
35482cb760db10f87a62569e2f8872dbd95e9269
57,363,592,327,327,550,000,000,000,000,000,000,000
16
Fix UAF in pyc parser ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/harep2.pyc
psutil_proc_name(PyObject *self, PyObject *args) { long pid; struct kinfo_proc kp; if (! PyArg_ParseTuple(args, "l", &pid)) return NULL; if (psutil_get_kinfo_proc(pid, &kp) == -1) return NULL; return PyUnicode_DecodeFSDefault(kp.kp_proc.p_comm); }
0
[ "CWE-415" ]
psutil
7d512c8e4442a896d56505be3e78f1156f443465
243,850,956,664,031,100,000,000,000,000,000,000,000
10
Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creat...
find_mech (const DBusString *name, char **allowed_mechs) { int i; if (allowed_mechs != NULL && !_dbus_string_array_contains ((const char**) allowed_mechs, _dbus_string_get_const_data (name))) return NULL; i = 0; while (all_mechanisms[i]...
0
[ "CWE-59" ]
dbus
47b1a4c41004bf494b87370987b222c934b19016
276,874,539,536,359,900,000,000,000,000,000,000,000
23
auth: Reject DBUS_COOKIE_SHA1 for users other than the server owner The DBUS_COOKIE_SHA1 authentication mechanism aims to prove ownership of a shared home directory by having the server write a secret "cookie" into a .dbus-keyrings subdirectory of the desired identity's home directory with 0700 permissions, and having...
void decode(bufferlist::iterator& bl) { __u8 struct_v; ::decode(struct_v, bl); ::decode(name, bl); ::decode(global_id, bl); if (struct_v >= 2) ::decode(auid, bl); else auid = CEPH_AUTH_UID_DEFAULT; ::decode(created, bl); ::decode(expires, bl); ::decode(caps, bl); ::decode...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
300,351,170,795,550,430,000,000,000,000,000,000,000
13
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static void virtio_serial_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass); HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(klass); QLIST_INIT(&vserdevices.devices); dc->props = virtio_serial_properties; set...
0
[ "CWE-120", "CWE-787" ]
qemu
7882080388be5088e72c425b02223c02e6cb4295
72,022,097,303,719,630,000,000,000,000,000,000,000
21
virtio-serial: fix ANY_LAYOUT Don't assume a specific layout for control messages. Required by virtio 1. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Jason Wang <jasowang@redhat.com>
fst_log_rx_error(struct fst_card_info *card, struct fst_port_info *port, unsigned char dmabits, int rxp, unsigned short len) { struct net_device *dev = port_to_dev(port); /* * Increment the appropriate error counter */ dev->stats.rx_errors++; if (dmabits & RX_OFLO) { dev->stats.rx_fifo_errors++; dbg(DBG...
0
[ "CWE-399" ]
linux
96b340406724d87e4621284ebac5e059d67b2194
38,949,641,059,486,435,000,000,000,000,000,000,000
30
farsync: fix info leak in ioctl The fst_get_iface() code fails to initialize the two padding bytes of struct sync_serial_settings after the ->loopback member. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. ...
print_dp_details(RES* ssl, struct worker* worker, struct delegpt* dp) { char buf[257]; struct delegpt_addr* a; int lame, dlame, rlame, rto, edns_vs, to, delay, tA = 0, tAAAA = 0, tother = 0; long long entry_ttl; struct rtt_info ri; uint8_t edns_lame_known; for(a = dp->target_list; a; a = a->next_target) { ad...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
262,077,473,301,200,200,000,000,000,000,000,000,000
73
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
uint64_t streamDelConsumer(streamCG *cg, sds name) { streamConsumer *consumer = streamLookupConsumer(cg,name,0); if (consumer == NULL) return 0; uint64_t retval = raxSize(consumer->pel); /* Iterate all the consumer pending messages, deleting every corresponding * entry from the global entry. */ ...
0
[ "CWE-125", "CWE-704" ]
redis
c04082cf138f1f51cedf05ee9ad36fb6763cafc6
126,216,804,151,216,470,000,000,000,000,000,000,000
23
Abort in XGROUP if the key is not a stream
static inline int rds_send_is_acked(struct rds_message *rm, u64 ack, is_acked_func is_acked) { if (is_acked) return is_acked(rm, ack); return be64_to_cpu(rm->m_inc.i_hdr.h_sequence) <= ack; }
0
[ "CWE-362" ]
linux
8c7188b23474cca017b3ef354c4a58456f68303a
208,064,136,421,025,770,000,000,000,000,000,000,000
7
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 ...
static void do_show_pages(QPDF& pdf, Options& o) { QPDFPageDocumentHelper dh(pdf); std::vector<QPDFPageObjectHelper> pages = dh.getAllPages(); int pageno = 0; for (std::vector<QPDFPageObjectHelper>::iterator iter = pages.begin(); iter != pages.end(); ++iter) { QPDFPageObjectHelper& ...
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
330,085,357,615,117,800,000,000,000,000,000,000,000
53
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 ...
InsertSimpleFontPackage ( IN VOID *PackageHdr, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, OUT HII_SIMPLE_FONT_PACKAGE_INSTANCE **Package ) { HII_SIMPLE_FONT_PACKAGE_INSTANCE *SimpleFontPackage; ...
0
[ "CWE-416" ]
edk2
c32be82e99ef272e7fa742c2f06ff9a4c3756613
227,309,525,956,811,500,000,000,000,000,000,000,000
60
MdeModulePkg/HiiDB: Remove configuration table when it's freed (CVE-2019-14586) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1995 Fix the corner case issue that the original configuration runtime memory is freed, but it is still exposed to the OS runtime. So this patch is to remove the configuration table to a...
void in_time::set(uint pos,Item *item) { struct packed_longlong *buff= &((packed_longlong*) base)[pos]; buff->val= item->val_time_packed(current_thd); buff->unsigned_flag= 1L; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
193,335,086,859,918,450,000,000,000,000,000,000
7
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
static long region_chg(struct list_head *head, long f, long t) { struct file_region *rg, *nrg; long chg = 0; /* Locate the region we are before or in. */ list_for_each_entry(rg, head, link) if (f <= rg->to) break; /* If we are below the current region then a new region is required. * Subtle, allocate a ne...
0
[ "CWE-399" ]
linux
90481622d75715bfcb68501280a917dbfe516029
212,100,621,187,106,100,000,000,000,000,000,000,000
48
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 efer_trap(struct kvm_vcpu *vcpu) { struct msr_data msr_info; int ret; /* * Clear the EFER_SVME bit from EFER. The SVM code always sets this * bit in svm_set_efer(), but __kvm_valid_efer() checks it against * whether the guest has X86_FEATURE_SVM - this avoids a failure if * the guest doesn't have...
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
30,625,428,490,628,933,000,000,000,000,000,000,000
18
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
ip_create_slave(argc, argv, self) int argc; VALUE *argv; VALUE self; { struct tcltkip *master = get_ip(self); VALUE safemode; VALUE name; VALUE callargv[2]; /* ip is deleted? */ if (deleted_ip(master)) { rb_raise(rb_eRuntimeError, "deleted master cannot cr...
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
101,129,392,098,958,070,000,000,000,000,000,000,000
30
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static void perf_remove_from_context(struct perf_event *event, unsigned long flags) { lockdep_assert_held(&event->ctx->mutex); event_function_call(event, __perf_remove_from_context, (void *)flags); }
0
[ "CWE-362", "CWE-125" ]
linux
321027c1fe77f892f4ea07846aeae08cefbbb290
142,031,516,591,787,860,000,000,000,000,000,000,000
6
perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race Di Shen reported a race between two concurrent sys_perf_event_open() calls where both try and move the same pre-existing software group into a hardware context. The problem is exactly that described in commit: f63a8daa5812 ("perf: Fix event->ctx...
static inline bool llc_estab_match(const struct llc_sap *sap, const struct llc_addr *daddr, const struct llc_addr *laddr, const struct sock *sk) { struct llc_sock *llc = llc_sk(sk); return llc->laddr.lsap == laddr->lsap && llc->daddr.lsap == daddr->lsap && ether_addr_equal(llc->laddr.mac, la...
0
[ "CWE-20", "CWE-401" ]
linux
8b74d439e1697110c5e5c600643e823eb1dd0762
78,272,065,313,838,030,000,000,000,000,000,000,000
12
net/llc: avoid BUG_ON() in skb_orphan() It seems nobody used LLC since linux-3.12. Fortunately fuzzers like syzkaller still know how to run this code, otherwise it would be no fun. Setting skb->sk without skb->destructor leads to all kinds of bugs, we now prefer to be very strict about it. Ideally here we would use...
findoprnd(ITEM *ptr, int32 *pos) { /* since this function recurses, it could be driven to stack overflow. */ check_stack_depth(); #ifdef BS_DEBUG elog(DEBUG3, (ptr[*pos].type == OPR) ? "%d %c" : "%d %d", *pos, ptr[*pos].val); #endif if (ptr[*pos].type == VAL) { ptr[*pos].left = 0; (*pos)--; } else if (...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
10,074,887,821,597,050,000,000,000,000,000,000,000
31
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg) { struct page *page = NULL; struct rds_atomic_args *args; int ret = 0; if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct rds_atomic_args)) || rm->atomic.op_active) return -EINVAL; args = CMSG_DATA(cmsg); /* Nonmasked & m...
0
[ "CWE-476", "CWE-241" ]
linux
7d11f77f84b27cef452cee332f4e469503084737
136,019,026,953,529,140,000,000,000,000,000,000,000
94
RDS: null pointer dereference in rds_atomic_free_op set rm->atomic.op_active to 0 when rds_pin_pages() fails or the user supplied address is invalid, this prevents a NULL pointer usage in rds_atomic_free_op() Signed-off-by: Mohamed Ghannam <simo.ghannam@gmail.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle...
xsltCopyTreeInternal(xsltTransformContextPtr ctxt, xmlNodePtr invocNode, xmlNodePtr node, xmlNodePtr insert, int isLRE, int topElemVisited) { xmlNodePtr copy; if (node == NULL) return(NULL); switch (node->type) { case XML_ELEMENT_NODE: case XML_ENTITY_REF_NODE: ...
0
[]
libxslt
937ba2a3eb42d288f53c8adc211bd1122869f0bf
158,744,515,353,146,400,000,000,000,000,000,000,000
189
Fix default template processing on namespace nodes
int ext4_write_inode(struct inode *inode, struct writeback_control *wbc) { int err; if (WARN_ON_ONCE(current->flags & PF_MEMALLOC)) return 0; if (EXT4_SB(inode->i_sb)->s_journal) { if (ext4_journal_current_handle()) { jbd_debug(1, "called recursively, non-PF_MEMALLOC!\n"); dump_stack(); return -EIO; ...
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
47,944,646,658,004,620,000,000,000,000,000,000,000
44
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
int mingw_socket(int domain, int type, int protocol) { int sockfd; SOCKET s; ensure_socket_initialization(); s = WSASocket(domain, type, protocol, NULL, 0, 0); if (s == INVALID_SOCKET) { /* * WSAGetLastError() values are regular BSD error codes * biased by WSABASEERR. * However, strerror() does not kno...
0
[ "CWE-20" ]
git
6d8684161ee9c03bed5cb69ae76dfdddb85a0003
60,447,770,513,241,810,000,000,000,000,000,000,000
28
mingw: fix quoting of arguments We need to be careful to follow proper quoting rules. For example, if an argument contains spaces, we have to quote them. Double-quotes need to be escaped. Backslashes need to be escaped, but only if they are followed by a double-quote character. We need to be _extra_ careful to consid...
static int other_inode_match(struct inode * inode, unsigned long ino, void *data) { struct other_inode *oi = (struct other_inode *) data; if ((inode->i_ino != ino) || (inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW | I_DIRTY_INODE)) || ((inode->i_state & I_DIRTY_TIME) == 0)) return 0...
0
[ "CWE-416" ]
linux
eb9b5f01c33adebc31cbc236c02695f605b0e417
54,801,419,102,125,530,000,000,000,000,000,000,000
31
ext4: bubble errors from ext4_find_inline_data_nolock() up to ext4_iget() If ext4_find_inline_data_nolock() returns an error it needs to get reflected up to ext4_iget(). In order to fix this, ext4_iget_extra_inode() needs to return an error (and not return void). This is related to "ext4: do not allow external inode...
int au1100fb_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *fbi) { struct au1100fb_device *fbdev; u32 *palette; u32 value; fbdev = to_au1100fb_device(fbi); palette = fbdev->regs->lcd_pallettebase; if (regno > (AU1100_LCD_NBR_PALETTE_ENTRIES - 1)) ret...
0
[ "CWE-119", "CWE-189", "CWE-703" ]
linux
7314e613d5ff9f0934f7a0f74ed7973b903315d1
160,264,161,544,759,070,000,000,000,000,000,000,000
55
Fix a few incorrectly checked [io_]remap_pfn_range() calls Nico Golde reports a few straggling uses of [io_]remap_pfn_range() that really should use the vm_iomap_memory() helper. This trivially converts two of them to the helper, and comments about why the third one really needs to continue to use remap_pfn_range(), ...
static int key_notify_policy(struct xfrm_policy *xp, int dir, const struct km_event *c) { struct sk_buff *out_skb; struct sadb_msg *out_hdr; int err; out_skb = pfkey_xfrm_policy2msg_prep(xp); if (IS_ERR(out_skb)) return PTR_ERR(out_skb); err = pfkey_xfrm_policy2msg(out_skb, xp, dir); if (err < 0) return er...
0
[]
linux
096f41d3a8fcbb8dde7f71379b1ca85fe213eded
279,987,241,215,339,230,000,000,000,000,000,000,000
28
af_key: Fix sadb_x_ipsecrequest parsing The parsing of sadb_x_ipsecrequest is broken in a number of ways. First of all we're not verifying sadb_x_ipsecrequest_len. This is needed when the structure carries addresses at the end. Worse we don't even look at the length when we parse those optional addresses. The migra...
static void nfs4_opendata_free(struct kref *kref) { struct nfs4_opendata *p = container_of(kref, struct nfs4_opendata, kref); struct super_block *sb = p->dentry->d_sb; nfs_free_seqid(p->o_arg.seqid); if (p->state != NULL) nfs4_put_open_state(p->state); nfs4_put_state_owner(p->owner); dput(p->dir); dput(p->...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
214,155,240,500,288,200,000,000,000,000,000,000,000
15
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
void address_space_init_once(struct address_space *mapping) { memset(mapping, 0, sizeof(*mapping)); __address_space_init_once(mapping); }
0
[ "CWE-269" ]
linux
0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7
206,178,163,221,285,050,000,000,000,000,000,000,000
5
Fix up non-directory creation in SGID directories sgid directories have special semantics, making newly created files in the directory belong to the group of the directory, and newly created subdirectories will also become sgid. This is historically used for group-shared directories. But group directories writable b...
dump_hash (char *buf, const unsigned char *hash) { int i; for (i = 0; i < MD5_DIGEST_SIZE; i++, hash++) { *buf++ = XNUM_TO_digit (*hash >> 4); *buf++ = XNUM_TO_digit (*hash & 0xf); } *buf = '\0'; }
0
[ "CWE-20" ]
wget
3e25a9817f47fbb8660cc6a3b2f3eea239526c6c
70,033,566,021,655,550,000,000,000,000,000,000,000
11
Introduce --trust-server-names. Close CVE-2010-2252.
static inline int free_debug_processing(struct kmem_cache *s, struct page *page, void *object, void *addr) { return 0; }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
189,969,945,538,344,400,000,000,000,000,000,000,000
2
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 ...
static void launch(OpKernelContext* context, const Tensor& tensor_in, const Tensor& tensor_out, const Tensor& out_backprop, const std::array<int64, 3>& window, const std::array<int64, 3>& stride, const std::array<int64, 3>& out, ...
0
[ "CWE-369", "CWE-787" ]
tensorflow
63c6a29d0f2d692b247f7bf81f8732d6442fad09
208,787,883,259,628,500,000,000,000,000,000,000,000
92
Add missing validation, prevent heap OOB PiperOrigin-RevId: 372246723 Change-Id: I1a454a643810e77d7d14821b342098c56a09fbbf
zone_send_secureserial(dns_zone_t *zone, uint32_t serial) { isc_event_t *e; dns_zone_t *dummy = NULL; e = isc_event_allocate(zone->secure->mctx, zone, DNS_EVENT_ZONESECURESERIAL, receive_secure_serial, zone->secure, sizeof(struct secure_event)); if (e == NULL) return (ISC_R_NOMEMORY...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
163,757,259,346,736,090,000,000,000,000,000,000,000
18
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.
int samdb_msg_add_int64(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg, const char *attr_name, int64_t v) { const char *s = talloc_asprintf(mem_ctx, "%lld", (long long)v); if (s == NULL) { return ldb_oom(sam_ldb); } return ldb_msg_add_string(msg, attr_name, s); }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
72,349,446,324,379,990,000,000,000,000,000,000,000
9
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
int parse_host_port(struct sockaddr_in *saddr, const char *str, Error **errp) { gchar **substrings; struct hostent *he; const char *addr, *p, *r; int port, ret = 0; substrings = g_strsplit(str, ":", 2); if (!substrings || !substrings[0] || !substrings[1]) { error_set...
0
[ "CWE-835" ]
qemu
705df5466c98f3efdd2b68d3b31dad86858acad7
80,569,018,846,735,280,000,000,000,000,000,000,000
52
net: introduce qemu_receive_packet() Some NIC supports loopback mode and this is done by calling nc->info->receive() directly which in fact suppresses the effort of reentrancy check that is done in qemu_net_queue_send(). Unfortunately we can't use qemu_net_queue_send() here since for loopback there's no sender as pee...
static void __mod_tree_remove(struct mod_tree_node *node) { latch_tree_erase(&node->node, &mod_tree.root, &mod_tree_ops); }
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
144,459,051,006,783,370,000,000,000,000,000,000,000
4
module: limit enabling module.sig_enforce Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying "module.sig_enforce=1" on the boot command line sets "sig_enforce". Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured. This patch makes the presence of /sys/module/module/parameters/s...
static int old_bridge_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) { u32 tmp; if (get_user(tmp, (u32 __user *) arg)) return -EFAULT; if (tmp == BRCTL_GET_VERSION) return BRCTL_VERSION + 1; return -EINVAL; }
0
[]
linux-2.6
188f83dfe0eeecd1427d0d255cc97dbf7ef6b4b7
337,819,528,776,137,140,000,000,000,000,000,000,000
10
[PATCH] BLOCK: Move the msdos device ioctl compat stuff to the msdos driver [try #6] Move the msdos device ioctl compat stuff from fs/compat_ioctl.c to the msdos driver so that the msdos header file doesn't need to be included. Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel...
EXPORTED void list_auth_schemes(struct transaction_t *txn) { struct auth_challenge_t *auth_chal = &txn->auth_chal; unsigned conn_close = (txn->flags.conn & CONN_CLOSE); struct auth_scheme_t *scheme; /* Advertise available schemes that can work with the type of connection */ for (scheme = auth_schem...
0
[]
cyrus-imapd
602f12ed2af0a49ac4a58affbfea57d0fc23dea5
12,285,114,567,966,360,000,000,000,000,000,000,000
22
httpd.c: only allow reuse of auth creds on a persistent connection against a backend server in a Murder
TfLiteStatus PrepareInt16SubOpPOT(TfLiteContext* context, const TfLiteTensor* input1, const TfLiteTensor* input2, TfLiteTensor* output, TfLiteSubParams* params, OpData* data) { // 16...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
51,337,445,588,303,040,000,000,000,000,000,000,000
46
[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...
static ssize_t comm_write(struct file *file, const char __user *buf, size_t count, loff_t *offset) { struct inode *inode = file->f_path.dentry->d_inode; struct task_struct *p; char buffer[TASK_COMM_LEN]; memset(buffer, 0, sizeof(buffer)); if (count > sizeof(buffer) - 1) count = sizeof(buffer) - 1; if (copy...
0
[]
linux
0499680a42141d86417a8fbaa8c8db806bea1201
339,750,567,748,022,300,000,000,000,000,000,000,000
26
procfs: add hidepid= and gid= mount options Add support for mount options to restrict access to /proc/PID/ directories. The default backward-compatible "relaxed" behaviour is left untouched. The first mount option is called "hidepid" and its value defines how much info about processes we want to be available for non...
static void my_dav_shutdown(void) { if (server_info) xmlFree(server_info); buf_free(&server_info_token); buf_free(&server_info_link); }
0
[]
cyrus-imapd
6703ff881b6056e0c045a7b795ce8ba1bbb87027
296,301,969,209,471,560,000,000,000,000,000,000,000
6
http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication
parse_json_array( char *s, int *i, GPtrArray *array) { int len = strlen(s); char *token; (*i)++; for (; *i < len && s[*i] != '\0'; (*i)++) { char c = s[*i]; switch (c) { case '[': { json_value_t *value = g_new(json_value_t, 1); value->type = MESSAGE_HASH; value...
0
[ "CWE-77" ]
amanda
29bae2e271093cd8d06ea98f73a474c685c5a314
315,745,588,232,707,000,000,000,000,000,000,000,000
74
* application-src/ambsdtar.c, application-src/amgtar.c, application-src/amstar.c: Filter option from COMMAND-OPTIONS * common-src/ammessage.c: Add message. git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/trunk@6483 a8d146d6-cc15-0410-8900-af154a0219e0
GF_Node *gf_node_list_del_child_idx(GF_ChildNodeItem **list, u32 pos) { u32 cur_pos = 0; GF_Node *ret = NULL; GF_ChildNodeItem *child, *cur; child = *list; if (!child) return 0; if (!pos) { *list = child->next; ret = child->node; gf_free(child); return ret; } while (child->next) { if (cur_pos+1 != p...
0
[ "CWE-416" ]
gpac
9723dd0955894f2cb7be13b94cf7a47f2754b893
105,408,279,228,891,720,000,000,000,000,000,000,000
29
fixed #2109
static int put_v4l2_plane32(struct v4l2_plane __user *up, struct v4l2_plane32 __user *up32, enum v4l2_memory memory) { unsigned long p; if (copy_in_user(up32, up, 2 * sizeof(__u32)) || copy_in_user(&up32->data_offset, &up->data_offset, sizeof(up->data_offset))) return -EFAULT; switch (memo...
0
[ "CWE-787" ]
linux
a1dfb4c48cc1e64eeb7800a27c66a6f7e88d075a
244,667,135,303,327,300,000,000,000,000,000,000,000
32
media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic The 32-bit compat v4l2 ioctl handling is implemented based on its 64-bit equivalent. It converts 32-bit data structures into its 64-bit equivalents and needs to provide the data to the 64-bit ioctl in user space memory which is commonly allocated using compat...
ex_put(exarg_T *eap) { // ":0put" works like ":1put!". if (eap->line2 == 0) { eap->line2 = 1; eap->forceit = TRUE; } curwin->w_cursor.lnum = eap->line2; check_cursor_col(); do_put(eap->regname, NULL, eap->forceit ? BACKWARD : FORWARD, 1L, PUT_LINE|PUT_CURSLINE); }
0
[ "CWE-122" ]
vim
0b5b06cb4777d1401fdf83e7d48d287662236e7e
267,048,701,155,863,000,000,000,000,000,000,000,000
13
patch 8.2.3581: reading character past end of line Problem: Reading character past end of line. Solution: Correct the cursor column.
static void isabus_fdc_instance_init(Object *obj) { FDCtrlISABus *isa = ISA_FDC(obj); device_add_bootindex_property(obj, &isa->bootindexA, "bootindexA", "/floppy@0", DEVICE(obj), NULL); device_add_bootindex_property(obj, &isa->bootindexB, ...
0
[ "CWE-119" ]
qemu
e907746266721f305d67bc0718795fedee2e824c
52,728,737,756,818,440,000,000,000,000,000,000,000
11
fdc: force the fifo access to be in bounds of the allocated buffer During processing of certain commands such as FD_CMD_READ_ID and FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could get out of bounds leading to memory corruption with values coming from the guest. Fix this by making sure that the index i...
static inline int compute_score(struct sock *sk, struct net *net, __be32 saddr, unsigned short hnum, __be16 sport, __be32 daddr, __be16 dport, int dif) { int score; struct inet_sock *inet; if (!net_eq(sock_net(sk), net) || udp_sk(sk)->udp_port_hash != hnum || ipv6_only_sock(sk)) return -1; sco...
0
[ "CWE-399" ]
linux
beb39db59d14990e401e235faf66a6b9b31240b0
79,379,065,338,632,520,000,000,000,000,000,000,000
41
udp: fix behavior of wrong checksums We have two problems in UDP stack related to bogus checksums : 1) We return -EAGAIN to application even if receive queue is not empty. This breaks applications using edge trigger epoll() 2) Under UDP flood, we can loop forever without yielding to other processes, potentiall...
xt_unregister_targets(struct xt_target *target, unsigned int n) { while (n-- > 0) xt_unregister_target(&target[n]); }
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
24,542,475,244,586,310,000,000,000,000,000,000,000
5
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 bool qxl_monitors_config_needed(void *opaque) { PCIQXLDevice *qxl = opaque; return qxl->guest_monitors_config != 0; }
0
[ "CWE-476" ]
qemu
d52680fc932efb8a2f334cc6993e705ed1e31e99
300,780,050,318,871,060,000,000,000,000,000,000,000
6
qxl: check release info object When releasing spice resources in release_resource() routine, if release info object 'ext.info' is null, it leads to null pointer dereference. Add check to avoid it. Reported-by: Bugs SysSec <bugs-syssec@rub.de> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Message-id: 20190425...
__be32 nfsd_splice_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, loff_t offset, unsigned long *count, u32 *eof) { struct splice_desc sd = { .len = 0, .total_len = *count, .pos = offset, .u.data = rqstp, }; ssize_t host_err; trace_nfsd_read_splice(rqstp, fhp, offset, *count); ...
0
[ "CWE-732" ]
linux
22cf8419f1319ff87ec759d0ebdff4cbafaee832
208,135,865,009,982,100,000,000,000,000,000,000,000
17
nfsd: apply umask on fs without ACL support The server is failing to apply the umask when creating new objects on filesystems without ACL support. To reproduce this, you need to use NFSv4.2 and a client and server recent enough to support umask, and you need to export a filesystem that lacks ACL support (for example,...
load_cas_and_crls_dir(krb5_context context, pkinit_plg_crypto_context plg_cryptoctx, pkinit_req_crypto_context req_cryptoctx, pkinit_identity_crypto_context id_cryptoctx, int catype, char *dirname) { krb5_e...
0
[ "CWE-476" ]
krb5
f249555301940c6df3a2cdda13b56b5674eebc2e
320,212,292,563,275,340,000,000,000,000,000,000,000
48
PKINIT null pointer deref [CVE-2013-1415] Don't dereference a null pointer when cleaning up. The KDC plugin for PKINIT can dereference a null pointer when a malformed packet causes processing to terminate early, leading to a crash of the KDC process. An attacker would need to have a valid PKINIT certificate or have ...
static void egg_free_egg_block(egg_block* block) { free(block); }
0
[ "CWE-476" ]
clamav-devel
8bb3716be9c7ab7c6a3a1889267b1072f48af87b
195,120,041,988,337,660,000,000,000,000,000,000,000
4
fuzz-22348 null deref in egg utf8 conversion Corrected memory leaks and a null dereference in the egg utf8 conversion.
static int f2fs_xattr_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct page *page; struct node_info ni; __u64 phys = 0, len; __u32 flags; nid_t xnid = F2FS_I(inode)->i_xattr_nid; int err = 0; if (f2fs_has_inline_xattr(inode)) { int offs...
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
171,326,377,635,851,180,000,000,000,000,000,000,000
69
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
decode_NXAST_RAW_NOTE(const struct nx_action_note *nan, enum ofp_version ofp_version OVS_UNUSED, struct ofpbuf *out) { struct ofpact_note *note; unsigned int length; length = ntohs(nan->len) - offsetof(struct nx_action_note, note); note = ofpact_put_NOTE(out)...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
191,293,389,683,504,500,000,000,000,000,000,000,000
16
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
int32_t ptirq_intx_pin_remap(struct acrn_vm *vm, uint32_t virt_gsi, enum intx_ctlr vgsi_ctlr) { int32_t status = 0; struct ptirq_remapping_info *entry = NULL; DEFINE_INTX_SID(virt_sid, virt_gsi, vgsi_ctlr); DEFINE_INTX_SID(alt_virt_sid, virt_gsi, vgsi_ctlr); /* * virt pin could come from primary vPIC, secondary...
0
[ "CWE-120", "CWE-787" ]
acrn-hypervisor
25c0e3817eb332660dd63d1d4522e63dcc94e79a
107,811,208,812,090,820,000,000,000,000,000,000,000
93
hv: validate input for dmar_free_irte function Malicious input 'index' may trigger buffer overflow on array 'irte_alloc_bitmap[]'. This patch validate that 'index' shall be less than 'CONFIG_MAX_IR_ENTRIES' and also remove unnecessary check on 'index' in 'ptirq_free_irte()' function with this fix. Tracked-On: ...
unsigned char *ziplistFind(unsigned char *p, unsigned char *vstr, unsigned int vlen, unsigned int skip) { int skipcnt = 0; unsigned char vencoding = 0; long long vll = 0; while (p[0] != ZIP_END) { unsigned int prevlensize, encoding, lensize, len; unsigned char *q; ZIP_DECODE_PR...
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
122,315,805,920,925,790,000,000,000,000,000,000,000
58
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
static netdev_tx_t usb_8dev_start_xmit(struct sk_buff *skb, struct net_device *netdev) { struct usb_8dev_priv *priv = netdev_priv(netdev); struct net_device_stats *stats = &netdev->stats; struct can_frame *cf = (struct can_frame *) skb->data; struct usb_8dev_tx_msg *msg; struct urb *urb; struct usb_8dev...
1
[ "CWE-415" ]
linux
3d3925ff6433f98992685a9679613a2cc97f3ce2
217,413,474,984,660,360,000,000,000,000,000,000,000
115
can: usb_8dev: usb_8dev_start_xmit(): fix double dev_kfree_skb() in error path There is no need to call dev_kfree_skb() when usb_submit_urb() fails because can_put_echo_skb() deletes original skb and can_free_echo_skb() deletes the cloned skb. Fixes: 0024d8ad1639 ("can: usb_8dev: Add support for USB2CAN interface fro...
R_API char *r_str_repeat(const char *ch, int sz) { int i; if (sz < 0) { sz = 0; } if (sz == 0) { return strdup (""); } RStrBuf *buf = r_strbuf_new (ch); for (i = 1; i < sz; i++) { r_strbuf_append (buf, ch); } return r_strbuf_drain (buf); }
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
288,033,272,952,386,000,000,000,000,000,000,000,000
14
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
int HttpDownstreamConnection::tls_handshake() { ERR_clear_error(); conn_.last_read = ev_now(conn_.loop); auto rv = conn_.tls_handshake(); if (rv == SHRPX_ERR_INPROGRESS) { return 0; } if (rv < 0) { downstream_failure(addr_, raddr_); return rv; } if (LOG_ENABLED(INFO)) { DCLOG(INFO, ...
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
209,464,565,180,355,960,000,000,000,000,000,000,000
43
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
HBasicBlock* AdvanceSuccessors() { if (!successor_iterator.Done()) { HBasicBlock* result = successor_iterator.Current(); successor_iterator.Advance(); return result; } return NULL; }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
311,045,030,760,036,600,000,000,000,000,000,000,000
8
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
is_single_click_policy (FrWindow *window) { char *value; gboolean result; if (window->priv->settings_nautilus == NULL) return FALSE; value = g_settings_get_string (window->priv->settings_nautilus, NAUTILUS_CLICK_POLICY); result = (value != NULL) && (strncmp (value, "single", 6) == 0); g_free (value); r...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
180,338,855,840,251,860,000,000,000,000,000,000,000
14
libarchive: sanitize filenames before extracting
static int mem_release(struct inode *inode, struct file *file) { struct mm_struct *mm = file->private_data; if (mm) mmdrop(mm); return 0; }
0
[ "CWE-362" ]
linux
8148a73c9901a8794a50f950083c00ccf97d43b3
200,543,195,375,900,230,000,000,000,000,000,000,000
7
proc: prevent accessing /proc/<PID>/environ until it's ready If /proc/<PID>/environ gets read before the envp[] array is fully set up in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to read more bytes than are actually written, as env_start will already be set but env_end will still be zero, makin...
e_ews_connection_get_mailbox (EEwsConnection *cnc) { g_return_val_if_fail (E_IS_EWS_CONNECTION (cnc), NULL); if (!cnc->priv->email || !*cnc->priv->email) return camel_ews_settings_get_email (cnc->priv->settings); return cnc->priv->email; }
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
176,803,293,318,832,240,000,000,000,000,000,000,000
9
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
rsvg_filter_primitive_tile_set_atts (RsvgNode * self, RsvgHandle * ctx, RsvgPropertyBag * atts) { const char *value; RsvgFilterPrimitiveTile *filter; filter = (RsvgFilterPrimitiveTile *) self; if (rsvg_property_bag_size (atts)) { if ((value = rsvg_property_bag_lookup (atts, "in"))) ...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
213,178,483,307,087,400,000,000,000,000,000,000,000
24
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...