func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static inline bool is_idle(struct f2fs_sb_info *sbi, int type) { if (sbi->gc_mode == GC_URGENT) return true; if (get_pages(sbi, F2FS_RD_DATA) || get_pages(sbi, F2FS_RD_NODE) || get_pages(sbi, F2FS_RD_META) || get_pages(sbi, F2FS_WB_DATA) || get_pages(sbi, F2FS_WB_CP_DATA) || get_pages(sbi, F2FS_DIO_READ) || ...
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
134,566,744,113,190,790,000,000,000,000,000,000,000
22
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static int ax25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { struct sock *sk = sock->sk; struct full_sockaddr_ax25 *addr = (struct full_sockaddr_ax25 *)uaddr; ax25_dev *ax25_dev = NULL; ax25_uid_assoc *user; ax25_address call; ax25_cb *ax25; int err = 0; if (addr_len != sizeof(struct socka...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
329,794,788,546,076,300,000,000,000,000,000,000,000
74
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...
generateSerialExtraStmts(CreateStmtContext *cxt, ColumnDef *column, Oid seqtypid, List *seqoptions, bool for_identity, bool col_exists, char **snamespace_p, char **sname_p) { ListCell *option; DefElem *nameEl = NULL; Oid snamespaceid; char *snamespace; char *sname; CreateSeqStmt ...
0
[ "CWE-94" ]
postgres
b9b21acc766db54d8c337d508d0fe2f5bf2daab0
313,748,955,308,951,340,000,000,000,000,000,000,000
154
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
static void nfs_mount_req(char *path) { uint32_t data[1024]; uint32_t *p; int len; int pathlen; pathlen = strlen(path); p = &(data[0]); p = rpc_add_credentials(p); *p++ = htonl(pathlen); if (pathlen & 3) *(p + pathlen / 4) = 0; memcpy(p, path, pathlen); p += (pathlen + 3) / 4; len = (uint32_t *)p - (u...
0
[ "CWE-120", "CWE-703" ]
u-boot
5d14ee4e53a81055d34ba280cb8fd90330f22a96
328,562,337,052,501,600,000,000,000,000,000,000,000
22
CVE-2019-14196: nfs: fix unbounded memcpy with a failed length check at nfs_lookup_reply This patch adds a check to rpc_pkt.u.reply.data at nfs_lookup_reply. Signed-off-by: Cheng Liu <liucheng32@huawei.com> Reported-by: Fermín Serna <fermin@semmle.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
static int X509_get_signature_nid(const X509 *x) { return OBJ_obj2nid(x->sig_alg->algorithm); }
0
[ "CWE-326" ]
php-src
0216630ea2815a5789a24279a1211ac398d4de79
166,140,868,038,256,330,000,000,000,000,000,000,000
4
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
ECDSA_PublicKey::create_verification_op(const std::string& params, const std::string& provider) const { #if defined(BOTAN_HAS_BEARSSL) if(provider == "bearssl" || provider.empty()) { try { return make_bearssl_ecdsa_ver_op(*this, params); ...
0
[ "CWE-200" ]
botan
48fc8df51d99f9d8ba251219367b3d629cc848e3
68,482,648,940,691,370,000,000,000,000,000,000,000
38
Address DSA/ECDSA side channel
const gr_faceinfo *gr_face_info(const gr_face *pFace, gr_uint32 script) { if (!pFace) return 0; const Silf *silf = pFace->chooseSilf(script); if (silf) return silf->silfInfo(); return 0; }
0
[ "CWE-476" ]
graphite
db132b4731a9b4c9534144ba3a18e65b390e9ff6
155,584,274,543,142,160,000,000,000,000,000,000,000
7
Deprecate and make ineffective gr_face_dumbRendering
cmsStage* CMSEXPORT cmsStageAllocCLut16bit(cmsContext ContextID, cmsUInt32Number nGridPoints, cmsUInt32Number inputChan, cmsUInt32Number outputChan, const cmsUInt16Number* Tabl...
0
[]
Little-CMS
b0d5ffd4ad91cf8683ee106f13742db3dc66599a
66,136,235,328,794,050,000,000,000,000,000,000,000
15
Memory Squeezing: LCMS2: CLUTElemDup Check for allocation failures and tidy up if found.
struct GuestFileSeek *qmp_guest_file_seek(int64_t handle, int64_t offset, GuestFileWhence *whence_code, Error **errp) { GuestFileHandle *gfh = guest_file_handle_find(handle, errp); GuestFileSeek *seek_data = NULL; FILE *fh; ...
0
[ "CWE-190" ]
qemu
141b197408ab398c4f474ac1a728ab316e921f2b
337,284,081,310,523,960,000,000,000,000,000,000,000
40
qga: check bytes count read by guest-file-read While reading file content via 'guest-file-read' command, 'qmp_guest_file_read' routine allocates buffer of count+1 bytes. It could overflow for large values of 'count'. Add check to avoid it. Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com> Signed-off-by: Pra...
uint32_t CompactProtocolWriter::writeFieldBegin( const char* name, TType fieldType, int16_t fieldId) { if (fieldType == TType::T_BOOL) { booleanField_.name = name; booleanField_.fieldType = fieldType; booleanField_.fieldId = fieldId; } else { return writeFieldBeginInternal(name, fieldTyp...
0
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
200,377,175,666,047,200,000,000,000,000,000,000,000
13
Better handling of truncated data when reading strings Summary: Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB). This diff changes the logic to check if we have enough data in the buffer bef...
longlong Item_func_last_value::val_int() { longlong tmp; evaluate_sideeffects(); tmp= last_value->val_int(); null_value= last_value->null_value; return tmp; }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
238,808,714,506,401,900,000,000,000,000,000,000,000
8
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
prepare_for_client_read(void) { if (DoingCommandRead) { /* Enable immediate processing of asynchronous signals */ EnableNotifyInterrupt(); EnableCatchupInterrupt(); /* Allow die interrupts to be processed while waiting */ ImmediateInterruptOK = true; /* And don't forget to detect one that already arrive...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
299,996,571,607,172,620,000,000,000,000,000,000,000
15
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
static int rfcomm_sock_connect(struct socket *sock, struct sockaddr *addr, int alen, int flags) { struct sockaddr_rc *sa = (struct sockaddr_rc *) addr; struct sock *sk = sock->sk; struct rfcomm_dlc *d = rfcomm_pi(sk)->dlc; int err = 0; BT_DBG("sk %p", sk); if (alen < sizeof(struct sockaddr_rc) || addr->sa_...
0
[ "CWE-476" ]
linux
951b6a0717db97ce420547222647bcc40bf1eacd
34,322,007,664,737,180,000,000,000,000,000,000,000
42
Bluetooth: Fix potential NULL dereference in RFCOMM bind callback addr can be NULL and it should not be dereferenced before NULL checking. Signed-off-by: Jaganath Kanakkassery <jaganath.k@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
static u64 vmx_read_l1_tsc(struct kvm_vcpu *vcpu, u64 host_tsc) { u64 tsc_offset; tsc_offset = is_guest_mode(vcpu) ? to_vmx(vcpu)->nested.vmcs01_tsc_offset : vmcs_read64(TSC_OFFSET); return host_tsc + tsc_offset; }
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
27,321,943,401,653,710,000,000,000,000,000,000,000
9
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 ...
static inline int blk_partition_remap(struct bio *bio) { struct hd_struct *p; int ret = -EIO; rcu_read_lock(); p = __disk_get_part(bio->bi_disk, bio->bi_partno); if (unlikely(!p)) goto out; if (unlikely(should_fail_request(p, bio->bi_iter.bi_size))) goto out; if (unlikely(bio_check_ro(bio, p))) goto out; ...
0
[ "CWE-416", "CWE-703" ]
linux
54648cf1ec2d7f4b6a71767799c45676a138ca24
6,942,977,711,014,559,000,000,000,000,000,000,000
31
block: blk_init_allocated_queue() set q->fq as NULL in the fail case We find the memory use-after-free issue in __blk_drain_queue() on the kernel 4.14. After read the latest kernel 4.18-rc6 we think it has the same problem. Memory is allocated for q->fq in the blk_init_allocated_queue(). If the elevator init function...
void MemoryInfo(MemoryTracker* tracker) const override { tracker->TrackField("stats_field_array", stats_field_array_); tracker->TrackField("continuation_data", continuation_data); }
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
20,350,919,336,038,824,000,000,000,000,000,000,000
4
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
size_store(struct mddev *mddev, const char *buf, size_t len) { /* If array is inactive, we can reduce the component size, but * not increase it (except from 0). * If array is active, we can try an on-line resize */ sector_t sectors; int err = strict_blocks_to_sectors(buf, &sectors); if (err < 0) return err...
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
34,561,261,517,347,815,000,000,000,000,000,000,000
31
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
rfbSendLastRectMarker(rfbClientPtr cl) { rfbFramebufferUpdateRectHeader rect; if (cl->ublen + sz_rfbFramebufferUpdateRectHeader > UPDATE_BUF_SIZE) { if (!rfbSendUpdateBuf(cl)) return FALSE; } rect.encoding = Swap32IfLE(rfbEncodingLastRect); rect.r.x = 0; rect.r.y = 0; rect.r.w = 0; ...
0
[ "CWE-119" ]
vino
dff52694a384fe95195f2211254026b752d63ec4
197,534,742,918,594,120,000,000,000,000,000,000,000
23
Avoid out-of-bounds memory accesses This fixes two critical security vulnerabilities that lead to an out-of-bounds memory access with a crafted client framebuffer update request packet. The dimensions of the update from the packet are checked to ensure that they are within the screen dimensions. Thanks to Kevin Chen ...
isdn_net_force_dial_lp(isdn_net_local * lp) { if ((!(lp->flags & ISDN_NET_CONNECTED)) && !lp->dialstate) { int chi; if (lp->phone[1]) { ulong flags; /* Grab a free ISDN-Channel */ spin_lock_irqsave(&dev->lock, flags); if ((chi = isdn_get_free_channel( ISDN_USAGE_NET, lp->l2_proto, lp->l...
0
[ "CWE-119" ]
linux-2.6
0f13864e5b24d9cbe18d125d41bfa4b726a82e40
217,138,410,945,673,460,000,000,000,000,000,000,000
41
isdn: avoid copying overly-long strings Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9416 Signed-off-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
PHP_FUNCTION(imagesx) { zval *IM; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &IM) == FAILURE) { return; } if ((im = (gdImagePtr)zend_fetch_resource(Z_RES_P(IM), "Image", le_gd)) == NULL) { RETURN_FALSE; } RETURN_LONG(gdImageSX(im)); }
0
[ "CWE-787" ]
php-src
28022c9b1fd937436ab67bb3d61f652c108baf96
313,100,434,616,085,670,000,000,000,000,000,000,000
15
Fix bug#72697 - select_colors write out-of-bounds (cherry picked from commit b6f13a5ef9d6280cf984826a5de012a32c396cd4) Conflicts: ext/gd/gd.c
LOG_OpenFileLog(const char *log_file) { FILE *f; if (log_file) { f = fopen(log_file, "a"); if (!f) LOG_FATAL("Could not open log file %s", log_file); } else { f = stderr; } /* Enable line buffering */ setvbuf(f, NULL, _IOLBF, BUFSIZ); if (file_log && file_log != stderr) fclose(fil...
1
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
297,550,046,716,740,420,000,000,000,000,000,000,000
20
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
xmlChar * xmlXPathParseName(xmlXPathParserContextPtr ctxt) { const xmlChar *in; xmlChar *ret; size_t count = 0; if ((ctxt == NULL) || (ctxt->cur == NULL)) return(NULL); /* * Accelerator for simple ASCII names */ in = ctxt->cur; if (((*in >= 0x61) && (*in <= 0x7A)) || ((*in >= 0x...
0
[]
libxml2
03c6723043775122313f107695066e5744189a08
241,187,821,285,139,180,000,000,000,000,000,000,000
33
Handling of XPath function arguments in error case The XPath engine tries to guarantee that every XPath function can pop 'nargs' non-NULL values off the stack. libxslt, for example, relies on this assumption. But the check isn't thorough enough if there are errors during the evaluation of arguments. This can lead to s...
void LibRaw::identify_process_dng_fields() { if (!dng_version) return; int c; { /* copy DNG data from per-IFD field to color.dng */ int iifd = find_ifd_by_offset(data_offset); int pifd = find_ifd_by_offset(thumb_offset); #define CFAROUND(value, filters) \ filter...
0
[ "CWE-787" ]
LibRaw
4feaed4dea636cee4fee010f615881ccf76a096d
37,186,369,853,422,380,000,000,000,000,000,000,000
344
limit loops to MIN(colors,4) in dng fields parser
static int virtnet_change_mtu(struct net_device *dev, int new_mtu) { if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) return -EINVAL; dev->mtu = new_mtu; return 0; }
0
[ "CWE-119", "CWE-787" ]
linux
48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39
321,381,022,351,712,500,000,000,000,000,000,000,000
7
virtio-net: drop NETIF_F_FRAGLIST virtio declares support for NETIF_F_FRAGLIST, but assumes that there are at most MAX_SKB_FRAGS + 2 fragments which isn't always true with a fraglist. A longer fraglist in the skb will make the call to skb_to_sgvec overflow the sg array, leading to memory corruption. Drop NETIF_F_FRA...
static int common_perm(int op, struct path *path, u32 mask, struct path_cond *cond) { struct aa_profile *profile; int error = 0; profile = __aa_current_profile(); if (!unconfined(profile)) error = aa_path_perm(op, profile, path, 0, mask, cond); return error; }
0
[ "CWE-20" ]
linux
a5b2c5b2ad5853591a6cac6134cd0f599a720865
253,007,469,796,832,550,000,000,000,000,000,000,000
12
AppArmor: fix oops in apparmor_setprocattr When invalid parameters are passed to apparmor_setprocattr a NULL deref oops occurs when it tries to record an audit message. This is because it is passing NULL for the profile parameter for aa_audit. But aa_audit now requires that the profile passed is not NULL. Fix this by...
dfafree (struct dfa *d) { int i; struct dfamust *dm, *ndm; free(d->charclasses); free(d->tokens); if (d->mb_cur_max > 1) free_mbdata(d); for (i = 0; i < d->sindex; ++i) { free(d->states[i].elems.elems); if (MBS_SUPPORT) free(d->states[i].mbps.elems); } free(d->states); for (i = 0;...
1
[ "CWE-189" ]
grep
cbbc1a45b9f843c811905c97c90a5d31f8e6c189
282,493,085,083,063,700,000,000,000,000,000,000,000
36
grep: fix some core dumps with long lines etc. These problems mostly occur because the code attempts to stuff sizes into int or into unsigned int; this doesn't work on most 64-bit hosts and the errors can lead to core dumps. * NEWS: Document this. * src/dfa.c (token): Typedef to ptrdiff_t, since the enum's range could...
static int wolfssl_init(void) { #ifdef OPENSSL_EXTRA Curl_tls_keylog_open(); #endif return (wolfSSL_Init() == SSL_SUCCESS); }
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
103,501,722,066,591,840,000,000,000,000,000,000,000
7
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
**/ T& atNXY(const int pos, const int x, const int y, const int z=0, const int c=0) { if (is_empty()) throw CImgInstanceException(_cimglist_instance "atNXY(): Empty instance.", cimglist_instance); return _atNXY(pos,x,y,...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
120,714,253,976,375,640,000,000,000,000,000,000,000
8
Fix other issues in 'CImg<T>::load_bmp()'.
static int do_newsgroups(char *name, void *rock) { struct list_rock *lrock = (struct list_rock *) rock; struct mboxlist_entry *mbentry = NULL; int r; r = mlookup(name, &mbentry); if (r || !mbentry->acl || !(cyrus_acl_myrights(nntp_authstate, mbentry->acl) && ACL_LOOKUP)) { mboxlist_entry_free(&m...
0
[ "CWE-119" ]
cyrus-imapd
0f8f026699829b65733c3081657b24e2174f4f4d
137,443,464,666,905,260,000,000,000,000,000,000,000
30
CVE-2011-3208 - fix buffer overflow in nntpd
static int sctp_getsockopt_active_key(struct sock *sk, int len, char __user *optval, int __user *optlen) { struct sctp_endpoint *ep = sctp_sk(sk)->ep; struct sctp_authkeyid val; struct sctp_association *asoc; if (len < sizeof(struct sctp_authkeyid)) return -EINVAL; len = sizeof(struct sctp_authkeyid); ...
0
[ "CWE-362" ]
linux
b166a20b07382b8bc1dcee2a448715c9c2c81b5b
52,836,793,059,872,810,000,000,000,000,000,000,000
35
net/sctp: fix race condition in sctp_destroy_sock If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock held and sp->do_auto_asconf is true, then an element is removed from the auto_asconf_splist without any proper locking. This can happen in the following functions: 1. In sctp_accept, if sctp_sock_m...
TEST_P(Http2UpstreamIntegrationTest, LargeResponseHeadersRejected) { initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); Http::TestResponseHeaderMapImpl large_headers(default_response_headers_); large_headers.addCopy("large", std::string(60 * 1024, 'a')); auto response = codec_client_->make...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
151,778,924,005,152,130,000,000,000,000,000,000,000
14
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
static void device_links_flush_sync_list(struct list_head *list, struct device *dont_lock_dev) { struct device *dev, *tmp; list_for_each_entry_safe(dev, tmp, list, links.defer_hook) { list_del_init(&dev->links.defer_hook); if (dev != dont_lock_dev) device_lock(dev); if (dev->bus->sync_state) dev-...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
206,510,983,402,682,800,000,000,000,000,000,000,000
22
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
void bnx2x_update_coalesce(struct bnx2x *bp) { int i; for_each_eth_queue(bp, i) bnx2x_update_coalesce_sb(bp, bp->fp[i].fw_sb_id, bp->tx_ticks, bp->rx_ticks); }
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
210,052,106,612,940,430,000,000,000,000,000,000,000
8
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
static void enter_rmode(struct kvm_vcpu *vcpu) { unsigned long flags; struct vcpu_vmx *vmx = to_vmx(vcpu); if (enable_unrestricted_guest) return; vmx->emulation_required = 1; vmx->rmode.vm86_active = 1; vmx->rmode.tr.base = vmcs_readl(GUEST_TR_BASE); vmcs_writel(GUEST_TR_BASE, rmode_tss_base(vcpu->kvm)); ...
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
79,832,745,791,294,420,000,000,000,000,000,000,000
51
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-...
void Http2Session::EmitStatistics() { if (!HasHttp2Observer(env())) return; Http2SessionPerformanceEntry* entry = new Http2SessionPerformanceEntry(env(), statistics_, session_type_); env()->SetImmediate([](Environment* env, void* data) { // This takes ownership, the entr is destroyed at the end of thi...
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
185,893,493,577,016,560,000,000,000,000,000,000,000
28
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
static void update_idle_timeout(h2o_http2_conn_t *conn) { h2o_timeout_unlink(&conn->_timeout_entry); if (conn->num_streams.pull.half_closed + conn->num_streams.push.half_closed == 0) { assert(h2o_linklist_is_empty(&conn->_pending_reqs)); conn->_timeout_entry.cb = on_idle_timeout; h2o_ti...
0
[ "CWE-703" ]
h2o
1c0808d580da09fdec5a9a74ff09e103ea058dd4
287,336,411,391,335,000,000,000,000,000,000,000,000
10
h2: use after free on premature connection close #920 lib/http2/connection.c:on_read() calls parse_input(), which might free `conn`. It does so in particular if the connection preface isn't the expected one in expect_preface(). `conn` is then used after the free in `if (h2o_timeout_is_linked(&conn->_write.timeout_entr...
static int vp8_lossy_decode_alpha(AVCodecContext *avctx, AVFrame *p, uint8_t *data_start, unsigned int data_size) { WebPContext *s = avctx->priv_data; int x, y, ret; if (s->alpha_compression == ALPHA_COMPRESSION_NONE) { GetByteCont...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef
223,155,019,525,926,940,000,000,000,000,000,000,000
52
avcodec/webp: Always set pix_fmt Fixes: out of array access Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632 Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: "Ronald S. Bultje" <rsbult...
dissect_kafka_create_partitions_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version) { proto_item *subti; proto_tree *subtree; offset = dissect_kafka_throttle_time(tvb, pinfo, tree, offset); subtree = proto_...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
321,259,186,687,795,430,000,000,000,000,000,000,000
21
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
static int lxc_attach_remount_sys_proc(void) { int ret; ret = unshare(CLONE_NEWNS); if (ret < 0) { SYSERROR("failed to unshare mount namespace"); return -1; } if (detect_shared_rootfs()) { if (mount(NULL, "/", NULL, MS_SLAVE|MS_REC, NULL)) { SYSERROR("Failed to make / rslave"); ERROR("Continuing...")...
0
[ "CWE-17" ]
lxc
5c3fcae78b63ac9dd56e36075903921bd9461f9e
183,934,763,454,189,460,000,000,000,000,000,000,000
49
CVE-2015-1334: Don't use the container's /proc during attach A user could otherwise over-mount /proc and prevent the apparmor profile or selinux label from being written which combined with a modified /bin/sh or other commonly used binary would lead to unconfined code execution. Reported-by: Roman Fiedler Signed-off-...
SetArrayData ( IN VOID *Array, IN UINT8 Type, IN UINTN Index, IN UINT64 Value ) { ASSERT (Array != NULL); switch (Type) { case EFI_IFR_TYPE_NUM_SIZE_8: *(((UINT8 *) Array) + Index) = (UINT8) Value; break; ...
0
[]
edk2
f1d78c489a39971b5aac5d2fc8a39bfa925c3c5d
271,975,919,956,490,270,000,000,000,000,000,000,000
31
MdeModulePkg/DisplayEngine: Zero memory before free (CVE-2019-14558) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1611 Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.do...
unsigned long SSL_CIPHER_get_id(const SSL_CIPHER *c) { return c->id; }
0
[]
openssl
0ffa49970b9f8ea66b43ce2eb7f8fd523b65bc2c
167,571,735,020,763,540,000,000,000,000,000,000,000
4
Backport support for fixed DH ciphersuites (from HEAD)
static inline Quantum GetPixelCr(const Image *restrict image, const Quantum *restrict pixel) { return(pixel[image->channel_map[CrPixelChannel].offset]); }
0
[ "CWE-119", "CWE-787" ]
ImageMagick
450bd716ed3b9186dd10f9e60f630a3d9eeea2a4
39,999,839,711,877,500,000,000,000,000,000,000,000
5
static int ipv6_route_yield(struct fib6_walker *w) { struct ipv6_route_iter *iter = w->args; if (!iter->skip) return 1; do { iter->w.leaf = rcu_dereference_protected( iter->w.leaf->fib6_next, lockdep_is_held(&iter->tbl->tb6_lock)); iter->skip--; if (!iter->skip && iter->w.leaf) return 1; } whil...
0
[ "CWE-755" ]
linux
7b09c2d052db4b4ad0b27b97918b46a7746966fa
103,246,074,379,172,500,000,000,000,000,000,000,000
18
ipv6: fix a typo in fib6_rule_lookup() Yi Ren reported an issue discovered by syzkaller, and bisected to the cited commit. Many thanks to Yi, this trivial patch does not reflect the patient work that has been done. Fixes: d64a1f574a29 ("ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic") Signed-off-by: Eric Du...
char *pwcheck(userid, password) char *userid; char *password; { char* r; struct passwd *pwd; pwd = getpwnam(userid); if (!pwd) { r = "Userid not found"; } else if (pwd->pw_passwd[0] == '*') { r = "Account disabled"; } else if (strcmp(pwd->pw_passwd, crypt(password, pwd->pw_passwd)) !=...
1
[ "CWE-189" ]
cyrus-sasl
dedad73e5e7a75d01a5f3d5a6702ab8ccd2ff40d
254,472,465,964,011,330,000,000,000,000,000,000,000
25
Handle NULL returns from glibc 2.17+ crypt() Starting with glibc 2.17 (eglibc 2.17), crypt() fails with EINVAL (w/ NULL return) if the salt violates specifications. Additionally, on FIPS-140 enabled Linux systems, DES/MD5-encrypted passwords passed to crypt() fail with EPERM (w/ NULL return). When using glibc's crypt...
static void armpmu_start(struct perf_event *event, int flags) { struct arm_pmu *armpmu = to_arm_pmu(event->pmu); struct hw_perf_event *hwc = &event->hw; /* * ARM pmu always has to reprogram the period, so ignore * PERF_EF_RELOAD, see the comment below. */ if (flags & PERF_EF_RELOAD) WARN_ON_ONCE(!(hwc->sta...
0
[ "CWE-20" ]
linux
c95eb3184ea1a3a2551df57190c81da695e2144b
103,466,839,294,484,970,000,000,000,000,000,000,000
23
ARM: 7809/1: perf: fix event validation for software group leaders It is possible to construct an event group with a software event as a group leader and then subsequently add a hardware event to the group. This results in the event group being validated by adding all members of the group to a fake PMU and attempting ...
void radeon_atom_initialize_bios_scratch_regs(struct drm_device *dev) { struct radeon_device *rdev = dev->dev_private; uint32_t bios_2_scratch, bios_6_scratch; if (rdev->family >= CHIP_R600) { bios_2_scratch = RREG32(R600_BIOS_2_SCRATCH); bios_6_scratch = RREG32(R600_BIOS_6_SCRATCH); } else { bios_2_scratch ...
0
[ "CWE-119", "CWE-193" ]
linux
0031c41be5c529f8329e327b63cde92ba1284842
34,647,134,107,026,137,000,000,000,000,000,000,000
28
drivers/gpu/drm/radeon/radeon_atombios.c: range check issues This change makes the array larger, "MAX_SUPPORTED_TV_TIMING_V1_2" is 3 and the original size "MAX_SUPPORTED_TV_TIMING" is 2. Also there were checks that were off by one. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Alex Deucher <alexdeucher@...
long keyctl_join_session_keyring(const char __user *_name) { char *name; long ret; /* fetch the name from userspace */ name = NULL; if (_name) { name = strndup_user(_name, PAGE_SIZE); if (IS_ERR(name)) { ret = PTR_ERR(name); goto error; } } /* join the session */ ret = join_session_keyring(name); ...
1
[ "CWE-399" ]
linux-2.6
0d54ee1c7850a954026deec4cd4885f331da35cc
58,467,617,373,497,890,000,000,000,000,000,000,000
22
security: introduce missing kfree Plug this leak. Acked-by: David Howells <dhowells@redhat.com> Cc: James Morris <jmorris@namei.org> Cc: <stable@kernel.org> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
int X509_check_trust(X509 *x, int id, int flags) { X509_TRUST *pt; int idx; /* We get this as a default value */ if (id == X509_TRUST_DEFAULT) return obj_trust(NID_anyExtendedKeyUsage, x, flags | X509_TRUST_DO_SS_COMPAT); idx = X509_TRUST_get_by_id(id); if (idx ...
0
[]
openssl
33cc5dde478ba5ad79f8fd4acd8737f0e60e236e
13,254,278,113,293,705,000,000,000,000,000,000,000
15
Compat self-signed trust with reject-only aux data When auxiliary data contains only reject entries, continue to trust self-signed objects just as when no auxiliary data is present. This makes it possible to reject specific uses without changing what's accepted (and thus overring the underlying EKU). Added new suppo...
unsigned char *ziplistResize(unsigned char *zl, size_t len) { assert(len < UINT32_MAX); zl = zrealloc(zl,len); ZIPLIST_BYTES(zl) = intrev32ifbe(len); zl[len-1] = ZIP_END; return zl; }
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
164,130,882,709,526,140,000,000,000,000,000,000,000
7
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
skipwhite_and_linebreak(char_u *arg, evalarg_T *evalarg) { int getnext; char_u *p = skipwhite_and_nl(arg); if (evalarg == NULL) return skipwhite(arg); eval_next_non_blank(p, evalarg, &getnext); if (getnext) return eval_next_line(evalarg); return p; }
0
[ "CWE-122", "CWE-787" ]
vim
605ec91e5a7330d61be313637e495fa02a6dc264
38,261,786,546,692,650,000,000,000,000,000,000,000
12
patch 8.2.3847: illegal memory access when using a lambda with an error Problem: Illegal memory access when using a lambda with an error. Solution: Avoid skipping over the NUL after a string.
init_filter (cherokee_validator_ldap_t *ldap, cherokee_validator_ldap_props_t *props, cherokee_connection_t *conn) { if (cherokee_buffer_is_empty (&props->filter)) { TRACE (ENTRIES, "Empty filter: %s\n", "Ignoring it"); return ret_ok; } cherokee_buffer_ensure_size (&ldap->filter, pro...
0
[ "CWE-287" ]
webserver
fbda667221c51f0aa476a02366e0cf66cb012f88
267,394,808,642,478,900,000,000,000,000,000,000,000
16
Prevent the LDAP validator from accepting an empty password.
static void disconnected_callback(uint16_t index, uint16_t length, const void *param, void *user_data) { const struct mgmt_ev_device_disconnected *ev = param; struct btd_adapter *adapter = user_data; uint8_t reason; if (length < sizeof(struct mgmt_addr_info)) { btd_error(adapter->dev_id, "Too small devi...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
119,353,876,409,494,290,000,000,000,000,000,000,000
20
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
set_mml(MinMaxLen* mml, OnigDistance min, OnigDistance max) { mml->min = min; mml->max = max; }
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
72,990,771,056,269,960,000,000,000,000,000,000,000
5
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
void unlock_rename(struct dentry *p1, struct dentry *p2) { inode_unlock(p1->d_inode); if (p1 != p2) { inode_unlock(p2->d_inode); mutex_unlock(&p1->d_sb->s_vfs_rename_mutex); } }
0
[ "CWE-362", "CWE-399" ]
linux
49d31c2f389acfe83417083e1208422b4091cd9e
338,973,691,251,908,630,000,000,000,000,000,000,000
8
dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same st...
static int external_grep(struct grep_opt *opt, const char **paths, int cached) { int i, nr, argc, hit, len, status; const char *argv[MAXARGS+1]; char randarg[ARGBUF]; char *argptr = randarg; struct grep_pat *p; if (opt->extended || (opt->relative && opt->prefix_length)) return -1; len = nr = 0; push_arg("gre...
0
[]
git
620e2bb93785ed8eb60846d94fd4753d4817c8ec
8,244,171,449,665,246,000,000,000,000,000,000,000
105
Fix buffer overflow in git-grep If PATH_MAX on your system is smaller than any path stored in the git repository, that can cause memory corruption inside of the grep_tree function used by git-grep. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
void *SSL_CTX_get0_security_ex_data(const SSL_CTX *ctx) { return ctx->cert->sec_ex; }
0
[ "CWE-310" ]
openssl
cf6da05304d554aaa885151451aa4ecaa977e601
262,830,887,275,489,930,000,000,000,000,000,000,000
4
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
bool run(OperationContext* opCtx, const string& dbname, const BSONObj& cmdObj, BSONObjBuilder& result) { RoleName roleName; Status status = auth::parseDropRoleCommand(cmdObj, dbname, &roleName); if (!status.isOK()) { return appendCommandStat...
0
[ "CWE-613" ]
mongo
db19e7ce84cfd702a4ba9983ee2ea5019f470f82
39,671,582,478,411,994,000,000,000,000,000,000,000
122
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
static char get_next_file(int imageno, dircnt_t *dirptr, img_fol_t *img_fol, opj_cparameters_t *parameters) { char image_filename[OPJ_PATH_LEN], infilename[OPJ_PATH_LEN], outfilename[OPJ_PATH_LEN], temp_ofname[OPJ_PATH_LEN]; char *temp_p, temp1[OPJ_PATH_LEN] = ""; strcpy(...
0
[ "CWE-20" ]
openjpeg
4edb8c83374f52cd6a8f2c7c875e8ffacccb5fa5
39,608,327,648,825,640,000,000,000,000,000,000,000
35
Add support for generation of PLT markers in encoder * -PLT switch added to opj_compress * Add a opj_encoder_set_extra_options() function that accepts a PLT=YES option, and could be expanded later for other uses. ------- Testing with a Sentinel2 10m band, T36JTT_20160914T074612_B02.jp2, coming from S2A_MSIL1C_20...
bool OSDService::inc_scrubs_pending() { bool result = false; sched_scrub_lock.Lock(); if (scrubs_pending + scrubs_active < cct->_conf->osd_max_scrubs) { dout(20) << "inc_scrubs_pending " << scrubs_pending << " -> " << (scrubs_pending+1) << " (max " << cct->_conf->osd_max_scrubs << ", active " << scrubs...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
333,957,948,315,660,100,000,000,000,000,000,000,000
17
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 ...
void CompactProtocolReader::readStringSize(int32_t& size) { apache::thrift::util::readVarint(in_, size); // Catch error cases if (size < 0) { TProtocolException::throwNegativeSize(); } if (string_limit_ > 0 && size > string_limit_) { TProtocolException::throwExceededSizeLimit(); } }
0
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
138,568,985,821,695,460,000,000,000,000,000,000,000
11
Better handling of truncated data when reading strings Summary: Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB). This diff changes the logic to check if we have enough data in the buffer bef...
static int _too_many_flags(const char *flag, int num) { if (num < 100) return 0; if (num >= MAX_USER_FLAGS) return 1; int too_many = 1; /* check if this is a required user flag */ const char *val = config_getstring(IMAPOPT_MAILBOX_INITIAL_FLAGS); if (val) { strarray_t *flags = strarray_...
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
191,998,840,341,650,140,000,000,000,000,000,000,000
18
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
static void vidtv_s302m_write_frames(struct vidtv_encoder *e) { struct vidtv_access_unit *au = e->access_units; struct vidtv_s302m_ctx *ctx = e->ctx; u32 nbytes_per_unit = 0; u32 nbytes = 0; u32 au_sz = 0; u16 sample; u32 j; while (au) { au_sz = au->num_samples * sizeof(struct vidtv_s302m_frame_16); nb...
0
[ "CWE-476" ]
linux
e6a21a14106d9718aa4f8e115b1e474888eeba44
126,848,745,613,414,100,000,000,000,000,000,000,000
43
media: vidtv: Check for null return of vzalloc As the possible failure of the vzalloc(), e->encoder_buf might be NULL. Therefore, it should be better to check it in order to guarantee the success of the initialization. If fails, we need to free not only 'e' but also 'e->name'. Also, if the allocation for ctx fails, we...
lou_charToDots(const char *tableList, const widechar *inbuf, widechar *outbuf, int length, int mode) { const TranslationTableHeader *table; int k; if (tableList == NULL || inbuf == NULL || outbuf == NULL) return 0; table = lou_getTable(tableList); if (table == NULL || length <= 0) return 0; for (k = 0; k < len...
0
[ "CWE-125" ]
liblouis
5e4089659bb49b3095fa541fa6387b4c40d7396e
237,643,665,006,663,300,000,000,000,000,000,000,000
15
Fix a buffer overflow Fixes #635 Thanks to HongxuChen for reporting it
static sctp_disposition_t sctp_sf_do_dupcook_a(struct net *net, const struct sctp_endpoint *ep, const struct sctp_association *asoc, struct sctp_chunk *chunk, sctp_cmd_seq_t *commands, struct sctp_association *new_asoc) { sctp_init_chunk_t *peer_init; struct sctp_ulpevent *ev; struct sctp_ch...
0
[]
linux
196d67593439b03088913227093e374235596e33
327,937,332,696,069,970,000,000,000,000,000,000,000
91
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
static struct file *__io_file_get(struct io_submit_state *state, int fd) { if (!state) return fget(fd); if (state->file) { if (state->fd == fd) { state->has_refs--; state->ios_left--; return state->file; } __io_state_file_put(state); } state->file = fget_many(fd, state->ios_left); if (!state->fil...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
205,571,927,618,474,160,000,000,000,000,000,000,000
22
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
static void __tipc_node_link_up(struct tipc_node *n, int bearer_id, struct sk_buff_head *xmitq) { int *slot0 = &n->active_links[0]; int *slot1 = &n->active_links[1]; struct tipc_link *ol = node_active_link(n, 0); struct tipc_link *nl = n->links[bearer_id].link; if (!nl || tipc_link_is_up(nl)) return; tipc...
0
[]
linux
0217ed2848e8538bcf9172d97ed2eeb4a26041bb
319,080,340,730,130,380,000,000,000,000,000,000,000
60
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 _...
Magick::ColorspaceType Magick::Image::colorSpace(void) const { return (constImage()->colorspace); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
316,618,649,089,266,330,000,000,000,000,000,000,000
4
Added missing return to avoid use after free.
uint64_t max_cluster_duration() const { return max_cluster_duration_; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
90,485,676,321,891,920,000,000,000,000,000,000,000
1
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
static GvnBasicBlockState* CreateEntry(Zone* zone, HBasicBlock* entry_block, HValueMap* entry_map) { return new(zone) GvnBasicBlockState(NULL, entry_block, entry_map, NULL, zone); }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
135,117,859,460,022,930,000,000,000,000,000,000,000
6
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
static struct DATAOBJECT *findDataobject(struct READER *reader, uint64_t address) { struct DATAOBJECT *p = reader->all; while (p && p->address != address) p = p->all; return p; }
0
[ "CWE-787" ]
libmysofa
890400ebd092c574707d0c132124f8ff047e20e1
211,442,547,397,145,700,000,000,000,000,000,000,000
8
Fix for issue 163
TRIO_PRIVATE void TrioGetCollation(TRIO_NOARGS) { int i; int j; int k; char first[2]; char second[2]; /* This is computationally expensive */ first[1] = NIL; second[1] = NIL; for (i = 0; i < MAX_CHARACTER_CLASS; i++) { k = 0; first[0] = (char)i; for (j = 0; j < MAX_CHARACTER_CLASS; j++) { second[0...
0
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
155,459,730,969,232,970,000,000,000,000,000,000,000
24
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.
FindFreeTcpPort(void) { rfbSocket sock; int port; struct sockaddr_in addr; addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl(INADDR_ANY); sock = socket(AF_INET, SOCK_STREAM, 0); if (sock == RFB_INVALID_SOCKET) { rfbClientErr(": FindFreeTcpPort: socket\n"); return 0; } for (port = TUNN...
0
[ "CWE-703", "CWE-835" ]
libvncserver
57433015f856cc12753378254ce4f1c78f5d9c7b
5,389,018,532,555,582,000,000,000,000,000,000,000
26
libvncclient: handle half-open TCP connections When a connection is not reset properly at the TCP level (e.g. sudden power loss or process crash) the TCP connection becomes half-open and read() always returns -1 with errno = EAGAIN while select() always returns 0. This leads to an infinite loop and can be fixed by clo...
TEST(ExpressionMergeObjects, MergingDisjointObjectsShouldIncludeAllFields) { auto first = Document({{"a", 1}, {"b", 1}}); auto second = Document({{"c", 1}}); assertExpectedResults("$mergeObjects", {{{first, second}, Document({{"a", 1}, {"b", 1}, {"c", 1}})}}); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
111,428,772,953,729,170,000,000,000,000,000,000,000
6
SERVER-38070 fix infinite loop in agg expression
term_write_session(FILE *fd, win_T *wp) { term_T *term = wp->w_buffer->b_term; /* Create the terminal and run the command. This is not without * risk, but let's assume the user only creates a session when this * will be OK. */ if (fprintf(fd, "terminal ++curwin ++cols=%d ++rows=%d ", term->tl_...
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
66,794,014,447,485,440,000,000,000,000,000,000,000
15
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
do_exmode( int improved) // TRUE for "improved Ex" mode { int save_msg_scroll; int prev_msg_row; linenr_T prev_line; varnumber_T changedtick; if (improved) exmode_active = EXMODE_VIM; else exmode_active = EXMODE_NORMAL; State = NORMAL; trigger_modechanged(); // When us...
0
[ "CWE-122" ]
vim
35a319b77f897744eec1155b736e9372c9c5575f
36,610,937,276,938,733,000,000,000,000,000,000,000
91
patch 8.2.3489: ml_get error after search with range Problem: ml_get error after search with range. Solution: Limit the line number to the buffer line count.
bool Tensor::IsInitialized() const { return (buf_ != nullptr && buf_->data() != nullptr) || shape_.num_elements() == 0; }
0
[ "CWE-345" ]
tensorflow
abcced051cb1bd8fb05046ac3b6023a7ebcc4578
200,351,423,291,099,660,000,000,000,000,000,000,000
4
Prevent crashes when loading tensor slices with unsupported types. Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL) messages for the unset and unsupported types. PiperOrigin-RevId: 392695027 Change-Id: I4beda7db950db951d273e3259a7c8534ece49354
makeLengthError(const char *pdu, unsigned long bufSize, unsigned long minSize, unsigned long length) { OFStringStream stream; stream << "DUL Illegal " << pdu << ". Got " << bufSize << " bytes of data"; if (length != 0) stream << " with a length field of " << length << " (data before length f...
0
[ "CWE-415", "CWE-703", "CWE-401" ]
dcmtk
a9697dfeb672b0b9412c00c7d36d801e27ec85cb
173,716,481,345,424,240,000,000,000,000,000,000,000
17
Fixed poss. NULL pointer dereference/double free. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches.
int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len) { const unsigned char *buf = buf_; int tot; unsigned int n, split_send_fragment, maxpipes; #if !defined(OPENSSL_NO_MULTIBLOCK) && EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK unsigned int max_send_fragment, nw; unsigned int u_len = (unsigned int)l...
1
[ "CWE-20" ]
openssl
4ad93618d26a3ea23d36ad5498ff4f59eff3a4d2
69,510,764,376,652,340,000,000,000,000,000,000,000
282
Don't change the state of the ETM flags until CCS processing Changing the ciphersuite during a renegotiation can result in a crash leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS so this is TLS only. The problem is caused by changing the flag indicating whether to use ETM or not immediately on...
void LinkResolver::lookup_method_in_klasses(methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature, bool checkpolymorphism, bool in_imethod_resolve, TRAPS) { // Ignore overpasses so statics can be found during resolution Method* result_oop = klass->uncached_lookup_method(name, signature, Klass::sk...
0
[]
jdk8u
f14e35d20e1a4d0f507f05838844152f2242c6d3
275,871,598,942,844,600,000,000,000,000,000,000,000
43
8281866: Enhance MethodHandle invocations Reviewed-by: andrew Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
static int check_stack_read(struct bpf_verifier_env *env, struct bpf_func_state *reg_state /* func where register points to */, int off, int size, int value_regno) { struct bpf_verifier_state *vstate = env->cur_state; struct bpf_func_state *state = vstate->frame[vstate->curframe]; int i, slot = -off - ...
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
301,844,829,153,467,030,000,000,000,000,000,000,000
100
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
static inline void mnt_add_count(struct mount *mnt, int n) { #ifdef CONFIG_SMP this_cpu_add(mnt->mnt_pcp->mnt_count, n); #else preempt_disable(); mnt->mnt_count += n; preempt_enable(); #endif }
0
[ "CWE-269" ]
user-namespace
a6138db815df5ee542d848318e5dae681590fccd
180,356,442,724,511,570,000,000,000,000,000,000,000
10
mnt: Only change user settable mount flags in remount Kenton Varda <kenton@sandstorm.io> discovered that by remounting a read-only bind mount read-only in a user namespace the MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user to the remount a read-only mount read-write. Correct this by replacing t...
static void filter_build_regex(struct filter_pred *pred) { struct regex *r = &pred->regex; char *search; enum regex_type type = MATCH_FULL; if (pred->op == OP_GLOB) { type = filter_parse_regex(r->pattern, r->len, &search, &pred->not); r->len = strlen(search); memmove(r->pattern, search, r->len+1); } switc...
0
[ "CWE-400", "CWE-284", "CWE-401" ]
linux
96c5c6e6a5b6db592acae039fed54b5c8844cd35
109,196,295,543,498,060,000,000,000,000,000,000,000
32
tracing: Have error path in predicate_parse() free its allocated memory In predicate_parse, there is an error path that is not going to out_free instead it returns directly which leads to a memory leak. Link: http://lkml.kernel.org/r/20190920225800.3870-1-navid.emamdoost@gmail.com Signed-off-by: Navid Emamdoost <nav...
bool LEX::stmt_prepare_validate(const char *stmt_type) { if (unlikely(table_or_sp_used())) { my_error(ER_SUBQUERIES_NOT_SUPPORTED, MYF(0), stmt_type); return true; } return check_main_unit_semantics(); }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
313,928,737,652,932,960,000,000,000,000,000,000,000
9
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
opj_j2k_t* opj_j2k_create_decompress(void) { opj_j2k_t *l_j2k = (opj_j2k_t*) opj_calloc(1,sizeof(opj_j2k_t)); if (!l_j2k) { return 00; } l_j2k->m_is_decoder = 1; l_j2k->m_cp.m_is_decoder = 1; #ifdef OPJ_DISABLE_TPSOT_FIX l_j2k->m_specific_param.m_decoder...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
107,667,816,709,660,910,000,000,000,000,000,000,000
55
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
static void ssl_ciphers_populate() { if (ssl_cipher_num == 0 || ssl_curves_num == 0) { init_openssl(); shutdown_openssl(); } }
0
[ "CWE-362", "CWE-703" ]
pjproject
d5f95aa066f878b0aef6a64e60b61e8626e664cd
38,534,100,494,307,740,000,000,000,000,000,000,000
7
Merge pull request from GHSA-cv8x-p47p-99wr * - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count. - Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport. * - Fix silly mistake: accepted active socket created without...
static void maxconns_handler(const int fd, const short which, void *arg) { struct timeval t = {.tv_sec = 0, .tv_usec = 10000}; if (fd == -42 || allow_new_conns == false) { /* reschedule in 10ms if we need to keep polling */ evtimer_set(&maxconnsevent, maxconns_handler, 0); event_base_se...
0
[ "CWE-189" ]
memcached
6695ccbc525c36d693aaa3e8337b36aa0c784424
331,302,753,328,474,340,000,000,000,000,000,000,000
13
Fix segfault on specially crafted packet.
qsort( void *base, size_t elm_count, size_t elm_size, int (*cmp)(const void *, const void *)) { char_u *buf; char_u *p1; char_u *p2; int i, j; int gap; buf = alloc(elm_size); if (buf == NULL) return; for (gap = elm_count / 2; gap > 0; gap /= 2) for (i = gap; i < elm...
0
[ "CWE-120" ]
vim
7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97
295,306,830,504,171,520,000,000,000,000,000,000,000
33
patch 8.2.4969: changing text in Visual mode may cause invalid memory access Problem: Changing text in Visual mode may cause invalid memory access. Solution: Check the Visual position after making a change.
MagickPrivate void XGetAnnotateInfo(XAnnotateInfo *annotate_info) { /* Initialize annotate structure. */ (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); assert(annotate_info != (XAnnotateInfo *) NULL); annotate_info->x=0; annotate_info->y=0; annotate_info->width=0; annotate_info->height=0...
0
[]
ImageMagick
f391a5f4554fe47eb56d6277ac32d1f698572f0e
283,577,631,120,811,900,000,000,000,000,000,000,000
21
https://github.com/ImageMagick/ImageMagick/issues/1531
static int vrend_renderer_transfer_send_iov(struct vrend_resource *res, struct iovec *iov, int num_iovs, const struct vrend_transfer_info *info) { if (res->storage == VREND_RESOURCE_STORAGE_GUEST || (res->storage == VREND_...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
180,608,756,513,655,160,000,000,000,000,000,000,000
51
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
report_event( int err, /* error code */ struct peer *peer, /* peer structure pointer */ const char *str /* protostats string */ ) { char statstr[NTP_MAXSTRLEN]; int i; size_t len; /* * Report the error to the protostats file, system log and * trappers. */ if (peer == NULL) { /* * Discard a syste...
0
[ "CWE-22" ]
ntp
184516e143ce4448ddb5b9876dd372008cc779f6
329,395,501,409,591,960,000,000,000,000,000,000,000
140
[TALOS-CAN-0062] prevent directory traversal for VMS, too, when using 'saveconfig' command.
static int dxtory_decode_v1_444(AVCodecContext *avctx, AVFrame *pic, const uint8_t *src, int src_size) { int h, w; uint8_t *Y, *U, *V; int ret; if (src_size < avctx->width * avctx->height * 3) { av_log(avctx, AV_LOG_ERROR, "packet too small\n"); return AV...
1
[ "CWE-190" ]
FFmpeg
a392bf657015c9a79a5a13adfbfb15086c1943b9
280,658,706,335,512,450,000,000,000,000,000,000,000
32
avcodec/dxtory: fix src size checks Fixes integer overflow Fixes out of array read Fixes: d104661bb59b202df7671fb19a00ca6c-asan_heap-oob_d6429d_5066_cov_1729501105_dxtory_mic.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
zfs_fuid_map_ids(znode_t *zp, cred_t *cr, uid_t *uidp, uid_t *gidp) { *uidp = zfs_fuid_map_id(ZTOZSB(zp), KUID_TO_SUID(ZTOUID(zp)), cr, ZFS_OWNER); *gidp = zfs_fuid_map_id(ZTOZSB(zp), KGID_TO_SGID(ZTOGID(zp)), cr, ZFS_GROUP); }
0
[ "CWE-200", "CWE-732" ]
zfs
716b53d0a14c72bda16c0872565dd1909757e73f
94,823,565,117,026,200,000,000,000,000,000,000,000
7
FreeBSD: Fix UNIX permissions checking Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10727
static int do_remount(struct path *path, int flags, int mnt_flags, void *data) { int err; struct super_block *sb = path->mnt->mnt_sb; struct mount *mnt = real_mount(path->mnt); if (!check_mnt(mnt)) return -EINVAL; if (path->dentry != path->mnt->mnt_root) return -EINVAL; /* Don't allow changing of l...
1
[ "CWE-269" ]
user-namespace
9566d6742852c527bf5af38af5cbb878dad75705
201,961,440,671,535,650,000,000,000,000,000,000,000
44
mnt: Correct permission checks in do_remount While invesgiating the issue where in "mount --bind -oremount,ro ..." would result in later "mount --bind -oremount,rw" succeeding even if the mount started off locked I realized that there are several additional mount flags that should be locked and are not. In particular...
virNodeDeviceGetMdevTypesCaps(const char *sysfspath, virMediatedDeviceTypePtr **mdev_types, size_t *nmdev_types) { virMediatedDeviceTypePtr *types = NULL; size_t ntypes = 0; size_t i; /* this could be a refresh, so clear out the old data */ ...
1
[ "CWE-119" ]
libvirt
4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a
28,606,370,464,435,654,000,000,000,000,000,000,000
22
conf: Fix segfault when parsing mdev types Commit f1b0890 introduced a potential crash due to incorrect operator precedence when accessing an element from a pointer to an array. Backtrace below: #0 virNodeDeviceGetMdevTypesCaps (sysfspath=0x7fff801661e0 "/sys/devices/pci0000:00/0000:00:02.0", mdev_types=0x7fff801...
SPL_METHOD(SplFileInfo, getFilename) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(getThis()); size_t path_len; if (zend_parse_parameters_none() == FAILURE) { return; } spl_filesystem_object_get_path(intern, &path_len); if (path_len && path_len < intern->file_name_len) { RETURN_STRINGL(intern->file_n...
0
[ "CWE-74" ]
php-src
a5a15965da23c8e97657278fc8dfbf1dfb20c016
223,618,652,651,266,080,000,000,000,000,000,000,000
17
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.
static int dgram_bind(struct sock *sk, struct sockaddr *uaddr, int len) { struct sockaddr_ieee802154 *addr = (struct sockaddr_ieee802154 *)uaddr; struct dgram_sock *ro = dgram_sk(sk); int err = -EINVAL; struct net_device *dev; lock_sock(sk); ro->bound = 0; if (len < sizeof(*addr)) goto out; if (addr->fami...
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
190,054,550,695,907,430,000,000,000,000,000,000,000
39
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
static inline bool bvec_iter_advance(const struct bio_vec *bv, struct bvec_iter *iter, unsigned bytes) { unsigned int idx = iter->bi_idx; if (WARN_ONCE(bytes > iter->bi_size, "Attempted to advance past end of bvec iter\n")) { iter->bi_size = 0; return false; } iter->bi_size -= bytes; bytes += iter->...
0
[ "CWE-835" ]
linux
7e24969022cbd61ddc586f14824fc205661bb124
118,032,980,831,199,730,000,000,000,000,000,000,000
23
block: allow for_each_bvec to support zero len bvec Block layer usually doesn't support or allow zero-length bvec. Since commit 1bdc76aea115 ("iov_iter: use bvec iterator to implement iterate_bvec()"), iterate_bvec() switches to bvec iterator. However, Al mentioned that 'Zero-length segments are not disallowed' in iov...
dissect_kafka_offsets_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int start_offset, kafka_api_version_t api_version) { int offset = start_offset; if (api_version >= 2) { offset = dissect_kafka_throttle_time(tvb, pinfo, tree, offset); } return di...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
142,546,530,012,767,760,000,000,000,000,000,000,000
11
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
HiiDrawImage ( IN CONST EFI_HII_IMAGE_PROTOCOL *This, IN EFI_HII_DRAW_FLAGS Flags, IN CONST EFI_IMAGE_INPUT *Image, IN OUT EFI_IMAGE_OUTPUT **Blt, IN UINTN BltX, IN UINTN BltY ) { EFI_STATUS ...
0
[ "CWE-787" ]
edk2
ffe5f7a6b4e978dffbe1df228963adc914451106
5,488,004,426,347,883,000,000,000,000,000,000,000
234
MdeModulePkg/HiiDatabase: Fix potential integer overflow (CVE-2018-12181) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1135 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ray Ni <ray.ni@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Hao Wu ...
static void adu_disconnect(struct usb_interface *interface) { struct adu_device *dev; dev = usb_get_intfdata(interface); usb_deregister_dev(interface, &adu_class); mutex_lock(&adutux_mutex); usb_set_intfdata(interface, NULL); mutex_lock(&dev->mtx); /* not interruptible */ dev->udev = NULL; /* poison */ mute...
0
[ "CWE-416" ]
linux
44efc269db7929f6275a1fa927ef082e533ecde0
35,152,507,321,850,740,000,000,000,000,000,000,000
21
USB: adutux: fix use-after-free on disconnect The driver was clearing its struct usb_device pointer, which it used as an inverted disconnected flag, before deregistering the character device and without serialising against racing release(). This could lead to a use-after-free if a racing release() callback observes t...