func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
struct page *follow_page_mask(struct vm_area_struct *vma, unsigned long address, unsigned int flags, unsigned int *page_mask) { pgd_t *pgd; pud_t *pud; pmd_t *pmd; pte_t *ptep, pte; spinlock_t *ptl; struct page *page; struct mm_struct *mm = vma->vm_mm; *page_mask = 0; page = follow_huge_add...
0
[ "CWE-703", "CWE-189" ]
linux
b4cbb197c7e7a68dbad0d491242e3ca67420c13e
289,497,254,050,095,950,000,000,000,000,000,000,000
168
vm: add vm_iomap_memory() helper function Various drivers end up replicating the code to mmap() their memory buffers into user space, and our core memory remapping function may be very flexible but it is unnecessarily complicated for the common cases to use. Our internal VM uses pfn's ("page frame numbers") which sim...
static struct vport *new_vport(const struct vport_parms *parms) { struct vport *vport; vport = ovs_vport_add(parms); if (!IS_ERR(vport)) { struct datapath *dp = parms->dp; struct hlist_head *head = vport_hash_bucket(dp, vport->port_no); hlist_add_head_rcu(&vport->dp_hash_node, head); } return vport; }
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
12,381,415,562,423,998,000,000,000,000,000,000,000
13
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
void bnx2x_func_init(struct bnx2x *bp, struct bnx2x_func_init_params *p) { if (CHIP_IS_E1x(bp)) { struct tstorm_eth_function_common_config tcfg = {0}; storm_memset_func_cfg(bp, &tcfg, p->func_id); } /* Enable the function in the FW */ storm_memset_vf_to_pf(bp, p->func_id, p->pf_id); storm_memset_func_en(bp, ...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
139,451,069,228,333,030,000,000,000,000,000,000,000
19
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 int __ip6_append_data(struct sock *sk, struct flowi6 *fl6, struct sk_buff_head *queue, struct inet_cork *cork, struct inet6_cork *v6_cork, struct page_frag *pfrag, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), v...
1
[ "CWE-20", "CWE-200" ]
linux
232cd35d0804cc241eb887bb8d4d9b3b9881c64a
205,715,953,231,775,060,000,000,000,000,000,000,000
314
ipv6: fix out of bound writes in __ip6_append_data() Andrey Konovalov and idaifish@gmail.com reported crashes caused by one skb shared_info being overwritten from __ip6_append_data() Andrey program lead to following state : copy -4200 datalen 2000 fraglen 2040 maxfraglen 2040 alloclen 2048 transhdrlen 0 offset 0 fra...
static void megasas_detach_one(struct pci_dev *pdev) { int i; struct Scsi_Host *host; struct megasas_instance *instance; struct fusion_context *fusion; u32 pd_seq_map_sz; instance = pci_get_drvdata(pdev); host = instance->host; fusion = instance->ctrl_context; /* Shutdown SR-IOV heartbeat timer */ if (insta...
0
[ "CWE-476" ]
linux
bcf3b67d16a4c8ffae0aa79de5853435e683945c
324,084,163,435,533,260,000,000,000,000,000,000,000
126
scsi: megaraid_sas: return error when create DMA pool failed when create DMA pool for cmd frames failed, we should return -ENOMEM, instead of 0. In some case in: megasas_init_adapter_fusion() -->megasas_alloc_cmds() -->megasas_create_frame_pool create DMA pool failed, --> megasas_fre...
void RGWGetLC_ObjStore_S3::execute() { config.set_ctx(s->cct); map<string, bufferlist>::iterator aiter = s->bucket_attrs.find(RGW_ATTR_LC); if (aiter == s->bucket_attrs.end()) { op_ret = -ENOENT; return; } bufferlist::const_iterator iter{&aiter->second}; try { config.decode(iter); } catc...
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
172,020,080,338,266,300,000,000,000,000,000,000,000
19
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
EbmlElement * EbmlElement::FindNextElement(IOCallback & DataStream, const EbmlSemanticContext & Context, int & UpperLevel, uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel) { int PossibleID_Length = 0; binary PossibleIdNSize[16]; int PossibleSizeLength;...
0
[ "CWE-119", "CWE-125" ]
libebml
05beb69ba60acce09f73ed491bb76f332849c3a0
37,766,882,020,019,164,000,000,000,000,000,000,000
120
Check the max size to read before actually reading The size check waas also missing from the length parsing
} u32 parse_multi_rtp(char *arg_val, u32 opt) { #ifndef GPAC_DISABLE_STREAMING hint_flags |= GP_RTP_PCK_USE_MULTI; #endif if (arg_val) max_ptime = parse_u32(arg_val, "maxptime"); return 0;
0
[ "CWE-787" ]
gpac
4e56ad72ac1afb4e049a10f2d99e7512d7141f9d
311,055,281,458,814,330,000,000,000,000,000,000,000
9
fixed #2216
void NumberFormatTest::TestCurrencyNames(void) { // Do a basic check of getName() // USD { "US$", "US Dollar" } // 04/04/1792- UErrorCode ec = U_ZERO_ERROR; static const UChar USD[] = {0x55, 0x53, 0x44, 0}; /*USD*/ static const UChar USX[] = {0x55, 0x53, 0x58, 0}; /*USX*/ static const...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
93,231,575,721,593,890,000,000,000,000,000,000,000
124
ICU-20246 Fixing another integer overflow in number parsing.
void CZNC::ForceEncoding() { m_uiForceEncoding++; #ifdef HAVE_ICU for (Csock* pSock : GetManager()) { pSock->SetEncoding(FixupEncoding(pSock->GetEncoding())); } #endif }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
84,858,909,713,488,490,000,000,000,000,000,000,000
8
Don't crash if user specified invalid encoding. This is CVE-2019-9917
bool UserPage(CWebSock& WebSock, CTemplate& Tmpl, CUser* pUser = NULL) { CSmartPtr<CWebSession> spSession = WebSock.GetSession(); Tmpl.SetFile("add_edit_user.tmpl"); if (!WebSock.GetParam("submitted").ToUInt()) { CString sAllowedHosts, sServers, sChans, sCTCPReplies; if (pUser) { Tmpl["Action"] = "ed...
0
[ "CWE-703" ]
znc
2bd410ee5570cea127233f1133ea22f25174eb28
321,034,902,172,324,300,000,000,000,000,000,000,000
283
Fix NULL pointer dereference in webadmin. Triggerable by any non-admin, if webadmin is loaded. The only affected version is 1.0 Thanks to ChauffeR (Simone Esposito) for reporting this.
int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, struct vfsmount *root) { struct mount *mnt; int res = f(root, arg); if (res) return res; list_for_each_entry(mnt, &real_mount(root)->mnt_list, mnt_list) { res = f(&mnt->mnt, arg); if (res) return res; } return 0; }
0
[ "CWE-269" ]
user-namespace
a6138db815df5ee542d848318e5dae681590fccd
280,942,099,902,217,560,000,000,000,000,000,000,000
14
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 int multipath_ctr(struct dm_target *ti, unsigned int argc, char **argv) { /* target arguments */ static struct dm_arg _args[] = { {0, 1024, "invalid number of priority groups"}, {0, 1024, "invalid initial priority group number"}, }; int r; struct multipath *m; struct dm_arg_set as; unsigned pg_co...
0
[ "CWE-284", "CWE-264" ]
linux
ec8013beddd717d1740cfefb1a9b900deef85462
242,046,898,269,075,600,000,000,000,000,000,000,000
80
dm: do not forward ioctls from logical volumes to the underlying device A logical volume can map to just part of underlying physical volume. In this case, it must be treated like a partition. Based on a patch from Alasdair G Kergon. Cc: Alasdair G Kergon <agk@redhat.com> Cc: dm-devel@redhat.com Signed-off-by: Paolo ...
void OSD::_remove_pg(PG *pg) { ObjectStore::Transaction rmt ; // on_removal, which calls remove_watchers_and_notifies, and the erasure from // the pg_map must be done together without unlocking the pg lock, // to avoid racing with watcher cleanup in ms_handle_reset // and handle_notify_timeout pg->on_remov...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
102,188,889,770,567,820,000,000,000,000,000,000,000
34
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 ...
bool dwgReader21::readFileHeader() { DRW_DBG("\n\ndwgReader21::parsing file header\n"); if (! fileBuf->setPosition(0x80)) return false; duint8 fileHdrRaw[0x2FD];//0x3D8 fileBuf->getBytes(fileHdrRaw, 0x2FD); duint8 fileHdrdRS[0x2CD]; dwgRSCodec::decode239I(fileHdrRaw, fileHdrdRS, 3); #i...
1
[ "CWE-191" ]
libdxfrw
6417118874333309aa10c4e59f954c3905a6e8b5
207,675,573,597,850,820,000,000,000,000,000,000,000
199
fixed heap buffer overflow vulnerability CVE-2021-21899 as reported in TALOS-2021-1350 / CVE-2021-21899, dwgCompressor::decompress21() could be abused with a malformed DWG file to force heap buffer overflow and possibly lead to malicious code execution.
void sqlite3ReleaseTempRange(Parse *pParse, int iReg, int nReg){ if( nReg==1 ){ sqlite3ReleaseTempReg(pParse, iReg); return; } if( nReg>pParse->nRangeReg ){ pParse->nRangeReg = nReg; pParse->iRangeReg = iReg; } }
0
[ "CWE-476" ]
sqlite
57f7ece78410a8aae86aa4625fb7556897db384c
301,016,040,552,428,370,000,000,000,000,000,000,000
10
Fix a problem that comes up when using generated columns that evaluate to a constant in an index and then making use of that index in a join. FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af
static int sched_copy_attr(struct sched_attr __user *uattr, struct sched_attr *attr) { u32 size; int ret; if (!access_ok(VERIFY_WRITE, uattr, SCHED_ATTR_SIZE_VER0)) return -EFAULT; /* * zero the full structure, so that a short copy will be nice. */ memset(attr, 0, sizeof(*attr)); ret = get_user(siz...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
331,066,733,071,887,500,000,000,000,000,000,000,000
67
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
gf_filter_pid_drop_packet(ds->ipid); } if (discard_all) { gf_filter_pid_set_discard(ds->ipid, GF_TRUE); } } static void dasher_inject_eods(GF_DasherCtx *ctx, GF_DashStream *ds) { //in dynamic mode, send end of dash segment marker to flush segment right away, otherwise we will //flush the segment at next segme...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
139,489,727,261,258,660,000,000,000,000,000,000,000
16
fixed #2138
static inline void add_namespace_name(Array &out, xmlNsPtr ns) { String prefix = ns->prefix ? String((const char*)ns->prefix) : String(empty_string); if (!out.exists(prefix)) { out.set(prefix, String((char*)ns->href, CopyString)); } }
0
[ "CWE-94" ]
hhvm
95f96e7287effe2fcdfb9a5338d1a7e4f55b083b
180,426,068,657,613,250,000,000,000,000,000,000,000
7
Fix libxml_disable_entity_loader() This wasn't calling requestInit and setting the libxml handler no null. So the first time an error came along it would reset the handler from no-op to reading again. This is a much better fix, we set our custom handler in requestInit and when libxml_disable_entity_loader we store th...
double val_real() { DBUG_ASSERT(fixed == 1); return (double) value; }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
100,914,771,940,286,050,000,000,000,000,000,000,000
1
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
static int packet_notifier(struct notifier_block *this, unsigned long msg, void *ptr) { struct sock *sk; struct net_device *dev = netdev_notifier_info_to_dev(ptr); struct net *net = dev_net(dev); rcu_read_lock(); sk_for_each_rcu(sk, &net->packet.sklist) { struct packet_sock *po = pkt_sk(sk); switch (ms...
0
[ "CWE-415" ]
linux
ec6af094ea28f0f2dda1a6a33b14cd57e36a9755
94,443,611,310,544,040,000,000,000,000,000,000,000
48
net/packet: rx_owner_map depends on pg_vec Packet sockets may switch ring versions. Avoid misinterpreting state between versions, whose fields share a union. rx_owner_map is only allocated with a packet ring (pg_vec) and both are swapped together. If pg_vec is NULL, meaning no packet ring was allocated, then neither w...
xfs_attr3_leaf_moveents( struct xfs_da_args *args, struct xfs_attr_leafblock *leaf_s, struct xfs_attr3_icleaf_hdr *ichdr_s, int start_s, struct xfs_attr_leafblock *leaf_d, struct xfs_attr3_icleaf_hdr *ichdr_d, int start_d, int count) { struct xfs_attr_leaf_entry *entry_s; struct xfs_attr_leaf_entry ...
0
[ "CWE-476" ]
linux
bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a
192,331,896,901,729,650,000,000,000,000,000,000,000
139
xfs: don't call xfs_da_shrink_inode with NULL bp xfs_attr3_leaf_create may have errored out before instantiating a buffer, for example if the blkno is out of range. In that case there is no work to do to remove it, and in fact xfs_da_shrink_inode will lead to an oops if we try. This also seems to fix a flaw where th...
ulong STDCALL mysql_get_server_version(MYSQL *mysql) { uint major, minor, version; char *pos= mysql->server_version, *end_pos; major= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1; minor= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1; version= (uint) strtoul(pos, &end_pos, 10); return (ulong) majo...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
258,163,676,624,785,380,000,000,000,000,000,000,000
9
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static av_cold int decode_init(AVCodecContext *avctx) { AnsiContext *s = avctx->priv_data; avctx->pix_fmt = AV_PIX_FMT_PAL8; s->frame = av_frame_alloc(); if (!s->frame) return AVERROR(ENOMEM); /* defaults */ s->font = avpriv_vga16_font; s->font_height = 16; s->fg ...
0
[ "CWE-190" ]
FFmpeg
d42ec8433c687fcbccefa51a7716d81920218e4f
302,490,369,222,623,500,000,000,000,000,000,000,000
20
avcodec/ansi: fix integer overflow Fixes out of array read Fixes: 5f9698e86d92f19bb08d54ff0d57027f-signal_sigsegv_b30756_3795_cov_2693691257_ansi256.ans Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static int snd_pcm_oss_set_rate(struct snd_pcm_oss_file *pcm_oss_file, int rate) { int idx; for (idx = 1; idx >= 0; --idx) { struct snd_pcm_substream *substream = pcm_oss_file->streams[idx]; struct snd_pcm_runtime *runtime; int err; if (substream == NULL) continue; runtime = substream->runtime; if (r...
0
[ "CWE-362" ]
linux
8423f0b6d513b259fdab9c9bf4aaa6188d054c2d
91,810,241,885,803,500,000,000,000,000,000,000,000
27
ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC There is a small race window at snd_pcm_oss_sync() that is called from OSS PCM SNDCTL_DSP_SYNC ioctl; namely the function calls snd_pcm_oss_make_ready() at first, then takes the params_lock mutex for the rest. When the stream is set up again by another thread between them, ...
dupl(p, start, finish) register struct parse *p; sopno start; /* from here */ sopno finish; /* to this less one */ { register sopno ret = HERE(); register sopno len = finish - start; assert(finish >= start); if (len == 0) return(ret); enlarge(p, p->ssize + len); /* this many unexpected additions */ assert(...
0
[]
php-src
124fb22a13fafa3648e4e15b4f207c7096d8155e
139,012,661,453,744,210,000,000,000,000,000,000,000
18
Fixed bug #68739 #68740 #68741
TEST_F(HttpHealthCheckerImplTest, SuccessIntervalJitterPercent) { setupIntervalJitterPercent(); EXPECT_CALL(*this, onHostStatus(_, HealthTransition::Unchanged)).Times(testing::AnyNumber()); cluster_->prioritySet().getMockHostSet(0)->hosts_ = { makeTestHost(cluster_->info_, "tcp://127.0.0.1:80", simTime())}...
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
255,224,978,277,004,100,000,000,000,000,000,000,000
29
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static int svm_handle_invalid_exit(struct kvm_vcpu *vcpu, u64 exit_code) { vcpu_unimpl(vcpu, "svm: unexpected exit reason 0x%llx\n", exit_code); dump_vmcb(vcpu); vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR; vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_UNEXPECTED_EXIT_REASON; vcpu->run->internal.ndata = 2...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
273,118,652,371,215,320,000,000,000,000,000,000,000
11
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
static int qp_has_rq(struct ib_qp_init_attr *attr) { if (attr->qp_type == IB_QPT_XRC_INI || attr->qp_type == IB_QPT_XRC_TGT || attr->srq || attr->qp_type == MLX5_IB_QPT_REG_UMR || !attr->cap.max_recv_wr) return 0; return 1; }
0
[ "CWE-119", "CWE-787" ]
linux
0625b4ba1a5d4703c7fb01c497bd6c156908af00
97,254,809,268,501,110,000,000,000,000,000,000,000
10
IB/mlx5: Fix leaking stack memory to userspace mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: <stable@vger.kernel.org> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <...
static MagickBooleanType GetTIFFInfo(const ImageInfo *image_info, TIFF *tiff,TIFFInfo *tiff_info) { const char *option; MagickStatusType flags; uint32 tile_columns, tile_rows; assert(tiff_info != (TIFFInfo *) NULL); (void) ResetMagickMemory(tiff_info,0,sizeof(*tiff_info)); option=GetIma...
0
[ "CWE-119", "CWE-703" ]
ImageMagick
6e48aa92ff4e6e95424300ecd52a9ea453c19c60
56,062,682,713,507,560,000,000,000,000,000,000,000
56
https://github.com/ImageMagick/ImageMagick/issues/268
static struct io_buffer *io_recv_buffer_select(struct io_kiocb *req, bool needs_lock) { struct io_sr_msg *sr = &req->sr_msg; struct io_buffer *kbuf; kbuf = io_buffer_select(req, &sr->len, sr->bgid, sr->kbuf, needs_lock); if (IS_ERR(kbuf)) return kbuf; sr->kbuf = kbuf; req->flags |= REQ_F_BUFFER_SE...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
32,373,357,059,125,107,000,000,000,000,000,000,000
14
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 int preallocate(BlockDriverState *bs) { uint64_t nb_sectors; uint64_t offset; uint64_t host_offset = 0; int num; int ret; QCowL2Meta *meta; nb_sectors = bdrv_getlength(bs) >> BDRV_SECTOR_BITS; offset = 0; while (nb_sectors) { num = MIN(nb_sectors, INT_MAX >> BDRV_SEC...
0
[ "CWE-476" ]
qemu
11b128f4062dd7f89b14abc8877ff20d41b28be9
145,587,166,994,817,450,000,000,000,000,000,000,000
56
qcow2: Fix NULL dereference in qcow2_open() error path (CVE-2014-0146) The qcow2 code assumes that s->snapshots is non-NULL if s->nb_snapshots != 0. By having the initialisation of both fields separated in qcow2_open(), any error occuring in between would cause the error path to dereference NULL in qcow2_free_snapshot...
fixup_key (struct key *key, const struct key_type *kt) { struct gc_arena gc = gc_new (); if (kt->cipher) { #ifdef ENABLE_DEBUG const struct key orig = *key; #endif const int ndc = key_des_num_cblocks (kt->cipher); if (ndc) key_des_fixup (key->cipher, kt->cipher_length, ndc); #ifdef ENABLE_D...
0
[ "CWE-200" ]
openvpn
11d21349a4e7e38a025849479b36ace7c2eec2ee
97,769,465,850,886,640,000,000,000,000,000,000,000
25
Use constant time memcmp when comparing HMACs in openvpn_decrypt. Signed-off-by: Steffan Karger <steffan.karger@fox-it.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: Gert Doering <gert@greenie.muc.de>
int print_nsid(struct nlmsghdr *n, void *arg) { struct rtgenmsg *rthdr = NLMSG_DATA(n); struct rtattr *tb[NETNSA_MAX+1]; int len = n->nlmsg_len; FILE *fp = (FILE *)arg; struct nsid_cache *c; char name[NAME_MAX]; int nsid; if (n->nlmsg_type != RTM_NEWNSID && n->nlmsg_type != RTM_DELNSID) return 0; len -= NL...
0
[ "CWE-416" ]
iproute2
9bf2c538a0eb10d66e2365a655bf6c52f5ba3d10
166,205,716,838,332,620,000,000,000,000,000,000,000
53
ipnetns: use-after-free problem in get_netnsid_from_name func Follow the following steps: # ip netns add net1 # export MALLOC_MMAP_THRESHOLD_=0 # ip netns list then Segmentation fault (core dumped) will occur. In get_netnsid_from_name func, answer is freed before rta_getattr_u32(tb[NETNSA_NSID]), where tb[] refers...
void flush_all_to_thread(struct task_struct *tsk) { if (tsk->thread.regs) { preempt_disable(); BUG_ON(tsk != current); #ifdef CONFIG_SPE if (tsk->thread.regs->msr & MSR_SPE) tsk->thread.spefscr = mfspr(SPRN_SPEFSCR); #endif save_all(tsk); preempt_enable(); } }
0
[ "CWE-862" ]
linux
8205d5d98ef7f155de211f5e2eb6ca03d95a5a60
336,467,115,969,472,060,000,000,000,000,000,000,000
14
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'...
void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin) { int gsi, idx; trace_kvm_ack_irq(irqchip, pin); idx = srcu_read_lock(&kvm->irq_srcu); gsi = kvm_irq_map_chip_pin(kvm, irqchip, pin); if (gsi != -1) kvm_notify_acked_gsi(kvm, gsi); srcu_read_unlock(&kvm->irq_srcu, idx); }
0
[ "CWE-20", "CWE-617" ]
linux
36ae3c0a36b7456432fedce38ae2f7bd3e01a563
138,753,970,748,308,130,000,000,000,000,000,000,000
12
KVM: Don't accept obviously wrong gsi values via KVM_IRQFD We cannot add routes for gsi values >= KVM_MAX_IRQ_ROUTES -- see kvm_set_irq_routing(). Hence, there is no sense in accepting them via KVM_IRQFD. Prevent them from entering the system in the first place. Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de> Si...
static SLJIT_INLINE void match_once_common(compiler_common *common, PCRE2_UCHAR ket, int framesize, int private_data_ptr, BOOL has_alternatives, BOOL needs_control_head) { DEFINE_COMPILER; int stacksize; if (framesize < 0) { if (framesize == no_frame) OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), private_...
0
[ "CWE-125" ]
php-src
8947fd9e9fdce87cd6c59817b1db58e789538fe9
223,855,485,584,081,930,000,000,000,000,000,000,000
47
Fix #78338: Array cross-border reading in PCRE We backport r1092 from pcre2.
int RemoteIo::close() { if (p_->isMalloced_) { p_->eof_ = false; p_->idx_ = 0; } #ifdef DEBUG std::cerr << "RemoteIo::close totalRead_ = " << p_->totalRead_ << std::endl; #endif if ( bigBlock_ ) { delete [] bigBlock_; bigBlock_=NULL; } return 0; ...
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
3,033,950,404,547,035,000,000,000,000,000,000,000
15
Fix https://github.com/Exiv2/exiv2/issues/55
void Sys_Print( const char *msg ) { CON_LogWrite( msg ); CON_Print( msg ); }
0
[ "CWE-59" ]
ioq3
b5acc31a4da72cc3a4a6d88facb15b6214d745c6
280,692,680,707,094,600,000,000,000,000,000,000,000
5
CVE-2012-3345
ExecBuildProjectionInfo(List *targetList, ExprContext *econtext, TupleTableSlot *slot, TupleDesc inputDesc) { ProjectionInfo *projInfo = makeNode(ProjectionInfo); int len = ExecTargetListLength(targetList); int *workspace; int *varSlotOffsets; int *varNumbers; int *varOutputCol...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
132,817,410,772,159,470,000,000,000,000,000,000,000
116
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
static inline int ep_op_has_event(int op) { return op != EPOLL_CTL_DEL; }
0
[]
linux-2.6
28d82dc1c4edbc352129f97f4ca22624d1fe61de
48,370,059,977,131,920,000,000,000,000,000,000,000
4
epoll: limit paths The current epoll code can be tickled to run basically indefinitely in both loop detection path check (on ep_insert()), and in the wakeup paths. The programs that tickle this behavior set up deeply linked networks of epoll file descriptors that cause the epoll algorithms to traverse them indefinitel...
Context_identity() :Context(IDENTITY_SUBST, &type_handler_long_blob, &my_charset_bin) { }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
144,828,302,649,549,130,000,000,000,000,000,000,000
2
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...
void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta) { struct ieee80211_sub_if_data *sdata = sta->sdata; struct ieee80211_local *local = sdata->local; struct sk_buff_head pending; int filtered = 0, buffered = 0, ac, i; unsigned long flags; struct ps_data *ps; if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)...
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
60,647,038,057,103,080,000,000,000,000,000,000,000
96
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
int __sched _cond_resched(void) { if (should_resched(0)) { preempt_schedule_common(); return 1; } return 0; }
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
114,517,239,792,426,830,000,000,000,000,000,000,000
8
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
int HttpsUpstream::downstream_error(DownstreamConnection *dconn, int events) { auto downstream = dconn->get_downstream(); if (LOG_ENABLED(INFO)) { if (events & Downstream::EVENT_ERROR) { DCLOG(INFO, dconn) << "Network error/general error"; } else { DCLOG(INFO, dconn) << "Timeout"; } } if...
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
149,337,057,539,929,330,000,000,000,000,000,000,000
26
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
static void rbd_obj_request_put(struct rbd_obj_request *obj_request) { rbd_assert(obj_request != NULL); dout("%s: obj %p (was %d)\n", __func__, obj_request, kref_read(&obj_request->kref)); kref_put(&obj_request->kref, rbd_obj_request_destroy); }
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
14,253,047,559,983,396,000,000,000,000,000,000,000
7
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
GF_Err mdhd_dump(GF_Box *a, FILE * trace) { GF_MediaHeaderBox *p; p = (GF_MediaHeaderBox *)a; gf_isom_box_dump_start(a, "MediaHeaderBox", trace); fprintf(trace, "CreationTime=\""LLD"\" ", LLD_CAST p->creationTime); fprintf(trace, "ModificationTime=\""LLD"\" ", LLD_CAST p->modificationTime); fprintf(trace, "TimeS...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
286,372,839,604,162,780,000,000,000,000,000,000,000
14
fixed 2 possible heap overflows (inc. #1088)
R_API void r_bin_java_print_source_code_file_attr_summary(RBinJavaAttrInfo *attr) { if (!attr) { eprintf ("Attempting to print an invalid RBinJavaAttrInfo *SourceFile.\n"); return; } Eprintf ("Source File Attribute Information:\n"); Eprintf (" Attribute Offset: 0x%08"PFMT64x "\n", attr->file_offset); Eprintf ...
0
[ "CWE-787" ]
radare2
9650e3c352f675687bf6c6f65ff2c4a3d0e288fa
29,247,608,453,829,793,000,000,000,000,000,000,000
11
Fix oobread segfault in java arith8.class ##crash * Reported by Cen Zhang via huntr.dev
static UINT gdi_SurfaceCommand_AVC444(rdpGdi* gdi, RdpgfxClientContext* context, const RDPGFX_SURFACE_COMMAND* cmd) { #ifdef WITH_GFX_H264 INT32 rc; UINT status = CHANNEL_RC_OK; UINT32 i; gdiGfxSurface* surface; RDPGFX_AVC444_BITMAP_STREAM* bs; RDPGFX_AVC420_BITMAP_STREAM* av...
0
[ "CWE-190" ]
FreeRDP
e08a23f93136f59a52651f66d064b8d4303872e1
172,473,875,683,241,370,000,000,000,000,000,000,000
95
Fixed missing input sanitation for GFX surfaces. Thanks to Sunglin and HuanGMz of the Knownsec 404 security team and pangzi of pwnzen
http_HdrIs(const struct http *hp, hdr_t hdr, const char *val) { const char *p; if (!http_GetHdr(hp, hdr, &p)) return (0); AN(p); if (http_tok_eq(p, val)) return (1); return (0); }
0
[ "CWE-703" ]
varnish-cache
c5fd097e5cce8b461c6443af02b3448baef2491d
274,389,980,496,348,660,000,000,000,000,000,000,000
11
Do not call http_hdr_flags() on pseudo-headers In http_EstimateWS(), all headers are passed to the http_isfiltered() function to calculate how many bytes is needed to serialize the entire struct http. http_isfiltered() will check the headers for whether they are going to be filtered out later and if so skip them. How...
static CPINLINE void swoole_string_release(zend_string *str) { #ifdef ZEND_DEBUG zend_string_release(str); #else //if dont support alloc 0 will ignore //if support alloc size is definitely < ZEND_ALLOCA_MAX_SIZE ZSTR_ALLOCA_FREE(str, 0); #endif }
0
[ "CWE-200", "CWE-502" ]
swoole-src
4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76
257,496,059,377,150,640,000,000,000,000,000,000,000
10
add buffer end check
static int rdg_bio_read(BIO* bio, char* buf, int size) { int status; rdpRdg* rdg = (rdpRdg*)BIO_get_data(bio); status = rdg_read_data_packet(rdg, (BYTE*)buf, size); if (status < 0) { BIO_clear_retry_flags(bio); return -1; } else if (status == 0) { BIO_set_retry_read(bio); WSASetLastError(WSAEWOULDBLOCK...
0
[ "CWE-125" ]
FreeRDP
6b485b146a1b9d6ce72dfd7b5f36456c166e7a16
20,618,435,015,829,601,000,000,000,000,000,000,000
24
Fixed oob read in irp_write and similar
flatpak_dir_find_installed_ref (FlatpakDir *self, const char *opt_name, const char *opt_branch, const char *opt_arch, FlatpakKinds kinds, FlatpakKinds ...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
194,361,938,827,674,520,000,000,000,000,000,000,000
49
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
TEST(SimpleRegexTest, NonRootedSingleLineMode) { auto testIndex = buildSimpleIndexEntry(); IndexBoundsBuilder::BoundsTightness tightness; std::string prefix = IndexBoundsBuilder::simpleRegex("foo", "s", testIndex, &tightness); ASSERT_EQUALS(prefix, ""); ASSERT_EQUALS(tightness, IndexBoundsBuilder::I...
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
71,695,115,965,466,690,000,000,000,000,000,000,000
7
SERVER-44377 generate correct plan for indexed inequalities to null
void gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c) { int i; int y; int miny, maxy, pmaxy; int x1, y1; int x2, y2; int ind1, ind2; int ints; int fill_color; if (n <= 0) { return; } if (overflow2(sizeof(int), n)) { return; } if (c == gdAntiAliased) { fill_color = im->AA_color; } ...
0
[ "CWE-119" ]
php-src
e7f2356665c2569191a946b6fc35b437f0ae1384
246,801,587,220,464,840,000,000,000,000,000,000,000
106
Fix #66387: Stack overflow with imagefilltoborder The stack overflow is caused by the recursive algorithm in combination with a very large negative coordinate passed to gdImageFillToBorder(). As there is already a clipping for large positive coordinates to the width and height of the image, it seems to be consequent t...
int register_pernet_device(struct pernet_operations *ops) { int error; mutex_lock(&net_mutex); error = register_pernet_operations(&pernet_list, ops); if (!error && (first_device == &pernet_list)) first_device = &ops->list; mutex_unlock(&net_mutex); return error; }
0
[ "CWE-416" ]
linux
21b5944350052d2583e82dd59b19a9ba94a007f0
152,597,297,972,392,030,000,000,000,000,000,000,000
10
net: Fix double free and memory corruption in get_net_ns_by_id() (I can trivially verify that that idr_remove in cleanup_net happens after the network namespace count has dropped to zero --EWB) Function get_net_ns_by_id() does not check for net::count after it has found a peer in netns_ids idr. It may dereference a...
bool st_select_lex::optimize_unflattened_subqueries(bool const_only) { SELECT_LEX_UNIT *next_unit= NULL; for (SELECT_LEX_UNIT *un= first_inner_unit(); un; un= next_unit ? next_unit : un->next_unit()) { Item_subselect *subquery_predicate= un->item; next_unit= NULL; if (subquery_predicate...
1
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
51,603,173,876,445,220,000,000,000,000,000,000,000
115
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
explicit ScriptExecutionCallback( gin_helper::Promise<v8::Local<v8::Value>> promise, CompletionCallback callback) : promise_(std::move(promise)), callback_(std::move(callback)) {}
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
176,071,670,224,380,050,000,000,000,000,000,000,000
4
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
bool r_pkcs7_parse_extendedcertificatesandcertificates (RPKCS7ExtendedCertificatesAndCertificates *ecac, RASN1Object *object) { ut32 i; if (!ecac && !object) { return false; } if (object->list.length > 0) { ecac->elements = (RX509Certificate **) calloc (object->list.length, sizeof (RX509Certificate*)); if (!e...
0
[ "CWE-476" ]
radare2
7ab66cca5bbdf6cb2d69339ef4f513d95e532dbf
304,685,587,560,603,500,000,000,000,000,000,000,000
18
Fix #7152 - Null deref in cms
static int des1_set_key(struct ssh_cipher_struct *cipher, void *key, void *IV){ if(!cipher->key){ if (alloc_key(cipher) < 0) { return -1; } if (gcry_cipher_open(&cipher->key[0], GCRY_CIPHER_DES, GCRY_CIPHER_MODE_CBC, 0)) { SAFE_FREE(cipher->key); return -1; } if (gcry_c...
0
[ "CWE-310" ]
libssh
e99246246b4061f7e71463f8806b9dcad65affa0
255,517,423,072,407,080,000,000,000,000,000,000,000
21
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 FT_Error Load_Glyph(TTF_Font *font, c_glyph *cached, int want, int translation) { const int alignment = Get_Alignement() - 1; FT_GlyphSlot slot; FT_Error error; int ft_load = FT_LOAD_DEFAULT | font->ft_load_target; #if TTF_USE_COLOR if (want & CACHED_COLOR) { ft_load |= FT_LOAD_COL...
0
[ "CWE-190", "CWE-787" ]
SDL_ttf
db1b41ab8bde6723c24b866e466cad78c2fa0448
64,265,176,218,665,810,000,000,000,000,000,000,000
487
More integer overflow (see bug #187) Make sure that 'width + alignment' doesn't overflow, otherwise it could create a SDL_Surface of 'width' but with wrong 'pitch'
nautilus_file_get_deep_directory_count_as_string (NautilusFile *file) { return nautilus_file_get_deep_count_as_string_internal (file, FALSE, TRUE, FALSE); }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
327,806,765,515,035,550,000,000,000,000,000,000,000
4
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
static int __init userfaultfd_init(void) { userfaultfd_ctx_cachep = kmem_cache_create("userfaultfd_ctx_cache", sizeof(struct userfaultfd_ctx), 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, init_once_userfaultfd_ctx); return 0; }
0
[ "CWE-416" ]
linux
384632e67e0829deb8015ee6ad916b180049d252
41,892,885,805,275,904,000,000,000,000,000,000,000
9
userfaultfd: non-cooperative: fix fork use after free When reading the event from the uffd, we put it on a temporary fork_event list to detect if we can still access it after releasing and retaking the event_wqh.lock. If fork aborts and removes the event from the fork_event all is fine as long as we're still in the u...
void auth_request_set_state(struct auth_request *request, enum auth_request_state state) { if (request->state == state) return; i_assert(request->to_penalty == NULL); i_assert(auth_request_state_count[request->state] > 0); auth_request_state_count[request->state]--; auth_request_state_count[state]++; ...
0
[ "CWE-284" ]
core
7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904
308,556,505,244,090,850,000,000,000,000,000,000,000
15
auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter The passdb was wrongly deduplicated in this situation, causing wrong mechanisms or username_filter setting to be used. This would be a rather unlikely configuration though. Fixed by moving mechanisms and username_filter fro...
check_required_directories (NautilusApplication *application) { char *user_directory; char *desktop_directory; GSList *directories; gboolean ret; g_assert (NAUTILUS_IS_APPLICATION (application)); ret = TRUE; user_directory = nautilus_get_user_directory (); desktop_directory = nautilus_get_desktop_directory (...
0
[]
nautilus
1e1c916f5537eb5e4144950f291f4a3962fc2395
210,198,999,368,967,900,000,000,000,000,000,000,000
67
Add "interactive" argument to nautilus_file_mark_desktop_file_trusted. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: * libnautilus-private/nautilus-mime-actions.c: Add "interactive" ...
void flush_tlb_kernel_range(unsigned long start, unsigned long end) { /* Balance as user space task's flush, a bit conservative */ if (end == TLB_FLUSH_ALL || (end - start) > tlb_single_page_flush_ceiling * PAGE_SIZE) { on_each_cpu(do_flush_tlb_all, NULL, 1); } else { struct flush_tlb_info info; info.flu...
0
[ "CWE-362" ]
linux
71b3c126e61177eb693423f2e18a1914205b165e
191,361,763,495,814,400,000,000,000,000,000,000,000
14
x86/mm: Add barriers and document switch_mm()-vs-flush synchronization When switch_mm() activates a new PGD, it also sets a bit that tells other CPUs that the PGD is in use so that TLB flush IPIs will be sent. In order for that to work correctly, the bit needs to be visible prior to loading the PGD and therefore star...
static int imap_msg_open_new(struct Mailbox *m, struct Message *msg, struct Email *e) { int rc = -1; struct Buffer *tmp = mutt_buffer_pool_get(); mutt_buffer_mktemp(tmp); msg->fp = mutt_file_fopen(mutt_b2s(tmp), "w"); if (!msg->fp) { mutt_perror(mutt_b2s(tmp)); goto cleanup; } msg->path = mut...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
241,367,575,281,705,200,000,000,000,000,000,000,000
21
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>
R_API void r_bin_java_synthetic_attr_free(void /*RBinJavaAttrInfo*/ *a) { RBinJavaAttrInfo *attr = a; if (attr) { free (attr->name); free (attr->metas); free (attr); } }
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
143,576,458,665,654,930,000,000,000,000,000,000,000
8
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
report_error (format, va_alist) const char *format; va_dcl #endif { va_list args; error_prolog (1); SH_VA_START (args, format); vfprintf (stderr, format, args); fprintf (stderr, "\n"); va_end (args); if (exit_immediately_on_error) exit_shell (1); }
1
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
134,092,161,459,354,880,000,000,000,000,000,000,000
18
commit bash-20120224 snapshot
static struct kvm_vcpu_hv_synic *synic_get(struct kvm *kvm, u32 vpidx) { struct kvm_vcpu *vcpu; struct kvm_vcpu_hv_synic *synic; vcpu = get_vcpu_by_vpidx(kvm, vpidx); if (!vcpu) return NULL; synic = to_hv_synic(vcpu); return (synic->active) ? synic : NULL; }
1
[ "CWE-476" ]
linux
919f4ebc598701670e80e31573a58f1f2d2bf918
276,482,777,374,283,630,000,000,000,000,000,000,000
11
KVM: x86: hyper-v: Fix Hyper-V context null-ptr-deref Reported by syzkaller: KASAN: null-ptr-deref in range [0x0000000000000140-0x0000000000000147] CPU: 1 PID: 8370 Comm: syz-executor859 Not tainted 5.11.0-syzkaller #0 RIP: 0010:synic_get arch/x86/kvm/hyperv.c:165 [inline] RIP: 0010:kvm_hv_set_sint_gs...
check_for_opt_string_or_number_or_list_arg(typval_T *args, int idx) { return (args[idx].v_type == VAR_UNKNOWN || check_for_string_or_number_or_list_arg(args, idx) != FAIL); }
0
[ "CWE-125", "CWE-122" ]
vim
1e56bda9048a9625bce6e660938c834c5c15b07d
289,249,766,343,824,270,000,000,000,000,000,000,000
5
patch 9.0.0104: going beyond allocated memory when evaluating string constant Problem: Going beyond allocated memory when evaluating string constant. Solution: Properly skip over <Key> form.
static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regno, int off, int bpf_size, enum bpf_access_type t, int value_regno, bool strict_alignment_once) { struct bpf_reg_state *regs = cur_regs(env); struct bpf_reg_state *reg = regs + regno; struct bpf_func_state *state; int size,...
0
[]
linux
9b00f1b78809309163dda2d044d9e94a3c0248a3
106,887,228,402,181,300,000,000,000,000,000,000,000
198
bpf: Fix truncation handling for mod32 dst reg wrt zero Recently noticed that when mod32 with a known src reg of 0 is performed, then the dst register is 32-bit truncated in verifier: 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (b7) r0 = 0 1: R0_w=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 1: (b7) r1 = -1 2: R0_w=inv...
static int remove_marked_parents(struct rev_info *revs, struct commit *commit) { struct commit_list **pp, *p; int nth_parent, removed = 0; pp = &commit->parents; nth_parent = 0; while ((p = *pp) != NULL) { struct commit *parent = p->item; if (parent->object.flags & TMP_MARK) { parent->object.flags &= ~TMP_...
0
[]
git
a937b37e766479c8e780b17cce9c4b252fd97e40
235,075,203,527,983,640,000,000,000,000,000,000,000
27
revision: quit pruning diff more quickly when possible When the revision traversal machinery is given a pathspec, we must compute the parent-diff for each commit to determine which ones are TREESAME. We set the QUICK diff flag to avoid looking at more entries than we need; we really just care whether there are any cha...
int svm_set_efer(struct kvm_vcpu *vcpu, u64 efer) { struct vcpu_svm *svm = to_svm(vcpu); u64 old_efer = vcpu->arch.efer; vcpu->arch.efer = efer; if (!npt_enabled) { /* Shadow paging assumes NX to be available. */ efer |= EFER_NX; if (!(efer & EFER_LMA)) efer &= ~EFER_LME; } if ((old_efer & EFER_SVME)...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
106,441,720,758,868,490,000,000,000,000,000,000,000
51
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
static json_t *json_real_copy(const json_t *real) { return json_real(json_real_value(real)); }
0
[ "CWE-310" ]
jansson
8f80c2d83808150724d31793e6ade92749b1faa4
64,339,569,777,675,780,000,000,000,000,000,000,000
4
CVE-2013-6401: Change hash function, randomize hashes Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing and testing.
static char *simple_build_upvalue_symbol(char *proto_name, LuaUpvalueEntry *entry) { return rz_str_newf("%s_upvalue_0x%llx", proto_name, entry->offset); }
0
[ "CWE-200", "CWE-787" ]
rizin
07b43bc8aa1ffebd9b68d60624c9610cf7e460c7
335,517,822,234,657,900,000,000,000,000,000,000,000
3
fix oob read on luac
void qpdf_set_decode_level(qpdf_data qpdf, qpdf_stream_decode_level_e level) { QTC::TC("qpdf", "qpdf-c called qpdf_set_decode_level"); qpdf->qpdf_writer->setDecodeLevel(level); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
338,387,226,379,141,000,000,000,000,000,000,000,000
5
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, unsigned short family) { struct net *net = dev_net(skb->dev); struct xfrm_policy *pol; struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX]; int npols = 0; int xfrm_nr; int pi; int reverse; struct flowi fl; u8 fl_dir; int xerr_idx = -1; rev...
0
[ "CWE-125" ]
ipsec
7bab09631c2a303f87a7eb7e3d69e888673b9b7e
213,675,079,024,392,130,000,000,000,000,000,000,000
157
xfrm: policy: check policy direction value The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used as an array index. This can lead to an out-of-bound access, kernel lockup and DoS. Add a check for the 'dir' value. This fixes CVE-2017-11600. References: https://bugzilla.redhat.com/show_bug.cgi?...
static int of_path_platform_device_exists(const char *path) { struct platform_device *pdev; pdev = of_path_to_platform_device(path); platform_device_put(pdev); return pdev != NULL; }
0
[ "CWE-401" ]
linux
e13de8fe0d6a51341671bbe384826d527afe8d44
6,703,278,113,083,083,000,000,000,000,000,000,000
8
of: unittest: fix memory leak in unittest_data_add In unittest_data_add, a copy buffer is created via kmemdup. This buffer is leaked if of_fdt_unflatten_tree fails. The release for the unittest_data buffer is added. Fixes: b951f9dc7f25 ("Enabling OF selftest to run without machine's devicetree") Signed-off-by: Navid ...
tiparm(const char *string, ...) { TPARM_DATA myData; va_list ap; char *result = NULL; _nc_tparm_err = 0; #ifdef TRACE TPS(tname) = "tiparm"; #endif /* TRACE */ if (tparm_setup(string, &myData) == OK) { va_start(ap, string); tparm_copy_valist(&myData, FALSE, ap); va_end(ap); result = tpar...
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
142,892,383,039,679,140,000,000,000,000,000,000,000
21
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
static bool io_sq_thread_should_park(struct io_sq_data *sqd) { return test_bit(IO_SQ_THREAD_SHOULD_PARK, &sqd->state);
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
80,500,241,085,305,490,000,000,000,000,000,000,000
4
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
QPDFWriter::QPDFWriter(QPDF& pdf, char const* description, FILE *file, bool close_file) : m(new Members(pdf)) { setOutputFile(description, file, close_file); }
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
185,733,356,288,661,530,000,000,000,000,000,000,000
6
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
static bool ndp_msg_check_valid(struct ndp_msg *msg) { size_t len = ndp_msg_payload_len(msg); enum ndp_msg_type msg_type = ndp_msg_type(msg); if (len < ndp_msg_type_info(msg_type)->raw_struct_size) return false; if (ndp_msg_type_info(msg_type)->addrto_validate) return ndp_msg_type_info(msg_type)->addrto_valid...
0
[ "CWE-284" ]
libndp
2af9a55b38b55abbf05fd116ec097d4029115839
45,727,761,424,384,090,000,000,000,000,000,000,000
13
libndb: reject redirect and router advertisements from non-link-local RFC4861 suggests that these messages should only originate from link-local addresses in 6.1.2 (RA) and 8.1. (redirect): Mitigates CVE-2016-3698. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
static int jpc_pi_nextpcrl(register jpc_pi_t *pi) { int rlvlno; jpc_pirlvl_t *pirlvl; jpc_pchg_t *pchg; int prchind; int prcvind; int *prclyrno; int compno; jpc_picomp_t *picomp; int xstep; int ystep; uint_fast32_t trx0; uint_fast32_t try0; uint_fast32_t r; uint_fast32_t rpx; uint_fast32_t rpy; pchg = ...
0
[ "CWE-125" ]
jasper
99a50593254d1b53002719bbecfc946c84b23d27
325,294,130,354,234,700,000,000,000,000,000,000,000
99
Apply a patch for the following bug report: https://github.com/mdadams/jasper/issues/103 Heap-Buffer-Overflow or Null-pointer-dereference vulnerability due to a programming mistake (off-by-1)
static Image *ReadICONImage(const ImageInfo *image_info, ExceptionInfo *exception) { IconFile icon_file; IconInfo icon_info; Image *image; MagickBooleanType status; register ssize_t i, x; register Quantum *q; register unsigned char *p; size_t bit, byte, ...
0
[ "CWE-190", "CWE-189", "CWE-703" ]
ImageMagick
0f6fc2d5bf8f500820c3dbcf0d23ee14f2d9f734
247,133,622,891,251,820,000,000,000,000,000,000,000
503
mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0, unsigned int *offsets) { unsigned int hook; /* No recursion; use packet counter to save back ptrs (reset to 0 as we leave), and comefrom to save source hook bitmask */ for (hook = 0; hook < NF_INET_NUMHOOKS...
0
[ "CWE-787" ]
linux
b29c457a6511435960115c0f548c4360d5f4801d
71,067,434,493,182,420,000,000,000,000,000,000,000
82
netfilter: x_tables: fix compat match/target pad out-of-bound write xt_compat_match/target_from_user doesn't check that zeroing the area to start of next rule won't write past end of allocated ruleset blob. Remove this code and zero the entire blob beforehand. Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appsp...
static CallInfo *growCI (lua_State *L) { if (L->size_ci > LUAI_MAXCALLS) /* overflow while handling overflow? */ luaD_throw(L, LUA_ERRERR); else { luaD_reallocCI(L, 2*L->size_ci); if (L->size_ci > LUAI_MAXCALLS) luaG_runerror(L, "stack overflow"); } return ++L->ci; }
0
[ "CWE-200", "CWE-17" ]
redis
fdf9d455098f54f7666c702ae464e6ea21e25411
176,999,281,721,243,780,000,000,000,000,000,000,000
10
disable loading lua bytecode
virDomainChrTargetDefFormat(virBufferPtr buf, const virDomainChrDef *def, unsigned int flags) { const char *targetType = virDomainChrTargetTypeToString(def->deviceType, def->targetType); switch (...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
291,217,578,167,743,040,000,000,000,000,000,000,000
114
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
static int qib_set_part_key(struct qib_ctxtdata *rcd, u16 key) { struct qib_pportdata *ppd = rcd->ppd; int i, any = 0, pidx = -1; u16 lkey = key & 0x7FFF; int ret; if (lkey == (QIB_DEFAULT_P_KEY & 0x7FFF)) { /* nothing to do; this key always valid */ ret = 0; goto bail; } if (!lkey) { ret = -EINVAL; ...
0
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
296,307,746,446,593,800,000,000,000,000,000,000,000
87
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
GF_Err sdtp_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_SampleDependencyTypeBox *ptr = (GF_SampleDependencyTypeBox *)s; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_data(bs, (char*)ptr->sample_info, ptr->sampleCount); return GF_OK; }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
102,019,079,070,459,740,000,000,000,000,000,000,000
9
fixed 2 possible heap overflows (inc. #1088)
void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type, const char *fmt, ...) { struct audit_buffer *ab; va_list args; ab = audit_log_start(ctx, gfp_mask, type); if (ab) { va_start(args, fmt); audit_log_vformat(ab, fmt, args); va_end(args); audit_log_end(ab); } }
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
63,681,706,092,980,380,000,000,000,000,000,000,000
14
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
static int dx_make_map (struct ext4_dir_entry_2 *de, int size, struct dx_hash_info *hinfo, struct dx_map_entry *map_tail) { int count = 0; char *base = (char *) de; struct dx_hash_info h = *hinfo; while ((char *) de < base + size) { if (de->name_len && de->inode) { ext4fs_dirhash(de->name, de->name_len, &...
0
[ "CWE-20" ]
linux-2.6
e6b8bc09ba2075cd91fbffefcd2778b1a00bd76f
169,472,259,154,793,230,000,000,000,000,000,000,000
23
ext4: Add sanity check to make_indexed_dir Make sure the rec_len field in the '..' entry is sane, lest we overrun the directory block and cause a kernel oops on a purposefully corrupted filesystem. Thanks to Sami Liedes for reporting this bug. http://bugzilla.kernel.org/show_bug.cgi?id=12430 Signed-off-by: "Theodor...
static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd, unsigned long addr, unsigned long end, unsigned long floor, unsigned long ceiling) { pud_t *pud; unsigned long next; unsigned long start; start = addr; pud = pud_offset(pgd, addr); do { next = pud_addr_end(addr, end); if (pud_none_...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
66,869,512,769,918,505,000,000,000,000,000,000,000
32
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
int copy_file(const char *source, const char *dest, int ofd, mode_t mode) { int ifd; char buf[1024 * 8]; int len; /* Number of bytes read into `buf'. */ #ifdef PREALLOCATE_NEEDS_TRUNCATE OFF_T preallocated_len = 0, offset = 0; #endif if ((ifd = do_open(source, O_RDONLY, 0)) < 0) { int save_errno = errno; rs...
0
[ "CWE-59" ]
rsync
4cad402ea8a91031f86c53961d78bb7f4f174790
75,923,765,191,744,230,000,000,000,000,000,000,000
110
Receiver now rejects invalid filenames in filelist. If the receiver gets a filename with a leading slash (w/o --relative) and/or a filename with an embedded ".." dir in the path, it dies with an error (rather than continuing). Those invalid paths should never happen in reality, so just reject someone trying to pull a ...
static int update_credential_name(struct config_module * config, json_t * j_params, const char * username, const char * credential_id, const char * name) { json_t * j_query; char * username_escaped, * mod_name_escaped, * username_clause; int res, ret; username_escaped = h_escape_string_with_quotes(config->conn...
0
[ "CWE-787" ]
glewlwyd
4c5597c155bfbaf6491cf6b83479d241ae66940a
268,439,617,941,322,360,000,000,000,000,000,000,000
36
Fix possible buffer overflow
void releaseUser(User* user) override { UASSERT_NOT_IMPLEMENTED; }
0
[ "CWE-613" ]
mongo
6dfb92b1299de04677d0bd2230e89a52eb01003c
271,106,586,844,802,820,000,000,000,000,000,000,000
3
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
static int rtreeBeginTransaction(sqlite3_vtab *pVtab){ Rtree *pRtree = (Rtree *)pVtab; assert( pRtree->inWrTrans==0 ); pRtree->inWrTrans++; return SQLITE_OK; }
0
[ "CWE-125" ]
sqlite
e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8
202,384,785,951,906,950,000,000,000,000,000,000,000
6
Enhance the rtreenode() function of rtree (used for testing) so that it uses the newer sqlite3_str object for better performance and improved error reporting. FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377
int dwc3_gadget_set_link_state(struct dwc3 *dwc, enum dwc3_link_state state) { int retries = 10000; u32 reg; /* * Wait until device controller is ready. Only applies to 1.94a and * later RTL. */ if (dwc->revision >= DWC3_REVISION_194A) { while (--retries) { reg = dwc3_readl(dwc->regs, DWC3_DSTS); i...
0
[ "CWE-703", "CWE-667", "CWE-189" ]
linux
c91815b596245fd7da349ecc43c8def670d2269e
77,272,284,441,383,330,000,000,000,000,000,000,000
49
usb: dwc3: gadget: never call ->complete() from ->ep_queue() This is a requirement which has always existed but, somehow, wasn't reflected in the documentation and problems weren't found until now when Tuba Yavuz found a possible deadlock happening between dwc3 and f_hid. She described the situation as follows: spin_...
void options_free(int current) { GLOBAL_OPTIONS *global=current?&global_options:&new_global_options; SERVICE_OPTIONS *service=current?&service_options:&new_service_options; parse_global_option(CMD_FREE, global, NULL, NULL); CRYPTO_THREAD_write_lock(stunnel_locks[LOCK_SECTIONS]); while(service) { ...
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
198,652,093,670,090,480,000,000,000,000,000,000,000
15
stunnel-5.57
static inline u64 nested_vmx_get_vmcs01_guest_efer(struct vcpu_vmx *vmx) { struct shared_msr_entry *efer_msr; unsigned int i; if (vm_entry_controls_get(vmx) & VM_ENTRY_LOAD_IA32_EFER) return vmcs_read64(GUEST_IA32_EFER); if (cpu_has_load_ia32_efer()) return host_efer; for (i = 0; i < vmx->msr_autoload.guest...
0
[ "CWE-863" ]
kvm
acff78477b9b4f26ecdf65733a4ed77fe837e9dc
24,671,704,815,798,856,000,000,000,000,000,000,000
22
KVM: x86: nVMX: close leak of L0's x2APIC MSRs (CVE-2019-3887) The nested_vmx_prepare_msr_bitmap() function doesn't directly guard the x2APIC MSR intercepts with the "virtualize x2APIC mode" MSR. As a result, we discovered the potential for a buggy or malicious L1 to get access to L0's x2APIC MSRs, via an L2, as follo...