func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void __vmx_disable_intercept_for_msr(unsigned long *msr_bitmap, u32 msr, int type) { int f = sizeof(unsigned long); if (!cpu_has_vmx_msr_bitmap()) return; /* * See Intel PRM Vol. 3, 20.6.9 (MSR-Bitmap Address). Early manuals * have the write-low and read-high bitmap offsets the wrong way round. ...
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
12,474,784,365,379,048,000,000,000,000,000,000,000
34
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
static int mount_autodev(const char *name, const struct lxc_rootfs *rootfs, const char *lxcpath) { int ret; size_t clen; char *path; INFO("Mounting container /dev"); /* $(rootfs->mount) + "/dev/pts" + '\0' */ clen = (rootfs->path ? strlen(rootfs->mount) : 0) + 9; path = alloca(clen); ret = snprintf(path, cle...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
24,860,209,890,235,020,000,000,000,000,000,000,000
49
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
static JSValue js_bs_get_u32(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) { GET_JSBS if (!bs) return GF_JS_EXCEPTION(ctx); return JS_NewInt32(ctx, gf_bs_read_u32(bs) ); }
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
113,878,240,093,477,320,000,000,000,000,000,000,000
6
fixed #2138
pending_exception_check1(thr_crit_bup, ptr) int thr_crit_bup; struct tcltkip *ptr; { volatile VALUE exc = rbtk_pending_exception; if (!NIL_P(exc) && rb_obj_is_kind_of(exc, rb_eException)) { DUMP1("find a pending exception"); if (rbtk_eventloop_depth > 0 || rbtk_internal_eventloop_...
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
104,755,609,008,181,360,000,000,000,000,000,000,000
41
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static inline void aio_run_all_iocbs(struct kioctx *ctx) { spin_lock_irq(&ctx->ctx_lock); while (__aio_run_iocbs(ctx)) ; spin_unlock_irq(&ctx->ctx_lock); }
0
[ "CWE-190" ]
linux-2.6
75e1c70fc31490ef8a373ea2a4bea2524099b478
278,054,729,761,935,640,000,000,000,000,000,000,000
7
aio: check for multiplication overflow in do_io_submit Tavis Ormandy pointed out that do_io_submit does not do proper bounds checking on the passed-in iocb array:        if (unlikely(nr < 0))                return -EINVAL;        if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(iocbpp)))))                retu...
build_argv_from_list(list_T *l, char ***argv, int *argc) { listitem_T *li; char_u *s; // Pass argv[] to mch_call_shell(). *argv = ALLOC_MULT(char *, l->lv_len + 1); if (*argv == NULL) return FAIL; *argc = 0; FOR_ALL_LIST_ITEMS(l, li) { s = tv_get_string_chk(&li->li_tv); if (s == NUL...
0
[ "CWE-120" ]
vim
7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97
277,579,584,606,414,500,000,000,000,000,000,000,000
28
patch 8.2.4969: changing text in Visual mode may cause invalid memory access Problem: Changing text in Visual mode may cause invalid memory access. Solution: Check the Visual position after making a change.
ipmi_fru_read_help() { lprintf(LOG_NOTICE, "fru read <fru id> <fru file>"); lprintf(LOG_NOTICE, "Note: FRU ID and file(incl. full path) must be specified."); lprintf(LOG_NOTICE, "Example: ipmitool fru read 0 /root/fru.bin"); } /* ipmi_fru_read_help() */
0
[ "CWE-120", "CWE-787" ]
ipmitool
e824c23316ae50beb7f7488f2055ac65e8b341f2
229,670,098,505,278,700,000,000,000,000,000,000,000
6
fru: Fix buffer overflow vulnerabilities Partial fix for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp The `read_fru_area_section` function only performs size validation of requested read size, and falsely assumes that the IPMI message will not respond with more than ...
uint32_t cli_bcapi_debug_print_str_start(struct cli_bc_ctx *ctx , const uint8_t* s, uint32_t len) { if (!s || len <= 0) return -1; cli_event_fastdata(EV, BCEV_DBG_STR, s, len); cli_dbgmsg("bytecode debug: %.*s", len, s); return 0; }
0
[ "CWE-189" ]
clamav-devel
3d664817f6ef833a17414a4ecea42004c35cc42f
75,341,587,840,684,900,000,000,000,000,000,000,000
8
fix recursion level crash (bb #3706). Thanks to Stephane Chazelas for the analysis.
static int cover_within(cover, val) cover_t *cover; bound_t val; { size_t pos = cover_find(cover, val); return pos > 0 && val < cover->span[pos - 1].end; }
0
[ "CWE-400" ]
unzip
47b3ceae397d21bf822bc2ac73052a4b1daf8e1c
136,526,733,957,372,570,000,000,000,000,000,000,000
7
Detect and reject a zip bomb using overlapped entries. This detects an invalid zip file that has at least one entry that overlaps with another entry or with the central directory to the end of the file. A Fifield zip bomb uses overlapped local entries to vastly increase the potential inflation ratio. Such an invalid z...
static int nl80211_abort_scan(struct sk_buff *skb, struct genl_info *info) { struct cfg80211_registered_device *rdev = info->user_ptr[0]; struct wireless_dev *wdev = info->user_ptr[1]; if (!rdev->ops->abort_scan) return -EOPNOTSUPP; if (rdev->scan_msg) return 0; if (!rdev->scan_req) return -ENOENT; rdev...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
309,994,458,513,878,600,000,000,000,000,000,000,000
17
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
test_bson_utf8_key (void) { /* euro currency symbol */ #define EU "\xe2\x82\xac" #define FIVE_EUROS EU EU EU EU EU uint32_t length; bson_iter_t iter; const char *str; bson_t *b; size_t offset; b = get_bson ("eurokey.bson"); BSON_ASSERT (bson_validate (b, BSON_VALIDATE_NONE, &offset)); BSON_ASSE...
0
[ "CWE-125" ]
libbson
42900956dc461dfe7fb91d93361d10737c1602b3
114,611,315,205,413,560,000,000,000,000,000,000,000
21
CDRIVER-2269 Check for zero string length in codewscope
static int macsec_upd_txsa(struct sk_buff *skb, struct genl_info *info) { struct nlattr **attrs = info->attrs; struct net_device *dev; struct macsec_secy *secy; struct macsec_tx_sc *tx_sc; struct macsec_tx_sa *tx_sa; u8 assoc_num; struct nlattr *tb_sa[MACSEC_SA_ATTR_MAX + 1]; if (!attrs[MACSEC_ATTR_IFINDEX]) ...
0
[ "CWE-119" ]
net
5294b83086cc1c35b4efeca03644cf9d12282e5b
173,572,630,216,336,220,000,000,000,000,000,000,000
43
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...
static int nfnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) { struct net *net = sock_net(skb->sk); const struct nfnl_callback *nc; const struct nfnetlink_subsystem *ss; int type, err; /* All the messages must at least contain nfgenmsg */ if (nlmsg_len(nlh) < sizeof(struct nfgenmsg)) return 0; typ...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
106,198,430,047,827,430,000,000,000,000,000,000,000
73
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. ...
umount_all (char *types, char *test_opts) { struct mntentchn *mc, *hd; int errors = 0; hd = mtab_head(); if (!hd->prev) die (2, _("umount: cannot find list of filesystems to unmount")); for (mc = hd->prev; mc != hd; mc = mc->prev) { if (matching_type (mc->m.mnt_type, types) && mat...
0
[ "CWE-399" ]
util-linux
11b51a46bfd3c340df251b2d20fe9d04d077a88e
33,647,277,830,588,400,000,000,000,000,000,000,000
17
umount: block signals when umounting and updating mtab (CVE-2011-1676, CVE-2011-1677) http://thread.gmane.org/gmane.comp.security.oss.general/4374 Based on CVE-2011-1089. Signed-off-by: Karel Zak <kzak@redhat.com>
TPML_AC_CAPABILITIES_Marshal(TPML_AC_CAPABILITIES *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; UINT32 i; written += UINT32_Marshal(&source->count, buffer, size); for (i = 0 ; i < source->count ; i++) { written += TPMS_AC_OUTPUT_Marshal(&source->acCapabilities[i], buffer, size); }...
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
205,992,398,435,810,150,000,000,000,000,000,000,000
11
tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks Add maxSize parameter to TPM2B_Marshal and assert on it checking the size of the data intended to be marshaled versus the maximum buffer size. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
void jpc_qmfb_join_colres(jpc_fix_t *a, int numrows, int numcols, int stride, int parity) { int bufsize = JPC_CEILDIVPOW2(numrows, 1); jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE]; jpc_fix_t *buf = joinbuf; jpc_fix_t *srcptr; jpc_fix_t *dstptr; register jpc_fix_t *srcptr2; register jpc_fix_t *dst...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
208,792,465,488,352,840,000,000,000,000,000,000,000
77
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...
SendCopyEnd(CopyState cstate) { if (cstate->copy_dest == COPY_NEW_FE) { /* Shouldn't have any unsent data */ Assert(cstate->fe_msgbuf->len == 0); /* Send Copy Done message */ pq_putemptymessage('c'); } else { CopySendData(cstate, "\\.", 2); /* Need to flush out the trailer (this also appends a newline)...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
28,646,655,361,307,070,000,000,000,000,000,000,000
17
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
void show_numa_stats(struct task_struct *p, struct seq_file *m) { int node; unsigned long tsf = 0, tpf = 0, gsf = 0, gpf = 0; struct numa_group *ng; rcu_read_lock(); ng = rcu_dereference(p->numa_group); for_each_online_node(node) { if (p->numa_faults) { tsf = p->numa_faults[task_faults_idx(NUMA_MEM, node, 0...
0
[ "CWE-400", "CWE-703" ]
linux
de53fd7aedb100f03e5d2231cfce0e4993282425
78,443,493,318,525,570,000,000,000,000,000,000,000
21
sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices It has been observed, that highly-threaded, non-cpu-bound applications running under cpu.cfs_quota_us constraints can hit a high percentage of periods throttled while simultaneously not consuming the allocated amount of quota...
HTTPSession::WriteSegment::writeSuccess() noexcept { // Unlink this write segment from the list before calling // the session's onWriteSuccess() callback because, in the // case where this is the last write for the connection, // onWriteSuccess() looks for an empty write segment list // as one of the criteria...
0
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
188,278,301,646,754,500,000,000,000,000,000,000,000
16
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
static int vmx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) { struct vcpu_vmx *vmx = to_vmx(vcpu); struct shared_msr_entry *msr; switch (msr_info->index) { #ifdef CONFIG_X86_64 case MSR_FS_BASE: msr_info->data = vmcs_readl(GUEST_FS_BASE); break; case MSR_GS_BASE: msr_info->data = vmcs_readl(GUE...
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
204,123,068,945,597,130,000,000,000,000,000,000,000
86
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...
delete_task_thread_func (GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable) { DeleteJob *job = task_data; GList *to_trash_files; GList *to_delete_files; GList *l; GFile *file;...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
20,901,393,153,469,750,000,000,000,000,000,000,000
93
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
void EncryptedPreMasterSecret::alloc(int sz) { length_ = sz; secret_ = NEW_YS opaque[sz]; }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
78,170,966,663,266,610,000,000,000,000,000,000,000
5
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
ConnStateData::parseHttpRequest(const Http1::RequestParserPointer &hp) { /* Attempt to parse the first line; this will define where the method, url, version and header begin */ { Must(hp); if (preservingClientData_) preservedClientData = inBuf; const bool parsedOk = hp->par...
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
282,995,952,136,592,450,000,000,000,000,000,000,000
134
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
cherokee_validator_ldap_check (cherokee_validator_ldap_t *ldap, cherokee_connection_t *conn) { int re; ret_t ret; size_t size; char *dn; LDAPMessage *m...
1
[ "CWE-287" ]
webserver
fbda667221c51f0aa476a02366e0cf66cb012f88
16,211,452,571,238,273,000,000,000,000,000,000,000
83
Prevent the LDAP validator from accepting an empty password.
GF_Box *av1c_box_new() { GF_AV1ConfigurationBox *tmp = (GF_AV1ConfigurationBox *)gf_malloc(sizeof(GF_AV1ConfigurationBox)); if (tmp == NULL) return NULL; memset(tmp, 0, sizeof(GF_AV1ConfigurationBox)); tmp->type = GF_ISOM_BOX_TYPE_AV1C; return (GF_Box *)tmp; }
0
[ "CWE-401" ]
gpac
0a85029d694f992f3631e2f249e4999daee15cbf
74,694,789,972,787,790,000,000,000,000,000,000,000
7
fixed #1785 (fuzz)
static int ZEND_FASTCALL ZEND_BRK_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_brk_cont_element *el; el = zend_brk_cont(&opline->op2.u.constant, opline->op1.u.opline_num, EX(op_array), EX(Ts) TSRMLS_CC); ZEND_VM_JMP(EX(op_array)->opcodes + el->brk); }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
283,304,303,374,728,140,000,000,000,000,000,000,000
11
- 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
static void cliOutputGenericHelp(void) { sds version = cliVersion(); printf( "redis-cli %s\n" "To get help about Redis commands type:\n" " \"help @<group>\" to get a list of commands in <group>\n" " \"help <command>\" for help on <command>\n" " \"help <tab>...
0
[ "CWE-119", "CWE-787" ]
redis
9fdcc15962f9ff4baebe6fdd947816f43f730d50
330,588,416,189,298,540,000,000,000,000,000,000,000
18
Security: fix redis-cli buffer overflow. Thanks to Fakhri Zulkifli for reporting it. The fix switched to dynamic allocation, copying the final prompt in the static buffer only at the end.
static gg_action_t gg_handle_resolve_async(struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state) { if (sess->resolver_start(&sess->fd, &sess->resolver, sess->resolver_host) == -1) { gg_debug_session(sess, GG_DEBUG_MISC, "// gg_watch_fd() resol...
0
[ "CWE-310" ]
libgadu
035e3cf6227995bdbe95f663a938a3838131e022
281,620,648,077,079,760,000,000,000,000,000,000,000
14
Dla GG_SSL_REQUIRED sprawdzamy certyfikat serwera z certyfikatami zainstalowanymi w systemie (Radhesh Krishnan K., Bartosz Brachaczek)
horDiff32(TIFF* tif, uint8* cp0, tmsize_t cc) { TIFFPredictorState* sp = PredictorState(tif); tmsize_t stride = sp->stride; uint32 *wp = (uint32*) cp0; tmsize_t wc = cc/4; assert((cc%(4*stride))==0); if (wc > stride) { wc -= stride; wp += wc - 1; do { REPEAT4(stride, wp[stride] -= wp[0]; wp--) wc -=...
1
[ "CWE-119", "CWE-787" ]
libtiff
3ca657a8793dd011bf869695d72ad31c779c3cc1
239,656,074,544,348,380,000,000,000,000,000,000,000
18
* libtiff/tif_predict.h, libtiff/tif_predict.c: Replace assertions by runtime checks to avoid assertions in debug mode, or buffer overflows in release mode. Can happen when dealing with unusual tile size like YCbCr with subsampling. Reported as MSVR 35105 by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities &...
void checkFidelity(const Message& msg, std::unique_ptr<MessageCompressorBase> compressor) { MessageCompressorRegistry registry; const auto originalView = msg.singleData(); const auto compressorName = compressor->getName(); std::vector<std::string> compressorList = {compressorName}; registry.setSupp...
0
[ "CWE-697" ]
mongo
1411cf602a21e45a5ef42b6869c480eb420976ee
278,734,826,089,184,130,000,000,000,000,000,000,000
37
SERVER-43751 Recompute compressor manager message parameters
_gdata_service_secure_strfree (GDataSecureString str) { #ifdef HAVE_GNOME gnome_keyring_memory_free (str); #else /* if !HAVE_GNOME */ /* Poor man's approximation to non-pageable memory: the best we can do is ensure that we don't leak it in free memory. * This can't guarantee that it hasn't hit disk at some point, b...
0
[ "CWE-20" ]
libgdata
6799f2c525a584dc998821a6ce897e463dad7840
24,819,585,423,216,350,000,000,000,000,000,000,000
14
core: Validate SSL certificates for all connections This prevents MitM attacks which use spoofed SSL certificates. Note that this bumps our libsoup requirement to 2.37.91. Closes: https://bugzilla.gnome.org/show_bug.cgi?id=671535
sf_readf_double (SNDFILE *sndfile, double *ptr, sf_count_t frames) { SF_PRIVATE *psf ; sf_count_t count, extra ; VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ; if (psf->file.mode == SFM_WRITE) { psf->error = SFE_NOT_READMODE ; return 0 ; } ; if (frames <= 0 || psf->read_current >= psf->sf.frames) { p...
0
[ "CWE-119", "CWE-787" ]
libsndfile
708e996c87c5fae77b104ccfeb8f6db784c32074
320,422,478,344,273,100,000,000,000,000,000,000,000
40
src/ : Move to a variable length header buffer Previously, the `psf->header` buffer was a fixed length specified by `SF_HEADER_LEN` which was set to `12292`. This was problematic for two reasons; this value was un-necessarily large for the majority of files and too small for some others. Now the size of the header bu...
static void rtrs_clt_remove_path_from_arr(struct rtrs_clt_path *clt_path) { struct rtrs_clt_sess *clt = clt_path->clt; struct rtrs_clt_path *next; bool wait_for_grace = false; int cpu; mutex_lock(&clt->paths_mutex); list_del_rcu(&clt_path->s.entry); /* Make sure everybody observes path removal. */ synchronize...
0
[ "CWE-415" ]
linux
8700af2cc18c919b2a83e74e0479038fd113c15d
273,748,497,075,456,050,000,000,000,000,000,000,000
89
RDMA/rtrs-clt: Fix possible double free in error case Callback function rtrs_clt_dev_release() for put_device() calls kfree(clt) to free memory. We shouldn't call kfree(clt) again, and we can't use the clt after kfree too. Replace device_register() with device_initialize() and device_add() so that dev_set_name can() ...
i915_gem_execbuffer_reserve(struct intel_ring_buffer *ring, struct drm_file *file, struct list_head *objects) { drm_i915_private_t *dev_priv = ring->dev->dev_private; struct drm_i915_gem_object *obj; int ret, retry; bool has_fenced_gpu_access = INTEL_INFO(ring->dev)->gen < 4; struct list_head ordered...
0
[ "CWE-189" ]
linux-2.6
ed8cd3b2cd61004cab85380c52b1817aca1ca49b
23,475,357,602,597,210,000,000,000,000,000,000,000
154
drm/i915: fix integer overflow in i915_gem_execbuffer2() On 32-bit systems, a large args->buffer_count from userspace via ioctl may overflow the allocation size, leading to out-of-bounds access. This vulnerability was introduced in commit 8408c282 ("drm/i915: First try a normal large kmalloc for the temporary exec bu...
run_simple_dialog_va (CommonJob *job, gboolean ignore_close_box, GtkMessageType message_type, char *primary_text, char *secondary_text, const char *details_text, ...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
122,069,107,304,415,870,000,000,000,000,000,000,000
66
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
static int button_set_mask(Button *b) { unsigned long types[CONST_MAX(EV_KEY, EV_SW)/ULONG_BITS+1] = {}, keys[CONST_MAX4(KEY_POWER, KEY_POWER2, KEY_SLEEP, KEY_SUSPEND)/ULONG_BITS+1] = {}, switches[CONST_MAX(SW_LID, SW_DOCK)/ULONG_BITS+1] = {}; struct input...
0
[ "CWE-772", "CWE-401" ]
systemd
b2774a3ae692113e1f47a336a6c09bac9cfb49ad
313,887,613,948,181,800,000,000,000,000,000,000,000
52
bus_open leak sd_event_source when udevadm trigger。 On my host, when executing the udevadm trigger, I only receive the change event, which causes memleak
static const ut8 *parse_die(const ut8 *buf, const ut8 *buf_end, RzBinDwarfDebugInfo *info, RzBinDwarfAbbrevDecl *abbrev, RzBinDwarfCompUnitHdr *hdr, RzBinDwarfDie *die, const ut8 *debug_str, size_t debug_str_len, bool big_endian) { size_t i; const char *comp_dir = NULL; ut64 line_info_offset = UT64_MAX; if (abbrev...
0
[ "CWE-787" ]
rizin
aa6917772d2f32e5a7daab25a46c72df0b5ea406
229,621,846,072,406,930,000,000,000,000,000,000,000
41
Fix oob write for dwarf with abbrev with count 0 (Fix #2083) (#2086)
ExprResolveInteger(struct xkb_context *ctx, const ExprDef *expr, int *val_rtrn) { return ExprResolveIntegerLookup(ctx, expr, val_rtrn, NULL, NULL); }
0
[ "CWE-400", "CWE-703" ]
libxkbcommon
1f9d1248c07cda8aaff762429c0dce146de8632a
252,959,434,916,767,870,000,000,000,000,000,000,000
5
xkbcomp: fix stack overflow when evaluating boolean negation The expression evaluator would go into an infinite recursion when evaluating something like this as a boolean: `!True`. Instead of recursing to just `True` and negating, it recursed to `!True` itself again. Bug inherited from xkbcomp. Caught with the afl f...
struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, const struct sctp_bind_addr *bp, gfp_t gfp, int vparam_len) { struct net *net = sock_net(asoc->base.sk); struct sctp_supported_ext_param ext_param; struct sctp_adaptation_ind_param aiparam; struct sctp_paramhdr *auth_chunks = NULL; ...
0
[ "CWE-20" ]
linux
07f2c7ab6f8d0a7e7c5764c4e6cc9c52951b9d9c
182,632,274,136,509,130,000,000,000,000,000,000,000
170
sctp: verify size of a new chunk in _sctp_make_chunk() When SCTP makes INIT or INIT_ACK packet the total chunk length can exceed SCTP_MAX_CHUNK_LEN which leads to kernel panic when transmitting these packets, e.g. the crash on sending INIT_ACK: [ 597.804948] skbuff: skb_over_panic: text:00000000ffae06e4 len:120168 ...
static char *stripspaceupper(const char *str) { static char newstring[1024]; char *p = newstring; while (*str) { if (*str != ' ') *p++ = toupper_m(*str); ++str; } *p = '\0'; return newstring; }
0
[]
samba
71225948a249f079120282740fcc39fd6faa880e
103,669,555,649,778,610,000,000,000,000,000,000,000
12
swat: Use X-Frame-Options header to avoid clickjacking Jann Horn reported a potential clickjacking vulnerability in SWAT where the SWAT page could be embedded into an attacker's page using a frame or iframe and then used to trick the user to change Samba settings. Avoid this by telling the browser to refuse the frame...
build_compressed_metadata (MonoDynamicImage *assembly) { MonoDynamicTable *table; int i; guint64 valid_mask = 0; guint64 sorted_mask; guint32 heapt_size = 0; guint32 meta_size = 256; /* allow for header and other stuff */ guint32 table_offset; guint32 ntables = 0; guint64 *int64val; guint32 *int32val; guint1...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
236,614,032,045,992,400,000,000,000,000,000,000,000
225
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
static uintmax_t do_change_note_fanout( struct tree_entry *orig_root, struct tree_entry *root, char *hex_oid, unsigned int hex_oid_len, char *fullpath, unsigned int fullpath_len, unsigned char fanout) { struct tree_content *t; struct tree_entry *e, leaf; unsigned int i, tmp_hex_oid_len, tmp_fullpath_len; ui...
0
[]
git
68061e3470210703cb15594194718d35094afdc0
1,512,223,557,741,802,400,000,000,000,000,000,000
78
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)...
template<typename t> bool is_sameXYZ(const CImg<t>& img) const { return is_sameXYZ(img._width,img._height,img._depth);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
129,089,061,294,327,820,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
s32 gf_mpegh_get_mhas_pl(u8 *ptr, u32 size, u64 *ch_layout) { s32 PL = -1; GF_BitStream *bs; u32 i; s32 sync_pos=-1; if (!ptr || !size) return 0; for (i=0; i<size-3; i++) { if ((ptr[i]==0xC0) && (ptr[i+1]== 0x01) && (ptr[i+2]==0xA5)) { sync_pos = i; break; } } if (sync_pos<0) return 0; if (ch_layo...
0
[ "CWE-190" ]
gpac
0cd19f4db70615d707e0e6202933c2ea0c1d36df
240,455,162,158,509,930,000,000,000,000,000,000,000
50
fixed #2067
static void cmd_read_disc_information(IDEState *s, uint8_t* buf) { uint8_t type = buf[1] & 7; uint32_t max_len = ube16_to_cpu(buf + 7); /* Types 1/2 are only defined for Blu-Ray. */ if (type != 0) { ide_atapi_cmd_error(s, ILLEGAL_REQUEST, ASC_INV_FIELD_IN_CMD_PACKET...
0
[]
qemu
ce560dcf20c14194db5ef3b9fc1ea592d4e68109
67,645,243,810,000,780,000,000,000,000,000,000,000
29
ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0 The START STOP UNIT command will only eject/load media if power condition is zero. If power condition is !0 then LOEJ and START will be ignored. From MMC (sbc contains similar wordings too) The Power Conditions field requests the block device to be ...
int i8042_command(unsigned char *param, int command) { unsigned long flags; int retval; spin_lock_irqsave(&i8042_lock, flags); retval = __i8042_command(param, command); spin_unlock_irqrestore(&i8042_lock, flags); return retval; }
0
[ "CWE-476" ]
linux
340d394a789518018f834ff70f7534fc463d3226
181,743,979,756,143,280,000,000,000,000,000,000,000
11
Input: i8042 - fix crash at boot time The driver checks port->exists twice in i8042_interrupt(), first when trying to assign temporary "serio" variable, and second time when deciding whether it should call serio_interrupt(). The value of port->exists may change between the 2 checks, and we may end up calling serio_int...
int rmap_walk_ksm(struct page *page, int (*rmap_one)(struct page *, struct vm_area_struct *, unsigned long, void *), void *arg) { struct stable_node *stable_node; struct hlist_node *hlist; struct rmap_item *rmap_item; int ret = SWAP_AGAIN; int search_new_forks = 0; VM_BUG_ON(!PageKsm(page)); VM_BUG_ON(!Page...
0
[ "CWE-362", "CWE-125" ]
linux
2b472611a32a72f4a118c069c2d62a1a3f087afd
129,161,895,934,393,030,000,000,000,000,000,000,000
49
ksm: fix NULL pointer dereference in scan_get_next_rmap_item() Andrea Righi reported a case where an exiting task can race against ksmd::scan_get_next_rmap_item (http://lkml.org/lkml/2011/6/1/742) easily triggering a NULL pointer dereference in ksmd. ksm_scan.mm_slot == &ksm_mm_head with only one registered mm CPU 1...
static GIOStatus irssi_ssl_set_flags(GIOChannel *handle, GIOFlags flags, GError **gerr) { GIOSSLChannel *chan = (GIOSSLChannel *)handle; return chan->giochan->funcs->io_set_flags(handle, flags, gerr); }
0
[ "CWE-20" ]
irssi-proxy
85bbc05b21678e80423815d2ef1dfe26208491ab
34,954,096,472,833,425,000,000,000,000,000,000,000
6
Check if an SSL certificate matches the hostname of the server we are connecting to git-svn-id: http://svn.irssi.org/repos/irssi/trunk@5104 dbcabf3a-b0e7-0310-adc4-f8d773084564
static apr_status_t beam_close(h2_bucket_beam *beam) { if (!beam->closed) { beam->closed = 1; apr_thread_cond_broadcast(beam->change); } return APR_SUCCESS; }
0
[ "CWE-400" ]
mod_h2
83a2e3866918ce6567a683eb4c660688d047ee81
244,030,106,152,837,470,000,000,000,000,000,000,000
8
* fixes a race condition where aborting streams triggers an unnecessary timeout.
int cgroup1_get_tree(struct fs_context *fc) { struct cgroup_fs_context *ctx = cgroup_fc2context(fc); int ret; /* Check if the caller has permission to mount. */ if (!ns_capable(ctx->ns->user_ns, CAP_SYS_ADMIN)) return -EPERM; cgroup_lock_and_drain_offline(&cgrp_dfl_root.cgrp); ret = cgroup1_root_to_use(fc); ...
0
[ "CWE-287", "CWE-269" ]
linux
24f6008564183aa120d07c03d9289519c2fe02af
56,408,523,006,472,405,000,000,000,000,000,000,000
31
cgroup-v1: Require capabilities to set release_agent The cgroup release_agent is called with call_usermodehelper. The function call_usermodehelper starts the release_agent with a full set fo capabilities. Therefore require capabilities when setting the release_agaent. Reported-by: Tabitha Sable <tabitha.c.sable@gmai...
CImg<floatT> get_projections3d(CImgList<tf>& primitives, CImgList<tc>& colors, const unsigned int x0, const unsigned int y0, const unsigned int z0, const bool normalize_colors=false) const { float m = 0, M = 0, delta = 1; if (normaliz...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
37,086,322,246,864,510,000,000,000,000,000,000,000
38
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
need_normalization(DIR *dirp, const char *path) { # if defined HAVE_FGETATTRLIST || defined HAVE_GETATTRLIST u_int32_t attrbuf[SIZEUP32(fsobj_tag_t)]; struct attrlist al = {ATTR_BIT_MAP_COUNT, 0, ATTR_CMN_OBJTAG,}; # if defined HAVE_FGETATTRLIST int ret = fgetattrlist(dirfd(dirp), &al, attrbuf, sizeof(att...
0
[ "CWE-22" ]
ruby
bd5661a3cbb38a8c3a3ea10cd76c88bbef7871b8
331,552,582,035,690,200,000,000,000,000,000,000,000
21
dir.c: check NUL bytes * dir.c (GlobPathValue): should be used in rb_push_glob only. other methods should use FilePathValue. https://hackerone.com/reports/302338 * dir.c (rb_push_glob): expand GlobPathValue git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
String* Item_func_group_concat::val_str(String* str) { DBUG_ASSERT(fixed == 1); if (null_value) return 0; if (no_appended && tree) /* Tree is used for sorting as in ORDER BY */ tree_walk(tree, &dump_leaf_key, this, left_root_right); if (table && table->blob_storage && table->blob_storage->is...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
189,222,547,090,385,940,000,000,000,000,000,000,000
20
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
process_redirect_pdu(STREAM s, RD_BOOL enhanced_redirect /*, uint32 * ext_disc_reason */ ) { uint32 len; uint16 redirect_identifier; logger(Protocol, Debug, "%s()", __func__); /* reset any previous redirection information */ g_redirect = True; free(g_redirect_server); free(g_redirect_username); free(g_redirec...
0
[ "CWE-119", "CWE-125", "CWE-703", "CWE-787" ]
rdesktop
4dca546d04321a610c1835010b5dad85163b65e1
326,980,295,236,921,500,000,000,000,000,000,000,000
183
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix ...
Envoy::Runtime::RandomGenerator& PerListenerFactoryContextImpl::random() { return listener_factory_context_base_->random(); }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
270,911,434,552,790,470,000,000,000,000,000,000,000
3
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
void ConnectionManagerImpl::doEndStream(ActiveStream& stream) { // The order of what happens in this routine is important and a little complicated. We first see // if the stream needs to be reset. If it needs to be, this will end up invoking reset callbacks // and then moving the stream to the deferred destructio...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
121,668,632,827,829,540,000,000,000,000,000,000,000
42
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...
Utf32String* yankPop() { if (size == 0) { return 0; } ++index; if (index == size) { index = 0; } return &theRing[indexToSlot[index]]; }
0
[ "CWE-200" ]
mongo
035cf2afc04988b22cb67f4ebfd77e9b344cb6e0
7,961,623,704,194,542,000,000,000,000,000,000,000
10
SERVER-25335 avoid group and other permissions when creating .dbshell history file
flatpak_run_add_extension_args (FlatpakBwrap *bwrap, GKeyFile *metakey, const char *full_ref, gboolean use_ld_so_cache, char **extensions_out, ...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
222,497,971,835,391,760,000,000,000,000,000,000,000
162
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 int vhost_scsi_release(struct inode *inode, struct file *f) { struct vhost_scsi *vs = f->private_data; struct vhost_scsi_target t; mutex_lock(&vs->dev.mutex); memcpy(t.vhost_wwpn, vs->vs_vhost_wwpn, sizeof(t.vhost_wwpn)); mutex_unlock(&vs->dev.mutex); vhost_scsi_clear_endpoint(vs, &t); vhost_dev_stop(&vs...
0
[ "CWE-200", "CWE-119" ]
linux
59c816c1f24df0204e01851431d3bab3eb76719c
126,709,120,833,255,200,000,000,000,000,000,000,000
17
vhost/scsi: potential memory corruption This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt" to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16. I looked at the context and it turns out that in vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into the vs_tpg[] arr...
void __napi_schedule(struct napi_struct *n) { unsigned long flags; local_irq_save(flags); ____napi_schedule(&__get_cpu_var(softnet_data), n); local_irq_restore(flags); }
0
[ "CWE-264" ]
linux
8909c9ad8ff03611c9c96c9a92656213e4bb495b
84,699,654,781,586,980,000,000,000,000,000,000,000
8
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...
void Compute(OpKernelContext* context) override { FusedBatchNormGradOpBase<Device, T, U>::ComputeWithReservedSpace(context, false); }
0
[ "CWE-476", "CWE-703" ]
tensorflow
6972f9dfe325636b3db4e0bc517ee22a159365c0
288,419,287,712,223,660,000,000,000,000,000,000,000
4
Add missing valuidation to FusedBatchNorm. PiperOrigin-RevId: 372460336 Change-Id: Ic8c4e4de67c58a741bd87f2e182bed07247d1126
_public_ int sd_bus_is_server(sd_bus *bus) { assert_return(bus, -EINVAL); assert_return(bus = bus_resolve(bus), -ENOPKG); assert_return(!bus_pid_changed(bus), -ECHILD); return bus->is_server; }
0
[ "CWE-416" ]
systemd
1068447e6954dc6ce52f099ed174c442cb89ed54
238,119,068,569,593,200,000,000,000,000,000,000,000
7
sd-bus: introduce API for re-enqueuing incoming messages When authorizing via PolicyKit we want to process incoming method calls twice: once to process and figure out that we need PK authentication, and a second time after we aquired PK authentication to actually execute the operation. With this new call sd_bus_enqueu...
void Http2Session::PushOutgoingBuffer(NgHttp2StreamWrite&& write) { outgoing_length_ += write.buf.len; outgoing_buffers_.emplace_back(std::move(write)); }
0
[ "CWE-416" ]
node
a3c33d4ce78f74d1cf1765704af5b427aa3840a6
166,842,643,992,857,540,000,000,000,000,000,000,000
4
http2: update handling of rst_stream with error code NGHTTP2_CANCEL The PR updates the handling of rst_stream frames and adds all streams to the pending list on receiving rst frames with the error code NGHTTP2_CANCEL. The changes will remove dependency on the stream state that may allow bypassing the checks in certai...
static int bmp_read_1bit(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, bmp_hdr_t *header) { int ypos = 0, xpos = 0, row = 0, index = 0; int padding = 0, current_byte = 0, bit = 0; if (info->enctype != BMP_BI_RGB) { return 1; } if (!info->numcolors) { info->numcolors = 2; } else if (info->numcolors < 0...
0
[ "CWE-415" ]
libgd
ac16bdf2d41724b5a65255d4c28fb0ec46bc42f5
116,431,439,621,960,950,000,000,000,000,000,000,000
69
bmp: check return value in gdImageBmpPtr Closes #447.
int bson_check_string( bson *b, const char *string, const size_t length ) { return bson_validate_string( b, ( const unsigned char * )string, length, 1, 0, 0 ); }
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
248,429,296,995,942,720,000,000,000,000,000,000,000
5
don't mix up int and size_t (first pass to fix that)
_dl_map_object (struct link_map *loader, const char *name, int preloaded, int type, int trace_mode) { int fd; char *realname; char *name_copy; struct link_map *l; /* Look for this name among those already loaded. */ for (l = _dl_loaded; l; l = l->l_next) { /* If the requested name matches the ...
0
[ "CWE-190", "CWE-252" ]
glibc
2864e767053317538feafa815046fff89e5a16be
61,483,659,709,294,730,000,000,000,000,000,000,000
184
Update. 1999-11-09 Ulrich Drepper <drepper@cygnus.com> * elf/dl-load.c (_dl_dst_count): Allow $ORIGIN to point to directory with the reference since this is as secure as using the object with the dependency. (_dl_dst_substitute): Likewise. * elf/dl-load.c (_dl_dst_count): Change strings in first two strncmp ...
*/ void xmlXPathEvalExpr(xmlXPathParserContextPtr ctxt) { #ifdef XPATH_STREAMING xmlXPathCompExprPtr comp; #endif if (ctxt == NULL) return; #ifdef XPATH_STREAMING comp = xmlXPathTryStreamCompile(ctxt->context, ctxt->base); if (comp != NULL) { if (ctxt->comp != NULL) xmlXPathFreeCompExpr(...
0
[ "CWE-416" ]
libxml2
0f3b843b3534784ef57a4f9b874238aa1fda5a73
61,204,497,316,746,030,000,000,000,000,000,000,000
30
Fix XPath stack frame logic Move the calls to xmlXPathSetFrame and xmlXPathPopFrame around in xmlXPathCompOpEvalPositionalPredicate to make sure that the context object on the stack is actually protected. Otherwise, memory corruption can occur when calling sloppily coded XPath extension functions. Fixes bug 783160.
static int snd_pcm_drain(struct snd_pcm_substream *substream, struct file *file) { struct snd_card *card; struct snd_pcm_runtime *runtime; struct snd_pcm_substream *s; struct snd_pcm_group *group; wait_queue_entry_t wait; int result = 0; int nonblock = 0; card = substream->pcm->card; runtime = substream->...
0
[ "CWE-125" ]
linux
92ee3c60ec9fe64404dc035e7c41277d74aa26cb
202,237,342,327,011,530,000,000,000,000,000,000,000
109
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 qeth_cq_init(struct qeth_card *card) { int rc; if (card->options.cq == QETH_CQ_ENABLED) { QETH_DBF_TEXT(SETUP, 2, "cqinit"); memset(card->qdio.c_q->qdio_bufs, 0, QDIO_MAX_BUFFERS_PER_Q * sizeof(struct qdio_buffer)); card->qdio.c_q->next_buf_to_init = 127; rc = do_QDIO(CARD_DDEV(car...
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
164,926,387,948,177,750,000,000,000,000,000,000,000
21
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
int dev_change_name(struct net_device *dev, const char *newname) { char oldname[IFNAMSIZ]; int err = 0; int ret; struct net *net; ASSERT_RTNL(); BUG_ON(!dev_net(dev)); net = dev_net(dev); if (dev->flags & IFF_UP) return -EBUSY; if (strncmp(newname, dev->name, IFNAMSIZ) == 0) return 0; memcpy(oldname, ...
0
[ "CWE-264" ]
linux
8909c9ad8ff03611c9c96c9a92656213e4bb495b
260,539,993,999,940,240,000,000,000,000,000,000,000
58
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...
static int lua_apr_b64encode(lua_State *L) { const char *plain; char *encoded; size_t plain_len, encoded_len; request_rec *r; r = ap_lua_check_request_rec(L, 1); luaL_checktype(L, 2, LUA_TSTRING); plain = lua_tolstring(L, 2, &plain_len); encoded_len = apr_base6...
0
[ "CWE-20" ]
httpd
78eb3b9235515652ed141353d98c239237030410
85,939,720,349,599,360,000,000,000,000,000,000,000
21
*) SECURITY: CVE-2015-0228 (cve.mitre.org) mod_lua: A maliciously crafted websockets PING after a script calls r:wsupgrade() can cause a child process crash. [Edward Lu <Chaosed0 gmail.com>] Discovered by Guido Vranken <guidovranken gmail.com> Submitted by: Edward Lu Committed by: covener git-svn-id...
static unsigned int PNMInteger(Image *image,CommentInfo *comment_info, const unsigned int base) { int c; unsigned int value; /* Skip any leading whitespace. */ do { c=ReadBlobByte(image); if (c == EOF) return(0); if (c == (int) '#') c=PNMComment(image,comment_info); ...
0
[ "CWE-401" ]
ImageMagick6
210474b2fac6a661bfa7ed563213920e93e76395
239,177,347,278,988,700,000,000,000,000,000,000,000
42
Fix ultra rare but potential memory-leak
static php_stream *phar_make_dirstream(char *dir, HashTable *manifest TSRMLS_DC) /* {{{ */ { HashTable *data; int dirlen = strlen(dir); phar_zstr key; char *entry, *found, *save, *str_key; uint keylen; ulong unused; ALLOC_HASHTABLE(data); zend_hash_init(data, 64, zend_get_hash_value, NULL, 0); if ((*dir == '...
0
[ "CWE-824" ]
php-src
9649ca1630433473a307d015ba1a79a4a7a779f5
93,576,118,143,787,570,000,000,000,000,000,000,000
126
Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream()
ofpacts_equal_stringwise(const struct ofpact *a, size_t a_len, const struct ofpact *b, size_t b_len) { struct ds a_s = DS_EMPTY_INITIALIZER; struct ofpact_format_params a_fp = { .s = &a_s }; ofpacts_format(a, a_len, &a_fp); struct ds b_s = DS_EMPTY_INITIALIZER; struct ofpac...
0
[ "CWE-416" ]
ovs
77cccc74deede443e8b9102299efc869a52b65b2
252,984,781,199,358,670,000,000,000,000,000,000,000
18
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 int pause_interception(struct kvm_vcpu *vcpu) { bool in_kernel; /* * CPL is not made available for an SEV-ES guest, therefore * vcpu->arch.preempted_in_kernel can never be true. Just * set in_kernel to false as well. */ in_kernel = !sev_es_guest(vcpu->kvm) && svm_get_cpl(vcpu) == 0; grow_ple_window...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
193,047,808,213,180,170,000,000,000,000,000,000,000
15
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
static int update_rgrp_lvb(struct gfs2_rgrpd *rgd) { u32 rl_flags; if (rgd->rd_flags & GFS2_RDF_UPTODATE) return 0; if (cpu_to_be32(GFS2_MAGIC) != rgd->rd_rgl->rl_magic) return gfs2_rgrp_bh_get(rgd); rl_flags = be32_to_cpu(rgd->rd_rgl->rl_flags); rl_flags &= ~GFS2_RDF_MASK; rgd->rd_flags &= GFS2_RDF_MASK; ...
0
[ "CWE-416" ]
linux
36e4ad0316c017d5b271378ed9a1c9a4b77fab5f
87,617,279,863,841,800,000,000,000,000,000,000,000
22
GFS2: don't set rgrp gl_object until it's inserted into rgrp tree Before this patch, function read_rindex_entry would set a rgrp glock's gl_object pointer to itself before inserting the rgrp into the rgrp rbtree. The problem is: if another process was also reading the rgrp in, and had already inserted its newly create...
static my_bool grant_reload_procs_priv(THD *thd, TABLE_LIST *table) { HASH old_proc_priv_hash, old_func_priv_hash; my_bool return_val= FALSE; DBUG_ENTER("grant_reload_procs_priv"); /* Save a copy of the current hash if we need to undo the grant load */ old_proc_priv_hash= proc_priv_hash; old_func_priv_hash...
0
[]
mysql-server
25d1b7e03b9b375a243fabdf0556c063c7282361
9,804,444,468,640,229,000,000,000,000,000,000,000
27
Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string
static int shash_compat_final(struct hash_desc *hdesc, u8 *out) { struct shash_desc **descp = crypto_hash_ctx(hdesc->tfm); return crypto_shash_final(*descp, out); }
0
[ "CWE-310" ]
linux
9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6
117,694,592,947,892,330,000,000,000,000,000,000,000
6
crypto: user - fix info leaks in report API Three errors resulting in kernel memory disclosure: 1/ The structures used for the netlink based crypto algorithm report API are located on the stack. As snprintf() does not fill the remainder of the buffer with null bytes, those stack bytes will be disclosed to users of th...
smtp_connected(struct smtp_session *s) { smtp_enter_state(s, STATE_CONNECTED); log_info("%016"PRIx64" smtp connected address=%s host=%s", s->id, ss_to_text(&s->ss), s->rdns); smtp_filter_begin(s); smtp_report_link_connect(s, s->rdns, s->fcrdns, &s->ss, &s->listener->ss); smtp_filter_phase(FILTER_CONN...
0
[ "CWE-78", "CWE-252" ]
src
9dcfda045474d8903224d175907bfc29761dcb45
246,017,875,217,778,700,000,000,000,000,000,000,000
14
Fix a security vulnerability discovered by Qualys which can lead to a privileges escalation on mbox deliveries and unprivileged code execution on lmtp deliveries, due to a logic issue causing a sanity check to be missed. ok eric@, millert@
static struct l2cap_chan *l2cap_sock_new_connection_cb(struct l2cap_chan *chan) { struct sock *sk, *parent = chan->data; lock_sock(parent); /* Check for backlog size */ if (sk_acceptq_is_full(parent)) { BT_DBG("backlog full %d", parent->sk_ack_backlog); release_sock(parent); return NULL; } sk = l2cap_soc...
0
[ "CWE-787" ]
linux
1bff51ea59a9afb67d2dd78518ab0582a54a472c
3,167,060,395,320,071,000,000,000,000,000,000,000
30
Bluetooth: fix use-after-free error in lock_sock_nested() use-after-free error in lock_sock_nested is reported: [ 179.140137][ T3731] ===================================================== [ 179.142675][ T3731] BUG: KMSAN: use-after-free in lock_sock_nested+0x280/0x2c0 [ 179.145494][ T3731] CPU: 4 PID: 3731 Comm: k...
static bool subj_alt_hostcheck(struct Curl_easy *data, const char *match_pattern, const char *hostname, const char *dispname) #ifdef CURL_DOES_CONVERSIONS { bool res = FALSE; /* Curl_cert_hostcheck uses host encoding, but we get ASCII from OpenSSl....
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
328,159,547,706,276,250,000,000,000,000,000,000,000
30
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
static void reschedule_timeout(int drive, const char *message) { unsigned long flags; spin_lock_irqsave(&floppy_lock, flags); __reschedule_timeout(drive, message); spin_unlock_irqrestore(&floppy_lock, flags); }
0
[ "CWE-264", "CWE-754" ]
linux
ef87dbe7614341c2e7bfe8d32fcb7028cc97442c
43,868,413,791,500,120,000,000,000,000,000,000,000
8
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...
smb2_set_credits(struct TCP_Server_Info *server, const int val) { int scredits, in_flight; spin_lock(&server->req_lock); server->credits = val; if (val == 1) server->reconnect_instance++; scredits = server->credits; in_flight = server->in_flight; spin_unlock(&server->req_lock); trace_smb3_set_credits(server...
0
[ "CWE-476" ]
linux
d6f5e358452479fa8a773b5c6ccc9e4ec5a20880
165,246,867,017,566,590,000,000,000,000,000,000,000
20
cifs: fix NULL ptr dereference in smb2_ioctl_query_info() When calling smb2_ioctl_query_info() with invalid smb_query_info::flags, a NULL ptr dereference is triggered when trying to kfree() uninitialised rqst[n].rq_iov array. This also fixes leaked paths that are created in SMB2_open_init() which required SMB2_open_f...
void visit(Character & /*ope*/) override { name = "Character"; }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
322,836,689,689,880,080,000,000,000,000,000,000,000
1
Fix #122
switch (code) { case EAP_REQUEST: if (len < 1) { printer(arg, " <missing type>"); break; } GETCHAR(rtype, inp); len--; if (rtype >= 1 && rtype <= sizeof (eap_typenames) / sizeof (char *)) printer(arg, " %s", eap_typenames[rtype-1]); else printer(arg, " type=0x%x", rtype); switch (rtype...
0
[ "CWE-120", "CWE-787" ]
ppp
8d7970b8f3db727fe798b65f3377fe6787575426
309,276,529,711,728,620,000,000,000,000,000,000,000
251
pppd: Fix bounds check in EAP code Given that we have just checked vallen < len, it can never be the case that vallen >= len + sizeof(rhostname). This fixes the check so we actually avoid overflowing the rhostname array. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Paul Mackerras <paulus...
TEST_F(ExpressionDateFromStringTest, OptimizesToConstantIfAllInputsAreConstant) { auto expCtx = getExpCtx(); // Test that it becomes a constant with just the dateString. auto spec = BSON("$dateFromString" << BSON("dateString" << "2017-07-04T13:09:57Z")); au...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
171,144,895,848,671,850,000,000,000,000,000,000,000
36
SERVER-38070 fix infinite loop in agg expression
GF_Err payt_dump(GF_Box *a, FILE * trace) { GF_PAYTBox *p; p = (GF_PAYTBox *)a; gf_isom_box_dump_start(a, "PayloadTypeBox", trace); fprintf(trace, "PayloadID=\"%d\" PayloadString=\"%s\">\n", p->payloadCode, p->payloadString); gf_isom_box_dump_done("PayloadTypeBox", a, trace); return GF_OK; }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
118,273,634,392,396,600,000,000,000,000,000,000,000
9
fixed 2 possible heap overflows (inc. #1088)
lmp_print_data_link_subobjs(netdissect_options *ndo, const u_char *obj_tptr, int total_subobj_len, int offset) { int hexdump = FALSE; int subobj_type, subobj_len; union { /* int to float conversion buffer */ float f; uint32_t i; } bw; while (total_subobj...
1
[ "CWE-20", "CWE-120", "CWE-119", "CWE-787" ]
tcpdump
0b661e0aa61850234b64394585cf577aac570bf4
213,901,633,039,669,530,000,000,000,000,000,000,000
68
(for 4.9.3) LMP: Add some missing bounds checks In lmp_print_data_link_subobjs(), these problems were identified through code review. Moreover: Add and use tstr[]. Update two tests outputs accordingly.
rfbProtocolExtension* rfbGetExtensionIterator() { LOCK(extMutex); return rfbExtensionHead; }
0
[]
libvncserver
804335f9d296440bb708ca844f5d89b58b50b0c6
155,065,543,257,204,850,000,000,000,000,000,000,000
5
Thread safety for zrle, zlib, tight. Proposed tight security type fix for debian bug 517422.
void iwl_dealloc_bcast_stations(struct iwl_priv *priv) { unsigned long flags; int i; spin_lock_irqsave(&priv->shrd->sta_lock, flags); for (i = 0; i < IWLAGN_STATION_COUNT; i++) { if (!(priv->stations[i].used & IWL_STA_BCAST)) continue; priv->stations[i].used &= ~IWL_STA_UCODE_ACTIVE; priv->num_stations--...
0
[ "CWE-119", "CWE-787" ]
linux
2da424b0773cea3db47e1e81db71eeebde8269d4
91,372,925,934,957,000,000,000,000,000,000,000,000
19
iwlwifi: Sanity check for sta_id On my testing, I saw some strange behavior [ 421.739708] iwlwifi 0000:01:00.0: ACTIVATE a non DRIVER active station id 148 addr 00:00:00:00:00:00 [ 421.739719] iwlwifi 0000:01:00.0: iwl_sta_ucode_activate Added STA id 148 addr 00:00:00:00:00:00 to uCode not sure how it happen, but ...
static int nf_tables_check_loops(const struct nft_ctx *ctx, const struct nft_chain *chain) { const struct nft_rule *rule; const struct nft_expr *expr, *last; struct nft_set *set; struct nft_set_binding *binding; struct nft_set_iter iter; if (ctx->chain == chain) return -ELOOP; list_for_each_entry(rule, ...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
119,876,044,303,756,280,000,000,000,000,000,000,000
69
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
static void initialise_write_state(fz_context *ctx, pdf_document *doc, const pdf_write_options *in_opts, pdf_write_state *opts) { int num; int xref_len = pdf_xref_len(ctx, doc); opts->do_incremental = in_opts->do_incremental; opts->do_ascii = in_opts->do_ascii; opts->do_tight = !in_opts->do_pretty; opts->do_expa...
0
[ "CWE-119" ]
mupdf
520cc26d18c9ee245b56e9e91f9d4fcae02be5f0
176,561,801,230,273,330,000,000,000,000,000,000,000
33
Bug 689699: Avoid buffer overrun. When cleaning a pdf file, various lists (of pdf_xref_len length) are defined early on. If we trigger a repair during the clean, this can cause pdf_xref_len to increase causing an overrun. Fix this by watching for changes in the length, and checking accesses to the list for validity....
void faad_flushbits_ex(bitfile *ld, uint32_t bits) { uint32_t tmp; ld->bufa = ld->bufb; if (ld->bytes_left >= 4) { tmp = getdword(ld->tail); ld->bytes_left -= 4; } else { tmp = getdword_n(ld->tail, ld->bytes_left); ld->bytes_left = 0; } ld->bufb = tmp; ld...
0
[ "CWE-119", "CWE-787" ]
faad2
942c3e0aee748ea6fe97cb2c1aa5893225316174
57,056,265,670,711,930,000,000,000,000,000,000,000
22
Fix a couple buffer overflows https://hackerone.com/reports/502816 https://hackerone.com/reports/507858 https://github.com/videolan/vlc/blob/master/contrib/src/faad2/faad2-fix-overflows.patch
int slap_parse_ctrl( Operation *op, SlapReply *rs, LDAPControl *control, const char **text ) { struct slap_control *sc; int rc = LDAP_SUCCESS; sc = find_ctrl( control->ldctl_oid ); if( sc != NULL ) { /* recognized control */ slap_mask_t tagmask; switch( op->o_tag ) { case LDAP_REQ_ADD: tagmask = SLA...
0
[ "CWE-125" ]
openldap
21981053a1195ae1555e23df4d9ac68d34ede9dd
170,269,040,645,547,700,000,000,000,000,000,000,000
87
ITS#9408 fix vrfilter double-free
xmlGzfileOpen (const char *filename) { char *unescaped; void *retval; retval = xmlGzfileOpen_real(filename); if (retval == NULL) { unescaped = xmlURIUnescapeString(filename, 0, NULL); if (unescaped != NULL) { retval = xmlGzfileOpen_real(unescaped); } xmlFree(unescaped); } return retval...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
82,079,120,745,652,680,000,000,000,000,000,000,000
14
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
__be32 inet_confirm_addr(struct net *net, struct in_device *in_dev, __be32 dst, __be32 local, int scope) { __be32 addr = 0; struct net_device *dev; if (in_dev) return confirm_addr_indev(in_dev, dst, local, scope); rcu_read_lock(); for_each_netdev_rcu(net, dev) { in_dev = __in_dev_get_rcu(dev); if (in_d...
0
[ "CWE-399" ]
net-next
fbd40ea0180a2d328c5adc61414dc8bab9335ce2
184,447,313,724,459,600,000,000,000,000,000,000,000
22
ipv4: Don't do expensive useless work during inetdev destroy. When an inetdev is destroyed, every address assigned to the interface is removed. And in this scenerio we do two pointless things which can be very expensive if the number of assigned interfaces is large: 1) Address promotion. We are deleting all address...
static void perf_pmu_cancel_txn(struct pmu *pmu) { unsigned int flags = __this_cpu_read(nop_txn_flags); __this_cpu_write(nop_txn_flags, 0); if (flags & ~PERF_PMU_TXN_ADD) return; perf_pmu_enable(pmu); }
0
[ "CWE-416", "CWE-362" ]
linux
12ca6ad2e3a896256f086497a7c7406a547ee373
44,984,255,646,027,880,000,000,000,000,000,000,000
11
perf: Fix race in swevent hash There's a race on CPU unplug where we free the swevent hash array while it can still have events on. This will result in a use-after-free which is BAD. Simply do not free the hash array on unplug. This leaves the thing around and no use-after-free takes place. When the last swevent die...
NTSTATUS open_file_fchmod(connection_struct *conn, struct smb_filename *smb_fname, files_struct **result) { if (!VALID_STAT(smb_fname->st)) { return NT_STATUS_INVALID_PARAMETER; } return SMB_VFS_CREATE_FILE( conn, /* conn */ NULL, /* req */ 0, /* root_dir_fid */ smb_fname, ...
0
[]
samba
60f922bf1bd8816eacbb32c24793ad1f97a1d9f2
134,214,143,945,720,670,000,000,000,000,000,000,000
27
Fix bug #10229 - No access check verification on stream files. https://bugzilla.samba.org/show_bug.cgi?id=10229 We need to check if the requested access mask could be used to open the underlying file (if it existed), as we're passing in zero for the access mask to the base filename. Signed-off-by: Jeremy Allison <jr...
static int mailimf_name_addr_parse(const char * message, size_t length, size_t * indx, char ** pdisplay_name, char ** pangle_addr) { char * display_name; char * angle_addr; size_t cur_token; int r; int res; cur_token = * indx; display_name = NULL; angle_addr = NULL; r = mailimf...
0
[ "CWE-476" ]
libetpan
1fe8fbc032ccda1db9af66d93016b49c16c1f22d
80,131,729,407,299,510,000,000,000,000,000,000,000
40
Fixed crash #274
int tls_handshake_send(REQUEST *request, tls_session_t *ssn) { int err; /* * If there's un-encrypted data in 'clean_in', then write * that data to the SSL session, and then call the BIO function * to get that encrypted data from the SSL session, into * a buffer which we can then package into an EAP packet. ...
0
[ "CWE-295" ]
freeradius-server
874b39451702338389260edbfc52b381b20352ec
205,574,488,327,762,900,000,000,000,000,000,000,000
31
Set X509_V_FLAG_CRL_CHECK_ALL