func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
int del_timer(struct timer_list *timer) { struct timer_base *base; unsigned long flags; int ret = 0; debug_assert_init(timer); timer_stats_timer_clear_start_info(timer); if (timer_pending(timer)) { base = lock_timer_base(timer, &flags); ret = detach_if_pending(timer, base, true); spin_unlock_irqrestore(&b...
1
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
86,585,725,124,719,300,000,000,000,000,000,000,000
17
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, pmd_t *dst_pmd, pmd_t *src_pmd, struct vm_area_struct *vma, unsigned long addr, unsigned long end) { pte_t *orig_src_pte, *orig_dst_pte; pte_t *src_pte, *dst_pte; spinlock_t *src_ptl, *dst_ptl; int progress = 0; int rss[NR_MM_C...
0
[ "CWE-20" ]
linux
6b7339f4c31ad69c8e9c0b2859276e22cf72176d
256,890,535,572,849,400,000,000,000,000,000,000,000
62
mm: avoid setting up anonymous pages into file mapping Reading page fault handler code I've noticed that under right circumstances kernel would map anonymous pages into file mappings: if the VMA doesn't have vm_ops->fault() and the VMA wasn't fully populated on ->mmap(), kernel would handle page fault to not populated...
static void encode_close(struct xdr_stream *xdr, const struct nfs_closeargs *arg, struct compound_hdr *hdr) { __be32 *p; p = reserve_space(xdr, 8+NFS4_STATEID_SIZE); *p++ = cpu_to_be32(OP_CLOSE); *p++ = cpu_to_be32(arg->seqid->sequence->counter); xdr_encode_opaque_fixed(p, arg->stateid->data, NFS4_STATEID_SIZE); ...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
95,407,052,635,119,760,000,000,000,000,000,000,000
11
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
pdu_store_sequencenumber_of_next_pdu(packet_info *pinfo, guint32 seq, guint32 nxtpdu, wmem_tree_t *multisegment_pdus) { struct tcp_multisegment_pdu *msp; msp=wmem_new(wmem_file_scope(), struct tcp_multisegment_pdu); msp->nxtpdu=nxtpdu; msp->seq=seq; msp->first_frame=pinfo->num; msp->first_frame...
0
[ "CWE-354" ]
wireshark
7f3fe6164a68b76d9988c4253b24d43f498f1753
241,543,095,828,553,140,000,000,000,000,000,000,000
16
TCP: do not use an unknown status when the checksum is 0xffff Otherwise it triggers an assert when adding the column as the field is defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value (not in proto_checksum_vals[)array) cannot be represented. Mark the checksum as bad even if we process the packet...
cmsBool ReadMPEElem(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Cargo, cmsUInt32Number n, cmsUInt32Number SizeOfTag) { cmsStageSignature ElementSig; cmsTagTypeHandler* TypeHandler; cmsUInt32Number nItems; c...
0
[ "CWE-125" ]
Little-CMS
5ca71a7bc18b6897ab21d815d15e218e204581e2
173,904,680,344,157,060,000,000,000,000,000,000,000
46
Added an extra check to MLU bounds Thanks to Ibrahim el-sayed for spotting the bug
dissect_kafka_describe_groups_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version) { /* [group_id] */ offset = dissect_kafka_array(tree, tvb, pinfo, offset, api_version >= 5, api_version, ...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
295,417,873,141,450,800,000,000,000,000,000,000,000
18
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
bool LOGGER::general_log_print(THD *thd, enum enum_server_command command, const char *format, va_list args) { uint message_buff_len= 0; char message_buff[MAX_LOG_BUFFER_SIZE]; /* prepare message */ if (format) message_buff_len= my_vsnprintf(message_buff, sizeof(message_buff)...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
75,238,270,329,492,130,000,000,000,000,000,000,000
15
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...
**/ CImg<T>& rand(const T& val_min, const T& val_max) { const float delta = (float)val_max - (float)val_min + (cimg::type<T>::is_float()?0:1); if (cimg::type<T>::is_float()) cimg_for(*this,ptrd,T) *ptrd = (T)(val_min + cimg::rand()*delta); else cimg_for(*this,ptrd,T) *ptrd = std::min(val_max,...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
162,202,886,744,922,720,000,000,000,000,000,000,000
6
Fix other issues in 'CImg<T>::load_bmp()'.
static void io_submit_flush_completions(struct io_comp_state *cs, struct io_ring_ctx *ctx) { int i, nr = cs->nr; struct io_kiocb *req; struct req_batch rb; io_init_req_batch(&rb); spin_lock_irq(&ctx->completion_lock); for (i = 0; i < nr; i++) { req = cs->reqs[i]; __io_cqring_fill_event(req, req->result,...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
291,721,366,641,592,450,000,000,000,000,000,000,000
28
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
static struct sock *__ipxitf_find_socket(struct ipx_interface *intrfc, __be16 port) { struct sock *s; sk_for_each(s, &intrfc->if_sklist) if (ipx_sk(s)->port == port) goto found; s = NULL; found: return s; }
0
[ "CWE-416" ]
linux
ee0d8d8482345ff97a75a7d747efc309f13b0d80
58,281,338,812,761,110,000,000,000,000,000,000,000
12
ipx: call ipxitf_put() in ioctl error path We should call ipxitf_put() if the copy_to_user() fails. Reported-by: 李强 <liqiang6-s@360.cn> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
int arch_prepare_kprobe(struct kprobe *p) { if (alternatives_text_reserved(p->addr, p->addr)) return -EINVAL; if (!can_probe((unsigned long)p->addr)) return -EILSEQ; /* insn: must be on special executable page on x86. */ p->ainsn.insn = get_insn_slot(); if (!p->ainsn.insn) return -ENOMEM; return arch_copy...
0
[ "CWE-264" ]
linux
548acf19234dbda5a52d5a8e7e205af46e9da840
105,347,995,078,875,840,000,000,000,000,000,000,000
14
x86/mm: Expand the exception table logic to allow new handling options Huge amounts of help from Andy Lutomirski and Borislav Petkov to produce this. Andy provided the inspiration to add classes to the exception table with a clever bit-squeezing trick, Boris pointed out how much cleaner it would all be if we just had...
static int build_expire(struct sk_buff *skb, struct xfrm_state *x, const struct km_event *c) { struct xfrm_user_expire *ue; struct nlmsghdr *nlh; int err; nlh = nlmsg_put(skb, c->portid, 0, XFRM_MSG_EXPIRE, sizeof(*ue), 0); if (nlh == NULL) return -EMSGSIZE; ue = nlmsg_data(nlh); copy_to_user_state(x, &ue->s...
0
[ "CWE-284" ]
linux
677e806da4d916052585301785d847c3b3e6186a
43,387,878,846,083,150,000,000,000,000,000,000,000
21
xfrm_user: validate XFRM_MSG_NEWAE XFRMA_REPLAY_ESN_VAL replay_window When a new xfrm state is created during an XFRM_MSG_NEWSA call we validate the user supplied replay_esn to ensure that the size is valid and to ensure that the replay_window size is within the allocated buffer. However later it is possible to updat...
static void ssl_calc_finished_tls_sha256( ssl_context *ssl, unsigned char *buf, int from ) { int len = 12; char *sender; sha2_context sha2; unsigned char padbuf[32]; ssl_session *session = ssl->session_negotiate; if( !session ) session = ssl->session; SSL_DEBUG_MSG(...
0
[ "CWE-310" ]
polarssl
4582999be608c9794d4518ae336b265084db9f93
57,074,772,375,538,860,000,000,000,000,000,000,000
42
Fixed timing difference resulting from badly formatted padding.
gpk_set_security_env(sc_card_t *card, const sc_security_env_t *env, int se_num) { struct gpk_private_data *priv = DRVDATA(card); sc_apdu_t apdu; unsigned int context, algorithm; unsigned int file_id; u8 sysrec[7]; int r; /* According to several sources from GemPlus, they don't * have off the shelf cards...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
19,743,258,760,654,075,000,000,000,000,000,000,000
128
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
static void __uc_fw_user_override(struct drm_i915_private *i915, struct intel_uc_fw *uc_fw) { const char *path = NULL; switch (uc_fw->type) { case INTEL_UC_FW_TYPE_GUC: path = __override_guc_firmware_path(i915); break; case INTEL_UC_FW_TYPE_HUC: path = __override_huc_firmware_path(i915); break; } if (un...
0
[ "CWE-20", "CWE-190" ]
linux
c784e5249e773689e38d2bc1749f08b986621a26
16,892,551,760,302,820,000,000,000,000,000,000,000
18
drm/i915/guc: Update to use firmware v49.0.1 The latest GuC firmware includes a number of interface changes that require driver updates to match. * Starting from Gen11, the ID to be provided to GuC needs to contain the engine class in bits [0..2] and the instance in bits [3..6]. NOTE: this patch breaks pointer d...
explicit BoostedTreesPredictOp(OpKernelConstruction* const context) : OpKernel(context) { OP_REQUIRES_OK(context, context->GetAttr("num_bucketized_features", &num_bucketized_features_)); OP_REQUIRES_OK(context, context->GetAttr("logits_dime...
0
[ "CWE-703", "CWE-197" ]
tensorflow
ca8c013b5e97b1373b3bb1c97ea655e69f31a575
322,449,609,150,864,250,000,000,000,000,000,000,000
7
Prevent integer truncation from 64 to 32 bits. The `tensorflow::Shard` functions last argument must be a 2 argument function where both arguments are `int64` (`long long`, 64 bits). However, there are usages where code passes in a function where arguments are `int` or `int32` (32 bits). In these cases, it is possible ...
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7, struct pt_regs * regs) { return do_sigaltstack(uss, uoss, REF_REG_SP); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
194,052,204,021,942,050,000,000,000,000,000,000,000
7
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...
static void tulip_dump_tx_descriptor(TULIPState *s, struct tulip_descriptor *desc) { trace_tulip_descriptor("TX ", s->current_tx_desc, desc->status, desc->control >> 22, desc->control & 0x7ff, (desc->control >> 11) & 0x7ff, desc->buf_addr1, desc->buf_addr2); }
0
[ "CWE-787" ]
qemu
8ffb7265af64ec81748335ec8f20e7ab542c3850
174,358,722,073,063,360,000,000,000,000,000,000,000
8
net: tulip: check frame size and r/w data length Tulip network driver while copying tx/rx buffers does not check frame size against r/w data length. This may lead to OOB buffer access. Add check to avoid it. Limit iterations over descriptors to avoid potential infinite loop issue in tulip_xmit_list_update. Reported-...
WebContents::WebContents(v8::Isolate* isolate, std::unique_ptr<content::WebContents> web_contents, Type type) : content::WebContentsObserver(web_contents.get()), type_(type), id_(GetAllWebContents().Add(this)), devtools_file_system_indexer_( ...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
254,170,704,855,234,850,000,000,000,000,000,000,000
23
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
static int nla_client_recv(rdpNla* nla) { WINPR_ASSERT(nla); switch (nla_get_state(nla)) { case NLA_STATE_NEGO_TOKEN: return nla_client_recv_nego_token(nla); case NLA_STATE_PUB_KEY_AUTH: return nla_client_recv_pub_key_auth(nla); case NLA_STATE_FINAL: default: WLog_ERR(TAG, "NLA in invalid client ...
0
[]
FreeRDP
479e891545473f01c187daffdfa05fc752b54b72
139,453,163,025,464,700,000,000,000,000,000,000,000
19
check return values for SetCredentialsAttributes, throw warnings for unsupported attributes
static int check_setuid(void) { if (geteuid()) { fprintf(stderr, "This program is not installed setuid root - " " \"user\" CIFS mounts not supported.\n"); return EX_USAGE; } #if CIFS_DISABLE_SETUID_CAPABILITY if (getuid() && !geteuid()) { printf("This mount.cifs program has been built with the " "...
0
[ "CWE-20" ]
cifs-utils
f6eae44a3d05b6515a59651e6bed8b6dde689aec
126,514,990,628,552,200,000,000,000,000,000,000,000
18
mtab: handle ENOSPC/EFBIG condition properly when altering mtab It's possible that when mount.cifs goes to append the mtab that there won't be enough space to do so, and the mntent won't be appended to the file in its entirety. Add a my_endmntent routine that will fflush and then fsync the FILE if that succeeds. If e...
static int keep_sockalive(SOCKETTYPE fd) { const int tcp_keepidle = 60; const int tcp_keepintvl = 60; const int keepalive = 1; int ret = 0; #ifndef WIN32 const int tcp_keepcnt = 5; if (unlikely(setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &keepalive, sizeof(keepalive)))) ret = 1; # ifdef __linux if (unlikely(...
0
[ "CWE-119", "CWE-787" ]
bfgminer
c80ad8548251eb0e15329fc240c89070640c9d79
241,676,437,764,471,600,000,000,000,000,000,000,000
57
Stratum: extract_sockaddr: Truncate overlong addresses rather than stack overflow Thanks to Mick Ayzenberg <mick@dejavusecurity.com> for finding this!
static inline void ext4_isize_set(struct ext4_inode *raw_inode, loff_t i_size) { raw_inode->i_size_lo = cpu_to_le32(i_size); raw_inode->i_size_high = cpu_to_le32(i_size >> 32);
0
[ "CWE-399" ]
linux-2.6
06a279d636734da32bb62dd2f7b0ade666f65d7c
11,652,208,628,828,391,000,000,000,000,000,000,000
5
ext4: only use i_size_high for regular files Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intenti...
static int parse_clock_source_unit(struct mixer_build *state, int unitid, void *_ftr) { struct uac_clock_source_descriptor *hdr = _ftr; struct usb_mixer_elem_info *cval; struct snd_kcontrol *kctl; char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; int ret; if (state->mixer->protocol != UAC_VERSION_2) return -EIN...
0
[ "CWE-674" ]
sound
19bce474c45be69a284ecee660aa12d8f1e88f18
231,990,384,920,187,540,000,000,000,000,000,000,000
60
ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term `check_input_term` recursively calls itself with input from device side (e.g., uac_input_terminal_descriptor.bCSourceID) as argument (id). In `check_input_term`, if `check_input_term` is called with the same `id` argument as the caller, it triggers e...
void test_getgrgid_r_wrapper(void **state) { int ret; struct group grp; char *buf; size_t buf_len; ret = get_buffer(&buf_len, &buf); assert_int_equal(ret, 0); ret = getgrgid_r_wrapper(MAX_BUF, 99999, &grp, &buf, &buf_len); assert_int_equal(ret, ENOENT); ret = getgrgid_r_wrapper(MA...
0
[ "CWE-19" ]
freeipa
50c8f0c80175c7812bb523ab2387b19a94245b59
108,855,356,390,726,050,000,000,000,000,000,000,000
42
extdom: handle ERANGE return code for getXXYYY_r() calls The getXXYYY_r() calls require a buffer to store the variable data of the passwd and group structs. If the provided buffer is too small ERANGE is returned and the caller can try with a larger buffer again. Cmocka/cwrap based unit-tests for get*_r_wrapper() are ...
HttpHeader::putRange(const HttpHdrRange * range) { assert(range); /* remove old directives if any */ delById(Http::HdrType::RANGE); /* pack into mb */ MemBuf mb; mb.init(); range->packInto(&mb); /* put */ addEntry(new HttpHeaderEntry(Http::HdrType::RANGE, NULL, mb.buf)); /* clean...
0
[ "CWE-444" ]
squid
9c8e2a71aa1d3c159a319d9365c346c48dc783a5
252,458,619,884,685,050,000,000,000,000,000,000,000
14
Enforce token characters for field-name (#700) RFC 7230 defines field-name as a token. Request splitting and cache poisoning attacks have used non-token characters to fool broken HTTP agents behind or in front of Squid for years. This change should significantly reduce that abuse. If we discover exceptional situatio...
Perl_wait4pid(pTHX_ Pid_t pid, int *statusp, int flags) { I32 result = 0; PERL_ARGS_ASSERT_WAIT4PID; #ifdef PERL_USES_PL_PIDSTATUS if (!pid) { /* PERL_USES_PL_PIDSTATUS is only defined when neither waitpid() nor wait4() is available, or on OS/2, which doesn't appear to support ...
0
[ "CWE-119", "CWE-703", "CWE-787" ]
perl5
34716e2a6ee2af96078d62b065b7785c001194be
273,543,955,120,141,700,000,000,000,000,000,000,000
87
Perl_my_setenv(); handle integer wrap RT #133204 Wean this function off int/I32 and onto UV/Size_t. Also, replace all malloc-ish calls with a wrapper that does overflow checks, In particular, it was doing (nlen + vlen + 2) which could wrap when the combined length of the environment variable name and value exceeded ...
static int bpf_prog_attach_check_attach_type(const struct bpf_prog *prog, enum bpf_attach_type attach_type) { switch (prog->type) { case BPF_PROG_TYPE_CGROUP_SOCK: case BPF_PROG_TYPE_CGROUP_SOCK_ADDR: case BPF_PROG_TYPE_CGROUP_SOCKOPT: case BPF_PROG_TYPE_SK_LOOKUP: return attach_type == prog->expected_...
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
326,344,757,006,862,660,000,000,000,000,000,000,000
22
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
void st_select_lex_unit::set_limit(st_select_lex *sl) { DBUG_ASSERT(!thd->stmt_arena->is_stmt_prepare()); offset_limit_cnt= sl->get_offset(); select_limit_cnt= sl->get_limit(); if (select_limit_cnt + offset_limit_cnt >= select_limit_cnt) select_limit_cnt+= offset_limit_cnt; else select_limit_cnt= HA_...
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
95,184,043,244,816,160,000,000,000,000,000,000,000
11
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
static bool check_sql_log_bin(sys_var *self, THD *thd, set_var *var) { if (check_has_super(self, thd, var)) return TRUE; if (var->type == OPT_GLOBAL) return TRUE; /* If in a stored function/trigger, it's too late to change sql_log_bin. */ if (thd->in_sub_stmt) { my_error(ER_STORED_FUNCTION_PREVE...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
264,648,604,226,665,930,000,000,000,000,000,000,000
23
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...
static inline uint32_t clipf_c_one(uint32_t a, uint32_t mini, uint32_t maxi, uint32_t maxisign) { if(a > mini) return mini; else if((a^(1U<<31)) > maxisign) return maxi; else return a; }
0
[ "CWE-703", "CWE-189" ]
FFmpeg
454a11a1c9c686c78aa97954306fb63453299760
223,724,734,980,632,280,000,000,000,000,000,000,000
8
avcodec/dsputil: fix signedness in sizeof() comparissions Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
int ssl3_get_cert_status(SSL *s) { int ok, al; unsigned long resplen, n; const unsigned char *p; n = s->method->ssl_get_message(s, SSL3_ST_CR_CERT_STATUS_A, SSL3_ST_CR_CERT_STATUS_B, SSL3_MT_CERTIFI...
0
[ "CWE-310" ]
openssl
e1b568dd2462f7cacf98f3d117936c34e2849a6b
61,148,063,594,570,780,000,000,000,000,000,000,000
59
Prevent handshake with unseeded PRNG Fix security issue where under certain conditions a client can complete a handshake with an unseeded PRNG. The conditions are: - Client is on a platform where the PRNG has not been seeded, and the user has not seeded manually - A protocol specific client method version has been use...
static void ima_adpcm_reset2 (_AFmoduleinst *i) { ima_adpcm_data *d = (ima_adpcm_data *) i->modspec; int framesPerBlock; framesPerBlock = d->samplesPerBlock / d->track->f.channelCount; d->track->fpos_next_frame = d->track->fpos_first_frame + d->blockAlign * (d->track->nextfframe / framesPerBlock); d->track->f...
1
[ "CWE-119" ]
audiofile
e8cf0095b3f319739f9aa1ab5a1aa52b76be8cdd
276,876,709,294,592,270,000,000,000,000,000,000,000
13
Fix decoding of multi-channel ADPCM audio files.
static void vmx_update_msr_bitmap_x2apic(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); u8 mode; if (!cpu_has_vmx_msr_bitmap()) return; if (cpu_has_secondary_exec_ctrls() && (secondary_exec_controls_get(vmx) & SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE)) { mode = MSR_BITMAP_MODE_X2APIC; ...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
36,540,449,148,983,270,000,000,000,000,000,000,000
38
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 r_cmd_java_handle_field_info (RCore *core, const char *cmd) { RAnal *anal = get_anal (core); RBinJavaObj *obj = (RBinJavaObj *) r_cmd_java_get_bin_obj (anal); IFDBG r_cons_printf ("Function call made: %s\n", cmd); ut16 idx = -1; if (!obj) { eprintf ("[-] r_cmd_java: no valid java bins found.\n"); r...
0
[ "CWE-703", "CWE-193" ]
radare2
ced0223c7a1b3b5344af315715cd28fe7c0d9ebc
144,371,455,138,411,190,000,000,000,000,000,000,000
29
Fix unmatched array length in core_java.c (issue #16304) (#16313)
static __u8 *ch_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) { if (*rsize >= 17 && rdesc[11] == 0x3c && rdesc[12] == 0x02) { hid_info(hdev, "fixing up Cherry Cymotion report descriptor\n"); rdesc[11] = rdesc[16] = 0xff; rdesc[12] = rdesc[17] = 0x03; } return rdesc; }
1
[ "CWE-119", "CWE-787" ]
linux
4ab25786c87eb20857bbb715c3ae34ec8fd6a214
29,818,552,687,954,740,000,000,000,000,000,000,000
10
HID: fix a couple of off-by-ones There are a few very theoretical off-by-one bugs in report descriptor size checking when performing a pre-parsing fixup. Fix those. Cc: stable@vger.kernel.org Reported-by: Ben Hawkes <hawkes@google.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jir...
static void mark_ptr_or_null_reg(struct bpf_func_state *state, struct bpf_reg_state *reg, u32 id, bool is_null) { if (reg_type_may_be_null(reg->type) && reg->id == id) { /* Old offset (both fixed and variable parts) should * have been known-zero, because we don't allow pointer * arithmetic on pointer...
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
11,163,335,447,011,791,000,000,000,000,000,000,000
64
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
static void reset_cmd_handler(conn *c) { c->cmd = -1; c->substate = bin_no_state; if (c->item != NULL) { // TODO: Any other way to get here? // SASL auth was mistakenly using it. Nothing else should? item_remove(c->item); c->item = NULL; } if (c->rbytes > 0) { ...
0
[]
memcached
f249724cedcab6605ca8a0769ac4b356a8124f63
82,072,725,699,456,970,000,000,000,000,000,000,000
17
crash fix: errstr wasn't initialized in metaget if meta_flag_preparse bailed out early it would try to read uninitialized memory.
void Field_longlong::sort_string(uchar *to,uint length __attribute__((unused))) { if (unsigned_flag) to[0] = ptr[7]; else to[0] = (char) (ptr[7] ^ 128); /* Revers signbit */ to[1] = ptr[6]; to[2] = ptr[5]; to[3] = ptr[4]; to[4] = ptr[3]; to[5] = ptr[2]; to[6] = ptr[1]; to[7] = p...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
128,652,563,395,945,600,000,000,000,000,000,000,000
14
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
SYSCALL_DEFINE6(splice, int, fd_in, loff_t __user *, off_in, int, fd_out, loff_t __user *, off_out, size_t, len, unsigned int, flags) { struct fd in, out; long error; if (unlikely(!len)) return 0; error = -EBADF; in = fdget(fd_in); if (in.file) { if (in.file->f_mode & FMODE_READ) { out = fdget(fd_out...
0
[ "CWE-284", "CWE-264" ]
linux
8d0207652cbe27d1f962050737848e5ad4671958
309,772,913,481,885,000,000,000,000,000,000,000,000
27
->splice_write() via ->write_iter() iter_file_splice_write() - a ->splice_write() instance that gathers the pipe buffers, builds a bio_vec-based iov_iter covering those and feeds it to ->write_iter(). A bunch of simple cases coverted to that... [AV: fixed the braino spotted by Cyrill] Signed-off-by: Al Viro <viro@z...
static struct sk_buff *batadv_frag_create(struct sk_buff *skb, struct batadv_frag_packet *frag_head, unsigned int mtu) { struct sk_buff *skb_fragment; unsigned header_size = sizeof(*frag_head); unsigned fragment_size = mtu - header_size; skb_fragment = netdev_alloc_skb(NULL, mtu + ETH_HLEN); if (!sk...
0
[ "CWE-399" ]
linux
5b6698b0e4a37053de35cc24ee695b98a7eb712b
225,610,680,301,893,240,000,000,000,000,000,000,000
25
batman-adv: Calculate extra tail size based on queued fragments The fragmentation code was replaced in 610bfc6bc99bc83680d190ebc69359a05fc7f605 ("batman-adv: Receive fragmented packets and merge"). The new code provided a mostly unused parameter skb for the merging function. It is used inside the function to calculate...
vips_foreign_load_gif_file_open( VipsForeignLoadGif *gif ) { VipsForeignLoad *load = (VipsForeignLoad *) gif; VipsForeignLoadGifFile *file = (VipsForeignLoadGifFile *) gif; if( !file->fp ) { if( !(file->fp = vips__file_open_read( file->filename, NULL, FALSE )) ) return( -1 ); VIPS_SETSTR( load->out->f...
0
[ "CWE-416" ]
libvips
ce684dd008532ea0bf9d4a1d89bacb35f4a83f4d
274,323,219,422,510,220,000,000,000,000,000,000,000
21
fetch map after DGifGetImageDesc() Earlier refactoring broke GIF map fetch.
static void discard_port_data(struct port *port) { struct port_buffer *buf; unsigned int err; if (!port->portdev) { /* Device has been unplugged. vqs are already gone. */ return; } buf = get_inbuf(port); err = 0; while (buf) { port->stats.bytes_discarded += buf->len - buf->offset; if (add_inbuf(port->...
0
[ "CWE-119", "CWE-787" ]
linux
c4baad50297d84bde1a7ad45e50c73adae4a2192
153,306,733,095,251,600,000,000,000,000,000,000,000
25
virtio-console: avoid DMA from stack put_chars() stuffs the buffer it gets into an sg, but that buffer may be on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it manifested as printks getting turned into NUL bytes). Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Michael S. Tsirkin <mst@redhat...
map_mode_to_chars(int mode) { garray_T mapmode; ga_init2(&mapmode, 1, 7); if ((mode & (INSERT + CMDLINE)) == INSERT + CMDLINE) ga_append(&mapmode, '!'); /* :map! */ else if (mode & INSERT) ga_append(&mapmode, 'i'); /* :imap */ else if (mode & LANGMAP) ga_append(&mapmode, 'l'); /* :lmap...
0
[ "CWE-78" ]
vim
53575521406739cf20bbe4e384d88e7dca11f040
141,285,652,328,584,120,000,000,000,000,000,000,000
37
patch 8.1.1365: source command doesn't check for the sandbox Problem: Source command doesn't check for the sandbox. (Armin Razmjou) Solution: Check for the sandbox when sourcing a file.
static inline u32 ext4_chksum(struct ext4_sb_info *sbi, u32 crc, const void *address, unsigned int length) { struct { struct shash_desc shash; char ctx[4]; } desc; BUG_ON(crypto_shash_descsize(sbi->s_chksum_driver)!=sizeof(desc.ctx)); desc.shash.tfm = sbi->s_chksum_driver; desc.shash.flags = 0; *(...
0
[ "CWE-787" ]
linux
c37e9e013469521d9adb932d17a1795c139b36db
118,121,996,257,056,700,000,000,000,000,000,000,000
18
ext4: add more inode number paranoia checks If there is a directory entry pointing to a system inode (such as a journal inode), complain and declare the file system to be corrupted. Also, if the superblock's first inode number field is too small, refuse to mount the file system. This addresses CVE-2018-10882. https...
void test_nghttp2_session_server_recv_push_response(void) { nghttp2_session *session; nghttp2_session_callbacks callbacks; nghttp2_bufs bufs; nghttp2_buf *buf; ssize_t rv; my_user_data ud; nghttp2_mem *mem; nghttp2_frame frame; nghttp2_hd_deflater deflater; nghttp2_nv *nva; size_t nvlen; mem = ...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
79,448,377,982,731,010,000,000,000,000,000,000,000
50
Add nghttp2_option_set_max_outbound_ack
int bgp_mp_reach_parse(struct bgp_attr_parser_args *args, struct bgp_nlri *mp_update) { iana_afi_t pkt_afi; afi_t afi; iana_safi_t pkt_safi; safi_t safi; bgp_size_t nlri_len; size_t start; struct stream *s; struct peer *const peer = args->peer; struct attr *const attr = args->attr; const bgp_size_t l...
0
[ "CWE-20", "CWE-436" ]
frr
943d595a018e69b550db08cccba1d0778a86705a
259,178,065,697,330,230,000,000,000,000,000,000,000
192
bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined Signed-off-by: Lou Berger <lberger@labn.net>
circle_poly(PG_FUNCTION_ARGS) { int32 npts = PG_GETARG_INT32(0); CIRCLE *circle = PG_GETARG_CIRCLE_P(1); POLYGON *poly; int base_size, size; int i; double angle; double anglestep; if (FPzero(circle->radius)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cannot con...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
40,001,129,343,010,600,000,000,000,000,000,000,000
47
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
const OID& EC_Group::get_curve_oid() const { return data().oid(); }
0
[ "CWE-200" ]
botan
48fc8df51d99f9d8ba251219367b3d629cc848e3
83,904,663,739,813,550,000,000,000,000,000,000,000
4
Address DSA/ECDSA side channel
fix_imports(PyObject **module_name, PyObject **global_name) { PyObject *key; PyObject *item; PickleState *st = _Pickle_GetGlobalState(); key = PyTuple_Pack(2, *module_name, *global_name); if (key == NULL) return -1; item = PyDict_GetItemWithError(st->name_mapping_3to2, key); Py_DECR...
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
243,035,156,817,196,700,000,000,000,000,000,000,000
64
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
void bic_set_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq, bool is_sync) { bic->bfqq[is_sync] = bfqq;
0
[ "CWE-416" ]
linux
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
78,789,484,474,108,630,000,000,000,000,000,000,000
4
block, bfq: fix use-after-free in bfq_idle_slice_timer_body In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is not in bfqd-lock critical section. The bfqq, which is not equal to NULL in bfq_idle_slice_timer, may be freed after passing to bfq_idle_slice_timer_body. So we will access the freed memory. In ad...
FoFiTrueType::~FoFiTrueType() { gfree(tables); gfree(cmaps); if (nameToGID) { delete nameToGID; } }
0
[ "CWE-125" ]
poppler
cdb7ad95f7c8fbf63ade040d8a07ec96467042fc
291,538,266,563,009,760,000,000,000,000,000,000,000
7
Fix malformed file crash in bug #85243
static size_t NumElements(const TensorProto& proto) { return proto.variant_val().size(); }
0
[ "CWE-345" ]
tensorflow
abcced051cb1bd8fb05046ac3b6023a7ebcc4578
310,509,788,500,426,250,000,000,000,000,000,000,000
3
Prevent crashes when loading tensor slices with unsupported types. Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL) messages for the unset and unsupported types. PiperOrigin-RevId: 392695027 Change-Id: I4beda7db950db951d273e3259a7c8534ece49354
SYSCALL_DEFINE1(set_thread_area, struct user_desc __user *, u_info) { return do_set_thread_area(current, -1, u_info, 1); }
0
[ "CWE-284", "CWE-264" ]
linux
41bdc78544b8a93a9c6814b8bbbfef966272abbe
211,833,299,779,427,330,000,000,000,000,000,000,000
4
x86/tls: Validate TLS entries to protect espfix Installing a 16-bit RW data segment into the GDT defeats espfix. AFAICT this will not affect glibc, Wine, or dosemu at all. Signed-off-by: Andy Lutomirski <luto@amacapital.net> Acked-by: H. Peter Anvin <hpa@zytor.com> Cc: stable@vger.kernel.org Cc: Konrad Rzeszutek Wilk...
ldbm_config_serial_lock_set(void *arg, void *value, char *errorbuf __attribute__((unused)), int phase __attribute__((unused)), int apply) { struct ldbminfo *li = (struct ldbminfo *)arg; if (apply) { ...
0
[ "CWE-399", "CWE-203" ]
389-ds-base
cc0f69283abc082488824702dae485b8eae938bc
25,635,971,689,719,526,000,000,000,000,000,000,000
14
Issue 4480 - Unexpected info returned to ldap request (#4491) Bug description: If the bind entry does not exist, the bind result info reports that 'No such entry'. It should not give any information if the target entry exists or not Fix description: Does not return any additional information d...
std::size_t size() const { return size_; }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
33,014,783,292,915,525,000,000,000,000,000,000,000
1
Fix segfault on complex pointer formatting (#642)
static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len, struct ath6kl_vif *vif) { struct wmi_bss_info_hdr2 *bih; u8 *buf; struct ieee80211_channel *channel; struct ath6kl *ar = wmi->parent_dev; struct cfg80211_bss *bss; if (len <= sizeof(struct wmi_bss_info_hdr2)) return -EINVAL;...
0
[ "CWE-125" ]
linux
5d6751eaff672ea77642e74e92e6c0ac7f9709ab
120,816,742,082,297,080,000,000,000,000,000,000,000
82
ath6kl: add some bounds checking The "ev->traffic_class" and "reply->ac" variables come from the network and they're used as an offset into the wmi->stream_exist_for_ac[] array. Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[] array only has WMM_NUM_AC (4) elements. We need to add a couple bo...
virDomainNetBandwidthUpdate(virDomainNetDefPtr iface, virNetDevBandwidthPtr newBandwidth) { virNetworkPtr net = NULL; virNetworkPortPtr port = NULL; virTypedParameterPtr params = NULL; int nparams = 0; virConnectPtr conn = NULL; int ret = -1; if (!(conn = virGetC...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
167,605,270,476,073,870,000,000,000,000,000,000,000
33
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
START_TEST(boolean_prop_parser) { struct parser_test_range { char *tag; bool success; bool b; } tests[] = { { "0", true, false }, { "1", true, true }, { "-1", false, false }, { "2", false, false }, { "abcd", false, false }, { NULL, false, false } }; int i; bool success, b; for (i = 0; tests[i]....
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
129,274,479,274,048,890,000,000,000,000,000,000,000
30
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
TEST(BasicFlatBufferModel, TestWithTrueVerifier) { FakeVerifier verifier(true); ASSERT_TRUE(FlatBufferModel::VerifyAndBuildFromFile( "tensorflow/lite/testdata/test_model.bin", &verifier)); }
0
[ "CWE-20", "CWE-787" ]
tensorflow
d58c96946b2880991d63d1dacacb32f0a4dfa453
266,566,655,649,096,500,000,000,000,000,000,000,000
5
[tflite] Ensure inputs and outputs don't overlap. If a model uses the same tensor for both an input and an output then this can result in data loss and memory corruption. This should not happen. PiperOrigin-RevId: 332522916 Change-Id: If0905b142415a9dfceaf2d181872f2a8fb88f48a
void* CurvesDup(cmsContext ContextID, const void* ptr) { Curves16Data* Data = _cmsDupMem(ContextID, ptr, sizeof(Curves16Data)); int i; if (Data == NULL) return NULL; Data ->Curves = _cmsDupMem(ContextID, Data ->Curves, Data ->nCurves * sizeof(cmsUInt16Number*)); for (i=0; i < Data -> nCurves; i++...
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
231,637,977,847,618,680,000,000,000,000,000,000,000
15
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
void Http2Session::ClearOutgoing(int status) { CHECK(is_sending()); set_sending(false); if (!outgoing_buffers_.empty()) { outgoing_storage_.clear(); outgoing_length_ = 0; std::vector<NgHttp2StreamWrite> current_outgoing_buffers_; current_outgoing_buffers_.swap(outgoing_buffers_); for (const...
0
[ "CWE-416" ]
node
a3c33d4ce78f74d1cf1765704af5b427aa3840a6
150,072,415,448,595,260,000,000,000,000,000,000,000
37
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 void scsi_disk_unit_attention_reported(SCSIDevice *dev) { SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, dev); if (s->media_changed) { s->media_changed = false; scsi_device_set_ua(&s->qdev, SENSE_CODE(MEDIUM_CHANGED)); } }
0
[ "CWE-193" ]
qemu
b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8
8,549,735,855,824,555,000,000,000,000,000,000,000
8
hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands This avoids an off-by-one read of 'mode_sense_valid' buffer in hw/scsi/scsi-disk.c:mode_sense_page(). Fixes: CVE-2021-3930 Cc: qemu-stable@nongnu.org Reported-by: Alexander Bulekov <alxndr@bu.edu> Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pa...
static int ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *varptr; if (opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) { /* Had function_ptr at compile_time */ if (!(opline->extended_value & ZEND_ARG_SEND_BY_REF)) { ...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
505,808,458,055,263,300,000,000,000,000,000,000
49
- 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
void Gfx::opSetFillRGBColor(Object args[], int numArgs) { GfxColor color; int i; if (textHaveCSPattern && drawText) { GBool needFill = out->deviceHasTextClip(state); out->endTextObject(state); if (needFill) { doPatternFill(gTrue); } out->restoreState(state); } state->setFillPattern(...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
219,782,237,108,382,560,000,000,000,000,000,000,000
28
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) { struct ccp_aes_engine *aes = &cmd->u.aes; struct ccp_dm_workarea key, ctx, final_wa, tag; struct ccp_data src, dst; struct ccp_data aad; struct ccp_op op; unsigned long long *final; unsigned int dm_offset; unsigned int authsize; unsigned ...
0
[ "CWE-400", "CWE-401" ]
linux
128c66429247add5128c03dc1e144ca56f05a4e2
36,585,862,364,995,920,000,000,000,000,000,000,000
281
crypto: ccp - Release all allocated memory if sha type is invalid Release all allocated memory if sha type is invalid: In ccp_run_sha_cmd, if the type of sha is invalid, the allocated hmac_buf should be released. v2: fix the goto. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Acked-by: Gary R Hook <gary...
static int enable_special_signals(Manager *m) { _cleanup_close_ int fd = -1; assert(m); /* Enable that we get SIGINT on control-alt-del. In containers * this will fail with EPERM (older) or EINVAL (newer), so * ignore that. */ if (reboot(RB_DISABLE_CAD) < 0 && errno !...
0
[]
systemd
5ba6985b6c8ef85a8bcfeb1b65239c863436e75b
233,782,638,517,051,900,000,000,000,000,000,000,000
24
core: allow PIDs to be watched by two units at the same time In some cases it is interesting to map a PID to two units at the same time. For example, when a user logs in via a getty, which is reexeced to /sbin/login that binary will be explicitly referenced as main pid of the getty service, as well as implicitly refer...
void stub_complete(struct urb *urb) { struct stub_priv *priv = (struct stub_priv *) urb->context; struct stub_device *sdev = priv->sdev; unsigned long flags; usbip_dbg_stub_tx("complete! status %d\n", urb->status); switch (urb->status) { case 0: /* OK */ break; case -ENOENT: dev_info(&urb->dev->dev, ...
0
[ "CWE-476" ]
linux
be6123df1ea8f01ee2f896a16c2b7be3e4557a5a
266,514,274,547,409,820,000,000,000,000,000,000,000
50
usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer stub_send_ret_submit() handles urb with a potential null transfer_buffer, when it replays a packet with potential malicious data that could contain a null buffer. Add a check for the condition when actual_length > 0 and transfer_buffer is null. R...
_kdc_find_etype(krb5_context context, krb5_boolean use_strongest_session_key, krb5_boolean is_preauth, hdb_entry_ex *princ, krb5_enctype *etypes, unsigned len, krb5_enctype *ret_enctype, Key **ret_key) { krb5_error_code ret; krb5_salt def_salt; krb5_enctype enctype = (krb5_enctype)ETYPE_NULL; cons...
0
[ "CWE-476" ]
heimdal
1a6a6e462dc2ac6111f9e02c6852ddec4849b887
243,824,192,867,710,100,000,000,000,000,000,000,000
121
Security: Avoid NULL structure pointer member dereference This can happen in the error path when processing malformed AS requests with a NULL client name. Bug originally introduced on Fri Feb 13 09:26:01 2015 +0100 in commit: a873e21d7c06f22943a90a41dc733ae76799390d kdc: base _kdc_fast_mk_error() on krb5_mk...
_gnutls_session_cert_type_supported(gnutls_session_t session, gnutls_certificate_type_t cert_type) { unsigned i; unsigned cert_found = 0; gnutls_certificate_credentials_t cred; if (session->security_parameters.entity == GNUTLS_SERVER) { cred = (gnutls_certificate_credentials_t) _gnutls_get_cred(ses...
0
[ "CWE-400" ]
gnutls
1ffb827e45721ef56982d0ffd5c5de52376c428e
23,509,021,945,285,600,000,000,000,000,000,000,000
45
handshake: set a maximum number of warning messages that can be received per handshake That is to avoid DoS due to the assymetry of cost of sending an alert vs the cost of processing.
load_pack_plugin(char_u *fname) { static char *plugpat = "%s/plugin/**/*.vim"; static char *ftpat = "%s/ftdetect/*.vim"; int len; char_u *ffname = fix_fname(fname); char_u *pat = NULL; int retval = FAIL; if (ffname == NULL) return FAIL; len = (int)STRLEN(ffname) + (int)STRLEN(ftpat);...
0
[ "CWE-122" ]
vim
2bdad6126778f907c0b98002bfebf0e611a3f5db
161,620,723,443,032,040,000,000,000,000,000,000,000
39
patch 8.2.4647: "source" can read past end of copied line Problem: "source" can read past end of copied line. Solution: Add a terminating NUL.
static inline void set_numabalancing_state(bool enabled) { }
0
[ "CWE-416" ]
linux
16d51a590a8ce3befb1308e0e7ab77f3b661af33
161,241,331,334,682,780,000,000,000,000,000,000,000
3
sched/fair: Don't free p->numa_faults with concurrent readers When going through execve(), zero out the NUMA fault statistics instead of freeing them. During execve, the task is reachable through procfs and the scheduler. A concurrent /proc/*/sched reader can read data from a freed ->numa_faults allocation (confirmed...
static inline struct virtio_net_hdr_mrg_rxbuf *skb_vnet_hdr(struct sk_buff *skb) { return (struct virtio_net_hdr_mrg_rxbuf *)skb->cb; }
0
[ "CWE-119", "CWE-787" ]
linux
48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39
87,937,127,869,425,750,000,000,000,000,000,000,000
4
virtio-net: drop NETIF_F_FRAGLIST virtio declares support for NETIF_F_FRAGLIST, but assumes that there are at most MAX_SKB_FRAGS + 2 fragments which isn't always true with a fraglist. A longer fraglist in the skb will make the call to skb_to_sgvec overflow the sg array, leading to memory corruption. Drop NETIF_F_FRA...
s32 gf_media_hevc_read_sps(char *data, u32 size, HEVCState *hevc) { return gf_media_hevc_read_sps_ex(data, size, hevc, NULL); }
0
[ "CWE-119", "CWE-787" ]
gpac
90dc7f853d31b0a4e9441cba97feccf36d8b69a4
62,311,741,273,772,060,000,000,000,000,000,000,000
4
fix some exploitable overflows (#994, #997)
_outConstraint(StringInfo str, const Constraint *node) { WRITE_NODE_TYPE("CONSTRAINT"); WRITE_STRING_FIELD(conname); WRITE_BOOL_FIELD(deferrable); WRITE_BOOL_FIELD(initdeferred); WRITE_LOCATION_FIELD(location); appendStringInfoString(str, " :contype "); switch (node->contype) { case CONSTR_NULL: appendSt...
1
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
243,501,813,149,743,000,000,000,000,000,000,000,000
96
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...
format_MULTIPATH(const struct ofpact_multipath *a, struct ds *s) { multipath_format(a, s); }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
67,916,082,195,056,010,000,000,000,000,000,000,000
4
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
bool close() override { bool noError = true; if (!eof()) { if (zip_fclose(m_zipFile) != 0) { noError = false; } m_zipFile = nullptr; } return noError; }
0
[ "CWE-22" ]
hhvm
65c95a01541dd2fbc9c978ac53bed235b5376686
191,370,751,031,515,500,000,000,000,000,000,000,000
10
ZipArchive::extractTo bug 70350 Summary:Don't allow upward directory traversal when extracting zip archive files. Files in zip files with `..` or starting at main root `/` should be normalized to something where the file being extracted winds up within the directory or a subdirectory where the actual extraction is ta...
coolkey_get_attribute_lv(sc_card_t *card, sc_cardctl_coolkey_object_t *obj, CK_ATTRIBUTE_TYPE type, void *ptr) { struct sc_pkcs15_data *item = (struct sc_pkcs15_data *)ptr; return coolkey_get_attribute_bytes_alloc(card, obj, type, &item->data, &item->data_len); }
0
[]
OpenSC
7114fb71b54ddfe06ce5dfdab013f4c38f129d14
282,837,270,839,568,970,000,000,000,000,000,000,000
5
coolkey: Initialize potentially uninitialized memory Thanks oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28855
_outSetToDefault(StringInfo str, const SetToDefault *node) { WRITE_NODE_TYPE("SETTODEFAULT"); WRITE_OID_FIELD(typeId); WRITE_INT_FIELD(typeMod); WRITE_OID_FIELD(collation); WRITE_LOCATION_FIELD(location); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
215,161,877,320,286,300,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...
longlong val_int() { return has_value() ? Datetime(this).to_longlong() : 0; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
1,724,750,397,387,622,400,000,000,000,000,000,000
4
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
static void ProcessRadioRxError( void ) { HandleRadioRxErrorTimeout( LORAMAC_EVENT_INFO_STATUS_RX1_ERROR, LORAMAC_EVENT_INFO_STATUS_RX2_ERROR ); }
0
[ "CWE-120", "CWE-787" ]
LoRaMac-node
e3063a91daa7ad8a687223efa63079f0c24568e4
253,682,789,188,885,630,000,000,000,000,000,000,000
4
Added received buffer size checks.
gst_rtsp_connection_set_tls_validation_flags (GstRTSPConnection * conn, GTlsCertificateFlags flags) { gboolean res = FALSE; g_return_val_if_fail (conn != NULL, FALSE); res = g_socket_client_get_tls (conn->client); if (res) g_socket_client_set_tls_validation_flags (conn->client, flags); return res; ...
0
[]
gst-plugins-base
f672277509705c4034bc92a141eefee4524d15aa
96,249,166,077,330,870,000,000,000,000,000,000,000
13
gstrtspconnection: Security loophole making heap overflow The former code allowed an attacker to create a heap overflow by sending a longer than allowed session id in a response and including a semicolon to change the maximum length. With this change, the parser will never go beyond 512 bytes.
static int dnxhd_write_header(AVCodecContext *avctx, uint8_t *buf) { DNXHDEncContext *ctx = avctx->priv_data; static const uint8_t header_prefix[5] = { 0x00,0x00,0x02,0x80,0x01 }; memset(buf, 0, 640); memcpy(buf, header_prefix, 5); buf[5] = ctx->interlaced ? ctx->cur_field+2 : 0x01; buf[6] = 0...
0
[ "CWE-703" ]
FFmpeg
f1caaa1c61310beba705957e6366f0392a0b005b
23,722,113,464,454,556,000,000,000,000,000,000,000
30
dnxhdenc: fix mb_rc size Fixes out of array access with RC_VARIANCE set to 0 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static void free_bprm(struct linux_binprm *bprm) { free_arg_pages(bprm); if (bprm->cred) { if (bprm->called_exec_mmap) mutex_unlock(&current->signal->exec_update_mutex); mutex_unlock(&current->signal->cred_guard_mutex); abort_creds(bprm->cred); } if (bprm->file) { allow_write_access(bprm->file); fput(b...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
331,339,046,149,069,050,000,000,000,000,000,000,000
18
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
JVM_ENTRY(jint, MHN_getMembers(JNIEnv *env, jobject igcls, jclass clazz_jh, jstring name_jh, jstring sig_jh, int mflags, jclass caller_jh, jint skip, jobjectArray results_jh)) { if (clazz_jh == NULL || results_jh == NULL) return -1; KlassHandle k(THREAD...
0
[]
jdk8u
f14e35d20e1a4d0f507f05838844152f2242c6d3
194,788,589,625,011,120,000,000,000,000,000,000,000
37
8281866: Enhance MethodHandle invocations Reviewed-by: andrew Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val) { int error = 0; char if_file[128]; FILE *file; char cmd[512]; char *mac_addr; /* * Set the configuration for the specified interface with * the information provided. Since there is no standard * way to configure an interface, w...
0
[]
char-misc
95a69adab9acfc3981c504737a2b6578e4d846ef
27,985,113,911,485,165,000,000,000,000,000,000,000
133
tools: hv: Netlink source address validation allows DoS The source code without this patch caused hypervkvpd to exit when it processed a spoofed Netlink packet which has been sent from an untrusted local user. Now Netlink messages with a non-zero nl_pid source address are ignored and a warning is printed into the sysl...
static void vmxnet3_update_rx_mode(VMXNET3State *s) { PCIDevice *d = PCI_DEVICE(s); s->rx_mode = VMXNET3_READ_DRV_SHARED32(d, s->drv_shmem, devRead.rxFilterConf.rxMode); VMW_CFPRN("RX mode: 0x%08X", s->rx_mode); }
0
[ "CWE-416" ]
qemu
6c352ca9b4ee3e1e286ea9e8434bd8e69ac7d0d8
78,660,655,178,880,630,000,000,000,000,000,000,000
8
net: vmxnet3: check for device_active before write Vmxnet3 device emulator does not check if the device is active, before using it for write. It leads to a use after free issue, if the vmxnet3_io_bar0_write routine is called after the device is deactivated. Add check to avoid it. Reported-by: Li Qiang <liqiang6-s@360...
RGWOpType get_type() override { return RGW_OP_LIST_BUCKET; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
275,742,298,389,940,900,000,000,000,000,000,000,000
1
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 <...
struct fuse_req *fuse_request_alloc_nofs(unsigned npages) { return __fuse_request_alloc(npages, GFP_NOFS); }
0
[ "CWE-416" ]
linux
15fab63e1e57be9fdb5eec1bbc5916e9825e9acb
313,191,800,030,856,220,000,000,000,000,000,000,000
4
fs: prevent page refcount overflow in pipe_buf_get Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All callers converted to handle a failure. Reported-by:...
static int floppy_revalidate(struct gendisk *disk) { int drive = (long)disk->private_data; int cf; int res = 0; if (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags) || test_bit(FD_VERIFY_BIT, &UDRS->flags) || test_bit(drive, &fake_change) || drive_no_geom(drive)) { if (WARN(atomic_read(&usage_count) ==...
0
[ "CWE-190", "CWE-125" ]
linux
da99466ac243f15fbba65bd261bfc75ffa1532b6
182,622,421,320,448,420,000,000,000,000,000,000,000
43
floppy: fix out-of-bounds read in copy_buffer This fixes a global out-of-bounds read access in the copy_buffer function of the floppy driver. The FDDEFPRM ioctl allows one to set the geometry of a disk. The sect and head fields (unsigned int) of the floppy_drive structure are used to compute the max_sector (int) in ...
static noinline int add_pending_csums(struct btrfs_trans_handle *trans, struct inode *inode, u64 file_offset, struct list_head *list) { struct btrfs_ordered_sum *sum; list_for_each_entry(sum, list, list) { trans->adding_csums = 1; btrfs_csum_file_blocks(trans, BTRFS_I(inode)->root->fs_in...
0
[ "CWE-200" ]
linux
0305cd5f7fca85dae392b9ba85b116896eb7c1c7
199,987,549,278,474,570,000,000,000,000,000,000,000
14
Btrfs: fix truncation of compressed and inlined extents When truncating a file to a smaller size which consists of an inline extent that is compressed, we did not discard (or made unusable) the data between the new file size and the old file size, wasting metadata space and allowing for the truncated data to be leaked...
u32 parse_fps(char *arg_val, u32 opt) { u32 ticks, dts_inc; if (!strcmp(arg_val, "auto")) { M4_LOG(GF_LOG_WARNING, ("Warning, fps=auto option is deprecated\n")); } else if ((sscanf(arg_val, "%u-%u", &ticks, &dts_inc)==2) || (sscanf(arg_val, "%u/%u", &ticks, &dts_inc)==2) ) { if (!dts_inc) dts_inc = 1; import...
0
[ "CWE-787" ]
gpac
4e56ad72ac1afb4e049a10f2d99e7512d7141f9d
245,417,735,677,655,400,000,000,000,000,000,000,000
15
fixed #2216
int CephxServiceHandler::handle_request(bufferlist::iterator& indata, bufferlist& result_bl, uint64_t& global_id, AuthCapsInfo& caps, uint64_t *auid) { int ret = 0; struct CephXRequestHeader cephx_header; ::decode(cephx_header, indata); switch (cephx_header.request_type) { case CEPHX_GET_AUTH_SESSION_KEY: ...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
226,626,194,215,215,350,000,000,000,000,000,000,000
173
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 ...
void Server::msgVersion(ServerUser *uSource, MumbleProto::Version &msg) { if (msg.has_version()) uSource->uiVersion=msg.version(); if (msg.has_release()) uSource->qsRelease = u8(msg.release()); if (msg.has_os()) { uSource->qsOS = u8(msg.os()); if (msg.has_os_version()) uSource->qsOSVersion = u8(msg.os_ver...
0
[ "CWE-20" ]
mumble
6b33dda344f89e5a039b7d79eb43925040654242
7,738,514,003,033,534,000,000,000,000,000,000,000
12
Don't crash on long usernames
static void tcp_update_scoreboard(struct sock *sk, int fast_rexmit) { struct tcp_sock *tp = tcp_sk(sk); if (tcp_is_sack(tp)) { int sacked_upto = tp->sacked_out - tp->reordering; if (sacked_upto >= 0) tcp_mark_head_lost(sk, sacked_upto, 0); else if (fast_rexmit) tcp_mark_head_lost(sk, 1, 1); } }
0
[ "CWE-190" ]
net
3b4929f65b0d8249f19a50245cd88ed1a2f78cff
340,071,259,047,148,360,000,000,000,000,000,000,000
12
tcp: limit payload size of sacked skbs Jonathan Looney reported that TCP can trigger the following crash in tcp_shifted_skb() : BUG_ON(tcp_skb_pcount(skb) < pcount); This can happen if the remote peer has advertized the smallest MSS that linux TCP accepts : 48 An skb can hold 17 fragments, and each fragment can ho...
bld_barrier( short **bar , int x ) { int i , j; short t; short *p; short *b; short *dat = barrier_dat + 1; p = *bar++ + x + 1; for ( i = 0 ; i < 11 ; i++ ) { t = *dat++; if (*p < t ) *p = t; ...
0
[ "CWE-120" ]
ghostpdl
849e74e5ab450dd581942192da7101e0664fa5af
160,064,462,592,966,280,000,000,000,000,000,000,000
37
Bug 701799: avoid out-of-range array access in mj_color_correct(). Code is obscure, so this fix merely avoids out-of-range access in the simplest way possible, without understanding what the code is trying to do. Fixes: ./sanbin/gs -sOutputFile=tmp -sDEVICE=mj6000c ../bug-701799.pdf
static int FNAME(walk_addr)(struct guest_walker *walker, struct kvm_vcpu *vcpu, gpa_t addr, u64 access) { return FNAME(walk_addr_generic)(walker, vcpu, vcpu->arch.mmu, addr, access); }
0
[ "CWE-416" ]
linux
2a8859f373b0a86f0ece8ec8312607eacf12485d
309,048,555,575,602,100,000,000,000,000,000,000,000
6
KVM: x86/mmu: do compare-and-exchange of gPTE via the user address FNAME(cmpxchg_gpte) is an inefficient mess. It is at least decent if it can go through get_user_pages_fast(), but if it cannot then it tries to use memremap(); that is not just terribly slow, it is also wrong because it assumes that the VM_PFNMAP VMA ...
GF_Err tfxd_box_read(GF_Box *s, GF_BitStream *bs) { GF_MSSTimeExtBox *ptr = (GF_MSSTimeExtBox *)s; ISOM_DECREASE_SIZE(ptr, 4); ptr->version = gf_bs_read_u8(bs); ptr->flags = gf_bs_read_u24(bs); if (ptr->version == 0x01) { ISOM_DECREASE_SIZE(ptr, 16); ptr->absolute_time_in_track_timescale = gf_bs_read_u64(bs);...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
331,331,214,760,618,400,000,000,000,000,000,000,000
19
fixed #1587
const char *btd_adapter_get_name(struct btd_adapter *adapter) { if (adapter->stored_alias) return adapter->stored_alias; if (adapter->system_name) return adapter->system_name; return NULL; }
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
211,894,720,214,066,950,000,000,000,000,000,000,000
10
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
ssize_t afpinfo_pack(const AfpInfo *ai, char *buf) { memset(buf, 0, AFP_INFO_SIZE); RSIVAL(buf, 0, ai->afpi_Signature); RSIVAL(buf, 4, ai->afpi_Version); RSIVAL(buf, 12, ai->afpi_BackupTime); memcpy(buf + 16, ai->afpi_FinderInfo, sizeof(ai->afpi_FinderInfo)); return AFP_INFO_SIZE; }
0
[ "CWE-787" ]
samba
0e2b3fb982d1f53d111e10d9197ed2ec2e13712c
145,106,259,876,793,800,000,000,000,000,000,000,000
11
CVE-2021-44142: libadouble: harden parsing code BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>