func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
Method* InstanceKlass::method_at_itable(Klass* holder, int index, TRAPS) { itableOffsetEntry* ioe = (itableOffsetEntry*)start_of_itable(); int method_table_offset_in_words = ioe->offset()/wordSize; int nof_interfaces = (method_table_offset_in_words - itable_offset_in_words()) / itableOffset...
0
[]
jdk11u-dev
41825fa33d605f8501164f9296572e4378e8183b
126,632,648,180,888,170,000,000,000,000,000,000,000
34
8270386: Better verification of scan methods Reviewed-by: mbaesken Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
static void bits2int(uECC_word_t *native, const uint8_t *bits, unsigned bits_size, uECC_Curve curve) { unsigned num_n_bytes = BITS_TO_BYTES(curve->num_n_bits); unsigned num_n_words = BITS_TO_WORDS(curve->num_n_bits); int shift; uECC_word_t c...
0
[ "CWE-415" ]
micro-ecc
1b5f5cea5145c96dd8791b9b2c41424fc74c2172
234,540,152,802,411,500,000,000,000,000,000,000,000
37
Fix for #168
write_server (assuan_fd_t sock, const char *data, size_t length) { int nleft; int nwritten; nleft = length; while (nleft > 0) { #if defined(HAVE_W32_SYSTEM) # if defined(USE_NPTH) npth_unprotect (); # endif nwritten = send (FD2INT (sock), data, nleft, 0); # if defined(USE_NPTH) npth_prote...
0
[ "CWE-352" ]
gnupg
4a4bb874f63741026bd26264c43bb32b1099f060
129,287,205,097,774,900,000,000,000,000,000,000,000
50
dirmngr: Avoid possible CSRF attacks via http redirects. * dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path. (http_redir_info_t): New. * dirmngr/http.c (do_parse_uri): Set new fields. (same_host_p): New. (http_prepare_redirect): New. * dirmngr/t-http-basic.c: New test. * dirmngr/ks-engine-hkp.c (send_re...
static int megasas_mgmt_ioctl_aen(struct file *file, unsigned long arg) { struct megasas_instance *instance; struct megasas_aen aen; int error; if (file->private_data != file) { printk(KERN_DEBUG "megasas: fasync_helper was not " "called first\n"); return -EINVAL; } if (copy_from_user(&aen, (void _...
0
[ "CWE-476" ]
linux
bcf3b67d16a4c8ffae0aa79de5853435e683945c
263,807,801,825,235,650,000,000,000,000,000,000,000
37
scsi: megaraid_sas: return error when create DMA pool failed when create DMA pool for cmd frames failed, we should return -ENOMEM, instead of 0. In some case in: megasas_init_adapter_fusion() -->megasas_alloc_cmds() -->megasas_create_frame_pool create DMA pool failed, --> megasas_fre...
static int mixer_ctl_feature_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct usb_mixer_elem_info *cval = kcontrol->private_data; int c, cnt, val, oval, err; int changed = 0; if (cval->cmask) { cnt = 0; for (c = 0; c < MAX_CHANNELS; c++) { if (!(cval->cmask & (1 << c))) ...
0
[ "CWE-416", "CWE-787" ]
linux
124751d5e63c823092060074bd0abaae61aaa9c4
281,241,091,129,065,500,000,000,000,000,000,000,000
37
ALSA: usb-audio: Kill stray URB at exiting USB-audio driver may leave a stray URB for the mixer interrupt when it exits by some error during probe. This leads to a use-after-free error as spotted by syzkaller like: ================================================================== BUG: KASAN: use-after-free in sn...
mkfmt (buf, prec, lng, sec, sec_fraction) char *buf; int prec, lng; time_t sec; int sec_fraction; { time_t min; char abuf[INT_STRLEN_BOUND(time_t) + 1]; int ind, aind; ind = 0; abuf[sizeof(abuf) - 1] = '\0'; /* If LNG is non-zero, we want to decompose SEC into minutes and seconds. */ ...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
110,089,978,652,151,050,000,000,000,000,000,000,000
56
bash-4.4-rc2 release
getnextac( int c UNUSED, void *cookie, int indent UNUSED, getline_opt_T options UNUSED) { AutoPatCmd_T *acp = (AutoPatCmd_T *)cookie; char_u *retval; AutoCmd *ac; // Can be called again after returning the last line. if (acp->curpat == NULL) return NULL; // repeat until we find...
0
[ "CWE-122", "CWE-787" ]
vim
5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089
320,929,935,078,105,430,000,000,000,000,000,000,000
60
patch 9.0.0061: ml_get error with nested autocommand Problem: ml_get error with nested autocommand. Solution: Also check line numbers for a nested autocommand. (closes #10761)
void ConnectionImpl::StreamImpl::onMetadataDecoded(MetadataMapPtr&& metadata_map_ptr) { decoder().decodeMetadata(std::move(metadata_map_ptr)); }
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
87,124,977,191,501,850,000,000,000,000,000,000,000
3
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
int mnt_fs_streq_target(struct libmnt_fs *fs, const char *path) { return fs && streq_paths(mnt_fs_get_target(fs), path); }
0
[ "CWE-552", "CWE-703" ]
util-linux
166e87368ae88bf31112a30e078cceae637f4cdb
208,938,258,720,774,940,000,000,000,000,000,000,000
4
libmount: remove support for deleted mount table entries The "(deleted)" suffix has been originally used by kernel for deleted mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3 (Dec 2014) kernel does not use this suffix for mount stuff in /proc at all. Let's remove this support from libmount to...
ff_layout_free_deviceid_node(struct nfs4_deviceid_node *d) { nfs4_ff_layout_free_deviceid(container_of(d, struct nfs4_ff_layout_ds, id_node)); }
0
[ "CWE-787" ]
linux
ed34695e15aba74f45247f1ee2cf7e09d449f925
280,998,608,349,507,320,000,000,000,000,000,000,000
5
pNFS/flexfiles: fix incorrect size check in decode_nfs_fh() We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym bazalii) observed the check: if (fh->size > sizeof(struct nfs_fh)) should not use the size of the nfs_fh struct which includes an extra two bytes from the size field. struct nfs_fh { unsi...
TEST_F(HttpHealthCheckerImplTest, UnhealthyTransitionNoTrafficHealthy) { setupNoTrafficHealthyValidationHC(); cluster_->prioritySet().getMockHostSet(0)->hosts_ = { makeTestHost(cluster_->info_, "tcp://127.0.0.1:80", simTime())}; cluster_->prioritySet().getMockHostSet(0)->hosts_[0]->healthFlagSet( Host...
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
314,400,451,070,763,860,000,000,000,000,000,000,000
20
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
strcat_capa(UChar* dest, UChar* dest_end, const UChar* src, const UChar* src_end, size_t capa) { UChar* r; if (dest) r = (UChar* )xrealloc(dest, capa + 1); else r = (UChar* )xmalloc(capa + 1); CHECK_NULL_RETURN(r); onig_strcpy(r + (dest_end - dest), src, src_end); return r; }
0
[ "CWE-476" ]
Onigmo
00cc7e28a3ed54b3b512ef3b58ea737a57acf1f9
39,096,854,946,321,766,000,000,000,000,000,000,000
14
Fix SEGV in onig_error_code_to_str() (Fix #132) When onig_new(ONIG_SYNTAX_PERL) fails with ONIGERR_INVALID_GROUP_NAME, onig_error_code_to_str() crashes. onig_scan_env_set_error_string() should have been used when returning ONIGERR_INVALID_GROUP_NAME.
int set_online_page_callback(online_page_callback_t callback) { int rc = -EINVAL; lock_memory_hotplug(); if (online_page_callback == generic_online_page) { online_page_callback = callback; rc = 0; } unlock_memory_hotplug(); return rc; }
0
[]
linux-2.6
08dff7b7d629807dbb1f398c68dd9cd58dd657a1
213,385,790,992,484,700,000,000,000,000,000,000,000
15
mm/hotplug: correctly add new zone to all other nodes' zone lists When online_pages() is called to add new memory to an empty zone, it rebuilds all zone lists by calling build_all_zonelists(). But there's a bug which prevents the new zone to be added to other nodes' zone lists. online_pages() { build_all_zonelists(...
TPMI_AES_KEY_BITS_Unmarshal(TPMI_AES_KEY_BITS *target, BYTE **buffer, INT32 *size) { TPM_RC rc = TPM_RC_SUCCESS; if (rc == TPM_RC_SUCCESS) { rc = TPM_KEY_BITS_Unmarshal(target, buffer, size); } if (rc == TPM_RC_SUCCESS) { switch (*target) { case 128: case 256: break; default: rc ...
1
[ "CWE-787" ]
libtpms
5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b
234,742,928,781,614,870,000,000,000,000,000,000,000
18
tpm2: Restore original value if unmarshalled value was illegal Restore the original value of the memory location where data from a stream was unmarshalled and the unmarshalled value was found to be illegal. The goal is to not keep illegal values in memory. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
void Commissioner::AddCoapResources(void) { Get<Coap::Coap>().AddResource(mRelayReceive); Get<Coap::Coap>().AddResource(mDatasetChanged); Get<Coap::CoapSecure>().AddResource(mJoinerFinalize); }
0
[ "CWE-787" ]
openthread
c3a3a0c424322009fec3ab735fb20ce8f6e19e70
67,752,899,663,519,840,000,000,000,000,000,000,000
6
[commissioner] use strnlen instead of strlen (#4404)
static void io_cqring_fill_event(struct io_kiocb *req, long res) { struct io_ring_ctx *ctx = req->ctx; struct io_uring_cqe *cqe; trace_io_uring_complete(ctx, req->user_data, res); /* * If we can't get a cq entry, userspace overflowed the * submission (by quite a lot). Increment the overflow count in * the r...
0
[]
linux
ff002b30181d30cdfbca316dadd099c3ca0d739c
110,595,632,872,565,800,000,000,000,000,000,000,000
30
io_uring: grab ->fs as part of async preparation This passes it in to io-wq, so it assumes the right fs_struct when executing async work that may need to do lookups. Cc: stable@vger.kernel.org # 5.3+ Signed-off-by: Jens Axboe <axboe@kernel.dk>
static int ext3_remount (struct super_block * sb, int * flags, char * data) { struct ext3_super_block * es; struct ext3_sb_info *sbi = EXT3_SB(sb); ext3_fsblk_t n_blocks_count = 0; unsigned long old_sb_flags; struct ext3_mount_options old_opts; int enable_quota = 0; int err; #ifdef CONFIG_QUOTA int i; #endif ...
0
[ "CWE-20" ]
linux
8d0c2d10dd72c5292eda7a06231056a4c972e4cc
300,829,806,349,055,370,000,000,000,000,000,000,000
146
ext3: Fix format string issues ext3_msg() takes the printk prefix as the second parameter and the format string as the third parameter. Two callers of ext3_msg omit the prefix and pass the format string as the second parameter and the first parameter to the format string as the third parameter. In both cases this stri...
bool Binary::has_function_starts() const { return has_command<FunctionStarts>(); }
0
[ "CWE-703" ]
LIEF
7acf0bc4224081d4f425fcc8b2e361b95291d878
119,187,051,886,522,910,000,000,000,000,000,000,000
3
Resolve #764
__u32 ext4_free_blks_count(struct super_block *sb, struct ext4_group_desc *bg) { return le16_to_cpu(bg->bg_free_blocks_count_lo) | (EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT ? (__u32)le16_to_cpu(bg->bg_free_blocks_count_hi) << 16 : 0); }
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
324,058,259,058,387,600,000,000,000,000,000,000,000
7
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt, u16 tss_selector, int reason, bool has_error_code, u32 error_code) { struct x86_emulate_ops *ops = ctxt->ops; struct desc_struct curr_tss_desc, next_tss_desc; int ret; u16 old_tss_sel = get_segment_selector(ctxt, VCPU_SREG_TR); ulong o...
0
[]
kvm
e28ba7bb020f07193bc000453c8775e9d2c0dda7
37,866,102,382,968,054,000,000,000,000,000,000,000
79
KVM: x86: fix missing checks in syscall emulation On hosts without this patch, 32bit guests will crash (and 64bit guests may behave in a wrong way) for example by simply executing following nasm-demo-application: [bits 32] global _start SECTION .text _start: syscall (I tested it with winxp and linux ...
SYSCALL_DEFINE0(setsid) { struct task_struct *group_leader = current->group_leader; struct pid *sid = task_pid(group_leader); pid_t session = pid_vnr(sid); int err = -EPERM; write_lock_irq(&tasklist_lock); /* Fail if I am already a session leader */ if (group_leader->signal->leader) goto out; /* Fail if a p...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
24,453,108,425,917,064,000,000,000,000,000,000,000
32
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
isspf(const dns_rdata_t *rdata) { char buf[1024]; const unsigned char *data = rdata->data; unsigned int rdl = rdata->length, i = 0, tl, len; while (rdl > 0U) { len = tl = *data; ++data; --rdl; INSIST(tl <= rdl); if (len > sizeof(buf) - i - 1) len = sizeof(buf) - i - 1; memmove(buf + i, data, len); ...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
72,849,359,734,964,260,000,000,000,000,000,000,000
26
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
logger_print_cb (const void *pointer, void *data, struct t_gui_buffer *buffer, time_t date, int tags_count, const char **tags, int displayed, int highlight, const char *prefix, const char *message) { struct t_logger_buffer *ptr_logger_buffer; s...
0
[ "CWE-119", "CWE-787" ]
weechat
f105c6f0b56fb5687b2d2aedf37cb1d1b434d556
91,340,629,313,331,600,000,000,000,000,000,000,000
48
logger: call strftime before replacing buffer local variables
static void mpol_rebind_nodemask(struct mempolicy *pol, const nodemask_t *nodes) { nodemask_t tmp; if (pol->flags & MPOL_F_STATIC_NODES) nodes_and(tmp, pol->w.user_nodemask, *nodes); else if (pol->flags & MPOL_F_RELATIVE_NODES) mpol_relative_nodemask(&tmp, &pol->w.user_nodemask, nodes); else { nodes_remap(tm...
0
[ "CWE-416" ]
linux
73223e4e2e3867ebf033a5a8eb2e5df0158ccc99
118,415,878,599,459,850,000,000,000,000,000,000,000
19
mm/mempolicy: fix use after free when calling get_mempolicy I hit a use after free issue when executing trinity and repoduced it with KASAN enabled. The related call trace is as follows. BUG: KASan: use after free in SyS_get_mempolicy+0x3c8/0x960 at addr ffff8801f582d766 Read of size 2 by task syz-executor1/798 ...
HttpTransact::does_client_request_permit_storing(CacheControlResult* c, HTTPHdr* h) { //////////////////////////////////////////////////////////////////////// // If aren't ignoring client's cache directives, meet client's wishes // //////////////////////////////////////////////////////////////////////// if (!c-...
0
[ "CWE-119" ]
trafficserver
8b5f0345dade6b2822d9b52c8ad12e63011a5c12
338,451,676,097,475,670,000,000,000,000,000,000,000
12
Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug
static int mbochs_mmap_dmabuf(struct dma_buf *buf, struct vm_area_struct *vma) { struct mbochs_dmabuf *dmabuf = buf->priv; struct device *dev = mdev_dev(dmabuf->mdev_state->mdev); dev_dbg(dev, "%s: %d\n", __func__, dmabuf->id); if ((vma->vm_flags & VM_SHARED) == 0) return -EINVAL; vma->vm_ops = &mbochs_dmabuf...
0
[ "CWE-200", "CWE-401" ]
linux
de5494af4815a4c9328536c72741229b7de88e7f
156,101,533,529,725,540,000,000,000,000,000,000,000
14
vfio/mbochs: Fix missing error unwind of mbochs_used_mbytes Convert mbochs to use an atomic scheme for this like mtty was changed into. The atomic fixes various race conditions with probing. Add the missing error unwind. Also add the missing kfree of mdev_state->pages. Fixes: 681c1615f891 ("vfio/mbochs: Convert to us...
static connection_struct *switch_message(uint8 type, struct smb_request *req, int size) { int flags; uint16 session_tag; connection_struct *conn = NULL; struct smbd_server_connection *sconn = smbd_server_conn; errno = 0; /* Make sure this is an SMB packet. smb_size contains NetBIOS header * so subtract 4 from...
0
[]
samba
25452a2268ac7013da28125f3df22085139af12d
110,490,894,057,105,170,000,000,000,000,000,000,000
142
s3: Fix a NULL pointer dereference Found by Laurent Gaffie <laurent.gaffie@gmail.com>. Thanks! Volker
check_permission (GVfsBackendAdmin *self, GVfsJob *job) { GVfsJobDBus *dbus_job = G_VFS_JOB_DBUS (job); GError *error = NULL; GDBusMethodInvocation *invocation; GDBusConnection *connection; GCredentials *credentials; pid_t pid; uid_t uid; PolkitSubject *subject; PolkitAuthorizationRe...
0
[]
gvfs
d7d362995aa0cb8905c8d5c2a2a4c305d2ffff80
51,396,368,528,298,780,000,000,000,000,000,000,000
64
admin: Use fsuid to ensure correct file ownership Files created over admin backend should be owned by root, but they are owned by the user itself. This is because the daemon drops the uid to make dbus connection work. Use fsuid and euid to fix this issue. Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/21
int avpriv_lock_avformat(void) { if (lockmgr_cb) { if ((*lockmgr_cb)(&avformat_mutex, AV_LOCK_OBTAIN)) return -1; } return 0; }
0
[ "CWE-703" ]
FFmpeg
e5c7229999182ad1cef13b9eca050dba7a5a08da
128,620,015,163,940,680,000,000,000,000,000,000,000
8
avcodec/utils: set AVFrame format unconditional Fixes inconsistency and out of array accesses Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
querytree(PG_FUNCTION_ARGS) { elog(ERROR, "querytree is no longer implemented"); PG_RETURN_NULL(); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
127,498,685,616,103,670,000,000,000,000,000,000,000
5
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...
static ssize_t ucma_notify(struct ucma_file *file, const char __user *inbuf, int in_len, int out_len) { struct rdma_ucm_notify cmd; struct ucma_context *ctx; int ret = -EINVAL; if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; ctx = ucma_get_ctx(file, cmd.id); if (IS_ERR(ctx)) return PTR_E...
0
[ "CWE-416" ]
linux
f5449e74802c1112dea984aec8af7a33c4516af1
150,713,962,480,207,620,000,000,000,000,000,000,000
22
RDMA/ucma: Rework ucma_migrate_id() to avoid races with destroy ucma_destroy_id() assumes that all things accessing the ctx will do so via the xarray. This assumption violated only in the case the FD is being closed, then the ctx is reached via the ctx_list. Normally this is OK since ucma_destroy_id() cannot run concu...
void DSA_set_default_method(const DSA_METHOD *meth) { default_DSA_method = meth; }
0
[ "CWE-327" ]
openssl
8abfe72e8c1de1b95f50aa0d9134803b4d00070f
77,158,572,827,008,310,000,000,000,000,000,000,000
4
Timing vulnerability in DSA signature generation (CVE-2018-0734). Avoid a timing attack that leaks information via a side channel that triggers when a BN is resized. Increasing the size of the BNs prior to doing anything with them suppresses the attack. Thanks due to Samuel Weiser for finding and locating this. Rev...
GF_Box *rely_box_new() { ISOM_DECL_BOX_ALLOC(GF_RelyHintBox, GF_ISOM_BOX_TYPE_RELY); return (GF_Box *)tmp; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
258,980,591,174,631,030,000,000,000,000,000,000,000
5
fixed #1587
Returns the quota set to the mailbox account mbox */ PHP_FUNCTION(imap_get_quotaroot) { zval *streamind; zend_string *mbox; pils *imap_le_struct; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rS", &streamind, &mbox) == FAILURE) { return; } if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "...
0
[ "CWE-88" ]
php-src
336d2086a9189006909ae06c7e95902d7d5ff77e
64,794,553,067,491,510,000,000,000,000,000,000,000
25
Disable rsh/ssh functionality in imap by default (bug #77153)
DecimalQuantity& DecimalQuantity::setToDecNum(const DecNum& decnum, UErrorCode& status) { setBcdToZero(); flags = 0; _setToDecNum(decnum, status); return *this; }
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
309,652,951,828,805,570,000,000,000,000,000,000,000
7
ICU-20246 Fixing another integer overflow in number parsing.
void cgroup1_check_for_release(struct cgroup *cgrp) { if (notify_on_release(cgrp) && !cgroup_is_populated(cgrp) && !css_has_online_children(&cgrp->self) && !cgroup_is_dead(cgrp)) schedule_work(&cgrp->release_agent_work); }
0
[ "CWE-416" ]
linux
3b0462726e7ef281c35a7a4ae33e93ee2bc9975b
139,227,966,355,416,500,000,000,000,000,000,000,000
6
cgroup: verify that source is a string The following sequence can be used to trigger a UAF: int fscontext_fd = fsopen("cgroup"); int fd_null = open("/dev/null, O_RDONLY); int fsconfig(fscontext_fd, FSCONFIG_SET_FD, "source", fd_null); close_range(3, ~0U, 0); The cgroup v1 specific fs parser expects a...
static ssize_t qemu_net_queue_deliver(NetQueue *queue, NetClientState *sender, unsigned flags, const uint8_t *data, size_t size) { ssize_t ret = -1; struct iove...
0
[ "CWE-835" ]
qemu
705df5466c98f3efdd2b68d3b31dad86858acad7
319,674,013,131,197,350,000,000,000,000,000,000,000
18
net: introduce qemu_receive_packet() Some NIC supports loopback mode and this is done by calling nc->info->receive() directly which in fact suppresses the effort of reentrancy check that is done in qemu_net_queue_send(). Unfortunately we can't use qemu_net_queue_send() here since for loopback there's no sender as pee...
TEST_F(QuicServerTransportTest, RecvStopSendingFrameAfterCloseStream) { server->getNonConstConn().ackStates.appDataAckState.nextPacketNum = 3; std::array<std::string, 4> words = { "Hey Bob, this is Alice, for real.", "What message did I send you last time?", "You don't sound like Alice", "Yo...
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
135,517,131,664,738,490,000,000,000,000,000,000,000
44
Close connection if we derive an extra 1-rtt write cipher Summary: Fixes CVE-2021-24029 Reviewed By: mjoras, lnicco Differential Revision: D26613890 fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945
static int hw_atl_fw1x_deinit(struct aq_hw_s *self) { hw_atl_utils_mpi_set_speed(self, 0); hw_atl_utils_mpi_set_state(self, MPI_DEINIT); return 0; }
0
[ "CWE-787" ]
net
b922f622592af76b57cbc566eaeccda0b31a3496
275,788,196,014,177,240,000,000,000,000,000,000,000
7
atlantic: Fix OOB read and write in hw_atl_utils_fw_rpc_wait This bug report shows up when running our research tools. The reports is SOOB read, but it seems SOOB write is also possible a few lines below. In details, fw.len and sw.len are inputs coming from io. A len over the size of self->rpc triggers SOOB. The patc...
nv04_sgdma_unbind(struct ttm_tt *ttm) { struct nouveau_sgdma_be *nvbe = (struct nouveau_sgdma_be *)ttm; nouveau_mem_fini(nvbe->mem); }
0
[]
linux
5de5b6ecf97a021f29403aa272cb4e03318ef586
213,022,265,646,688,140,000,000,000,000,000,000,000
5
drm/ttm/nouveau: don't call tt destroy callback on alloc failure. This is confusing, and from my reading of all the drivers only nouveau got this right. Just make the API act under driver control of it's own allocation failing, and don't call destroy, if the page table fails to create there is nothing to cleanup here...
static int parse_video_info(AVIOContext *pb, AVStream *st) { uint16_t size_asf; // ASF-specific Format Data size uint32_t size_bmp; // BMP_HEADER-specific Format Data size unsigned int tag; st->codecpar->width = avio_rl32(pb); st->codecpar->height = avio_rl32(pb); avio_skip(pb, 1); // skip res...
1
[ "CWE-119", "CWE-787" ]
FFmpeg
2b46ebdbff1d8dec7a3d8ea280a612b91a582869
38,893,750,590,947,266,000,000,000,000,000,000,000
31
avformat/asfdec_o: Check size_bmp more fully Fixes: integer overflow and out of array access Fixes: asfo-crash-46080c4341572a7137a162331af77f6ded45cbd7 Found-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static void *htab_lru_map_lookup_elem_sys(struct bpf_map *map, void *key) { return __htab_lru_map_lookup_elem(map, key, false); }
0
[ "CWE-787" ]
bpf
c4eb1f403243fc7bbb7de644db8587c03de36da6
223,310,460,622,647,670,000,000,000,000,000,000,000
4
bpf: Fix integer overflow involving bucket_size In __htab_map_lookup_and_delete_batch(), hash buckets are iterated over to count the number of elements in each bucket (bucket_size). If bucket_size is large enough, the multiplication to calculate kvmalloc() size could overflow, resulting in out-of-bounds write as repor...
static int ssl_write_client_hello( mbedtls_ssl_context *ssl ) { int ret; size_t i, n, olen, ext_len = 0; unsigned char *buf; unsigned char *p, *q; unsigned char offer_compress; const int *ciphersuites; const mbedtls_ssl_ciphersuite_t *ciphersuite_info; MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> wr...
0
[ "CWE-119", "CWE-125", "CWE-295" ]
mbedtls
a1098f81c252b317ad34ea978aea2bc47760b215
170,589,528,950,950,660,000,000,000,000,000,000,000
348
Add bounds check before signature length read
void kvm_arch_hardware_disable(void) { kvm_x86_ops->hardware_disable(); drop_user_return_notifiers(); }
0
[]
kvm
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
141,834,245,710,177,090,000,000,000,000,000,000,000
5
KVM: x86: Check non-canonical addresses upon WRMSR Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is written to certain MSRs. The behavior is "almost" identical for AMD and Intel (ignoring MSRs that are not implemented in either architecture since they would anyhow #GP). However, IA32_SYSENTE...
int mp_init_multi(mp_int* a, mp_int* b, mp_int* c, mp_int* d, mp_int* e, mp_int* f) { if (a) fp_init(a); if (b) fp_init(b); if (c) fp_init(c); if (d) fp_init(d); if (e) fp_init(e); if (f) fp_init(f); return MP_OKAY; }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
246,790,360,707,660,670,000,000,000,000,000,000,000
18
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
void copy_array<Eigen::half, int32>(Eigen::half* dst, const Eigen::half* src, int32 size) { slow_copy_array(dst, src, size); }
0
[ "CWE-131", "CWE-369" ]
tensorflow
f94ef358bb3e91d517446454edff6535bcfe8e4a
112,864,085,205,860,420,000,000,000,000,000,000,000
4
Fix `tf.raw_ops.RaggedTensorToTensor` failing CHECK in `tensor.cc`. PiperOrigin-RevId: 368300502 Change-Id: I91255d23c4bfd3aa3c029aac773937c09daf3c64
mono_alloc_static_data (gpointer **static_data_ptr, guint32 offset, gboolean threadlocal) { guint idx = (offset >> 24) - 1; int i; gpointer* static_data = *static_data_ptr; if (!static_data) { static void* tls_desc = NULL; #ifdef HAVE_SGEN_GC if (!tls_desc) tls_desc = mono_gc_make_root_descr_user (mark_tls_...
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
173,472,624,650,991,650,000,000,000,000,000,000,000
27
Fix access to freed members of a dead thread * threads.c: Fix access to freed members of a dead thread. Found and fixed by Rodrigo Kumpera <rkumpera@novell.com> Ref: CVE-2011-0992
LogLuvVGetField(TIFF* tif, uint32 tag, va_list ap) { LogLuvState *sp = (LogLuvState *)tif->tif_data; switch (tag) { case TIFFTAG_SGILOGDATAFMT: *va_arg(ap, int*) = sp->user_datafmt; return (1); default: return (*sp->vgetparent)(tif, tag, ap); } }
0
[ "CWE-787" ]
libtiff
aaab5c3c9d2a2c6984f23ccbc79702610439bc65
220,945,095,317,161,300,000,000,000,000,000,000,000
12
* libtiff/tif_luv.c: fix potential out-of-bound writes in decode functions in non debug builds by replacing assert()s by regular if checks (bugzilla #2522). Fix potential out-of-bound reads in case of short input data.
static int nl80211_send_mpath(struct sk_buff *msg, u32 pid, u32 seq, int flags, struct net_device *dev, u8 *dst, u8 *next_hop, struct mpath_info *pinfo) { void *hdr; struct nlattr *pinfoattr; hdr = nl80211hdr_put(msg, pid, seq, flags, NL80211_CMD_NEW_STATION); if (!hdr) return -1; NLA_PUT_U32(msg, ...
0
[ "CWE-362", "CWE-119" ]
linux
208c72f4fe44fe09577e7975ba0e7fa0278f3d03
196,996,861,567,225,200,000,000,000,000,000,000,000
51
nl80211: fix check for valid SSID size in scan operations In both trigger_scan and sched_scan operations, we were checking for the SSID length before assigning the value correctly. Since the memory was just kzalloc'ed, the check was always failing and SSID with over 32 characters were allowed to go through. This was...
struct dvb_frontend* ttusbdecfe_dvbs_attach(const struct ttusbdecfe_config* config) { struct ttusbdecfe_state* state = NULL; /* allocate memory for the internal state */ state = kmalloc(sizeof(struct ttusbdecfe_state), GFP_KERNEL); if (state == NULL) return NULL; /* setup the state */ state->config = config; ...
0
[ "CWE-119", "CWE-787" ]
linux
f2e323ec96077642d397bb1c355def536d489d16
181,624,280,908,826,240,000,000,000,000,000,000,000
19
[media] ttusb-dec: buffer overflow in ioctl We need to add a limit check here so we don't overflow the buffer. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
gdImageBrushApply (gdImagePtr im, int x, int y) { int lx, ly; int hy; int hx; int x1, y1, x2, y2; int srcx, srcy; if (!im->brush) { return; } hy = gdImageSY (im->brush) / 2; y1 = y - hy; y2 = y1 + gdImageSY (im->brush); hx = gdImageSX (im->brush) / 2; x1 = x - hx; x2 = x1 + gdImage...
0
[ "CWE-190" ]
libgd
cfee163a5e848fc3e3fb1d05a30d7557cdd36457
153,600,544,219,832,060,000,000,000,000,000,000,000
100
- #18, Removed invalid gdFree call when overflow2 fails - #17, Free im->pixels as well on error
static const char *get_type(FILE *fp, int obj_id, const xref_t *xref) { int is_stream; char *c, *obj, *endobj; static char buf[32]; long start; start = ftell(fp); if (!(obj = get_object(fp, obj_id, xref, NULL, &is_stream)) || is_stream ...
0
[ "CWE-787" ]
pdfresurrect
1b422459f07353adce2878806d5247d9e91fb397
336,453,386,229,229,540,000,000,000,000,000,000,000
67
Update header validation checks. Thanks to yifengchen-cc for identifying this.
void SetStoreOriginalJSONForExtrasAndExtensions(const bool enabled) { store_original_json_for_extras_and_extensions_ = enabled; }
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
220,059,525,731,404,060,000,000,000,000,000,000,000
3
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
FLAC__StreamDecoderSeekStatus file_seek_callback_(const FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data) { (void)client_data; if(decoder->private_->file == stdin) return FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED; else if(fseeko(decoder->private_->file, (FLAC__off_t)absolute_b...
0
[ "CWE-119" ]
flac
5b3033a2b355068c11fe637e14ac742d273f076e
237,941,883,594,291,840,000,000,000,000,000,000,000
11
src/libFLAC/stream_decoder.c : Fix buffer read overflow. This is CVE-2014-8962. Reported-by: Michele Spagnuolo, Google Security Team <mikispag@google.com>
static int cmd_queue(struct ImapAccountData *adata, const char *cmdstr, ImapCmdFlags flags) { if (cmd_queue_full(adata)) { mutt_debug(LL_DEBUG3, "Draining IMAP command pipeline\n"); const int rc = imap_exec(adata, NULL, flags & IMAP_CMD_POLL); if (rc == IMAP_EXEC_ERROR) return IMAP_RES_BAD; } ...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
143,312,787,210,475,150,000,000,000,000,000,000,000
21
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
static int __netlink_insert(struct netlink_table *table, struct sock *sk) { struct netlink_compare_arg arg; netlink_compare_arg_init(&arg, sock_net(sk), nlk_sk(sk)->portid); return rhashtable_lookup_insert_key(&table->hash, &arg, &nlk_sk(sk)->node, netlink_rhashtable_params); }
0
[ "CWE-362", "CWE-415" ]
linux
92964c79b357efd980812c4de5c1fd2ec8bb5520
326,601,065,696,814,000,000,000,000,000,000,000,000
9
netlink: Fix dump skb leak/double free When we free cb->skb after a dump, we do it after releasing the lock. This means that a new dump could have started in the time being and we'll end up freeing their skb instead of ours. This patch saves the skb and module before we unlock so we free the right memory. Fixes: 16...
OPJ_BOOL opj_j2k_get_tile(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_image_t* p_image, opj_event_mgr_t * p_manager, OPJ_UINT32 tile_index) { OPJ_UINT32 compno; OPJ_UINT32 l_tile_x, l_tile_y; op...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
151,139,899,446,753,680,000,000,000,000,000,000,000
109
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
new_node(struct huffman_code *code) { void *new_tree; if (code->numallocatedentries == code->numentries) { int new_num_entries = 256; if (code->numentries > 0) { new_num_entries = code->numentries * 2; } new_tree = realloc(code->tree, new_num_entries * sizeof(*code->tree)); if (new_tree ...
0
[ "CWE-119", "CWE-787" ]
libarchive
05caadc7eedbef471ac9610809ba683f0c698700
294,954,501,381,073,230,000,000,000,000,000,000,000
18
Issue 719: Fix for TALOS-CAN-154 A RAR file with an invalid zero dictionary size was not being rejected, leading to a zero-sized allocation for the dictionary storage which was then overwritten during the dictionary initialization. Thanks to the Open Source and Threat Intelligence project at Cisco for reporting this...
bool position_is_within_bounds() { if (!offset) return !position_cursor.is_outside_computation_bounds(); if (overflowed) return false; /* No valid bound to compare to. */ if (position_cursor.is_outside_computation_bounds() || top_bound->is_outside_computation_bounds() || ...
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
119,064,399,469,613,620,000,000,000,000,000,000,000
22
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
xfs_map_trim_size( struct inode *inode, sector_t iblock, struct buffer_head *bh_result, struct xfs_bmbt_irec *imap, xfs_off_t offset, ssize_t size) { xfs_off_t mapping_size; mapping_size = imap->br_startoff + imap->br_blockcount - iblock; mapping_size <<= inode->i_blkbits; ASSERT(mapping_size > 0); i...
0
[ "CWE-362" ]
linux
04197b341f23b908193308b8d63d17ff23232598
281,305,505,678,391,200,000,000,000,000,000,000,000
27
xfs: don't BUG() on mixed direct and mapped I/O We've had reports of generic/095 causing XFS to BUG() in __xfs_get_blocks() due to the existence of delalloc blocks on a direct I/O read. generic/095 issues a mix of various types of I/O, including direct and memory mapped I/O to a single file. This is clearly not suppor...
void nsim_bpf_dev_exit(struct nsim_dev *nsim_dev) { WARN_ON(!list_empty(&nsim_dev->bpf_bound_progs)); WARN_ON(!list_empty(&nsim_dev->bpf_bound_maps)); bpf_offload_dev_destroy(nsim_dev->bpf_dev); }
0
[]
net
481221775d53d6215a6e5e9ce1cce6d2b4ab9a46
214,059,790,343,138,630,000,000,000,000,000,000,000
6
netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc Zero-initialize memory for new map's value in function nsim_bpf_map_alloc since it may cause a potential kernel information leak issue, as follows: 1. nsim_bpf_map_alloc calls nsim_map_alloc_elem to allocate elements for a new map. 2....
static int i40e_vsi_request_irq(struct i40e_vsi *vsi, char *basename) { struct i40e_pf *pf = vsi->back; int err; if (pf->flags & I40E_FLAG_MSIX_ENABLED) err = i40e_vsi_request_irq_msix(vsi, basename); else if (pf->flags & I40E_FLAG_MSI_ENABLED) err = request_irq(pf->pdev->irq, i40e_intr, 0, pf->int_name,...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
156,556,352,903,176,640,000,000,000,000,000,000,000
19
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
cmsUInt32Number GenerateCSA(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags, cmsIOHANDLER* mem) { cmsUInt32Number dwBytesUsed; cmsPipeline* lut = NULL; ...
0
[]
Little-CMS
d1fcbdc6bcdd50432ae95e9c6f83e79338f87690
16,602,393,520,198,047,000,000,000,000,000,000,000
62
Buffer overflow fix. BuildColorantList() concatenates 32 bit data in each iteration. The max value of iteration can be 16. Thus buffer overflow can occur with storage of 128 bytes. It would need 512 bytes in worst case.
static int bin_info(RCore *r, int mode) { int i, j, v; char str[R_FLAG_NAME_SIZE]; RBinInfo *info = r_bin_get_info (r->bin); RBinFile *binfile = r_core_bin_cur (r); RBinObject *obj = r_bin_cur_object (r->bin); const char *compiled = NULL; bool havecode; if (!binfile || !info || !obj) { if (mode & R_CORE_BIN_...
0
[ "CWE-416" ]
radare2
f85bc674b2a2256a364fe796351bc1971e106005
30,177,757,787,888,747,000,000,000,000,000,000,000
193
Fix #7698 - UAF in r_config_set when loading a dex
win_new_shellsize(void) { static int old_Rows = 0; static int old_Columns = 0; if (old_Rows != Rows || old_Columns != Columns) ui_new_shellsize(); if (old_Rows != Rows) { // If 'window' uses the whole screen, keep it using that. // Don't change it when set with "-w size" on the command line. if...
0
[ "CWE-125", "CWE-787" ]
vim
e178af5a586ea023622d460779fdcabbbfac0908
138,311,553,076,904,660,000,000,000,000,000,000,000
23
patch 8.2.5160: accessing invalid memory after changing terminal size Problem: Accessing invalid memory after changing terminal size. Solution: Adjust cmdline_row and msg_row to the value of Rows.
reply_info_alloc_rrset_keys(struct reply_info* rep, struct alloc_cache* alloc, struct regional* region) { size_t i; for(i=0; i<rep->rrset_count; i++) { if(region) { rep->rrsets[i] = (struct ub_packed_rrset_key*) regional_alloc(region, sizeof(struct ub_packed_rrset_key)); if(rep->rrsets[i]) { mem...
0
[ "CWE-787" ]
unbound
6c3a0b54ed8ace93d5b5ca7b8078dc87e75cd640
276,926,841,782,736,070,000,000,000,000,000,000,000
22
- Fix Out of Bound Write Compressed Names in rdata_copy(), reported by X41 D-Sec.
static int aio_ring_mmap(struct file *file, struct vm_area_struct *vma) { vma->vm_flags |= VM_DONTEXPAND; vma->vm_ops = &generic_file_vm_ops; return 0; }
0
[ "CWE-703" ]
linux
4c185ce06dca14f5cea192f5a2c981ef50663f2b
150,448,341,367,068,800,000,000,000,000,000,000,000
6
aio: lift iov_iter_init() into aio_setup_..._rw() the only non-trivial detail is that we do it before rw_verify_area(), so we'd better cap the length ourselves in aio_setup_single_rw() case (for vectored case rw_copy_check_uvector() will do that for us). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
void sqlite3VdbeDeleteAuxData(sqlite3 *db, AuxData **pp, int iOp, int mask){ while( *pp ){ AuxData *pAux = *pp; if( (iOp<0) || (pAux->iAuxOp==iOp && pAux->iAuxArg>=0 && (pAux->iAuxArg>31 || !(mask & MASKBIT32(pAux->iAuxArg)))) ){ testcase( pAux->iAuxArg==31 ); if( pAux...
0
[ "CWE-755" ]
sqlite
8654186b0236d556aa85528c2573ee0b6ab71be3
310,645,167,785,882,300,000,000,000,000,000,000,000
19
When an error occurs while rewriting the parser tree for window functions in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set, and make sure that this shuts down any subsequent code generation that might depend on the transformations that were implemented. This fixes a problem discovered by the Y...
GC_API void * GC_CALL GC_call_with_stack_base(GC_stack_base_func fn, void *arg) { struct GC_stack_base base; void *result; base.mem_base = (void *)&base; # ifdef IA64 base.reg_base = (void *)GC_save_regs_in_stack(); /* Unnecessarily flushes register stack, */ /* but that probab...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
273,946,942,315,922,320,000,000,000,000,000,000,000
17
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
static int ipipe_prep(struct pipe_inode_info *pipe, unsigned int flags) { int ret; /* * Check ->nrbufs without the inode lock first. This function * is speculative anyways, so missing one is ok. */ if (pipe->nrbufs) return 0; ret = 0; pipe_lock(pipe); while (!pipe->nrbufs) { if (signal_pending(curren...
0
[ "CWE-284", "CWE-264" ]
linux
8d0207652cbe27d1f962050737848e5ad4671958
89,108,929,493,197,950,000,000,000,000,000,000,000
33
->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...
_functor2d_float(const CImg<T>& pref):ref(pref) {} float operator()(const float x, const float y) const { return (float)ref._linear_atXY(x,y);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
330,119,870,061,603,600,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, int what, xmlChar end, xmlChar end2, xmlChar end3) { xmlChar *buffer = NULL; size_t buffer_size = 0; size_t nbchars = 0; xmlChar *current = NULL; xmlChar *rep = NULL; const xmlChar *last; xmlEntityPtr en...
0
[]
libxml2
0e1a49c8907645d2e155f0d89d4d9895ac5112b5
7,325,273,815,374,075,000,000,000,000,000,000,000
171
Fix infinite loop in xmlStringLenDecodeEntities When ctxt->instate == XML_PARSER_EOF,xmlParseStringEntityRef return NULL which cause a infinite loop in xmlStringLenDecodeEntities Found with libFuzzer. Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
append_to_file (char const *from, char const *to) { int tofd; if ((tofd = safe_open (to, O_WRONLY | O_BINARY | O_APPEND, 0)) < 0) pfatal ("Can't reopen file %s", quotearg (to)); copy_to_fd (from, tofd); if (close (tofd) != 0) write_fatal (); }
1
[ "CWE-59" ]
patch
dce4683cbbe107a95f1f0d45fabc304acfb5d71a
258,655,906,204,228,630,000,000,000,000,000,000,000
10
Don't follow symlinks unless --follow-symlinks is given * src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file, append_to_file): Unless the --follow-symlinks option is given, open files with the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing that consistently for input files. * src/u...
static void cep_write_cb(struct gatt_db_attribute *attrib, int err, void *user_data) { if (err) DBG("Failed to store CEP value in the database"); else DBG("Stored CEP value in the database"); }
0
[ "CWE-416" ]
bluez
838c0dc7641e1c991c0f3027bf94bee4606012f8
161,377,419,140,723,880,000,000,000,000,000,000,000
8
gatt: Fix not cleaning up when disconnected There is a current use after free possible on a gatt server if a client disconnects while a WriteValue call is being processed with dbus. This patch includes the addition of a pending disconnect callback to handle cleanup better if a disconnect occurs during a write, an acq...
static inline bool xfrm_state_hold_rcu(struct xfrm_state __rcu *x) { return refcount_inc_not_zero(&x->refcnt); }
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
257,835,961,302,499,920,000,000,000,000,000,000,000
4
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
static int ssl2_read_internal(SSL *s, void *buf, int len, int peek) { int n; unsigned char mac[MAX_MAC_SIZE]; unsigned char *p; int i; unsigned int mac_size; ssl2_read_again: if (SSL_in_init(s) && !s->in_handshake) { n=s->handshake_func(s); if (n < 0) return(n); if (n == 0) { SSLerr(SSL_F_SSL2_RE...
0
[ "CWE-310" ]
openssl
270881316664396326c461ec7a124aec2c6cc081
6,424,696,296,879,669,000,000,000,000,000,000,000
178
Add and use a constant-time memcmp. This change adds CRYPTO_memcmp, which compares two vectors of bytes in an amount of time that's independent of their contents. It also changes several MAC compares in the code to use this over the standard memcmp, which may leak information about the size of a matching prefix. (cher...
win_horz_neighbor(tabpage_T *tp, win_T *wp, int left, long count) { frame_T *fr; frame_T *nfr; frame_T *foundfr; #ifdef FEAT_PROP_POPUP if (popup_is_popup(wp)) // popups don't have neighbors. return NULL; #endif foundfr = wp->w_frame; while (count--) { /* * First go upwards in the tree...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
143,322,970,198,869,730,000,000,000,000,000,000,000
60
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
build_node(XML_Parser parser, int src_node, XML_Content *dest, XML_Content **contpos, XML_Char **strpos) { DTD *const dtd = parser->m_dtd; /* save one level of indirection */ dest->type = dtd->scaffold[src_node].type; dest->quant = dtd->scaffold[src_node].quant; if (dest->type == XML_CTYPE_NAME) { ...
1
[ "CWE-400", "CWE-703" ]
libexpat
9b4ce651b26557f16103c3a366c91934ecd439ab
126,713,253,503,216,570,000,000,000,000,000,000,000
30
Prevent stack exhaustion in build_model It is possible to trigger stack exhaustion in build_model function if depth of nested children in DTD element is large enough. This happens because build_node is a recursively called function within build_model. The code has been adjusted to run iteratively. It uses the already...
void aio_complete(struct kiocb *iocb, long res, long res2) { struct kioctx *ctx = iocb->ki_ctx; struct aio_ring *ring; struct io_event *ev_page, *event; unsigned tail, pos, head; unsigned long flags; /* * Special case handling for sync iocbs: * - events go directly into the iocb for fast handling * - the...
0
[]
linux-stable
c4f4b82694fe48b02f7a881a1797131a6dad1364
122,400,911,779,070,660,000,000,000,000,000,000,000
103
AIO: properly check iovec sizes In Linus's tree, the iovec code has been reworked massively, but in older kernels the AIO layer should be checking this before passing the request on to other layers. Many thanks to Ben Hawkes of Google Project Zero for pointing out the issue. Reported-by: Ben Hawkes <hawkes@google.co...
NCURSES_SP_NAME(init_pair) (NCURSES_SP_DCLx NCURSES_PAIRS_T pair, NCURSES_COLOR_T f, NCURSES_COLOR_T b) { return _nc_init_pair(SP_PARM, pair, f, b); }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
284,175,184,664,662,760,000,000,000,000,000,000,000
7
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
new_shell_variable (name) const char *name; { SHELL_VAR *entry; entry = (SHELL_VAR *)xmalloc (sizeof (SHELL_VAR)); entry->name = savestring (name); var_setvalue (entry, (char *)NULL); CLEAR_EXPORTSTR (entry); entry->dynamic_value = (sh_var_value_func_t *)NULL; entry->assign_func = (sh_var_assign_f...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
286,919,092,092,202,120,000,000,000,000,000,000,000
23
commit bash-20120224 snapshot
MagickExport ChannelFeatures *GetImageFeatures(const Image *image, const size_t distance,ExceptionInfo *exception) { typedef struct _ChannelStatistics { PixelInfo direction[4]; /* horizontal, vertical, left and right diagonals */ } ChannelStatistics; CacheView *image_view; ChannelFeatures ...
0
[ "CWE-369" ]
ImageMagick
a77d8d97f5a7bced0468f0b08798c83fb67427bc
214,538,501,597,940,040,000,000,000,000,000,000,000
1,091
https://github.com/ImageMagick/ImageMagick/issues/1552
rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to) { return rb_str_conv_enc_opts(str, from, to, 0, Qnil); }
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
21,433,152,458,400,363,000,000,000,000,000,000,000
4
* string.c (rb_str_justify): CVE-2009-4124. Fixes a bug reported by Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London; Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static void *gtls_get_internals(struct ssl_connect_data *connssl, CURLINFO info UNUSED_PARAM) { struct ssl_backend_data *backend = connssl->backend; (void)info; return backend->session; }
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
312,352,305,711,479,550,000,000,000,000,000,000,000
7
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
free_locals(cctx_T *cctx) { unwind_locals(cctx, 0); ga_clear(&cctx->ctx_locals); }
0
[ "CWE-703", "CWE-122" ]
vim
d1d8f6bacb489036d0fd479c9dd3c0102c988889
39,248,403,984,793,656,000,000,000,000,000,000,000
5
patch 9.0.0211: invalid memory access when compiling :lockvar Problem: Invalid memory access when compiling :lockvar. Solution: Don't read past the end of the line.
static int hclge_tm_qs_to_pri_map_cfg(struct hclge_dev *hdev, u16 qs_id, u8 pri) { struct hclge_qs_to_pri_link_cmd *map; struct hclge_desc desc; hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_TM_QS_TO_PRI_LINK, false); map = (struct hclge_qs_to_pri_link_cmd *)desc.data; map->qs_id = cpu_to_le16(qs_id); ...
0
[ "CWE-125" ]
linux
04f25edb48c441fc278ecc154c270f16966cbb90
136,589,101,369,412,830,000,000,000,000,000,000,000
16
net: hns3: add some error checking in hclge_tm module When hdev->tx_sch_mode is HCLGE_FLAG_VNET_BASE_SCH_MODE, the hclge_tm_schd_mode_vnet_base_cfg calls hclge_tm_pri_schd_mode_cfg with vport->vport_id as pri_id, which is used as index for hdev->tm_info.tc_info, it will cause out of bound access issue if vport_id is e...
static void process_bin_delete(conn *c) { item *it; protocol_binary_request_delete* req = binary_get_request(c); char* key = binary_get_key(c); size_t nkey = c->binary_header.request.keylen; assert(c != NULL); if (settings.verbose > 1) { int ii; fprintf(stderr, "Deleting "); ...
0
[ "CWE-190", "CWE-667" ]
memcached
a8c4a82787b8b6c256d61bd5c42fb7f92d1bae00
131,822,659,645,436,850,000,000,000,000,000,000,000
44
Don't overflow item refcount on get Counts as a miss if the refcount is too high. ASCII multigets are the only time refcounts can be held for so long. doing a dirty read of refcount. is aligned. trying to avoid adding an extra refcount branch for all calls of item_get due to performance. might be able to move it in ...
SWFInput_buffer_seek(SWFInput input, long offset, int whence) { if ( whence == SEEK_CUR ) { if ( offset >= 0 ) input->offset = min(input->length, input->offset + offset); else input->offset = max(0, input->offset + offset); } else if ( whence == SEEK_END ) input->offset = max(0, input->length - offset)...
0
[ "CWE-190", "CWE-703" ]
libming
a009a38dce1d9316cad1ab522b813b1d5ba4c62a
74,671,183,566,166,945,000,000,000,000,000,000,000
16
Fix left shift of a negative value in SWFInput_readSBits. Check for number before before left-shifting by (number-1).
static int refresh_imported_device_list(void) { const char *attr_status; char status[MAX_STATUS_NAME+1] = "status"; int i, ret; for (i = 0; i < vhci_driver->ncontrollers; i++) { if (i > 0) snprintf(status, sizeof(status), "status.%d", i); attr_status = udev_device_get_sysattr_value(vhci_driver->hc_device, ...
0
[ "CWE-200" ]
linux
2f2d0088eb93db5c649d2a5e34a3800a8a935fc5
288,299,475,873,076,360,000,000,000,000,000,000,000
26
usbip: prevent vhci_hcd driver from leaking a socket pointer address When a client has a USB device attached over IP, the vhci_hcd driver is locally leaking a socket pointer address via the /sys/devices/platform/vhci_hcd/status file (world-readable) and in debug output when "usbip --debug port" is run. Fix it to not...
rsvg_property_bag_free (RsvgPropertyBag * bag) { g_hash_table_unref (bag); }
0
[ "CWE-20" ]
librsvg
d1c9191949747f6dcfd207831d15dd4ba00e31f2
198,925,956,924,309,600,000,000,000,000,000,000,000
4
state: Store mask as reference Instead of immediately looking up the mask, store the reference and look it up on use.
static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url, AVDictionary *opts, AVDictionary *opts2, int *is_http) { HLSContext *c = s->priv_data; AVDictionary *tmp = NULL; const char *proto_name = NULL; int ret; av_dict_copy(&tmp, opts, 0); av_dict_copy(&tmp,...
0
[ "CWE-703", "CWE-835" ]
FFmpeg
7ec414892ddcad88313848494b6fc5f437c9ca4a
130,321,967,038,194,290,000,000,000,000,000,000,000
66
avformat/hls: Fix DoS due to infinite loop Fixes: loop.m3u The default max iteration count of 1000 is arbitrary and ideas for a better solution are welcome Found-by: Xiaohei and Wangchu from Alibaba Security Team Previous version reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Michael Niedermayer <...
zcolor_remap_one( i_ctx_t * i_ctx_p, const ref * pproc, gx_transfer_map * pmap, const gs_gstate * pgs, op_proc_t finish_proc ) { os_ptr op; /* * Detect the identity function, which is a common value for one or * more of these functions...
0
[ "CWE-704" ]
ghostpdl
548bb434e81dadcc9f71adf891a3ef5bea8e2b4e
44,309,086,281,615,260,000,000,000,000,000,000,000
35
PS interpreter - add some type checking These were 'probably' safe anyway, since they mostly treat the objects as integers without checking, which at least can't result in a crash. Nevertheless, we ought to check. The return from comparedictkeys could be wrong if one of the keys had a value which was not an array, i...
static void lex_unget_unsave(lex_t *lex, int c) { if(c != STREAM_STATE_EOF && c != STREAM_STATE_ERROR) { /* Since we treat warnings as errors, when assertions are turned * off the "d" variable would be set but never used. Which is * treated as an error by GCC. */ #ifndef N...
0
[ "CWE-20" ]
jansson
64ce0ad3731ebd77e02897b07920eadd0e2cc318
65,158,748,406,017,240,000,000,000,000,000,000,000
18
Fix for issue #282 The fix limits recursion depths when parsing arrays and objects. The limit is configurable via the `JSON_PARSER_MAX_DEPTH` setting within `jansson_config.h` and is set by default to 2048. Update the RFC conformance document to note the limit; the RFC allows limits to be set by the implementation so...
static int gettime(void) { static struct timeval first; static int once = 1; struct timeval now; if (once) { gettimeofday(&first, NULL); once = 0; } gettimeofday(&now, NULL); return (now.tv_sec - first.tv_sec) * 1000 + (now.tv_usec - first.tv_usec) / 1000; }
0
[ "CWE-369", "CWE-22" ]
mupdf
22c47acbd52949421f8c7cb46ea1556827d0fcbf
34,590,395,954,531,300,000,000,000,000,000,000,000
13
Bug 704834: Fix division by zero for zero width pages in muraster.
dp_packet_hwol_l4_mask(const struct dp_packet *b) { return *dp_packet_ol_flags_ptr(b) & DP_PACKET_OL_TX_L4_MASK; }
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
152,286,158,901,279,960,000,000,000,000,000,000,000
4
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
TEST_F(ConnectionManagerUtilityTest, DetermineNextProtocol) { { Network::MockConnection connection; EXPECT_CALL(connection, nextProtocol()).WillRepeatedly(Return("hello")); Buffer::OwnedImpl data(""); EXPECT_EQ("hello", ConnectionManagerUtility::determineNextProtocol(connection, data)); } { N...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
46,253,782,421,496,240,000,000,000,000,000,000,000
52
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static void vrend_draw_bind_images_shader(struct vrend_context *ctx, int shader_type) { GLenum access; GLboolean layered; struct vrend_image_view *iview; uint32_t mask, tex_id, level, first_layer; if (!ctx->sub->images_used_mask[shader_type]) return; if (!ctx->sub->prog->img_locs[shader_type]...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
4,117,286,103,337,734,500,000,000,000,000,000,000
69
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
PGTYPEStimestamp_from_asc(char *str, char **endptr) { timestamp result; #ifdef HAVE_INT64_TIMESTAMP int64 noresult = 0; #else double noresult = 0.0; #endif fsec_t fsec; struct tm tt, *tm = &tt; int dtype; int nf; char *field[MAXDATEFIELDS]; int ftype[MAXDATEFIELDS]; char lowstr[MAXDATELEN ...
0
[ "CWE-416", "CWE-119" ]
postgres
4318daecc959886d001a6e79c6ea853e8b1dfb4b
215,753,632,071,266,000,000,000,000,000,000,000,000
73
Fix handling of wide datetime input/output. Many server functions use the MAXDATELEN constant to size a buffer for parsing or displaying a datetime value. It was much too small for the longest possible interval output and slightly too small for certain valid timestamp input, particularly input with a long timezone na...
int ath6kl_wmi_setpmkid_cmd(struct wmi *wmi, u8 if_idx, const u8 *bssid, const u8 *pmkid, bool set) { struct sk_buff *skb; struct wmi_setpmkid_cmd *cmd; int ret; if (bssid == NULL) return -EINVAL; if (set && pmkid == NULL) return -EINVAL; skb = ath6kl_wmi_get_new_buf(sizeof(*cmd)); if (!skb) retu...
0
[ "CWE-125" ]
linux
5d6751eaff672ea77642e74e92e6c0ac7f9709ab
185,329,850,881,443,800,000,000,000,000,000,000,000
32
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...
spnego_gss_complete_auth_token( OM_uint32 *minor_status, const gss_ctx_id_t context_handle, gss_buffer_t input_message_buffer) { OM_uint32 ret; ret = gss_complete_auth_token(minor_status, context_handle, input_message_buffer); return (ret); }
1
[ "CWE-18", "CWE-763" ]
krb5
b51b33f2bc5d1497ddf5bd107f791c101695000d
91,315,131,723,428,490,000,000,000,000,000,000,000
11
Fix SPNEGO context aliasing bugs [CVE-2015-2695] The SPNEGO mechanism currently replaces its context handle with the mechanism context handle upon establishment, under the assumption that most GSS functions are only called after context establishment. This assumption is incorrect, and can lead to aliasing violations ...