func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
BIGNUM* BN_bin2bn(const unsigned char* num, int sz, BIGNUM* retVal) { bool created = false; mySTL::auto_ptr<BIGNUM> bn; if (!retVal) { created = true; bn.reset(NEW_YS BIGNUM); retVal = bn.get(); } retVal->assign(num, sz); if (created) return bn.release(); e...
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
233,774,179,104,255,900,000,000,000,000,000,000,000
18
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
bool blk_mq_bio_list_merge(struct request_queue *q, struct list_head *list, struct bio *bio) { struct request *rq; int checked = 8; list_for_each_entry_reverse(rq, list, queuelist) { bool merged = false; if (!checked--) break; if (!blk_rq_merge_ok(rq, bio)) continue; switch (blk_try_merge(rq,...
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
160,103,845,359,631,600,000,000,000,000,000,000,000
36
block: free sched's request pool in blk_cleanup_queue In theory, IO scheduler belongs to request queue, and the request pool of sched tags belongs to the request queue too. However, the current tags allocation interfaces are re-used for both driver tags and sched tags, and driver tags is definitely host wide, and doe...
void ndp_msgra_reachable_time_set(struct ndp_msgra *msgra, uint32_t reachable_time) { msgra->ra->nd_ra_reachable = htonl(reachable_time); }
0
[ "CWE-284" ]
libndp
a4892df306e0532487f1634ba6d4c6d4bb381c7f
23,450,459,756,788,660,000,000,000,000,000,000,000
5
libndp: validate the IPv6 hop limit None of the NDP messages should ever come from a non-local network; as stated in RFC4861's 6.1.1 (RS), 6.1.2 (RA), 7.1.1 (NS), 7.1.2 (NA), and 8.1. (redirect): - The IP Hop Limit field has a value of 255, i.e., the packet could not possibly have been forwarded by a router. T...
int ext4_generic_delete_entry(handle_t *handle, struct inode *dir, struct ext4_dir_entry_2 *de_del, struct buffer_head *bh, void *entry_buf, int buf_size, int csum_size) { struct ext4_dir_entry_2 *de, *pde; unsigned int blocksize = dir->i_sb->s_blocksize; int i; ...
0
[ "CWE-399" ]
linux
0e9a9a1ad619e7e987815d20262d36a2f95717ca
97,704,525,712,316,510,000,000,000,000,000,000,000
38
ext4: avoid hang when mounting non-journal filesystems with orphan list When trying to mount a file system which does not contain a journal, but which does have a orphan list containing an inode which needs to be truncated, the mount call with hang forever in ext4_orphan_cleanup() because ext4_orphan_del() will return...
static int uvesafb_vbe_init(struct fb_info *info) { struct uvesafb_ktask *task = NULL; struct uvesafb_par *par = info->par; int err; task = uvesafb_prep(); if (!task) return -ENOMEM; err = uvesafb_vbe_getinfo(task, par); if (err) goto out; err = uvesafb_vbe_getmodes(task, par); if (err) goto out; pa...
0
[ "CWE-190" ]
linux
9f645bcc566a1e9f921bdae7528a01ced5bc3713
134,506,473,385,743,470,000,000,000,000,000,000,000
43
video: uvesafb: Fix integer overflow in allocation cmap->len can get close to INT_MAX/2, allowing for an integer overflow in allocation. This uses kmalloc_array() instead to catch the condition. Reported-by: Dr Silvio Cesare of InfoSect <silvio.cesare@gmail.com> Fixes: 8bdb3a2d7df48 ("uvesafb: the driver core") Cc: s...
void Server::WorkerRoutine() { LOG_INFO("Worker is running"); for (;;) { auto connection = queue_.PopOrWait(); if (!connection) { LOG_INFO("Worker is going to stop"); // For stopping next worker. queue_.Push({}); // Stop this worker. break; } Handle(connection); ...
0
[ "CWE-22" ]
webcc
55a45fd5039061d5cc62e9f1b9d1f7e97a15143f
203,008,716,028,433,060,000,000,000,000,000,000,000
19
fix static file serving security issue; fix url path encoding issue
cockpit_web_response_new (GIOStream *io, const gchar *original_path, const gchar *path, const gchar *query, GHashTable *in_headers, CockpitWebResponseFlags flags) { CockpitWebResponse *sel...
0
[ "CWE-1021" ]
cockpit
8d9bc10d8128aae03dfde62fd00075fe492ead10
73,819,990,451,208,290,000,000,000,000,000,000,000
66
common: Restrict frame embedding to same origin Declare `X-Frame-Options: sameorigin` [1] so that cockpit frames can only be embedded into pages coming from the same origin. This is similar to setting CORP in commit 2b38b8de92f9a (which applies to `<script>`, `<img>`, etc.). The main use case for embedding is to run ...
parse_null(char *line) { check_number_of_args(line, 0); return 1; }
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
35,127,037,768,077,395,000,000,000,000,000,000,000
5
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
sd_show_cache_type(struct device *dev, struct device_attribute *attr, char *buf) { struct scsi_disk *sdkp = to_scsi_disk(dev); int ct = sdkp->RCD + 2*sdkp->WCE; return snprintf(buf, 40, "%s\n", sd_cache_types[ct]); }
0
[ "CWE-284", "CWE-264" ]
linux
0bfc96cb77224736dfa35c3c555d37b3646ef35e
170,243,114,326,614,100,000,000,000,000,000,000,000
8
block: fail SCSI passthrough ioctls on partition devices Linux allows executing the SG_IO ioctl on a partition or LVM volume, and will pass the command to the underlying block device. This is well-known, but it is also a large security problem when (via Unix permissions, ACLs, SELinux or a combination thereof) a prog...
void mnt_free_fs(struct libmnt_fs *fs) { if (!fs) return; DBG(FS, ul_debugobj(fs, "free [refcount=%d]", fs->refcount)); mnt_reset_fs(fs); free(fs); }
0
[ "CWE-552", "CWE-703" ]
util-linux
166e87368ae88bf31112a30e078cceae637f4cdb
82,590,919,834,454,920,000,000,000,000,000,000,000
10
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...
GF_Err gf_isom_rewrite_text_sample(GF_ISOSample *samp, u32 sampleDescriptionIndex, u32 sample_dur) { GF_BitStream *bs; u32 pay_start, txt_size; Bool is_utf_16 = 0; if (!samp || !samp->data || !samp->dataLength) return GF_OK; bs = gf_bs_new(samp->data, samp->dataLength, GF_BITSTREAM_READ); txt_size = gf_bs_read_u...
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
188,664,792,723,994,700,000,000,000,000,000,000,000
40
fixed #1768
inline void set_stmt_row_injection() { DBUG_ENTER("set_stmt_row_injection"); binlog_stmt_flags|= (1U << (BINLOG_STMT_UNSAFE_COUNT + BINLOG_STMT_TYPE_ROW_INJECTION)); DBUG_VOID_RETURN; }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
258,074,631,739,420,600,000,000,000,000,000,000,000
6
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
TEST(GatherNdOpTest, BatchedIndexingIntoMatrix2) { GatherNdOpModel m({TensorType_FLOAT32, {2, 2}}, {TensorType_INT32, {2, 1, 2}}); m.SetInput<float>({1.1, 1.2, 2.1, 2.2}); m.SetPositions<int32_t>({0, 0, 1, 1}); ASSERT_EQ(m.Invoke(), kTfLiteOk); EXPECT_THAT(m.GetOutput<float>(), ElementsAr...
0
[ "CWE-125" ]
tensorflow
595a65a3e224a0362d7e68c2213acfc2b499a196
144,827,581,895,329,860,000,000,000,000,000,000,000
9
Return a TFLite error if gather_nd will result in reading invalid memory PiperOrigin-RevId: 463054033
void hugetlb_report_meminfo(struct seq_file *m) { struct hstate *h = &default_hstate; seq_printf(m, "HugePages_Total: %5lu\n" "HugePages_Free: %5lu\n" "HugePages_Rsvd: %5lu\n" "HugePages_Surp: %5lu\n" "Hugepagesize: %8lu kB\n", h->nr_huge_pages, h->free_huge_pages, h->resv_huge_pa...
0
[ "CWE-399" ]
linux
90481622d75715bfcb68501280a917dbfe516029
242,518,715,474,756,600,000,000,000,000,000,000,000
15
hugepages: fix use after free bug in "quota" handling hugetlbfs_{get,put}_quota() are badly named. They don't interact with the general quota handling code, and they don't much resemble its behaviour. Rather than being about maintaining limits on on-disk block usage by particular users, they are instead about maintai...
next_extents (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags, struct nbdkit_extents *extents, int *err) { struct b_conn *b_conn = nxdata; return backend_extents (b_conn->b, b_conn->conn, count, offset, flags, extents, err); }
0
[ "CWE-406" ]
nbdkit
a6b88b195a959b17524d1c8353fd425d4891dc5f
163,823,329,601,152,950,000,000,000,000,000,000,000
7
server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO Most known NBD clients do not bother with NBD_OPT_INFO (except for clients like 'qemu-nbd --list' that don't ever intend to connect), but go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu to add in an extra client step (whether info on the ...
static void rb_commit(struct ring_buffer_per_cpu *cpu_buffer, struct ring_buffer_event *event) { local_inc(&cpu_buffer->entries); rb_end_commit(cpu_buffer); }
0
[ "CWE-362" ]
linux
bbeb97464eefc65f506084fd9f18f21653e01137
337,113,707,319,197,700,000,000,000,000,000,000,000
6
tracing: Fix race in trace_open and buffer resize call Below race can come, if trace_open and resize of cpu buffer is running parallely on different cpus CPUX CPUY ring_buffer_resize atomic_read(&buffer->resize_disabled) tracing_open tracing_reset_online_cpus ring_buffer_...
glob_filename (pathname, flags) char *pathname; int flags; { char **result, **new_result; unsigned int result_size; char *directory_name, *filename, *dname, *fn; unsigned int directory_len; int free_dirname; /* flag */ int dflags, hasglob; result = (char **) malloc (sizeof (char *)); result...
0
[ "CWE-273", "CWE-787" ]
bash
951bdaad7a18cc0dc1036bba86b18b90874d39ff
25,030,344,415,612,500,000,000,000,000,000,000,000
438
commit bash-20190628 snapshot
static void __giveup_vsx(struct task_struct *tsk) { if (tsk->thread.regs->msr & MSR_FP) __giveup_fpu(tsk); if (tsk->thread.regs->msr & MSR_VEC) __giveup_altivec(tsk); tsk->thread.regs->msr &= ~MSR_VSX; }
0
[]
linux
5d176f751ee3c6eededd984ad409bff201f436a7
81,396,850,256,238,320,000,000,000,000,000,000,000
8
powerpc: tm: Enable transactional memory (TM) lazily for userspace Currently the MSR TM bit is always set if the hardware is TM capable. This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and TFAIR) must be swapped for each process regardless of if they use TM. For processes that don't use TM the TM MSR ...
bool is_sameC(const unsigned int size_c) const { return _spectrum==size_c; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
180,141,931,713,417,130,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
GC_API GC_ATTR_MALLOC void * GC_CALL GC_debug_malloc(size_t lb, GC_EXTRA_PARAMS) { void * result; /* Note that according to malloc() specification, if size is 0 then */ /* malloc() returns either NULL, or a unique pointer value that can */ /* later b...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
137,792,803,885,555,870,000,000,000,000,000,000,000
25
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...
std::string fakeHandshakerServerAddress(bool connect_to_handshaker) { if (connect_to_handshaker) { return absl::StrCat(Network::Test::getLoopbackAddressUrlString(version_), ":", std::to_string(fake_handshaker_server_port_)); } return wrongHandshakerServerAddress(); }
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
223,747,674,347,039,360,000,000,000,000,000,000,000
7
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...
gpk_parse_fileinfo(sc_card_t *card, const u8 *buf, size_t buflen, sc_file_t *file) { const u8 *sp, *end, *next; int i, rc; memset(file, 0, sizeof(*file)); for (i = 0; i < SC_MAX_AC_OPS; i++) sc_file_add_acl_entry(file, i, SC_AC_UNKNOWN, SC_AC_KEY_REF_NONE); end = buf + buflen; for (sp = buf; sp + 2 < end...
1
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
42,739,641,278,186,500,000,000,000,000,000,000,000
82
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
free_wininfo(wininfo_T *wip) { if (wip->wi_optset) { clear_winopt(&wip->wi_opt); #ifdef FEAT_FOLDING deleteFoldRecurse(&wip->wi_folds); #endif } vim_free(wip); }
0
[ "CWE-416" ]
vim
9b4a80a66544f2782040b641498754bcb5b8d461
296,121,535,015,818,250,000,000,000,000,000,000,000
11
patch 8.2.4281: using freed memory with :lopen and :bwipe Problem: Using freed memory with :lopen and :bwipe. Solution: Do not use a wiped out buffer.
static void prep_new_page(struct page *page, unsigned int order, gfp_t gfp_flags, unsigned int alloc_flags) { int i; post_alloc_hook(page, order, gfp_flags); if (!free_pages_prezeroed() && (gfp_flags & __GFP_ZERO)) for (i = 0; i < (1 << order); i++) clear_highpage(page + i); if (order && (gfp_flags &...
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
186,937,348,528,916,100,000,000,000,000,000,000,000
25
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
static void cirrus_bitblt_reset(CirrusVGAState * s) { s->gr[0x31] &= ~(CIRRUS_BLT_START | CIRRUS_BLT_BUSY | CIRRUS_BLT_FIFOUSED); s->cirrus_srcptr = &s->cirrus_bltbuf[0]; s->cirrus_srcptr_end = &s->cirrus_bltbuf[0]; s->cirrus_srccounter = 0; cirrus_update_memory_access(s); }
0
[ "CWE-787" ]
qemu
b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef
109,098,509,340,697,260,000,000,000,000,000,000,000
9
CVE-2007-1320 - Cirrus LGD-54XX "bitblt" heap overflow I have just noticed that patch for CVE-2007-1320 has never been applied to the QEMU CVS. Please find it below. | Multiple heap-based buffer overflows in the cirrus_invalidate_region | function in the Cirrus VGA extension in QEMU 0.8.2, as used in Xen and | possib...
static void virtio_scsi_parse_req(VirtIOSCSI *s, VirtQueue *vq, VirtIOSCSIReq *req) { assert(req->elem.in_num); req->vq = vq; req->dev = s; req->sreq = NULL; if (req->elem.out_num) { req->req.buf = req->elem.out_sg[0].iov_base; } req->resp.buf = req-...
0
[ "CWE-119" ]
qemu
3c3ce981423e0d6c18af82ee62f1850c2cda5976
99,930,612,270,088,950,000,000,000,000,000,000,000
22
virtio-scsi: fix buffer overrun on invalid state load CVE-2013-4542 hw/scsi/scsi-bus.c invokes load_request. virtio_scsi_load_request does: qemu_get_buffer(f, (unsigned char *)&req->elem, sizeof(req->elem)); this probably can make elem invalid, for example, make in_num or out_num huge, then: virtio_scsi_p...
lldpd_exit(struct lldpd *cfg) { struct lldpd_hardware *hardware, *hardware_next; log_debug("main", "exit lldpd"); TAILQ_FOREACH(hardware, &cfg->g_hardware, h_entries) lldpd_send_shutdown(hardware); close(cfg->g_ctl); priv_ctl_cleanup(cfg->g_ctlname); log_debug("main", "cleanup hardware information"); for (ha...
0
[ "CWE-617", "CWE-703" ]
lldpd
9221b5c249f9e4843f77c7f888d5705348d179c0
129,081,466,380,276,380,000,000,000,000,000,000,000
22
protocols: don't use assert on paths that can be reached Malformed packets should not make lldpd crash. Ensure we can handle them by not using assert() in this part.
static int tcm_loop_register_configfs(void) { struct target_fabric_configfs *fabric; struct config_group *tf_cg; int ret; /* * Set the TCM Loop HBA counter to zero */ tcm_loop_hba_no_cnt = 0; /* * Register the top level struct config_item_type with TCM core */ fabric = target_fabric_configfs_init(THIS_MO...
0
[ "CWE-119", "CWE-787" ]
linux
12f09ccb4612734a53e47ed5302e0479c10a50f8
165,124,213,121,157,440,000,000,000,000,000,000,000
118
loopback: off by one in tcm_loop_make_naa_tpg() This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result in memory corruption. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
SYSCALL_DEFINE2(socketcall, int, call, unsigned long __user *, args) { unsigned long a[AUDITSC_ARGS]; unsigned long a0, a1; int err; unsigned int len; if (call < 1 || call > SYS_SENDMMSG) return -EINVAL; len = nargs[call]; if (len > sizeof(a)) return -EINVAL; /* copy_from_user should be SMP safe. */ if ...
0
[ "CWE-264" ]
net
4de930efc23b92ddf88ce91c405ee645fe6e27ea
153,114,573,614,540,130,000,000,000,000,000,000,000
104
net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom Cc: stable@vger.kernel.org # v3.19 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
BSONObj spec() { return BSON("$and" << BSON_ARRAY("$a" << 0)); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
219,600,632,344,965,300,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
keyboard_command_finish (GSWindow *window) { g_return_if_fail (GS_IS_WINDOW (window)); /* send a signal just in case */ kill_keyboard_command (window); gs_debug ("Keyboard finished"); if (window->priv->keyboard_pid > 0) { wait_on_child (window->priv->keyboard_p...
0
[ "CWE-284" ]
cinnamon-screensaver
da7af55f1fa966c52e15cc288d4f8928eca8cc9f
30,937,680,035,639,530,000,000,000,000,000,000,000
16
Workaround gtk3 bug, don't allow GtkWindow to handle popup_menu.
CmdGetCacheGeneration() : BasicCommand("_getUserCacheGeneration") {}
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
121,927,514,323,198,600,000,000,000,000,000,000,000
1
SERVER-38984 Validate unique User ID on UserCache hit
void vrend_inject_tcs(struct vrend_context *ctx, int vertices_per_patch) { struct pipe_stream_output_info so_info; memset(&so_info, 0, sizeof(so_info)); struct vrend_shader_selector *sel = vrend_create_shader_state(ctx, &so_info, ...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
131,623,646,151,853,650,000,000,000,000,000,000,000
30
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>
void ftyp_del(GF_Box *s) { GF_FileTypeBox *ptr = (GF_FileTypeBox *) s; if (ptr->altBrand) gf_free(ptr->altBrand); gf_free(ptr); }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
122,723,568,340,742,840,000,000,000,000,000,000,000
6
prevent dref memleak on invalid input (#1183)
flatpak_dir_system_helper_call_update_remote (FlatpakDir *self, guint arg_flags, const gchar *arg_remote, const gchar *arg_installation, ...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
148,490,872,484,320,000,000,000,000,000,000,000,000
23
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
static int ide_dvd_read_structure(IDEState *s, int format, const uint8_t *packet, uint8_t *buf) { switch (format) { case 0x0: /* Physical format information */ { int layer = packet[6]; uint64_t total_sectors; if (...
0
[]
qemu
ce560dcf20c14194db5ef3b9fc1ea592d4e68109
96,348,664,045,503,130,000,000,000,000,000,000,000
86
ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0 The START STOP UNIT command will only eject/load media if power condition is zero. If power condition is !0 then LOEJ and START will be ignored. From MMC (sbc contains similar wordings too) The Power Conditions field requests the block device to be ...
static int nfs4_map_errors(int err) { if (err >= -1000) return err; switch (err) { case -NFS4ERR_RESOURCE: case -NFS4ERR_LAYOUTTRYLATER: case -NFS4ERR_RECALLCONFLICT: return -EREMOTEIO; case -NFS4ERR_WRONGSEC: case -NFS4ERR_WRONG_CRED: return -EPERM; case -NFS4ERR_BADOWNER: case -NFS4ERR_BADNAME: retur...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
223,711,413,361,745,080,000,000,000,000,000,000,000
28
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
int ndp_msg_new(struct ndp_msg **p_msg, enum ndp_msg_type msg_type) { struct ndp_msg *msg; if (msg_type == NDP_MSG_ALL) return -EINVAL; msg = ndp_msg_alloc(); if (!msg) return -ENOMEM; ndp_msg_init(msg, msg_type); *p_msg = msg; return 0; }
0
[ "CWE-284" ]
libndp
a4892df306e0532487f1634ba6d4c6d4bb381c7f
69,990,083,394,326,010,000,000,000,000,000,000,000
13
libndp: validate the IPv6 hop limit None of the NDP messages should ever come from a non-local network; as stated in RFC4861's 6.1.1 (RS), 6.1.2 (RA), 7.1.1 (NS), 7.1.2 (NA), and 8.1. (redirect): - The IP Hop Limit field has a value of 255, i.e., the packet could not possibly have been forwarded by a router. T...
bool result_as_longlong() { return field->can_be_compared_as_longlong(); }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
245,786,764,165,186,550,000,000,000,000,000,000,000
4
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
const CNick& CIRCNetwork::GetIRCNick() const { return m_IRCNick; }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
109,476,281,234,670,850,000,000,000,000,000,000,000
1
Don't crash if user specified invalid encoding. This is CVE-2019-9917
static int network_config_add_listen (const oconfig_item_t *ci) /* {{{ */ { sockent_t *se; int status; int i; if ((ci->values_num < 1) || (ci->values_num > 2) || (ci->values[0].type != OCONFIG_TYPE_STRING) || ((ci->values_num > 1) && (ci->values[1].type != OCONFIG_TYPE_STRING))) { ERROR ("net...
0
[ "CWE-119", "CWE-787" ]
collectd
b589096f907052b3a4da2b9ccc9b0e2e888dfc18
101,299,452,023,950,500,000,000,000,000,000,000,000
86
network plugin: Fix heap overflow in parse_packet(). Emilien Gaspar has identified a heap overflow in parse_packet(), the function used by the network plugin to parse incoming network packets. This is a vulnerability in collectd, though the scope is not clear at this point. At the very least specially crafted network...
static ssize_t _hostsock_send( oe_fd_t* sock_, const void* buf, size_t count, int flags) { ssize_t ret = -1; sock_t* sock = _cast_sock(sock_); oe_errno = 0; if (!sock || (count && !buf)) OE_RAISE_ERRNO(OE_EINVAL); if (oe_syscall_send_ocall(&ret, sock->host_fd, buf, count, ...
1
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
153,316,703,741,214,740,000,000,000,000,000,000,000
20
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
CImg<T>& cut(const T& min_value, const T& max_value) { if (is_empty()) return *this; const T a = min_value<max_value?min_value:max_value, b = min_value<max_value?max_value:min_value; cimg_openmp_for(*this,cimg::cut(*ptr,a,b),32768); return *this; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
71,697,350,195,243,120,000,000,000,000,000,000,000
6
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
ioeventfd_release(struct _ioeventfd *p) { eventfd_ctx_put(p->eventfd); list_del(&p->list); kfree(p); }
0
[ "CWE-20", "CWE-617" ]
linux
36ae3c0a36b7456432fedce38ae2f7bd3e01a563
316,753,361,322,700,120,000,000,000,000,000,000,000
6
KVM: Don't accept obviously wrong gsi values via KVM_IRQFD We cannot add routes for gsi values >= KVM_MAX_IRQ_ROUTES -- see kvm_set_irq_routing(). Hence, there is no sense in accepting them via KVM_IRQFD. Prevent them from entering the system in the first place. Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de> Si...
void WebContents::Print(gin_helper::Arguments* args) { gin_helper::Dictionary options = gin::Dictionary::CreateEmpty(args->isolate()); base::Value settings(base::Value::Type::DICTIONARY); if (args->Length() >= 1 && !args->GetNext(&options)) { args->ThrowError("webContents.print(): Invalid print setting...
0
[ "CWE-284", "CWE-693" ]
electron
18613925610ba319da7f497b6deed85ad712c59b
142,516,265,582,482,890,000,000,000,000,000,000,000
171
refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25108) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL * spec: add test for x-site _top navigation * chore: old cod...
int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size) { int space; unsigned long __flags; struct tty_buffer *tb; spin_lock_irqsave(&tty->buf.lock, __flags); space = __tty_buffer_request_room(tty, size); tb = tty->buf.tail; if (likely(space)) { *chars =...
0
[]
linux
c56a00a165712fd73081f40044b1e64407bb1875
65,888,228,118,049,230,000,000,000,000,000,000,000
19
tty: hold lock across tty buffer finding and buffer filling tty_buffer_request_room is well protected, but while after it returns, it releases the port->lock. tty->buf.tail might be modified by either irq handler or other threads. The patch adds more protection by holding the lock across tty buffer finding and buffer...
_get_default_dir (GFile *directory) { if (! _g_file_is_temp_dir (directory)) return g_object_ref (directory); else return NULL; }
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
4,327,881,419,544,205,500,000,000,000,000,000,000
7
libarchive: sanitize filenames before extracting
authzPrettyNormal( struct berval *val, struct berval *normalized, void *ctx, int normalize ) { struct berval bv; int rc = LDAP_INVALID_SYNTAX; LDAPURLDesc *ludp = NULL; char *lud_dn = NULL, *lud_filter = NULL; int scope = -1; /* * 1) <DN> * 2) dn[.{exact|children|subtree|onelevel}]:{*|<DN>} * 3...
1
[ "CWE-617" ]
openldap
02dfc32d658fadc25e4040f78e36592f6e1e1ca0
194,645,231,422,927,800,000,000,000,000,000,000,000
404
ITS#9406 fix debug msg
std::vector<ConstDataRange> transformVector(const std::vector<std::vector<std::uint8_t>>& input) { std::vector<ConstDataRange> output; output.reserve(input.size()); std::transform(begin(input), end(input), std::back_inserter(output), [](auto&& vec) { return makeCDR(vec); }); return output...
0
[ "CWE-20" ]
mongo
722f06f3217c029ef9c50062c8cc775966fd7ead
302,800,298,076,576,220,000,000,000,000,000,000,000
11
SERVER-38275 ban find explain with UUID
static inline void tcp_check_send_head(struct sock *sk, struct sk_buff *skb_unlinked) { if (sk->sk_send_head == skb_unlinked) sk->sk_send_head = NULL; if (tcp_sk(sk)->highest_sack == skb_unlinked) tcp_sk(sk)->highest_sack = NULL; }
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
5,947,355,706,701,478,000,000,000,000,000,000,000
7
tcp: fix use after free in tcp_xmit_retransmit_queue() When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the tail of the write queue using tcp_add_write_queue_tail() Then it attempts to copy user data into this fresh skb. If the copy fails, we undo the work and remove the fresh skb. Unfortunately, t...
inline CImg<_cimg_Tfloat> invert(const CImg<T>& instance, const bool use_LU=true) { return instance.get_invert(use_LU); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
311,235,245,825,280,600,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void on_page_prepare(GtkNotebook *assistant, GtkWidget *page, gpointer user_data) { //int page_no = gtk_assistant_get_current_page(g_assistant); //log_ready_state(); /* This suppresses [Last] button: assistant thinks that * we never have this page ready unless we are on it * -> therefore t...
1
[ "CWE-200" ]
libreport
257578a23d1537a2d235aaa2b1488ee4f818e360
230,570,117,251,994,230,000,000,000,000,000,000,000
97
wizard: fix save users changes after reviewing dump dir files If the user reviewed the dump dir's files during reporting the crash, the changes was thrown away and original data was passed to the bugzilla bug report. report-gtk saves the first text view buffer and then reloads data from the reported problem directory...
GF_Err SFScript_Parse(GF_BifsDecoder *codec, SFScript *script_field, GF_BitStream *bs, GF_Node *n) { GF_Err e; u32 i, count, nbBits; char *ptr; ScriptParser parser; e = GF_OK; if (gf_node_get_tag(n) != TAG_MPEG4_Script) return GF_NON_COMPLIANT_BITSTREAM; memset(&parser, 0, sizeof(ScriptParser)); parser.codec =...
0
[ "CWE-476" ]
gpac
4e7736d7ec7bf64026daa611da951993bb42fdaf
264,341,026,713,446,400,000,000,000,000,000,000,000
72
fixed #2238
*/ int netdev_master_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, void *upper_priv, void *upper_info, struct netlink_ext_ack *extack) { return __netdev_upper_dev_link(dev, upper_dev, true, upper_priv, upper_info, extack);
0
[ "CWE-416" ]
linux
a4270d6795b0580287453ea55974d948393e66ef
182,516,875,152,341,570,000,000,000,000,000,000,000
8
net-gro: fix use-after-free read in napi_gro_frags() If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might be freed and reused. Reading eth->h_proto at the en...
static int ptrace_getcrunchregs(struct task_struct *tsk, void __user *ufp) { struct thread_info *thread = task_thread_info(tsk); crunch_task_disable(thread); /* force it to ram */ return copy_to_user(ufp, &thread->crunchstate, CRUNCH_SIZE) ? -EFAULT : 0; }
0
[ "CWE-284", "CWE-264" ]
linux
a4780adeefd042482f624f5e0d577bf9cdcbb760
23,755,849,686,312,392,000,000,000,000,000,000,000
8
ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to prevent it from being used as a covert channel between two tasks. There are more and more applications coming to Windows RT, Wine could support them, but mostly they ...
can_browse (EBookBackend *backend) { ESource *source; ESourceLDAP *extension; const gchar *extension_name; if (!E_IS_BOOK_BACKEND (backend)) return FALSE; source = e_backend_get_source (E_BACKEND (backend)); extension_name = E_SOURCE_EXTENSION_LDAP_BACKEND; extension = e_source_get_extension (source, extensi...
0
[]
evolution-data-server
34bad61738e2127736947ac50e0c7969cc944972
84,096,163,559,837,450,000,000,000,000,000,000,000
15
Bug 796174 - strcat() considered unsafe for buffer overflow
CBINDInstallDlg::GetCurrentServiceAccountName() { HKEY hKey; BOOL keyFound = FALSE; char accountName[MAX_PATH]; DWORD nameLen = MAX_PATH; CString Tmp; m_accountUsed = FALSE; memset(accountName, 0, nameLen); if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, BIND_SERVICE_SUBKEY, 0, KEY_READ, &hKey) == ERROR_SUCCESS) { ke...
0
[ "CWE-284" ]
bind9
967a3b9419a3c12b8c0870c86d1ee3840bcbbad7
184,778,120,737,818,670,000,000,000,000,000,000,000
45
[master] quote service registry paths 4532. [security] The BIND installer on Windows used an unquoted service path, which can enable privilege escalation. (CVE-2017-3141) [RT #45229]
static void reset_active(struct i915_request *rq, struct intel_engine_cs *engine) { struct intel_context * const ce = rq->hw_context; u32 head; /* * The executing context has been cancelled. We want to prevent * further execution along this context and propagate the error on * to anything depending on its...
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
284,702,890,034,524,460,000,000,000,000,000,000,000
39
drm/i915/gen9: Clear residual context state on context switch Intel ID: PSIRT-TA-201910-001 CVEID: CVE-2019-14615 Intel GPU Hardware prior to Gen11 does not clear EU state during a context switch. This can result in information leakage between contexts. For Gen8 and Gen9, hardware provides a mechanism for fast clear...
TEST(ExpressionTypeTest, WithLongValue) { assertExpectedResults("$type", {{{Value(1LL)}, Value("long"_sd)}}); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
66,342,190,268,447,650,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
void Item_ref::print(String *str, enum_query_type query_type) { if (ref) { if ((*ref)->type() != Item::CACHE_ITEM && (*ref)->type() != Item::WINDOW_FUNC_ITEM && ref_type() != VIEW_REF && !table_name && name.str && alias_name_used) { THD *thd= current_thd; append_identifie...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
216,807,999,031,262,530,000,000,000,000,000,000,000
18
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
xmlParseDocument(xmlParserCtxtPtr ctxt) { xmlChar start[4]; xmlCharEncoding enc; xmlInitParser(); if ((ctxt == NULL) || (ctxt->input == NULL)) return(-1); GROW; /* * SAX: detecting the level. */ xmlDetectSAX2(ctxt); /* * SAX: beginning of the document processi...
0
[ "CWE-119" ]
libxml2
e50ba8164eee06461c73cd8abb9b46aa0be81869
236,602,315,575,403,200,000,000,000,000,000,000,000
171
Improve handling of xmlStopParser() Add a specific parser error Try to stop parsing as quickly as possible
bool is_sameXZ(const CImg<t>& img) const { return is_sameXZ(img._width,img._depth); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
185,081,664,941,044,980,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
sec_recv(uint8 * rdpver) { uint32 sec_flags; uint16 channel; STREAM s; while ((s = mcs_recv(&channel, rdpver)) != NULL) { if (rdpver != NULL) { if (*rdpver != 3) { if (*rdpver & 0x80) { in_uint8s(s, 8); /* signature */ sec_decrypt(s->p, s->end - s->p); } return s; } } if...
1
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
282,574,726,371,779,730,000,000,000,000,000,000,000
96
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
static gboolean out_stream_ready_cb(GObject *pollable_stream, gpointer user_data) { return do_write(user_data, FALSE); }
0
[ "CWE-362" ]
spice-vd_agent
51c415df82a52e9ec033225783c77df95f387891
220,181,091,343,502,800,000,000,000,000,000,000,000
5
Avoids user session hijacking Avoids user hijacking sessions by reusing PID. In theory an attacker could: - open a connection to the daemon; - fork and exit the process but keep the file descriptor open (inheriting or duplicating it in forked process); - force OS to recycle the initial PID, by creating many short li...
static void usbredir_chardev_read(void *opaque, const uint8_t *buf, int size) { USBRedirDevice *dev = opaque; /* No recursion allowed! */ assert(dev->read_buf == NULL); dev->read_buf = buf; dev->read_buf_size = size; usbredirparser_do_read(dev->parser); /* Send any acks, etc. which may be...
0
[ "CWE-770" ]
qemu
7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986
116,051,759,796,683,500,000,000,000,000,000,000,000
14
usb/redir: avoid dynamic stack allocation (CVE-2021-3527) Use autofree heap allocation instead. Fixes: 4f4321c11ff ("usb: use iovecs in USBPacket") Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id:...
int prepare_revision_walk(struct rev_info *revs) { int i; struct object_array old_pending; struct commit_list **next = &revs->commits; memcpy(&old_pending, &revs->pending, sizeof(old_pending)); revs->pending.nr = 0; revs->pending.alloc = 0; revs->pending.objects = NULL; for (i = 0; i < old_pending.nr; i++) { ...
0
[]
git
a937b37e766479c8e780b17cce9c4b252fd97e40
12,504,832,961,683,430,000,000,000,000,000,000,000
45
revision: quit pruning diff more quickly when possible When the revision traversal machinery is given a pathspec, we must compute the parent-diff for each commit to determine which ones are TREESAME. We set the QUICK diff flag to avoid looking at more entries than we need; we really just care whether there are any cha...
unsigned int xen_netbk_count_skb_slots(struct xenvif *vif, struct sk_buff *skb) { unsigned int count; int i, copy_off; count = DIV_ROUND_UP(skb_headlen(skb), PAGE_SIZE); copy_off = skb_headlen(skb) % PAGE_SIZE; if (skb_shinfo(skb)->gso_size) count++; for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { unsig...
0
[ "CWE-399" ]
linux
7d5145d8eb2b9791533ffe4dc003b129b9696c48
296,266,751,407,339,800,000,000,000,000,000,000,000
47
xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop. Signed-off-by: Matthew Daley <mattjd@gmail.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jan Beulich <JBeulich@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static int v9fs_write_inode_dotl(struct inode *inode, struct writeback_control *wbc) { int ret; struct v9fs_inode *v9inode; /* * send an fsync request to server irrespective of * wbc->sync_mode. */ v9inode = V9FS_I(inode); p9_debug(P9_DEBUG_VFS, "%s: inode %p, writeback_fid %p\n", __func__, inode, v9...
0
[ "CWE-835" ]
linux
5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f
109,408,571,363,455,600,000,000,000,000,000,000,000
22
9p: use inode->i_lock to protect i_size_write() under 32-bit Use inode->i_lock to protect i_size_write(), else i_size_read() in generic_fillattr() may loop infinitely in read_seqcount_begin() when multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl() simultaneously under 32-bit SMP environment, and a...
static u32 *set_offsets(u32 *regs, const u8 *data, const struct intel_engine_cs *engine) #define NOP(x) (BIT(7) | (x)) #define LRI(count, flags) ((flags) << 6 | (count)) #define POSTED BIT(0) #define REG(x) (((x) >> 2) | BUILD_BUG_ON_ZERO(x >= 0x200)) #define REG16(x) \ (((x) >> 9) | BIT(7) | BUILD_BUG_ON_ZERO(x...
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
214,747,619,573,250,100,000,000,000,000,000,000,000
51
drm/i915/gen9: Clear residual context state on context switch Intel ID: PSIRT-TA-201910-001 CVEID: CVE-2019-14615 Intel GPU Hardware prior to Gen11 does not clear EU state during a context switch. This can result in information leakage between contexts. For Gen8 and Gen9, hardware provides a mechanism for fast clear...
static void release_unused_pictures(H264Context *h, int remove_current) { int i; /* release non reference frames */ for (i = 0; i < MAX_PICTURE_COUNT; i++) { if (h->DPB[i].f.buf[0] && !h->DPB[i].reference && (remove_current || &h->DPB[i] != h->cur_pic_ptr)) { unref_picture(h...
0
[ "CWE-703" ]
FFmpeg
8a3b85f3a7952c54a2c36ba1797f7e0cde9f85aa
26,919,003,009,697,790,000,000,000,000,000,000,000
12
avcodec/h264: update current_sps & sps->new only after the whole slice header decoder and init code finished This avoids them being cleared before the full initialization finished Fixes out of array read Fixes: asan_heap-oob_f0c5e6_7071_cov_1605985132_mov_h264_aac__Demo_FlagOfOurFathers.mov Found-by: Mateusz "j00ru" ...
static int ntop_nagios_withdraw_alert(lua_State* vm) { NagiosManager *nagios = ntop->getNagios(); char *alert_source; char *timespan; char *alarmed_metric; char *alert_msg; ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__); if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TSTRING)) return...
0
[ "CWE-476" ]
ntopng
01f47e04fd7c8d54399c9e465f823f0017069f8f
177,848,835,931,280,130,000,000,000,000,000,000,000
26
Security fix: prevents empty host from being used
static BOOL security_md5_16_32_32_Allow_FIPS(const BYTE* in0, const BYTE* in1, const BYTE* in2, BYTE* output) { WINPR_DIGEST_CTX* md5 = NULL; BOOL result = FALSE; if (!(md5 = winpr_Digest_New())) return FALSE; if (!winpr_Digest_Init_Allow_FIPS(md5, WINPR_MD_MD5)) go...
0
[ "CWE-125", "CWE-787" ]
FreeRDP
d6cd14059b257318f176c0ba3ee0a348826a9ef8
223,118,257,008,187,660,000,000,000,000,000,000,000
24
Fixed GHSL-2020-101 missing NULL check (cherry picked from commit b207dbba35c505bbc3ad5aadc10b34980c6b7e8e)
static int nl80211_register_mgmt(struct sk_buff *skb, struct genl_info *info) { struct cfg80211_registered_device *rdev = info->user_ptr[0]; struct net_device *dev = info->user_ptr[1]; u16 frame_type = IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ACTION; if (!info->attrs[NL80211_ATTR_FRAME_MATCH]) return -EINVAL; i...
0
[ "CWE-362", "CWE-119" ]
linux
208c72f4fe44fe09577e7975ba0e7fa0278f3d03
322,070,890,871,195,500,000,000,000,000,000,000,000
30
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...
get_ruser(pam_handle_t *pamh, char *ruserbuf, size_t ruserbuflen) { const void *ruser; struct passwd *pwd; if (ruserbuf == NULL || ruserbuflen < 1) return -2; /* Get the name of the source user. */ if (pam_get_item(pamh, PAM_RUSER, &ruser) != PAM_SUCCESS) { ruser = NULL; } if ((ruser == NULL) || (strlen(rus...
1
[ "CWE-22" ]
linux-pam
9dcead87e6d7f66d34e7a56d11a30daca367dffb
227,818,384,334,126,300,000,000,000,000,000,000,000
25
pam_timestamp: fix potential directory traversal issue (ticket #27) pam_timestamp uses values of PAM_RUSER and PAM_TTY as components of the timestamp pathname it creates, so extra care should be taken to avoid potential directory traversal issues. * modules/pam_timestamp/pam_timestamp.c (check_tty): Treat "." and ".....
eb_get_vma(const struct i915_execbuffer *eb, unsigned long handle) { if (eb->lut_size < 0) { if (handle >= -eb->lut_size) return NULL; return eb->vma[handle]; } else { struct hlist_head *head; struct i915_vma *vma; head = &eb->buckets[hash_32(handle, eb->lut_size)]; hlist_for_each_entry(vma, head, exe...
0
[ "CWE-20" ]
linux
594cc251fdd0d231d342d88b2fdff4bc42fb0690
306,060,671,951,125,540,000,000,000,000,000,000,000
18
make 'user_access_begin()' do 'access_ok()' Originally, the rule used to be that you'd have to do access_ok() separately, and then user_access_begin() before actually doing the direct (optimized) user access. But experience has shown that people then decide not to do access_ok() at all, and instead rely on it being i...
static int rx_queue_add_kobject(struct net_device *dev, int index) { struct netdev_rx_queue *queue = dev->_rx + index; struct kobject *kobj = &queue->kobj; int error = 0; kobj->kset = dev->queues_kset; error = kobject_init_and_add(kobj, &rx_queue_ktype, NULL, "rx-%u", index); if (error) return error;...
1
[]
linux
a3e23f719f5c4a38ffb3d30c8d7632a4ed8ccd9e
41,613,451,738,224,333,000,000,000,000,000,000,000
25
net-sysfs: call dev_hold if kobject_init_and_add success In netdev_queue_add_kobject and rx_queue_add_kobject, if sysfs_create_group failed, kobject_put will call netdev_queue_release to decrease dev refcont, however dev_hold has not be called. So we will see this while unregistering dev: unregister_netdevice: waitin...
hmfcb(void *clientp, const char *msg, const char *url) { CbData *data = clientp; if (data->hmfcb) return data->hmfcb(data->userdata, msg, url, data->metadata); return LR_CB_OK; }
0
[ "CWE-22" ]
librepo
7daea2a2429a54dad68b1de9b37a5f65c5cf2600
205,748,627,288,375,270,000,000,000,000,000,000,000
7
Validate path read from repomd.xml (RhBug:1868639) = changelog = msg: Validate path read from repomd.xml type: security resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1868639
njs_promise_host_rejection_tracker(njs_vm_t *vm, njs_promise_t *promise, njs_promise_rejection_type_t operation) { uint32_t i, length; njs_value_t *value; njs_promise_data_t *data; if (vm->options.unhandled_rejection == NJS_VM_OPT_UNHANDLED_REJECTION_IGNORE) { ...
0
[ "CWE-416", "CWE-703" ]
njs
31ed93a5623f24ca94e6d47e895ba735d9d97d46
43,589,469,751,276,890,000,000,000,000,000,000,000
49
Fixed aggregation methods of Promise ctor with array-like object. Previously, while iterating over an array-like object the methods may be resolved with INVALID values. INVALID value is a special internal type which should never be visible by ordinary functions. The fix is to ensure that absent elements are represent...
explicit FractionalAvgPoolGradOp(OpKernelConstruction* context) : OpKernel(context) { OP_REQUIRES_OK(context, context->GetAttr("overlapping", &overlapping_)); }
0
[ "CWE-476", "CWE-787" ]
tensorflow
0f931751fb20f565c4e94aa6df58d54a003cdb30
191,231,920,669,942,300,000,000,000,000,000,000,000
4
Validate dimensions of input tensor in `FractionalAvgPoolGrad` PiperOrigin-RevId: 388286227 Change-Id: Ieb7566155e92acc8993a2212c76deacadc0edc8a
TIFFWriteScanline(TIFF* tif, void* buf, uint32 row, uint16 sample) { static const char module[] = "TIFFWriteScanline"; register TIFFDirectory *td; int status, imagegrew = 0; uint32 strip; if (!WRITECHECKSTRIPS(tif, module)) return (-1); /* * Handle delayed allocation of data buffer. This * permits it to b...
0
[ "CWE-119", "CWE-787" ]
libtiff
83a4b92815ea04969d494416eaae3d4c6b338e4a
207,303,879,258,178,640,000,000,000,000,000,000,000
131
* tools/tiffcrop.c: fix various out-of-bounds write vulnerabilities in heap or stack allocated buffers. Reported as MSVR 35093, MSVR 35096 and MSVR 35097. Discovered by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. * tools/tiff2pdf.c: fix out-of-bounds write vulnerabilities in heap a...
static inline int check_access(struct snd_seq_queue *q, int client) { return (q->owner == client) || (!q->locked && !q->klocked); }
0
[ "CWE-362" ]
linux
3567eb6af614dac436c4b16a8d426f9faed639b3
201,796,566,051,935,700,000,000,000,000,000,000,000
4
ALSA: seq: Fix race at timer setup and close ALSA sequencer code has an open race between the timer setup ioctl and the close of the client. This was triggered by syzkaller fuzzer, and a use-after-free was caught there as a result. This patch papers over it by adding a proper queue->timer_mutex lock around the timer...
PHP_FUNCTION(xsl_xsltprocessor_set_parameter) { zval *id; zval *array_value, **entry, *new_string; xsl_object *intern; char *string_key, *name, *value, *namespace; ulong idx; int string_key_len, namespace_len, name_len, value_len; DOM_GET_THIS(id); if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_N...
1
[]
php-src
1744be2d17befc69bf00033993f4081852a747d6
311,236,772,981,257,080,000,000,000,000,000,000,000
47
Fix for bug #69782
static int iowarrior_probe(struct usb_interface *interface, const struct usb_device_id *id) { struct usb_device *udev = interface_to_usbdev(interface); struct iowarrior *dev = NULL; struct usb_host_interface *iface_desc; struct usb_endpoint_descriptor *endpoint; int i; int retval = -ENOMEM; /* allocate me...
1
[ "CWE-703" ]
linux
4ec0ef3a82125efc36173062a50624550a900ae0
302,877,409,623,173,240,000,000,000,000,000,000,000
115
USB: iowarrior: fix oops with malicious USB descriptors The iowarrior driver expects at least one valid endpoint. If given malicious descriptors that specify 0 for the number of endpoints, it will crash in the probe function. Ensure there is at least one endpoint on the interface before using it. The full report of...
RZ_API const char *rz_bin_dwarf_get_attr_name(ut64 attr_code) { if (attr_code < RZ_ARRAY_SIZE(dwarf_attr_encodings)) { return dwarf_attr_encodings[attr_code]; } // the below codes are much sparser, so putting them in an array would require a lot of // unused memory switch (attr_code) { case DW_AT_lo_user: ret...
0
[ "CWE-787" ]
rizin
aa6917772d2f32e5a7daab25a46c72df0b5ea406
271,123,517,050,712,200,000,000,000,000,000,000,000
49
Fix oob write for dwarf with abbrev with count 0 (Fix #2083) (#2086)
static int check_is_mount(const char *last, const char *mnt) { pid_t pid, p; int status; const char *a[2] = { last, mnt }; pid = clone_newns((void *) a); if (pid == (pid_t) -1) { fprintf(stderr, "%s: failed to clone namespace: %s\n", progname, strerror(errno)); return -1; } p = waitpid(pid, &status, __WC...
0
[ "CWE-269" ]
libfuse
28bdae3d113ef479c1660a581ef720cdc33bf466
184,334,662,371,471,960,000,000,000,000,000,000,000
28
fusermount: don't feed "escaped commas" into mount options The old code permits the following behavior: $ _FUSE_COMMFD=10000 priv_strace -etrace=mount -s200 fusermount -o 'foobar=\,allow_other' mount mount("/dev/fuse", ".", "fuse", MS_NOSUID|MS_NODEV, "foobar=\\,allow_other,fd=3,rootmode=40000,user_id=1000,group_id=1...
void GrpcHealthCheckerImpl::GrpcActiveHealthCheckSession::decodeData(Buffer::Instance& data, bool end_stream) { if (end_stream) { onRpcComplete(Grpc::Status::WellKnownGrpcStatus::Internal, "gRPC protocol violation: unexpected s...
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
146,187,056,663,073,250,000,000,000,000,000,000,000
33
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
void CLASS parse_ciff (int offset, int length, int depth) { int tboff, nrecs, c, type, len, save, wbi=-1; ushort key[] = { 0x410, 0x45f3 }; fseek (ifp, offset+length-4, SEEK_SET); tboff = get4() + offset; fseek (ifp, tboff, SEEK_SET); nrecs = get2(); if ((nrecs | depth) > 127) return; while (nrecs--) {...
0
[ "CWE-190" ]
LibRaw
1334647862b0c90b2e8cb2f668e66627d9517b17
206,534,448,639,863,050,000,000,000,000,000,000,000
161
parse_qt: possible integer overflow
START_TEST(virgl_test_transfer_inline_invalid) { virgl_test_transfer_inline(_i, true, 0); }
0
[ "CWE-909" ]
virglrenderer
b05bb61f454eeb8a85164c8a31510aeb9d79129c
17,163,366,773,531,020,000,000,000,000,000,000,000
4
vrend: clear memory when allocating a host-backed memory resource Closes: #249 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
explicit C_Tick_WithoutOSDLock(OSD *o) : osd(o) {}
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
112,973,595,709,677,400,000,000,000,000,000,000,000
1
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static int reset_saslconn(sasl_conn_t **conn) { int ret; sasl_security_properties_t *secprops = NULL; sasl_dispose(conn); /* do initialization typical of service_main */ ret = sasl_server_new("nntp", config_servername, NULL, NULL, NULL, NULL, SASL_...
0
[ "CWE-119" ]
cyrus-imapd
0f8f026699829b65733c3081657b24e2174f4f4d
291,119,184,706,001,300,000,000,000,000,000,000,000
43
CVE-2011-3208 - fix buffer overflow in nntpd
int tls12_get_req_sig_algs(SSL *s, unsigned char *p) { size_t slen = sizeof(tls12_sigalgs); if (p) memcpy(p, tls12_sigalgs, slen); return (int)slen; }
0
[]
openssl
96db9023b881d7cd9f379b0c154650d6c108e9a3
22,272,443,763,397,593,000,000,000,000,000,000,000
7
Add heartbeat extension bounds check. A missing bounds check in the handling of the TLS heartbeat extension can be used to reveal up to 64k of memory to a connected client or server. Thanks for Neel Mehta of Google Security for discovering this bug and to Adam Langley <agl@chromium.org> and Bodo Moeller <bmoeller@acm...
size_t vterm_output_read(VTerm *vt, char *buffer, size_t len) { if(len > vt->outbuffer_cur) len = vt->outbuffer_cur; memcpy(buffer, vt->outbuffer, len); if(len < vt->outbuffer_cur) memmove(vt->outbuffer, vt->outbuffer + len, vt->outbuffer_cur - len); vt->outbuffer_cur -= len; return len; }
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
227,331,205,981,881,280,000,000,000,000,000,000,000
14
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
static int hiddev_open(struct inode *inode, struct file *file) { struct hiddev_list *list; struct usb_interface *intf; struct hid_device *hid; struct hiddev *hiddev; int res; intf = usbhid_find_interface(iminor(inode)); if (!intf) return -ENODEV; hid = usb_get_intfdata(intf); hiddev = hid->hiddev; if (!(l...
0
[ "CWE-416" ]
linux
6d4472d7bec39917b54e4e80245784ea5d60ce49
218,157,105,491,738,030,000,000,000,000,000,000,000
73
HID: hiddev: do cleanup in failure of opening a device Undo what we did for opening before releasing the memory slice. Reported-by: syzbot <syzbot+62a1e04fd3ec2abf099e@syzkaller.appspotmail.com> Cc: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Hillf Danton <hdanton@sina.com> Signed-off-by: Jiri Kosina <jko...
file_info_stop (NautilusDirectory *directory) { NautilusFile *file; if (directory->details->get_info_in_progress != NULL) { file = directory->details->get_info_file; if (file != NULL) { g_assert (NAUTILUS_IS_FILE (file)); g_assert (file->details->directory == directory); if (is_needy (file, lacks_info, ...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
2,327,064,079,366,482,500,000,000,000,000,000,000
18
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
TEST_F(QuicServerTransportTest, RecvNewConnectionIdNoopValidDuplicate) { auto& conn = server->getNonConstConn(); conn.transportSettings.selfActiveConnectionIdLimit = 1; ConnectionId connId2({5, 5, 5, 5}); conn.peerConnectionIds.emplace_back(connId2, 1); ShortHeader header(ProtectionType::KeyPhaseZero, *conn...
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
15,640,426,771,359,667,000,000,000,000,000,000,000
21
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 void property_set_discoverable_timeout( const GDBusPropertyTable *property, DBusMessageIter *iter, GDBusPendingPropertySet id, void *user_data) { struct btd_adapter *adapter = user_data; bool enabled; dbus_uint32_t value; dbus_message_iter_get_basic(iter, &value); adapter->discoverable_timeout...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
50,031,482,667,055,940,000,000,000,000,000,000,000
35
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.
GF_Err SFScript_Parse(GF_BifsDecoder *codec, SFScript *script_field, GF_BitStream *bs, GF_Node *n) { GF_Err e; u32 i, count, nbBits; char *ptr; ScriptParser parser; e = GF_OK; if (gf_node_get_tag(n) != TAG_MPEG4_Script) return GF_NON_COMPLIANT_BITSTREAM; parser.codec = codec; parser.script = n; parser.bs = bs...
1
[ "CWE-476" ]
gpac
4e7736d7ec7bf64026daa611da951993bb42fdaf
86,715,484,296,562,060,000,000,000,000,000,000,000
67
fixed #2238
void tcf_block_netif_keep_dst(struct tcf_block *block) { struct tcf_block_owner_item *item; block->keep_dst = true; list_for_each_entry(item, &block->owner_list, list) tcf_block_owner_netif_keep_dst(block, item->q, item->binder_type); }
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
174,763,940,177,857,640,000,000,000,000,000,000,000
9
net: sched: fix use-after-free in tc_new_tfilter() Whenever tc_new_tfilter() jumps back to replay: label, we need to make sure @q and @chain local variables are cleared again, or risk use-after-free as in [1] For consistency, apply the same fix in tc_ctl_chain() BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1...
void ssl2_free(SSL *s) { SSL2_STATE *s2; if (s == NULL) return; s2 = s->s2; if (s2->rbuf != NULL) OPENSSL_free(s2->rbuf); if (s2->wbuf != NULL) OPENSSL_free(s2->wbuf); OPENSSL_cleanse(s2, sizeof *s2); OPENSSL_free(s2); s->s2 = NULL; }
0
[ "CWE-20" ]
openssl
86f8fb0e344d62454f8daf3e15236b2b59210756
139,062,994,779,300,660,000,000,000,000,000,000,000
16
Fix reachable assert in SSLv2 servers. This assert is reachable for servers that support SSLv2 and export ciphers. Therefore, such servers can be DoSed by sending a specially crafted SSLv2 CLIENT-MASTER-KEY. Also fix s2_srvr.c to error out early if the key lengths are malformed. These lengths are sent unencrypted, so...
extern "C" void *SUB_CALLOC(size_t nmemb, size_t size) { void *ptr = NULL; #ifdef MBED_MEM_TRACING_ENABLED mbed_mem_trace_lock(); #endif #ifdef MBED_HEAP_STATS_ENABLED // Note - no lock needed since malloc is thread safe ptr = malloc(nmemb * size); if (ptr != NULL) { memset(ptr, 0, nmemb * s...
0
[ "CWE-190" ]
mbed-os
151ebfcfc9f2383ee11ce3c771c3bf92900d6b43
132,331,850,976,020,860,000,000,000,000,000,000,000
21
Add integer overflow check to the malloc wrappers Add a check that the combined size of the buffer to allocate and alloc_info_t does not exceed the maximum integer value representable by size_t.