func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
xfs_reclaim_inode( struct xfs_inode *ip, struct xfs_perag *pag, int sync_mode) { struct xfs_buf *bp = NULL; xfs_ino_t ino = ip->i_ino; /* for radix_tree_delete */ int error; restart: error = 0; xfs_ilock(ip, XFS_ILOCK_EXCL); if (!xfs_iflock_nowait(ip)) { if (!(sync_mode & SYNC_WAIT)) goto out; xf...
0
[ "CWE-476" ]
linux
afca6c5b2595fc44383919fba740c194b0b76aff
54,728,378,510,442,260,000,000,000,000,000,000,000
134
xfs: validate cached inodes are free when allocated A recent fuzzed filesystem image cached random dcache corruption when the reproducer was run. This often showed up as panics in lookup_slow() on a null inode->i_ops pointer when doing pathwalks. BUG: unable to handle kernel NULL pointer dereference at 00000000000000...
static inline struct ist htx_sl_p1(const struct htx_sl *sl) { return ist2(HTX_SL_P1_PTR(sl), HTX_SL_P1_LEN(sl)); }
0
[ "CWE-190" ]
haproxy
3b69886f7dcc3cfb3d166309018e6cfec9ce2c95
315,217,473,613,922,200,000,000,000,000,000,000,000
4
BUG/MAJOR: htx: fix missing header name length check in htx_add_header/trailer Ori Hollander of JFrog Security reported that htx_add_header() and htx_add_trailer() were missing a length check on the header name. While this does not allow to overwrite any memory area, it results in bits of the header name length to sli...
proto_tree_add_bitmask_list_value(proto_tree *tree, tvbuff_t *tvb, const guint offset, const int len, int * const *fields, const guint64 value) { if (tree) { proto_item_add_bitmask_tree(NULL, tvb, offset, len, -1, fields, BMT_NO_APPEND, FALSE, TRUE, tree, value); } }
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
329,374,163,863,924,100,000,000,000,000,000,000,000
8
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.
bool hex2bin(unsigned char *p, const char *hexstr, size_t len) { int nibble1, nibble2; unsigned char idx; bool ret = false; while (*hexstr && len) { if (unlikely(!hexstr[1])) { applog(LOG_ERR, "hex2bin str truncated"); return ret; } idx = *hexstr++; nibble1 = hex2bin_tbl[idx]; idx = *hexstr++; n...
0
[ "CWE-20", "CWE-703" ]
sgminer
910c36089940e81fb85c65b8e63dcd2fac71470c
287,977,293,857,907,000,000,000,000,000,000,000,000
30
stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime. Might have introduced a memory leak, don't have time to check. :( Should the other hex2bin()'s be checked? Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this.
static ssize_t sched_mc_power_savings_store(struct sys_device *dev, const char *buf, size_t count) { return sched_power_savings_store(buf, count, 0); }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
50,782,383,441,238,960,000,000,000,000,000,000,000
5
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
bool dwgReader18::readFileHeader() { if (! fileBuf->setPosition(0x80)) return false; // genMagicNumber(); DBG("\n"); DBG("\n"); DRW_DBG("Encrypted Header Data=\n"); duint8 byteStr[0x6C]; int size =0x6C; for (int i=0, j=0; i< 0x6C;i++) { duint8 ch = fileBuf->getRawChar8(); ...
1
[ "CWE-191" ]
libdxfrw
ba3fa95648bef948e008dfbdd31a4d21badd71f0
236,308,246,492,077,400,000,000,000,000,000,000,000
198
fixed out-of-bounds write vulnerability CVE-2021-21898 as reported in TALOS-2021-1349 / CVE-2021-21898, dwgCompressor::decompress18() could be abused with a malformed DWG file to force out-of-bounds write and possibly lead to malicious code execution.
int smb_vfs_call_open(struct vfs_handle_struct *handle, struct smb_filename *smb_fname, struct files_struct *fsp, int flags, mode_t mode) { VFS_FIND(open); return handle->fns->open_fn(handle, smb_fname, fsp, flags, mode); }
0
[ "CWE-264" ]
samba
4278ef25f64d5fdbf432ff1534e275416ec9561e
63,698,433,513,733,420,000,000,000,000,000,000,000
7
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>
void dump_mm(const struct mm_struct *mm) { pr_emerg("mm %px mmap %px seqnum %d task_size %lu\n" #ifdef CONFIG_MMU "get_unmapped_area %px\n" #endif "mmap_base %lu mmap_legacy_base %lu highest_vm_end %lu\n" "pgd %px mm_users %d mm_count %d pgtables_bytes %lu map_count %d\n" "hiwater_rss %lx hiwater_vm %lx total_...
1
[ "CWE-416" ]
linux
7a9cdebdcc17e426fb5287e4a82db1dfe86339b2
50,375,831,465,742,455,000,000,000,000,000,000,000
62
mm: get rid of vmacache_flush_all() entirely Jann Horn points out that the vmacache_flush_all() function is not only potentially expensive, it's buggy too. It also happens to be entirely unnecessary, because the sequence number overflow case can be avoided by simply making the sequence number be 64-bit. That doesn't...
QPDF::stopOnError(std::string const& message) { // Throw a generic exception when we lack context for something // more specific. New code should not use this. This method exists // to improve somewhat from calling assert in very old code. throw QPDFExc(qpdf_e_damaged_pdf, this->m->file->getName(), ...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
254,275,295,936,279,700,000,000,000,000,000,000,000
8
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 ...
void InstanceKlass::release_C_heap_structures() { // Can't release the constant pool here because the constant pool can be // deallocated separately from the InstanceKlass for default methods and // redefine classes. // Deallocate oop map cache if (_oop_map_cache != NULL) { delete _oop_map_cache; _oo...
0
[]
jdk11u-dev
41825fa33d605f8501164f9296572e4378e8183b
135,348,286,473,905,580,000,000,000,000,000,000,000
53
8270386: Better verification of scan methods Reviewed-by: mbaesken Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
udev_device_should_be_ignored(struct udev_device *udev_device) { const char *value; value = udev_device_get_property_value(udev_device, "LIBINPUT_IGNORE_DEVICE"); return value && !streq(value, "0"); }
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
126,041,995,474,837,490,000,000,000,000,000,000,000
9
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
static ssize_t ucma_query_route(struct ucma_file *file, const char __user *inbuf, int in_len, int out_len) { struct rdma_ucm_query cmd; struct rdma_ucm_query_route_resp resp; struct ucma_context *ctx; struct sockaddr *addr; int ret = 0; if (out_len < sizeof(resp)) return -ENOSPC; if (copy_from_user(&...
0
[ "CWE-416", "CWE-703" ]
linux
cb2595c1393b4a5211534e6f0a0fbad369e21ad8
47,267,952,962,882,080,000,000,000,000,000,000,000
50
infiniband: fix a possible use-after-free bug ucma_process_join() will free the new allocated "mc" struct, if there is any error after that, especially the copy_to_user(). But in parallel, ucma_leave_multicast() could find this "mc" through idr_find() before ucma_process_join() frees it, since it is already published...
tiffUnmapCallback(thandle_t handle, tdata_t data, toff_t length) { return; }
0
[ "CWE-125" ]
leptonica
5ba34b1fe741d69d43a6c8cf767756997eadd87c
126,941,321,016,077,730,000,000,000,000,000,000,000
6
Issue 23654 in oss-fuzz: Heap-buffer-overflow in pixReadFromTiffStream * Increase scanline buffer for reading gray+alpha and converting to RGBA
static float min() { return -FLT_MAX; }
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
128,011,495,143,092,530,000,000,000,000,000,000,000
1
Fix other issues in 'CImg<T>::load_bmp()'.
dirserv_orconn_tls_done(const tor_addr_t *addr, uint16_t or_port, const char *digest_rcvd) { node_t *node = NULL; tor_addr_port_t orport; routerinfo_t *ri = NULL; time_t now = time(NULL); tor_assert(addr); tor_assert(digest_rcvd); node = node_get_mutable_by...
0
[]
tor
02e05bd74dbec614397b696cfcda6525562a4675
41,842,341,768,113,833,000,000,000,000,000,000,000
39
When examining descriptors as a dirserver, reject ones with bad versions This is an extra fix for bug 21278: it ensures that these descriptors and platforms will never be listed in a legit consensus.
static u32 esp6_get_mtu(struct xfrm_state *x, int mtu) { struct esp_data *esp = x->data; u32 blksize = ALIGN(crypto_aead_blocksize(esp->aead), 4); u32 align = max_t(u32, blksize, esp->padlen); u32 rem; mtu -= x->props.header_len + crypto_aead_authsize(esp->aead); rem = mtu & (align - 1); mtu &= ~(align - 1); ...
0
[ "CWE-16" ]
linux-2.6
920fc941a9617f95ccb283037fe6f8a38d95bb69
191,976,841,145,147,470,000,000,000,000,000,000,000
19
[ESP]: Ensure IV is in linear part of the skb to avoid BUG() due to OOB access ESP does not account for the IV size when calling pskb_may_pull() to ensure everything it accesses directly is within the linear part of a potential fragment. This results in a BUG() being triggered when the both the IPv4 and IPv6 ESP stack...
connection_handle_read_post_cq_compact (chunkqueue * const cq) { /* combine first mem chunk with next non-empty mem chunk * (loop if next chunk is empty) */ chunk *c = cq->first; if (NULL == c) return 0; const uint32_t mlen = buffer_string_length(c->mem) - (size_t)c->offset; while ((c = c->next...
0
[ "CWE-703" ]
lighttpd1.4
b03b86f47b0d5a553137f081fadc482b4af1372d
254,687,059,693,772,220,000,000,000,000,000,000,000
15
[core] fix merging large headers across mult reads (fixes #3059) (thx mitd) x-ref: "Connections stuck in Close_Wait causing 100% cpu usage" https://redmine.lighttpd.net/issues/3059
xrdp_mm_sync_load(long param1, long param2) { long rv; char* libname; libname = (char*)param1; rv = g_load_library(libname); return rv; }
0
[]
xrdp
d8f9e8310dac362bb9578763d1024178f94f4ecc
158,427,788,883,246,730,000,000,000,000,000,000,000
9
move temp files from /tmp to /tmp/.xrdp
static int s390_fpregs_get(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf) { if (target == current) { save_fp_ctl(&target->thread.fp_regs.fpc); save_fp_regs(target->thread.fp_regs.fprs); } return user_regset_copyout(&...
0
[ "CWE-264", "CWE-269" ]
linux
dab6cf55f81a6e16b8147aed9a843e1691dcd318
17,129,788,145,931,416,000,000,000,000,000,000,000
12
s390/ptrace: fix PSW mask check The PSW mask check of the PTRACE_POKEUSR_AREA command is incorrect. The PSW_MASK_USER define contains the PSW_MASK_ASC bits, the ptrace interface accepts all combinations for the address-space-control bits. To protect the kernel space the PSW mask check in ptrace needs to reject the add...
static int process_cpu_clock_getres(const clockid_t which_clock, struct timespec *tp) { return posix_cpu_clock_getres(PROCESS_CLOCK, tp); }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
104,427,142,132,252,700,000,000,000,000,000,000,000
5
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
void reds_on_client_semi_seamless_migrate_complete(RedsState *reds, RedClient *client) { MainChannelClient *mcc; spice_debug("%p", client); mcc = client->get_main(); // TODO: not doing net test. consider doing it on client_migrate_info mcc->push_init(reds->qxl_instances.size(), reds->mouse_mode, ...
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
227,235,587,260,770,500,000,000,000,000,000,000,000
15
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file, bool isdir) { struct fuse_open_out outarg; struct fuse_file *ff; int err; int opcode = isdir ? FUSE_OPENDIR : FUSE_OPEN; ff = fuse_file_alloc(fc); if (!ff) return -ENOMEM; err = fuse_send_open(fc, nodeid, file, opcode, &outarg); if (er...
0
[]
linux-2.6
0bd87182d3ab18a32a8e9175d3f68754c58e3432
234,791,511,539,770,720,000,000,000,000,000,000,000
28
fuse: fix kunmap in fuse_ioctl_copy_user Looks like another victim of the confusing kmap() vs kmap_atomic() API differences. Reported-by: Todor Gyumyushev <yodor1@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Tejun Heo <tj@kernel.org> Cc: stable@kern...
static int sctp_setsockopt_delayed_ack(struct sock *sk, char __user *optval, unsigned int optlen) { struct sctp_sack_info params; struct sctp_transport *trans = NULL; struct sctp_association *asoc = NULL; struct sctp_sock *sp = sctp_sk(sk); if (optlen == sizeof(struct sctp_sack_info)) { i...
0
[ "CWE-617", "CWE-362" ]
linux
2dcab598484185dea7ec22219c76dcdd59e3cb90
156,234,082,536,652,700,000,000,000,000,000,000,000
98
sctp: avoid BUG_ON on sctp_wait_for_sndbuf Alexander Popov reported that an application may trigger a BUG_ON in sctp_wait_for_sndbuf if the socket tx buffer is full, a thread is waiting on it to queue more data and meanwhile another thread peels off the association being used by the first thread. This patch replaces ...
xfs_test_remount_options( struct super_block *sb, char *options) { int error = 0; struct xfs_mount *tmp_mp; tmp_mp = kmem_zalloc(sizeof(*tmp_mp), KM_MAYFAIL); if (!tmp_mp) return -ENOMEM; tmp_mp->m_super = sb; error = xfs_parseargs(tmp_mp, options); xfs_free_fsname(tmp_mp); kmem_free(tmp_mp); return...
0
[ "CWE-416" ]
linux
c9fbd7bbc23dbdd73364be4d045e5d3612cf6e82
222,074,395,044,159,040,000,000,000,000,000,000,000
18
xfs: clear sb->s_fs_info on mount failure We recently had an oops reported on a 4.14 kernel in xfs_reclaim_inodes_count() where sb->s_fs_info pointed to garbage and so the m_perag_tree lookup walked into lala land. Essentially, the machine was under memory pressure when the mount was being run, xfs_fs_fill_super() fa...
static int ip6_forward_proxy_check(struct sk_buff *skb) { struct ipv6hdr *hdr = ipv6_hdr(skb); u8 nexthdr = hdr->nexthdr; int offset; if (ipv6_ext_hdr(nexthdr)) { offset = ipv6_skip_exthdr(skb, sizeof(*hdr), &nexthdr); if (offset < 0) return 0; } else offset = sizeof(struct ipv6hdr); if (nexthdr == IPP...
0
[ "CWE-703" ]
linux
87c48fa3b4630905f98268dde838ee43626a060c
195,043,655,762,327,400,000,000,000,000,000,000,000
50
ipv6: make fragment identifications less predictable IPv6 fragment identification generation is way beyond what we use for IPv4 : It uses a single generator. Its not scalable and allows DOS attacks. Now inetpeer is IPv6 aware, we can use it to provide a more secure and scalable frag ident generator (per destination, ...
mbed_connect_step3(struct Curl_easy *data, struct connectdata *conn, int sockindex) { CURLcode retcode = CURLE_OK; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; struct ssl_backend_data *backend = connssl->backend; DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); if(SSL...
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
222,877,430,547,505,030,000,000,000,000,000,000,000
51
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
static void ext4_mb_mark_free_simple(struct super_block *sb, void *buddy, ext4_grpblk_t first, ext4_grpblk_t len, struct ext4_group_info *grp) { struct ext4_sb_info *sbi = EXT4_SB(sb); ext4_grpblk_t min; ext4_grpblk_t max; ext4_grpblk_t chunk; unsigned int border; BUG_ON(len > EXT4_CLUSTERS_PER_GROUP(sb...
0
[ "CWE-416" ]
linux
8844618d8aa7a9973e7b527d038a2a589665002c
106,834,230,626,175,670,000,000,000,000,000,000,000
35
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...
bool WireFormat::ParseAndMergeMessageSetField(uint32_t field_number, const FieldDescriptor* field, Message* message, io::CodedInputStream* input) { const Reflection* message_reflec...
0
[ "CWE-703" ]
protobuf
d1635e1496f51e0d5653d856211e8821bc47adc4
32,564,256,162,248,420,000,000,000,000,000,000,000
21
Apply patch
bool IsNumpyHalf(PyObject* obj) { return PyIsInstance(obj, &PyHalfArrType_Type); }
0
[ "CWE-20", "CWE-476" ]
tensorflow
5ac1b9e24ff6afc465756edf845d2e9660bd34bf
135,182,860,121,414,700,000,000,000,000,000,000,000
3
Fix segfault when attempting to convert string to float16. To make sure this gets fixed, add test for converting string to any numeric type. PiperOrigin-RevId: 286650886 Change-Id: I81f770ec2bbd33a863e8057ce198c679912fa8e0
xfs_attr_shortform_getvalue(xfs_da_args_t *args) { xfs_attr_shortform_t *sf; xfs_attr_sf_entry_t *sfe; int i; ASSERT(args->dp->i_afp->if_flags == XFS_IFINLINE); sf = (xfs_attr_shortform_t *)args->dp->i_afp->if_u1.if_data; sfe = &sf->list[0]; for (i = 0; i < sf->hdr.count; sfe = XFS_ATTR_SF_NEXTENTRY(sfe), i...
0
[ "CWE-476" ]
linux
bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a
250,652,225,664,202,960,000,000,000,000,000,000,000
32
xfs: don't call xfs_da_shrink_inode with NULL bp xfs_attr3_leaf_create may have errored out before instantiating a buffer, for example if the blkno is out of range. In that case there is no work to do to remove it, and in fact xfs_da_shrink_inode will lead to an oops if we try. This also seems to fix a flaw where th...
rsRetVal msgQueryInterface(void) { return RS_RET_NOT_IMPLEMENTED; }
0
[ "CWE-772" ]
rsyslog
8083bd1433449fd2b1b79bf759f782e0f64c0cd2
176,676,777,351,193,400,000,000,000,000,000,000,000
1
backporting abort condition fix from 5.7.7
void mce_setup(struct mce *m) { memset(m, 0, sizeof(struct mce)); m->cpu = m->extcpu = smp_processor_id(); /* We hope get_seconds stays lockless */ m->time = get_seconds(); m->cpuvendor = boot_cpu_data.x86_vendor; m->cpuid = cpuid_eax(1); m->socketid = cpu_data(m->extcpu).phys_proc_id; m->apicid = cpu_data(m->e...
0
[ "CWE-362" ]
linux
b3b7c4795ccab5be71f080774c45bbbcc75c2aaf
162,137,238,635,175,970,000,000,000,000,000,000,000
17
x86/MCE: Serialize sysfs changes The check_interval file in /sys/devices/system/machinecheck/machinecheck<cpu number> directory is a global timer value for MCE polling. If it is changed by one CPU, mce_restart() broadcasts the event to other CPUs to delete and restart the MCE polling timer and __mcheck_cpu_init_ti...
nfs4_open_revalidate(struct inode *dir, struct dentry *dentry, int openflags, struct nameidata *nd) { struct path path = { .mnt = nd->path.mnt, .dentry = dentry, }; struct rpc_cred *cred; struct nfs4_state *state; fmode_t fmode = openflags & (FMODE_READ | FMODE_WRITE); cred = rpc_lookup_cred(); if (IS_ERR(c...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
194,467,884,052,949,470,000,000,000,000,000,000,000
38
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static inline bool is_slave_direction(enum dma_transfer_direction direction) { return (direction == DMA_MEM_TO_DEV) || (direction == DMA_DEV_TO_MEM); }
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
13,638,227,979,862,110,000,000,000,000,000,000,000
4
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...
static OPJ_BOOL bmp_read_rle8_data(FILE* IN, OPJ_UINT8* pData, OPJ_UINT32 stride, OPJ_UINT32 width, OPJ_UINT32 height) { OPJ_UINT32 x, y; OPJ_UINT8 *pix; const OPJ_UINT8 *beyond; beyond = pData + stride * height; pix = pData; x = y = 0U; while (y < height) { int c = getc(IN); if (c) { int j; OP...
0
[ "CWE-703", "CWE-125" ]
openjpeg
15f081c89650dccee4aa4ae66f614c3fdb268767
329,800,992,912,237,940,000,000,000,000,000,000,000
55
Fix Out-Of-Bounds Read in sycc42x_to_rgb function (#745) 42x Images with an odd x0/y0 lead to subsampled component starting at the 2nd column/line. That is offset = comp->dx * comp->x0 - image->x0 = 1 Fix #726
void exec_status_dump(const ExecStatus *s, FILE *f, const char *prefix) { char buf[FORMAT_TIMESTAMP_MAX]; assert(s); assert(f); if (s->pid <= 0) return; prefix = strempty(prefix); fprintf(f, "%sPID: "PID_FMT"\n", prefix,...
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
165,974,494,224,937,630,000,000,000,000,000,000,000
29
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
static void drop_sysctl_table(struct ctl_table_header *header) { struct ctl_dir *parent = header->parent; if (--header->nreg) return; put_links(header); start_unregistering(header); if (!--header->count) kfree_rcu(header, rcu); if (parent) drop_sysctl_table(&parent->header); }
1
[ "CWE-476" ]
linux
23da9588037ecdd4901db76a5b79a42b529c4ec3
159,461,115,907,145,170,000,000,000,000,000,000,000
15
fs/proc/proc_sysctl.c: fix NULL pointer dereference in put_links Syzkaller reports: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN PTI CPU: 1 PID: 5373 Comm: syz-executor.0 Not tainted 5.0.0-rc8+ #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996)...
sym_swapcase(VALUE sym) { return rb_str_intern(rb_str_swapcase(rb_id2str(SYM2ID(sym)))); }
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
225,381,412,667,699,070,000,000,000,000,000,000,000
4
* string.c (rb_str_justify): CVE-2009-4124. Fixes a bug reported by Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London; Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static void burl_normalize_qs20_to_plus (buffer *b, int qs) { const char * const s = b->ptr; const int used = qs < 0 ? 0 : (int)buffer_string_length(b); int i; if (qs < 0) return; for (i = qs+1; i < used; ++i) { if (s[i] == '%' && s[i+1] == '2' && s[i+2] == '0') break; } if (i != use...
0
[ "CWE-190" ]
lighttpd1.4
32120d5b8b3203fc21ccb9eafb0eaf824bb59354
264,348,630,205,717,570,000,000,000,000,000,000,000
11
[core] fix abort in http-parseopts (fixes #2945) fix abort in server.http-parseopts with url-path-2f-decode enabled (thx stze) x-ref: "Security - SIGABRT during GET request handling with url-path-2f-decode enabled" https://redmine.lighttpd.net/issues/2945
mysql_refresh(MYSQL *mysql,uint options) { uchar bits[1]; DBUG_ENTER("mysql_refresh"); bits[0]= (uchar) options; DBUG_RETURN(simple_command(mysql, COM_REFRESH, bits, 1, 0)); }
0
[]
mysql-server
3d8134d2c9b74bc8883ffe2ef59c168361223837
72,883,765,491,853,150,000,000,000,000,000,000,000
7
Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE() Description: If mysql_stmt_close() encountered error, it recorded error in prepared statement but then frees memory assigned to prepared statement. If mysql_stmt_error() is used to get error information, it will resu...
void jpc_tagtree_setvalue(jpc_tagtree_t *tree, jpc_tagtreenode_t *leaf, int value) { jpc_tagtreenode_t *node; /* Avoid compiler warnings about unused parameters. */ tree = 0; assert(value >= 0); node = leaf; while (node && node->value_ > value) { node->value_ = value; node = node->parent_; } }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
171,921,017,682,294,400,000,000,000,000,000,000,000
16
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
void license_generate_randoms(rdpLicense* license) { #ifdef LICENSE_NULL_CLIENT_RANDOM ZeroMemory(license->ClientRandom, CLIENT_RANDOM_LENGTH); /* ClientRandom */ #else winpr_RAND(license->ClientRandom, CLIENT_RANDOM_LENGTH); /* ClientRandom */ #endif #ifdef LICENSE_NULL_PREMASTER_SECRET ZeroMemory(license->P...
0
[ "CWE-125" ]
FreeRDP
6ade7b4cbfd71c54b3d724e8f2d6ac76a58e879a
45,863,649,747,680,450,000,000,000,000,000,000,000
14
Fixed OOB Read in license_read_new_or_upgrade_license_packet CVE-2020-11099 thanks to @antonio-morales for finding this.
static void hw_scan_work(struct work_struct *work) { struct mac80211_hwsim_data *hwsim = container_of(work, struct mac80211_hwsim_data, hw_scan.work); struct cfg80211_scan_request *req = hwsim->hw_scan_request; int dwell, i; mutex_lock(&hwsim->mutex); if (hwsim->scan_chan_idx >= req->n_channels) { struct cfg8...
0
[ "CWE-703", "CWE-772" ]
linux
0ddcff49b672239dda94d70d0fcf50317a9f4b51
112,801,821,166,363,440,000,000,000,000,000,000,000
67
mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl() 'hwname' is malloced in hwsim_new_radio_nl() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length") Signed-off-by: Wei Yongjun <we...
static int ext4_li_info_new(void) { struct ext4_lazy_init *eli = NULL; eli = kzalloc(sizeof(*eli), GFP_KERNEL); if (!eli) return -ENOMEM; eli->li_task = NULL; INIT_LIST_HEAD(&eli->li_request_list); mutex_init(&eli->li_list_mtx); init_waitqueue_head(&eli->li_wait_daemon); init_waitqueue_head(&eli->li_wait_t...
0
[ "CWE-703" ]
linux
0449641130f5652b344ef6fa39fa019d7e94660a
249,407,198,707,257,670,000,000,000,000,000,000,000
21
ext4: init timer earlier to avoid a kernel panic in __save_error_info During mount, when we fail to open journal inode or root inode, the __save_error_info will mod_timer. But actually s_err_report isn't initialized yet and the kernel oops. The detailed information can be found https://bugzilla.kernel.org/show_bug.cgi...
Header::name() { return typedAttribute <StringAttribute> ("name").value(); }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
123,844,897,810,877,120,000,000,000,000,000,000,000
4
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
JVM_CurrentLoadedClass(JNIEnv *env) { jobject result; Trc_SC_CurrentLoadedClass_Entry(env); result = (*env)->CallStaticObjectMethod(env, jlClass, currentLoadedClassMID); /* CMVC 95169: ensure that the result is a well defined error value if an exception occurred */ if ((*env)->ExceptionCheck(env)) { result = ...
0
[ "CWE-119" ]
openj9
0971f22d88f42cf7332364ad7430e9bd8681c970
328,509,426,012,360,700,000,000,000,000,000,000,000
17
Clean up jio_snprintf and jio_vfprintf Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659 Signed-off-by: Peter Bain <peter_bain@ca.ibm.com>
void createSyncMockAuthsAndVerifier(const StatusMap& statuses) { for (const auto& it : statuses) { auto mock_auth = std::make_unique<MockAuthenticator>(); EXPECT_CALL(*mock_auth, doVerify(_, _, _, _, _)) .WillOnce(Invoke([issuer = it.first, status = it.second]( ...
0
[ "CWE-303", "CWE-703" ]
envoy
ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a
206,307,015,757,815,600,000,000,000,000,000,000,000
18
jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194) [jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ...
static unsigned int bsg_poll(struct file *file, poll_table *wait) { struct bsg_device *bd = file->private_data; unsigned int mask = 0; poll_wait(file, &bd->wq_done, wait); poll_wait(file, &bd->wq_free, wait); spin_lock_irq(&bd->lock); if (!list_empty(&bd->done_list)) mask |= POLLIN | POLLRDNORM; if (bd->queu...
0
[ "CWE-399" ]
linux-2.6
f2f1fa78a155524b849edf359e42a3001ea652c0
157,881,654,187,639,960,000,000,000,000,000,000,000
17
Enforce a minimum SG_IO timeout There's no point in having too short SG_IO timeouts, since if the command does end up timing out, we'll end up through the reset sequence that is several seconds long in order to abort the command that timed out. As a result, shorter timeouts than a few seconds simply do not make sense...
vmxnet3_is_registered_vlan(VMXNET3State *s, const void *data) { uint16_t vlan_tag = eth_get_pkt_tci(data) & VLAN_VID_MASK; if (IS_SPECIAL_VLAN_ID(vlan_tag)) { return true; } return VMXNET3_VFTABLE_ENTRY_IS_SET(s->vlan_table, vlan_tag); }
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
237,059,480,734,064,980,000,000,000,000,000,000,000
9
net/vmxnet3: Refine l2 header validation Validation of l2 header length assumed minimal packet size as eth_header + 2 * vlan_header regardless of the actual protocol. This caused crash for valid non-IP packets shorter than 22 bytes, as 'tx_pkt->packet_type' hasn't been assigned for such packets, and 'vmxnet3_on_tx_do...
OkToChangeTag(TIFF* tif, uint32 tag) { const TIFFField* fip = TIFFFindField(tif, tag, TIFF_ANY); if (!fip) { /* unknown tag */ TIFFErrorExt(tif->tif_clientdata, "TIFFSetField", "%s: Unknown %stag %u", tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "", tag); return (0); } if (tag != TIFFTAG_IMAGELENGTH &&...
0
[ "CWE-20" ]
libtiff
3144e57770c1e4d26520d8abee750f8ac8b75490
117,750,931,534,017,970,000,000,000,000,000,000,000
23
* libtiff/tif_dir.c, tif_dirread.c, tif_dirwrite.c: implement various clampings of double to other data types to avoid undefined behaviour if the output range isn't big enough to hold the input value. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2643 http://bugzilla.maptools.org/show_bug.cgi?id=2642 http://bugzil...
gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) { GstCaps *caps; guint avail; GstFlowReturn res = GST_FLOW_OK; GstFlxDec *flxdec; FlxHeader *flxh; g_return_val_if_fail (buf != NULL, GST_FLOW_ERROR); flxdec = (GstFlxDec *) parent; g_return_val_if_fail (flxdec != NULL, GST_FLOW_ERRO...
0
[ "CWE-125" ]
gst-plugins-good
b31c504645a814c59d91d49e4fe218acaf93f4ca
198,753,825,564,039,900,000,000,000,000,000,000,000
173
flxdec: Don't unref() parent in the chain function We don't own the reference here, it is owned by the caller and given to us for the scope of this function. Leftover mistake from 0.10 porting. https://bugzilla.gnome.org/show_bug.cgi?id=774897
unsigned long recover_probed_instruction(kprobe_opcode_t *buf, unsigned long addr) { unsigned long __addr; __addr = __recover_optprobed_insn(buf, addr); if (__addr != addr) return __addr; return __recover_probed_insn(buf, addr); }
0
[ "CWE-264" ]
linux
548acf19234dbda5a52d5a8e7e205af46e9da840
67,996,347,398,795,390,000,000,000,000,000,000,000
10
x86/mm: Expand the exception table logic to allow new handling options Huge amounts of help from Andy Lutomirski and Borislav Petkov to produce this. Andy provided the inspiration to add classes to the exception table with a clever bit-squeezing trick, Boris pointed out how much cleaner it would all be if we just had...
fr_window_view_last_output (FrWindow *window, const char *title) { GtkWidget *dialog; GtkWidget *vbox; GtkWidget *text_view; GtkWidget *scrolled; GtkTextBuffer *text_buffer; GtkTextIter iter; GList *scan; if (title == NULL) title = _("Last Output"); dialog = gtk_dialog_n...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
194,120,148,935,190,130,000,000,000,000,000,000,000
93
libarchive: sanitize filenames before extracting
void (*SSL_CTX_get_info_callback(SSL_CTX *ctx)) (const SSL *ssl, int type, int val) { return ctx->info_callback; }
0
[ "CWE-362" ]
openssl
939b4960276b040fc0ed52232238fcc9e2e9ec21
144,455,963,420,671,600,000,000,000,000,000,000,000
4
Fix race condition in NewSessionTicket If a NewSessionTicket is received by a multi-threaded client when attempting to reuse a previous ticket then a race condition can occur potentially leading to a double free of the ticket data. CVE-2015-1791 This also fixes RT#3808 where a session ID is changed for a session alr...
static long __video_do_ioctl(struct file *file, unsigned int cmd, void *arg) { struct video_device *vfd = video_devdata(file); struct mutex *req_queue_lock = NULL; struct mutex *lock; /* ioctl serialization mutex */ const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops; bool write_only = false; struct v4l2_ioctl_in...
0
[ "CWE-401" ]
linux
fb18802a338b36f675a388fc03d2aa504a0d0899
163,122,289,821,129,460,000,000,000,000,000,000,000
107
media: v4l: ioctl: Fix memory leak in video_usercopy When an IOCTL with argument size larger than 128 that also used array arguments were handled, two memory allocations were made but alas, only the latter one of them was released. This happened because there was only a single local variable to hold such a temporary a...
xsltApplyStylesheet(xsltStylesheetPtr style, xmlDocPtr doc, const char **params) { return (xsltApplyStylesheetInternal(style, doc, params, NULL, NULL, NULL)); }
0
[]
libxslt
937ba2a3eb42d288f53c8adc211bd1122869f0bf
323,920,614,848,006,900,000,000,000,000,000,000,000
5
Fix default template processing on namespace nodes
virDomainHostdevMatchCapsNet(virDomainHostdevDefPtr a, virDomainHostdevDefPtr b) { return STREQ_NULLABLE(a->source.caps.u.net.ifname, b->source.caps.u.net.ifname); }
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
293,496,471,156,916,780,000,000,000,000,000,000,000
6
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
static int selinux_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc) { u32 size; int error; char *context = NULL; struct inode_security_struct *isec = inode->i_security; if (strcmp(name, XATTR_SELINUX_SUFFIX)) return -EOPNOTSUPP; /* * If the caller has CAP_MAC_ADMIN, ...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
287,551,253,559,099,500,000,000,000,000,000,000,000
37
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
static int tg3_change_mtu(struct net_device *dev, int new_mtu) { struct tg3 *tp = netdev_priv(dev); int err, reset_phy = 0; if (new_mtu < TG3_MIN_MTU || new_mtu > TG3_MAX_MTU(tp)) return -EINVAL; if (!netif_running(dev)) { /* We'll just catch it later when the * device is up'd. */ tg3_set_mtu(dev, tp,...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
281,929,275,052,837,440,000,000,000,000,000,000,000
44
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 ...
static void warn_if_datadir_altered(THD *thd, const partition_element *part_elem) { DBUG_ASSERT(part_elem); if (part_elem->engine_type && part_elem->engine_type->db_type != DB_TYPE_INNODB) return; if (part_elem->data_file_name) { push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
121,974,390,538,551,400,000,000,000,000,000,000,000
24
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.
int snd_timer_new(struct snd_card *card, char *id, struct snd_timer_id *tid, struct snd_timer **rtimer) { struct snd_timer *timer; int err; static struct snd_device_ops ops = { .dev_free = snd_timer_dev_free, .dev_register = snd_timer_dev_register, .dev_disconnect = snd_timer_dev_disconnect, }; if (snd_...
0
[ "CWE-416", "CWE-703" ]
linux
e7af6307a8a54f0b873960b32b6a644f2d0fbd97
108,964,070,418,821,620,000,000,000,000,000,000,000
51
ALSA: timer: Fix incorrectly assigned timer instance The clean up commit 41672c0c24a6 ("ALSA: timer: Simplify error path in snd_timer_open()") unified the error handling code paths with the standard goto, but it introduced a subtle bug: the timer instance is stored in snd_timer_open() incorrectly even if it returns an...
int u_init_compressed_inmemory_website_config(struct _u_compressed_inmemory_website_config * config) { int ret = U_OK; pthread_mutexattr_t mutexattr; if (config != NULL) { config->files_path = NULL; config->url_prefix = NULL; config->redirect_on_404 = NULL; ...
0
[ "CWE-269", "CWE-22" ]
glewlwyd
e3f7245c33897bf9b3a75acfcdb8b7b93974bf11
302,206,093,060,883,360,000,000,000,000,000,000,000
32
Fix file access check for directory traversal, and fix call for callback_static_file_uncompressed if header not set
hfs_make_badblockfile(HFS_INFO * hfs, TSK_FS_FILE * fs_file) { TSK_FS_ATTR *fs_attr; unsigned char dummy1, dummy2; uint64_t dummy3; uint8_t result; if (tsk_verbose) tsk_fprintf(stderr, "hfs_make_badblockfile: Making virtual badblock file\n"); if (hfs_make_specialbase(fs_fil...
0
[ "CWE-190", "CWE-284" ]
sleuthkit
114cd3d0aac8bd1aeaf4b33840feb0163d342d5b
274,357,770,929,082,470,000,000,000,000,000,000,000
65
hfs: fix keylen check in hfs_cat_traverse() If key->key_len is 65535, calculating "uint16_t keylen' would cause an overflow: uint16_t keylen; ... keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len) so the code bypasses the sanity check "if (keylen > nodesize)" which results in crash later: ./too...
nsim_bpf_verify_insn(struct bpf_verifier_env *env, int insn_idx, int prev_insn) { struct nsim_bpf_bound_prog *state; int ret = 0; state = env->prog->aux->offload->dev_priv; if (state->nsim_dev->bpf_bind_verifier_delay && !insn_idx) msleep(state->nsim_dev->bpf_bind_verifier_delay); if (insn_idx == env->prog->le...
0
[]
net
481221775d53d6215a6e5e9ce1cce6d2b4ab9a46
116,010,802,853,077,320,000,000,000,000,000,000,000
18
netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc Zero-initialize memory for new map's value in function nsim_bpf_map_alloc since it may cause a potential kernel information leak issue, as follows: 1. nsim_bpf_map_alloc calls nsim_map_alloc_elem to allocate elements for a new map. 2....
dict_spot_params(const ref * pdict, gs_spot_halftone * psp, ref * psproc, ref * ptproc, gs_memory_t *mem) { int code; check_dict_read(*pdict); if ((code = dict_float_param(pdict, "Frequency", 0.0, &psp->screen.frequency)) != 0 || (code = dict_float_...
0
[]
ghostpdl
f5c7555c30393e64ec1f5ab0dfae5b55b3b3fc78
319,117,518,936,298,320,000,000,000,000,000,000,000
22
Bug 697203: check for sufficient params in .sethalftone5 and param types
bgp_apply_next_hop(struct bgp_parse_state *s, rta *a, ip_addr gw, ip_addr ll) { struct bgp_proto *p = s->proto; struct bgp_channel *c = s->channel; if (c->cf->gw_mode == GW_DIRECT) { neighbor *nbr = NULL; /* GW_DIRECT -> single_hop -> p->neigh != NULL */ if (ipa_nonzero(gw)) nbr = neigh_find...
0
[ "CWE-787" ]
bird
8388f5a7e14108a1458fea35bfbb5a453e2c563c
182,309,439,935,956,880,000,000,000,000,000,000,000
36
BGP: Fix bugs in handling of shutdown messages There is an improper check for valid message size, which may lead to stack overflow and buffer leaks to log when a large message is received. Thanks to Daniel McCarney for bugreport and analysis.
int manager_startup(Manager *m, FILE *serialization, FDSet *fds) { int r, q; assert(m); dual_timestamp_get(&m->generators_start_timestamp); manager_run_generators(m); dual_timestamp_get(&m->generators_finish_timestamp); r = lookup_paths_init( &m...
0
[]
systemd
5ba6985b6c8ef85a8bcfeb1b65239c863436e75b
291,229,911,396,152,000,000,000,000,000,000,000,000
73
core: allow PIDs to be watched by two units at the same time In some cases it is interesting to map a PID to two units at the same time. For example, when a user logs in via a getty, which is reexeced to /sbin/login that binary will be explicitly referenced as main pid of the getty service, as well as implicitly refer...
static double mp_self_pow(_cimg_math_parser& mp) { double &val = _mp_arg(1); return val = std::pow(val,_mp_arg(2));
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
164,173,910,564,354,210,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
apr_off_t h2_beam_get_buffered(h2_bucket_beam *beam) { apr_bucket *b; apr_off_t l = 0; h2_beam_lock bl; if (beam && enter_yellow(beam, &bl) == APR_SUCCESS) { for (b = H2_BLIST_FIRST(&beam->send_list); b != H2_BLIST_SENTINEL(&beam->send_list); b = APR_BUCKET_NEXT(b))...
0
[ "CWE-400" ]
mod_h2
83a2e3866918ce6567a683eb4c660688d047ee81
171,565,282,080,717,900,000,000,000,000,000,000,000
17
* fixes a race condition where aborting streams triggers an unnecessary timeout.
gst_h264_parser_insert_sei_internal (GstH264NalParser * nalparser, guint8 nal_prefix_size, gboolean packetized, GstBuffer * au, GstMemory * sei) { GstH264NalUnit nalu; GstMapInfo info; GstH264ParserResult pres; guint offset = 0; GstBuffer *new_buffer = NULL; if (!gst_buffer_map (au, &info, GST_MAP_...
0
[ "CWE-787" ]
gst-plugins-bad
11353b3f6e2f047cc37483d21e6a37ae558896bc
1,103,480,087,984,626,500,000,000,000,000,000,000
78
codecparsers: h264parser: guard against ref_pic_markings overflow Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1703>
static void coroutine_fn v9fs_link(void *opaque) { V9fsPDU *pdu = opaque; int32_t dfid, oldfid; V9fsFidState *dfidp, *oldfidp; V9fsString name; size_t offset = 7; int err = 0; v9fs_string_init(&name); err = pdu_unmarshal(pdu, offset, "dds", &dfid, &oldfid, &name); if (err < 0) { ...
0
[ "CWE-362" ]
qemu
89fbea8737e8f7b954745a1ffc4238d377055305
69,722,811,981,000,430,000,000,000,000,000,000,000
48
9pfs: Fully restart unreclaim loop (CVE-2021-20181) Depending on the client activity, the server can be asked to open a huge number of file descriptors and eventually hit RLIMIT_NOFILE. This is currently mitigated using a reclaim logic : the server closes the file descriptors of idle fids, based on the assumption that...
gnutls_x509_crt_get_dn_oid(gnutls_x509_crt_t cert, int indx, void *oid, size_t * oid_size) { if (cert == NULL) { gnutls_assert(); return GNUTLS_E_INVALID_REQUEST; } return _gnutls_x509_get_dn_oid(cert->cert, "tbsCertificate.subject.rdnSequence", indx, oid, oid_size); }
0
[ "CWE-295" ]
gnutls
6e76e9b9fa845b76b0b9a45f05f4b54a052578ff
41,667,073,276,978,853,000,000,000,000,000,000,000
12
on certificate import check whether the two signature algorithms match
*/ static __cold bool io_poll_remove_all(struct io_ring_ctx *ctx, struct task_struct *tsk, bool cancel_all) { struct hlist_node *tmp; struct io_kiocb *req; bool found = false; int i; spin_lock(&ctx->completion_lock); for (i = 0; i < (1U << ctx->cancel_hash_bits); i++) { struct hlist_head *list; l...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
249,694,473,016,181,930,000,000,000,000,000,000,000
24
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
static JSValue js_bs_put_u64(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) { return js_bs_put_val(ctx, this_val, argc, argv, 9); }
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
193,735,626,946,340,300,000,000,000,000,000,000,000
4
fixed #2138
static bool mtrr_lookup_fixed_start(struct mtrr_iter *iter) { int seg, index; if (!fixed_mtrr_is_enabled(iter->mtrr_state)) return false; seg = fixed_mtrr_addr_to_seg(iter->start); if (seg < 0) return false; iter->fixed = true; index = fixed_mtrr_addr_seg_to_range_index(iter->start, seg); iter->index = in...
0
[ "CWE-284" ]
linux
9842df62004f366b9fed2423e24df10542ee0dc5
288,858,155,934,315,500,000,000,000,000,000,000,000
17
KVM: MTRR: remove MSR 0x2f8 MSR 0x2f8 accessed the 124th Variable Range MTRR ever since MTRR support was introduced by 9ba075a664df ("KVM: MTRR support"). 0x2f8 became harmful when 910a6aae4e2e ("KVM: MTRR: exactly define the size of variable MTRRs") shrinked the array of VR MTRRs from 256 to 8, which made access to ...
static int xfrm_dump_sa_done(struct netlink_callback *cb) { struct xfrm_state_walk *walk = (struct xfrm_state_walk *) &cb->args[1]; struct sock *sk = cb->skb->sk; struct net *net = sock_net(sk); if (cb->args[0]) xfrm_state_walk_done(walk, net); return 0; }
0
[ "CWE-284" ]
linux
677e806da4d916052585301785d847c3b3e6186a
104,616,008,331,985,440,000,000,000,000,000,000,000
10
xfrm_user: validate XFRM_MSG_NEWAE XFRMA_REPLAY_ESN_VAL replay_window When a new xfrm state is created during an XFRM_MSG_NEWSA call we validate the user supplied replay_esn to ensure that the size is valid and to ensure that the replay_window size is within the allocated buffer. However later it is possible to updat...
void tr_variantListReserve(tr_variant* list, size_t count) { TR_ASSERT(tr_variantIsList(list)); containerReserve(list, count); }
0
[ "CWE-416", "CWE-284" ]
transmission
2123adf8e5e1c2b48791f9d22fc8c747e974180e
117,678,927,276,968,270,000,000,000,000,000,000,000
6
CVE-2018-10756: Fix heap-use-after-free in tr_variantWalk In libtransmission/variant.c, function tr_variantWalk, when the variant stack is reallocated, a pointer to the previously allocated memory region is kept. This address is later accessed (heap use-after-free) while walking back down the stack, causing the applic...
static bool extract_if_dead(struct connectdata *conn, struct Curl_easy *data) { size_t pipeLen = conn->send_pipe.size + conn->recv_pipe.size; if(!pipeLen && !CONN_INUSE(conn)) { /* The check for a dead socket makes sense only if there are no handles in pipeline and the connect...
0
[ "CWE-416" ]
curl
81d135d67155c5295b1033679c606165d4e28f3f
54,279,711,811,014,650,000,000,000,000,000,000,000
33
Curl_close: clear data->multi_easy on free to avoid use-after-free Regression from b46cfbc068 (7.59.0) CVE-2018-16840 Reported-by: Brian Carpenter (Geeknik Labs) Bug: https://curl.haxx.se/docs/CVE-2018-16840.html
static int sse8_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h) { int s, i; uint32_t *sq = ff_squareTbl + 256; s = 0; for (i = 0; i < h; i++) { s += sq[pix1[0] - pix2[0]]; s += sq[pix1[1] - pix2[1]]; s += sq[pix1[2] - pix2[2]]; s += sq[pix1[3] - pix2[3]]...
0
[ "CWE-703", "CWE-189" ]
FFmpeg
454a11a1c9c686c78aa97954306fb63453299760
246,974,679,230,614,270,000,000,000,000,000,000,000
20
avcodec/dsputil: fix signedness in sizeof() comparissions Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static char *ask_new_shell(char *question, char *oldshell) { int len; char *ans = NULL; size_t dummy = 0; if (!oldshell) oldshell = ""; printf("%s [%s]:", question, oldshell); putchar(' '); if (getline(&ans, &dummy, stdin) < 0) return NULL; /* remove the newline at the end of ans. */ ltrim_whitespace((u...
0
[]
util-linux
39a81981ac4b8a1f521db550afc117ccab9548cb
126,504,633,856,378,580,000,000,000,000,000,000,000
21
chsh, chfn: remove readline support [CVE-2022-0563] The readline library uses INPUTRC= environment variable to get a path to the library config file. When the library cannot parse the specified file, it prints an error message containing data from the file. Unfortunately, the library does not use secure_getenv() (or ...
static bool string_insn_completed(struct x86_emulate_ctxt *ctxt) { /* The second termination condition only applies for REPE * and REPNE. Test if the repeat string operation prefix is * REPE/REPZ or REPNE/REPNZ and if it's the case it tests the * corresponding termination condition according to: * - if REPE/R...
0
[]
kvm
e28ba7bb020f07193bc000453c8775e9d2c0dda7
96,293,351,979,635,000,000,000,000,000,000,000,000
19
KVM: x86: fix missing checks in syscall emulation On hosts without this patch, 32bit guests will crash (and 64bit guests may behave in a wrong way) for example by simply executing following nasm-demo-application: [bits 32] global _start SECTION .text _start: syscall (I tested it with winxp and linux ...
std::shared_ptr<Ope> get_core_operator() const { return holder_->ope_; }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
289,951,112,431,601,850,000,000,000,000,000,000,000
1
Fix #122
njs_vm_value_string_alloc(njs_vm_t *vm, njs_value_t *value, uint32_t size) { return njs_string_alloc(vm, value, size, 0); }
0
[ "CWE-416" ]
njs
6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6
299,845,881,370,491,100,000,000,000,000,000,000,000
4
Fixed recursive async function calls. Previously, PromiseCapability record was stored (function->context) directly in function object during a function invocation. This is not correct, because PromiseCapability record should be linked to current execution context. As a result, function->context is overwritten with c...
static void server_stats(ADD_STAT add_stats, conn *c) { pid_t pid = getpid(); rel_time_t now = current_time; struct thread_stats thread_stats; threadlocal_stats_aggregate(&thread_stats); struct slab_stats slab_stats; slab_stats_aggregate(&thread_stats, &slab_stats); #ifdef EXTSTORE struct e...
0
[]
memcached
f249724cedcab6605ca8a0769ac4b356a8124f63
295,084,132,285,811,000,000,000,000,000,000,000,000
152
crash fix: errstr wasn't initialized in metaget if meta_flag_preparse bailed out early it would try to read uninitialized memory.
add_font_path_args (FlatpakBwrap *bwrap) { g_autoptr(GString) xml_snippet = g_string_new (""); gchar *path_build_tmp = NULL; g_autoptr(GFile) user_font1 = NULL; g_autoptr(GFile) user_font2 = NULL; g_autoptr(GFile) user_font_cache = NULL; g_auto(GStrv) system_cache_dirs = NULL; gboolean found_cache = FALSE...
0
[ "CWE-94", "CWE-74" ]
flatpak
6d1773d2a54dde9b099043f07a2094a4f1c2f486
246,646,040,156,255,770,000,000,000,000,000,000,000
113
run: Convert all environment variables into bwrap arguments This avoids some of them being filtered out by a setuid bwrap. It also means that if they came from an untrusted source, they cannot be used to inject arbitrary code into a non-setuid bwrap via mechanisms like LD_PRELOAD. Because they get bundled into a memf...
int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len) { const unsigned char *buf = buf_; int tot; unsigned int n, nw; #if !defined(OPENSSL_NO_MULTIBLOCK) && EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK unsigned int max_send_fragment; #endif SSL3_BUFFER *wb = &(s->s3->wbuf); int i; s->rwstate...
0
[ "CWE-200", "CWE-203" ]
openssl
e9bbefbf0f24c57645e7ad6a5a71ae649d18ac8e
73,473,330,674,849,810,000,000,000,000,000,000,000
223
Go into the error state if a fatal alert is sent or received If an application calls SSL_shutdown after a fatal alert has occured and then behaves different based on error codes from that function then the application may be vulnerable to a padding oracle. CVE-2019-1559 Reviewed-by: Richard Levitte <levitte@openssl....
ReadImage (FILE *fp, tga_info *info, const gchar *filename) { static gint32 image_ID; gint32 layer_ID; GimpPixelRgn pixel_rgn; GimpDrawable *drawable; guchar *data, *buffer, *row; GimpImageType dtype = 0; GimpImageBaseType itype...
0
[ "CWE-125" ]
GIMP
22e2571c25425f225abdb11a566cc281fca6f366
324,149,756,710,289,100,000,000,000,000,000,000,000
202
plug-ins: TGA 16-bit RGB (without alpha bit) is also valid. According to some spec on the web, 16-bit RGB is also valid. In this case, the last bit is simply ignored (at least that's how it is implemented right now). (cherry picked from commit 8ea316667c8a3296bce2832b3986b58d0fdfc077)
static int atusb_get_and_show_revision(struct atusb *atusb) { struct usb_device *usb_dev = atusb->usb_dev; char *hw_name; unsigned char *buffer; int ret; buffer = kmalloc(3, GFP_KERNEL); if (!buffer) return -ENOMEM; /* Get a couple of the ATMega Firmware values */ ret = atusb_control_msg(atusb, usb_rcvctrlp...
0
[ "CWE-416" ]
linux
7fd25e6fc035f4b04b75bca6d7e8daa069603a76
283,309,853,548,557,220,000,000,000,000,000,000,000
57
ieee802154: atusb: fix use-after-free at disconnect The disconnect callback was accessing the hardware-descriptor private data after having having freed it. Fixes: 7490b008d123 ("ieee802154: add support for atusb transceiver") Cc: stable <stable@vger.kernel.org> # 4.2 Cc: Alexander Aring <alex.aring@gmail.com> Re...
TEST_F(RouterTest, TimeoutBudgetHistogramStatOnlyGlobal) { NiceMock<Http::MockRequestEncoder> encoder; Http::ResponseDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _)) .WillOnce(Invoke( [&](Http::ResponseDecoder& decoder, Http::Con...
0
[ "CWE-703" ]
envoy
18871dbfb168d3512a10c78dd267ff7c03f564c6
224,580,825,111,665,400,000,000,000,000,000,000,000
39
[1.18] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
nm_utils_dnsmasq_status_to_string(int status, char *dest, gsize size) { const char *msg; nm_utils_to_string_buffer_init(&dest, &size); if (status == 0) msg = "Success"; else if (status == 1) msg = "Configuration problem"; else if (status == 2) msg = "Network access problem ...
0
[ "CWE-20" ]
NetworkManager
420784e342da4883f6debdfe10cde68507b10d27
82,027,437,504,517,100,000,000,000,000,000,000,000
27
core: fix crash in nm_wildcard_match_check() It's not entirely clear how to treat %NULL. Clearly "match.interface-name=eth0" should not match with an interface %NULL. But what about "match.interface-name=!eth0"? It's now implemented that negative matches still succeed against %NULL. What about "match.interface-name=*"...
static js_Ast *newexp(js_State *J) { js_Ast *a, *b; if (jsP_accept(J, TK_NEW)) { a = memberexp(J); if (jsP_accept(J, '(')) { b = arguments(J); jsP_expect(J, ')'); return EXP2(NEW, a, b); } return EXP1(NEW, a); } if (jsP_accept(J, TK_FUNCTION)) return funexp(J); return primary(J); }
0
[ "CWE-674" ]
mujs
4d45a96e57fbabf00a7378b337d0ddcace6f38c1
171,594,737,259,083,900,000,000,000,000,000,000,000
19
Guard binary expressions from too much recursion.
apr_byte_t oidc_get_provider_from_session(request_rec *r, oidc_cfg *c, oidc_session_t *session, oidc_provider_t **provider) { oidc_debug(r, "enter"); /* get the issuer value from the session state */ const char *issuer = oidc_session_get_issuer(r, session); if (issuer == NULL) { oidc_warn(r, "empty or invalid...
0
[ "CWE-79" ]
mod_auth_openidc
55ea0a085290cd2c8cdfdd960a230cbc38ba8b56
46,202,633,556,846,170,000,000,000,000,000,000,000
24
Add a function to escape Javascript characters
int dns_packet_extract(DnsPacket *p) { _cleanup_(dns_question_unrefp) DnsQuestion *question = NULL; _cleanup_(dns_answer_unrefp) DnsAnswer *answer = NULL; _cleanup_(rewind_dns_packet) DnsPacketRewinder rewinder = {}; unsigned n, i; int r; if (p->extracted) ...
0
[ "CWE-20", "CWE-476" ]
systemd
a924f43f30f9c4acaf70618dd2a055f8b0f166be
174,000,044,265,771,900,000,000,000,000,000,000,000
152
resolved: bugfix of null pointer p->question dereferencing (#6020) See https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1621396
ptp_unpack_uint32_t_array(PTPParams *params, unsigned char* data, unsigned int offset, unsigned int datalen, uint32_t **array) { uint32_t n, i=0; if (!data) return 0; if (offset >= datalen) return 0; if (offset + sizeof(uint32_t) > datalen) return 0; *array = NULL; n=dtoh32a(&data[offset]); if (n >= UI...
0
[ "CWE-190" ]
libgphoto2
203df81b9d97e820411e1eb94ae08139af73bbd0
91,956,132,027,864,650,000,000,000,000,000,000,000
32
check for an integer overflow in ptp_unpack_OPL
static void page_cache_pipe_buf_release(struct pipe_inode_info *pipe, struct pipe_buffer *buf) { put_page(buf->page); buf->flags &= ~PIPE_BUF_FLAG_LRU; }
0
[ "CWE-416" ]
linux
15fab63e1e57be9fdb5eec1bbc5916e9825e9acb
12,709,243,667,426,930,000,000,000,000,000,000,000
6
fs: prevent page refcount overflow in pipe_buf_get Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All callers converted to handle a failure. Reported-by:...
int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx) { x->cert_info->enc.modified = 1; return ASN1_item_sign_ctx(ASN1_ITEM_rptr(X509_CINF), x->cert_info->signature, x->sig_alg, x->signature, x->cert_info, ctx); }
0
[ "CWE-310" ]
openssl
684400ce192dac51df3d3e92b61830a6ef90be3e
312,154,560,771,135,500,000,000,000,000,000,000,000
7
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...
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) { /* Behave like FETCH_OBJ_W */ zend_free_op free_op1; zval *property = &opline->op2.u.constant; zval **contain...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
58,148,279,711,879,880,000,000,000,000,000,000,000
36
- 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 handle_set_cr0(struct kvm_vcpu *vcpu, unsigned long val) { if (is_guest_mode(vcpu)) { struct vmcs12 *vmcs12 = get_vmcs12(vcpu); unsigned long orig_val = val; /* * We get here when L2 changed cr0 in a way that did not change * any of L1's shadowed bits (see nested_vmx_exit_handled_cr), * but ...
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
221,992,151,894,748,860,000,000,000,000,000,000,000
31
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
yang_fill_extcomplex_flags(struct lys_ext_instance_complex *ext, char *parent_name, char *node_name, LY_STMT stmt, uint16_t value, uint16_t mask) { uint16_t *data; struct lyext_substmt *info; data = lys_ext_complex_get_substmt(stmt, ext, &info); if (!data) { LOGVAL(ex...
0
[ "CWE-415" ]
libyang
d9feacc4a590d35dbc1af21caf9080008b4450ed
302,089,872,588,620,500,000,000,000,000,000,000,000
19
yang parser BUGFIX double free Fixes #742
static inline int copy_user_to_xregs(struct xregs_state __user *buf, u64 mask) { struct xregs_state *xstate = ((__force struct xregs_state *)buf); u32 lmask = mask; u32 hmask = mask >> 32; int err; stac(); XSTATE_OP(XRSTOR, xstate, lmask, hmask, err); clac(); return err; }
0
[ "CWE-119", "CWE-732", "CWE-787" ]
linux
59c4bd853abcea95eccc167a7d7fd5f1a5f47b98
115,214,848,502,669,600,000,000,000,000,000,000,000
13
x86/fpu: Don't cache access to fpu_fpregs_owner_ctx The state/owner of the FPU is saved to fpu_fpregs_owner_ctx by pointing to the context that is currently loaded. It never changed during the lifetime of a task - it remained stable/constant. After deferred FPU registers loading until return to userland was implement...