func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void ext4_mb_use_group_pa(struct ext4_allocation_context *ac, struct ext4_prealloc_space *pa) { unsigned int len = ac->ac_o_ex.fe_len; ext4_get_group_no_and_offset(ac->ac_sb, pa->pa_pstart, &ac->ac_b_ex.fe_group, &ac->ac_b_ex.fe_start); ac->ac_b_ex.fe_len = len; ac->ac_status = AC_STATUS_FOUND...
0
[ "CWE-416" ]
linux
8844618d8aa7a9973e7b527d038a2a589665002c
158,268,950,861,842,770,000,000,000,000,000,000,000
20
ext4: only look at the bg_flags field if it is valid The bg_flags field in the block group descripts is only valid if the uninit_bg or metadata_csum feature is enabled. We were not consistently looking at this field; fix this. Also block group #0 must never have uninitialized allocation bitmaps, or need to be zeroed...
OPJ_BOOL opj_j2k_read_SPCod_SPCoc( opj_j2k_t *p_j2k, OPJ_UINT32 compno, OPJ_BYTE * p_header_data, OPJ_UINT32 * p_header_size, ...
0
[]
openjpeg
0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0
326,122,176,584,142,170,000,000,000,000,000,000,000
122
[trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492)
gss_context_time (minor_status, context_handle, time_rec) OM_uint32 * minor_status; gss_ctx_id_t context_handle; OM_uint32 * time_rec; { OM_uint32 status; gss_union_ctx_id_t ctx; gss_mechanism mech; if (minor_status == NULL) return (GSS_S_CALL_INACCESSIBLE_WRI...
0
[ "CWE-415" ]
krb5
56f7b1bc95a2a3eeb420e069e7655fb181ade5cf
180,688,121,403,193,240,000,000,000,000,000,000,000
50
Preserve GSS context on init/accept failure After gss_init_sec_context() or gss_accept_sec_context() has created a context, don't delete the mechglue context on failures from subsequent calls, even if the mechanism deletes the mech-specific context (which is allowed by RFC 2744 but not preferred). Check for union con...
static int snd_ftu_eff_switch_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static const char *const texts[8] = { "Room 1", "Room 2", "Room 3", "Hall 1", "Hall 2", "Plate", "Delay", "Echo" }; return snd_ctl_enum_info(uinfo, 1, ARRAY_SIZE(texts), texts); }
0
[]
sound
447d6275f0c21f6cc97a88b3a0c601436a4cdf2a
141,178,523,789,591,820,000,000,000,000,000,000,000
10
ALSA: usb-audio: Add sanity checks for endpoint accesses Add some sanity check codes before actually accessing the endpoint via get_endpoint() in order to avoid the invalid access through a malformed USB descriptor. Mostly just checking bNumEndpoints, but in one place (snd_microii_spdif_default_get()), the validity o...
List all modes "module_dir" */ PHP_FUNCTION(mcrypt_list_modes) { char **modules; char *lib_dir = MCG(modes_dir); int lib_dir_len; int i, count; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &lib_dir, &lib_dir_len) == FAILURE) { return; } array_init(return_value); modules = mcrypt_list_...
0
[ "CWE-190" ]
php-src
6c5211a0cef0cc2854eaa387e0eb036e012904d0
80,942,422,115,058,430,000,000,000,000,000,000,000
23
Fix bug #72455: Heap Overflow due to integer overflows
int RSA_padding_check_SSLv23(unsigned char *to, int tlen, const unsigned char *from, int flen, int num) { int i; /* |em| is the encoded message, zero-padded to exactly |num| bytes */ unsigned char *em = NULL; unsigned int good, found_zero_byte, mask, threes_in_row; int z...
0
[ "CWE-326" ]
openssl
901f1ef7dacb6b3bde63233a1f623e1fa2f0f058
253,913,923,146,766,500,000,000,000,000,000,000,000
116
Fix the RSA_SSLV23_PADDING padding type This also fixes the public function RSA_padding_check_SSLv23. Commit 6555a89 changed the padding check logic in RSA_padding_check_SSLv23 so that padding is rejected if the nul delimiter byte is not immediately preceded by at least 8 bytes containing 0x03. Prior to that commit t...
static struct socket *sockfd_lookup_light(int fd, int *err, int *fput_needed) { struct fd f = fdget(fd); struct socket *sock; *err = -EBADF; if (f.file) { sock = sock_from_file(f.file, err); if (likely(sock)) { *fput_needed = f.flags; return sock; } fdput(f); } return NULL; }
0
[ "CWE-264" ]
net
4de930efc23b92ddf88ce91c405ee645fe6e27ea
13,650,489,860,164,046,000,000,000,000,000,000,000
16
net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom Cc: stable@vger.kernel.org # v3.19 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
perf_event_parse_addr_filter(struct perf_event *event, char *fstr, struct list_head *filters) { struct perf_addr_filter *filter = NULL; char *start, *orig, *filename = NULL; substring_t args[MAX_OPT_ARGS]; int state = IF_STATE_ACTION, token; unsigned int kernel = 0; int ret = -EINVAL; orig = fstr = kstr...
1
[ "CWE-401" ]
tip
7bdb157cdebbf95a1cd94ed2e01b338714075d00
178,798,320,007,743,050,000,000,000,000,000,000,000
156
perf/core: Fix a memory leak in perf_event_parse_addr_filter() As shown through runtime testing, the "filename" allocation is not always freed in perf_event_parse_addr_filter(). There are three possible ways that this could happen: - It could be allocated twice on subsequent iterations through the loop, - or leake...
pull16(unsigned char **cpp) { short rval; rval = *(*cpp)++; rval <<= 8; rval |= *(*cpp)++; return rval; }
0
[]
linux
4ab42d78e37a294ac7bc56901d563c642e03c4ae
286,388,811,976,698,930,000,000,000,000,000,000,000
9
ppp, slip: Validate VJ compression slot parameters completely Currently slhc_init() treats out-of-range values of rslots and tslots as equivalent to 0, except that if tslots is too large it will dereference a null pointer (CVE-2015-7799). Add a range-check at the top of the function and make it return an ERR_PTR() on...
FLAC_API FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); FLAC__ASSERT(0 != decoder->protected_); if(!FLAC__stream_decoder_flush(decoder)) { /* above call sets the state for us */ return false; } #if FLAC__HAS_OGG /*@@@ c...
0
[ "CWE-119" ]
flac
5b3033a2b355068c11fe637e14ac742d273f076e
301,734,495,589,975,330,000,000,000,000,000,000,000
59
src/libFLAC/stream_decoder.c : Fix buffer read overflow. This is CVE-2014-8962. Reported-by: Michele Spagnuolo, Google Security Team <mikispag@google.com>
static void addHashFieldToReply(client *c, robj *o, sds field) { int ret; if (o == NULL) { addReplyNull(c); return; } if (o->encoding == OBJ_ENCODING_ZIPLIST) { unsigned char *vstr = NULL; unsigned int vlen = UINT_MAX; long long vll = LLONG_MAX; ret = h...
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
280,484,577,992,594,160,000,000,000,000,000,000,000
34
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...
PackLinuxElf64::PackLinuxElf64help1(InputFile *f) { e_type = get_te16(&ehdri.e_type); e_phnum = get_te16(&ehdri.e_phnum); e_shnum = get_te16(&ehdri.e_shnum); unsigned const e_phentsize = get_te16(&ehdri.e_phentsize); if (ehdri.e_ident[Elf64_Ehdr::EI_CLASS]!=Elf64_Ehdr::ELFCLASS64 || sizeof(Elf6...
0
[ "CWE-476", "CWE-190" ]
upx
8be9da8280dfa69d5df4417d4d81bda1cab78010
254,067,968,706,527,380,000,000,000,000,000,000,000
78
Avoid bogus values in PT_DYNAMIC segment. Detect duplicate DT_*. Detect out-of-bounds hashtab and gashtab. Detect missing DT_REL, DT_RELA. Detect out-of-bounds d_val. https://github.com/upx/upx/issues/317 modified: p_lx_elf.cpp
generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov, unsigned long *nr_segs, loff_t pos, loff_t *ppos, size_t count, size_t ocount) { struct file *file = iocb->ki_filp; struct address_space *mapping = file->f_mapping; struct inode *inode = mapping->host; ssize_t written; if (count != ocount...
0
[ "CWE-20" ]
linux
124d3b7041f9a0ca7c43a6293e1cae4576c32fd5
16,813,893,310,998,042,000,000,000,000,000,000,000
36
fix writev regression: pan hanging unkillable and un-straceable Frederik Himpe reported an unkillable and un-straceable pan process. Zero length iovecs can go into an infinite loop in writev, because the iovec iterator does not always advance over them. The sequence required to trigger this is not trivial. I think i...
agent_passwd (ctrl_t ctrl, const char *hexkeygrip, const char *desc, char **cache_nonce_addr, char **passwd_nonce_addr) { gpg_error_t err; struct cache_nonce_parm_s cn_parm; char line[ASSUAN_LINELENGTH]; struct default_inq_parm_s dfltparm; memset (&dfltparm, 0, sizeof dfltparm); dfltparm.ctrl...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
206,063,009,078,858,960,000,000,000,000,000,000,000
42
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 ...
TEST(UriSuite, TestIpSixFail) { // 5 char quad URI_TEST_IP_SIX_FAIL("::12345"); // Two zippers URI_TEST_IP_SIX_FAIL("abcd::abcd::abcd"); // Triple-colon zipper URI_TEST_IP_SIX_FAIL(":::1234"); URI_TEST_IP_SIX_FAIL("1234:::1234:1234"); URI_TEST_IP_SIX_FAIL("1234:1234:::1234"); URI_TEST_IP_SIX_FAIL("1...
0
[ "CWE-125" ]
uriparser
cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4
292,218,533,954,273,600,000,000,000,000,000,000,000
45
Fix uriParse*Ex* out-of-bounds read
TEST_F(QuotedString_ExtractFrom_Tests, AllEscapedCharsTogether) { whenInputIs("\"1\\\"2\\\\3\\/4\\b5\\f6\\n7\\r8\\t9\""); resultMustBe("1\"2\\3/4\b5\f6\n7\r8\t9"); }
0
[ "CWE-415", "CWE-119" ]
ArduinoJson
5e7b9ec688d79e7b16ec7064e1d37e8481a31e72
296,342,725,510,279,100,000,000,000,000,000,000,000
4
Fix buffer overflow (pull request #81)
open_and_process_table(THD *thd, TABLE_LIST *tables, uint *counter, uint flags, Prelocking_strategy *prelocking_strategy, bool has_prelocking_list, Open_table_context *ot_ctx) { bool error= FALSE; bool safe_to_ignore_table= FALSE; LEX *lex= thd->lex; DBUG_ENTER("ope...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
49,635,725,950,210,480,000,000,000,000,000,000,000
306
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
static inline void put_numa_group(struct numa_group *grp) { if (refcount_dec_and_test(&grp->refcount)) kfree_rcu(grp, rcu); }
0
[ "CWE-400", "CWE-703" ]
linux
de53fd7aedb100f03e5d2231cfce0e4993282425
194,453,986,022,817,270,000,000,000,000,000,000,000
5
sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices It has been observed, that highly-threaded, non-cpu-bound applications running under cpu.cfs_quota_us constraints can hit a high percentage of periods throttled while simultaneously not consuming the allocated amount of quota...
static void __exit nf_tables_module_exit(void) { unregister_pernet_subsys(&nf_tables_net_ops); nfnetlink_subsys_unregister(&nf_tables_subsys); rcu_barrier(); nf_tables_core_module_exit(); kfree(info); }
0
[ "CWE-19" ]
nf
a2f18db0c68fec96631c10cad9384c196e9008ac
110,763,817,754,167,400,000,000,000,000,000,000,000
8
netfilter: nf_tables: fix flush ruleset chain dependencies Jumping between chains doesn't mix well with flush ruleset. Rules from a different chain and set elements may still refer to us. [ 353.373791] ------------[ cut here ]------------ [ 353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159! [ 353.373896...
max3421_reset(struct usb_hcd *hcd) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); hcd->self.sg_tablesize = 0; hcd->speed = HCD_USB2; hcd->self.root_hub->speed = USB_SPEED_FULL; set_bit(RESET_HCD, &max3421_hcd->todo); wake_up_process(max3421_hcd->spi_thread); return 0; }
0
[ "CWE-416" ]
linux
b5fdf5c6e6bee35837e160c00ac89327bdad031b
93,265,514,824,980,150,000,000,000,000,000,000,000
11
usb: max-3421: Prevent corruption of freed memory The MAX-3421 USB driver remembers the state of the USB toggles for a device/endpoint. To save SPI writes, this was only done when a new device/endpoint was being used. Unfortunately, if the old device was removed, this would cause writes to freed memory. To fix this, ...
uint64_t Segment::AddAudioTrack(int32_t sample_rate, int32_t channels, int32_t number) { AudioTrack* const track = new (std::nothrow) AudioTrack(&seed_); // NOLINT if (!track) return 0; track->set_type(Tracks::kAudio); track->set_codec_id(Tracks::kVorbisCodecId); track->s...
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
10,342,017,893,560,863,000,000,000,000,000,000,000
18
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
static sds readArgFromStdin(void) { char buf[1024]; sds arg = sdsempty(); while(1) { int nread = read(fileno(stdin),buf,1024); if (nread == 0) break; else if (nread == -1) { perror("Reading from standard input"); exit(1); } arg = sdscatlen(ar...
0
[ "CWE-119", "CWE-787" ]
redis
9fdcc15962f9ff4baebe6fdd947816f43f730d50
17,119,163,806,285,378,000,000,000,000,000,000,000
16
Security: fix redis-cli buffer overflow. Thanks to Fakhri Zulkifli for reporting it. The fix switched to dynamic allocation, copying the final prompt in the static buffer only at the end.
int gs_main_init2aux(gs_main_instance * minst) { i_ctx_t * i_ctx_p = minst->i_ctx_p; if (minst->init_done < 2) { int code, exit_code; ref error_object, ifa; /* Set up enough so that we can safely be garbage collected */ i_ctx_p->op_array_table_global = empty_table; i_ct...
0
[]
ghostpdl
6d444c273da5499a4cd72f21cb6d4c9a5256807d
233,108,353,161,664,170,000,000,000,000,000,000,000
59
Bug 697178: Add a file permissions callback For the rare occasions when the graphics library directly opens a file (currently for reading), this allows us to apply any restrictions on file access normally applied in the interpteter.
static int event_function(void *info) { struct event_function_struct *efs = info; struct perf_event *event = efs->event; struct perf_event_context *ctx = event->ctx; struct perf_cpu_context *cpuctx = __get_cpu_context(ctx); struct perf_event_context *task_ctx = cpuctx->task_ctx; int ret = 0; WARN_ON_ONCE(!irqs_...
0
[ "CWE-362", "CWE-125" ]
linux
321027c1fe77f892f4ea07846aeae08cefbbb290
126,378,819,215,443,450,000,000,000,000,000,000,000
45
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...
u16 capi20_register(struct capi20_appl *ap) { int i; u16 applid; DBG(""); if (ap->rparam.datablklen < 128) return CAPI_LOGBLKSIZETOSMALL; ap->nrecvctlpkt = 0; ap->nrecvdatapkt = 0; ap->nsentctlpkt = 0; ap->nsentdatapkt = 0; mutex_init(&ap->recv_mtx); skb_queue_head_init(&ap->recv_queue); INIT_WORK(&ap->...
0
[ "CWE-125" ]
linux
1f3e2e97c003f80c4b087092b225c8787ff91e4d
31,536,886,075,226,794,000,000,000,000,000,000,000
48
isdn: cpai: check ctr->cnr to avoid array index out of bound The cmtp_add_connection() would add a cmtp session to a controller and run a kernel thread to process cmtp. __module_get(THIS_MODULE); session->task = kthread_run(cmtp_session, session, "kcmtpd_ctr_%d", session->num); During this process, the ker...
static int unit_get(struct idr *p, void *ptr) { return idr_alloc(p, ptr, 0, 0, GFP_KERNEL); }
0
[]
linux
4ab42d78e37a294ac7bc56901d563c642e03c4ae
26,079,272,923,272,096,000,000,000,000,000,000,000
4
ppp, slip: Validate VJ compression slot parameters completely Currently slhc_init() treats out-of-range values of rslots and tslots as equivalent to 0, except that if tslots is too large it will dereference a null pointer (CVE-2015-7799). Add a range-check at the top of the function and make it return an ERR_PTR() on...
static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu) { struct vcpu_svm *svm = to_svm(vcpu); struct svm_cpu_data *sd = per_cpu(svm_data, cpu); int i; if (unlikely(cpu != vcpu->cpu)) { svm->asid_generation = 0; mark_all_dirty(svm->vmcb); } #ifdef CONFIG_X86_64 rdmsrl(MSR_GS_BASE, to_svm(vcpu)->host.gs_ba...
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
111,803,228,406,890,160,000,000,000,000,000,000,000
38
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 void maybe_exit(int error) { if (!first_error) first_error= error; /* Return if --force is used; else return only if the last error number is in the list of error numbers specified using --ignore-error option. */ if (opt_force || (opt_ignore_error && do_ignore_error())) return; if ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
66,736,615,772,553,950,000,000,000,000,000,000,000
17
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static void do_net_free(struct wif *wi) { assert(wi->wi_priv); free(wi->wi_priv); wi->wi_priv = 0; free(wi); }
0
[ "CWE-20", "CWE-787" ]
aircrack-ng
88702a3ce4c28a973bf69023cd0312f412f6193e
253,074,816,150,285,780,000,000,000,000,000,000,000
7
OSdep: Fixed segmentation fault that happens with a malicious server sending a negative length (Closes #16 on GitHub). git-svn-id: http://svn.aircrack-ng.org/trunk@2419 28c6078b-6c39-48e3-add9-af49d547ecab
static void ehci_pci_register_types(void) { TypeInfo ehci_type_info = { .parent = TYPE_PCI_EHCI, .class_init = ehci_data_class_init, }; int i; type_register_static(&ehci_pci_type_info); for (i = 0; i < ARRAY_SIZE(ehci_pci_info); i++) { ehci_type_info.name = ehci_p...
0
[ "CWE-772", "CWE-401" ]
qemu
d710e1e7bd3d5bfc26b631f02ae87901ebe646b0
108,922,482,035,814,950,000,000,000,000,000,000,000
16
usb: ehci: fix memory leak in ehci In usb_ehci_init function, it initializes 's->ipacket', but there is no corresponding function to free this. As the ehci can be hotplug and unplug, this will leak host memory leak. In order to make the hierarchy clean, we should add a ehci pci finalize function, then call the clean f...
static int ep_send_events_proc(struct eventpoll *ep, struct list_head *head, void *priv) { struct ep_send_events_data *esed = priv; int eventcnt; unsigned int revents; struct epitem *epi; struct epoll_event __user *uevent; /* * We can loop without lock because we are passed a task private list. * I...
0
[]
linux-2.6
28d82dc1c4edbc352129f97f4ca22624d1fe61de
109,070,453,626,886,410,000,000,000,000,000,000,000
58
epoll: limit paths The current epoll code can be tickled to run basically indefinitely in both loop detection path check (on ep_insert()), and in the wakeup paths. The programs that tickle this behavior set up deeply linked networks of epoll file descriptors that cause the epoll algorithms to traverse them indefinitel...
static int __init crypto_user_init(void) { return register_pernet_subsys(&crypto_netlink_net_ops); }
0
[ "CWE-400", "CWE-401" ]
linux
ffdde5932042600c6807d46c1550b28b0db6a3bc
290,332,036,913,865,150,000,000,000,000,000,000,000
4
crypto: user - fix memory leak in crypto_report In crypto_report, a new skb is created via nlmsg_new(). This skb should be released if crypto_report_alg() fails. Fixes: a38f7907b926 ("crypto: Add userspace configuration API") Cc: <stable@vger.kernel.org> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Sign...
PackLinuxElf32::checkEhdr(Elf32_Ehdr const *ehdr) const { const unsigned char * const buf = ehdr->e_ident; if (0!=memcmp(buf, "\x7f\x45\x4c\x46", 4) // "\177ELF" || buf[Elf32_Ehdr::EI_CLASS]!=ei_class || buf[Elf32_Ehdr::EI_DATA] !=ei_data ) { return -1; } if (!memcmp(buf+8, "Free...
0
[ "CWE-476" ]
upx
ef336dbcc6dc8344482f8cf6c909ae96c3286317
139,252,592,055,730,460,000,000,000,000,000,000,000
44
Protect against bad crafted input. https://github.com/upx/upx/issues/128 modified: p_lx_elf.cpp
rpc_C_DeriveKey (CK_X_FUNCTION_LIST *self, p11_rpc_message *msg) { CK_SESSION_HANDLE session; CK_MECHANISM mechanism; CK_OBJECT_HANDLE base_key; CK_ATTRIBUTE_PTR template; CK_ULONG attribute_count; CK_OBJECT_HANDLE key; BEGIN_CALL (DeriveKey); IN_ULONG (session); IN_MECHANISM (mechanism); ...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
200,932,983,652,234,060,000,000,000,000,000,000,000
19
Check for arithmetic overflows before allocating
static int wait_snapshoting_atomic_t(atomic_t *a) { schedule(); return 0; }
0
[ "CWE-200" ]
linux
0305cd5f7fca85dae392b9ba85b116896eb7c1c7
322,168,669,794,107,800,000,000,000,000,000,000,000
5
Btrfs: fix truncation of compressed and inlined extents When truncating a file to a smaller size which consists of an inline extent that is compressed, we did not discard (or made unusable) the data between the new file size and the old file size, wasting metadata space and allowing for the truncated data to be leaked...
flatpak_context_get_session_bus_policy_allowed_own_names (FlatpakContext *context) { GHashTableIter iter; gpointer key, value; g_autoptr(GPtrArray) names = g_ptr_array_new_with_free_func (g_free); g_hash_table_iter_init (&iter, context->session_bus_policy); while (g_hash_table_iter_next (&iter, &key, &value)...
0
[ "CWE-94", "CWE-74" ]
flatpak
6e5ae7a109cdfa9735ea7ccbd8cb79f9e8d3ae8b
339,862,887,017,386,500,000,000,000,000,000,000,000
14
context: Add --env-fd option This allows environment variables to be added to the context without making their values visible to processes running under a different uid, which might be significant if the variable's value is a token or some other secret value. Signed-off-by: Simon McVittie <smcv@collabora.com> Part-of...
print_optimize_info(FILE* f, regex_t* reg) { static const char* on[] = { "NONE", "EXACT", "EXACT_FAST", "EXACT_FAST_STEP_FORWARD", "EXACT_IC", "MAP" }; fprintf(f, "optimize: %s\n", on[reg->optimize]); fprintf(f, " anchor: "); print_anchor(f, reg->ancho...
0
[ "CWE-125" ]
oniguruma
4d461376bd85e7994835677b2ff453a43c49cd28
106,694,489,549,413,750,000,000,000,000,000,000,000
51
don't expand string case folds to alternatives if code length == 1 and byte length is same
pfatal (char const *format, ...) { int errnum = errno; va_list args; fprintf (stderr, "%s: **** ", program_name); va_start (args, format); vfprintf (stderr, format, args); va_end (args); fflush (stderr); /* perror bypasses stdio on some hosts. */ errno = errnum; perror (" "); fflush (stderr); fat...
0
[ "CWE-22" ]
patch
685a78b6052f4df6eac6d625a545cfb54a6ac0e1
267,703,392,692,139,260,000,000,000,000,000,000,000
14
Do not let a malicious patch create files above current directory This addresses CVE-2010-4651, reported by Jakub Wilk. https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2010-4651 * src/util.c (strip_leading_slashes): Reject absolute file names and file names containing a component of "..". * tests/bad-filenames: New fi...
static char *dex_resolve_type_id(RzBinDex *dex, ut32 type_idx) { if (type_idx >= dex->type_ids_size) { RZ_LOG_INFO("cannot find type_id with index %u\n", type_idx); return NULL; } DexTypeId type_id = dex->types[type_idx]; return dex_resolve_string_id(dex, type_id); }
0
[ "CWE-787" ]
rizin
1524f85211445e41506f98180f8f69f7bf115406
60,429,159,191,250,520,000,000,000,000,000,000,000
8
fix #2969 - oob write (1 byte) in dex.c
static inline bool cpu_has_vmx_ept_2m_page(void) { return vmx_capability.ept & VMX_EPT_2MB_PAGE_BIT; }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
299,315,103,291,965,600,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-...
static bool tg3_phy_copper_an_config_ok(struct tg3 *tp, u32 *lcladv) { u32 advmsk, tgtadv, advertising; advertising = tp->link_config.advertising; tgtadv = ethtool_adv_to_mii_adv_t(advertising) & ADVERTISE_ALL; advmsk = ADVERTISE_ALL; if (tp->link_config.active_duplex == DUPLEX_FULL) { tgtadv |= mii_advertise_...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
289,769,801,405,902,800,000,000,000,000,000,000,000
43
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
bool run(OperationContext* opCtx, const string& dbname, const BSONObj& cmdObj, BSONObjBuilder& result) { auth::UsersInfoArgs args; Status status = auth::parseUsersInfoCommand(cmdObj, dbname, &args); uassertStatusOK(status); AuthorizationManager...
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
151,587,088,344,564,480,000,000,000,000,000,000,000
131
SERVER-38984 Validate unique User ID on UserCache hit
static int php_openssl_cipher_update(const EVP_CIPHER *cipher_type, EVP_CIPHER_CTX *cipher_ctx, struct php_openssl_cipher_mode *mode, zend_string **poutbuf, int *poutlen, char *data, size_t data_len, char *aad, size_t aad_len, int enc) /* {{{ */ { int i = 0; if (mode->is_single_run_aead && !EVP_CipherUpdate(c...
0
[ "CWE-326" ]
php-src
0216630ea2815a5789a24279a1211ac398d4de79
62,414,657,489,232,440,000,000,000,000,000,000,000
39
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
unhexify_fpr (const char *hexstr, unsigned char *fpr) { const char *s; int n; for (s=hexstr, n=0; hexdigitp (s); s++, n++) ; if (*s || (n != 40)) return 0; /* no fingerprint (invalid or wrong length). */ for (s=hexstr, n=0; *s; s += 2, n++) fpr[n] = xtoi_2 (s); return 1; /* okay */ }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
128,476,616,576,172,750,000,000,000,000,000,000,000
13
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 ...
TEST_P(MessengerTest, StatelessTest) { Message *m; FakeDispatcher cli_dispatcher(false), srv_dispatcher(true); entity_addr_t bind_addr; bind_addr.parse("127.0.0.1"); Messenger::Policy p = Messenger::Policy::stateless_server(0); server_msgr->set_policy(entity_name_t::TYPE_CLIENT, p); p = Messenger::Policy:...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
234,068,319,939,312,750,000,000,000,000,000,000,000
72
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 int netsnmp_session_set_contextEngineID(struct snmp_session *s, char * contextEngineID) { size_t ebuf_len = 32, eout_len = 0; u_char *ebuf = (u_char *) emalloc(ebuf_len); if (ebuf == NULL) { php_error_docref(NULL, E_WARNING, "malloc failure setting contextEngineID"); return (-1); } if (!snmp_hex_to_bin...
0
[ "CWE-20" ]
php-src
6e25966544fb1d2f3d7596e060ce9c9269bbdcf8
171,233,160,626,897,400,000,000,000,000,000,000,000
23
Fixed bug #71704 php_snmp_error() Format String Vulnerability
copy_stack(i_ctx_t *i_ctx_p, const ref_stack_t * pstack, int skip, ref * arr) { uint size = ref_stack_count(pstack) - skip; uint save_space = ialloc_space(idmemory); int code, i; ref *safety, *safe; if (size > 65535) size = 65535; ialloc_set_space(idmemory, avm_local); code = ialloc...
0
[]
ghostpdl
13b0a36f8181db66a91bcc8cea139998b53a8996
301,054,142,565,574,730,000,000,000,000,000,000,000
33
Sanitize op stack for error conditions We save the stacks to an array and store the array for the error handler to access. For SAFER, we traverse the array, and deep copy any op arrays (procedures). As we make these copies, we check for operators that do *not* exist in systemdict, when we find one, we replace the ope...
xsltCopyTree(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: case XML_ENTITY_...
0
[]
libxslt
e03553605b45c88f0b4b2980adfbbb8f6fca2fd6
168,951,251,468,235,250,000,000,000,000,000,000,000
193
Fix security framework bypass xsltCheckRead and xsltCheckWrite return -1 in case of error but callers don't check for this condition and allow access. With a specially crafted URL, xsltCheckRead could be tricked into returning an error because of a supposedly invalid URL that would still be loaded succesfully later on...
static int ip_rt_bug(struct sock *sk, struct sk_buff *skb) { pr_debug("%s: %pI4 -> %pI4, %s\n", __func__, &ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr, skb->dev ? skb->dev->name : "?"); kfree_skb(skb); WARN_ON(1); return 0; }
0
[ "CWE-17" ]
linux
df4d92549f23e1c037e83323aff58a21b3de7fe0
229,475,608,211,201,660,000,000,000,000,000,000,000
9
ipv4: try to cache dst_entries which would cause a redirect Not caching dst_entries which cause redirects could be exploited by hosts on the same subnet, causing a severe DoS attack. This effect aggravated since commit f88649721268999 ("ipv4: fix dst race in sk_dst_get()"). Lookups causing redirects will be allocated...
static sdlBindingPtr make_persistent_sdl_binding(sdlBindingPtr bind, HashTable *ptr_map) { sdlBindingPtr pbind = NULL; pbind = malloc(sizeof(sdlBinding)); memset(pbind, 0, sizeof(sdlBinding)); *pbind = *bind; if (pbind->name) { pbind->name = strdup(pbind->name); } if (pbind->location) { pbind->location = ...
0
[ "CWE-476" ]
php-src
3c939e3f69955d087e0bb671868f7267dfb2a502
71,409,797,643,931,380,000,000,000,000,000,000,000
27
Fix bug #80672 - Null Dereference in SoapClient
void hugepage_add_new_anon_rmap(struct page *page, struct vm_area_struct *vma, unsigned long address) { BUG_ON(address < vma->vm_start || address >= vma->vm_end); atomic_set(&page->_mapcount, 0); __hugepage_set_anon_rmap(page, vma, address, 1); }
0
[ "CWE-400", "CWE-703", "CWE-264" ]
linux
57e68e9cd65b4b8eb4045a1e0d0746458502554c
277,635,558,436,921,940,000,000,000,000,000,000,000
7
mm: try_to_unmap_cluster() should lock_page() before mlocking A BUG_ON(!PageLocked) was triggered in mlock_vma_page() by Sasha Levin fuzzing with trinity. The call site try_to_unmap_cluster() does not lock the pages other than its check_page parameter (which is already locked). The BUG_ON in mlock_vma_page() is not ...
TfLiteRegistration* Register_SQUARE() { static TfLiteRegistration r = { /*init=*/nullptr, /*free=*/nullptr, elementwise::GenericPrepare<elementwise::IsNumericSupportedType, elementwise::kSquareName>, elementwise::SquareEval}; return &r; }
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
176,273,595,507,863,840,000,000,000,000,000,000,000
8
[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...
void xchg_mb_border(uint8_t *top_border, uint8_t *src_y, uint8_t *src_cb, uint8_t *src_cr, ptrdiff_t linesize, ptrdiff_t uvlinesize, int mb_x, int mb_y, int mb_width, int simple, int xchg) { uint8_t *top_border_m1 = top_border - 32; // for TL prediction src_y -= line...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef
289,224,117,959,063,600,000,000,000,000,000,000,000
32
avcodec/webp: Always set pix_fmt Fixes: out of array access Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632 Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: "Ronald S. Bultje" <rsbult...
encode_attr_2( Slapi_PBlock *pb, BerElement *ber, Slapi_Entry *e, Slapi_ValueSet *vs, int attrsonly, const char *attribute_type, const char *returned_type) { char *attrs[2] = {NULL, NULL}; Slapi_Value *v; int i = slapi_valueset_first_value(vs, &v); if (i == -1) { re...
0
[ "CWE-399", "CWE-203" ]
389-ds-base
cc0f69283abc082488824702dae485b8eae938bc
95,169,121,881,789,710,000,000,000,000,000,000,000
59
Issue 4480 - Unexpected info returned to ldap request (#4491) Bug description: If the bind entry does not exist, the bind result info reports that 'No such entry'. It should not give any information if the target entry exists or not Fix description: Does not return any additional information d...
write_str_to_zip_file(gx_device_xps *xps_dev, const char *filename, const char *str) { return write_to_zip_file(xps_dev, filename, (byte *)str, strlen(str)); }
0
[]
ghostpdl
94d8955cb7725eb5f3557ddc02310c76124fdd1a
27,192,712,987,152,410,000,000,000,000,000,000,000
5
Bug 701818: better handling of error during PS/PDF image In the xps device, if an error occurred after xps_begin_image() but before xps_image_end_image(), *if* the Postscript had called 'restore' as part of the error handling, the image enumerator would have been freed (by the restore) despite the xps device still hol...
static int unit_export_log_rate_limit_interval(Unit *u, const ExecContext *c) { _cleanup_free_ char *buf = NULL; const char *p; int r; assert(u); assert(c); if (u->exported_log_rate_limit_interval) return 0; if (c->log_rate_limit_interval_usec =...
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
140,345,962,069,643,360,000,000,000,000,000,000,000
26
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...
osf_fix_iov_len(const struct iovec __user *iov, unsigned long count) { unsigned long i; for (i = 0 ; i < count ; i++) { int __user *iov_len_high = (int __user *)&iov[i].iov_len + 1; if (put_user(0, iov_len_high)) return -EFAULT; } return 0; }
0
[ "CWE-703", "CWE-264", "CWE-189" ]
linux
21c5977a836e399fc710ff2c5367845ed5c2527f
317,544,926,072,549,150,000,000,000,000,000,000,000
12
alpha: fix several security issues Fix several security issues in Alpha-specific syscalls. Untested, but mostly trivial. 1. Signedness issue in osf_getdomainname allows copying out-of-bounds kernel memory to userland. 2. Signedness issue in osf_sysinfo allows copying large amounts of kernel memory to userland. 3. ...
bool vers_sys_field() const { return flags & (VERS_ROW_START | VERS_ROW_END); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
91,093,216,664,798,910,000,000,000,000,000,000,000
4
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
parse_CONJUNCTION(const char *arg, struct ofpbuf *ofpacts, enum ofputil_protocol *usable_protocols OVS_UNUSED) { uint8_t n_clauses; uint8_t clause; uint32_t id; int n; if (!ovs_scan(arg, "%"SCNi32" , %"SCNu8" / %"SCNu8" %n", &id, &clause, &n_clauses, &n) || n != ...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
338,273,344,373,220,280,000,000,000,000,000,000,000
27
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>
static Bool fsess_on_event(void *cbk, GF_Event *evt) { return GF_TRUE; }
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
149,088,927,600,951,710,000,000,000,000,000,000,000
4
fixed crashes for very long path - cf #1908
int sqlite_iterator_get_current_key(zend_object_iterator *iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC) { struct php_sqlite_result *res = ((sqlite_object_iterator*)iter)->res; *str_key = NULL; *str_key_len = 0; *int_key = res ? res->curr_row : 0; return HASH_KEY_IS_LONG; }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
134,103,328,794,180,170,000,000,000,000,000,000,000
9
- 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 int sctp_getsockopt_active_key(struct sock *sk, int len, char __user *optval, int __user *optlen) { struct sctp_endpoint *ep = sctp_sk(sk)->ep; struct sctp_authkeyid val; struct sctp_association *asoc; if (!ep->auth_enable) return -EACCES; if (len < sizeof(struct sctp_authkeyid)) return -EINVA...
0
[ "CWE-416" ]
linux
a0ff660058b88d12625a783ce9e5c1371c87951f
46,923,100,667,681,350,000,000,000,000,000,000,000
33
sctp: return error if the asoc has been peeled off in sctp_wait_for_sndbuf After commit cea0cc80a677 ("sctp: use the right sk after waking up from wait_buf sleep"), it may change to lock another sk if the asoc has been peeled off in sctp_wait_for_sndbuf. However, the asoc's new sk could be already closed elsewhere, a...
showmap( mapblock_T *mp, int local) /* TRUE for buffer-local map */ { int len = 1; char_u *mapchars; if (message_filtered(mp->m_keys) && message_filtered(mp->m_str)) return; if (msg_didout || msg_silent != 0) { msg_putchar('\n'); if (got_int) /* 'q' typed at MORE prompt */ ...
0
[ "CWE-78" ]
vim
53575521406739cf20bbe4e384d88e7dca11f040
322,008,376,762,976,740,000,000,000,000,000,000,000
70
patch 8.1.1365: source command doesn't check for the sandbox Problem: Source command doesn't check for the sandbox. (Armin Razmjou) Solution: Check for the sandbox when sourcing a file.
reset_reg_var(void) { int regname = 0; // Adjust the register according to 'clipboard', so that when // "unnamed" is present it becomes '*' or '+' instead of '"'. #ifdef FEAT_CLIPBOARD adjust_clip_reg(&regname); #endif set_reg_var(regname); }
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
180,470,348,912,748,600,000,000,000,000,000,000,000
11
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.
compare_votes_by_authority_id_(const void **_a, const void **_b) { const networkstatus_t *a = *_a, *b = *_b; return fast_memcmp(get_voter(a)->identity_digest, get_voter(b)->identity_digest, DIGEST_LEN); }
0
[]
tor
a0ef3cf0880e3cd343977b3fcbd0a2e7572f0cb4
297,730,599,905,520,150,000,000,000,000,000,000,000
6
Prevent int underflow in dirvote.c compare_vote_rs_. This should be "impossible" without making a SHA1 collision, but let's not keep the assumption that SHA1 collisions are super-hard. This prevents another case related to 21278. There should be no behavioral change unless -ftrapv is on.
static int em28xx_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) { struct usb_device *udev; struct em28xx *dev = NULL; int retval; bool has_vendor_audio = false, has_video = false, has_dvb = false; int i, nr, try_bulk; const int ifnum = intf->altsetting[0].desc.bInterfaceNumber; cha...
1
[ "CWE-416" ]
linux
c08eadca1bdfa099e20a32f8fa4b52b2f672236d
316,770,757,437,160,900,000,000,000,000,000,000,000
297
media: em28xx: initialize refcount before kref_get The commit 47677e51e2a4("[media] em28xx: Only deallocate struct em28xx after finishing all extensions") adds kref_get to many init functions (e.g., em28xx_audio_init). However, kref_init is called too late in em28xx_usb_probe, since em28xx_init_dev before will invoke ...
static __inline__ void scm_set_cred(struct scm_cookie *scm, struct pid *pid, const struct cred *cred) { scm->pid = get_pid(pid); scm->cred = cred ? get_cred(cred) : NULL; scm->creds.pid = pid_vnr(pid); scm->creds.uid = cred ? cred->euid : INVALID_UID; scm->creds.gid = cred ? cred->egid : INVALID_GID; }
1
[ "CWE-284", "CWE-264" ]
linux
83f1b4ba917db5dc5a061a44b3403ddb6e783494
276,942,358,361,900,320,000,000,000,000,000,000,000
9
net: fix incorrect credentials passing Commit 257b5358b32f ("scm: Capture the full credentials of the scm sender") changed the credentials passing code to pass in the effective uid/gid instead of the real uid/gid. Obviously this doesn't matter most of the time (since normally they are the same), but it results in dif...
static void ccid3_hc_tx_packet_sent(struct sock *sk, unsigned int len) { struct ccid3_hc_tx_sock *hc = ccid3_hc_tx_sk(sk); ccid3_hc_tx_update_s(hc, len); if (tfrc_tx_hist_add(&hc->tx_hist, dccp_sk(sk)->dccps_gss)) DCCP_CRIT("packet history - out of memory!"); }
0
[ "CWE-200" ]
linux
7b07f8eb75aa3097cdfd4f6eac3da49db787381d
227,514,384,311,219,430,000,000,000,000,000,000,000
9
dccp: fix info leak via getsockopt(DCCP_SOCKOPT_CCID_TX_INFO) The CCID3 code fails to initialize the trailing padding bytes of struct tfrc_tx_info added for alignment on 64 bit architectures. It that for potentially leaks four bytes kernel stack via the getsockopt() syscall. Add an explicit memset(0) before filling th...
static void get_staves(struct SYMBOL *s) { struct SYMBOL *s2; struct VOICE_S *p_voice, *p_voice2; struct staff_s *p_staff, staves[MAXVOICE]; int i, flags, voice, staff, range, dup_voice, maxtime; voice_compress(); voice_dup(); /* create a new staff system */ curvoice = p_voice = first_voice; maxtime = p_voic...
0
[ "CWE-787" ]
abcm2ps
dc0372993674d0b50fedfbf7b9fad1239b8efc5f
156,613,184,602,776,630,000,000,000,000,000,000,000
213
fix: crash when too many accidentals in K: (signature + explicit) Issue #17.
nv_ignore(cmdarg_T *cap) { cap->retval |= CA_COMMAND_BUSY; // don't call edit() now }
0
[ "CWE-416" ]
vim
35a9a00afcb20897d462a766793ff45534810dc3
98,116,381,171,945,980,000,000,000,000,000,000,000
4
patch 8.2.3428: using freed memory when replacing Problem: Using freed memory when replacing. (Dhiraj Mishra) Solution: Get the line pointer after calling ins_copychar().
nfsd4_layoutcommit(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_layoutcommit *lcp) { const struct nfsd4_layout_seg *seg = &lcp->lc_seg; struct svc_fh *current_fh = &cstate->current_fh; const struct nfsd4_layout_ops *ops; loff_t new_size = lcp->lc_last_wr + 1; struct inode *inode; ...
0
[ "CWE-20", "CWE-129" ]
linux
b550a32e60a4941994b437a8d662432a486235a5
260,871,227,140,298,230,000,000,000,000,000,000,000
62
nfsd: fix undefined behavior in nfsd4_layout_verify UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34 shift exponent 128 is too large for 32-bit type 'int' Depending on compiler+architecture, this may cause the check for layout_type to succeed for overly large values (which seems to be the case with amd64)...
static double timelib_get_frac_nr(char **ptr, int max_length) { char *begin, *end, *str; double tmp_nr = TIMELIB_UNSET; int len = 0; while ((**ptr != '.') && (**ptr != ':') && ((**ptr < '0') || (**ptr > '9'))) { if (**ptr == '\0') { return TIMELIB_UNSET; } ++*ptr; } begin = *ptr; while (((**ptr == '.')...
0
[ "CWE-125" ]
php-src
5c0455bf2c8cd3c25401407f158e820aa3b239e1
97,187,394,069,308,370,000,000,000,000,000,000,000
27
Merge branch 'PHP-7.0' into PHP-7.1 * PHP-7.0: Fixed bug #75055 Out-Of-Bounds Read in timelib_meridian() Apply upstream patch for CVE-2016-1283
static int ipmr_vif_seq_show(struct seq_file *seq, void *v) { if (v == SEQ_START_TOKEN) { seq_puts(seq, "Interface BytesIn PktsIn BytesOut PktsOut Flags Local Remote\n"); } else { const struct vif_device *vif = v; const char *name = vif->dev ? vif->dev->name : "none"; seq_printf(seq, "%...
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
282,376,596,105,718,550,000,000,000,000,000,000,000
18
[NETLINK]: Missing initializations in dumped data Mostly missing initialization of padding fields of 1 or 2 bytes length, two instances of uninitialized nlmsgerr->msg of 16 bytes length. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
void html_url_arg(const char *txt) { const char *t = txt; while (t && *t) { unsigned char c = *t; const char *e = url_escape_table[c]; if (c == ' ') e = "+"; if (e) { html_raw(txt, t - txt); html(e); txt = t + 1; } t++; } if (t != txt) html(txt); }
0
[]
cgit
513b3863d999f91b47d7e9f26710390db55f9463
195,097,291,644,909,300,000,000,000,000,000,000,000
18
ui-shared: prevent malicious filename from injecting headers
vrrp_srcip_handler(vector_t *strvec) { vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp); struct sockaddr_storage *saddr = &vrrp->saddr; if (inet_stosockaddr(strvec_slot(strvec, 1), NULL, saddr)) { report_config_error(CONFIG_GENERAL_ERROR, "Configuration error: VRRP instance[%s] malformed" " src address[%s]...
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
2,556,504,741,700,552,700,000,000,000,000,000,000
24
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
static int vcpu_stat_get(void *_offset, u64 *val) { unsigned offset = (long)_offset; struct kvm *kvm; struct kvm_stat_data stat_tmp = {.offset = offset}; u64 tmp_val; *val = 0; spin_lock(&kvm_lock); list_for_each_entry(kvm, &vm_list, vm_list) { stat_tmp.kvm = kvm; vcpu_stat_get_per_vm((void *)&stat_tmp, &tm...
0
[ "CWE-416", "CWE-362" ]
linux
cfa39381173d5f969daf43582c95ad679189cbc9
336,121,737,846,247,150,000,000,000,000,000,000,000
17
kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974) kvm_ioctl_create_device() does the following: 1. creates a device that holds a reference to the VM object (with a borrowed reference, the VM's refcount has not been bumped yet) 2. initializes the device 3. transfers the reference to the device t...
static int modify_qp(PVRDMADev *dev, union pvrdma_cmd_req *req, union pvrdma_cmd_resp *rsp) { struct pvrdma_cmd_modify_qp *cmd = &req->modify_qp; int rc; /* No need to verify sgid_index since it is u8 */ rc = rdma_rm_modify_qp(&dev->rdma_dev_res, &dev->backend_dev, ...
0
[ "CWE-787" ]
qemu
284f191b4abad213aed04cb0458e1600fd18d7c4
204,744,778,253,331,380,000,000,000,000,000,000,000
19
hw/rdma: Fix possible mremap overflow in the pvrdma device (CVE-2021-3582) Ensure mremap boundaries not trusting the guest kernel to pass the correct buffer length. Fixes: CVE-2021-3582 Reported-by: VictorV (Kunlun Lab) <vv474172261@gmail.com> Tested-by: VictorV (Kunlun Lab) <vv474172261@gmail.com> Signed-off-by: Mar...
static int wolfSSH_SFTPNAME_readdir(WOLFSSH* ssh, WDIR* dir, WS_SFTPNAME* out, char* dirName) { int sz; byte special = 0; int ret = WS_SUCCESS; if (dir == NULL || ssh == NULL || out == NULL) { return WS_BAD_ARGUMENT; } /* special case of getting drives at "/" */ if (WSTRLEN...
0
[ "CWE-190" ]
wolfssh
edb272e35ee57e7b89f3e127222c6981b6a1e730
788,880,246,212,048,900,000,000,000,000,000,000
98
ASAN SFTP Fixes When decoding SFTP messages, fix the size checks so they don't wrap. (ZD12766)
GF_Err pasp_box_size(GF_Box *s) { s->size += 8; return GF_OK;
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
315,637,442,165,865,100,000,000,000,000,000,000,000
5
fixed #1587
on_name_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data) { g_bus_watch_name (G_BUS_TYPE_SESSION, "org.gnome.SessionManager", G_BUS_NAME_WATCHER_FLAGS_NONE, name_appeared_handler, NU...
0
[]
at-spi2-core
c2e87fe00b596dba20c9d57d406ab8faa744b15a
293,639,218,079,171,800,000,000,000,000,000,000,000
10
Fix inverted logic. Don't write more into a buffer than it can hold. https://bugzilla.gnome.org/show_bug.cgi?id=791124
size_t util_path_encode(char *s, size_t len) { char t[(len * 4)+1]; size_t i, j; for (i = 0, j = 0; s[i] != '\0'; i++) { if (s[i] == '/') { memcpy(&t[j], "\\x2f", 4); j += 4; } else if (s[i] == '\\') { memcpy(&t[j], "\\x5c", 4); j += 4; } else { t[j] = s[i]; j++; } } if (len == 0) retu...
0
[ "CWE-120" ]
udev
662c3110803bd8c1aedacc36788e6fd028944314
108,373,855,040,332,070,000,000,000,000,000,000,000
24
path_encode: fix max length calculation Sebastian Krahmer wrote: > it should reserve 4 times not 3 times len :)
CImg<T>& fillZ(const unsigned int x, const unsigned int y, const unsigned int c, const double a0, ...) { const ulongT wh = (ulongT)_width*_height; if (x<_width && y<_height && c<_spectrum) _cimg_fill1(x,y,0,c,wh,_depth,double); return *this; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
134,810,847,284,123,130,000,000,000,000,000,000,000
5
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
flatpak_dir_cleanup_removed (FlatpakDir *self, GCancellable *cancellable, GError **error) { gboolean ret = FALSE; g_autoptr(GFile) removed_dir = NULL; g_autoptr(GFileEnumerator) dir_enum = NULL; g_autoptr(GFileInfo) child_info = NULL; GError *t...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
259,661,894,551,532,140,000,000,000,000,000,000,000
51
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 ...
SYSCALL_DEFINE1(io_destroy, aio_context_t, ctx) { struct kioctx *ioctx = lookup_ioctx(ctx); if (likely(NULL != ioctx)) { struct ctx_rq_wait wait; int ret; init_completion(&wait.comp); atomic_set(&wait.count, 1); /* Pass requests_done to kill_ioctx() where it can be set * in a thread-safe way. If we try...
0
[ "CWE-284", "CWE-264" ]
linux
22f6b4d34fcf039c63a94e7670e0da24f8575a5a
241,628,951,094,685,060,000,000,000,000,000,000,000
29
aio: mark AIO pseudo-fs noexec This ensures that do_mmap() won't implicitly make AIO memory mappings executable if the READ_IMPLIES_EXEC personality flag is set. Such behavior is problematic because the security_mmap_file LSM hook doesn't catch this case, potentially permitting an attacker to bypass a W^X policy enfo...
_fep_transceive_control_message (Fep *fep, int fd, FepControlMessage *request, FepControlMessage *response) { FepList *messages = NULL; int retval = 0; retval = _fep_write_control_messa...
0
[ "CWE-264" ]
libfep
293d9d3f7565f01a9dc40b53259886832eaa2ace
319,614,747,125,331,600,000,000,000,000,000,000,000
77
Don't use abstract Unix domain sockets
shift_line( int left, int round, int amount, int call_changed_bytes) // call changed_bytes() { int count; int i, j; int sw_val = (int)get_sw_value_indent(curbuf); count = get_indent(); // get current indent if (round) // round off indent { i = count / sw_val; // number of...
0
[ "CWE-416", "CWE-787" ]
vim
9f8c304c8a390ade133bac29963dc8e56ab14cbc
36,243,614,755,983,450,000,000,000,000,000,000,000
46
patch 8.2.4120: block insert goes over the end of the line Problem: Block insert goes over the end of the line. Solution: Handle invalid byte better. Fix inserting the wrong text.
static int snd_timer_stop1(struct snd_timer_instance *timeri, bool stop) { struct snd_timer *timer; int result = 0; unsigned long flags; timer = timeri->timer; if (!timer) return -EINVAL; spin_lock_irqsave(&timer->lock, flags); if (!(timeri->flags & (SNDRV_TIMER_IFLG_RUNNING | SNDRV_TIMER_IFLG_START...
0
[ "CWE-200" ]
linux
d11662f4f798b50d8c8743f433842c3e40fe3378
241,282,351,690,437,100,000,000,000,000,000,000,000
46
ALSA: timer: Fix race between read and ioctl The read from ALSA timer device, the function snd_timer_user_tread(), may access to an uninitialized struct snd_timer_user fields when the read is concurrently performed while the ioctl like snd_timer_user_tselect() is invoked. We have already fixed the races among ioctls ...
Word getResponseBodyBufferBytesHandler(void* raw_context, Word start, Word length, Word ptr_ptr, Word size_ptr) { auto context = WASM_CONTEXT(raw_context); auto result = context->getResponseBodyBufferBytes(start.u64_, length.u64_); context->wasm()->copyToPointerSize(result, ...
0
[ "CWE-476" ]
envoy
8788a3cf255b647fd14e6b5e2585abaaedb28153
3,996,812,519,909,801,400,000,000,000,000,000,000
7
1.4 - Do not call into the VM unless the VM Context has been created. (#24) * Ensure that the in VM Context is created before onDone is called. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Update as per offline discussion. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Set in_vm_context_created_ in onNet...
void ldbRedis(lua_State *lua, sds *argv, int argc) { int j, saved_rc = server.lua_replicate_commands; if (!lua_checkstack(lua, argc + 1)) { /* Increase the Lua stack if needed to make sure there is enough room * to push 'argc + 1' elements to the stack. On failure, return error.          * Not...
0
[ "CWE-787" ]
redis
666ed7facf4524bf6d19b11b20faa2cf93fdf591
128,147,597,999,738,040,000,000,000,000,000,000,000
26
Fix invalid memory write on lua stack overflow {CVE-2021-32626} When LUA call our C code, by default, the LUA stack has room for 20 elements. In most cases, this is more than enough but sometimes it's not and the caller must verify the LUA stack size before he pushes elements. On 3 places in the code, there was no ve...
fast_field_copier setup_fast_field_copier(Field *field) { return (*ref)->setup_fast_field_copier(field); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
301,626,337,518,518,400,000,000,000,000,000,000,000
2
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....
static int writeCoord(u8 *p, RtreeCoord *pCoord){ u32 i; assert( ((((char*)p) - (char*)0)&3)==0 ); /* p is always 4-byte aligned */ assert( sizeof(RtreeCoord)==4 ); assert( sizeof(u32)==4 ); #if SQLITE_BYTEORDER==1234 && GCC_VERSION>=4003000 i = __builtin_bswap32(pCoord->u); memcpy(p, &i, 4); #elif SQLITE_...
0
[ "CWE-125" ]
sqlite
e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8
212,269,275,980,718,080,000,000,000,000,000,000,000
23
Enhance the rtreenode() function of rtree (used for testing) so that it uses the newer sqlite3_str object for better performance and improved error reporting. FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377
void *ipc_rcu_alloc(int size) { /* * We prepend the allocation with the rcu struct */ struct ipc_rcu *out = ipc_alloc(sizeof(struct ipc_rcu) + size); if (unlikely(!out)) return NULL; atomic_set(&out->refcount, 1); return out + 1; }
0
[ "CWE-362", "CWE-401" ]
linux
b9a532277938798b53178d5a66af6e2915cb27cf
66,993,794,080,553,940,000,000,000,000,000,000,000
11
Initialize msg/shm IPC objects before doing ipc_addid() As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before having initialized the IPC object state. Yes, we initialize the IPC object in a locked state, but with all the lockless RCU lookup work, that IPC object lock no longer means that the state c...
static void svm_set_segment(struct kvm_vcpu *vcpu, struct kvm_segment *var, int seg) { struct vcpu_svm *svm = to_svm(vcpu); struct vmcb_seg *s = svm_seg(vcpu, seg); s->base = var->base; s->limit = var->limit; s->selector = var->selector; s->attrib = (var->type & SVM_SELECTOR_TYPE_MASK); s->attrib |= (var...
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
218,860,545,845,555,000,000,000,000,000,000,000,000
30
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...
static int SLCount(struct script_record *sr) { int sl_cnt = 0; int i,j; for ( i=0; sr[i].script!=0; ++i ) { for ( j=0; sr[i].langs[j]!=0; ++j ) ++sl_cnt; } return( sl_cnt ); }
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
211,083,015,321,129,700,000,000,000,000,000,000,000
10
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
j2k_read(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data) { ImagingCodecState state = (ImagingCodecState)p_user_data; size_t len = _imaging_read_pyFd(state->fd, p_buffer, p_nb_bytes); return len ? len : (OPJ_SIZE_T)-1; }
0
[ "CWE-125" ]
Pillow
3bf5eddb89afdf690eceaa52bc4d3546ba9a5f87
162,494,056,048,059,680,000,000,000,000,000,000,000
7
Fix OOB Read in Jpeg2KDecode CVE-2021-25287,CVE-2021-25288 * For J2k images with multiple bands, it's legal in to have different widths for each band, e.g. 1 byte for L, 4 bytes for A * This dates to Pillow 2.4.0
bool is_keyword(const char *name, uint len) { DBUG_ASSERT(len != 0); return get_hash_symbol(name,len,0)!=0; }
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
185,805,524,132,449,380,000,000,000,000,000,000,000
5
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 int io_close(struct io_kiocb *req, unsigned int issue_flags) { struct files_struct *files = current->files; struct io_close *close = &req->close; struct fdtable *fdt; struct file *file = NULL; int ret = -EBADF; spin_lock(&files->file_lock); fdt = files_fdtable(files); if (close->fd >= fdt->max_fds) { ...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
26,003,346,612,792,220,000,000,000,000,000,000,000
45
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
void WriteValueSlices( const Tensor& params_dense_values_in, const std::vector<std::pair<SPLITS_TYPE, SPLITS_TYPE>>& value_slices, SPLITS_TYPE value_size, Tensor* values_out) { const auto& params_dense_values = params_dense_values_in.flat_outer_dims<VALUE_TYPE, 2>(); auto values = values_out->flat...
0
[ "CWE-125", "CWE-369" ]
tensorflow
a2b743f6017d7b97af1fe49087ae15f0ac634373
277,883,331,205,971,200,000,000,000,000,000,000,000
17
Fix heap OOB in `tf.raw_ops.RaggedGather` PiperOrigin-RevId: 388355464 Change-Id: If14d96231d1cd7aad7c4d1c22c1bab1576b75717
ms_response_to_fs_info (MsResponse *response, GFileInfo *info) { xmlNodeIter iter; MsPropstat propstat; xmlNodePtr node; guint status; const char *text; guint64 bytes_avail; guint64 bytes_used; gboolean have_bytes_avail; gboolean have_bytes_used; have_...
0
[]
gvfs
f81ff2108ab3b6e370f20dcadd8708d23f499184
236,252,104,070,412,600,000,000,000,000,000,000,000
65
dav: don't unescape the uri twice path_equal tries to unescape path before comparing. Unfortunately this function is used also for already unescaped paths. Therefore unescaping can fail. This commit reverts changes which was done in commit 50af53d and unescape just uris, which aren't unescaped yet. https://bugzilla.g...
mrb_method_search_vm(mrb_state *mrb, struct RClass **cp, mrb_sym mid) { mrb_method_t m; struct RClass *c = *cp; #ifndef MRB_NO_METHOD_CACHE struct RClass *oc = c; int h = kh_int_hash_func(mrb, ((intptr_t)oc) ^ mid) & (MRB_METHOD_CACHE_SIZE-1); struct mrb_cache_entry *mc = &mrb->cache[h]; if (mc->c == c && ...
0
[ "CWE-787" ]
mruby
b1d0296a937fe278239bdfac840a3fd0e93b3ee9
126,751,093,286,091,340,000,000,000,000,000,000,000
47
class.c: clear method cache after `remove_method`.