func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
nv_ctrlh(cmdarg_T *cap)
{
if (VIsual_active && VIsual_select)
{
cap->cmdchar = 'x'; // BS key behaves like 'x' in Select mode
v_visop(cap);
}
else
nv_left(cap);
} | 0 | [
"CWE-416"
] | vim | 35a9a00afcb20897d462a766793ff45534810dc3 | 6,329,303,185,431,971,000,000,000,000,000,000,000 | 10 | patch 8.2.3428: using freed memory when replacing
Problem: Using freed memory when replacing. (Dhiraj Mishra)
Solution: Get the line pointer after calling ins_copychar(). |
void proc_exec_connector(struct task_struct *task)
{
struct cn_msg *msg;
struct proc_event *ev;
struct timespec ts;
__u8 buffer[CN_PROC_MSG_SIZE] __aligned(8);
if (atomic_read(&proc_event_num_listeners) < 1)
return;
msg = buffer_to_cn_msg(buffer);
ev = (struct proc_event *)msg->data;
memset(&ev->event_data,... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 221,426,097,211,742,530,000,000,000,000,000,000,000 | 26 | 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.
... |
ConnStateData::getTlsContextFromCache(const SBuf &cacheKey, const Ssl::CertificateProperties &certProperties)
{
debugs(33, 5, "Finding SSL certificate for " << cacheKey << " in cache");
Ssl::LocalContextStorage * ssl_ctx_cache = Ssl::TheGlobalContextStorage.getLocalStorage(port->s);
if (const auto ctx = ssl... | 0 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 142,550,185,892,632,350,000,000,000,000,000,000,000 | 16 | Handle more Range requests (#790)
Also removed some effectively unused code. |
static inline void __init drbg_fill_array(struct crypto_alg *alg,
const struct drbg_core *core, int pr)
{
int pos = 0;
static int priority = 100;
memset(alg, 0, sizeof(struct crypto_alg));
memcpy(alg->cra_name, "stdrng", 6);
if (pr) {
memcpy(alg->cra_driver_name, "drbg_pr_", 8);
pos = 8;
} else {
me... | 1 | [
"CWE-476"
] | linux | 8fded5925d0a733c46f8d0b5edd1c9b315882b1d | 173,260,924,156,778,000,000,000,000,000,000,000,000 | 38 | crypto: drbg - Convert to new rng interface
This patch converts the DRBG implementation to the new low-level
rng interface.
This allows us to get rid of struct drbg_gen by using the new RNG
API instead.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Stephan Mueller <smueller@chronox.de> |
static int decode_attr_maxwrite(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *res)
{
__be32 *p;
int status = 0;
*res = 1024;
if (unlikely(bitmap[0] & (FATTR4_WORD0_MAXWRITE - 1U)))
return -EIO;
if (likely(bitmap[0] & FATTR4_WORD0_MAXWRITE)) {
uint64_t maxwrite;
p = xdr_inline_decode(xdr, 8);
if (unl... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 185,713,344,792,466,980,000,000,000,000,000,000,000 | 22 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
scan_unsigned_hexadecimal_number(UChar** src, UChar* end, int minlen,
int maxlen, OnigEncoding enc)
{
OnigCodePoint c;
unsigned int num, val;
int restlen;
UChar* p = *src;
PFETCH_READY;
restlen = maxlen - minlen;
num = 0;
while (!PEND && maxlen-- != 0) {
PFETCH(c);
if (ONIGENC_IS_CODE_XDIG... | 0 | [
"CWE-476"
] | Onigmo | 00cc7e28a3ed54b3b512ef3b58ea737a57acf1f9 | 209,482,159,321,426,500,000,000,000,000,000,000,000 | 31 | Fix SEGV in onig_error_code_to_str() (Fix #132)
When onig_new(ONIG_SYNTAX_PERL) fails with ONIGERR_INVALID_GROUP_NAME,
onig_error_code_to_str() crashes.
onig_scan_env_set_error_string() should have been used when returning
ONIGERR_INVALID_GROUP_NAME. |
information_schema_character_attributes() const
{
uint32 octets= Field_blob::octet_length();
uint32 chars= octets / field_charset->mbminlen;
return Information_schema_character_attributes(octets, chars);
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 258,489,802,059,876,900,000,000,000,000,000,000,000 | 6 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
ves_icall_System_Array_GetGenericValueImpl (MonoObject *this, guint32 pos, gpointer value)
{
MonoClass *ac;
MonoArray *ao;
gint32 esize;
gpointer *ea;
MONO_ARCH_SAVE_REGS;
ao = (MonoArray *)this;
ac = (MonoClass *)ao->obj.vtable->klass;
esize = mono_array_element_size (ac);
ea = (gpointer*)((char*)ao->vecto... | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 312,728,940,585,589,300,000,000,000,000,000,000,000 | 17 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
flatpak_dir_check_add_remotes_config_dir (FlatpakDir *self,
GError **error)
{
g_autoptr(GError) local_error = NULL;
gboolean val;
GKeyFile *config;
if (!flatpak_dir_maybe_ensure_repo (self, NULL, error))
return FALSE;
if (self->repo == NULL)
return TRUE;
... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 146,205,914,155,253,120,000,000,000,000,000,000,000 | 41 | 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 ... |
int nci_send_frame(struct nci_dev *ndev, struct sk_buff *skb)
{
pr_debug("len %d\n", skb->len);
if (!ndev) {
kfree_skb(skb);
return -ENODEV;
}
/* Get rid of skb owner, prior to sending to the driver. */
skb_orphan(skb);
/* Send copy to sniffer */
nfc_send_to_raw_sock(ndev->nfc_dev, skb,
RAW_PAYLOA... | 0 | [] | linux | 48b71a9e66c2eab60564b1b1c85f4928ed04e406 | 96,539,128,113,152,540,000,000,000,000,000,000,000 | 18 | NFC: add NCI_UNREG flag to eliminate the race
There are two sites that calls queue_work() after the
destroy_workqueue() and lead to possible UAF.
The first site is nci_send_cmd(), which can happen after the
nci_close_device as below
nfcmrvl_nci_unregister_dev | nfc_genl_dev_up
nci_close_device |
f... |
R_API ut8 *r_bin_java_cp_get_utf8(ut8 tag, ut32 *out_sz, const ut8 *buf, const ut64 len) {
ut8 *buffer = NULL;
ut16 sz = 0;
ut16 t = (ut16) len;
if (len > 0 && len > (ut16) - 1) {
*out_sz = 0;
return NULL;
}
sz = R_BIN_JAVA_USHORT (((ut8 *) (ut16 *) &t), 0);
*out_sz = 3 + t; // tag + sz + bytes
buffer = mal... | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 228,316,315,986,518,600,000,000,000,000,000,000,000 | 21 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
j2ku_shift(unsigned x, int n) {
if (n < 0) {
return x >> -n;
} else {
return x << n;
}
} | 0 | [
"CWE-125"
] | Pillow | 3bf5eddb89afdf690eceaa52bc4d3546ba9a5f87 | 133,028,067,597,664,300,000,000,000,000,000,000,000 | 7 | Fix OOB Read in Jpeg2KDecode CVE-2021-25287,CVE-2021-25288
* For J2k images with multiple bands, it's legal in to have different
widths for each band, e.g. 1 byte for L, 4 bytes for A
* This dates to Pillow 2.4.0 |
UnicodeStringAppendable::appendCodeUnit(UChar c) {
return str.doAppend(&c, 0, 1).isWritable();
} | 0 | [
"CWE-190",
"CWE-787"
] | icu | b7d08bc04a4296982fcef8b6b8a354a9e4e7afca | 128,011,282,222,181,690,000,000,000,000,000,000,000 | 3 | ICU-20958 Prevent SEGV_MAPERR in append
See #971 |
int vmf_insert_pfn_pud(struct vm_area_struct *vma, unsigned long addr,
pud_t *pud, pfn_t pfn, bool write)
{
pgprot_t pgprot = vma->vm_page_prot;
/*
* If we had pud_special, we could avoid all these restrictions,
* but we need to be consistent with PTEs and architectures that
* can't support a 'special' bit.
... | 0 | [
"CWE-362"
] | linux | a8f97366452ed491d13cf1e44241bc0b5740b1f0 | 307,171,247,923,250,650,000,000,000,000,000,000,000 | 23 | mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d()
Currently, we unconditionally make page table dirty in touch_pmd().
It may result in false-positive can_follow_write_pmd().
We may avoid the situation, if we would only make the page table entry
dirty if caller asks for write access -- FOLL_WRITE... |
static void zend_generator_iterator_dtor(zend_object_iterator *iterator) /* {{{ */
{
zend_generator *generator = (zend_generator*)Z_OBJ(iterator->data);
generator->iterator = NULL;
zval_ptr_dtor(&iterator->data);
zend_iterator_dtor(iterator);
} | 0 | [] | php-src | 83e2b9e2202da6cc25bdaac67a58022b90be88e7 | 88,169,994,947,611,430,000,000,000,000,000,000,000 | 7 | Fixed bug #76946 |
struct sk_buff *sock_alloc_send_pskb(struct sock *sk, unsigned long header_len,
unsigned long data_len, int noblock,
int *errcode, int max_page_order)
{
struct sk_buff *skb;
long timeo;
int err;
timeo = sock_sndtimeo(sk, noblock);
for (;;) {
err = sock_error(sk);
if (err != 0)
goto failur... | 0 | [] | net | 35306eb23814444bd4021f8a1c3047d3cb0c8b2b | 285,067,018,639,957,130,000,000,000,000,000,000,000 | 42 | af_unix: fix races in sk_peer_pid and sk_peer_cred accesses
Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations
are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred.
In order to fix this issue, this patch adds a new spinlock that needs
to be used whenever these fields are read o... |
return filename_local;
}
// Implement a tic/toc mechanism to display elapsed time of algorithms.
inline cimg_ulong tictoc(const bool is_tic) {
cimg::mutex(2);
static CImg<cimg_ulong> times(64);
static unsigned int pos = 0;
const cimg_ulong t1 = cimg::time();
if (is_tic) {
// Tic
... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 216,819,095,611,423,800,000,000,000,000,000,000,000 | 51 | Fix other issues in 'CImg<T>::load_bmp()'. |
qboolean Sys_PIDIsRunning( int pid )
{
return kill( pid, 0 ) == 0;
} | 0 | [
"CWE-59"
] | ioq3 | b5acc31a4da72cc3a4a6d88facb15b6214d745c6 | 224,880,926,750,021,670,000,000,000,000,000,000,000 | 4 | CVE-2012-3345 |
static __be16 ipx_first_free_socketnum(struct ipx_interface *intrfc)
{
unsigned short socketNum = intrfc->if_sknum;
spin_lock_bh(&intrfc->if_sklist_lock);
if (socketNum < IPX_MIN_EPHEMERAL_SOCKET)
socketNum = IPX_MIN_EPHEMERAL_SOCKET;
while (__ipxitf_find_socket(intrfc, htons(socketNum)))
if (socketNum > IPX... | 0 | [
"CWE-416"
] | linux | ee0d8d8482345ff97a75a7d747efc309f13b0d80 | 215,608,043,745,217,050,000,000,000,000,000,000,000 | 20 | ipx: call ipxitf_put() in ioctl error path
We should call ipxitf_put() if the copy_to_user() fails.
Reported-by: 李强 <liqiang6-s@360.cn>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
void ConnectionImpl::addCharToBuffer(char c) {
ASSERT(bufferRemainingSize() >= 1);
*reserved_current_++ = c;
} | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 57,571,345,567,675,630,000,000,000,000,000,000,000 | 4 | 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... |
static struct dentry *start_creating(const char *name, struct dentry *parent)
{
struct dentry *dentry;
int error;
pr_debug("debugfs: creating file '%s'\n",name);
if (IS_ERR(parent))
return parent;
error = simple_pin_fs(&debug_fs_type, &debugfs_mount,
&debugfs_mount_count);
if (error)
return ERR_PT... | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 231,881,837,979,441,960,000,000,000,000,000,000,000 | 37 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
static void macsec_dev_change_rx_flags(struct net_device *dev, int change)
{
struct net_device *real_dev = macsec_priv(dev)->real_dev;
if (!(dev->flags & IFF_UP))
return;
if (change & IFF_ALLMULTI)
dev_set_allmulti(real_dev, dev->flags & IFF_ALLMULTI ? 1 : -1);
if (change & IFF_PROMISC)
dev_set_promiscuity... | 0 | [
"CWE-119"
] | net | 5294b83086cc1c35b4efeca03644cf9d12282e5b | 140,479,726,095,969,060,000,000,000,000,000,000,000 | 14 | macsec: dynamically allocate space for sglist
We call skb_cow_data, which is good anyway to ensure we can actually
modify the skb as such (another error from prior). Now that we have the
number of fragments required, we can safely allocate exactly that amount
of memory.
Fixes: c09440f7dcb3 ("macsec: introduce IEEE 80... |
ulong get_table_grant(THD *thd, TABLE_LIST *table)
{
ulong privilege;
Security_context *sctx= thd->security_ctx;
const char *db = table->db ? table->db : thd->db;
GRANT_TABLE *grant_table;
mysql_rwlock_rdlock(&LOCK_grant);
#ifdef EMBEDDED_LIBRARY
grant_table= NULL;
#else
grant_table= table_hash_search(sc... | 0 | [] | mysql-server | 25d1b7e03b9b375a243fabdf0556c063c7282361 | 216,929,501,404,829,360,000,000,000,000,000,000,000 | 22 | Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string |
static GF_Err nhmldmx_send_sample(GF_Filter *filter, GF_NHMLDmxCtx *ctx)
{
GF_XMLNode *node, *childnode;
u64 sample_duration = 0;
char szMediaTemp[GF_MAX_PATH], szXmlFrom[1000], szXmlTo[1000];
char *szSubSampleName = ctx->is_dims ? "DIMSSubUnit" : "NHNTSubSample";
while ((node = (GF_XMLNode *) gf_list_enum(ctx->... | 0 | [
"CWE-787"
] | gpac | 74695dea7278e78af3db467e586233fe8773c07e | 130,613,472,841,555,650,000,000,000,000,000,000,000 | 390 | fixed #1910 #1911 |
int btrfs_end_transaction(struct btrfs_trans_handle *trans)
{
return __btrfs_end_transaction(trans, 0);
} | 0 | [
"CWE-703",
"CWE-667"
] | linux | 1cb3db1cf383a3c7dbda1aa0ce748b0958759947 | 191,169,913,131,562,630,000,000,000,000,000,000,000 | 4 | btrfs: fix deadlock with concurrent chunk allocations involving system chunks
When a task attempting to allocate a new chunk verifies that there is not
currently enough free space in the system space_info and there is another
task that allocated a new system chunk but it did not finish yet the
creation of the respecti... |
int wc_ecc_decrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg,
word32 msgSz, byte* out, word32* outSz, ecEncCtx* ctx)
{
int ret = 0;
word32 blockSz;
word32 digestSz;
ecEncCtx localCtx;
#ifdef WOLFSSL_SMALL_STACK
byte* sharedSecret;
byte* ... | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 273,532,003,702,183,050,000,000,000,000,000,000,000 | 165 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
g_time2(void)
{
#if defined(_WIN32)
return (int)GetTickCount();
#else
struct tms tm;
clock_t num_ticks = 0;
g_memset(&tm,0,sizeof(struct tms));
num_ticks = times(&tm);
return (int)(num_ticks * 10);
#endif
} | 0 | [] | xrdp | d8f9e8310dac362bb9578763d1024178f94f4ecc | 133,624,262,652,171,900,000,000,000,000,000,000,000 | 12 | move temp files from /tmp to /tmp/.xrdp |
fwd_word(
long count,
int bigword, // "W", "E" or "B"
int eol)
{
int sclass; // starting class
int i;
int last_line;
curwin->w_cursor.coladd = 0;
cls_bigword = bigword;
while (--count >= 0)
{
#ifdef FEAT_FOLDING
// When inside a range of folded lines, move to the la... | 0 | [
"CWE-126",
"CWE-787"
] | vim | 53a70289c2712808e6d4e88927e03cac01b470dd | 266,821,021,641,693,920,000,000,000,000,000,000,000 | 61 | patch 8.2.4925: trailing backslash may cause reading past end of line
Problem: Trailing backslash may cause reading past end of line.
Solution: Check for NUL after backslash. |
void dev_load(struct net *net, const char *name)
{
struct net_device *dev;
int no_module;
rcu_read_lock();
dev = dev_get_by_name_rcu(net, name);
rcu_read_unlock();
no_module = !dev;
if (no_module && capable(CAP_NET_ADMIN))
no_module = request_module("netdev-%s", name);
if (no_module && capable(CAP_SYS_MODUL... | 0 | [
"CWE-264"
] | linux | 8909c9ad8ff03611c9c96c9a92656213e4bb495b | 307,372,002,389,568,200,000,000,000,000,000,000,000 | 19 | net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules
Since a8f80e8ff94ecba629542d9b4b5f5a8ee3eb565c any process with
CAP_NET_ADMIN may load any module from /lib/modules/. This doesn't mean
that CAP_NET_ADMIN is a superset of CAP_SYS_MODULE as modules are
limited to /lib/modules/**. However, CAP_NET_ADMIN... |
struct net_device *vxlan_dev_create(struct net *net, const char *name,
u8 name_assign_type,
struct vxlan_config *conf)
{
struct nlattr *tb[IFLA_MAX + 1];
struct net_device *dev;
int err;
memset(&tb, 0, sizeof(tb));
dev = rtnl_create_link(net, name, name_assign_type,
&vxlan_link_ops, tb,... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 274,544,748,924,107,130,000,000,000,000,000,000,000 | 32 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
static struct sctp_transport *sctp_addr_id2transport(struct sock *sk,
struct sockaddr_storage *addr,
sctp_assoc_t id)
{
struct sctp_association *addr_asoc = NULL, *id_asoc = NULL;
struct sctp_af *af = sctp_get_af_specific(addr->ss_family);
union sctp_addr *laddr = (union sctp_addr *)addr;
stru... | 0 | [
"CWE-415"
] | linux | dfcb9f4f99f1e9a49e43398a7bfbf56927544af1 | 109,309,585,910,824,250,000,000,000,000,000,000,000 | 28 | sctp: deny peeloff operation on asocs with threads sleeping on it
commit 2dcab5984841 ("sctp: avoid BUG_ON on sctp_wait_for_sndbuf")
attempted to avoid a BUG_ON call when the association being used for a
sendmsg() is blocked waiting for more sndbuf and another thread did a
peeloff operation on such asoc, moving it to ... |
protocol_handshake (struct connection *conn)
{
int r;
lock_request (conn);
if (!newstyle)
r = protocol_handshake_oldstyle (conn);
else
r = protocol_handshake_newstyle (conn);
unlock_request (conn);
return r;
} | 1 | [
"CWE-406"
] | nbdkit | c05686f9577fa91b6a3a4d8c065954ca6fc3fd62 | 15,349,019,500,090,507,000,000,000,000,000,000,000 | 13 | server: Wait until handshake complete before calling .open callback
Currently we call the plugin .open callback as soon as we receive a
TCP connection:
$ nbdkit -fv --tls=require --tls-certificates=tests/pki null \
--run "telnet localhost 10809"
[...]
Trying ::1...
Connected to localhost.
Escape ... |
**/
inline void info() {
std::fprintf(cimg::output(),"\n %s%sCImg Library %u.%u.%u%s, compiled %s ( %s ) with the following flags:\n\n",
cimg::t_red,cimg::t_bold,cimg_version/100,(cimg_version/10)%10,cimg_version%10,
cimg::t_normal,cimg_date,cimg_time);
std::fp... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 333,409,508,602,892,100,000,000,000,000,000,000,000 | 167 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int tcp_v6_rtx_synack(struct sock *sk, struct request_sock *req,
struct request_values *rvp)
{
TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_RETRANSSEGS);
return tcp_v6_send_synack(sk, req, rvp);
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 69,615,492,903,560,560,000,000,000,000,000,000,000 | 6 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
char *problem_data_get_content_or_die(problem_data_t *problem_data, const char *key)
{
INITIALIZE_LIBREPORT();
struct problem_item *item = problem_data_get_item_or_NULL(problem_data, key);
if (!item)
error_msg_and_die(_("Essential element '%s' is missing, can't continue"), key);
return item->co... | 0 | [
"CWE-20"
] | libreport | 1951e7282043dfe1268d492aea056b554baedb75 | 69,118,242,059,900,460,000,000,000,000,000,000,000 | 9 | lib: fix races in dump directory handling code
Florian Weimer <fweimer@redhat.com>:
dd_opendir() should keep a file handle (opened with O_DIRECTORY) and
use openat() and similar functions to access files in it.
...
The file system manipulation functions should guard against hard
links (check tha... |
static void bpf_map_uncharge_memlock(struct bpf_map *map)
{
struct user_struct *user = map->user;
atomic_long_sub(map->pages, &user->locked_vm);
free_uid(user);
} | 0 | [
"CWE-703"
] | linux | 92117d8443bc5afacc8d5ba82e541946310f106e | 16,398,383,883,483,313,000,000,000,000,000,000,000 | 7 | bpf: fix refcnt overflow
On a system with >32Gbyte of phyiscal memory and infinite RLIMIT_MEMLOCK,
the malicious application may overflow 32-bit bpf program refcnt.
It's also possible to overflow map refcnt on 1Tb system.
Impose 32k hard limit which means that the same bpf program or
map cannot be shared by more than ... |
int __kvm_arm_vcpu_set_events(struct kvm_vcpu *vcpu,
struct kvm_vcpu_events *events)
{
bool serror_pending = events->exception.serror_pending;
bool has_esr = events->exception.serror_has_esr;
if (serror_pending && has_esr) {
if (!cpus_have_const_cap(ARM64_HAS_RAS_EXTN))
return -EINVAL;
if (!((event... | 0 | [
"CWE-20"
] | linux | d26c25a9d19b5976b319af528886f89cf455692d | 156,934,433,008,179,780,000,000,000,000,000,000,000 | 20 | arm64: KVM: Tighten guest core register access from userspace
We currently allow userspace to access the core register file
in about any possible way, including straddling multiple
registers and doing unaligned accesses.
This is not the expected use of the ABI, and nobody is actually
using it that way. Let's tighten ... |
static void prb_init_ft_ops(struct tpacket_kbdq_core *p1,
union tpacket_req_u *req_u)
{
p1->feature_req_word = req_u->req3.tp_feature_req_word;
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 84ac7260236a49c79eede91617700174c2c19b0c | 317,975,746,560,435,200,000,000,000,000,000,000,000 | 5 | packet: fix race condition in packet_set_ring
When packet_set_ring creates a ring buffer it will initialize a
struct timer_list if the packet version is TPACKET_V3. This value
can then be raced by a different thread calling setsockopt to
set the version to TPACKET_V1 before packet_set_ring has finished.
This leads to... |
static int64_t curl_getlength(BlockDriverState *bs)
{
BDRVCURLState *s = bs->opaque;
return s->len;
} | 0 | [
"CWE-20"
] | qemu | 6d4b9e55fc625514a38d27cff4b9933f617fa7dc | 237,827,235,371,636,770,000,000,000,000,000,000,000 | 5 | curl: check data size before memcpy to local buffer. (CVE-2014-0144)
curl_read_cb is callback function for libcurl when data arrives. The
data size passed in here is not guaranteed to be within the range of
request we submitted, so we may overflow the guest IO buffer. Check the
real size we have before memcpy to buffe... |
static int snd_pcm_hw_rule_list(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule *rule)
{
struct snd_pcm_hw_constraint_list *list = rule->private;
return snd_interval_list(hw_param_interval(params, rule->var), list->count, list->list, list->mask);
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4 | 160,185,855,153,104,430,000,000,000,000,000,000,000 | 6 | ALSA: pcm : Call kill_fasync() in stream lock
Currently kill_fasync() is called outside the stream lock in
snd_pcm_period_elapsed(). This is potentially racy, since the stream
may get released even during the irq handler is running. Although
snd_pcm_release_substream() calls snd_pcm_drop(), this doesn't
guarantee th... |
nfsd4_encode_readlink(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_readlink *readlink)
{
int maxcount;
__be32 wire_count;
int zero = 0;
struct xdr_stream *xdr = &resp->xdr;
int length_offset = xdr->buf->len;
__be32 *p;
if (nfserr)
return nfserr;
p = xdr_reserve_space(xdr, 4);
if (!p)
retur... | 0 | [
"CWE-20",
"CWE-129"
] | linux | f961e3f2acae94b727380c0b74e2d3954d0edf79 | 18,200,841,120,316,810,000,000,000,000,000,000,000 | 43 | nfsd: encoders mustn't use unitialized values in error cases
In error cases, lgp->lg_layout_type may be out of bounds; so we
shouldn't be using it until after the check of nfserr.
This was seen to crash nfsd threads when the server receives a LAYOUTGET
request with a large layout type.
GETDEVICEINFO has the same pro... |
CJSON_PUBLIC(cJSON_bool) cJSON_IsTrue(const cJSON * const item)
{
if (item == NULL)
{
return false;
}
return (item->type & 0xff) == cJSON_True;
} | 0 | [
"CWE-754",
"CWE-787"
] | cJSON | be749d7efa7c9021da746e685bd6dec79f9dd99b | 134,768,855,971,092,470,000,000,000,000,000,000,000 | 9 | Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays |
Status TrySimplify(NodeDef* node, string* simplified_node_name) override {
NodeDef* input;
TF_RETURN_IF_ERROR(GetInputNode(node->input(0), &input));
// 1. Bypass reshape followed by reshape.
if (IsValueAndOrderPreserving(*node) && IsReshape(*input) &&
!IsInPreserveSet(*input)) {
Forward... | 0 | [
"CWE-476"
] | tensorflow | e6340f0665d53716ef3197ada88936c2a5f7a2d3 | 63,049,315,291,100,250,000,000,000,000,000,000,000 | 25 | Handle a special grappler case resulting in crash.
It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault.
PiperOrigin-RevId: 369242852
Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13... |
static inline int32_t htx_get_head(const struct htx *htx)
{
return htx->head;
} | 0 | [
"CWE-190"
] | haproxy | 3b69886f7dcc3cfb3d166309018e6cfec9ce2c95 | 186,045,442,674,682,870,000,000,000,000,000,000,000 | 4 | BUG/MAJOR: htx: fix missing header name length check in htx_add_header/trailer
Ori Hollander of JFrog Security reported that htx_add_header() and
htx_add_trailer() were missing a length check on the header name. While
this does not allow to overwrite any memory area, it results in bits of
the header name length to sli... |
fgets_ipc(
char *dest, /* string to fill */
int len) /* size of it */
{
#ifdef USE_MOUSE
if (term && term->waitforinput) {
/* This a mouseable terminal --- must expect input from it */
int c; /* char gotten from waitforinput() */
size_t i=0; /* position inside dest */
dest[0] = '\0';
for (i=0; ... | 0 | [
"CWE-415"
] | gnuplot | 052cbd17c3cbbc602ee080b2617d32a8417d7563 | 56,125,677,773,809,350,000,000,000,000,000,000,000 | 30 | successive failures of "set print <foo>" could cause double-free
Bug #2312 |
static int do_siocgstampns(struct net *net, struct socket *sock,
unsigned int cmd, void __user *up)
{
mm_segment_t old_fs = get_fs();
struct timespec kts;
int err;
set_fs(KERNEL_DS);
err = sock_do_ioctl(net, sock, cmd, (unsigned long)&kts);
set_fs(old_fs);
if (!err)
err = compat_put_timespec(up, &kts);
... | 1 | [
"CWE-399",
"CWE-703"
] | linux | ed6fe9d614fc1bca95eb8c0ccd0e92db00ef9d5d | 11,332,003,978,696,642,000,000,000,000,000,000,000 | 15 | Fix order of arguments to compat_put_time[spec|val]
Commit 644595f89620 ("compat: Handle COMPAT_USE_64BIT_TIME in
net/socket.c") introduced a bug where the helper functions to take
either a 64-bit or compat time[spec|val] got the arguments in the wrong
order, passing the kernel stack pointer off as a user pointer (and... |
void i40e_vsi_kill_vlan(struct i40e_vsi *vsi, u16 vid)
{
if (!vid || vsi->info.pvid)
return;
spin_lock_bh(&vsi->mac_filter_hash_lock);
i40e_rm_vlan_all_mac(vsi, vid);
spin_unlock_bh(&vsi->mac_filter_hash_lock);
/* schedule our worker thread which will take care of
* applying the new filter changes
*/
i40e... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 314,325,588,678,479,870,000,000,000,000,000,000,000 | 14 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
int parse_sa_P_opt(char *argv[], int *opt, unsigned int *flags, struct activity *act[])
{
int p;
p = get_activity_position(act, A_CPU, EXIT_IF_NOT_FOUND);
if (argv[++(*opt)]) {
if (parse_values(argv[*opt], act[p]->bitmap->b_array,
act[p]->bitmap->b_size, K_LOWERALL))
return 1;
(*opt)++;
return 0;
... | 0 | [
"CWE-125"
] | sysstat | fbc691eaaa10d0bcea6741d5a223dc3906106548 | 168,381,016,263,062,850,000,000,000,000,000,000,000 | 16 | Fix #196 and #199: Out of bound reads security issues
Check args before calling memmove() and memset() in remap_struct()
function to avoid out of bound reads which would possibly lead to
unknown code execution and/or sadf command crash.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com> |
print_conclusions(conclusions *con)
{
printf("Benchmark\n");
if (con->engine)
printf("\tRunning for engine %s\n", con->engine);
printf("\tAverage number of seconds to run all queries: %ld.%03ld seconds\n",
con->avg_timing / 1000, con->avg_timing % 1000);
printf("\tMinimum number of secon... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 323,190,762,727,742,700,000,000,000,000,000,000,000 | 15 | 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... |
void qdisc_class_hash_insert(struct Qdisc_class_hash *clhash,
struct Qdisc_class_common *cl)
{
unsigned int h;
INIT_HLIST_NODE(&cl->hnode);
h = qdisc_class_hash(cl->classid, clhash->hashmask);
hlist_add_head(&cl->hnode, &clhash->hash[h]);
clhash->hashelems++;
} | 0 | [
"CWE-909"
] | linux-2.6 | 16ebb5e0b36ceadc8186f71d68b0c4fa4b6e781b | 158,371,168,199,343,570,000,000,000,000,000,000,000 | 10 | tc: Fix unitialized kernel memory leak
Three bytes of uninitialized kernel memory are currently leaked to user
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
int puff(unsigned char *dest, /* pointer to destination pointer */
boost::uint32_t *destlen, /* amount of output space */
const unsigned char *source, /* pointer to source data pointer */
boost::uint32_t *sourcelen) /* amount of input available */
{
struct st... | 1 | [
"CWE-20"
] | libtorrent | debf3c6e3688aab8394fe5c47737625faffe6f9e | 88,122,310,712,888,970,000,000,000,000,000,000,000 | 44 | update puff.c for gzip inflation (#1022)
update puff.c for gzip inflation |
static void io_complete_rw(struct kiocb *kiocb, long res, long res2)
{
struct io_kiocb *req = container_of(kiocb, struct io_kiocb, rw);
io_complete_rw_common(kiocb, res);
io_put_req(req);
} | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 205,596,918,400,679,980,000,000,000,000,000,000,000 | 7 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
static void oidc_authz_get_claims_and_idtoken(request_rec *r, json_t **claims,
json_t **id_token) {
const char *s_claims = oidc_request_state_get(r, OIDC_CLAIMS_SESSION_KEY);
const char *s_id_token = oidc_request_state_get(r,
OIDC_IDTOKEN_CLAIMS_SESSION_KEY);
json_error_t json_error;
if (s_claims != NULL) {
... | 0 | [
"CWE-20"
] | mod_auth_openidc | 612e309bfffd6f9b8ad7cdccda3019fc0865f3b4 | 40,054,578,173,155,287,000,000,000,000,000,000,000 | 21 | don't echo query params on invalid requests to redirect URI; closes #212
thanks @LukasReschke; I'm sure there's some OWASP guideline that warns
against this |
filter_config (struct backend *b, const char *key, const char *value)
{
struct backend_filter *f = container_of (b, struct backend_filter, backend);
debug ("%s: config key=%s, value=%s",
f->name, key, value);
if (f->filter.config) {
if (f->filter.config (next_config, f->backend.next, key, value) ==... | 0 | [
"CWE-406"
] | nbdkit | bf0d61883a2f02f4388ec10dc92d4c61c093679e | 97,971,815,389,997,960,000,000,000,000,000,000,000 | 14 | server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO
Most known NBD clients do not bother with NBD_OPT_INFO (except for
clients like 'qemu-nbd --list' that don't ever intend to connect), but
go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu
to add in an extra client step (whether info on the ... |
MagickPrivate ResizeFilter *AcquireResizeFilter(const Image *image,
const FilterType filter,const MagickBooleanType cylindrical,
ExceptionInfo *exception)
{
const char
*artifact;
FilterType
filter_type,
window_type;
double
B,
C,
value;
register ResizeFilter
*resize_filter;
... | 0 | [
"CWE-125"
] | ImageMagick | c5402b6e0fcf8b694ae2af6a6652ebb8ce0ccf46 | 212,620,147,946,586,340,000,000,000,000,000,000,000 | 499 | https://github.com/ImageMagick/ImageMagick/issues/717 |
void device_links_no_driver(struct device *dev)
{
struct device_link *link;
device_links_write_lock();
list_for_each_entry(link, &dev->links.consumers, s_node) {
if (!(link->flags & DL_FLAG_MANAGED))
continue;
/*
* The probe has failed, so if the status of the link is
* "consumer probe" or "active", ... | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 96,945,372,601,369,160,000,000,000,000,000,000,000 | 26 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
static inline const char *ip_vs_fwd_name(unsigned flags)
{
switch (flags & IP_VS_CONN_F_FWD_MASK) {
case IP_VS_CONN_F_LOCALNODE:
return "Local";
case IP_VS_CONN_F_TUNNEL:
return "Tunnel";
case IP_VS_CONN_F_DROUTE:
return "Route";
default:
return "Masq";
}
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 04bcef2a83f40c6db24222b27a52892cba39dffb | 245,260,791,294,954,320,000,000,000,000,000,000,000 | 13 | ipvs: Add boundary check on ioctl arguments
The ipvs code has a nifty system for doing the size of ioctl command
copies; it defines an array with values into which it indexes the cmd
to find the right length.
Unfortunately, the ipvs code forgot to check if the cmd was in the
range that the array provides, allowing fo... |
static bool name_is_nis (const char *name)
{
return (('+' == name[0]) || ('-' == name[0]));
} | 0 | [
"CWE-119",
"CWE-787"
] | shadow | 954e3d2e7113e9ac06632aee3c69b8d818cc8952 | 304,640,273,764,031,160,000,000,000,000,000,000,000 | 4 | Fix buffer overflow if NULL line is present in db.
If ptr->line == NULL for an entry, the first cycle will exit,
but the second one will happily write past entries buffer.
We actually do not want to exit the first cycle prematurely
on ptr->line == NULL.
Signed-off-by: Tomas Mraz <tmraz@fedoraproject.org> |
static int store_pk(TABLE *table,
const LEX_STRING *host,
const LEX_STRING *user,
const LEX_STRING *proxied_host,
const LEX_STRING *proxied_user)
{
DBUG_ENTER("ACL_PROXY_USER::store_pk");
DBUG_PRINT("info", ("host=%s,... | 0 | [] | mysql-server | 25d1b7e03b9b375a243fabdf0556c063c7282361 | 296,722,055,270,396,700,000,000,000,000,000,000,000 | 31 | Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string |
GF_Err dvvC_box_read(GF_Box *s, GF_BitStream *bs)
{
return dvcC_box_read(s, bs); | 0 | [
"CWE-476"
] | gpac | 586e817dcd531bb3e75438390f1f753cfe6e940a | 648,805,345,438,273,600,000,000,000,000,000,000 | 4 | fixed #2046 |
pgprot_t vm_get_page_prot(unsigned long vm_flags)
{
return __pgprot(pgprot_val(protection_map[vm_flags &
(VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]) |
pgprot_val(arch_vm_get_page_prot(vm_flags)));
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 47,813,567,630,402,610,000,000,000,000,000,000,000 | 6 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
const StringData valueStringData() const {
return StringData(valuestr(), valuestrsize() - 1);
} | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 167,330,808,630,142,270,000,000,000,000,000,000,000 | 3 | SERVER-38984 Validate unique User ID on UserCache hit |
static int selinux_sb_show_options(struct seq_file *m, struct super_block *sb)
{
struct superblock_security_struct *sbsec = selinux_superblock(sb);
int rc;
if (!(sbsec->flags & SE_SBINITIALIZED))
return 0;
if (!selinux_initialized(&selinux_state))
return 0;
if (sbsec->flags & FSCONTEXT_MNT) {
seq_putc(m, ... | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 323,806,940,889,027,100,000,000,000,000,000,000,000 | 47 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
static inline void evmcs_write64(unsigned long field, u64 value)
{
u16 clean_field;
int offset = get_evmcs_offset(field, &clean_field);
if (offset < 0)
return;
*(u64 *)((char *)current_evmcs + offset) = value;
current_evmcs->hv_clean_fields &= ~clean_field;
} | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 150,450,947,146,682,340,000,000,000,000,000,000,000 | 12 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
droproot(const char *username, const char *chroot_dir)
{
struct passwd *pw = NULL;
if (chroot_dir && !username) {
fprintf(stderr, "%s: Chroot without dropping root is insecure\n",
program_name);
exit_tcpdump(1);
}
pw = getpwnam(username);
if (pw) {
if (chroot_dir) {
if (chroot(chroot_dir) != 0 || chd... | 0 | [
"CWE-120",
"CWE-787"
] | tcpdump | 9ba91381954ad325ea4fd26b9c65a8bd9a2a85b6 | 31,139,377,089,747,327,000,000,000,000,000,000,000 | 60 | (for 4.9.3) CVE-2018-14879/fix -V to fail invalid input safely
get_next_file() did not check the return value of strlen() and
underflowed an array index if the line read by fgets() from the file
started with \0. This caused an out-of-bounds read and could cause a
write. Add the missing check.
This vulnerability was d... |
void MainWindow::onFocusChanged(QWidget *, QWidget * ) const
{
LOG_DEBUG() << "Focuswidget changed";
LOG_DEBUG() << "Current focusWidget:" << QApplication::focusWidget();
LOG_DEBUG() << "Current focusObject:" << QApplication::focusObject();
LOG_DEBUG() << "Current focusWindow:" << QApplication::focusWin... | 0 | [
"CWE-89",
"CWE-327",
"CWE-295"
] | shotcut | f008adc039642307f6ee3378d378cdb842e52c1d | 74,164,200,345,248,410,000,000,000,000,000,000,000 | 7 | fix upgrade check is not using TLS correctly |
static int prepare_cmd(struct argv_array *out, const struct child_process *cmd)
{
if (!cmd->argv[0])
die("BUG: command is empty");
/*
* Add SHELL_PATH so in the event exec fails with ENOEXEC we can
* attempt to interpret the command with 'sh'.
*/
argv_array_push(out, SHELL_PATH);
if (cmd->git_cmd) {
arg... | 0 | [] | git | 321fd82389742398d2924640ce3a61791fd27d60 | 8,687,207,550,983,871,000,000,000,000,000,000,000 | 40 | run-command: mark path lookup errors with ENOENT
Since commit e3a434468f (run-command: use the
async-signal-safe execv instead of execvp, 2017-04-19),
prepare_cmd() does its own PATH lookup for any commands we
run (on non-Windows platforms).
However, its logic does not match the old execvp call when
we fail to find a... |
void set(Derivation derivation_arg)
{ derivation= derivation_arg; } | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 209,015,730,733,958,100,000,000,000,000,000,000,000 | 2 | 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... |
void
mono_reflection_register_with_runtime (MonoReflectionType *type)
{
MonoType *res = mono_reflection_type_get_handle (type);
MonoDomain *domain = mono_object_domain ((MonoObject*)type);
MonoClass *class;
if (!res)
mono_raise_exception (mono_get_exception_argument (NULL, "Invalid generic instantiation, one or ... | 0 | [
"CWE-399",
"CWE-264"
] | mono | 89d1455a80ef13cddee5d79ec00c06055da3085c | 217,228,373,693,494,540,000,000,000,000,000,000,000 | 25 | Don't use finalization to cleanup dynamic methods.
* reflection.c: Use a reference queue to cleanup
dynamic methods instead of finalization.
* runtime.c: Shutdown the dynamic method queue
before runtime cleanup begins.
* DynamicMethod.cs: No longer finalizable.
* icall-def.h: Remove unused dynamic method ical... |
static int emulator_set_msr(struct x86_emulate_ctxt *ctxt,
u32 msr_index, u64 data)
{
struct kvm_vcpu *vcpu = emul_to_vcpu(ctxt);
int r;
r = kvm_set_msr(vcpu, msr_index, data);
if (r && kvm_msr_user_space(vcpu, msr_index, KVM_EXIT_X86_WRMSR, data,
complete_emulated_msr_access, r)) {
/* Bounce to ... | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 261,115,726,609,235,500,000,000,000,000,000,000,000 | 16 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
u64 timestamp, u32 device_timestamp,
struct ieee802_11_elems *elems,
bool beacon)
{
struct ieee80211_local *local = sdata->local;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
struct cfg80211_bss *cbss = ifmgd->associated;
st... | 0 | [] | linux | 79c92ca42b5a3e0ea172ea2ce8df8e125af237da | 5,785,528,461,164,181,000,000,000,000,000,000,000 | 164 | mac80211: handle deauthentication/disassociation from TDLS peer
When receiving a deauthentication/disassociation frame from a TDLS
peer, a station should not disconnect the current AP, but only
disable the current TDLS link if it's enabled.
Without this change, a TDLS issue can be reproduced by following the
steps as... |
start_check_child(void)
{
#ifndef _DEBUG_
pid_t pid;
char *syslog_ident;
/* Initialize child process */
#ifdef ENABLE_LOG_TO_FILE
if (log_file_name)
flush_log_file();
#endif
pid = fork();
if (pid < 0) {
log_message(LOG_INFO, "Healthcheck child process: fork error(%s)"
, strerror(errno));
return... | 0 | [
"CWE-200"
] | keepalived | 26c8d6374db33bcfcdcd758b1282f12ceef4b94f | 194,388,599,666,997,030,000,000,000,000,000,000,000 | 129 | Disable fopen_safe() append mode by default
If a non privileged user creates /tmp/keepalived.log and has it open
for read (e.g. tail -f), then even though keepalived will change the
owner to root and remove all read/write permissions from non owners,
the application which already has the file open will be able to read... |
QemuConsole *qemu_console_lookup_by_index(unsigned int index)
{
if (index >= nb_consoles) {
return NULL;
}
return consoles[index];
} | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 219,890,543,125,547,330,000,000,000,000,000,000,000 | 7 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
GF_Err dac3_dump(GF_Box *a, FILE * trace)
{
GF_AC3ConfigBox *p = (GF_AC3ConfigBox *)a;
if (p->cfg.is_ec3) {
u32 i;
a->type = GF_ISOM_BOX_TYPE_DEC3;
gf_isom_box_dump_start(a, "EC3SpecificBox", trace);
a->type = GF_ISOM_BOX_TYPE_DAC3;
fprintf(trace, "nb_streams=\"%d\" data_rate=\"%d\">\n", p->cfg.nb_streams,... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 116,650,063,148,278,870,000,000,000,000,000,000,000 | 23 | fixed 2 possible heap overflows (inc. #1088) |
router_get_hashes_impl(const char *s, size_t s_len, digests_t *digests,
const char *start_str,
const char *end_str, char end_c)
{
const char *start=NULL, *end=NULL;
if (router_get_hash_impl_helper(s,s_len,start_str,end_str,end_c,
&start... | 0 | [
"CWE-399"
] | tor | 57e35ad3d91724882c345ac709666a551a977f0f | 221,117,500,307,337,050,000,000,000,000,000,000,000 | 16 | Avoid possible segfault when handling networkstatus vote with bad flavor
Fix for 6530; fix on 0.2.2.6-alpha. |
TPMU_HA_Unmarshal(TPMU_HA *target, BYTE **buffer, INT32 *size, UINT32 selector)
{
TPM_RC rc = TPM_RC_SUCCESS;
switch (selector) {
#if ALG_SHA1
case TPM_ALG_SHA1:
rc = Array_Unmarshal(target->sha1, SHA1_DIGEST_SIZE, buffer, size);
break;
#endif
#if ALG_SHA256
case TPM_ALG_SHA256:
rc = Array_Unmar... | 0 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 58,156,378,408,782,890,000,000,000,000,000,000,000 | 37 | tpm2: Restore original value if unmarshalled value was illegal
Restore the original value of the memory location where data from
a stream was unmarshalled and the unmarshalled value was found to
be illegal. The goal is to not keep illegal values in memory.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
static struct bpf_blk *_gen_bpf_action(struct bpf_state *state,
struct bpf_blk *blk, uint32_t action)
{
struct bpf_instr instr;
_BPF_INSTR(instr, _BPF_OP(state->arch, BPF_RET),
_BPF_JMP_NO, _BPF_JMP_NO, _BPF_K(state->arch, action));
return _blk_append(state, blk, &instr);
} | 0 | [] | libseccomp | cf5d1538d243fb6f1839db70b69469d3d7e9e077 | 277,939,032,224,570,300,000,000,000,000,000,000,000 | 9 | bpf: pass the correct accumulator state to the next level
We were mistakenly passing the wrong accumulator state (the state at
the start of the instruction block, not at the end) which was causing
us to generate unnecessary load instructions.
Signed-off-by: Paul Moore <paul@paul-moore.com> |
HashCrosser(
const std::vector<std::unique_ptr<ColumnInterface<int64>>>& columns,
const int64 num_buckets, const uint64 hash_key,
const tstring k_feature_separator_unused)
: columns_(columns), num_buckets_(num_buckets), hash_key_(hash_key) {} | 0 | [
"CWE-843"
] | tensorflow | b1cc5e5a50e7cee09f2c6eb48eb40ee9c4125025 | 20,666,894,227,960,533,000,000,000,000,000,000,000 | 5 | Fix `tf.raw_ops.SparseCross` failing CHECK.
PiperOrigin-RevId: 368701671
Change-Id: Id805729dd9ba0bda36e4bb309408129b55fb649d |
static int mld_force_mld_version(const struct inet6_dev *idev)
{
/* Normally, both are 0 here. If enforcement to a particular is
* being used, individual device enforcement will have a lower
* precedence over 'all' device (.../conf/all/force_mld_version).
*/
if (dev_net(idev->dev)->ipv6.devconf_all->force_mld_... | 0 | [
"CWE-703"
] | linux | 2d3916f3189172d5c69d33065c3c21119fe539fc | 19,333,998,168,245,980,000,000,000,000,000,000,000 | 12 | ipv6: fix skb drops in igmp6_event_query() and igmp6_event_report()
While investigating on why a synchronize_net() has been added recently
in ipv6_mc_down(), I found that igmp6_event_query() and igmp6_event_report()
might drop skbs in some cases.
Discussion about removing synchronize_net() from ipv6_mc_down()
will ha... |
check_SET_IP_TTL(const struct ofpact_ip_ttl *a OVS_UNUSED,
struct ofpact_check_params *cp)
{
return check_set_ip(cp);
} | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 37,178,946,025,777,230,000,000,000,000,000,000,000 | 5 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
static void do_fault_around(struct vm_area_struct *vma, unsigned long address,
pte_t *pte, pgoff_t pgoff, unsigned int flags)
{
unsigned long start_addr, nr_pages, mask;
pgoff_t max_pgoff;
struct vm_fault vmf;
int off;
nr_pages = READ_ONCE(fault_around_bytes) >> PAGE_SHIFT;
mask = ~(nr_pages * PAGE_SIZE - 1) &... | 0 | [
"CWE-20"
] | linux | 6b7339f4c31ad69c8e9c0b2859276e22cf72176d | 110,496,384,136,178,730,000,000,000,000,000,000,000 | 42 | mm: avoid setting up anonymous pages into file mapping
Reading page fault handler code I've noticed that under right
circumstances kernel would map anonymous pages into file mappings: if
the VMA doesn't have vm_ops->fault() and the VMA wasn't fully populated
on ->mmap(), kernel would handle page fault to not populated... |
cr_tknzr_new_from_buf (guchar * a_buf, gulong a_len,
enum CREncoding a_enc,
gboolean a_free_at_destroy)
{
CRTknzr *result = NULL;
CRInput *input = NULL;
input = cr_input_new_from_buf (a_buf, a_len, a_enc,
a_fr... | 0 | [
"CWE-119"
] | libcroco | 9ad72875e9f08e4c519ef63d44cdbd94aa9504f7 | 168,844,270,578,668,250,000,000,000,000,000,000,000 | 16 | tknzr: support only max long rgb values
This fixes a possible out of bound when reading rgbs which
are longer than the support MAXLONG |
static void try_free_buffers(struct v4l2_loopback_device *dev)
{
MARK();
if (0 == dev->open_count.counter && !dev->keep_format) {
free_buffers(dev);
dev->ready_for_capture = 0;
dev->buffer_size = 0;
dev->write_position = 0;
}
} | 0 | [
"CWE-787"
] | v4l2loopback | 64a216af4c09c9ba9326057d7e78994271827eff | 48,792,040,488,006,200,000,000,000,000,000,000,000 | 10 | add explicit format specifier to printf() invocations
CWE-134 |
static inline void atalk_destroy_socket(struct sock *sk)
{
atalk_remove_socket(sk);
skb_queue_purge(&sk->sk_receive_queue);
if (sk_has_allocations(sk)) {
setup_timer(&sk->sk_timer, atalk_destroy_timer,
(unsigned long)sk);
sk->sk_timer.expires = jiffies + SOCK_DESTROY_TIME;
add_timer(&sk->sk_timer);
} els... | 0 | [
"CWE-200"
] | linux-2.6 | 3d392475c873c10c10d6d96b94d092a34ebd4791 | 289,194,485,732,055,660,000,000,000,000,000,000,000 | 13 | appletalk: fix atalk_getname() leak
atalk_getname() can leak 8 bytes of kernel memory to user
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
utf16be_code_to_mbc(OnigCodePoint code, UChar *buf)
{
UChar* p = buf;
if (code > 0xffff) {
unsigned int plane, high;
plane = (code >> 16) - 1;
*p++ = (plane >> 2) + 0xd8;
high = (code & 0xff00) >> 8;
*p++ = ((plane & 0x03) << 6) + (high >> 2);
*p++ = (high & 0x03) + 0xdc;
*p = (UChar... | 0 | [
"CWE-125"
] | php-src | 9d6c59eeea88a3e9d7039cb4fed5126ef704593a | 221,417,856,481,280,460,000,000,000,000,000,000,000 | 21 | Fix bug #77418 - Heap overflow in utf32be_mbc_to_code |
static void Run(const Tensor& in_x, const Tensor& in_y, bool lower,
bool adjoint, const MatMulBCast& bcast, Tensor* out,
int start, int limit) {
const bool should_bcast = bcast.IsBroadcastingRequired();
const auto& x_batch_indices = bcast.x_batch_indices();
const auto& ... | 0 | [
"CWE-125"
] | tensorflow | 480641e3599775a8895254ffbc0fc45621334f68 | 248,310,944,235,654,000,000,000,000,000,000,000,000 | 29 | Validate (and ensure validation sticks) inputs for `MatrixTriangularSolve`.
PiperOrigin-RevId: 370282444
Change-Id: Iaed61a0b0727cc42c830658b72eb69f785f48dc5 |
fd_read_line (int fd)
{
return fd_read_hunk (fd, line_terminator, 128, FD_READ_LINE_MAX);
} | 0 | [
"CWE-20"
] | wget | 3e25a9817f47fbb8660cc6a3b2f3eea239526c6c | 18,611,120,708,805,082,000,000,000,000,000,000,000 | 4 | Introduce --trust-server-names. Close CVE-2010-2252. |
__must_hold(&ctx->uring_lock)
{
struct percpu_ref *ref = req->fixed_rsrc_refs;
if (ref) {
if (ref == &ctx->rsrc_node->refs)
ctx->rsrc_cached_refs++;
else
percpu_ref_put(ref);
}
} | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 64,985,078,664,400,060,000,000,000,000,000,000,000 | 11 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
static struct rendition *new_rendition(HLSContext *c, struct rendition_info *info,
const char *url_base)
{
struct rendition *rend;
enum AVMediaType type = AVMEDIA_TYPE_UNKNOWN;
char *characteristic;
char *chr_ptr;
char *saveptr;
if (!strcmp(info->type, "AUD... | 0 | [
"CWE-703",
"CWE-835"
] | FFmpeg | 7ec414892ddcad88313848494b6fc5f437c9ca4a | 165,534,132,379,949,980,000,000,000,000,000,000,000 | 77 | avformat/hls: Fix DoS due to infinite loop
Fixes: loop.m3u
The default max iteration count of 1000 is arbitrary and ideas for a better solution are welcome
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Previous version reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <... |
int credssp_ntlm_server_init(rdpCredssp* credssp)
{
freerdp* instance;
rdpSettings* settings = credssp->settings;
instance = (freerdp*) settings->instance;
sspi_SecBufferAlloc(&credssp->PublicKey, credssp->transport->TlsIn->PublicKeyLength);
CopyMemory(credssp->PublicKey.pvBuffer, credssp->transport->TlsIn->Publi... | 0 | [
"CWE-476"
] | FreeRDP | 0dc22d5a30a1c7d146b2a835b2032668127c33e9 | 126,385,317,891,856,930,000,000,000,000,000,000,000 | 11 | Fixed a range of BER boundary encoding bugs which would occur when any NLA packet hit the 127 character mark. Removed ber#get_content_length as it was not behaving deterministically. |
uint64_t listenerTag() const override { return 1; } | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 267,779,753,252,346,600,000,000,000,000,000,000,000 | 1 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
TEST_F(QueryPlannerTest, ContainedOrPathLevelMultikeyCompoundTrailingFields) {
MultikeyPaths multikeyPaths{{}, {0U}, {}};
addIndex(BSON("b" << 1 << "a" << 1 << "c" << 1), multikeyPaths);
addIndex(BSON("d" << 1));
runQuery(fromjson("{$and: [{a: 5}, {$or: [{$and: [{b: 6}, {c: 7}]}, {d: 8}]}]}"));
ass... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 63,749,766,463,167,545,000,000,000,000,000,000,000 | 15 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
XLoadFont (
register Display *dpy,
_Xconst char *name)
{
register long nbytes;
Font fid;
register xOpenFontReq *req;
if (strlen(name) >= USHRT_MAX)
return (0);
if (_XF86LoadQueryLocaleFont(dpy, name, (XFontStruct **)0, &fid))
return fid;
LockDisplay(dpy);
GetReq(Open... | 0 | [
"CWE-120"
] | libx11 | 8d2e02ae650f00c4a53deb625211a0527126c605 | 267,191,833,307,716,550,000,000,000,000,000,000,000 | 25 | Reject string longer than USHRT_MAX before sending them on the wire
The X protocol uses CARD16 values to represent the length so
this would overflow.
CVE-2021-31535
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> |
static void svm_vcpu_run(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
svm->vmcb->save.rax = vcpu->arch.regs[VCPU_REGS_RAX];
svm->vmcb->save.rsp = vcpu->arch.regs[VCPU_REGS_RSP];
svm->vmcb->save.rip = vcpu->arch.regs[VCPU_REGS_RIP];
/*
* A vmexit emulation is required before the vcpu can be exe... | 0 | [] | kvm | 854e8bb1aa06c578c2c9145fa6bfe3680ef63b23 | 187,662,923,434,074,740,000,000,000,000,000,000,000 | 153 | KVM: x86: Check non-canonical addresses upon WRMSR
Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is
written to certain MSRs. The behavior is "almost" identical for AMD and Intel
(ignoring MSRs that are not implemented in either architecture since they would
anyhow #GP). However, IA32_SYSENTE... |
STACK_OF(X509_CRL) *load_crls(BIO *err, const char *file, int format,
const char *pass, ENGINE *e, const char *desc)
{
STACK_OF(X509_CRL) *crls;
if (!load_certs_crls(err, file, format, pass, e, desc, NULL, &crls))
return NULL;
return crls;
} | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 164,185,991,029,853,560,000,000,000,000,000,000,000 | 8 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
xfs_attr_args_init(
struct xfs_da_args *args,
struct xfs_inode *dp,
const unsigned char *name,
int flags)
{
if (!name)
return -EINVAL;
memset(args, 0, sizeof(*args));
args->geo = dp->i_mount->m_attr_geo;
args->whichfork = XFS_ATTR_FORK;
args->dp = dp;
args->flags = flags;
args->name = name;
args->name... | 0 | [
"CWE-241",
"CWE-754"
] | linux | 7b38460dc8e4eafba06c78f8e37099d3b34d473c | 154,853,045,092,169,500,000,000,000,000,000,000,000 | 23 | xfs: don't fail when converting shortform attr to long form during ATTR_REPLACE
Kanda Motohiro reported that expanding a tiny xattr into a large xattr
fails on XFS because we remove the tiny xattr from a shortform fork and
then try to re-add it after converting the fork to extents format having
not removed the ATTR_RE... |
const char *cgi_variable_nonull(const char *name)
{
const char *var = cgi_variable(name);
if (var) {
return var;
} else {
return "";
}
} | 0 | [] | samba | 91f4275873ebeda8f57684f09df67162ae80515a | 17,472,411,071,741,558,000,000,000,000,000,000,000 | 9 | swat: Use additional nonce on XSRF protection
If the user had a weak password on the root account of a machine running
SWAT, there still was a chance of being targetted by an XSRF on a
malicious web site targetting the SWAT setup.
Use a random nonce stored in secrets.tdb to close this possible attack
window. Thanks t... |
static int handle_mount_opt(struct super_block *sb, char *opt, int token,
substring_t *args, unsigned long *journal_devnum,
unsigned int *journal_ioprio, int is_remount)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
const struct mount_opts *m;
kuid_t uid;
kgid_t gid;
int arg = 0;
#ifdef CONFIG_QUOTA
if... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 234,830,358,332,333,100,000,000,000,000,000,000,000 | 244 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
static void alloc_objects(unsigned int cnt)
{
struct object_entry_pool *b;
b = xmalloc(sizeof(struct object_entry_pool)
+ cnt * sizeof(struct object_entry));
b->next_pool = blocks;
b->next_free = b->entries;
b->end = b->entries + cnt;
blocks = b;
alloc_count += cnt;
} | 0 | [] | git | 68061e3470210703cb15594194718d35094afdc0 | 261,018,584,556,026,300,000,000,000,000,000,000,000 | 12 | fast-import: disallow "feature export-marks" by default
The fast-import stream command "feature export-marks=<path>" lets the
stream write marks to an arbitrary path. This may be surprising if you
are running fast-import against an untrusted input (which otherwise
cannot do anything except update Git objects and refs)... |
void test_to_int(char const* str, int wanted, bool error)
{
test_to_number(str, wanted, error, QUtil::string_to_int);
} | 0 | [
"CWE-125"
] | qpdf | 6d46346eb93d5032c08cf1e39023b5d57260a766 | 272,497,891,576,939,500,000,000,000,000,000,000,000 | 4 | Detect integer overflow/underflow |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.