func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static struct dev_kfree_skb_cb *get_kfree_skb_cb(const struct sk_buff *skb) { return (struct dev_kfree_skb_cb *)skb->cb;
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
309,196,688,279,253,170,000,000,000,000,000,000,000
4
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
int nfs4_setxattr(struct dentry *dentry, const char *key, const void *buf, size_t buflen, int flags) { struct inode *inode = dentry->d_inode; if (strcmp(key, XATTR_NAME_NFSV4_ACL) != 0) return -EOPNOTSUPP; return nfs4_proc_set_acl(inode, buf, buflen); }
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
56,544,606,711,298,850,000,000,000,000,000,000,000
10
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
pblock_init(Slapi_PBlock *pb) { memset(pb, '\0', sizeof(Slapi_PBlock)); }
0
[ "CWE-415" ]
389-ds-base
a3c298f8140d3e4fa1bd5a670f1bb965a21a9b7b
139,232,858,159,711,640,000,000,000,000,000,000,000
4
Issue 5218 - double-free of the virtual attribute context in persistent search (#5219) description: A search is processed by a worker using a private pblock. If the search is persistent, the worker spawn a thread and kind of duplicate its private pblock so that the spawn thread continue to process the p...
int rsi_mgmt_pkt_recv(struct rsi_common *common, u8 *msg) { s32 msg_len = (le16_to_cpu(*(__le16 *)&msg[0]) & 0x0fff); u16 msg_type = (msg[2]); rsi_dbg(FSM_ZONE, "%s: Msg Len: %d, Msg Type: %4x\n", __func__, msg_len, msg_type); switch (msg_type) { case TA_CONFIRM_TYPE: return rsi_handle_ta_confirm_type(common...
0
[ "CWE-400", "CWE-401" ]
linux
d563131ef23cbc756026f839a82598c8445bc45f
102,423,234,797,955,120,000,000,000,000,000,000,000
78
rsi: release skb if rsi_prepare_beacon fails In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
static int readOHDRmessages(struct READER *reader, struct DATAOBJECT *dataobject, uint64_t end_of_messages) { FILE *fhd = reader->fhd; int err; long end; while (ftell(fhd) < end_of_messages - 4) { /* final gap may has a size of up to 3 */ ui...
0
[ "CWE-787" ]
libmysofa
890400ebd092c574707d0c132124f8ff047e20e1
322,649,742,615,820,470,000,000,000,000,000,000,000
94
Fix for issue 163
static void ccall(JF, js_Ast *fun, js_Ast *args) { int n; switch (fun->type) { case EXP_INDEX: cexp(J, F, fun->a); emit(J, F, OP_DUP); cexp(J, F, fun->b); emit(J, F, OP_GETPROP); emit(J, F, OP_ROT2); break; case EXP_MEMBER: cexp(J, F, fun->a); emit(J, F, OP_DUP); emitstring(J, F, OP_GETPROP_S, fun...
0
[ "CWE-703", "CWE-787" ]
mujs
df8559e7bdbc6065276e786217eeee70f28fce66
282,138,207,830,108,330,000,000,000,000,000,000,000
32
Bug 704749: Clear jump list after patching jump addresses. Since we can emit a statement multiple times when compiling try/finally we have to use a new patch list for each instance.
static ssize_t do_tcp_sendpages(struct sock *sk, struct page *page, int offset, size_t size, int flags) { struct tcp_sock *tp = tcp_sk(sk); int mss_now, size_goal; int err; ssize_t copied; long timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT); /* Wait for a connection to finish. One exception is TCP Fast Open...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
226,143,813,640,486,100,000,000,000,000,000,000,000
117
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
psutil_proc_io_counters(PyObject *self, PyObject *args) { DWORD pid; HANDLE hProcess; IO_COUNTERS IoCounters; if (! PyArg_ParseTuple(args, "l", &pid)) return NULL; hProcess = psutil_handle_from_pid(pid, PROCESS_QUERY_LIMITED_INFORMATION); if (NULL == hProcess) return NULL; ...
0
[ "CWE-415" ]
psutil
7d512c8e4442a896d56505be3e78f1156f443465
250,446,330,419,842,380,000,000,000,000,000,000,000
26
Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creat...
static int tg3_phy_lpbk_set(struct tg3 *tp, u32 speed, bool extlpbk) { u32 val, bmcr, mac_mode, ptest = 0; tg3_phy_toggle_apd(tp, false); tg3_phy_toggle_automdix(tp, 0); if (extlpbk && tg3_phy_set_extloopbk(tp)) return -EIO; bmcr = BMCR_FULLDPLX; switch (speed) { case SPEED_10: break; case SPEED_100: b...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
143,878,602,982,377,480,000,000,000,000,000,000,000
92
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
static void display_update(DisplayChangeListener *dcl, int x, int y, int w, int h) { PCIQXLDevice *qxl = container_of(dcl, PCIQXLDevice, ssd.dcl); if (qxl->mode == QXL_MODE_VGA) { qemu_spice_display_update(&qxl->ssd, x, y, w, h); } }
0
[ "CWE-476" ]
qemu
d52680fc932efb8a2f334cc6993e705ed1e31e99
77,101,896,962,691,225,000,000,000,000,000,000,000
9
qxl: check release info object When releasing spice resources in release_resource() routine, if release info object 'ext.info' is null, it leads to null pointer dereference. Add check to avoid it. Reported-by: Bugs SysSec <bugs-syssec@rub.de> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Message-id: 20190425...
inline bool is_hex(char c, int &v) { if ('0' <= c && c <= '9') { v = c - '0'; return true; } else if ('a' <= c && c <= 'f') { v = c - 'a' + 10; return true; } else if ('A' <= c && c <= 'F') { v = c - 'A' + 10; return true; } return false; }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
288,296,300,391,613,700,000,000,000,000,000,000,000
13
Fix #122
ftp_loop (struct url *u, char **local_file, int *dt, struct url *proxy, bool recursive, bool glob) { ccon con; /* FTP connection */ uerr_t res; *dt = 0; xzero (con); con.csock = -1; con.st = ON_YOUR_OWN; con.rs = ST_UNIX; con.id = NULL; con.proxy = proxy; /* If the ...
0
[ "CWE-20" ]
wget
3e25a9817f47fbb8660cc6a3b2f3eea239526c6c
254,472,226,209,179,080,000,000,000,000,000,000,000
95
Introduce --trust-server-names. Close CVE-2010-2252.
isoent_add_child_tail(struct isoent *parent, struct isoent *child) { if (!__archive_rb_tree_insert_node( &(parent->rbtree), (struct archive_rb_node *)child)) return (0); child->chnext = NULL; *parent->children.last = child; parent->children.last = &(child->chnext); parent->children.cnt++; child->parent = ...
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
69,498,082,573,068,040,000,000,000,000,000,000,000
22
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
flatpak_dir_create_child_repo (FlatpakDir *self, GFile *cache_dir, GLnxLockFile *file_lock, const char *optional_commit, GError **error) { g_autoptr(GFile) repo_dir = NULL; g_a...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
96,320,629,200,695,870,000,000,000,000,000,000,000
137
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
void c_shquote_skip_str(const char **strp, size_t *n_strp, size_t len) { c_assert(len <= *n_strp); *strp += len; *n_strp -= len; }
0
[ "CWE-787" ]
c-shquote
7fd15f8e272136955f7ffc37df29fbca9ddceca1
280,931,823,476,567,930,000,000,000,000,000,000,000
8
strnspn: fix buffer overflow Fix the strnspn and strncspn functions to use a properly sized buffer. It used to be 1 byte too short. Checking for `0xff` in a string will thus write `0xff` once byte beyond the stack space of the local buffer. Note that the public API does not allow to pass `0xff` to those functions. Th...
int cil_gen_call(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node) { enum cil_syntax syntax[] = { CIL_SYN_STRING, CIL_SYN_STRING, CIL_SYN_LIST | CIL_SYN_EMPTY_LIST | CIL_SYN_END, CIL_SYN_END }; int syntax_len = sizeof(syntax)/sizeof(*syntax); struct cil_call *call = NUL...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
73,220,301,977,468,410,000,000,000,000,000,000,000
40
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
ClientSslTransportOptions ecdsaOnlyClientOptions() { auto options = ClientSslTransportOptions().setClientEcdsaCert(true); if (tls_version_ == envoy::extensions::transport_sockets::tls::v3::TlsParameters::TLSv1_3) { return options.setSigningAlgorithmsForTest("ecdsa_secp256r1_sha256"); } else { ...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
8,605,767,029,208,063,000,000,000,000,000,000,000
8
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...
void DocumentSourceGraphLookUp::checkMemoryUsage() { // TODO SERVER-23980: Implement spilling to disk if allowDiskUse is specified. uassert(40099, "$graphLookup reached maximum memory consumption", (_visitedUsageBytes + _frontierUsageBytes) < _maxMemoryUsageBytes); _cache.evictDownTo...
0
[ "CWE-416" ]
mongo
d6133a3a5464fac202f512b0310dfeb200c126f9
52,819,734,939,781,560,000,000,000,000,000,000,000
7
SERVER-43350 $lookup with no local default or user-specified collation should explicitly set the simple collation on the foreign expression context
static void end_block_io_op(struct bio *bio) { __end_block_io_op(bio->bi_private, bio->bi_error); bio_put(bio); }
0
[ "CWE-200" ]
linux
089bc0143f489bd3a4578bdff5f4ca68fb26f341
274,643,871,043,628,550,000,000,000,000,000,000,000
5
xen-blkback: don't leak stack data via response ring Rather than constructing a local structure instance on the stack, fill the fields directly on the shared ring, just like other backends do. Build on the fact that all response structure flavors are actually identical (the old code did make this assumption too). Thi...
static int compat_filldir64(void * __buf, const char * name, int namlen, loff_t offset, u64 ino, unsigned int d_type) { struct linux_dirent64 __user *dirent; struct compat_getdents_callback64 *buf = __buf; int jj = NAME_OFFSET(dirent); int reclen = COMPAT_ROUND_UP64(jj + namlen + 1); u64 off; buf->error =...
0
[]
linux-2.6
822191a2fa1584a29c3224ab328507adcaeac1ab
221,834,775,877,451,760,000,000,000,000,000,000,000
41
[PATCH] skip data conversion in compat_sys_mount when data_page is NULL OpenVZ Linux kernel team has found a problem with mounting in compat mode. Simple command "mount -t smbfs ..." on Fedora Core 5 distro in 32-bit mode leads to oops: Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: comp...
ipf_is_last_v6_frag(ovs_be16 ip6f_offlg) { if ((ip6f_offlg & IP6F_OFF_MASK) && !(ip6f_offlg & IP6F_MORE_FRAG)) { return true; } return false; }
0
[ "CWE-401" ]
ovs
803ed12e31b0377c37d7aa8c94b3b92f2081e349
318,902,878,772,386,700,000,000,000,000,000,000,000
8
ipf: release unhandled packets from the batch Since 640d4db788ed ("ipf: Fix a use-after-free error, ...") the ipf framework unconditionally allocates a new dp_packet to track individual fragments. This prevents a use-after-free. However, an additional issue was present - even when the packet buffer is cloned, if the...
TEST(IndexBoundsBuilderTest, TranslateDottedFieldNotEqualToNullShouldBuildInexactBoundsIfIndexIsMultiKey) { BSONObj indexPattern = BSON("a.b" << 1); auto testIndex = buildSimpleIndexEntry(indexPattern); testIndex.multikey = true; BSONObj matchObj = BSON("a.b" << BSON("$ne" << BSONNULL)); auto ...
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
173,903,005,067,256,870,000,000,000,000,000,000,000
18
SERVER-44377 generate correct plan for indexed inequalities to null
static inline void tlb_flush_pud_range(struct mmu_gather *tlb, unsigned long address, unsigned long size) { __tlb_adjust_range(tlb, address, size); tlb->cleared_puds = 1; }
0
[ "CWE-362" ]
linux
b67fbebd4cf980aecbcc750e1462128bffe8ae15
271,823,002,392,722,360,000,000,000,000,000,000,000
6
mmu_gather: Force tlb-flush VM_PFNMAP vmas Jann reported a race between munmap() and unmap_mapping_range(), where unmap_mapping_range() will no-op once unmap_vmas() has unlinked the VMA; however munmap() will not yet have invalidated the TLBs. Therefore unmap_mapping_range() will complete while there are still (stale...
static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode, unsigned int flags) { struct ext4_extent_header *neh; struct buffer_head *bh; ext4_fsblk_t newblock, goal = 0; struct ext4_super_block *es = EXT4_SB(inode->i_sb)->s_es; int err = 0; size_t ext_size = 0; /* Try to prepend new index to o...
0
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
162,657,345,811,603,800,000,000,000,000,000,000,000
79
ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently...
TEST(MessageCompressorManager, BadCompressionRequested) { auto input = BSON("isMaster" << 1 << "compression" << BSON_ARRAY("fakecompressor")); checkServerNegotiation(input, {}); }
0
[]
mongo
5ad69b851801edadbfde8fdf271f4ba7c21170b5
33,715,502,868,985,170,000,000,000,000,000,000,000
4
SERVER-31273 Use Source/Sink version of snappy functions (cherry picked from commit 59ead734faa8aa51f0c53bf2bd39d0a0247ddf99)
directory_initiate_command(const char *address, const tor_addr_t *_addr, uint16_t or_port, uint16_t dir_port, int supports_conditional_consensus, int supports_begindir, const char *digest, uint8_t dir_purpose, ui...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
168,184,738,849,264,550,000,000,000,000,000,000,000
16
Fix assertion failure in tor_timegm. Fixes bug 6811.
static void next_reap_node(void) { int node = __this_cpu_read(slab_reap_node); node = next_node_in(node, node_online_map); __this_cpu_write(slab_reap_node, node); }
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
93,448,720,431,546,120,000,000,000,000,000,000,000
7
mm/slab.c: fix SLAB freelist randomization duplicate entries This patch fixes a bug in the freelist randomization code. When a high random number is used, the freelist will contain duplicate entries. It will result in different allocations sharing the same chunk. It will result in odd behaviours and crashes. It sh...
push_write_next_chunk (SoupMessage *msg, gpointer user_data) { PushHandle *handle = user_data; /* If we've been restarted, seek to the beginning of the file. */ if (handle->read_status == PUSH_READ_STATUS_RESET) { GError *error = NULL; /* We've been restarted but there's still a read in flight, ...
0
[]
gvfs
f81ff2108ab3b6e370f20dcadd8708d23f499184
172,222,778,456,507,760,000,000,000,000,000,000,000
39
dav: don't unescape the uri twice path_equal tries to unescape path before comparing. Unfortunately this function is used also for already unescaped paths. Therefore unescaping can fail. This commit reverts changes which was done in commit 50af53d and unescape just uris, which aren't unescaped yet. https://bugzilla.g...
_libssh2_channel_write(LIBSSH2_CHANNEL *channel, int stream_id, const unsigned char *buf, size_t buflen) { int rc = 0; LIBSSH2_SESSION *session = channel->session; ssize_t wrote = 0; /* counter for this specific this call */ /* In theory we could split larger buffers into several...
0
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
336,815,831,218,607,920,000,000,000,000,000,000,000
133
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
else if (type == NBD_REPLY_TYPE_OFFSET_DATA) { /* The spec states that 0-length requests are unspecified, but * 0-length replies are broken. Still, it's easy enough to support * them as an extension, so we use < instead of <=. */ if (cmd->type != NBD_CMD_READ) { SET_NEXT_STATE (%.DEAD); ...
0
[]
libnbd
2c1987fc23d6d0f537edc6d4701e95a2387f7917
19,149,486,193,221,827,000,000,000,000,000,000,000
23
lib: Fix stack corruption with structured reply containing negative offset. Because of improper bounds checking, when receiving a structured reply some offset/lengths sent by the server could cause libnbd to execute arbitrary code under control of a malicious server. A structured reply segment containing (for example...
compat_mpt_command(struct file *filp, unsigned int cmd, unsigned long arg) { struct mpt_ioctl_command32 karg32; struct mpt_ioctl_command32 __user *uarg = (struct mpt_ioctl_command32 __user *) arg; struct mpt_ioctl_command karg; MPT_ADAPTER *iocp = NULL; int iocnum, iocnumX; int nonblock = (filp->f_flags & O_NO...
1
[ "CWE-362", "CWE-369" ]
linux
28d76df18f0ad5bcf5fa48510b225f0ed262a99b
164,195,225,865,569,520,000,000,000,000,000,000,000
52
scsi: mptfusion: Fix double fetch bug in ioctl Tom Hatskevich reported that we look up "iocp" then, in the called functions we do a second copy_from_user() and look it up again. The problem that could cause is: drivers/message/fusion/mptctl.c 674 /* All of these commands require an interrupt or 675 ...
cleanup (void) { /* Free external resources, close files, etc. */ /* Close WARC file. */ if (opt.warc_filename != 0) warc_close (); log_close (); if (output_stream) if (fclose (output_stream) == EOF) inform_exit_status (CLOSEFAILED); /* No need to check for error because Wget flushes its o...
0
[ "CWE-22" ]
wget
18b0979357ed7dc4e11d4f2b1d7e0f5932d82aa7
143,733,100,627,465,210,000,000,000,000,000,000,000
81
CVE-2014-4877: Arbitrary Symlink Access Wget was susceptible to a symlink attack which could create arbitrary files, directories or symbolic links and set their permissions when retrieving a directory recursively through FTP. This commit changes the default settings in Wget such that Wget no longer creates local symbo...
TEST_P(DownstreamProtocolIntegrationTest, HeaderNormalizationRejection) { config_helper_.addConfigModifier( [](envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager& hcm) -> void { hcm.set_path_with_escaped_slashes_action( envoy::extensions::fil...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
102,521,381,130,323,580,000,000,000,000,000,000,000
18
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
void e2fsck_pass1_dupblocks(e2fsck_t ctx, char *block_buf) { ext2_filsys fs = ctx->fs; struct problem_context pctx; #ifdef RESOURCE_TRACK struct resource_track rtrack; #endif clear_problem_context(&pctx); pctx.errcode = e2fsck_allocate_inode_bitmap(fs, _("multiply claimed inode map"), EXT2FS_BMAP64_RBTRE...
0
[ "CWE-787" ]
e2fsprogs
71ba13755337e19c9a826dfc874562a36e1b24d3
306,628,593,226,884,950,000,000,000,000,000,000,000
63
e2fsck: don't try to rehash a deleted directory If directory has been deleted in pass1[bcd] processing, then we shouldn't try to rehash the directory in pass 3a when we try to rehash/reoptimize directories. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
void rtps_util_add_ipv4_address_t(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, gint offset, const guint encoding, int hf_item) { proto_item *ti; ti = proto_tree_add_item(tree, hf_item, tvb, offset, 4, encoding); if (tvb_get_ntohl(tvb, offset) == IPADDRESS_INVALID) e...
0
[ "CWE-401" ]
wireshark
33e63d19e5496c151bad69f65cdbc7cba2b4c211
32,014,297,650,618,610,000,000,000,000,000,000,000
9
RTPS: Fixup our coherent set map. coherent_set_tracking.coherent_set_registry_map uses a struct as a key, but the hash and comparison routines treat keys as a sequence of bytes. Make sure every key byte is initialized. Fixes #16994. Call wmem_strong_hash on our key in coherent_set_key_hash_by_key instead of creating ...
static int nfnl_cthelper_update_policy(struct nf_conntrack_helper *helper, const struct nlattr *attr) { struct nlattr *tb[NFCTH_POLICY_SET_MAX + 1]; unsigned int class_max; int err; err = nla_parse_nested(tb, NFCTH_POLICY_SET_MAX, attr, nfnl_cthelper_expect_policy_set, NULL); if (err < 0) r...
0
[ "CWE-862" ]
linux
4b380c42f7d00a395feede754f0bc2292eebe6e5
247,970,125,770,193,300,000,000,000,000,000,000,000
21
netfilter: nfnetlink_cthelper: Add missing permission checks The capability check in nfnetlink_rcv() verifies that the caller has CAP_NET_ADMIN in the namespace that "owns" the netlink socket. However, nfnl_cthelper_list is shared by all net namespaces on the system. An unprivileged user can create user and net names...
WandExport MagickBooleanType MagickCommandGenesis(ImageInfo *image_info, MagickCommand command,int argc,char **argv,char **metadata, ExceptionInfo *exception) { char client_name[MaxTextExtent], *option; double duration, serial; MagickBooleanType concurrent, regard_warnings, statu...
0
[ "CWE-617" ]
ImageMagick
12f34b60564de1cbec08e23e2413dab5b64daeb7
317,474,701,976,924,700,000,000,000,000,000,000,000
183
https://github.com/ImageMagick/ImageMagick/issues/802
libarchive_read_read_cb (struct archive *ar_read, void *client_data, const void **buffer) { AutoarExtractor *self; gssize read_size; g_debug ("libarchive_read_read_cb: called"); self = AUTOAR_EXTRACTOR (client_data); if (self->error != NULL ...
0
[ "CWE-22" ]
gnome-autoar
adb067e645732fdbe7103516e506d09eb6a54429
254,829,848,987,333,400,000,000,000,000,000,000,000
26
AutoarExtractor: Do not extract files outside the destination dir Currently, a malicious archive can cause that the files are extracted outside of the destination dir. This can happen if the archive contains a file whose parent is a symbolic link, which points outside of the destination dir. This is potentially a secu...
static void netstamp_clear(struct work_struct *work) { int deferred = atomic_xchg(&netstamp_needed_deferred, 0); int wanted; wanted = atomic_add_return(deferred, &netstamp_wanted); if (wanted > 0) static_key_enable(&netstamp_needed); else static_key_disable(&netstamp_needed); }
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
52,053,755,404,145,000,000,000,000,000,000,000,000
11
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
static CImg<T> vector(const T& a0) { CImg<T> r(1,1); r[0] = a0; return r; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
109,682,153,913,141,760,000,000,000,000,000,000,000
5
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
GF_Err DoWrite(MovieWriter *mw, GF_List *writers, GF_BitStream *bs, u8 Emulation, u64 StartOffset) { u32 i; GF_Err e; TrackWriter *writer; u64 offset, sampOffset, predOffset; u32 chunkNumber, descIndex, sampSize; Bool force; GF_StscEntry *stsc_ent; u64 size, mdatSize = 0; GF_ISOFile *movie = mw->movie; /*wri...
0
[ "CWE-416" ]
gpac
5aba27604d957e960d8069d85ccaf868f8a7b07a
192,261,882,913,612,570,000,000,000,000,000,000,000
108
fixed #1661
void vsock_remove_connected(struct vsock_sock *vsk) { spin_lock_bh(&vsock_table_lock); __vsock_remove_connected(vsk); spin_unlock_bh(&vsock_table_lock); }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
249,029,155,973,045,100,000,000,000,000,000,000,000
6
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...
gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr fd) /* {{{ */ { int BitPixel; #if 0 int ColorResolution; int Background; int AspectRatio; #endif int Transparent = (-1); unsigned char buf[16]; unsigned char c; unsigned char ColorMap[3][MAXCOLORMAPSIZE]; unsigned char localColorMap[3][MAXCOLORMAPSIZE]; in...
1
[ "CWE-200" ]
php-src
8dc4f4dc9e44d1cbfe4654aa6e0dc27c94913938
101,555,333,886,468,920,000,000,000,000,000,000,000
150
Fix #74435: Buffer over-read into uninitialized memory The stack allocated color map buffers were not zeroed before usage, and so undefined palette indexes could cause information leakage.
strqueue_diff(Strqueue *sq1, Strqueue *sq2, Strqueue *osq) { int i = 0, j = 0; while (i < sq1->nstr && j < sq2->nstr) { int r = strqueue_sort_cmp(sq1->str + i, sq2->str + j, 0); if (!r) i++, j++; else if (r < 0) strqueue_pushjoin(osq, "-", sq1->str[i++], 0); else strqueue_pushjoin(osq...
0
[ "CWE-120" ]
libsolv
0077ef29eb46d2e1df2f230fc95a1d9748d49dec
288,368,117,956,631,160,000,000,000,000,000,000,000
18
testcase_read: error out if repos are added or the system is changed too late We must not add new solvables after the considered map was created, the solver was created, or jobs were added. We may not changed the system after jobs have been added. (Jobs may point inside the whatproviedes array, so we must not invalid...
int FileIo::close() { int rc = 0; if (munmap() != 0) rc = 2; if (p_->fp_ != 0) { if (std::fclose(p_->fp_) != 0) rc |= 1; p_->fp_= 0; } return rc; }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
228,051,271,981,077,620,000,000,000,000,000,000,000
10
Fix https://github.com/Exiv2/exiv2/issues/55
strncmpic(uschar *s, uschar *t, int n) { while (n--) { int c = tolower(*s++) - tolower(*t++); if (c) return c; } return 0; }
0
[]
exim
24c929a27415c7cfc7126c47e4cad39acf3efa6b
153,126,484,337,755,500,000,000,000,000,000,000,000
9
Buffer overrun fix. fixes: bug #787
static ssize_t bpf_dummy_write(struct file *filp, const char __user *buf, size_t siz, loff_t *ppos) { /* We need this handler such that alloc_file() enables * f_mode with FMODE_CAN_WRITE. */ return -EINVAL; }
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
155,953,839,675,919,050,000,000,000,000,000,000,000
8
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
static inline struct futex_hash_bucket *queue_lock(struct futex_q *q) { struct futex_hash_bucket *hb; get_futex_key_refs(&q->key); hb = hash_futex(&q->key); q->lock_ptr = &hb->lock; spin_lock(&hb->lock); return hb; }
1
[ "CWE-119", "CWE-787" ]
linux
7ada876a8703f23befbb20a7465a702ee39b1704
248,884,291,113,777,570,000,000,000,000,000,000,000
11
futex: Fix errors in nested key ref-counting futex_wait() is leaking key references due to futex_wait_setup() acquiring an additional reference via the queue_lock() routine. The nested key ref-counting has been masking bugs and complicating code analysis. queue_lock() is only called with a previously ref-counted key, ...
void luaV_finishget (lua_State *L, const TValue *t, TValue *key, StkId val, const TValue *slot) { int loop; /* counter to avoid infinite loops */ const TValue *tm; /* metamethod */ for (loop = 0; loop < MAXTAGLOOP; loop++) { if (slot == NULL) { /* 't' is not a table? */ lua_asse...
0
[ "CWE-787" ]
lua
42d40581dd919fb134c07027ca1ce0844c670daf
130,773,074,629,351,200,000,000,000,000,000,000,000
34
Save stack space while handling errors Because error handling (luaG_errormsg) uses slots from EXTRA_STACK, and some errors can recur (e.g., string overflow while creating an error message in 'luaG_runerror', or a C-stack overflow before calling the message handler), the code should use stack slots with parsimony. Thi...
CPH_METHOD(LoadFromFile) { HRESULT res; char *filename, *fullpath; int filename_len; long flags = 0; OLECHAR *olefilename; CPH_FETCH(); CPH_NO_OBJ(); res = get_persist_file(helper); if (helper->ipf) { if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &filename, &filename_len, &f...
1
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
139,114,469,657,038,060,000,000,000,000,000,000,000
44
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
handle_is_local (GdmDBusDisplay *skeleton, GDBusMethodInvocation *invocation, GdmDisplay *self) { gboolean is_local; gdm_display_is_local (self, &is_local, NULL); gdm_dbus_display_complete_is_local (skeleton, invocation, is_local); r...
0
[ "CWE-754" ]
gdm
4e6e5335d29c039bed820c43bfd1c19cb62539ff
289,250,687,450,091,030,000,000,000,000,000,000,000
12
display: Use autoptr to handle errors in look for existing users It will make things just cleaner
TEST_F(HttpConnectionManagerImplTest, ZeroByteDataFiltering) { InSequence s; setup(false, ""); StreamDecoder* decoder = nullptr; EXPECT_CALL(*codec_, dispatch(_)).WillOnce(Invoke([&](Buffer::Instance&) -> void { decoder = &conn_manager_->newStream(response_encoder_); HeaderMapPtr headers{ new T...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
3,118,923,184,101,288,300,000,000,000,000,000,000
39
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
virPCIELinkFormat(virBufferPtr buf, virPCIELinkPtr lnk, const char *attrib) { if (!lnk) return; virBufferAsprintf(buf, "<link validity='%s'", attrib); if (lnk->port >= 0) virBufferAsprintf(buf, " port='%d'", lnk->port); if (lnk->speed) virBuff...
0
[ "CWE-119" ]
libvirt
4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a
25,801,960,267,310,396,000,000,000,000,000,000,000
16
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...
/* {{{ proto bool tidy_parse_string(string input [, mixed config_options [, string encoding]]) Parse a document stored in a string */ static PHP_FUNCTION(tidy_parse_string) { char *input, *enc = NULL; int input_len, enc_len = 0; zval **options = NULL; PHPTidyObj *obj; if (zend_parse_parameters(ZEND_NUM_ARGS...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
224,581,278,479,784,600,000,000,000,000,000,000,000
24
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
const CImg<T>& _save_png(std::FILE *const file, const char *const filename, const unsigned int bytes_per_pixel=0) const { if (!file && !filename) throw CImgArgumentException(_cimg_instance "save_png(): Specified filename is (null).", ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
248,568,551,998,324,700,000,000,000,000,000,000,000
199
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
WandExport MagickBooleanType PushDrawingWand(DrawingWand *wand) { assert(wand != (DrawingWand *) NULL); assert(wand->signature == MagickWandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); wand->index++; wand->graphic_context=(DrawInfo **) Res...
0
[ "CWE-476" ]
ImageMagick
6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9
36,448,727,188,339,294,000,000,000,000,000,000,000
22
https://github.com/ImageMagick/ImageMagick/issues/716
static int _undefine_var(pam_handle_t *pamh, int ctrl, VAR *var) { /* We have a variable to undefine, this is a simple function */ D(("Called and exit.")); if (ctrl & PAM_DEBUG_ARG) { pam_syslog(pamh, LOG_DEBUG, "remove variable \"%s\"", var->name); } return pam_putenv(pamh, var->name); }
0
[ "CWE-119" ]
linux-pam
caf5e7f61c8d9288daa49b4f61962e6b1239121d
50,675,609,831,841,880,000,000,000,000,000,000,000
10
pam_env: correctly count leading whitespace when parsing environment file * modules/pam_env/pam_env.c (_assemble_line): Correctly count leading whitespace. Fixes CVE-2011-3148. Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/pam/+bug/874469
static void aac_remove_one(struct pci_dev *pdev) { struct Scsi_Host *shost = pci_get_drvdata(pdev); struct aac_dev *aac = (struct aac_dev *)shost->hostdata; scsi_remove_host(shost); __aac_shutdown(aac); aac_fib_map_free(aac); pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys); kf...
0
[ "CWE-284", "CWE-264" ]
linux
f856567b930dfcdbc3323261bf77240ccdde01f5
106,120,339,239,469,700,000,000,000,000,000,000,000
26
aacraid: missing capable() check in compat ioctl In commit d496f94d22d1 ('[SCSI] aacraid: fix security weakness') we added a check on CAP_SYS_RAWIO to the ioctl. The compat ioctls need the check as well. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torv...
ossl_asn1_decode0(unsigned char **pp, long length, long *offset, int depth, int yield, long *num_read) { unsigned char *start, *p; const unsigned char *p0; long len = 0, inner_read = 0, off = *offset, hlen; int tag, tc, j; VALUE asn1data, tag_class; p = *pp; start = p; p0 = p; j...
1
[ "CWE-119" ]
openssl
1648afef33c1d97fb203c82291b8a61269e85d3b
72,791,181,393,943,390,000,000,000,000,000,000,000
61
asn1: fix out-of-bounds read in decoding constructed objects OpenSSL::ASN1.{decode,decode_all,traverse} have a bug of out-of-bounds read. int_ossl_asn1_decode0_cons() does not give the correct available length to ossl_asn1_decode() when decoding the inner components of a constructed object. This can cause out-of-bound...
NTSTATUS smb1cli_req_chain_submit(struct tevent_req **reqs, int num_reqs) { struct smbXcli_req_state *first_state = tevent_req_data(reqs[0], struct smbXcli_req_state); struct smbXcli_req_state *state; size_t wct_offset; size_t chain_padding = 0; int i, iovlen; struct iovec *iov = NULL; struct iovec *this_iov...
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
40,330,741,897,126,647,000,000,000,000,000,000,000
150
CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
file_tryelf(struct magic_set *ms, int fd, const unsigned char *buf, size_t nbytes) { union { int32_t l; char c[sizeof (int32_t)]; } u; int clazz; int swap; struct stat st; off_t fsize; int flags = 0; Elf32_Ehdr elf32hdr; Elf64_Ehdr elf64hdr; uint16_t type, phnum, shnum; if (ms->flags & (MAGIC_MIME|M...
0
[ "CWE-399", "CWE-284" ]
file
b4c01141e5367f247b84dcaf6aefbb4e741842b8
41,093,658,840,263,970,000,000,000,000,000,000,000
64
- limit the number of program and section header number of sections to be processed to avoid excessive processing time. - if a bad note is found, return 0 to stop processing immediately.
static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb, struct net_device *netdev) { struct ems_usb *dev = netdev_priv(netdev); struct ems_tx_urb_context *context = NULL; struct net_device_stats *stats = &netdev->stats; struct can_frame *cf = (struct can_frame *)skb->data; struct ems_cpc_msg *msg; struct urb *...
0
[ "CWE-415" ]
linux
c70222752228a62135cee3409dccefd494a24646
307,040,999,029,903,540,000,000,000,000,000,000,000
120
can: ems_usb: ems_usb_start_xmit(): fix double dev_kfree_skb() in error path There is no need to call dev_kfree_skb() when usb_submit_urb() fails beacause can_put_echo_skb() deletes the original skb and can_free_echo_skb() deletes the cloned skb. Link: https://lore.kernel.org/all/20220228083639.38183-1-hbh25y@gmail.c...
void qemu_input_event_send_key_number(QemuConsole *src, int num, bool down) { KeyValue *key = g_new0(KeyValue, 1); key->type = KEY_VALUE_KIND_NUMBER; key->u.number.data = num; qemu_input_event_send_key(src, key, down); }
0
[ "CWE-772" ]
qemu
fa18f36a461984eae50ab957e47ec78dae3c14fc
244,471,811,719,442,600,000,000,000,000,000,000,000
7
input: limit kbd queue depth Apply a limit to the number of items we accept into the keyboard queue. Impact: Without this limit vnc clients can exhaust host memory by sending keyboard events faster than qemu feeds them to the guest. Fixes: CVE-2017-8379 Cc: P J P <ppandit@redhat.com> Cc: Huawei PSIRT <PSIRT@huawei.c...
void ping_seq_stop(struct seq_file *seq, void *v) { read_unlock_bh(&ping_table.lock); }
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
19,934,675,725,526,576,000,000,000,000,000,000,000
4
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...
evbuffer_write_sendfile(struct evbuffer *buffer, evutil_socket_t dest_fd, ev_ssize_t howmuch) { struct evbuffer_chain *chain = buffer->first; struct evbuffer_chain_file_segment *info = EVBUFFER_CHAIN_EXTRA(struct evbuffer_chain_file_segment, chain); const int source_fd = info->segment->fd; #if defined(SEN...
0
[ "CWE-189" ]
libevent
841ecbd96105c84ac2e7c9594aeadbcc6fb38bc4
203,770,315,605,637,350,000,000,000,000,000,000,000
53
Fix CVE-2014-6272 in Libevent 2.1 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
proxy_create (Proxy **res, CK_FUNCTION_LIST **loaded, Mapping *mappings, unsigned int n_mappings) { CK_RV rv = CKR_OK; Proxy *py; py = calloc (1, sizeof (Proxy)); return_val_if_fail (py != NULL, CKR_HOST_MEMORY); py->forkid = p11_forkid; py->last_id = 0; py->inited = modules_dup (loaded); if (py->init...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
244,019,177,154,739,800,000,000,000,000,000,000,000
39
Check for arithmetic overflows before allocating
Field_float(uint32 len_arg, bool maybe_null_arg, const LEX_CSTRING *field_name_arg, uint8 dec_arg) :Field_real((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0, (uint) 0, NONE, field_name_arg, dec_arg, 0, 0) { if (dec_arg >= FLOATING_POINT_DECIMALS) dec_arg= NOT...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
276,006,537,257,256,600,000,000,000,000,000,000,000
8
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static void vrend_update_scissor_state(struct vrend_context *ctx) { struct pipe_scissor_state *ss; GLint y; GLuint idx; unsigned mask = ctx->sub->scissor_state_dirty; while (mask) { idx = u_bit_scan(&mask); if (idx >= PIPE_MAX_VIEWPORTS) { vrend_report_buffer_error(ctx, 0); ...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
155,487,082,220,230,100,000,000,000,000,000,000,000
23
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>
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; is_identical_function(result, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zv...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
200,304,268,666,244,260,000,000,000,000,000,000,000
14
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
uint64_t crypt_get_iv_offset(struct crypt_device *cd) { if (!cd) return 0; if (isPLAIN(cd->type)) return cd->u.plain.hdr.skip; if (isLOOPAES(cd->type)) return cd->u.loopaes.hdr.skip; if (isTCRYPT(cd->type)) return TCRYPT_get_iv_offset(cd, &cd->u.tcrypt.hdr, &cd->u.tcrypt.params); return 0; }
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
325,998,553,533,752,120,000,000,000,000,000,000,000
16
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
NO_INLINE JsVar *jspeStatementFor() { JSP_ASSERT_MATCH(LEX_R_FOR); JSP_MATCH('('); bool wasInLoop = (execInfo.execute&EXEC_IN_LOOP)!=0; execInfo.execute |= EXEC_FOR_INIT; // initialisation JsVar *forStatement = 0; // we could have 'for (;;)' - so don't munch up our semicolon if that's all we have if (le...
0
[ "CWE-125" ]
Espruino
bf4416ab9129ee3afd56739ea4e3cd0da5484b6b
21,919,710,047,607,575,000,000,000,000,000,000,000
190
Fix bug if using an undefined member of an object for for..in (fix #1437)
static unsigned long arch_get_unmapped_area_common(struct file *filp, unsigned long addr0, unsigned long len, unsigned long pgoff, unsigned long flags, enum mmap_allocation_direction dir) { struct mm_struct *mm = current->mm; struct vm_area_struct *vma; unsigned long addr = addr0; int do_color_align; struct vm_u...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
303,473,861,093,170,100,000,000,000,000,000,000,000
71
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static void hid_pointer_sync(DeviceState *dev) { HIDState *hs = (HIDState *)dev; HIDPointerEvent *prev, *curr, *next; bool event_compression = false; if (hs->n == QUEUE_LENGTH-1) { /* * Queue full. We are losing information, but we at least * keep track of most recent button ...
0
[ "CWE-772" ]
qemu
51dbea77a29ea46173373a6dad4ebd95d4661f42
30,817,074,624,049,323,000,000,000,000,000,000,000
59
hid: Reset kbd modifiers on reset When resetting the keyboard, we need to reset not just the pending keystrokes, but also any pending modifiers. Otherwise there's a race when we're getting reset while running an escape sequence (modifier 0x100). Cc: qemu-stable@nongnu.org Signed-off-by: Alexander Graf <agraf@suse.de>...
static int show_tid_map(struct seq_file *m, void *v) { return show_map(m, v, 0); }
0
[ "CWE-200" ]
linux
ab676b7d6fbf4b294bf198fb27ade5b0e865c7ce
102,009,244,706,723,930,000,000,000,000,000,000,000
4
pagemap: do not leak physical addresses to non-privileged userspace As pointed by recent post[1] on exploiting DRAM physical imperfection, /proc/PID/pagemap exposes sensitive information which can be used to do attacks. This disallows anybody without CAP_SYS_ADMIN to read the pagemap. [1] http://googleprojectzero.bl...
sasl_mechlist_do_rebuild(void) { (void) sasl_mechlist_string_build(NULL, NULL, NULL); if (me.connected) (void) sasl_mechlist_sts(sasl_mechlist_string); }
0
[ "CWE-287", "CWE-288" ]
atheme
4e664c75d0b280a052eb8b5e81aa41944e593c52
270,786,654,663,426,440,000,000,000,000,000,000,000
7
saslserv/main: Track EID we're pending login to The existing model does not remember that we've sent a SVSLOGIN for a given SASL session, and simply assumes that if a client is introduced with a SASL session open, that session must have succeeded. The security of this approach requires ircd to implicitly abort SASL se...
static int push_insn(int t, int w, int e, struct bpf_verifier_env *env, bool loop_ok) { int *insn_stack = env->cfg.insn_stack; int *insn_state = env->cfg.insn_state; if (e == FALLTHROUGH && insn_state[t] >= (DISCOVERED | FALLTHROUGH)) return 0; if (e == BRANCH && insn_state[t] >= (DISCOVERED | BRANCH)) ...
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
240,131,385,035,624,800,000,000,000,000,000,000,000
46
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...
void file_test(const char* file, byte* check) { FILE* f; int i = 0; MD5 md5; byte buf[1024]; byte md5sum[MD5::DIGEST_SIZE]; if( !( f = fopen( file, "rb" ) )) { printf("Can't open %s\n", file); return; } while( ( i = (int)fread(buf, 1, sizeof(buf), f )) > 0 ) ...
0
[]
mysql-server
5c6169fb309981b564a17bee31b367a18866d674
280,339,367,054,723,300,000,000,000,000,000,000,000
25
Bug #24740291: YASSL UPDATE TO 2.4.2
static OPJ_BOOL opj_j2k_write_first_tile_part(opj_j2k_t *p_j2k, OPJ_BYTE * p_data, OPJ_UINT32 * p_data_written, OPJ_UINT32 p_total_data_size, opj_stream_private_t *p_stream, struct opj_event_mgr * p_manager) { OPJ_UINT32 l_nb_bytes_written = 0; OPJ_UINT32 l_current_nb_byt...
1
[ "CWE-119", "CWE-787" ]
openjpeg
dcac91b8c72f743bda7dbfa9032356bc8110098a
153,472,520,582,042,650,000,000,000,000,000,000,000
83
opj_j2k_write_sot(): fix potential write heap buffer overflow (#991)
void ring_buffer_discard_commit(struct trace_buffer *buffer, struct ring_buffer_event *event) { struct ring_buffer_per_cpu *cpu_buffer; int cpu; /* The event is discarded regardless */ rb_event_discard(event); cpu = smp_processor_id(); cpu_buffer = buffer->buffers[cpu]; /* * This must only be called if ...
0
[ "CWE-362" ]
linux
bbeb97464eefc65f506084fd9f18f21653e01137
77,164,062,559,086,900,000,000,000,000,000,000,000
31
tracing: Fix race in trace_open and buffer resize call Below race can come, if trace_open and resize of cpu buffer is running parallely on different cpus CPUX CPUY ring_buffer_resize atomic_read(&buffer->resize_disabled) tracing_open tracing_reset_online_cpus ring_buffer_...
static int intel_pmu_handle_irq(struct pt_regs *regs) { struct perf_sample_data data; struct cpu_hw_events *cpuc; int bit, loops; u64 status; int handled; cpuc = &__get_cpu_var(cpu_hw_events); /* * Some chipsets need to unmask the LVTPC in a particular spot * inside the nmi handler. As a result, the unmas...
0
[ "CWE-20", "CWE-401" ]
linux
f1923820c447e986a9da0fc6bf60c1dccdf0408e
288,803,973,593,575,200,000,000,000,000,000,000,000
81
perf/x86: Fix offcore_rsp valid mask for SNB/IVB The valid mask for both offcore_response_0 and offcore_response_1 was wrong for SNB/SNB-EP, IVB/IVB-EP. It was possible to write to reserved bit and cause a GP fault crashing the kernel. This patch fixes the problem by correctly marking the reserved bits in the valid m...
dissect_kafka_offset_for_leader_epoch_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version) { proto_item *subti; proto_tree *subtree; if (api_version >= 2) { offset = dissect_kafka_throttle_time(tvb, p...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
219,160,937,849,524,500,000,000,000,000,000,000,000
20
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...
f_inputrestore(typval_T *argvars UNUSED, typval_T *rettv) { if (ga_userinput.ga_len > 0) { --ga_userinput.ga_len; restore_typeahead((tasave_T *)(ga_userinput.ga_data) + ga_userinput.ga_len); /* default return is zero == OK */ } else if (p_verbose > 1) { verb_msg(_("called inputresto...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
114,424,788,376,323,570,000,000,000,000,000,000,000
15
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
struct st_mysql_extension* mysql_extension_init(struct st_mysql *mysql __attribute__((unused))) { struct st_mysql_extension *ext; ext= my_malloc(PSI_NOT_INSTRUMENTED, sizeof(struct st_mysql_extension), MYF(MY_WME | MY_ZEROFILL)); return ext;
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
212,092,743,839,601,780,000,000,000,000,000,000,000
8
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...
k5_asn1_encode_bitstring(asn1buf *buf, uint8_t *const *val, size_t len) { insert_bytes(buf, *val, len); insert_byte(buf, 0); return 0; }
0
[ "CWE-674", "CWE-787" ]
krb5
57415dda6cf04e73ffc3723be518eddfae599bfd
93,957,708,604,525,390,000,000,000,000,000,000,000
6
Add recursion limit for ASN.1 indefinite lengths The libkrb5 ASN.1 decoder supports BER indefinite lengths. It computes the tag length using recursion; the lack of a recursion limit allows an attacker to overrun the stack and cause the process to crash. Reported by Demi Obenour. CVE-2020-28196: In MIT krb5 release...
static int first_nibble_is_2(RAnal* anal, RAnalOp* op, ut16 code){ if (IS_MOVB_REG_TO_REGREF(code)) { // 0010nnnnmmmm0000 mov.b <REG_M>,@<REG_N> op->type = R_ANAL_OP_TYPE_STORE; op->src[0] = anal_fill_ai_rg (anal, GET_SOURCE_REG(code)); op->dst = anal_fill_reg_ref (anal, GET_TARGET_REG(code), BYTE_SIZE); } else...
0
[ "CWE-125" ]
radare2
77c47cf873dd55b396da60baa2ca83bbd39e4add
43,011,579,300,061,260,000,000,000,000,000,000,000
54
Fix #9903 - oobread in RAnal.sh
static long dugetn(DviContext *dvi, size_t n) { long val; if(NEEDBYTES(dvi, n) && get_bytes(dvi, n) == -1) return -1; val = mugetn(dvi->buffer.data + dvi->buffer.pos, n); dvi->buffer.pos += n; return val; }
0
[ "CWE-20" ]
evince
d4139205b010ed06310d14284e63114e88ec6de2
178,492,733,365,554,100,000,000,000,000,000,000,000
10
backends: Fix several security issues in the dvi-backend. See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643.
void sas_suspend_sata(struct asd_sas_port *port) { struct domain_device *dev; mutex_lock(&port->ha->disco_mutex); list_for_each_entry(dev, &port->dev_list, dev_list_node) { struct sata_device *sata; if (!dev_is_sata(dev)) continue; sata = &dev->sata_dev; if (sata->ap->pm_mesg.event == PM_EVENT_SUSPEND)...
0
[ "CWE-284" ]
linux
0558f33c06bb910e2879e355192227a8e8f0219d
313,026,483,854,215,880,000,000,000,000,000,000,000
21
scsi: libsas: direct call probe and destruct In commit 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery competing with ata error handling") introduced disco mutex to prevent rediscovery competing with ata error handling and put the whole revalidation in the mutex. But the rphy add/remove needs to wait for the ...
static int input_consumed_signal(h2_mplx *m, h2_stream *stream) { if (stream->input) { return h2_beam_report_consumption(stream->input); } return 0; }
0
[ "CWE-444" ]
mod_h2
825de6a46027b2f4c30d7ff5a0c8b852d639c207
244,547,453,138,945,600,000,000,000,000,000,000,000
7
* Fixed keepalives counter on slave connections.
dir_free(void *ptr) { struct dir_data *dir = ptr; if (dir->dir) closedir(dir->dir); xfree(dir); }
0
[ "CWE-22" ]
ruby
bd5661a3cbb38a8c3a3ea10cd76c88bbef7871b8
263,429,548,874,118,200,000,000,000,000,000,000,000
7
dir.c: check NUL bytes * dir.c (GlobPathValue): should be used in rb_push_glob only. other methods should use FilePathValue. https://hackerone.com/reports/302338 * dir.c (rb_push_glob): expand GlobPathValue git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
push_caller(const char *path, VALUE val, void *enc) { struct push_glob_args *arg = (struct push_glob_args *)val; return ruby_glob0(path, arg->fd, arg->glob.base, arg->flags, &rb_glob_funcs, (VALUE)&arg->glob, enc); }
0
[ "CWE-22" ]
ruby
bd5661a3cbb38a8c3a3ea10cd76c88bbef7871b8
257,143,202,979,860,380,000,000,000,000,000,000,000
7
dir.c: check NUL bytes * dir.c (GlobPathValue): should be used in rb_push_glob only. other methods should use FilePathValue. https://hackerone.com/reports/302338 * dir.c (rb_push_glob): expand GlobPathValue git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
void fput(struct file *file) { if (atomic_long_dec_and_test(&file->f_count)) { struct task_struct *task = current; file_sb_list_del(file); if (likely(!in_interrupt() && !(task->flags & PF_KTHREAD))) { init_task_work(&file->f_u.fu_rcuhead, ____fput); if (!task_work_add(task, &file->f_u.fu_rcuhead, true)) ...
1
[ "CWE-17" ]
linux
eee5cc2702929fd41cce28058dc6d6717f723f87
252,422,285,563,229,260,000,000,000,000,000,000,000
21
get rid of s_files and files_lock The only thing we need it for is alt-sysrq-r (emergency remount r/o) and these days we can do just as well without going through the list of files. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
static BOOL update_gdi_cache_bitmap_v3(rdpContext* context, CACHE_BITMAP_V3_ORDER* cacheBitmapV3) { rdpBitmap* bitmap; rdpBitmap* prevBitmap; BOOL compressed = TRUE; rdpCache* cache = context->cache; rdpSettings* settings = context->settings; BITMAP_DATA_EX* bitmapData = &cacheBitmapV3->bitmapData; bitmap = Bitm...
0
[ "CWE-125" ]
FreeRDP
0b6b92a25a77d533b8a92d6acc840a81e103684e
310,307,420,897,676,040,000,000,000,000,000,000,000
38
Fixed CVE-2020-11525: Out of bounds read in bitmap_cache_new Thanks to Sunglin and HuanGMz from Knownsec 404
bool MaybeReplaceShapeOrShapeNOp( const Node* n, const std::vector<PartialTensorShape>& input_shapes, std::unordered_map<const Node*, std::vector<Tensor>>* shape_replacement_map) { std::vector<Tensor> defined_shape; for (const auto& shape : input_shapes) { if (!shape.IsFullyDefined()) { re...
0
[ "CWE-824" ]
tensorflow
7731e8dfbe4a56773be5dc94d631611211156659
63,287,166,045,166,630,000,000,000,000,000,000,000
38
Don't constant-fold DT_RESOURCE constants. PiperOrigin-RevId: 391803952 Change-Id: I0ea3ec31d3e7dfda0f03b4027a237f08d00a3091
http_get_tls_info (http_t hd, const char *what) { (void)what; if (!hd) return NULL; return hd->uri->use_tls? "":NULL; }
0
[ "CWE-352" ]
gnupg
4a4bb874f63741026bd26264c43bb32b1099f060
168,302,880,335,377,620,000,000,000,000,000,000,000
9
dirmngr: Avoid possible CSRF attacks via http redirects. * dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path. (http_redir_info_t): New. * dirmngr/http.c (do_parse_uri): Set new fields. (same_host_p): New. (http_prepare_redirect): New. * dirmngr/t-http-basic.c: New test. * dirmngr/ks-engine-hkp.c (send_re...
e_cal_backend_ews_init (ECalBackendEws *cbews) { cbews->priv = G_TYPE_INSTANCE_GET_PRIVATE (cbews, E_TYPE_CAL_BACKEND_EWS, ECalBackendEwsPrivate); g_rec_mutex_init (&cbews->priv->cnc_lock); e_cal_backend_ews_populate_windows_zones (); }
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
169,535,180,730,192,960,000,000,000,000,000,000,000
8
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
static int rm_probe(AVProbeData *p) { /* check file header */ if ((p->buf[0] == '.' && p->buf[1] == 'R' && p->buf[2] == 'M' && p->buf[3] == 'F' && p->buf[4] == 0 && p->buf[5] == 0) || (p->buf[0] == '.' && p->buf[1] == 'r' && p->buf[2] == 'a' && p->buf[3] == 0xfd)) retu...
0
[ "CWE-399", "CWE-834" ]
FFmpeg
124eb202e70678539544f6268efc98131f19fa49
90,142,357,423,899,490,000,000,000,000,000,000,000
12
avformat/rmdec: Fix DoS due to lack of eof check Fixes: loop.ivr Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
cib_remote_new(const char *server, const char *user, const char *passwd, int port, gboolean encrypted) { cib_remote_opaque_t *private = NULL; cib_t *cib = cib_new_variant(); private = calloc(1, sizeof(cib_remote_opaque_t)); cib->variant = cib_remote; cib->variant_opaque = private; ...
0
[ "CWE-399" ]
pacemaker
564f7cc2a51dcd2f28ab12a13394f31be5aa3c93
238,756,244,243,859,900,000,000,000,000,000,000,000
39
High: core: Internal tls api improvements for reuse with future LRMD tls backend.
aspath_segment_add (struct aspath *as, int type) { struct assegment *seg = as->segments; struct assegment *new = assegment_new (type, 0); if (seg) { while (seg->next) seg = seg->next; seg->next = new; } else as->segments = new; }
0
[ "CWE-20" ]
quagga
7a42b78be9a4108d98833069a88e6fddb9285008
258,140,978,535,001,040,000,000,000,000,000,000,000
14
bgpd: Fix AS_PATH size calculation for long paths If you have an AS_PATH with more entries than what can be written into a single AS_SEGMENT_MAX it needs to be broken up. The code that noticed that the AS_PATH needs to be broken up was not correctly calculating the size of the resulting message. This patch addresses...
static int generic_xdp_install(struct net_device *dev, struct netdev_xdp *xdp) { struct bpf_prog *old = rtnl_dereference(dev->xdp_prog); struct bpf_prog *new = xdp->prog; int ret = 0; switch (xdp->command) { case XDP_SETUP_PROG: rcu_assign_pointer(dev->xdp_prog, new); if (old) bpf_prog_put(old); if (ol...
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
229,972,991,522,270,180,000,000,000,000,000,000,000
32
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
static void sycc_to_rgb(int offset, int upb, int y, int cb, int cr, int *out_r, int *out_g, int *out_b) { int r, g, b; cb -= offset; cr -= offset; r = y + (int)(1.402 * (float)cr); if (r < 0) { r = 0; } else if (r > upb) { r = upb; } *out_r = r; ...
0
[ "CWE-119", "CWE-787" ]
openjpeg
2e5ab1d9987831c981ff05862e8ccf1381ed58ea
82,949,005,254,515,280,000,000,000,000,000,000,000
31
color_apply_icc_profile: avoid potential heap buffer overflow Derived from a patch by Thuan Pham