func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static bool addrrange_equal(AddrRange r1, AddrRange r2) { return int128_eq(r1.start, r2.start) && int128_eq(r1.size, r2.size); }
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
259,175,971,967,046,830,000,000,000,000,000,000,000
4
Fix crash when mapping a big memory and calling uc_close
streamConsumer *streamLookupConsumer(streamCG *cg, sds name, int flags) { if (cg == NULL) return NULL; int refresh = !(flags & SLC_NO_REFRESH); streamConsumer *consumer = raxFind(cg->consumers,(unsigned char*)name, sdslen(name)); if (consumer == raxNotFound) return...
0
[ "CWE-703", "CWE-401" ]
redis
4a7a4e42db8ff757cdf3f4a824f66426036034ef
296,707,381,318,380,960,000,000,000,000,000,000,000
9
Fix memory leak in streamGetEdgeID (#10753) si is initialized by streamIteratorStart(), we should call streamIteratorStop() on it when done. regression introduced in #9127 (redis 7.0)
static inline struct pppox_sock *pppoe_get_idx(struct pppoe_net *pn, loff_t pos) { struct pppox_sock *po; int i; for (i = 0; i < PPPOE_HASH_SIZE; i++) { po = pn->hash_table[i]; while (po) { if (!pos--) goto out; po = po->next; } } out: return po; }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
151,904,746,647,962,820,000,000,000,000,000,000,000
17
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static void mce_start_timer(struct timer_list *t) { unsigned long iv = check_interval * HZ; if (mca_cfg.ignore_ce || !iv) return; this_cpu_write(mce_next_interval, iv); __start_timer(t, iv); }
0
[ "CWE-362" ]
linux
b3b7c4795ccab5be71f080774c45bbbcc75c2aaf
228,445,913,285,170,060,000,000,000,000,000,000,000
10
x86/MCE: Serialize sysfs changes The check_interval file in /sys/devices/system/machinecheck/machinecheck<cpu number> directory is a global timer value for MCE polling. If it is changed by one CPU, mce_restart() broadcasts the event to other CPUs to delete and restart the MCE polling timer and __mcheck_cpu_init_ti...
static void snd_pcm_post_start(struct snd_pcm_substream *substream, snd_pcm_state_t state) { struct snd_pcm_runtime *runtime = substream->runtime; snd_pcm_trigger_tstamp(substream); runtime->hw_ptr_jiffies = jiffies; runtime->hw_ptr_buffer_jiffies = (runtime->buffer_size * HZ) / runtime->rate;...
0
[ "CWE-125" ]
linux
92ee3c60ec9fe64404dc035e7c41277d74aa26cb
134,302,661,197,170,140,000,000,000,000,000,000,000
14
ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Currently we have neither proper check nor protection against the concurrent calls of PCM hw_params and hw_free ioctls, which may result in a UAF. Since the existing PCM stream lock can't be used for protecting the whole ioctl operations, we need a new...
static inline int validate_convert_profile(struct btrfs_fs_info *fs_info, const struct btrfs_balance_args *bargs, u64 allowed, const char *type) { if (!(bargs->flags & BTRFS_BALANCE_ARGS_CONVERT)) return true; if (fs_info->sectorsize < PAGE_SIZE && bargs->target & BTRFS_BLOCK_GROUP_RAID56_MASK) { btrfs_err...
0
[ "CWE-476", "CWE-703" ]
linux
e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091
116,281,034,815,291,110,000,000,000,000,000,000,000
23
btrfs: fix NULL pointer dereference when deleting device by invalid id [BUG] It's easy to trigger NULL pointer dereference, just by removing a non-existing device id: # mkfs.btrfs -f -m single -d single /dev/test/scratch1 \ /dev/test/scratch2 # mount /dev/test/scratch1 /mnt/btrfs # btrfs device remove 3 /...
pkinit_init_dh_params(pkinit_plg_crypto_context plgctx) { krb5_error_code retval = ENOMEM; plgctx->dh_1024 = DH_new(); if (plgctx->dh_1024 == NULL) goto cleanup; plgctx->dh_1024->p = BN_bin2bn(pkinit_1024_dhprime, sizeof(pkinit_1024_dhprime), NULL); if ((p...
0
[ "CWE-476" ]
krb5
f249555301940c6df3a2cdda13b56b5674eebc2e
190,020,699,837,387,750,000,000,000,000,000,000,000
45
PKINIT null pointer deref [CVE-2013-1415] Don't dereference a null pointer when cleaning up. The KDC plugin for PKINIT can dereference a null pointer when a malformed packet causes processing to terminate early, leading to a crash of the KDC process. An attacker would need to have a valid PKINIT certificate or have ...
static int ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *value = &opline->op1.u.constant; EX_T(opline->result.u.var).tmp_var = *value; if (!0) { zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var); } ZEND_VM_NEXT_OPCODE(); }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
74,629,596,947,494,365,000,000,000,000,000,000,000
13
- 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
regc(int b) { if (regcode == JUST_CALC_SIZE) regsize++; else *regcode++ = b; }
0
[ "CWE-823", "CWE-703" ]
vim
6456fae9ba8e72c74b2c0c499eaf09974604ff30
103,841,074,864,941,230,000,000,000,000,000,000,000
7
patch 8.2.4440: crash with specific regexp pattern and string Problem: Crash with specific regexp pattern and string. Solution: Stop at the start of the string.
const OSSL_PARAM *rc4_hmac_md5_settable_ctx_params(ossl_unused void *cctx, ossl_unused void *provctx) { return rc4_hmac_md5_known_settable_ctx_params; }
0
[ "CWE-327" ]
openssl
7d56a74a96828985db7354a55227a511615f732b
74,454,228,216,934,030,000,000,000,000,000,000,000
5
Fix the RC4-MD5 cipher A copy&paste error meant that the RC4-MD5 cipher (used in TLS) used the TLS AAD data as the MAC key. CVE-2022-1434 Fixes #18112 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Matt Caswell <matt@openssl.org>
void __unmap_hugepage_range_final(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page) { __unmap_hugepage_range(tlb, vma, start, end, ref_page); /* * Clear this flag so that x86's huge_pmd_share page_table_shareable * test will fail on a vma...
0
[ "CWE-703" ]
linux
5af10dfd0afc559bb4b0f7e3e8227a1578333995
211,012,307,697,355,370,000,000,000,000,000,000,000
18
userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page before returning in case of errors. The error returned was -EEXIST by running UFFDIO_COPY on a non-hole offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that t...
static void mctp_serial_tty_write_wakeup(struct tty_struct *tty) { struct mctp_serial *dev = tty->disc_data; schedule_work(&dev->tx_work); }
0
[]
linux
6c342ce2239c182c2428ce5a44cb32330434ae6e
80,917,091,857,167,820,000,000,000,000,000,000,000
6
mctp: serial: Cancel pending work from ndo_uninit handler We cannot do the cancel_work_sync from after the unregister_netdev, as the dev pointer is no longer valid, causing a uaf on ldisc unregister (or device close). Instead, do the cancel_work_sync from the ndo_uninit op, where the dev still exists, but the queue h...
proxy_C_Decrypt (CK_X_FUNCTION_LIST *self, CK_SESSION_HANDLE handle, CK_BYTE_PTR enc_data, CK_ULONG enc_data_len, CK_BYTE_PTR output, CK_ULONG_PTR output_len) { State *state = (State *)self; Mapping map; CK_RV rv; rv = map_session...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
79,535,218,232,925,530,000,000,000,000,000,000,000
16
Check for arithmetic overflows before allocating
static long sock_do_ioctl(struct net *net, struct socket *sock, unsigned int cmd, unsigned long arg) { int err; void __user *argp = (void __user *)arg; err = sock->ops->ioctl(sock, cmd, arg); /* * If this ioctl is unknown try to hand it down * to the NIC driver. */ if (err != -ENOIOCTLCMD) return er...
0
[]
linux
d69e07793f891524c6bbf1e75b9ae69db4450953
228,977,318,854,739,400,000,000,000,000,000,000,000
36
net: disallow ancillary data for __sys_{send,recv}msg_file() Only io_uring uses (and added) these, and we want to disallow the use of sendmsg/recvmsg for anything but regular data transfers. Use the newly added prep helper to split the msghdr copy out from the core function, to check for msg_control and msg_controllen...
asmlinkage long compat_sys_recvfrom(int fd, void __user *buf, size_t len, unsigned int flags, struct sockaddr __user *addr, int __user *addrlen) { return sys_recvfrom(fd, buf, len, flags | MSG_CMSG_COMPAT, addr, addrlen); }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
155,159,502,132,795,360,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...
FILE *pp_input_fopen(const char *filename, enum file_flags mode) { return inc_fopen(filename, NULL, NULL, INC_OPTIONAL, mode); }
0
[ "CWE-125" ]
nasm
3144e84add8b152cc7a71e44617ce6f21daa4ba3
306,961,603,812,234,550,000,000,000,000,000,000,000
4
preproc: Don't access offsting byte on unterminated strings https://bugzilla.nasm.us/show_bug.cgi?id=3392446 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
ia64_save_extra (struct task_struct *task) { #ifdef CONFIG_PERFMON unsigned long info; #endif if ((task->thread.flags & IA64_THREAD_DBG_VALID) != 0) ia64_save_debug_regs(&task->thread.dbr[0]); #ifdef CONFIG_PERFMON if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0) pfm_save_regs(task); info = __get_cpu_va...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
73,733,149,965,790,895,000,000,000,000,000,000,000
23
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
SWFShape_moveScaledPenTo(SWFShape shape, int x, int y) { ShapeRecord record; if ( shape->isEnded ) return; record = addStyleRecord(shape); record.record.stateChange->moveToX = shape->xpos = x; record.record.stateChange->moveToY = shape->ypos = y; record.record.stateChange->flags |= SWF_SHAPE_MOVETOFLAG; if...
0
[ "CWE-20", "CWE-476" ]
libming
6e76e8c71cb51c8ba0aa9737a636b9ac3029887f
320,398,221,635,165,100,000,000,000,000,000,000,000
21
SWFShape_setLeftFillStyle: prevent fill overflow
save_image (const gchar *filename, gint32 image_ID, gint32 drawable_ID, GError **error) { FILE *ofp; GimpImageType drawable_type; gint retval; drawable_type = gimp_drawable_type (drawable_ID); /* Make sure we're not saving an image...
0
[ "CWE-190" ]
gimp
32ae0f83e5748299641cceaabe3f80f1b3afd03e
242,661,300,015,530,940,000,000,000,000,000,000,000
64
file-xwd: sanity check colormap size (CVE-2013-1913)
void OSD::ShardedOpWQ::clear_pg_pointer(spg_t pgid) { uint32_t shard_index = pgid.hash_to_shard(shard_list.size()); auto sdata = shard_list[shard_index]; Mutex::Locker l(sdata->sdata_op_ordering_lock); auto p = sdata->pg_slots.find(pgid); if (p != sdata->pg_slots.end()) { auto& slot = p->second; dout(...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
179,897,416,184,565,270,000,000,000,000,000,000,000
13
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static void descriptor_object_parser(TDB_DATA key, TDB_DATA data, void *private_data) { SMB_ASSERT(data.dsize == 0); }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
44,713,301,862,143,470,000,000,000,000,000,000,000
4
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
search_sprinc(kdc_realm_t *kdc_active_realm, krb5_kdc_req *req, krb5_flags flags, krb5_db_entry **server, const char **status) { krb5_error_code ret; krb5_principal princ = req->server; krb5_principal reftgs = NULL; krb5_boolean allow_referral; /* Do not allow referrals for u2u or tic...
0
[ "CWE-476" ]
krb5
d775c95af7606a51bf79547a94fa52ddd1cb7f49
84,969,377,481,810,250,000,000,000,000,000,000,000
39
Fix KDC null deref on TGS inner body null server After the KDC decodes a FAST inner body, it does not check for a null server. Prior to commit 39548a5b17bbda9eeb63625a201cfd19b9de1c5b this would typically result in an error from krb5_unparse_name(), but with the addition of get_local_tgt() it results in a null derefe...
_equalCreateEventTrigStmt(const CreateEventTrigStmt *a, const CreateEventTrigStmt *b) { COMPARE_STRING_FIELD(trigname); COMPARE_SCALAR_FIELD(eventname); COMPARE_NODE_FIELD(funcname); COMPARE_NODE_FIELD(whenclause); return true; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
64,406,800,372,491,430,000,000,000,000,000,000,000
9
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
void MainWindow::onProfileChanged() { if (multitrack() && MLT.isMultitrack() && (m_timelineDock->selection().isEmpty() || m_timelineDock->currentTrack() == -1)) { emit m_timelineDock->selected(multitrack()); } }
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
326,947,549,718,342,300,000,000,000,000,000,000,000
7
fix upgrade check is not using TLS correctly
static int ssl_ciphersuite_match( mbedtls_ssl_context *ssl, int suite_id, const mbedtls_ssl_ciphersuite_t **ciphersuite_info ) { const mbedtls_ssl_ciphersuite_t *suite_info; #if defined(MBEDTLS_SSL_PROTO_TLS1_2) && \ defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED) mb...
0
[ "CWE-20", "CWE-190" ]
mbedtls
83c9f495ffe70c7dd280b41fdfd4881485a3bc28
311,479,853,627,358,000,000,000,000,000,000,000,000
114
Prevent bounds check bypass through overflow in PSK identity parsing The check `if( *p + n > end )` in `ssl_parse_client_psk_identity` is unsafe because `*p + n` might overflow, thus bypassing the check. As `n` is a user-specified value up to 65K, this is relevant if the library happens to be located in the last 65K o...
static void _file_bcast_cleanup(void) { time_t now = time(NULL); _fb_wrlock(); list_delete_all(file_bcast_list, _bcast_find_in_list_to_remove, &now); _fb_wrunlock(); }
0
[ "CWE-20" ]
slurm
df545955e4f119974c278bff0c47155257d5afc7
113,541,108,879,492,060,000,000,000,000,000,000,000
8
Validate gid and user_name values provided to slurmd up front. Do not defer until later, and do not potentially miss out on proper validation of the user_name field which can lead to improper authentication handling. CVE-2018-10995.
int mutt_check_overwrite (const char *attname, const char *path, char *fname, size_t flen, int *append, char **directory) { int rc = 0; char tmp[_POSIX_PATH_MAX]; struct stat st; strfcpy (fname, path, flen); if (access (fname, F_OK) != 0) return 0; if (stat (fname, &st) != 0) return -1; if (...
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
40,186,475,371,754,844,000,000,000,000,000,000,000
68
use a 64-bit random value in temporary filenames. closes #3158
_flatpak_dir_ensure_repo (FlatpakDir *self, gboolean allow_empty, GCancellable *cancellable, GError **error) { g_autoptr(GFile) repodir = NULL; g_autoptr(OstreeRepo) repo = NULL; g_autoptr(GError) my_error = NULL; g_autopt...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
277,482,220,780,876,820,000,000,000,000,000,000,000
201
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...
int ssl3_check_cert_and_algorithm(SSL *s) { int i, idx; long alg_k, alg_a; EVP_PKEY *pkey = NULL; SESS_CERT *sc; #ifndef OPENSSL_NO_RSA RSA *rsa; #endif #ifndef OPENSSL_NO_DH DH *dh; #endif alg_k = s->s3->tmp.new_cipher->algorithm_mkey; alg_a = s->s3->tmp.new_cipher->algorithm_auth; ...
0
[]
openssl
1392c238657ec745af6a40def03d67d4ce02a082
152,627,845,613,571,450,000,000,000,000,000,000,000
126
Fix PSK handling. The PSK identity hint should be stored in the SSL_SESSION structure and not in the parent context (which will overwrite values used by other SSL structures with the same SSL_CTX). Use BUF_strndup when copying identity as it may not be null terminated. Reviewed-by: Tim Hudson <tjh@openssl.org> (cher...
ReferFontInfoLocally ( IN HII_DATABASE_PRIVATE_DATA *Private, IN HII_STRING_PACKAGE_INSTANCE *StringPackage, IN UINT8 FontId, IN BOOLEAN DuplicateEnable, IN HII_GLOBAL_FONT_INFO *GlobalFontInfo, OUT HII_FONT_INFO **LocalFontInfo ...
0
[]
edk2
764e8ba1389a617639d79d2c4f0d53f4ea4a7387
302,500,405,609,868,500,000,000,000,000,000,000,000
44
MdeModulePkg/String.c: Zero memory before free (CVE-2019-14558) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1611 Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@in...
Value ExpressionIsNumber::evaluate(const Document& root, Variables* variables) const { Value val(_children[0]->evaluate(root, variables)); return Value(val.numeric()); }
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
203,349,576,057,715,900,000,000,000,000,000,000,000
4
SERVER-49404 Enforce additional checks in $arrayToObject
static void b43_tsf_write_locked(struct b43_wldev *dev, u64 tsf) { u32 low, high; B43_WARN_ON(dev->dev->core_rev < 3); low = tsf; high = (tsf >> 32); /* The hardware guarantees us an atomic write, if we * write the low register first. */ b43_write32(dev, B43_MMIO_REV3PLUS_TSF_LOW, low); mmiowb(); b43_write3...
0
[ "CWE-134" ]
wireless
9538cbaab6e8b8046039b4b2eb6c9d614dc782bd
333,916,774,832,791,140,000,000,000,000,000,000,000
15
b43: stop format string leaking into error msgs The module parameter "fwpostfix" is userspace controllable, unfiltered, and is used to define the firmware filename. b43_do_request_fw() populates ctx->errors[] on error, containing the firmware filename. b43err() parses its arguments as a format string. For systems with...
SecureElementStatus_t SecureElementSetPin( uint8_t* pin ) { if( pin == NULL ) { return SECURE_ELEMENT_ERROR_NPE; } memcpy1( SeNvmCtx.Pin, pin, SE_PIN_SIZE ); SeNvmCtxChanged( ); return SECURE_ELEMENT_SUCCESS; }
0
[ "CWE-120", "CWE-787" ]
LoRaMac-node
e3063a91daa7ad8a687223efa63079f0c24568e4
121,505,226,507,568,090,000,000,000,000,000,000,000
11
Added received buffer size checks.
static int __init floppy_module_init(void) { if (floppy) parse_floppy_cfg_string(floppy); return floppy_init(); }
0
[ "CWE-264", "CWE-754" ]
linux
ef87dbe7614341c2e7bfe8d32fcb7028cc97442c
245,519,351,949,902,700,000,000,000,000,000,000,000
6
floppy: ignore kernel-only members in FDRAWCMD ioctl input Always clear out these floppy_raw_cmd struct members after copying the entire structure from userspace so that the in-kernel version is always valid and never left in an interdeterminate state. Signed-off-by: Matthew Daley <mattd@bugfuzz.com> Signed-off-by: L...
static u32 ql_read_page0_reg_l(struct ql3_adapter *qdev, u32 __iomem *reg) { u32 value; unsigned long hw_flags; spin_lock_irqsave(&qdev->hw_lock, hw_flags); if (qdev->current_page != 0) ql_set_register_page(qdev, 0); value = readl(reg); spin_unlock_irqrestore(&qdev->hw_lock, hw_flags); return value; }
0
[ "CWE-401" ]
linux
1acb8f2a7a9f10543868ddd737e37424d5c36cf4
117,282,709,720,281,890,000,000,000,000,000,000,000
14
net: qlogic: Fix memory leak in ql_alloc_large_buffers In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb. This skb should be released if pci_dma_mapping_error fails. Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue...
static __inline__ void fq_put(struct nf_ct_frag6_queue *fq) { inet_frag_put(&fq->q, &nf_frags); }
0
[]
linux-2.6
9e2dcf72023d1447f09c47d77c99b0c49659e5ce
129,177,550,512,949,850,000,000,000,000,000,000,000
4
netfilter: nf_conntrack_reasm: properly handle packets fragmented into a single fragment When an ICMPV6_PKT_TOOBIG message is received with a MTU below 1280, all further packets include a fragment header. Unlike regular defragmentation, conntrack also needs to "reassemble" those fragments in order to obtain a packet ...
static bool fanout_flow_is_huge(struct packet_sock *po, struct sk_buff *skb) { u32 rxhash; int i, count = 0; rxhash = skb_get_hash(skb); for (i = 0; i < ROLLOVER_HLEN; i++) if (po->rollover->history[i] == rxhash) count++; po->rollover->history[prandom_u32() % ROLLOVER_HLEN] = rxhash; return count > (ROLLOV...
0
[ "CWE-416", "CWE-362" ]
linux
84ac7260236a49c79eede91617700174c2c19b0c
117,250,509,711,137,100,000,000,000,000,000,000,000
13
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...
wrap_nettle_mac_set_key(void *_ctx, const void *key, size_t keylen) { struct nettle_mac_ctx *ctx = _ctx; ctx->set_key(ctx->ctx_ptr, keylen, key); return 0; }
0
[ "CWE-476" ]
gnutls
3db352734472d851318944db13be73da61300568
24,228,681,757,601,630,000,000,000,000,000,000,000
7
wrap_nettle_hash_fast: avoid calling _update with zero-length input As Nettle's hash update functions internally call memcpy, providing zero-length input may cause undefined behavior. Signed-off-by: Daiki Ueno <ueno@gnu.org>
JNIid* JNIid::find(int offset) { JNIid* current = this; while (current != NULL) { if (current->offset() == offset) return current; current = current->next(); } return NULL; }
0
[]
jdk17u
f8eb9abe034f7c6bea4da05a9ea42017b3f80730
161,684,753,042,907,160,000,000,000,000,000,000,000
8
8270386: Better verification of scan methods Reviewed-by: coleenp Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
static int __tipc_sendstream(struct socket *sock, struct msghdr *m, size_t dlen) { struct sock *sk = sock->sk; DECLARE_SOCKADDR(struct sockaddr_tipc *, dest, m->msg_name); long timeout = sock_sndtimeo(sk, m->msg_flags & MSG_DONTWAIT); struct sk_buff_head *txq = &sk->sk_write_queue; struct tipc_sock *tsk = tipc_sk(...
0
[ "CWE-200", "CWE-909" ]
linux
d6d86830705f173fca6087a3e67ceaf68db80523
106,867,935,847,458,500,000,000,000,000,000,000,000
84
net ticp:fix a kernel-infoleak in __tipc_sendmsg() struct tipc_socket_addr.ref has a 4-byte hole,and __tipc_getname() currently copying it to user space,causing kernel-infoleak. BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline] BUG: KMSAN: kernel-infoleak in instrument_c...
DeleteRunner(ReferenceHandle& that, Local<Value> key_handle) : AccessorRunner{that, key_handle} {}
0
[ "CWE-913" ]
isolated-vm
2646e6c1558bac66285daeab54c7d490ed332b15
98,352,547,536,447,750,000,000,000,000,000,000,000
2
Don't invoke accessors or proxies via Reference functions
void _cgsem_init(cgsem_t *cgsem, const char *file, const char *func, const int line) { int ret; if ((ret = sem_init(cgsem, 0, 0))) quitfrom(1, file, func, line, "Failed to sem_init ret=%d errno=%d", ret, errno); }
0
[ "CWE-20", "CWE-703" ]
sgminer
910c36089940e81fb85c65b8e63dcd2fac71470c
4,648,185,652,706,949,300,000,000,000,000,000,000
6
stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime. Might have introduced a memory leak, don't have time to check. :( Should the other hex2bin()'s be checked? Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this.
inbound_sasl_supportedmechs (server *serv, char *list) { int i; if (serv->sasl_mech != MECH_EXTERNAL) { /* Use most secure one supported */ for (i = MECH_AES; i >= MECH_PLAIN; i--) { if (strstr (list, sasl_mechanisms[i]) != NULL) { serv->sasl_mech = i; serv->retry_sasl = TRUE; tcp_sendf (ser...
0
[ "CWE-22" ]
hexchat
4e061a43b3453a9856d34250c3913175c45afe9d
247,478,751,964,862,600,000,000,000,000,000,000,000
24
Clean up handling CAP LS
MagickExport MagickBooleanType DeleteImageProperty(Image *image, const char *property) { assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", image->filename); if (image->properties...
0
[ "CWE-190", "CWE-125" ]
ImageMagick
d8ab7f046587f2e9f734b687ba7e6e10147c294b
182,732,179,270,796,500,000,000,000,000,000,000,000
12
Improve checking of EXIF profile to prevent integer overflow (bug report from Ibrahim el-sayed)
asmlinkage long compat_sys_socketcall(int call, u32 __user *args) { int ret; u32 a[6]; u32 a0, a1; if (call < SYS_SOCKET || call > SYS_SENDMMSG) return -EINVAL; if (copy_from_user(a, args, nas[call])) return -EFAULT; a0 = a[0]; a1 = a[1]; switch (call) { case SYS_SOCKET: ret = sys_socket(a0, a1, a[2]);...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
280,805,654,172,758,800,000,000,000,000,000,000,000
84
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static inline void hid_hw_request(struct hid_device *hdev, struct hid_report *report, int reqtype) { if (hdev->ll_driver->request) return hdev->ll_driver->request(hdev, report, reqtype); __hid_request(hdev, report, reqtype); }
0
[ "CWE-787" ]
linux
35556bed836f8dc07ac55f69c8d17dce3e7f0e25
58,201,383,756,359,840,000,000,000,000,000,000,000
8
HID: core: Sanitize event code and type when mapping input When calling into hid_map_usage(), the passed event code is blindly stored as is, even if it doesn't fit in the associated bitmap. This event code can come from a variety of sources, including devices masquerading as input devices, only a bit more "programmab...
xsltFreeStylesheet(xsltStylesheetPtr style) { if (style == NULL) return; #ifdef XSLT_REFACTORED /* * Start with a cleanup of the main stylesheet's doc. */ if ((style->principal == style) && (style->doc)) xsltCleanupStylesheetTree(style->doc, xmlDocGetRootElement(style->doc)); #ifd...
0
[]
libxslt
7089a62b8f133b42a2981cf1f920a8b3fe9a8caa
165,593,797,035,275,910,000,000,000,000,000,000,000
108
Crash compiling stylesheet with DTD * libxslt/xslt.c: when a stylesheet embbeds a DTD the compilation process could get seriously wrong
static inline struct kvm_memslots *__kvm_memslots(struct kvm *kvm, int as_id) { as_id = array_index_nospec(as_id, KVM_ADDRESS_SPACE_NUM); return srcu_dereference_check(kvm->memslots[as_id], &kvm->srcu, lockdep_is_held(&kvm->slots_lock) || !refcount_read(&kvm->users_count)); }
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
228,450,901,424,669,620,000,000,000,000,000,000,000
7
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
static void _FVMenuChangeChar(FontView *fv,int mid ) { SplineFont *sf = fv->b.sf; EncMap *map = fv->b.map; int pos = FVAnyCharSelected(fv); if ( pos>=0 ) { if ( mid==MID_Next ) ++pos; else if ( mid==MID_Prev ) --pos; else if ( mid==MID_NextDef ) { for ( ++pos; pos<map->enccount && ...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
185,149,254,304,996,170,000,000,000,000,000,000,000
66
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
parse_header (Buffer *buffer, guint32 serial_offset, guint32 reply_serial_offset, guint32 hello_serial) { guint32 array_len, header_len; guint32 offset, end_offset; guint8 header_type; guint32 reply_serial_pos = 0; const char *signature; g_autoptr(Header) header = g_new0 (Header, 1); header->buffer = buf...
0
[ "CWE-284", "CWE-436" ]
flatpak
52346bf187b5a7f1c0fe9075b328b7ad6abe78f6
170,478,319,697,306,460,000,000,000,000,000,000,000
187
Fix vulnerability in dbus proxy During the authentication all client data is directly forwarded to the dbus daemon as is, until we detect the BEGIN command after which we start filtering the binary dbus protocol. Unfortunately the detection of the BEGIN command in the proxy did not exactly match the detection in the ...
cleanup_str(char** str) { if (!str || !*str) { return; } free(*str); *str = NULL; }
0
[ "CWE-200" ]
tang
e82459fda10f0630c3414ed2afbc6320bb9ea7c9
184,519,827,795,449,460,000,000,000,000,000,000,000
8
keys: move signing part out of find_by_thp() and to find_jws() (#81) Handle just signing keys in find_jws(), to make sure we are responding only to proper queries. Tests were also failing to detect this issue and were updated accordingly. Issue discovered by Twitter Kernel and OS team during a source code aud...
static void _ht_node_free_kv(HtKv *kv) { free (kv->key); //we do not free kv->value because there is other reference free (kv); }
0
[ "CWE-416" ]
radare2
f85bc674b2a2256a364fe796351bc1971e106005
4,753,725,894,808,911,600,000,000,000,000,000,000
5
Fix #7698 - UAF in r_config_set when loading a dex
extra_last_record(struct isoent *isoent) { if (isoent->extr_rec_list.first == NULL) return (NULL); return ((struct extr_rec *)(void *) ((char *)(isoent->extr_rec_list.last) - offsetof(struct extr_rec, next))); }
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
126,372,051,492,370,630,000,000,000,000,000,000,000
8
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...
GF_Err srpp_box_read(GF_Box *s, GF_BitStream *bs) { GF_SRTPProcessBox *ptr = (GF_SRTPProcessBox *)s; ISOM_DECREASE_SIZE(s, 16) ptr->encryption_algorithm_rtp = gf_bs_read_u32(bs); ptr->encryption_algorithm_rtcp = gf_bs_read_u32(bs); ptr->integrity_algorithm_rtp = gf_bs_read_u32(bs); ptr->integrity_algorithm_rtcp ...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
188,475,189,205,113,670,000,000,000,000,000,000,000
11
fixed #1587
imapx_uidset_done (struct _uidset_state *ss, CamelIMAPXCommand *ic) { gint ret = FALSE; if (ss->last != 0) { if (ss->entries > 0) camel_imapx_command_add (ic, ","); if (ss->last == ss->start) camel_imapx_command_add (ic, "%u", ss->last); else camel_imapx_command_add (ic, "%u:%u", ss...
0
[ "CWE-476" ]
evolution-data-server
2cc39592b532cf0dc994fd3694b8e6bf924c9ab5
239,036,759,964,395,300,000,000,000,000,000,000,000
23
I#189 - Crash on malformed server response with minimal capabilities Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/189
void close_tables_for_reopen(THD *thd, TABLE_LIST **tables, const MDL_savepoint &start_of_statement_svp) { TABLE_LIST *first_not_own_table= thd->lex->first_not_own_table(); TABLE_LIST *tmp; /* If table list consists only from tables from prelocking set, table list for new att...
0
[]
server
0168d1eda30dad4b517659422e347175eb89e923
124,662,487,202,707,700,000,000,000,000,000,000,000
37
MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list Do not assume that subquery Item always present.
int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it) { return asn1_item_flags_i2d(val, out, it, 0); }
0
[ "CWE-119" ]
openssl
f5da52e308a6aeea6d5f3df98c4da295d7e9cc27
162,395,808,038,064,070,000,000,000,000,000,000,000
4
Fix ASN1_INTEGER handling. Only treat an ASN1_ANY type as an integer if it has the V_ASN1_INTEGER tag: V_ASN1_NEG_INTEGER is an internal only value which is never used for on the wire encoding. Thanks to David Benjamin <davidben@google.com> for reporting this bug. This was found using libFuzzer. RT#4364 (part)CVE-2...
static int kiocb_cancel(struct kioctx *ctx, struct kiocb *kiocb) { kiocb_cancel_fn *old, *cancel; /* * Don't want to set kiocb->ki_cancel = KIOCB_CANCELLED unless it * actually has a cancel function, hence the cmpxchg() */ cancel = ACCESS_ONCE(kiocb->ki_cancel); do { if (!cancel || cancel == KIOCB_CANCELL...
0
[ "CWE-399" ]
linux
d558023207e008a4476a3b7bb8706b2a2bf5d84f
110,915,446,863,369,150,000,000,000,000,000,000,000
20
aio: prevent double free in ioctx_alloc ioctx_alloc() calls aio_setup_ring() to allocate a ring. If aio_setup_ring() fails to do so it would call aio_free_ring() before returning, but ioctx_alloc() would call aio_free_ring() again causing a double free of the ring. This is easily reproducible from userspace. Signed-...
static void fib6_flush_trees(struct net *net) { int new_sernum = fib6_new_sernum(net); __fib6_clean_all(net, NULL, new_sernum, NULL, false); }
0
[ "CWE-755" ]
linux
7b09c2d052db4b4ad0b27b97918b46a7746966fa
61,804,169,741,756,640,000,000,000,000,000,000,000
6
ipv6: fix a typo in fib6_rule_lookup() Yi Ren reported an issue discovered by syzkaller, and bisected to the cited commit. Many thanks to Yi, this trivial patch does not reflect the patient work that has been done. Fixes: d64a1f574a29 ("ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic") Signed-off-by: Eric Du...
static void ext4_free_data_in_buddy(struct super_block *sb, struct ext4_free_data *entry) { struct ext4_buddy e4b; struct ext4_group_info *db; int err, count = 0, count2 = 0; mb_debug(sb, "gonna free %u blocks in group %u (0x%p):", entry->efd_count, entry->efd_group, entry); err = ext4_mb_load_buddy(s...
0
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
2,472,532,532,110,261,200,000,000,000,000,000,000
50
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...
static mif_hdr_t *mif_hdr_create(int maxcmpts) { mif_hdr_t *hdr; if (!(hdr = jas_malloc(sizeof(mif_hdr_t)))) { return 0; } hdr->numcmpts = 0; hdr->maxcmpts = 0; hdr->cmpts = 0; if (mif_hdr_growcmpts(hdr, maxcmpts)) { mif_hdr_destroy(hdr); return 0; } return hdr; }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
179,688,319,993,108,760,000,000,000,000,000,000,000
15
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
void RGWSetBucketWebsite::execute() { op_ret = get_params(); if (op_ret < 0) return; if (!store->is_meta_master()) { op_ret = forward_request_to_master(s, NULL, store, in_data, nullptr); if (op_ret < 0) { ldout(s->cct, 20) << __func__ << " forward_request_to_master returned ret=" << op_ret << ...
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
118,522,128,086,168,420,000,000,000,000,000,000,000
28
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
PHP_FUNCTION(ldap_next_reference) { zval *link, *result_entry; ldap_linkdata *ld; ldap_resultentry *resultentry, *resultentry_next; LDAPMessage *entry_next; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &link, &result_entry) != SUCCESS) { return; } ZEND_FETCH_RESOURCE(ld, ldap_linkdata *, &link,...
0
[ "CWE-476" ]
php-src
49782c54994ecca2ef2a061063bd5a7079c43527
194,754,553,099,572,460,000,000,000,000,000,000,000
25
Fix bug #76248 - Malicious LDAP-Server Response causes Crash
_kc_async_data_alloc(pid_t pid, NMLogDomain log_domain, const char * log_name, NMUtilsKillChildAsyncCb callback, void * user_data) { KillChildAsyncData *data; size_t ...
0
[ "CWE-20" ]
NetworkManager
420784e342da4883f6debdfe10cde68507b10d27
190,861,719,510,540,400,000,000,000,000,000,000,000
21
core: fix crash in nm_wildcard_match_check() It's not entirely clear how to treat %NULL. Clearly "match.interface-name=eth0" should not match with an interface %NULL. But what about "match.interface-name=!eth0"? It's now implemented that negative matches still succeed against %NULL. What about "match.interface-name=*"...
static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) { struct ddpehdr *ddp; struct sock *sock; struct atalk_iface *atif; struct sockaddr_at tosat; int origlen; struct ddpebits ddphv; /* Don't mangle buffer if shared */ if (!(skb = skb_share_check(skb, G...
0
[]
history
7ab442d7e0a76402c12553ee256f756097cae2d2
99,753,648,447,417,500,000,000,000,000,000,000,000
86
[DDP]: Convert to new protocol interface. Convert ddp to the new protocol interface which means it has to handle fragmented skb's. The only big change is in the checksum routine which has to do more work (like skb_checksum). Minor speedup is folding the carry to avoid a branch. Tested against a 2.4 system and by ru...
switch_to_8bit(void) { int i; int c; // Only need to do something when not already using 8-bit codes. if (!term_is_8bit(T_NAME)) { for (i = 0; i < tc_len; ++i) { c = term_7to8bit(termcodes[i].code); if (c != 0) { STRMOVE(termcodes[i].code + 1, termcodes[i].code + 2); termcode...
0
[ "CWE-125", "CWE-787" ]
vim
e178af5a586ea023622d460779fdcabbbfac0908
13,344,951,315,844,290,000,000,000,000,000,000,000
22
patch 8.2.5160: accessing invalid memory after changing terminal size Problem: Accessing invalid memory after changing terminal size. Solution: Adjust cmdline_row and msg_row to the value of Rows.
void xen_netbk_schedule_xenvif(struct xenvif *vif) { unsigned long flags; struct xen_netbk *netbk = vif->netbk; if (__on_net_schedule_list(vif)) goto kick; spin_lock_irqsave(&netbk->net_schedule_list_lock, flags); if (!__on_net_schedule_list(vif) && likely(xenvif_schedulable(vif))) { list_add_tail(&vif-...
0
[ "CWE-399" ]
linux
7d5145d8eb2b9791533ffe4dc003b129b9696c48
298,619,949,763,057,100,000,000,000,000,000,000,000
22
xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop. Signed-off-by: Matthew Daley <mattjd@gmail.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jan Beulich <JBeulich@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
PxMDecoder::PxMDecoder() { m_offset = -1; m_buf_supported = true; m_bpp = 0; m_binary = false; m_maxval = 0; }
0
[ "CWE-399", "CWE-119" ]
opencv
7bbe1a53cfc097b82b1589f7915a2120de39274c
274,541,762,300,671,070,000,000,000,000,000,000,000
8
imgcodecs(pxm): fix memcpy size
void qpdf_set_attempt_recovery(qpdf_data qpdf, QPDF_BOOL value) { QTC::TC("qpdf", "qpdf-c called qpdf_set_attempt_recovery"); qpdf->qpdf->setAttemptRecovery(value); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
184,838,566,955,055,080,000,000,000,000,000,000,000
5
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
R_API RBinJavaAnnotationsArray *r_bin_java_annotation_array_new(ut8 *buffer, ut64 sz, ut64 buf_offset) { RBinJavaAnnotation *annotation; RBinJavaAnnotationsArray *annotation_array; ut32 i; ut64 offset = 0; annotation_array = (RBinJavaAnnotationsArray *) malloc (sizeof (RBinJavaAnnotationsArray)); if (annotation_a...
0
[ "CWE-125" ]
radare2
e9ce0d64faf19fa4e9c260250fbdf25e3c11e152
309,201,216,377,967,840,000,000,000,000,000,000,000
26
Fix #10498 - Fix crash in fuzzed java files (#10511)
static size_t php_mysqlnd_change_auth_response_write(MYSQLND_CONN_DATA * conn, void * _packet) { MYSQLND_PACKET_CHANGE_AUTH_RESPONSE *packet= (MYSQLND_PACKET_CHANGE_AUTH_RESPONSE *) _packet; MYSQLND_ERROR_INFO * error_info = conn->error_info; MYSQLND_PFC * pfc = conn->protocol_frame_codec; MYSQLND_VIO * vio = conn-...
1
[ "CWE-120" ]
php-src
58006537fc5f133ae8549efe5118cde418b3ace9
231,620,817,382,358,300,000,000,000,000,000,000,000
33
Fix bug #81719: mysqlnd/pdo password buffer overflow
TEST(UriSuite, TestUriHostEmpty) { UriParserStateA stateA; UriUriA uriA; stateA.uri = &uriA; // 0 4 0 3 01 0 3 const char * const input = "http" "://" ":" "123"; const int res = uriParseUriA(&stateA, input); ASSERT_TRUE(URI_SUCCESS == res); ASSERT_TRUE(uriA.userInfo.first...
0
[ "CWE-125" ]
uriparser
cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4
6,331,804,444,563,649,000,000,000,000,000,000,000
17
Fix uriParse*Ex* out-of-bounds read
handle_client_initial_response_external_mech (DBusAuth *auth, DBusString *response) { /* We always append our UID as an initial response, so the server * doesn't have to send back an empty challenge to check whether we * want to specify an identity. i....
0
[ "CWE-59" ]
dbus
47b1a4c41004bf494b87370987b222c934b19016
151,692,484,818,467,970,000,000,000,000,000,000,000
29
auth: Reject DBUS_COOKIE_SHA1 for users other than the server owner The DBUS_COOKIE_SHA1 authentication mechanism aims to prove ownership of a shared home directory by having the server write a secret "cookie" into a .dbus-keyrings subdirectory of the desired identity's home directory with 0700 permissions, and having...
_copyWindowClause(const WindowClause *from) { WindowClause *newnode = makeNode(WindowClause); COPY_STRING_FIELD(name); COPY_STRING_FIELD(refname); COPY_NODE_FIELD(partitionClause); COPY_NODE_FIELD(orderClause); COPY_SCALAR_FIELD(frameOptions); COPY_NODE_FIELD(startOffset); COPY_NODE_FIELD(endOffset); COPY_SCA...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
165,131,586,207,114,060,000,000,000,000,000,000,000
16
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
static struct l2tp_session *l2tp_nl_session_get(struct genl_info *info, bool do_ref) { u32 tunnel_id; u32 session_id; char *ifname; struct l2tp_tunnel *tunnel; struct l2tp_session *session = NULL; struct net *net = genl_info_net(info); if (info->attrs[L2TP_ATTR_IFNAME]) { ifname = nla_data(info->attrs[L...
0
[ "CWE-416" ]
linux
f026bc29a8e093edfbb2a77700454b285c97e8ad
161,547,088,514,750,970,000,000,000,000,000,000,000
27
l2tp: pass tunnel pointer to ->session_create() Using l2tp_tunnel_find() in pppol2tp_session_create() and l2tp_eth_create() is racy, because no reference is held on the returned session. These functions are only used to implement the ->session_create callback which is run by l2tp_nl_cmd_session_create(). Therefore sea...
bool ovl_dentry_is_opaque(struct dentry *dentry) { struct ovl_entry *oe = dentry->d_fsdata; return oe->opaque; }
0
[ "CWE-284", "CWE-264" ]
linux
69c433ed2ecd2d3264efd7afec4439524b319121
264,348,642,398,245,530,000,000,000,000,000,000,000
5
fs: limit filesystem stacking depth Add a simple read-only counter to super_block that indicates how deep this is in the stack of filesystems. Previously ecryptfs was the only stackable filesystem and it explicitly disallowed multiple layers of itself. Overlayfs, however, can be stacked recursively and also may be s...
bool MonCap::is_allow_all() const { for (vector<MonCapGrant>::const_iterator p = grants.begin(); p != grants.end(); ++p) if (p->is_allow_all()) return true; return false; }
0
[ "CWE-285" ]
ceph
a2acedd2a7e12d58af6db35edbd8a9d29c557578
114,374,885,525,355,670,000,000,000,000,000,000,000
7
mon/config-key: limit caps allowed to access the store Henceforth, we'll require explicit `allow` caps for commands, or for the config-key service. Blanket caps are no longer allowed for the config-key service, except for 'allow *'. (for luminous and mimic, we're also ensuring MonCap's parser is able to understand fo...
static void lsi_memcpy(LSIState *s, uint32_t dest, uint32_t src, int count) { int n; uint8_t buf[LSI_BUF_SIZE]; trace_lsi_memcpy(dest, src, count); while (count) { n = (count > LSI_BUF_SIZE) ? LSI_BUF_SIZE : count; lsi_mem_read(s, src, buf, n); lsi_mem_write(s, dest, buf, n); ...
0
[ "CWE-835" ]
qemu
de594e47659029316bbf9391efb79da0a1a08e08
25,270,172,716,495,093,000,000,000,000,000,000,000
15
scsi: lsi: exit infinite loop while executing script (CVE-2019-12068) When executing script in lsi_execute_script(), the LSI scsi adapter emulator advances 's->dsp' index to read next opcode. This can lead to an infinite loop if the next opcode is empty. Move the existing loop exit after 10k iterations so that it cove...
struct sctp_transport *sctp_transport_get_next(struct net *net, struct rhashtable_iter *iter) { struct sctp_transport *t; t = rhashtable_walk_next(iter); for (; t; t = rhashtable_walk_next(iter)) { if (IS_ERR(t)) { if (PTR_ERR(t) == -EAGAIN) continue; break; } if (!sctp_transport_hold(t...
0
[ "CWE-362" ]
linux
b166a20b07382b8bc1dcee2a448715c9c2c81b5b
242,957,618,720,594,780,000,000,000,000,000,000,000
25
net/sctp: fix race condition in sctp_destroy_sock If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock held and sp->do_auto_asconf is true, then an element is removed from the auto_asconf_splist without any proper locking. This can happen in the following functions: 1. In sctp_accept, if sctp_sock_m...
multi_get_queue(struct mbuf_set *ms) { struct mbuf_item item; if (mbuf_extract_item(ms, &item)) /* cleartext IP packet */ { unsigned int pip_flags = PIPV4_PASSTOS | PIPV6_IMCP_NOHOST_SERVER; set_prefix(item.instance); item.instance->context.c2.buf = item.buffer->buf; if (it...
0
[ "CWE-362", "CWE-476" ]
openvpn
37bc691e7d26ea4eb61a8a434ebd7a9ae76225ab
108,928,539,812,495,730,000,000,000,000,000,000,000
28
Fix illegal client float (CVE-2020-11810) There is a time frame between allocating peer-id and initializing data channel key (which is performed on receiving push request or on async push-reply) in which the existing peer-id float checks do not work right. If a "rogue" data channel packet arrives during that time fra...
g_fork(void) { #if defined(_WIN32) return 0; #else int rv; rv = fork(); if (rv == 0) /* child */ { g_mk_temp_dir(0); } return rv; #endif }
0
[]
xrdp
cadad6e181d2a67698e5eb7cacd6b233ae29eb97
246,811,688,056,575,600,000,000,000,000,000,000,000
15
/tmp cleanup
int qh_init(const char *path) { int result = 0; int old_umask = 0; if (qh_listen_sock >= 0) { iobroker_close(nagios_iobs, qh_listen_sock); } if (path == NULL) { logit(NSLOG_RUNTIME_ERROR, TRUE, "qh: query_socket is NULL. What voodoo is this?\n"); return ERROR; } old_umask = umask(0117); errno = 0; ...
0
[ "CWE-476" ]
nagioscore
b1a92a3b52d292ccb601e77a0b29cb1e67ac9d76
67,785,370,195,705,170,000,000,000,000,000,000,000
73
merge accidental master PR (#553) into maint and fix changelog merge conflict
rpc_C_CreateObject (CK_X_FUNCTION_LIST *self, p11_rpc_message *msg) { CK_SESSION_HANDLE session; CK_ATTRIBUTE_PTR template; CK_ULONG count; CK_OBJECT_HANDLE new_object; BEGIN_CALL (CreateObject); IN_ULONG (session); IN_ATTRIBUTE_ARRAY (template, count); PROCESS_CALL ((self, session, templ...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
332,715,437,485,110,200,000,000,000,000,000,000,000
15
Check for arithmetic overflows before allocating
static long compat_sock_ioctl(struct file *file, unsigned cmd, unsigned long arg) { struct socket *sock = file->private_data; int ret = -ENOIOCTLCMD; struct sock *sk; struct net *net; sk = sock->sk; net = sock_net(sk); if (sock->ops->compat_ioctl) ret = sock->ops->compat_ioctl(sock, cmd, arg); if ...
0
[]
linux-2.6
644595f89620ba8446cc555be336d24a34464950
235,494,181,726,501,580,000,000,000,000,000,000,000
23
compat: Handle COMPAT_USE_64BIT_TIME in net/socket.c Use helper functions aware of COMPAT_USE_64BIT_TIME to write struct timeval and struct timespec to userspace in net/socket.c. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
static void qxl_create_guest_primary(PCIQXLDevice *qxl, int loadvm) { QXLDevSurfaceCreate surface; QXLSurfaceCreate *sc = &qxl->guest_primary.surface; assert(qxl->mode != QXL_MODE_NATIVE); qxl_exit_vga_mode(qxl); dprint(qxl, 1, "%s: %dx%d\n", __FUNCTION__, le32_to_cpu(sc->width), le32_t...
1
[]
qemu-kvm
5ff4e36c804157bd84af43c139f8cd3a59722db9
20,320,623,358,550,758,000,000,000,000,000,000,000
33
qxl: async io support using new spice api Some of the QXL port i/o commands are waiting for the spice server to complete certain actions. Add async versions for these commands, so we don't block the vcpu while the spice server processses the command. Instead the qxl device will raise an IRQ when done. The async comm...
static int cmd_ox(void *data, const char *input) { return r_core_cmdf ((RCore*)data, "s 0%s", input); }
0
[ "CWE-78" ]
radare2
dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7
176,918,430,773,609,300,000,000,000,000,000,000,000
3
Fix #14990 - multiple quoted command parsing issue ##core > "?e hello""?e world" hello world" > "?e hello";"?e world" hello world
json_object *LUKS2_get_digest_jobj(struct luks2_hdr *hdr, int digest) { json_object *jobj1, *jobj2; char digest_name[16]; if (!hdr || digest < 0) return NULL; if (snprintf(digest_name, sizeof(digest_name), "%u", digest) < 1) return NULL; if (!json_object_object_get_ex(hdr->jobj, "digests", &jobj1)) return...
0
[ "CWE-787" ]
cryptsetup
52f5cb8cedf22fb3e14c744814ec8af7614146c7
197,156,711,480,481,260,000,000,000,000,000,000,000
17
Check segment gaps regardless of heap space. Segments are validated in hdr_validate_segments. Gaps in segment keys are detected when collecting offsets. But if an invalid segment is very large, larger than count, it could happen that cryptsetup is unable to allocate enough memory, not giving a clue about what actually...
static int sqfs_get_metablk_pos(u32 *pos_list, void *table, u32 offset, int metablks_count) { u32 data_size, cur_size = 0; int j, ret = 0; bool comp; if (!metablks_count) return -EINVAL; for (j = 0; j < metablks_count; j++) { ret = sqfs_read_metablock(table, offset + cur_size, &comp, &data_size); ...
0
[ "CWE-787" ]
u-boot
2ac0baab4aff1a0b45067d0b62f00c15f4e86856
103,034,171,264,356,800,000,000,000,000,000,000,000
22
fs/squashfs: sqfs_read: Prevent arbitrary code execution Following Jincheng's report, an out-of-band write leading to arbitrary code execution is possible because on one side the squashfs logic accepts directory names up to 65535 bytes (u16), while U-Boot fs logic accepts directory names up to 255 bytes long. Prevent...
flatpak_deploy_data_get_alt_id (GVariant *deploy_data) { return flatpak_deploy_data_get_string (deploy_data, "alt-id"); }
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
183,684,301,190,661,500,000,000,000,000,000,000,000
4
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 ...
static void tg3_phy_fini(struct tg3 *tp) { if (tp->phy_flags & TG3_PHYFLG_IS_CONNECTED) { phy_disconnect(tp->mdio_bus->phy_map[TG3_PHY_MII_ADDR]); tp->phy_flags &= ~TG3_PHYFLG_IS_CONNECTED; } }
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
179,344,655,866,485,630,000,000,000,000,000,000,000
7
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 free_table_cell(cmark_mem *mem, void *data) { node_cell *cell = (node_cell *)data; cmark_strbuf_free((cmark_strbuf *)cell->buf); mem->free(cell->buf); mem->free(cell); }
0
[ "CWE-190" ]
cmark-gfm
b1687e6af1367c596ab75428b03af55666a66530
84,278,622,721,541,130,000,000,000,000,000,000,000
6
prevent integer overflow in row_from_string * added explicit check for UINT16_MAX boundary on row->n_columns * added additional checks for row_from_string NULL returns to prevent NULL dereferences on error cases * added additional check to ensure n_columns between marker and header rows always match prior to any ali...
int __export rad_packet_add_ipaddr(struct rad_packet_t *pack, const char *vendor_name, const char *name, in_addr_t ipaddr) { return rad_packet_add_int(pack, vendor_name, name, ipaddr); }
0
[ "CWE-191", "CWE-787" ]
accel-ppp
e9d369aa0054312b7633e964e9f7eb323f1f3d69
35,818,193,964,461,500,000,000,000,000,000,000,000
4
radius: sanity check for vendor attribute length
/* legacy helper around __netdev_alloc_skb() */ static inline struct sk_buff *__dev_alloc_skb(unsigned int length, gfp_t gfp_mask) { return __netdev_alloc_skb(NULL, length, gfp_mask);
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
319,650,916,323,442,400,000,000,000,000,000,000,000
5
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
static void lsr_read_coordinate(GF_LASeRCodec *lsr, SVG_Number *coord, Bool skipable, const char *name) { u32 flag; if (skipable) { GF_LSR_READ_INT(lsr, flag, 1, name); if (!flag) { //coord->type = SVG_NUMBER_UNKNOWN; //coord->value = 0; return; } } coord->type = SVG_NUMBER_VALUE; GF_LSR_READ_INT(ls...
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
182,763,771,159,520,700,000,000,000,000,000,000,000
15
fixed #2213
static bool fix_max_binlog_size(sys_var *self, THD *thd, enum_var_type type) { mysql_bin_log.set_max_size(max_binlog_size); #ifdef HAVE_REPLICATION if (!max_relay_log_size) active_mi->rli.relay_log.set_max_size(max_binlog_size); #endif return false; }
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
294,286,968,305,073,750,000,000,000,000,000,000,000
9
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
const PointGFp& EC_Group::get_base_point() const { return data().base_point(); }
0
[ "CWE-200" ]
botan
48fc8df51d99f9d8ba251219367b3d629cc848e3
7,158,224,110,921,458,000,000,000,000,000,000,000
4
Address DSA/ECDSA side channel
int ext4_truncate(struct inode *inode) { struct ext4_inode_info *ei = EXT4_I(inode); unsigned int credits; int err = 0; handle_t *handle; struct address_space *mapping = inode->i_mapping; /* * There is a possibility that we're either freeing the inode * or it's a completely new inode. In those cases we might...
0
[]
linux
8e4b5eae5decd9dfe5a4ee369c22028f90ab4c44
212,867,252,594,424,400,000,000,000,000,000,000,000
100
ext4: fail ext4_iget for root directory if unallocated If the root directory has an i_links_count of zero, then when the file system is mounted, then when ext4_fill_super() notices the problem and tries to call iput() the root directory in the error return path, ext4_evict_inode() will try to free the inode on disk, b...
static void hpet_pre_save(void *opaque) { HPETState *s = opaque; /* save current counter value */ s->hpet_counter = hpet_get_ticks(s); }
0
[ "CWE-119" ]
qemu
3f1c49e2136fa08ab1ef3183fd55def308829584
304,772,327,278,927,800,000,000,000,000,000,000,000
7
hpet: fix buffer overrun on invalid state load CVE-2013-4527 hw/timer/hpet.c buffer overrun hpet is a VARRAY with a uint8 size but static array of 32 To fix, make sure num_timers is valid using VMSTATE_VALID hook. Reported-by: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Michael S. Tsirkin <mst@redhat.com...
static int64_t klv_decode_ber_length(AVIOContext *pb) { uint64_t size = avio_r8(pb); if (size & 0x80) { /* long form */ int bytes_num = size & 0x7f; /* SMPTE 379M 5.3.4 guarantee that bytes_num must not exceed 8 bytes */ if (bytes_num > 8) return AVERROR_INVALIDDATA; ...
0
[ "CWE-125" ]
FFmpeg
bab0716c7f4793ec42e05a5aa7e80d82a0dd4e75
35,940,466,524,285,710,000,000,000,000,000,000,000
16
avformat/mxfdec: Fix av_log context Fixes: out of array access Fixes: mxf-crash-1c2e59bf07a34675bfb3ada5e1ec22fa9f38f923 Found-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
parse_expire_string( const char *string ) { int mult; u32 seconds; u32 abs_date = 0; u32 curtime = make_timestamp (); time_t tt; if (!*string) seconds = 0; else if (!strncmp (string, "seconds=", 8)) seconds = atoi (string+8); else if ((abs_date = scan_isodatestr(string)) && (abs_date...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
328,839,751,093,310,400,000,000,000,000,000,000,000
24
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...