func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
tiff_load_read (thandle_t handle, tdata_t buf, tsize_t size) { TiffContext *context = (TiffContext *)handle; if (context->pos + size > context->used) return 0; memcpy (buf, context->buffer + context->pos, size); context->pos += size; return size;...
0
[]
gdk-pixbuf
31a6cff3dfc6944aad4612a9668b8ad39122e48b
113,615,378,941,476,270,000,000,000,000,000,000,000
11
tiff: Check for integer overflows in multiplication The checks currently in use are not sufficient, because they depend on undefined behaviour: rowstride = width * 4; if (rowstride / 4 != width) { /* overflow */ If the multiplication has already overflowed, the compiler may decide to optimize the if out and ...
void rwpng_version_info(FILE *fp) { const char *pngver = png_get_header_ver(NULL); #if USE_COCOA fprintf(fp, " Color profiles are supported via Cocoa. Using libpng %s.\n", pngver); #elif USE_LCMS fprintf(fp, " Color profiles are supported via Little CMS. Using libpng %s.\n", pngver); #else fprintf(...
0
[ "CWE-190", "CWE-787" ]
pngquant
b7c217680cda02dddced245d237ebe8c383be285
31,914,706,679,525,520,000,000,000,000,000,000,000
24
Fix integer overflow in rwpng.h (CVE-2016-5735) Reported by Choi Jaeseung Found with Sparrow (http://ropas.snu.ac.kr/sparrow)
ofpact_put(struct ofpbuf *ofpacts, enum ofpact_type type, size_t len) { struct ofpact *ofpact; ofpacts->header = ofpbuf_put_uninit(ofpacts, len); ofpact = ofpacts->header; ofpact_init(ofpact, type, len); return ofpact; }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
65,309,848,014,828,330,000,000,000,000,000,000,000
9
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
ioat3_prep_pq(struct dma_chan *chan, dma_addr_t *dst, dma_addr_t *src, unsigned int src_cnt, const unsigned char *scf, size_t len, unsigned long flags) { /* specify valid address for disabled result */ if (flags & DMA_PREP_PQ_DISABLE_P) dst[0] = dst[1]; if (flags & DMA_PREP_PQ_DISABLE_Q) dst[1] = d...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
322,021,240,365,858,120,000,000,000,000,000,000,000
38
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...
xfrm_state_addr_check(const struct xfrm_state *x, const xfrm_address_t *daddr, const xfrm_address_t *saddr, unsigned short family) { switch (family) { case AF_INET: return __xfrm4_state_addr_check(x, daddr, saddr); case AF_INET6: return __xfrm6_state_addr_check(x, daddr, saddr); } return 0; }
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
52,620,065,199,535,620,000,000,000,000,000,000,000
12
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...
BSONObj operand1() { return BSON("" << 6); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
43,740,119,405,315,260,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
insert_op2 (op, loc, arg1, arg2, end) re_opcode_t op; unsigned char *loc; int arg1, arg2; unsigned char *end; { register unsigned char *pfrom = end; register unsigned char *pto = end + 5; while (pfrom != loc) *--pto = *--pfrom; store_op2 (op, loc, arg1, arg2); }
0
[ "CWE-190", "CWE-252" ]
glibc
2864e767053317538feafa815046fff89e5a16be
245,064,630,001,893,600,000,000,000,000,000,000,000
14
Update. 1999-11-09 Ulrich Drepper <drepper@cygnus.com> * elf/dl-load.c (_dl_dst_count): Allow $ORIGIN to point to directory with the reference since this is as secure as using the object with the dependency. (_dl_dst_substitute): Likewise. * elf/dl-load.c (_dl_dst_count): Change strings in first two strncmp ...
static void *createBoolObject(const redisReadTask *task, int bval) { redisReply *r, *parent; r = createReplyObject(REDIS_REPLY_BOOL); if (r == NULL) return NULL; r->integer = bval != 0; if (task->parent) { parent = task->parent->obj; assert(parent->type == REDIS_REPLY_ARRA...
0
[ "CWE-190", "CWE-680" ]
redis
0215324a66af949be39b34be2d55143232c1cb71
165,605,873,076,204,180,000,000,000,000,000,000,000
18
Fix redis-cli / redis-sential overflow on some platforms (CVE-2021-32762) (#9587) The redis-cli command line tool and redis-sentinel service may be vulnerable to integer overflow when parsing specially crafted large multi-bulk network replies. This is a result of a vulnerability in the underlying hiredis library wh...
exif_mnote_data_fuji_get_name (ExifMnoteData *d, unsigned int i) { ExifMnoteDataFuji *n = (ExifMnoteDataFuji *) d; if (!n) return NULL; if (i >= n->count) return NULL; return mnote_fuji_tag_get_name (n->entries[i].tag); }
0
[ "CWE-125" ]
libexif
435e21f05001fb03f9f186fa7cbc69454afd00d1
233,851,564,841,566,100,000,000,000,000,000,000,000
8
Fix MakerNote tag size overflow issues at read time. Check for a size overflow while reading tags, which ensures that the size is always consistent for the given components and type of the entry, making checking further down superfluous. This provides an alternate fix for https://sourceforge.net/p/libexif/bugs/125/ C...
HttpConnectionManagerConfig::HttpConnectionManagerConfig( const envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager& config, Server::Configuration::FactoryContext& context, Http::DateProvider& date_provider, Router::RouteConfigProviderManager& route_config_provide...
1
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
47,760,437,834,968,980,000,000,000,000,000,000,000
328
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
void evp_final(EVPCTX ctx, unsigned char *md, unsigned int *mdlen) { EVP_DigestFinal(ctx, md, mdlen); }
0
[ "CWE-310" ]
libssh
e99246246b4061f7e71463f8806b9dcad65affa0
332,851,772,243,065,730,000,000,000,000,000,000,000
4
security: fix for vulnerability CVE-2014-0017 When accepting a new connection, a forking server based on libssh forks and the child process handles the request. The RAND_bytes() function of openssl doesn't reset its state after the fork, but simply adds the current process id (getpid) to the PRNG state, which is not g...
static inline int plo_test_bit(unsigned char nr) { register unsigned long r0 asm("0") = (unsigned long) nr | 0x100; int cc; asm volatile( /* Parameter registers are ignored for "test bit" */ " plo 0,0,0,0(0)\n" " ipm %0\n" " srl %0,28\n" : "=d" (cc) : "d" (r0) : "cc"); return cc == 0; }
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
178,528,055,475,595,000,000,000,000,000,000,000,000
15
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
unsigned FAST_FUNC udhcp_option_idx(const char *name, const char *option_strings) { int n = index_in_strings(option_strings, name); if (n >= 0) return n; { char *buf, *d; const char *s; s = option_strings; while (*s) s += strlen(s) + 1; d = buf = xzalloc(s - option_strings); s = option_strings; ...
0
[ "CWE-125" ]
busybox
6d3b4bb24da9a07c263f3c1acf8df85382ff562c
162,427,412,418,794,270,000,000,000,000,000,000,000
23
udhcpc: check that 4-byte options are indeed 4-byte, closes 11506 function old new delta udhcp_get_option32 - 27 +27 udhcp_get_option 231 248 +17 ----------------------------------...
static void hci_cc_le_read_buffer_size(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_rp_le_read_buffer_size *rp = (void *) skb->data; BT_DBG("%s status 0x%2.2x", hdev->name, rp->status); if (rp->status) return; hdev->le_mtu = __le16_to_cpu(rp->le_mtu); hdev->le_pkts = rp->le_max_pkt; hd...
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
97,727,366,777,912,600,000,000,000,000,000,000,000
17
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
static int smtp_auth_oauth(struct Connection *conn) { mutt_message(_("Authenticating (OAUTHBEARER)...")); /* We get the access token from the smtp_oauth_refresh_command */ char *oauthbearer = mutt_account_getoauthbearer(&conn->account); if (!oauthbearer) return SMTP_AUTH_FAIL; size_t ilen = strlen(oauth...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
258,868,332,154,422,780,000,000,000,000,000,000,000
24
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
static __always_inline ssize_t __mcopy_atomic(struct mm_struct *dst_mm, unsigned long dst_start, unsigned long src_start, unsigned long len, bool zeropage, bool *mmap_changing) { struct vm_area_struct *dst_vma; ssize_t err; pmd_t *dst_pmd; unsigned long src_add...
1
[ "CWE-862", "CWE-863" ]
linux
29ec90660d68bbdd69507c1c8b4e33aa299278b1
264,301,739,833,895,220,000,000,000,000,000,000,000
172
userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas After the VMA to register the uffd onto is found, check that it has VM_MAYWRITE set before allowing registration. This way we inherit all common code checks before allowing to fill file holes in shmem and hugetlbfs with UFFDIO_COPY. The userfaultf...
getRuleDotsText(FileInfo *file, CharsString *ruleDots) { CharsString token; if (!getToken(file, &token, "characters")) return 0; return parseChars(file, ruleDots, &token); }
0
[ "CWE-787" ]
liblouis
2e4772befb2b1c37cb4b9d6572945115ee28630a
267,672,653,788,338,300,000,000,000,000,000,000,000
5
Prevent an invalid memory writes in compileRule Thanks to Han Zheng for reporting it Fixes #1214
PHPAPI php_url *php_url_parse_ex(char const *str, int length) { char port_buf[6]; php_url *ret = ecalloc(1, sizeof(php_url)); char const *s, *e, *p, *pp, *ue; s = str; ue = s + length; /* parse scheme */ if ((e = memchr(s, ':', length)) && (e - s)) { /* validate scheme */ p = s; while (p < e) { /* sch...
1
[ "CWE-119" ]
php-src
e1ba58f068f4bfc8ced75bb017cd31d8beddf3c2
144,001,561,650,899,800,000,000,000,000,000,000,000
273
Fix bug #70480 (php_url_parse_ex() buffer overflow read) (cherry picked from commit 629e4da7cc8b174acdeab84969cbfc606a019b31)
ExifData::const_iterator whiteBalance(const ExifData& ed) { static const char* keys[] = { "Exif.CanonSi.WhiteBalance", "Exif.Fujifilm.WhiteBalance", "Exif.Sigma.WhiteBalance", "Exif.Nikon1.WhiteBalance", "Exif.Nikon2.WhiteBalance", ...
0
[ "CWE-476" ]
exiv2
6e42c1b55e0fc4f360cc56010b0ffe19aa6062d9
285,147,626,444,191,900,000,000,000,000,000,000,000
30
Fix #561. Use proper counter for the idx variable
Magick::Image Magick::Image::uniqueColors(void) const { MagickCore::Image *image; GetPPException; image=UniqueImageColors(constImage(),exceptionInfo); ThrowImageException; if (image == (MagickCore::Image *) NULL) return(Magick::Image()); else return(Magick::Image(image)); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
339,071,025,007,862,450,000,000,000,000,000,000,000
13
Added missing return to avoid use after free.
static void btrfs_double_extent_lock(struct inode *inode1, u64 loff1, struct inode *inode2, u64 loff2, u64 len) { if (inode1 < inode2) { swap(inode1, inode2); swap(loff1, loff2); } lock_extent_range(inode1, loff1, len); lock_extent_range(inode2, loff2, len); }
0
[ "CWE-200" ]
linux
8039d87d9e473aeb740d4fdbd59b9d2f89b2ced9
312,990,236,300,130,860,000,000,000,000,000,000,000
10
Btrfs: fix file corruption and data loss after cloning inline extents Currently the clone ioctl allows to clone an inline extent from one file to another that already has other (non-inlined) extents. This is a problem because btrfs is not designed to deal with files having inline and regular extents, if a file has an ...
static int bpf_size_to_bytes(int bpf_size) { if (bpf_size == BPF_W) return 4; else if (bpf_size == BPF_H) return 2; else if (bpf_size == BPF_B) return 1; else if (bpf_size == BPF_DW) return 8; else return -EINVAL; }
0
[ "CWE-200" ]
linux
a1b14d27ed0965838350f1377ff97c93ee383492
257,435,981,499,159,540,000,000,000,000,000,000,000
13
bpf: fix branch offset adjustment on backjumps after patching ctx expansion When ctx access is used, the kernel often needs to expand/rewrite instructions, so after that patching, branch offsets have to be adjusted for both forward and backward jumps in the new eBPF program, but for backward jumps it fails to account ...
static inline int compound_mapcount(struct page *page) { VM_BUG_ON_PAGE(!PageCompound(page), page); page = compound_head(page); return atomic_read(compound_mapcount_ptr(page)) + 1; }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
92,027,509,056,579,400,000,000,000,000,000,000,000
6
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static int spl_filesystem_file_read(spl_filesystem_object *intern, int silent) /* {{{ */ { char *buf; size_t line_len = 0; zend_long line_add = (intern->u.file.current_line || !Z_ISUNDEF(intern->u.file.current_zval)) ? 1 : 0; spl_filesystem_file_free_line(intern); if (php_stream_eof(intern->u.file.stream)) { i...
0
[ "CWE-74" ]
php-src
a5a15965da23c8e97657278fc8dfbf1dfb20c016
328,533,242,230,256,870,000,000,000,000,000,000,000
43
Fix #78863: DirectoryIterator class silently truncates after a null byte Since the constructor of DirectoryIterator and friends is supposed to accepts paths (i.e. strings without NUL bytes), we must not accept arbitrary strings.
void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent) { const X509_POLICY_DATA *dat = node->data; BIO_printf(out, "%*sPolicy: ", indent, ""); i2a_ASN1_OBJECT(out, dat->valid_policy); BIO_puts(out, "\n"); BIO_printf(out, "%*s%s\n", indent + 2, "", node_data_critic...
0
[ "CWE-125" ]
openssl
5f54e57406ca17731b9ade3afd561d3c652e07f2
251,616,417,642,823,960,000,000,000,000,000,000,000
15
Fix POLICYINFO printing to not assume NUL terminated strings ASN.1 strings may not be NUL terminated. Don't assume they are. CVE-2021-3712 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org>
int tipc_node_dump(struct tipc_node *n, bool more, char *buf) { int i = 0; size_t sz = (more) ? NODE_LMAX : NODE_LMIN; if (!n) { i += scnprintf(buf, sz, "node data: (null)\n"); return i; } i += scnprintf(buf, sz, "node data: %x", n->addr); i += scnprintf(buf + i, sz - i, " %x", n->state); i += scnprintf(bu...
0
[]
linux
0217ed2848e8538bcf9172d97ed2eeb4a26041bb
79,544,820,396,826,570,000,000,000,000,000,000,000
48
tipc: better validate user input in tipc_nl_retrieve_key() Before calling tipc_aead_key_size(ptr), we need to ensure we have enough data to dereference ptr->keylen. We probably also want to make sure tipc_aead_key_size() wont overflow with malicious ptr->keylen values. Syzbot reported: BUG: KMSAN: uninit-value in _...
static bool partition_overlaps(struct gendisk *disk, sector_t start, sector_t length, int skip_partno) { struct block_device *part; bool overlap = false; unsigned long idx; rcu_read_lock(); xa_for_each_start(&disk->part_tbl, idx, part, 1) { if (part->bd_partno != skip_partno && start < part->bd_start_se...
0
[ "CWE-416" ]
linux
9fbfabfda25d8774c5a08634fdd2da000a924890
122,017,211,655,308,770,000,000,000,000,000,000,000
20
block: fix incorrect references to disk objects When adding partitions to the disk, the reference count of the disk object is increased. then alloc partition device and called device_add(), if the device_add() return error, the reference count of the disk object will be reduced twice, at put_device(pdev) and put_disk(...
int dump_dir_stat_for_uid(const char *dirname, uid_t uid) { struct stat statbuf; if (stat(dirname, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode)) { log_debug("can't get stat of '%s': not a problem directory", dirname); errno = ENOTDIR; return -1; } errno = 0; int ddstat =...
0
[ "CWE-22" ]
libreport
239c4f7d1f47265526b39ad70106767d00805277
313,241,143,111,034,000,000,000,000,000,000,000,000
32
dd: harden functions against directory traversal issues Test correctness of all accessed dump dir files in all dd* functions. Before this commit, the callers were allowed to pass strings like "../../etc/shadow" in the filename argument of all dd* functions. Related: #1214457 Signed-off-by: Jakub Filak <jfilak@redhat...
Tfloat linear_atX(const float fx, const int y=0, const int z=0, const int c=0) const { if (is_empty()) throw CImgInstanceException(_cimg_instance "linear_atX(): Empty instance.", cimg_instance); return _linear_atX(fx,y,z,c)...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
333,645,749,328,045,200,000,000,000,000,000,000,000
8
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void x509_start_chain(const br_x509_class **ctx, const char *server_name) { struct x509_context *x509 = (struct x509_context *)ctx; if(!x509->verifyhost) server_name = NULL; x509->minimal.vtable->start_chain(&x509->minimal.vtable, server_name); }
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
194,988,419,133,913,150,000,000,000,000,000,000,000
9
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
init_control_ssl_connection (int csock, struct url *u, bool *using_control_security) { bool using_security = false; /* If '--ftps-implicit' was passed, perform the SSL handshake directly, * and do not send an AUTH command. * Otherwise send an AUTH sequence before login, * and perform the SSL handshake if ...
0
[ "CWE-200" ]
wget
3cdfb594cf75f11cdbb9702ac5e856c332ccacfa
273,566,328,098,130,600,000,000,000,000,000,000,000
51
Don't save user/pw with --xattr Also the Referer info is reduced to scheme+host+port. * src/ftp.c (getftp): Change params of set_file_metadata() * src/http.c (gethttp): Change params of set_file_metadata() * src/xattr.c (set_file_metadata): Remove user/password from origin URL, reduce Referer value to scheme/host/p...
static void vnc_init_basic_info_from_remote_addr(int fd, VncBasicInfo *info, Error **errp) { struct sockaddr_storage sa; socklen_t salen; salen = sizeof(sa); if (getpeername(fd, (struct sockaddr*)&sa, &salen) < 0) { error_setg_errno(errp, errno, ...
0
[]
qemu
4c65fed8bdf96780735dbdb92a8bd0d6b6526cc3
107,165,294,320,658,920,000,000,000,000,000,000,000
14
ui: vnc: avoid floating point exception While sending 'SetPixelFormat' messages to a VNC server, the client could set the 'red-max', 'green-max' and 'blue-max' values to be zero. This leads to a floating point exception in write_png_palette while doing frame buffer updates. Reported-by: Lian Yihan <lianyihan@360.cn> ...
static void cpy8(tinyexr::tinyexr_uint64 *dst_val, const tinyexr::tinyexr_uint64 *src_val) { unsigned char *dst = reinterpret_cast<unsigned char *>(dst_val); const unsigned char *src = reinterpret_cast<const unsigned char *>(src_val); dst[0] = src[0]; dst[1] = src[1]; dst[2] = src[2]; dst[3] = src[3]; ds...
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
186,867,654,182,427,380,000,000,000,000,000,000,000
13
Make line_no with too large value(2**20) invalid. Fixes #124
static Bool gf_m2ts_probe_buffer(char *buf, u32 size) { GF_Err e; GF_M2TS_Demuxer *ts; u32 lt; lt = gf_log_get_tool_level(GF_LOG_CONTAINER); gf_log_set_tool_level(GF_LOG_CONTAINER, GF_LOG_QUIET); ts = gf_m2ts_demux_new(); e = gf_m2ts_process_data(ts, buf, size); if (!ts->pck_number) e = GF_BAD_PARAM; gf_m2ts...
0
[ "CWE-416", "CWE-125" ]
gpac
1ab4860609f2e7a35634930571e7d0531297e090
164,138,268,277,638,880,000,000,000,000,000,000,000
20
fixed potential crash on PMT IOD parse - cf #1268 #1269
int Field_datetime_hires::cmp(const uchar *a_ptr, const uchar *b_ptr) { ulonglong a=read_bigendian(a_ptr, Field_datetime_hires::pack_length()); ulonglong b=read_bigendian(b_ptr, Field_datetime_hires::pack_length()); return a < b ? -1 : a > b ? 1 : 0; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
160,979,639,963,263,400,000,000,000,000,000,000,000
6
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static void smtc_unmap_smem(struct smtcfb_info *sfb) { if (sfb && sfb->fb->screen_base) { if (sfb->chip_id == 0x720) sfb->fb->screen_base -= 0x00200000; iounmap(sfb->fb->screen_base); sfb->fb->screen_base = NULL; } }
0
[ "CWE-787" ]
linux-fbdev
bd771cf5c4254511cc4abb88f3dab3bd58bdf8e8
20,081,432,084,862,430,000,000,000,000,000,000,000
9
video: fbdev: sm712fb: Fix crash in smtcfb_read() Zheyu Ma reported this crash in the sm712fb driver when reading three bytes from the framebuffer: BUG: unable to handle page fault for address: ffffc90001ffffff RIP: 0010:smtcfb_read+0x230/0x3e0 Call Trace: vfs_read+0x198/0xa00 ? do_sys_openat2+0x27d/0x350 ? ...
static int ZEND_FASTCALL ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *expr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval *result = &EX_T(opline->result.u.var).tmp_var; if (opline->extended_value != IS_STRING) { *result ...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
77,157,186,185,866,380,000,000,000,000,000,000,000
54
- 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 void file_change(struct diff_options *options, unsigned old_mode, unsigned new_mode, const unsigned char *old_sha1, const unsigned char *new_sha1, const char *fullpath) { tree_difference = REV_TREE_DIFFERENT; DIFF_OPT_SET(options, HAS_CHANGES); }
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
64,351,267,031,930,790,000,000,000,000,000,000,000
9
Fix buffer overflow in git diff If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
context_set_sm_rid2pasid(struct context_entry *context, unsigned long pasid) { context->hi |= pasid & ((1 << 20) - 1); context->hi |= (1 << 20); }
0
[]
linux
d8b8591054575f33237556c32762d54e30774d28
118,966,092,669,722,760,000,000,000,000,000,000,000
5
iommu/vt-d: Disable ATS support on untrusted devices Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted devices") disables ATS support on the devices which have been marked as untrusted. Unfortunately this is not enough to fix the DMA attack vulnerabiltiies because IOMMU driver allows translated reques...
cpio_mkdir (struct cpio_file_stat *file_hdr, int *setstat_delayed) { int rc; mode_t mode = file_hdr->c_mode; if (!(file_hdr->c_mode & S_IWUSR)) { rc = mkdir (file_hdr->c_name, mode | S_IWUSR); if (rc == 0) { delay_cpio_set_stat (file_hdr, 0); *setstat_delayed = 1; } } else { ...
0
[ "CWE-190" ]
cpio
dd96882877721703e19272fe25034560b794061b
310,161,893,241,017,570,000,000,000,000,000,000,000
21
Rewrite dynamic string support. * src/dstring.c (ds_init): Take a single argument. (ds_free): New function. (ds_resize): Take a single argument. Use x2nrealloc to expand the storage. (ds_reset,ds_append,ds_concat,ds_endswith): New function. (ds_fgetstr): Rewrite. In particular, this fixes integer overflow. * src/dst...
static int mpage_map_one_extent(handle_t *handle, struct mpage_da_data *mpd) { struct inode *inode = mpd->inode; struct ext4_map_blocks *map = &mpd->map; int get_blocks_flags; int err, dioread_nolock; trace_ext4_da_write_pages_extent(inode, map); /* * Call ext4_map_blocks() to allocate any delayed allocation b...
0
[ "CWE-416", "CWE-401" ]
linux
4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a
39,810,021,269,478,360,000,000,000,000,000,000,000
47
ext4: add more paranoia checking in ext4_expand_extra_isize handling It's possible to specify a non-zero s_want_extra_isize via debugging option, and this can cause bad things(tm) to happen when using a file system with an inode size of 128 bytes. Add better checking when the file system is mounted, as well as when w...
static int muscle_card_reader_lock_obtained(sc_card_t *card, int was_reset) { int r = SC_SUCCESS; SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); if (was_reset > 0) { if (msc_select_applet(card, muscleAppletId, sizeof muscleAppletId) != 1) { r = SC_ERROR_INVALID_CARD; } } LOG_FUNC_RETURN(card->ctx, r); ...
0
[ "CWE-415", "CWE-119" ]
OpenSC
360e95d45ac4123255a4c796db96337f332160ad
239,531,400,921,482,230,000,000,000,000,000,000,000
14
fixed out of bounds writes Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problems.
TEST_F(HttpHealthCheckerImplTest, DynamicAddAndRemove) { setupNoServiceValidationHC(); health_checker_->start(); expectSessionCreate(); expectStreamCreate(0); cluster_->prioritySet().getMockHostSet(0)->hosts_ = { makeTestHost(cluster_->info_, "tcp://127.0.0.1:80", simTime())}; EXPECT_CALL(*test_sessi...
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
71,347,193,291,914,310,000,000,000,000,000,000,000
18
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
bool SimpleMessenger::verify_authorizer(Connection *con, int peer_type, int protocol, bufferlist& authorizer, bufferlist& authorizer_reply, bool& isvalid,CryptoKey& session_key, std::unique_ptr<AuthAuthorizerChallenge> *challenge) { return ms_deliver_verify_authorizer(con, peer_type, protocol, authoriz...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
208,649,837,378,525,400,000,000,000,000,000,000,000
9
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 ...
doSubmitMsg(const instanceConf_t *const __restrict__ inst, struct conn_wrkr_s *connWrkr, const uchar* msg, size_t len) { smsg_t *pMsg; DEFiRet; assert(len <= s_iMaxLine); if (len == 0) { DBGPRINTF("discarding zero-sized message\n"); FINALIZE; } CHKiRet(msgConstruct(&pMsg)); MsgSetFlowControlType(pMsg, ins...
0
[ "CWE-787" ]
rsyslog
89955b0bcb1ff105e1374aad7e0e993faa6a038f
293,143,544,988,900,550,000,000,000,000,000,000,000
45
net bugfix: potential buffer overrun
mrb_io_initialize(mrb_state *mrb, mrb_value io) { struct mrb_io *fptr; mrb_int fd; mrb_value mode, opt; int flags; mode = opt = mrb_nil_value(); mrb_get_args(mrb, "i|So", &fd, &mode, &opt); if (mrb_nil_p(mode)) { mode = mrb_str_new_cstr(mrb, "r"); } if (mrb_nil_p(opt)) { opt = mrb_hash_new(m...
0
[ "CWE-416", "CWE-787" ]
mruby
b51b21fc63c9805862322551387d9036f2b63433
155,611,102,048,931,000,000,000,000,000,000,000,000
37
Fix `use after free in File#initilialize_copy`; fix #4001 The bug and the fix were reported by https://hackerone.com/pnoltof
JsVar *jspGetNamedVariable(const char *tokenName) { JsVar *a = JSP_SHOULD_EXECUTE ? jspeiFindInScopes(tokenName) : 0; if (JSP_SHOULD_EXECUTE && !a) { /* Special case! We haven't found the variable, so check out * and see if it's one of our builtins... */ if (jswIsBuiltInObject(tokenName)) { // C...
0
[ "CWE-787" ]
Espruino
e069be2ecc5060ef47391716e4de94999595b260
24,464,197,939,660,870,000,000,000,000,000,000,000
27
Fix potential corruption issue caused by `delete [].__proto__` (fix #2142)
static BOOL zgfx_decompress_segment(ZGFX_CONTEXT* zgfx, wStream* stream, size_t segmentSize) { BYTE c; BYTE flags; UINT32 extra = 0; int opIndex; int haveBits; int inPrefix; UINT32 count; UINT32 distance; BYTE* pbSegment; size_t cbSegment; if (!zgfx || !stream) return FALSE; cbSegment = segmentSize - 1;...
0
[ "CWE-119", "CWE-125", "CWE-787" ]
FreeRDP
17c363a5162fd4dc77b1df54e48d7bd9bf6b3be7
253,109,219,618,419,020,000,000,000,000,000,000,000
142
Fixed CVE-2018-8784 Thanks to Eyal Itkin from Check Point Software Technologies.
static void udp_skb_dtor_locked(struct sock *sk, struct sk_buff *skb) { prefetch(&skb->data); udp_rmem_release(sk, udp_skb_truesize(skb), 1, true); }
0
[ "CWE-362" ]
net
85f1bd9a7b5a79d5baa8bf44af19658f7bf77bfa
292,787,375,836,543,850,000,000,000,000,000,000,000
5
udp: consistently apply ufo or fragmentation When iteratively building a UDP datagram with MSG_MORE and that datagram exceeds MTU, consistently choose UFO or fragmentation. Once skb_is_gso, always apply ufo. Conversely, once a datagram is split across multiple skbs, do not consider ufo. Sendpage already maintains th...
static int efi_capsule_open(struct inode *inode, struct file *file) { struct capsule_info *cap_info; cap_info = kzalloc(sizeof(*cap_info), GFP_KERNEL); if (!cap_info) return -ENOMEM; cap_info->pages = kzalloc(sizeof(void *), GFP_KERNEL); if (!cap_info->pages) { kfree(cap_info); return -ENOMEM; } cap_inf...
0
[ "CWE-416", "CWE-200" ]
linux
9cb636b5f6a8cc6d1b50809ec8f8d33ae0c84c95
222,275,294,939,029,700,000,000,000,000,000,000,000
25
efi: capsule-loader: Fix use-after-free in efi_capsule_write A race condition may occur if the user calls close() on another thread during a write() operation on the device node of the efi capsule. This is a race condition that occurs between the efi_capsule_write() and efi_capsule_flush() functions of efi_capsule_fo...
static int kdb_defcmd(int argc, const char **argv) { kdbtab_t *mp; if (defcmd_in_progress) { kdb_printf("kdb: nested defcmd detected, assuming missing " "endefcmd\n"); kdb_defcmd2("endefcmd", "endefcmd"); } if (argc == 0) { kdbtab_t *kp; struct kdb_macro *kmp; struct kdb_macro_statement *kms; li...
0
[ "CWE-787" ]
linux
eadb2f47a3ced5c64b23b90fd2a3463f63726066
329,556,249,894,333,900,000,000,000,000,000,000,000
72
lockdown: also lock down previous kgdb use KGDB and KDB allow read and write access to kernel memory, and thus should be restricted during lockdown. An attacker with access to a serial port (for example, via a hypervisor console, which some cloud vendors provide over the network) could trigger the debugger so it is i...
static bool smtp_endofresp(struct connectdata *conn, char *line, size_t len, int *resp) { struct smtp_conn *smtpc = &conn->proto.smtpc; bool result = FALSE; /* Nothing for us */ if(len < 4 || !ISDIGIT(line[0]) || !ISDIGIT(line[1]) || !ISDIGIT(line[2])) return FALSE; /* Do we h...
0
[ "CWE-200", "CWE-119", "CWE-787" ]
curl
ba1dbd78e5f1ed67c1b8d37ac89d90e5e330b628
32,971,692,494,848,340,000,000,000,000,000,000,000
31
smtp: use the upload buffer size for scratch buffer malloc ... not the read buffer size, as that can be set smaller and thus cause a buffer overflow! CVE-2018-0500 Reported-by: Peter Wu Bug: https://curl.haxx.se/docs/adv_2018-70a2.html
static int quorem(Bigint *b, Bigint *S) { int n; ULong *bx, *bxe, q, *sx, *sxe; #ifdef ULLong ULLong borrow, carry, y, ys; #else ULong borrow, carry, y, ys; #ifdef Pack_32 ULong si, z, zs; #endif #endif n = S->wds; #ifdef DEBUG /*debug*/ if (b->wds > n) /*debug*/ Bug("oversize b in qu...
0
[ "CWE-119" ]
ruby
5cb83d9dab13e14e6146f455ffd9fed4254d238f
65,123,654,587,842,750,000,000,000,000,000,000,000
109
util.c: ignore too long fraction part * util.c (ruby_strtod): ignore too long fraction part, which does not affect the result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
bool UTFstring::operator==(const UTFstring& _aStr) const { if ((_Data == NULL) && (_aStr._Data == NULL)) return true; if ((_Data == NULL) || (_aStr._Data == NULL)) return false; return wcscmp_internal(_Data, _aStr._Data); }
0
[ "CWE-200", "CWE-703" ]
libebml
ababb64e0c792ad2a314245233db0833ba12036b
317,999,372,580,492,830,000,000,000,000,000,000,000
8
EbmlUnicodeString: don't read beyond end of string The conversion from an UTF-8 encoded string into a wchar_t one was reading from beyond the end of the source buffer if the length indicated by a UTF-8 character's first byte exceeds the number of bytes actually present afterwards. Fixes the issue reported as Cisco TA...
int do_huge_pmd_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags) { struct page *page; unsigned long haddr = address & HPAGE_PMD_MASK; pte_t *pte; if (haddr >= vma->vm_start && haddr + HPAGE_PMD_SIZE <= vma->vm_end) { if (u...
0
[ "CWE-399" ]
linux
78f11a255749d09025f54d4e2df4fbcb031530e2
32,864,371,684,742,190,000,000,000,000,000,000,000
47
mm: thp: fix /dev/zero MAP_PRIVATE and vm_flags cleanups The huge_memory.c THP page fault was allowed to run if vm_ops was null (which would succeed for /dev/zero MAP_PRIVATE, as the f_op->mmap wouldn't setup a special vma->vm_ops and it would fallback to regular anonymous memory) but other THP logics weren't fully ac...
gint rtps_util_add_locator_t(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, gint offset, const guint encoding, const char *label) { proto_tree *ti; proto_tree *locator_tree; guint32 kind; gint32 port; const gint parameter_size = 24; locator_tree = proto_tree_add_subtree(...
0
[ "CWE-401" ]
wireshark
33e63d19e5496c151bad69f65cdbc7cba2b4c211
323,738,345,470,653,830,000,000,000,000,000,000,000
85
RTPS: Fixup our coherent set map. coherent_set_tracking.coherent_set_registry_map uses a struct as a key, but the hash and comparison routines treat keys as a sequence of bytes. Make sure every key byte is initialized. Fixes #16994. Call wmem_strong_hash on our key in coherent_set_key_hash_by_key instead of creating ...
rsRetVal MsgSetMSGID(msg_t *pMsg, char* pszMSGID) { DEFiRet; ISOBJ_TYPE_assert(pMsg, msg); if(pMsg->pCSMSGID == NULL) { /* we need to obtain the object first */ CHKiRet(rsCStrConstruct(&pMsg->pCSMSGID)); } /* if we reach this point, we have the object */ iRet = rsCStrSetSzStr(pMsg->pCSMSGID, (uchar*) pszMSGID...
0
[ "CWE-772" ]
rsyslog
8083bd1433449fd2b1b79bf759f782e0f64c0cd2
244,125,757,528,949,750,000,000,000,000,000,000,000
14
backporting abort condition fix from 5.7.7
static void rtl8139_ioport_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { switch (size) { case 1: rtl8139_io_writeb(opaque, addr, val); break; case 2: rtl8139_io_writew(opaque, addr, val); break; case 4: rtl8139_io...
0
[ "CWE-835" ]
qemu
5311fb805a4403bba024e83886fa0e7572265de4
92,629,022,514,422,280,000,000,000,000,000,000,000
15
rtl8139: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Buglink: https://bugs.launchpad.net/qemu/+bug/1910826...
static __always_inline void __skb_postpush_rcsum(struct sk_buff *skb, const void *start, unsigned int len, unsigned int off) { if (skb->ip_summed == CHECKSUM_COMPLETE) skb->csum = csum_block_add(skb->csum, csum_partial(start, len, 0), off);
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
263,901,280,394,781,000,000,000,000,000,000,000,000
7
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
int trace_empty(struct trace_iterator *iter) { struct ring_buffer_iter *buf_iter; int cpu; /* If we are looking at one CPU buffer, only check that one */ if (iter->cpu_file != RING_BUFFER_ALL_CPUS) { cpu = iter->cpu_file; buf_iter = trace_buffer_iter(iter, cpu); if (buf_iter) { if (!ring_buffer_iter_empty...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
18,607,256,663,625,476,000,000,000,000,000,000,000
32
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
static void io_poll_task_func(struct callback_head *cb) { struct io_kiocb *req = container_of(cb, struct io_kiocb, task_work); struct io_kiocb *nxt = NULL; io_poll_task_handler(req, &nxt); if (nxt) __io_req_task_submit(nxt); }
1
[ "CWE-416" ]
linux
6d816e088c359866f9867057e04f244c608c42fe
26,228,664,499,416,505,000,000,000,000,000,000,000
9
io_uring: hold 'ctx' reference around task_work queue + execute We're holding the request reference, but we need to go one higher to ensure that the ctx remains valid after the request has finished. If the ring is closed with pending task_work inflight, and the given io_kiocb finishes sync during issue, then we need a...
static int megasas_cache_flush(MegasasState *s, MegasasCmd *cmd) { blk_drain_all(); return MFI_STAT_OK; }
0
[ "CWE-401" ]
qemu
765a707000e838c30b18d712fe6cb3dd8e0435f3
68,970,095,444,981,120,000,000,000,000,000,000,000
5
megasas: fix guest-triggered memory leak If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory. Avoid this by returning only the status from map_dcmd, and loading cmd->iov_size in the caller. Reported-by: Li Qiang <liqiang6-s@360.c...
int ha_partition::handle_ordered_prev(uchar *buf) { int error; uint part_id= m_top_entry; uchar *rec_buf= queue_top(&m_queue) + PARTITION_BYTES_IN_POS; handler *file= m_file[part_id]; DBUG_ENTER("ha_partition::handle_ordered_prev"); if ((error= file->index_prev(rec_buf))) { if (error == HA_ERR_END_OF...
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
197,607,084,479,141,130,000,000,000,000,000,000,000
29
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
static void hci_cc_write_class_of_dev(struct hci_dev *hdev, struct sk_buff *skb) { __u8 status = *((__u8 *) skb->data); void *sent; BT_DBG("%s status 0x%2.2x", hdev->name, status); sent = hci_sent_cmd_data(hdev, HCI_OP_WRITE_CLASS_OF_DEV); if (!sent) return; hci_dev_lock(hdev); if (status == 0) memcpy(hd...
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
53,873,383,462,996,770,000,000,000,000,000,000,000
21
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
static int handle_vmon(struct kvm_vcpu *vcpu) { struct kvm_segment cs; struct vcpu_vmx *vmx = to_vmx(vcpu); struct vmcs *shadow_vmcs; const u64 VMXON_NEEDED_FEATURES = FEATURE_CONTROL_LOCKED | FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX; /* The Intel VMX Instruction Reference lists a bunch of bits that * are pr...
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
58,442,894,706,382,660,000,000,000,000,000,000,000
70
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 ...
query_for_targets(struct module_qstate* qstate, struct iter_qstate* iq, struct iter_env* ie, int id, int maxtargets, int* num) { int query_count = 0; struct delegpt_ns* ns; int missing; int toget = 0; if(iq->depth == ie->max_dependency_depth) return 0; if(iq->depth > 0 && iq->target_count && iq->targ...
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
209,731,695,659,586,650,000,000,000,000,000,000,000
95
- CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. - CVE-2020-12663 Malformed answers from upstream name servers can be used to make Unbound unresponsive.
GC_API void GC_CALL GC_register_describe_type_fn(int kind, GC_describe_type_fn fn) { GC_describe_type_fns[kind] = fn; }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
227,722,904,210,950,000,000,000,000,000,000,000,000
5
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
void fm10k_tx_timeout_reset(struct fm10k_intfc *interface) { /* Do the reset outside of interrupt context */ if (!test_bit(__FM10K_DOWN, interface->state)) { interface->tx_timeout_count++; set_bit(FM10K_FLAG_RESET_REQUESTED, interface->flags); fm10k_service_event_schedule(interface); } }
0
[ "CWE-476" ]
linux
01ca667133d019edc9f0a1f70a272447c84ec41f
79,474,138,934,972,760,000,000,000,000,000,000,000
9
fm10k: Fix a potential NULL pointer dereference Syzkaller report this: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN PTI CPU: 0 PID: 4378 Comm: syz-executor.0 Tainted: G C 5.0.0+ #5 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),...
static jpc_dec_t *jpc_dec_create(jpc_dec_importopts_t *impopts, jas_stream_t *in) { jpc_dec_t *dec; if (!(dec = jas_malloc(sizeof(jpc_dec_t)))) { return 0; } dec->image = 0; dec->xstart = 0; dec->ystart = 0; dec->xend = 0; dec->yend = 0; dec->tilewidth = 0; dec->tileheight = 0; dec->tilexoff = 0; dec->t...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
116,795,649,537,938,980,000,000,000,000,000,000,000
37
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...
static int qh_input(int sd, int events, void *ioc_) { iocache * ioc = (iocache *) ioc_; int result = 0; /* input on main socket, so accept one this is when a worker initially connects we create the iocache and then register that to a new socket descriptor and this function so that ioc_ != NULL next t...
0
[ "CWE-476" ]
nagioscore
b1a92a3b52d292ccb601e77a0b29cb1e67ac9d76
186,821,420,762,734,630,000,000,000,000,000,000,000
161
merge accidental master PR (#553) into maint and fix changelog merge conflict
svm_patch_hypercall(struct kvm_vcpu *vcpu, unsigned char *hypercall) { /* * Patch in the VMMCALL instruction: */ hypercall[0] = 0x0f; hypercall[1] = 0x01; hypercall[2] = 0xd9; }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
296,941,458,140,528,200,000,000,000,000,000,000,000
9
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
static int tc_new_tfilter(struct sk_buff *skb, struct nlmsghdr *n, struct netlink_ext_ack *extack) { struct net *net = sock_net(skb->sk); struct nlattr *tca[TCA_MAX + 1]; char name[IFNAMSIZ]; struct tcmsg *t; u32 protocol; u32 prio; bool prio_allocate; u32 parent; u32 chain_index; struct Qdisc *q; struc...
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
38,285,839,982,934,763,000,000,000,000,000,000,000
233
net: sched: fix use-after-free in tc_new_tfilter() Whenever tc_new_tfilter() jumps back to replay: label, we need to make sure @q and @chain local variables are cleared again, or risk use-after-free as in [1] For consistency, apply the same fix in tc_ctl_chain() BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1...
int tc_setup_cb_reoffload(struct tcf_block *block, struct tcf_proto *tp, bool add, flow_setup_cb_t *cb, enum tc_setup_type type, void *type_data, void *cb_priv, u32 *flags, unsigned int *in_hw_count) { int err = cb(type, type_data, cb_priv); if (err) { if (add && tc_skip_sw(*flags)) return err; ...
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
69,963,037,653,715,240,000,000,000,000,000,000,000
17
net: sched: fix use-after-free in tc_new_tfilter() Whenever tc_new_tfilter() jumps back to replay: label, we need to make sure @q and @chain local variables are cleared again, or risk use-after-free as in [1] For consistency, apply the same fix in tc_ctl_chain() BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1...
static int ntop_correalate_host_activity(lua_State* vm) { NetworkInterfaceView *ntop_interface = getCurrentInterface(vm); char *host_ip; u_int16_t vlan_id = 0; char buf[64]; ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TSTRING)) return(C...
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
170,288,244,957,347,940,000,000,000,000,000,000,000
19
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
fetch_token_in_cc(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env) { int num; OnigCodePoint c, c2; OnigSyntaxType* syn = env->syntax; OnigEncoding enc = env->enc; UChar* prev; UChar* p = *src; PFETCH_READY; if (PEND) { tok->type = TK_EOT; return tok->type; } PFETCH(c); tok->type = ...
0
[ "CWE-787" ]
oniguruma
3b63d12038c8d8fc278e81c942fa9bec7c704c8b
67,858,855,898,241,925,000,000,000,000,000,000,000
245
fix #60 : invalid state(CCS_VALUE) in parse_char_class()
static BOOL rdg_process_channel_response(rdpRdg* rdg, wStream* s) { UINT16 fieldsPresent; UINT32 errorCode; const char* error; WLog_DBG(TAG, "Channel response received"); if (rdg->state != RDG_CLIENT_STATE_CHANNEL_CREATE) { return FALSE; } if (Stream_GetRemainingLength(s) < 8) { WLog_ERR(TAG, "[%s] Short...
0
[ "CWE-125" ]
FreeRDP
6b485b146a1b9d6ce72dfd7b5f36456c166e7a16
318,101,224,891,110,370,000,000,000,000,000,000,000
37
Fixed oob read in irp_write and similar
static inline bool cpu_has_vmx_virtualize_x2apic_mode(void) { return vmcs_config.cpu_based_2nd_exec_ctrl & SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE; }
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
221,905,200,319,661,000,000,000,000,000,000,000,000
5
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 ...
SPL_METHOD(SplFileInfo, setInfoClass) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(getThis()); zend_class_entry *ce = spl_ce_SplFileInfo; zend_error_handling error_handling; zend_replace_error_handling(EH_THROW, spl_ce_UnexpectedValueException, &error_handling ); if (zend_parse_parameters(ZEND_NUM_ARGS(),...
0
[ "CWE-74" ]
php-src
a5a15965da23c8e97657278fc8dfbf1dfb20c016
271,723,122,999,336,400,000,000,000,000,000,000,000
14
Fix #78863: DirectoryIterator class silently truncates after a null byte Since the constructor of DirectoryIterator and friends is supposed to accepts paths (i.e. strings without NUL bytes), we must not accept arbitrary strings.
e1000e_receive_iov(E1000ECore *core, const struct iovec *iov, int iovcnt) { static const int maximum_ethernet_hdr_len = (14 + 4); /* Min. octets in an ethernet frame sans FCS */ static const int min_buf_size = 60; uint32_t n = 0; uint8_t min_buf[min_buf_size]; struct iovec min_iov; uint8_t ...
0
[ "CWE-835" ]
qemu
4154c7e03fa55b4cf52509a83d50d6c09d743b77
4,823,720,703,984,323,500,000,000,000,000,000,000
113
net: e1000e: fix an infinite loop issue This issue is like the issue in e1000 network card addressed in this commit: e1000: eliminate infinite loops on out-of-bounds transfer start. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat....
string_swapcase(PyStringObject *self) { char *s = PyString_AS_STRING(self), *s_new; Py_ssize_t i, n = PyString_GET_SIZE(self); PyObject *newobj; newobj = PyString_FromStringAndSize(NULL, n); if (newobj == NULL) return NULL; s_new = PyString_AsString(newobj); for (i = 0; i < n; i++) ...
0
[ "CWE-190" ]
cpython
c3c9db89273fabc62ea1b48389d9a3000c1c03ae
120,288,566,346,268,580,000,000,000,000,000,000,000
24
[2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174)
static void nft_commit_release(struct nft_trans *trans) { switch (trans->msg_type) { case NFT_MSG_DELTABLE: nf_tables_table_destroy(&trans->ctx); break; case NFT_MSG_NEWCHAIN: free_percpu(nft_trans_chain_stats(trans)); kfree(nft_trans_chain_name(trans)); break; case NFT_MSG_DELCHAIN: nf_tables_chain_des...
0
[ "CWE-400", "CWE-703" ]
linux
e02f0d3970404bfea385b6edb86f2d936db0ea2b
253,694,597,076,387,500,000,000,000,000,000,000,000
43
netfilter: nf_tables: disallow binding to already bound chain Update nft_data_init() to report EINVAL if chain is already bound. Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Reported-by: Gwangun Jung <exsociety@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
virDomainTimerDefParseXML(xmlNodePtr node, xmlXPathContextPtr ctxt) { virDomainTimerDefPtr def; VIR_XPATH_NODE_AUTORESTORE(ctxt); xmlNodePtr catchup; int ret; g_autofree char *name = NULL; g_autofree char *present = NULL; g_autofree char *tickpolicy = NULL; g_au...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
40,414,830,093,459,280,000,000,000,000,000,000,000
117
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...
ActionReply Smb4KMountHelper::unmount(const QVariantMap &args) { ActionReply reply; // The mountpoint is a unique and can be used to // find the share. reply.addData("mh_mountpoint", args["mh_mountpoint"]); // Check if the mountpoint is valid and the file system is // also correct. bool mountpoint_ok = f...
1
[ "CWE-20" ]
smb4k
71554140bdaede27b95dbe4c9b5a028a83c83cce
113,968,403,363,198,100,000,000,000,000,000,000,000
108
Find the mount/umount commands in the helper Instead of trusting what we get passed in CVE-2017-8849
static void smbd_notify_cancel_by_map(struct notify_mid_map *map) { struct smb_request *smbreq = map->req->req; struct smbd_server_connection *sconn = smbreq->sconn; struct smbd_smb2_request *smb2req = smbreq->smb2req; NTSTATUS notify_status = NT_STATUS_CANCELLED; if (smb2req != NULL) { NTSTATUS sstatus; if ...
0
[ "CWE-266" ]
samba
f43ecce46a89c6380317fbb5f2ae38f48d3d42c8
158,985,065,159,182,060,000,000,000,000,000,000,000
33
s3: smbd: Ensure change notifies can't get set unless the directory handle is open for SEC_DIR_LIST. Remove knownfail entry. CVE-2020-14318 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14434 Signed-off-by: Jeremy Allison <jra@samba.org>
MagickExport Image *CoalesceImages(const Image *image,ExceptionInfo *exception) { Image *coalesce_image, *dispose_image, *previous; register Image *next; RectangleInfo bounds; /* Coalesce the image sequence. */ assert(image != (Image *) NULL); assert(image->signature == MagickCo...
0
[ "CWE-369" ]
ImageMagick
1ddcf2e4f28029a888cadef2e757509ef5047ad8
205,383,766,048,287,000,000,000,000,000,000,000,000
121
https://github.com/ImageMagick/ImageMagick/issues/1629
bool CModule::PutModNotice(const CString& sLine) { if (!m_pUser) return false; if (m_pClient) { m_pClient->PutModNotice(GetModName(), sLine); return true; } return m_pUser->PutModNotice(GetModName(), sLine); }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
17,907,005,633,534,520,000,000,000,000,000,000,000
10
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
NO_INLINE void jsExceptionHere_flash(JsExceptionType type, const char *ffmt, ...) { size_t len = flash_strlen(ffmt); char fmt[len+1]; flash_strncpy(fmt, ffmt, len+1); // If we already had an exception, forget this if (jspHasError()) return; jsiConsoleRemoveInputLine(); JsVar *var = jsvNewFromEmptyStrin...
0
[ "CWE-119", "CWE-787" ]
Espruino
0a7619875bf79877907205f6bee08465b89ff10b
178,226,619,946,603,800,000,000,000,000,000,000,000
43
Fix strncat/cpy bounding issues (fix #1425)
TEST_P(ConnectTerminationIntegrationTest, BasicMaxStreamDuration) { setUpstreamProtocol(upstreamProtocol()); config_helper_.addConfigModifier([](envoy::config::bootstrap::v3::Bootstrap& bootstrap) { ConfigHelper::HttpProtocolOptions protocol_options; protocol_options.mutable_common_http_protocol_options() ...
0
[ "CWE-416" ]
envoy
ce0ae309057a216aba031aff81c445c90c6ef145
260,875,921,317,944,500,000,000,000,000,000,000,000
24
CVE-2021-43826 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static void print_bits(unsigned long val, struct regbit *bits, const char *sep) { const char *s = ""; for (; bits->bit; ++bits) if (val & bits->bit) { pr_cont("%s%s", s, bits->name); s = sep; } }
0
[ "CWE-862" ]
linux
8205d5d98ef7f155de211f5e2eb6ca03d95a5a60
1,233,149,154,970,877,700,000,000,000,000,000,000
10
powerpc/tm: Fix FP/VMX unavailable exceptions inside a transaction When we take an FP unavailable exception in a transaction we have to account for the hardware FP TM checkpointed registers being incorrect. In this case for this process we know the current and checkpointed FP registers must be the same (since FP wasn'...
static __be32 nfsd4_encode_splice_read( struct nfsd4_compoundres *resp, struct nfsd4_read *read, struct file *file, unsigned long maxcount) { struct xdr_stream *xdr = &resp->xdr; struct xdr_buf *buf = xdr->buf; u32 eof; long len; int space_left; __be32 nfserr; __be32 *p = xdr->p - 2; /* Make sure t...
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
59,906,500,410,069,870,000,000,000,000,000,000,000
62
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
static timelib_sll timelib_meridian(char **ptr, timelib_sll h) { timelib_sll retval = 0; while (!strchr("AaPp", **ptr)) { ++*ptr; } if (**ptr == 'a' || **ptr == 'A') { if (h == 12) { retval = -12; } } else if (h != 12) { retval = 12; } ++*ptr; if (**ptr == '.') { ++*ptr; } if (**ptr == 'M' || **...
0
[ "CWE-125" ]
php-src
5c0455bf2c8cd3c25401407f158e820aa3b239e1
172,879,257,717,368,020,000,000,000,000,000,000,000
26
Merge branch 'PHP-7.0' into PHP-7.1 * PHP-7.0: Fixed bug #75055 Out-Of-Bounds Read in timelib_meridian() Apply upstream patch for CVE-2016-1283
int print_explain_message_line(select_result_sink *result, uint8 options, bool is_analyze, uint select_number, const char *select_type, ha_rows *rows, const char *m...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
324,949,781,555,560,380,000,000,000,000,000,000,000
60
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
static int vsock_stream_sendmsg(struct kiocb *kiocb, struct socket *sock, struct msghdr *msg, size_t len) { struct sock *sk; struct vsock_sock *vsk; ssize_t total_written; long timeout; int err; struct vsock_transport_send_notify_data send_data; DEFINE_WAIT(wait); sk = sock->sk; vsk = vsock_sk(sk); tota...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
97,197,748,629,966,600,000,000,000,000,000,000,000
136
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static int oidc_handle_authorization_response(request_rec *r, oidc_cfg *c, oidc_session_t *session, apr_table_t *params, const char *response_mode) { oidc_debug(r, "enter, response_mode=%s", response_mode); oidc_provider_t *provider = NULL; json_t *proto_state = NULL; oidc_jwt_t *jwt = NULL; /* see if this re...
0
[ "CWE-20" ]
mod_auth_openidc
612e309bfffd6f9b8ad7cdccda3019fc0865f3b4
258,495,072,050,448,940,000,000,000,000,000,000,000
125
don't echo query params on invalid requests to redirect URI; closes #212 thanks @LukasReschke; I'm sure there's some OWASP guideline that warns against this
*/ static void io_uring_del_task_file(unsigned long index) { struct io_uring_task *tctx = current->io_uring; struct io_tctx_node *node; if (!tctx) return; node = xa_erase(&tctx->xa, index); if (!node) return; WARN_ON_ONCE(current != node->task); WARN_ON_ONCE(list_empty(&node->ctx_node)); mutex_lock(&nod...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
90,936,191,103,523,460,000,000,000,000,000,000,000
22
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
void Inspect::operator()(Supports_Interpolation_Ptr sd) { sd->value()->perform(this); }
0
[ "CWE-476" ]
libsass
38f4c3699d06b64128bebc7cf1e8b3125be74dc4
19,533,299,004,267,117,000,000,000,000,000,000,000
4
Fix possible bug with handling empty reference combinators Fixes #2665
HTTPSession::updateWriteCount() { if (numActiveWrites_ > 0 && writesUnpaused()) { // Exceeded limit. Pause reading on the incoming stream. VLOG(3) << "Pausing egress for " << *this; writes_ = SocketState::PAUSED; } else if (numActiveWrites_ == 0 && writesPaused()) { // Dropped below limit. Resume re...
0
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
188,223,679,149,359,860,000,000,000,000,000,000,000
11
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
napi_status napi_get_named_property(napi_env env, napi_value object, const char* utf8name, napi_value* result) { NAPI_PREAMBLE(env); CHECK_ARG(env, result); v8::Local<v8::Context> context = env->context();...
0
[ "CWE-191" ]
node
656260b4b65fec3b10f6da3fdc9f11fb941aafb5
271,995,622,575,944,850,000,000,000,000,000,000,000
24
napi: fix memory corruption vulnerability Fixes: https://hackerone.com/reports/784186 CVE-ID: CVE-2020-8174 PR-URL: https://github.com/nodejs-private/node-private/pull/195 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_da...
TEST(DepthToSpaceOpModel, Uint8) { DepthToSpaceOpModel m({TensorType_UINT8, {1, 1, 2, 4}}, 2); m.SetInput<uint8_t>({1, 2, 3, 4, 5, 6, 7, 8}); m.Invoke(); EXPECT_THAT(m.GetOutput<uint8_t>(), ElementsAreArray({1, 2, 5, 6, 3, 4, 7, 8})); EXPECT_THAT(m.GetOutputShape(), ElementsAre(1, 2, 4, 1)); }
0
[ "CWE-369" ]
tensorflow
106d8f4fb89335a2c52d7c895b7a7485465ca8d9
335,216,364,009,365,280,000,000,000,000,000,000,000
8
Prevent division by 0 in TFLite PiperOrigin-RevId: 370800311 Change-Id: I21ccdbd31c30118acc67df8751807ee2e0b12f91
static const char *req_the_request_field(request_rec *r) { return r->the_request; }
0
[ "CWE-20" ]
httpd
78eb3b9235515652ed141353d98c239237030410
128,953,160,656,115,180,000,000,000,000,000,000,000
4
*) SECURITY: CVE-2015-0228 (cve.mitre.org) mod_lua: A maliciously crafted websockets PING after a script calls r:wsupgrade() can cause a child process crash. [Edward Lu <Chaosed0 gmail.com>] Discovered by Guido Vranken <guidovranken gmail.com> Submitted by: Edward Lu Committed by: covener git-svn-id...