func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int scsi_read_disc_information(SCSIDiskState *s, SCSIDiskReq *r, uint8_t *outbuf) { uint8_t type = r->req.cmd.buf[1] & 7; if (s->qdev.type != TYPE_ROM) { return -1; } /* Types 1/2 are only defined for Blu-Ray. */ if (type != 0) { scsi_c...
0
[ "CWE-193" ]
qemu
b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8
324,308,566,098,314,340,000,000,000,000,000,000,000
32
hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands This avoids an off-by-one read of 'mode_sense_valid' buffer in hw/scsi/scsi-disk.c:mode_sense_page(). Fixes: CVE-2021-3930 Cc: qemu-stable@nongnu.org Reported-by: Alexander Bulekov <alxndr@bu.edu> Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pa...
void CLASS parseNikonMakernote (int base, int uptag, unsigned dng_writer) { #define imn imgdata.makernotes.nikon #define ilm imgdata.lens.makernotes #define icWB imgdata.color.WB_Coeffs unsigned offset = 0, entries, tag, type, len, save; unsigned c, i; uchar *LensData_buf; uchar ColorBalanceData_buf[324]; i...
0
[ "CWE-400" ]
LibRaw
e67a9862d10ebaa97712f532eca1eb5e2e410a22
323,702,800,896,415,800,000,000,000,000,000,000,000
419
Fixed Secunia Advisory SA86384 - possible infinite loop in unpacked_load_raw() - possible infinite loop in parse_rollei() - possible infinite loop in parse_sinar_ia() Credits: Laurent Delosieres, Secunia Research at Flexera
TIFFWriteDirectoryTagCheckedRationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, float* value) { static const char module[] = "TIFFWriteDirectoryTagCheckedRationalArray"; uint32* m; float* na; uint32* nb; uint32 nc; int o; assert(sizeof(uint32)==4); m=_TIFFmalloc(count*2*sizeof(ui...
0
[ "CWE-617" ]
libtiff
de144fd228e4be8aa484c3caf3d814b6fa88c6d9
307,577,244,098,367,540,000,000,000,000,000,000,000
45
TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963
find_check_entry(struct ipt_entry *e, struct net *net, const char *name, unsigned int size, struct xt_percpu_counter_alloc_state *alloc_state) { struct xt_entry_target *t; struct xt_target *target; int ret; unsigned int j; struct xt_mtchk_param mtpar; struct xt_entry_match *ematch; if (!xt_percpu_counter_...
0
[ "CWE-787" ]
linux
b29c457a6511435960115c0f548c4360d5f4801d
305,118,562,189,642,440,000,000,000,000,000,000,000
55
netfilter: x_tables: fix compat match/target pad out-of-bound write xt_compat_match/target_from_user doesn't check that zeroing the area to start of next rule won't write past end of allocated ruleset blob. Remove this code and zero the entire blob beforehand. Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appsp...
sub_points_edwards (mpi_point_t result, mpi_point_t p1, mpi_point_t p2, mpi_ec_t ctx) { mpi_point_t p2i = _gcry_mpi_point_new (0); point_set (p2i, p2); mpi_sub (p2i->x, ctx->p, p2i->x); add_points_edwards (result, p1, p2i, ctx); _gcry_mpi_point_release (p2i); }
0
[ "CWE-200" ]
libgcrypt
bf76acbf0da6b0f245e491bec12c0f0a1b5be7c9
157,809,037,509,498,100,000,000,000,000,000,000,000
10
ecc: Add input validation for X25519. * cipher/ecc.c (ecc_decrypt_raw): Add input validation. * mpi/ec.c (ec_p_init): Use scratch buffer for bad points. (_gcry_mpi_ec_bad_point): New. -- Following is the paper describing the attack: May the Fourth Be With You: A Microarchitectural Side Channel Attack on Rea...
bool Segment::DoneParsing() const { if (m_size < 0) { long long total, avail; const int status = m_pReader->Length(&total, &avail); if (status < 0) // error return true; // must assume done if (total < 0) return false; // assume live stream return (m_pos >= total); } const ...
0
[ "CWE-20" ]
libvpx
34d54b04e98dd0bac32e9aab0fbda0bf501bc742
185,648,541,585,410,960,000,000,000,000,000,000,000
19
update libwebm to libwebm-1.0.0.27-358-gdbf1d10 changelog: https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10 Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3
static char *parse_len(char *p, int dur_u, int *p_len) { int len, fac; int err = 0; char *q; len = dur_u; if (isdigit((unsigned char) *p)) { len *= strtol(p, &q, 10); if (len <= 0 || len > 10000) { syntax("Bad length", p); len = dur_u; } p = q; } if (*p != '/') { *p_len = len; return p; ...
0
[ "CWE-125", "CWE-787" ]
abcm2ps
3169ace6d63f6f517a64e8df0298f44a490c4a15
25,863,051,012,955,903,000,000,000,000,000,000,000
43
fix: crash when accidental without a note at start of line after K: Issue #84.
static void _db_release(struct db_filter *db) { if (db == NULL) return; /* free and reset the DB */ _db_reset(db); free(db); }
0
[]
libseccomp
c5bf78de480b32b324e0f511c88ce533ed280b37
291,079,944,181,159,770,000,000,000,000,000,000,000
9
db: fix 64-bit argument comparisons Our approach to doing 64-bit comparisons using 32-bit operators was just plain wrong, leading to a number of potential problems with filters that used the LT, GT, LE, or GE operators. This patch fixes this problem and a few other related issues that came to light in the course of f...
static int lg4ff_switch_compatibility_mode(struct hid_device *hid, const struct lg4ff_compat_mode_switch *s) { struct lg4ff_device_entry *entry; struct lg_drv_data *drv_data; unsigned long flags; s32 *value; u8 i; drv_data = hid_get_drvdata(hid); if (!drv_data) { hid_err(hid, "Private driver data not found!\n...
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
29,923,371,217,299,944,000,000,000,000,000,000,000
34
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
void bgp_packet_process_error(struct thread *thread) { struct peer *peer; int code; peer = THREAD_ARG(thread); code = THREAD_VAL(thread); if (bgp_debug_neighbor_events(peer)) zlog_debug("%s [Event] BGP error %d on fd %d", peer->host, code, peer->fd); /* Closed connection or error on the socket */ if (...
0
[ "CWE-125" ]
frr
ff6db1027f8f36df657ff2e5ea167773752537ed
97,605,940,547,752,080,000,000,000,000,000,000,000
26
bgpd: Make sure hdr length is at a minimum of what is expected Ensure that if the capability length specified is enough data. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
st_select_lex* next_select() { return (st_select_lex*) next; }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
159,915,932,284,248,180,000,000,000,000,000,000,000
1
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
void DecimalQuantity::negate() { flags ^= NEGATIVE_FLAG; }
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
132,882,564,540,879,610,000,000,000,000,000,000,000
3
ICU-20246 Fixing another integer overflow in number parsing.
static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer) { struct qdisc_watchdog *wd = container_of(timer, struct qdisc_watchdog, timer); wd->qdisc->flags &= ~TCQ_F_THROTTLED; __netif_schedule(qdisc_root(wd->qdisc)); return HRTIMER_NORESTART; }
0
[ "CWE-909" ]
linux-2.6
16ebb5e0b36ceadc8186f71d68b0c4fa4b6e781b
111,984,305,308,909,900,000,000,000,000,000,000,000
10
tc: Fix unitialized kernel memory leak Three bytes of uninitialized kernel memory are currently leaked to user Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Reviewed-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static u64 ioat3_get_current_completion(struct ioat_chan_common *chan) { u64 phys_complete; u64 completion; completion = *chan->completion; phys_complete = ioat_chansts_to_addr(completion); dev_dbg(to_dev(chan), "%s: phys_complete: %#llx\n", __func__, (unsigned long long) phys_complete); return phys_complete...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
115,870,079,423,230,930,000,000,000,000,000,000,000
13
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...
int RemoteIo::open() { close(); // reset the IO position bigBlock_ = nullptr; if (p_->isMalloced_ == false) { long length = p_->getFileLength(); if (length < 0) { // unable to get the length of remote file, get the whole file content. std::string d...
0
[ "CWE-190" ]
exiv2
c73d1e27198a389ce7caf52ac30f8e2120acdafd
299,842,676,596,675,150,000,000,000,000,000,000,000
33
Avoid negative integer overflow when `filesize < io_->tell()`. This fixes #791.
static int bpf_link_get_info_by_fd(struct file *file, struct bpf_link *link, const union bpf_attr *attr, union bpf_attr __user *uattr) { struct bpf_link_info __user *uinfo = u64_to_user_ptr(attr->info.info); struct bpf_link_info info; u32 info_len = attr->info.info_len; int err; err = bpf_check_...
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
259,977,006,152,993,120,000,000,000,000,000,000,000
35
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
static int file_modexp(STANZA *s) { BIGNUM *a = NULL, *e = NULL, *m = NULL, *mod_exp = NULL, *ret = NULL; BIGNUM *b = NULL, *c = NULL, *d = NULL; int st = 0; if (!TEST_ptr(a = getBN(s, "A")) || !TEST_ptr(e = getBN(s, "E")) || !TEST_ptr(m = getBN(s, "M")) || !TEST_ptr...
0
[]
openssl
336923c0c8d705cb8af5216b29a205662db0d590
184,789,079,071,561,900,000,000,000,000,000,000,000
54
Fix a carry overflow bug in bn_sqr_comba4/8 for mips 32-bit targets bn_sqr_comba8 does for instance compute a wrong result for the value: a=0x4aaac919 62056c84 fba7334e 1a6be678 022181ba fd3aa878 899b2346 ee210f45 The correct result is: r=0x15c72e32 605a3061 d11b1012 3c187483 6df96999 bd0c22ba d3e7d437 4724a82f 9...
writeRandomBytes_arc4random(void *target, size_t count) { size_t bytesWrittenTotal = 0; while (bytesWrittenTotal < count) { const uint32_t random32 = arc4random(); size_t i = 0; for (; (i < sizeof(random32)) && (bytesWrittenTotal < count); i++, bytesWrittenTotal++) { const uint8_t rando...
0
[ "CWE-611", "CWE-776", "CWE-415", "CWE-125" ]
libexpat
c20b758c332d9a13afbbb276d30db1d183a85d43
180,999,472,918,326,630,000,000,000,000,000,000,000
14
xmlparse.c: Deny internal entities closing the doctype
void task_mem(struct seq_file *m, struct mm_struct *mm) { unsigned long text, lib, swap, anon, file, shmem; unsigned long hiwater_vm, total_vm, hiwater_rss, total_rss; anon = get_mm_counter(mm, MM_ANONPAGES); file = get_mm_counter(mm, MM_FILEPAGES); shmem = get_mm_counter(mm, MM_SHMEMPAGES); /* * Note: to min...
0
[ "CWE-362", "CWE-703", "CWE-667" ]
linux
04f5866e41fb70690e28397487d8bd8eea7d712a
110,200,816,328,267,680,000,000,000,000,000,000,000
50
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization on the processes bel...
int sqlite3Fts3FirstFilter( sqlite3_int64 iDelta, /* Varint that may be written to pOut */ char *pList, /* Position list (no 0x00 term) */ int nList, /* Size of pList in bytes */ char *pOut /* Write output here */ ){ int nOut = 0; int bW...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
131,128,763,643,712,700,000,000,000,000,000,000,000
41
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
query_entry_delete(void *k, void* ATTR_UNUSED(arg)) { struct msgreply_entry* q = (struct msgreply_entry*)k; lock_rw_destroy(&q->entry.lock); query_info_clear(&q->key); free(q); }
0
[ "CWE-787" ]
unbound
6c3a0b54ed8ace93d5b5ca7b8078dc87e75cd640
339,558,322,226,254,700,000,000,000,000,000,000,000
7
- Fix Out of Bound Write Compressed Names in rdata_copy(), reported by X41 D-Sec.
ff_layout_alloc_layout_hdr(struct inode *inode, gfp_t gfp_flags) { struct nfs4_flexfile_layout *ffl; ffl = kzalloc(sizeof(*ffl), gfp_flags); if (ffl) { pnfs_init_ds_commit_info(&ffl->commit_info); INIT_LIST_HEAD(&ffl->error_list); INIT_LIST_HEAD(&ffl->mirrors); ffl->last_report_time = ktime_get(); ffl->co...
0
[ "CWE-787" ]
linux
ed34695e15aba74f45247f1ee2cf7e09d449f925
207,155,034,196,377,240,000,000,000,000,000,000,000
15
pNFS/flexfiles: fix incorrect size check in decode_nfs_fh() We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym bazalii) observed the check: if (fh->size > sizeof(struct nfs_fh)) should not use the size of the nfs_fh struct which includes an extra two bytes from the size field. struct nfs_fh { unsi...
struct ctl_table * __net_init ipv6_icmp_sysctl_init(struct net *net) { struct ctl_table *table; table = kmemdup(ipv6_icmp_table_template, sizeof(ipv6_icmp_table_template), GFP_KERNEL); if (table) table[0].data = &net->ipv6.sysctl.icmpv6_time; return table; }
0
[ "CWE-20", "CWE-200" ]
linux
79dc7e3f1cd323be4c81aa1a94faa1b3ed987fb2
116,459,145,171,709,610,000,000,000,000,000,000,000
13
net: handle no dst on skb in icmp6_send Andrey reported the following while fuzzing the kernel with syzkaller: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked in: CPU: 0 PID: 3859 Comm: a.out Not tainted...
static struct io_poll_iocb *io_poll_get_double(struct io_kiocb *req) { /* pure poll stashes this in ->async_data, poll driven retry elsewhere */ if (req->opcode == IORING_OP_POLL_ADD) return req->async_data; return req->apoll->double_poll;
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
199,526,926,140,541,700,000,000,000,000,000,000,000
7
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
static int nfs_umountall_reply(uchar *pkt, unsigned len) { struct rpc_t rpc_pkt; debug("%s\n", __func__); memcpy(&rpc_pkt.u.data[0], pkt, len); if (ntohl(rpc_pkt.u.reply.id) > rpc_id) return -NFS_RPC_ERR; else if (ntohl(rpc_pkt.u.reply.id) < rpc_id) return -NFS_RPC_DROP; if (rpc_pkt.u.reply.rstatus || ...
0
[ "CWE-120", "CWE-703" ]
u-boot
5d14ee4e53a81055d34ba280cb8fd90330f22a96
303,226,601,670,205,000,000,000,000,000,000,000,000
23
CVE-2019-14196: nfs: fix unbounded memcpy with a failed length check at nfs_lookup_reply This patch adds a check to rpc_pkt.u.reply.data at nfs_lookup_reply. Signed-off-by: Cheng Liu <liucheng32@huawei.com> Reported-by: Fermín Serna <fermin@semmle.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
cliprdr_server_format_list_response(CliprdrServerContext* context, const CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse) { wStream* s; CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*)context->handle; if (formatListResponse->msgType != CB_FORMAT_LIST_RESPONSE) WLog_WARN(...
0
[]
FreeRDP
8e1a1b407565eb0a48923c796f5b1f69167b3c48
262,166,537,627,242,900,000,000,000,000,000,000,000
21
Fixed cliprdr_server_receive_capabilities Thanks to hac425 CVE-2020-11017, CVE-2020-11018
int wc_RsaSSL_Verify(const byte* in, word32 inLen, byte* out, word32 outLen, RsaKey* key) { if (in == NULL || out == NULL || key == NULL || inLen == 0) { return BAD_FUNC_ARG; } return RsaSSL_Verify_fips(in, inLen, out, outLen, key); }
0
[ "CWE-310", "CWE-787" ]
wolfssl
fb2288c46dd4c864b78f00a47a364b96a09a5c0f
158,018,249,177,203,280,000,000,000,000,000,000,000
8
RSA-PSS: Handle edge case with encoding message to hash When the key is small relative to the digest (1024-bit key, 64-byte hash, 61-byte salt length), the internal message to hash is larger than the output size. Allocate a buffer for the message when this happens.
load_xwd_f2_d1_b1 (const gchar *filename, FILE *ifp, L_XWDFILEHEADER *xwdhdr, L_XWDCOLOR *xwdcolmap) { register int pix8; register guchar *dest, *src; guchar c1, c2, c3, c4; gint width, height, scan_lines, til...
0
[ "CWE-190" ]
gimp
32ae0f83e5748299641cceaabe3f80f1b3afd03e
305,418,391,477,802,180,000,000,000,000,000,000,000
138
file-xwd: sanity check colormap size (CVE-2013-1913)
struct lhash_st *SSL_CTX_sessions(SSL_CTX *ctx) { return ctx->sessions; }
0
[ "CWE-310" ]
openssl
c6a876473cbff0fd323c8abcaace98ee2d21863d
325,167,638,497,038,140,000,000,000,000,000,000,000
4
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl) { return ASN1_item_d2i_fp(ASN1_ITEM_rptr(X509_CRL), fp, crl); }
0
[ "CWE-310" ]
openssl
684400ce192dac51df3d3e92b61830a6ef90be3e
33,247,606,690,924,110,000,000,000,000,000,000,000
4
Fix various certificate fingerprint issues. By using non-DER or invalid encodings outside the signed portion of a certificate the fingerprint can be changed without breaking the signature. Although no details of the signed portion of the certificate can be changed this can cause problems with some applications: e.g. t...
init() { rsRetVal localRet; int iNbrActions; int bHadConfigErr = 0; ruleset_t *pRuleset; char cbuf[BUFSIZ]; char bufStartUpMsg[512]; struct sigaction sigAct; DEFiRet; thrdTerminateAll(); /* stop all running input threads - TODO: reconsider location! */ /* initialize some static variables */ pDfltHostnameCm...
0
[ "CWE-119" ]
rsyslog
1ca6cc236d1dabf1633238b873fb1c057e52f95e
154,994,542,216,298,430,000,000,000,000,000,000,000
233
bugfix: off-by-one(two) bug in legacy syslog parser
void CairoOutputDev::beginTextObject(GfxState *state) { if (!(state->getRender() & 4) && state->getFillColorSpace()->getMode() == csPattern) { haveCSPattern = gTrue; saveState(state); } }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
46,069,207,291,316,840,000,000,000,000,000,000,000
6
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
qemuProcessStartPRDaemonHook(void *opaque) { virDomainObjPtr vm = opaque; size_t i, nfds = 0; g_autofree int *fds = NULL; int ret = -1; if (qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT)) { if (virProcessGetNamespaces(vm->pid, &nfds, &fds) < 0) return ret; if (nfd...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
180,709,339,243,426,830,000,000,000,000,000,000,000
22
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
static void io_req_task_queue(struct io_kiocb *req) { req->io_task_work.func = io_req_task_submit; io_req_task_work_add(req); }
0
[ "CWE-125" ]
linux
89c2b3b74918200e46699338d7bcc19b1ea12110
71,571,420,614,794,740,000,000,000,000,000,000,000
5
io_uring: reexpand under-reexpanded iters [ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900 [ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task syz-executor.0/828 [ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted 5.14.0-rc3-next-20210730 #1 [ 74.216525] Hardware n...
_asn1_get_indefinite_length_string (const unsigned char *der, int *len) { int len2, len3, counter, indefinite; unsigned long tag; unsigned char class; counter = indefinite = 0; while (1) { if ((*len) < counter) return ASN1_DER_ERROR; if ((der[counter] == 0) && (der[counter + 1] == 0)) { ...
1
[]
libtasn1
0e80d79db71747644394fe3472dad28cd3e7b00b
238,761,186,358,235,000,000,000,000,000,000,000,000
48
More precise length check in _asn1_get_indefinite_length_string().
TfLiteStatus MaxEval(TfLiteContext* context, TfLiteNode* node) { auto* params = reinterpret_cast<TfLitePoolParams*>(node->builtin_data); OpData* data = reinterpret_cast<OpData*>(node->user_data); TfLiteTensor* output; TF_LITE_ENSURE_OK(context, GetOutputSafe(context, node, 0, &output)); const TfLiteTensor* i...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
329,876,413,039,320,980,000,000,000,000,000,000,000
31
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
void ServerConnectionImpl::maybeAddSentinelBufferFragment(Buffer::WatermarkBuffer& output_buffer) { if (!flood_protection_) { return; } // It's messy and complicated to try to tag the final write of an HTTP response for response // tracking for flood protection. Instead, write an empty buffer fragment after...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
304,730,468,948,433,200,000,000,000,000,000,000,000
15
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
static int io_recvmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { return -EOPNOTSUPP; }
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
73,620,614,343,883,560,000,000,000,000,000,000,000
5
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
int main() { initialize_environment(); test_format_wrong_size(); test_blit_info_format_check(); test_blit_info_format_check_null_format(); test_format_is_plain_nullptr_deref_trigger(); test_format_util_format_is_rgb_nullptr_deref_trigger_illegal_resource(); test_format_util_format_is_rgb_nullptr_d...
1
[]
virglrenderer
8c9cfb4e425542e96f0717189fe4658555baaf08
243,314,667,655,714,000,000,000,000,000,000,000,000
23
tests: Add trigger for overflow in texture data upload Related #140 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Acked-by: Emil Velikov <emil.velikov@collabora.com>
Network::FilterStatus ConnectionManagerImpl::onData(Buffer::Instance& data, bool) { if (!codec_) { // Http3 codec should have been instantiated by now. createCodec(data); } bool redispatch; do { redispatch = false; const Status status = codec_->dispatch(data); if (isBufferFloodError(statu...
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
250,943,366,504,935,200,000,000,000,000,000,000,000
43
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
server_client_check_redraw(struct client *c) { struct session *s = c->session; struct tty *tty = &c->tty; struct window_pane *wp; int needed, flags; struct timeval tv = { .tv_usec = 1000 }; static struct event ev; size_t left; if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED)) return; if (c->flags...
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
37,677,282,448,423,110,000,000,000,000,000,000,000
90
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
proto_tree_add_ipv4(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, ws_in4_addr value) { proto_item *pi; header_field_info *hfinfo; CHECK_FOR_NULL_TREE(tree); TRY_TO_FAKE_THIS_ITEM(tree, hfindex, hfinfo); DISSECTOR_ASSERT_FIELD_TYPE(hfinfo, FT_IPv4); pi = proto_tree_add_pi(tree,...
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
36,795,843,115,759,577,000,000,000,000,000,000,000
17
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
static int fanout_add(struct sock *sk, u16 id, u16 type_flags) { struct packet_sock *po = pkt_sk(sk); struct packet_fanout *f, *match; u8 type = type_flags & 0xff; u8 flags = type_flags >> 8; int err; switch (type) { case PACKET_FANOUT_ROLLOVER: if (type_flags & PACKET_FANOUT_FLAG_ROLLOVER) return -EINVAL;...
1
[ "CWE-416", "CWE-362" ]
linux
d199fab63c11998a602205f7ee7ff7c05c97164b
209,544,008,583,980,080,000,000,000,000,000,000,000
94
packet: fix races in fanout_add() Multiple threads can call fanout_add() at the same time. We need to grab fanout_mutex earlier to avoid races that could lead to one thread freeing po->rollover that was set by another thread. Do the same in fanout_release(), for peace of mind, and to help us finding lockdep issues e...
static void sdma_start_hw_clean_up(struct sdma_engine *sde) { tasklet_hi_schedule(&sde->sdma_hw_clean_up_task); }
0
[ "CWE-400", "CWE-401" ]
linux
34b3be18a04ecdc610aae4c48e5d1b799d8689f6
153,140,684,617,032,260,000,000,000,000,000,000,000
4
RDMA/hfi1: Prevent memory leak in sdma_init In sdma_init if rhashtable_init fails the allocated memory for tmp_sdma_rht should be released. Fixes: 5a52a7acf7e2 ("IB/hfi1: NULL pointer dereference when freeing rhashtable") Link: https://lore.kernel.org/r/20190925144543.10141-1-navid.emamdoost@gmail.com Signed-off-by: ...
xmlReallocLoc(void *ptr,size_t size, const char * file, int line) { MEMHDR *p, *tmp; unsigned long number; #ifdef DEBUG_MEMORY size_t oldsize; #endif if (ptr == NULL) return(xmlMallocLoc(size, file, line)); if (!xmlMemInitialized) xmlInitMemory(); TEST_POINT p = CLIENT_2_HDR(ptr);...
1
[ "CWE-787" ]
libxml2
897dffbae322b46b83f99a607d527058a72c51ed
164,003,070,910,184,140,000,000,000,000,000,000,000
72
Check for integer overflow in memory debug code Fixes bug 783026. Thanks to Pranjal Jumde for the report.
static int filter_frame(AVFilterLink *inlink, AVFrame *in) { AVFilterContext *ctx = inlink->dst; BoxBlurContext *s = ctx->priv; AVFilterLink *outlink = inlink->dst->outputs[0]; AVFrame *out; int plane; int cw = FF_CEIL_RSHIFT(inlink->w, s->hsub), ch = FF_CEIL_RSHIFT(in->height, s->vsub); int...
1
[ "CWE-119", "CWE-787" ]
FFmpeg
e43a0a232dbf6d3c161823c2e07c52e76227a1bc
127,097,771,226,117,030,000,000,000,000,000,000,000
34
avfilter: fix plane validity checks Fixes out of array accesses Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
void SetParams(Membership* Memb) { memb = Memb; PushParamRef(memb->chan->name); }
0
[ "CWE-200", "CWE-732" ]
inspircd
4350a11c663b0d75f8119743bffb7736d87abd4d
273,015,913,359,568,800,000,000,000,000,000,000,000
5
Fix sending malformed pong messages in some cases.
i915_gem_execbuffer_relocate(struct drm_device *dev, struct eb_objects *eb) { struct drm_i915_gem_object *obj; int ret = 0; /* This is the fast path and we cannot handle a pagefault whilst * holding the struct mutex lest the user pass in the relocations * contained within a mmaped bo. For in such a case...
0
[]
linux
3118a4f652c7b12c752f3222af0447008f9b2368
1,340,603,402,687,424,000,000,000,000,000,000,000
23
drm/i915: bounds check execbuffer relocation count It is possible to wrap the counter used to allocate the buffer for relocation copies. This could lead to heap writing overflows. CVE-2013-0913 v3: collapse test, improve comment v2: move check into validate_exec_list Signed-off-by: Kees Cook <keescook@chromium.org>...
goto_tabpage_tp( tabpage_T *tp, int trigger_enter_autocmds, int trigger_leave_autocmds) { // Don't repeat a message in another tab page. set_keep_msg(NULL, 0); if (tp != curtab && leave_tabpage(tp->tp_curwin->w_buffer, trigger_leave_autocmds) == OK) { if (valid_tabpage(tp)) ent...
1
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
298,925,399,444,516,940,000,000,000,000,000,000,000
19
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.
xps_tifsWarningHandlerEx(thandle_t client_data, const char *module, const char *fmt, va_list ap) { tifs_io_xps *tiffio = (tifs_io_xps *)client_data; gx_device_xps *pdev = tiffio->pdev; int count; char buf[TIFF_PRINT_BUF_LENGTH]; count = vsnprintf(buf, sizeof(buf), fmt, ap)...
0
[]
ghostpdl
94d8955cb7725eb5f3557ddc02310c76124fdd1a
192,312,493,538,796,470,000,000,000,000,000,000,000
17
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 rbd_try_acquire_lock(struct rbd_device *rbd_dev) { int ret; down_read(&rbd_dev->lock_rwsem); dout("%s rbd_dev %p read lock_state %d\n", __func__, rbd_dev, rbd_dev->lock_state); if (__rbd_is_lock_owner(rbd_dev)) { up_read(&rbd_dev->lock_rwsem); return 0; } up_read(&rbd_dev->lock_rwsem); dow...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
162,835,132,482,169,970,000,000,000,000,000,000,000
53
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
main() { union { int l; char c[sizeof(int)]; } u; int x0, x1, x2, x3; u.l = 0x012345678; x0 = u.c[0]; x3 = u.c[sizeof (int) - 1]; printf ("x0 = 0x%x x3 = 0x%x (%s)\n", x0, x3, x3 == 0x78 ? "bigendian" : "littleendian"); x0 = (u.l >> 24) & 0xff; x1 = (u.l >> 16) & 0xff; x2 = (u.l >> 8) & 0xff; x3 = u.l...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
254,971,518,625,055,440,000,000,000,000,000,000,000
19
commit bash-20120224 snapshot
static void cleanup_timers(struct list_head *head) { cleanup_timers_list(head); cleanup_timers_list(++head); cleanup_timers_list(++head); }
0
[ "CWE-190" ]
linux
78c9c4dfbf8c04883941445a195276bb4bb92c76
160,263,593,982,879,370,000,000,000,000,000,000,000
6
posix-timers: Sanitize overrun handling The posix timer overrun handling is broken because the forwarding functions can return a huge number of overruns which does not fit in an int. As a consequence timer_getoverrun(2) and siginfo::si_overrun can turn into random number generators. The k_clock::timer_forward() callb...
display_showcmd(void) { int len; cursor_off(); len = (int)STRLEN(showcmd_buf); if (len == 0) showcmd_is_clear = TRUE; else { screen_puts(showcmd_buf, (int)Rows - 1, sc_col, 0); showcmd_is_clear = FALSE; } // clear the rest of an old message by outputting up to SHOWCMD_COLS ...
0
[ "CWE-416" ]
vim
e2fa213cf571041dbd04ab0329303ffdc980678a
3,189,194,491,805,750,000,000,000,000,000,000,000
21
patch 8.2.5024: using freed memory with "]d" Problem: Using freed memory with "]d". Solution: Copy the pattern before searching.
static int simple_check_buf(struct usbtest_dev *tdev, struct urb *urb) { unsigned i; u8 expected; u8 *buf = urb->transfer_buffer; unsigned len = urb->actual_length; unsigned maxpacket = get_maxpacket(urb->dev, urb->pipe); int ret = check_guard_bytes(tdev, urb); if (ret) return ret; for (i = 0; i < len; i+...
0
[ "CWE-476" ]
linux
7c80f9e4a588f1925b07134bb2e3689335f6c6d8
103,973,262,594,843,700,000,000,000,000,000,000,000
38
usb: usbtest: fix NULL pointer dereference If the usbtest driver encounters a device with an IN bulk endpoint but no OUT bulk endpoint, it will try to dereference a NULL pointer (out->desc.bEndpointAddress). The problem can be solved by adding a missing test. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Rep...
parser_parse_tagged_template_literal (parser_context_t *context_p) /**< context */ { JERRY_ASSERT (context_p->token.type == LEXER_TEMPLATE_LITERAL); uint32_t call_arguments = 0; ecma_collection_t *collection_p; if (context_p->tagged_template_literal_cp == JMEM_CP_NULL) { collection_p = ecma_new_collecti...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
61,718,706,489,498,450,000,000,000,000,000,000,000
60
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
QPDFFormFieldObjectHelper::isNull() { return this->oh.isNull(); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
221,202,031,531,645,220,000,000,000,000,000,000,000
4
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 ...
//! Load image from a DLM file \newinstance. static CImg<T> get_load_dlm(const char *const filename) { return CImg<T>().load_dlm(filename);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
51,450,468,887,911,530,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static int prefer_mwait_c1_over_halt(const struct cpuinfo_x86 *c) { if (c->x86_vendor != X86_VENDOR_INTEL) return 0; if (!cpu_has(c, X86_FEATURE_MWAIT) || boot_cpu_has_bug(X86_BUG_MONITOR)) return 0; return 1; }
0
[]
linux
dbbe2ad02e9df26e372f38cc3e70dab9222c832e
300,553,678,733,822,900,000,000,000,000,000,000,000
10
x86/speculation: Prevent rogue cross-process SSBD shutdown On context switch the change of TIF_SSBD and TIF_SPEC_IB are evaluated to adjust the mitigations accordingly. This is optimized to avoid the expensive MSR write if not needed. This optimization is buggy and allows an attacker to shutdown the SSBD protection o...
static bool is_sector_request_lun_aligned(int64_t sector_num, int nb_sectors, IscsiLun *iscsilun) { assert(nb_sectors <= BDRV_REQUEST_MAX_SECTORS); return is_byte_request_lun_aligned(sector_num << BDRV_SECTOR_BITS, nb_sectors << BD...
0
[ "CWE-125" ]
qemu
ff0507c239a246fd7215b31c5658fc6a3ee1e4c5
262,682,472,201,653,120,000,000,000,000,000,000,000
8
block/iscsi:fix heap-buffer-overflow in iscsi_aio_ioctl_cb There is an overflow, the source 'datain.data[2]' is 100 bytes, but the 'ss' is 252 bytes.This may cause a security issue because we can access a lot of unrelated memory data. The len for sbp copy data should take the minimum of mx_sb_len and sb_len_wr, no...
static int close_connect_only(struct Curl_easy *data, struct connectdata *conn, void *param) { (void)param; if(data->state.lastconnect_id != conn->connection_id) return 0; if(!conn->bits.connect_only) return 1; connclose(conn, "Removing connect-only easy handle"); conn-...
0
[ "CWE-416", "CWE-295" ]
curl
7f4a9a9b2a49547eae24d2e19bc5c346e9026479
37,042,879,446,772,070,000,000,000,000,000,000,000
15
openssl: associate/detach the transfer from connection CVE-2021-22901 Bug: https://curl.se/docs/CVE-2021-22901.html
TEST_F(OwnedImplTest, LinearizeDrainTracking) { constexpr uint32_t SmallChunk = 200; constexpr uint32_t LargeChunk = 16384 - SmallChunk; constexpr uint32_t LinearizeSize = SmallChunk + LargeChunk; // Create a buffer with a eclectic combination of buffer OwnedSlice and UnownedSlices that will // help us explo...
0
[ "CWE-401" ]
envoy
5eba69a1f375413fb93fab4173f9c393ac8c2818
181,982,844,158,852,870,000,000,000,000,000,000,000
87
[buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144) Signed-off-by: antonio <avd@google.com>
LONG ValidateSignature(HWND hDlg, const char* path) { LONG r = TRUST_E_SYSTEM_ERROR; WINTRUST_DATA trust_data = { 0 }; WINTRUST_FILE_INFO trust_file = { 0 }; PF_TYPE_DECL(WINAPI, long, WinVerifyTrustEx, (HWND, GUID*, WINTRUST_DATA*)); PF_INIT(WinVerifyTrustEx, WinTrust); GUID guid_generic_verify = // WINTRUST_ACT...
0
[ "CWE-94" ]
rufus
19472668370aacec0dba9dda306601cfc4a4ed7e
277,363,723,060,616,900,000,000,000,000,000,000,000
96
[pki] don't link with wintrust.lib * WinTrust.lib is responsible for the MSASN1.dll sideloading issue described in #1877, so, since we only use it for WinVerifyTrustEx(), hook into that function manually. * Closes #1877 for the MinGW side. * Note that we will probably try to use the method suggested by @assarbad and...
void hashTypeConvert(robj *o, int enc) { if (o->encoding == OBJ_ENCODING_ZIPLIST) { hashTypeConvertZiplist(o, enc); } else if (o->encoding == OBJ_ENCODING_HT) { serverPanic("Not implemented"); } else { serverPanic("Unknown hash encoding"); } }
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
287,387,615,259,521,300,000,000,000,000,000,000,000
9
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 int f_midi_out_open(struct snd_rawmidi_substream *substream) { struct f_midi *midi = substream->rmidi->private_data; if (substream->number >= MAX_PORTS) return -EINVAL; VDBG(midi, "%s()\n", __func__); midi->out_substream[substream->number] = substream; return 0; }
0
[ "CWE-415" ]
linux
7fafcfdf6377b18b2a726ea554d6e593ba44349f
81,547,302,734,880,300,000,000,000,000,000,000,000
11
USB: gadget: f_midi: fixing a possible double-free in f_midi It looks like there is a possibility of a double-free vulnerability on an error path of the f_midi_set_alt function in the f_midi driver. If the path is feasible then free_ep_req gets called twice: req->complete = f_midi_complete; err = us...
explicit DelayedDelivery(Pipe *p) : pipe(p), delay_lock("Pipe::DelayedDelivery::delay_lock"), flush_count(0), active_flush(false), stop_delayed_delivery(false), delay_dispatching(false), stop_fast_dispatching_flag(false) { }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
5,047,567,395,218,260,500,000,000,000,000,000,000
7
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 add_sit_entry(unsigned int segno, struct list_head *head) { struct sit_entry_set *ses; unsigned int start_segno = START_SEGNO(segno); list_for_each_entry(ses, head, set_list) { if (ses->start_segno == start_segno) { ses->entry_cnt++; adjust_sit_entry_set(ses, head); return; } } ses = gra...
0
[ "CWE-20" ]
linux
638164a2718f337ea224b747cf5977ef143166a4
264,286,903,320,069,860,000,000,000,000,000,000,000
19
f2fs: fix potential panic during fstrim As Ju Hyung Park reported: "When 'fstrim' is called for manual trim, a BUG() can be triggered randomly with this patch. I'm seeing this issue on both x86 Desktop and arm64 Android phone. On x86 Desktop, this was caused during Ubuntu boot-up. I have a cronjob installed which c...
raid_disks_store(struct mddev *mddev, const char *buf, size_t len) { unsigned int n; int err; err = kstrtouint(buf, 10, &n); if (err < 0) return err; err = mddev_lock(mddev); if (err) return err; if (mddev->pers) err = update_raid_disks(mddev, n); else if (mddev->reshape_position != MaxSector) { struc...
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
294,133,463,353,868,170,000,000,000,000,000,000,000
37
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
static struct bitmap *find_objects(struct rev_info *revs, struct object_list *roots, struct bitmap *seen) { struct bitmap *base = NULL; int needs_walk = 0; struct object_list *not_mapped = NULL; /* * Go through all the roots for the walk. The ones that have bitmaps * on the bitmap index will be ...
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
139,978,082,105,934,940,000,000,000,000,000,000,000
95
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 ...
_XimProtoIMFree( Xim im) { /* XIMPrivateRec */ if (im->private.proto.im_onkeylist) { Xfree(im->private.proto.im_onkeylist); im->private.proto.im_onkeylist = NULL; } if (im->private.proto.im_offkeylist) { Xfree(im->private.proto.im_offkeylist); im->private.proto.im_offkeylist = NULL; } ...
0
[ "CWE-190" ]
libx11
1a566c9e00e5f35c1f9e7f3d741a02e5170852b2
291,820,474,759,634,400,000,000,000,000,000,000,000
116
Zero out buffers in functions It looks like uninitialized stack or heap memory can leak out via padding bytes. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
static struct dirent *vfswrap_readdir(vfs_handle_struct *handle, DIR *dirp, SMB_STRUCT_STAT *sbuf) { struct dirent *result; START_PROFILE(syscall_readdir); result = readdir(dirp); END_PROFILE(syscall_readdir); if (sbuf) { /* Default Posix readdir() does not give us stat info. * Set to in...
0
[ "CWE-665" ]
samba
30e724cbff1ecd90e5a676831902d1e41ec1b347
86,392,708,160,166,810,000,000,000,000,000,000,000
34
FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zero Otherwise num_volumes and the end marker can return uninitialized data to the client. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
Controller::constructHeaderForSessionProtocol(Request *req, char * restrict buffer, unsigned int &size, const SessionProtocolWorkingState &state, string delta_monotonic) { char *pos = buffer; const char *end = buffer + size; pos += sizeof(boost::uint32_t); pos = appendData(pos, end, P_STATIC_STRING_WITH_NULL("RE...
0
[ "CWE-20", "CWE-476" ]
passenger
ddb8ecc4ebf260e4967f57f271d4f5761abeac3e
158,234,307,156,545,910,000,000,000,000,000,000,000
153
Fix CVE-2015-7519 header collision vulnerability
static void mode_init_ov_sensor_regs(struct sd *sd) { struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; int qvga, xstart, xend, ystart, yend; u8 v; qvga = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].priv & 1; /******** Mode (VGA/QVGA) and sensor specific regs ********/ switch (sd->sensor) { case SEN_OV26...
0
[ "CWE-476" ]
linux
998912346c0da53a6dbb71fab3a138586b596b30
50,676,981,149,842,080,000,000,000,000,000,000,000
190
media: ov519: add missing endpoint sanity checks Make sure to check that we have at least one endpoint before accessing the endpoint array to avoid dereferencing a NULL-pointer on stream start. Note that these sanity checks are not redundant as the driver is mixing looking up altsettings by index and by number, which...
XML_SetDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end) { if (parser == NULL) return; parser->m_startDoctypeDeclHandler = start; parser->m_endDoctypeDeclHandler = end; }
0
[ "CWE-611", "CWE-776", "CWE-415", "CWE-125" ]
libexpat
c20b758c332d9a13afbbb276d30db1d183a85d43
222,031,077,707,102,700,000,000,000,000,000,000,000
7
xmlparse.c: Deny internal entities closing the doctype
debugPrintAll(void) { DEFiRet; dbgprintf("All Rulesets:\n"); llExecFunc(&llRulesets, doDebugPrintAll, NULL); dbgprintf("End of Rulesets.\n"); RETiRet; }
0
[ "CWE-772", "CWE-401" ]
rsyslog
1ef709cc97d54f74d3fdeb83788cc4b01f4c6a2a
91,355,168,263,177,050,000,000,000,000,000,000,000
8
bugfix: fixed a memory leak and potential abort condition this could happen if multiple rulesets were used and some output batches contained messages belonging to more than one ruleset. fixes: http://bugzilla.adiscon.com/show_bug.cgi?id=226 fixes: http://bugzilla.adiscon.com/show_bug.cgi?id=218
int mgr_log_level(p_fm_config_conx_hdlt hdl, fm_mgr_type_t mgr, int argc, char *argv[]) { fm_mgr_config_errno_t res; fm_msg_ret_code_t ret_code; uint32_t loglevel=0; if (mgr == FM_MGR_PM) { fprintf(stderr, "pmLogLevel:\n"); fprintf(stderr, "\tThis command is not supported any more. The logging of the\n")...
0
[ "CWE-362" ]
opa-fm
c5759e7b76f5bf844be6c6641cc1b356bbc83869
338,229,217,118,082,260,000,000,000,000,000,000,000
29
Fix scripts and code that use well-known tmp files.
deallocateCharacterClasses(TranslationTableHeader *table) { CharacterClass **classes = &table->characterClasses; while (*classes) { CharacterClass *class = *classes; *classes = (*classes)->next; if (class) free(class); } }
0
[ "CWE-787" ]
liblouis
2e4772befb2b1c37cb4b9d6572945115ee28630a
35,605,386,192,648,096,000,000,000,000,000,000,000
8
Prevent an invalid memory writes in compileRule Thanks to Han Zheng for reporting it Fixes #1214
static void sigalrm_handler(int sig __attribute__((unused))) { gotsigalrm = 1; }
0
[]
cyrus-imapd
602f12ed2af0a49ac4a58affbfea57d0fc23dea5
89,638,892,655,770,130,000,000,000,000,000,000,000
4
httpd.c: only allow reuse of auth creds on a persistent connection against a backend server in a Murder
const char *FS_LoadedPakPureChecksums( void ) { static char info[BIG_INFO_STRING]; searchpath_t *search; info[0] = 0; for ( search = fs_searchpaths ; search ; search = search->next ) { // is the element a pak file? if ( !search->pack ) { continue; } Q_strcat( info, sizeof( info ), va("%i ", search->p...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
319,707,917,807,574,400,000,000,000,000,000,000,000
17
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
PJ_DEF(pj_status_t) pjsip_rx_data_free_cloned(pjsip_rx_data *rdata) { PJ_ASSERT_RETURN(rdata, PJ_EINVAL); pjsip_transport_dec_ref(rdata->tp_info.transport); pj_pool_release(rdata->tp_info.pool); return PJ_SUCCESS; }
0
[ "CWE-297", "CWE-295" ]
pjproject
67e46c1ac45ad784db5b9080f5ed8b133c122872
252,705,311,642,688,860,000,000,000,000,000,000,000
9
Merge pull request from GHSA-8hcp-hm38-mfph * Check hostname during TLS transport selection * revision based on feedback * remove the code in create_request that has been moved
replace_pop_ins(void) { int cc; int oldState = State; State = MODE_NORMAL; // don't want MODE_REPLACE here while ((cc = replace_pop()) > 0) { mb_replace_pop_ins(cc); dec_cursor(); } State = oldState; }
0
[ "CWE-120" ]
vim
7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97
232,034,479,231,987,640,000,000,000,000,000,000,000
13
patch 8.2.4969: changing text in Visual mode may cause invalid memory access Problem: Changing text in Visual mode may cause invalid memory access. Solution: Check the Visual position after making a change.
set_ip_options(int sock_fd, int family, int flags) { #if defined(FEAT_IPV6) && defined(IPV6_V6ONLY) /* Receive only IPv6 packets on an IPv6 socket */ if (family == IPADDR_INET6 && !SCK_SetIntOption(sock_fd, IPPROTO_IPV6, IPV6_V6ONLY, 1)) return 0; #endif /* Provide destination address of received packets if ...
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
115,961,058,712,093,450,000,000,000,000,000,000,000
36
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
PlayerBase::PlayerTypes PlayerGeneric::getPreferredPlayerType(XModule* module) { if (module == NULL) return PlayerBase::PlayerType_INVALID; switch (module->getType()) { case XModule::ModuleType_669: case XModule::ModuleType_FAR: #ifndef MILKYTRACKER return PlayerBase::PlayerType_FAR; break; #endif c...
0
[ "CWE-416" ]
MilkyTracker
7afd55c42ad80d01a339197a2d8b5461d214edaf
307,710,794,873,357,350,000,000,000,000,000,000,000
54
Fix use-after-free in PlayerGeneric destructor
static void ipip6_tunnel_bind_dev(struct net_device *dev) { struct net_device *tdev = NULL; struct ip_tunnel *tunnel; const struct iphdr *iph; struct flowi4 fl4; tunnel = netdev_priv(dev); iph = &tunnel->parms.iph; if (iph->daddr) { struct rtable *rt = ip_route_output_ports(tunnel->net, &fl4, NULL, ...
0
[ "CWE-703", "CWE-772", "CWE-401" ]
linux
07f12b26e21ab359261bf75cfcb424fdc7daeb6d
73,880,693,193,661,130,000,000,000,000,000,000,000
38
net: sit: fix memory leak in sit_init_net() If register_netdev() is failed to register sitn->fb_tunnel_dev, it will go to err_reg_dev and forget to free netdev(sitn->fb_tunnel_dev). BUG: memory leak unreferenced object 0xffff888378daad00 (size 512): comm "syz-executor.1", pid 4006, jiffies 4295121142 (age 16.115s) ...
static bool start_new_rx_buffer(int offset, unsigned long size, int head) { /* simple case: we have completely filled the current buffer. */ if (offset == MAX_BUFFER_OFFSET) return true; /* * complex case: start a fresh buffer if the current frag * would overflow the current buffer but only if: * (i) ...
0
[ "CWE-399" ]
linux
7d5145d8eb2b9791533ffe4dc003b129b9696c48
56,849,519,628,620,670,000,000,000,000,000,000,000
34
xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop. Signed-off-by: Matthew Daley <mattjd@gmail.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jan Beulich <JBeulich@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static int phar_zip_applysignature(phar_archive_data *phar, struct _phar_zip_pass *pass, smart_str *metadata) /* {{{ */ { /* add signature for executable tars or tars explicitly set with setSignatureAlgorithm */ if (!phar->is_data || phar->sig_flags) { int signature_length; char *signature, sigbuf[8]; ph...
0
[ "CWE-119", "CWE-787" ]
php-src
0bfb970f43acd1e81d11be1154805f86655f15d5
34,655,018,977,749,650,000,000,000,000,000,000,000
76
Fix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile (cherry picked from commit 19484ab77466f99c78fc0e677f7e03da0584d6a2)
int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen) { int err; u8 *data; struct xfrm_mgr *km; struct xfrm_policy *pol = NULL; if (in_compat_syscall()) return -EOPNOTSUPP; if (!optval && !optlen) { xfrm_sk_policy_insert(sk, XFRM_POLICY_IN, NULL); xfrm_sk_policy_insert(sk, XFRM...
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
159,365,578,814,359,430,000,000,000,000,000,000,000
44
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
MagickExport ResampleFilter *DestroyResampleFilter( ResampleFilter *resample_filter) { assert(resample_filter != (ResampleFilter *) NULL); assert(resample_filter->signature == MagickCoreSignature); assert(resample_filter->image != (Image *) NULL); if (resample_filter->debug != MagickFalse) (void) LogMagic...
0
[ "CWE-369" ]
ImageMagick
8d25d94a363b104acd6ff23df7470aeedb806c51
289,676,394,133,202,430,000,000,000,000,000,000,000
18
https://github.com/ImageMagick/ImageMagick/issues/3195
slapi_pblock_get(Slapi_PBlock *pblock, int arg, void *value) { #ifdef PBLOCK_ANALYTICS pblock_analytics_record(pblock, arg); #endif char *authtype; Slapi_Backend *be; PR_ASSERT(NULL != pblock); PR_ASSERT(NULL != value); be = pblock->pb_backend; switch (arg) { #ifdef PBLOCK_ANALYTICS ...
0
[ "CWE-415" ]
389-ds-base
a3c298f8140d3e4fa1bd5a670f1bb965a21a9b7b
297,673,435,553,831,370,000,000,000,000,000,000,000
2,142
Issue 5218 - double-free of the virtual attribute context in persistent search (#5219) description: A search is processed by a worker using a private pblock. If the search is persistent, the worker spawn a thread and kind of duplicate its private pblock so that the spawn thread continue to process the p...
static int proc_get_capabilities(struct usb_dev_state *ps, void __user *arg) { __u32 caps; caps = USBDEVFS_CAP_ZERO_PACKET | USBDEVFS_CAP_NO_PACKET_SIZE_LIM | USBDEVFS_CAP_REAP_AFTER_DISCONNECT | USBDEVFS_CAP_MMAP | USBDEVFS_CAP_DROP_PRIVILEGES; if (!ps->dev->bus->no_stop_on_short) caps |= USBDEVFS_CAP_BULK...
0
[ "CWE-200" ]
linux
681fef8380eb818c0b845fca5d2ab1dcbab114ee
119,264,482,028,818,590,000,000,000,000,000,000,000
17
USB: usbfs: fix potential infoleak in devio The stack object “ci” has a total size of 8 bytes. Its last 3 bytes are padding bytes which are not initialized and leaked to userland via “copy_to_user”. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
LZWDecode(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) { static const char module[] = "LZWDecode"; LZWCodecState *sp = DecoderState(tif); char *op = (char*) op0; long occ = (long) occ0; char *tp; unsigned char *bp; hcode_t code; int len; long nbits, nextbits, nbitsmask; unsigned long nextdata; code...
0
[ "CWE-787" ]
libtiff
58a898cb4459055bb488ca815c23b880c242a27d
198,674,023,166,641,060,000,000,000,000,000,000,000
219
LZWDecodeCompat(): fix potential index-out-of-bounds write. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2780 / CVE-2018-8905 The fix consists in using the similar code LZWDecode() to validate we don't write outside of the output buffer.
int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu, struct kvm_mp_state *mp_state) { int ret = -EINVAL; vcpu_load(vcpu); if (!lapic_in_kernel(vcpu) && mp_state->mp_state != KVM_MP_STATE_RUNNABLE) goto out; /* * KVM_MP_STATE_INIT_RECEIVED means the processor is in * INIT state; latched i...
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
197,974,390,643,399,470,000,000,000,000,000,000,000
33
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
do_ecmd( int fnum, char_u *ffname, char_u *sfname, exarg_T *eap, // can be NULL! linenr_T newlnum, int flags, win_T *oldwin) { int other_file; // TRUE if editing another file int oldbuf; // TRUE if using existing buffer int auto_buf = FALSE; // TRUE if autocommands brou...
0
[ "CWE-787" ]
vim
e2bd8600b873d2cd1f9d667c28cba8b1dba18839
10,638,816,403,684,585,000,000,000,000,000,000,000
752
patch 8.2.4977: memory access error when substitute expression changes window Problem: Memory access error when substitute expression changes window. Solution: Disallow changing window in substitute expression.
static void smb_vfs_call_pread_done(struct tevent_req *subreq) { struct tevent_req *req = tevent_req_callback_data( subreq, struct tevent_req); struct smb_vfs_call_pread_state *state = tevent_req_data( req, struct smb_vfs_call_pread_state); int err; state->retval = state->recv_fn(subreq, &err); TALLOC_FREE(su...
0
[ "CWE-264" ]
samba
4278ef25f64d5fdbf432ff1534e275416ec9561e
24,634,265,220,566,767,000,000,000,000,000,000,000
16
CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share). Ensure matching component ends in '/' or '\0'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
DECLAREContigPutFunc(putcontig8bitYCbCr11tile) { (void) y; fromskew = (fromskew / 1) * (1 * 1 + 2); do { x = w; /* was x = w>>1; patched 2000/09/25 warmerda@home.com */ do { int32 Cb = pp[1]; int32 Cr = pp[2]; YCbCrtoRGB(*cp++, pp[0]); pp += 3; } while (--x); cp += toskew; pp += fromskew; } ...
0
[ "CWE-787" ]
libtiff
4bb584a35f87af42d6cf09d15e9ce8909a839145
131,995,839,457,214,150,000,000,000,000,000,000,000
18
RGBA interface: fix integer overflow potentially causing write heap buffer overflow, especially on 32 bit builds. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16443. Credit to OSS Fuzz
static CURLcode pop3_list(struct connectdata *conn) { CURLcode result = CURLE_OK; struct pop3_conn *pop3c = &conn->proto.pop3c; if(pop3c->mailbox[0] != '\0') result = Curl_pp_sendf(&conn->proto.pop3c.pp, "LIST %s", pop3c->mailbox); else result = Curl_pp_sendf(&conn->proto.pop3c.pp, "LIST"); if(result...
0
[ "CWE-89" ]
curl
75ca568fa1c19de4c5358fed246686de8467c238
167,092,992,046,531,050,000,000,000,000,000,000,000
18
URL sanitize: reject URLs containing bad data Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a decoded manner now use the new Curl_urldecode() function to reject URLs with embedded control codes (anything that is or decodes to a byte value less than 32). URLs containing such codes could easily oth...
keepalived_main(int argc, char **argv) { bool report_stopped = true; struct utsname uname_buf; char *end; /* Ensure time_now is set. We then don't have to check anywhere * else if it is set. */ set_time_now(); /* Save command line options in case need to log them later */ save_cmd_line_options(argc, argv); ...
1
[ "CWE-200" ]
keepalived
c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067
191,621,240,332,145,250,000,000,000,000,000,000,000
343
Add command line and configuration option to set umask Issue #1048 identified that files created by keepalived are created with mode 0666. This commit changes the default to 0644, and also allows the umask to be specified in the configuration or as a command line option. Signed-off-by: Quentin Armitage <quentin@armit...
int crypto_ahash_digest(struct ahash_request *req) { return crypto_ahash_op(req, crypto_ahash_reqtfm(req)->digest); }
0
[ "CWE-835" ]
linux
ef0579b64e93188710d48667cb5e014926af9f1b
275,533,719,308,030,350,000,000,000,000,000,000,000
4
crypto: ahash - Fix EINPROGRESS notification callback The ahash API modifies the request's callback function in order to clean up after itself in some corner cases (unaligned final and missing finup). When the request is complete ahash will restore the original callback and everything is fine. However, when the requ...
static void SVGError(void *context,const char *format,...) { char *message, reason[MaxTextExtent]; SVGInfo *svg_info; va_list operands; /* Display and format a error formats, gives file, line, position and extra parameters. */ va_start(operands,format); svg_info=(SVGInfo *) cont...
0
[ "CWE-125" ]
ImageMagick6
a5db4873626f702d2ddd8bc293573493e0a412c0
187,896,316,540,905,900,000,000,000,000,000,000,000
31
https://github.com/ImageMagick/ImageMagick/issues/1336
static void cuse_gendev_release(struct device *dev) { kfree(dev); }
0
[ "CWE-399" ]
linux
2c5816b4beccc8ba709144539f6fdd764f8fa49c
266,066,978,299,462,370,000,000,000,000,000,000,000
4
cuse: fix memory leak The problem is that fuse_dev_alloc() acquires an extra reference to cc.fc, and the original ref count is never dropped. Reported-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Fixes: cc080e9e9be1 ("fuse: introduce per-instance fuse_dev structure")...