func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static LZWInfo *AcquireLZWInfo(Image *image,const size_t data_size) { LZWInfo *lzw_info; register ssize_t i; size_t one; lzw_info=(LZWInfo *) AcquireMagickMemory(sizeof(*lzw_info)); if (lzw_info == (LZWInfo *) NULL) return((LZWInfo *) NULL); (void) memset(lzw_info,0,sizeof(*lzw_info)); ...
0
[ "CWE-401" ]
ImageMagick6
210474b2fac6a661bfa7ed563213920e93e76395
274,092,638,143,971,200,000,000,000,000,000,000,000
64
Fix ultra rare but potential memory-leak
virtio_dev_extbuf_alloc(struct rte_mbuf *pkt, uint32_t size) { struct rte_mbuf_ext_shared_info *shinfo = NULL; uint32_t total_len = RTE_PKTMBUF_HEADROOM + size; uint16_t buf_len; rte_iova_t iova; void *buf; /* Try to use pkt buffer to store shinfo to reduce the amount of memory * required, otherwise store shin...
0
[ "CWE-665" ]
dpdk
97ecc1c85c95c13bc66a87435758e93406c35c48
191,008,457,238,474,230,000,000,000,000,000,000,000
48
vhost: fix translated address not checked Malicious guest can construct desc with invalid address and zero buffer length. That will request vhost to check both translated address and translated data length. This patch will add missed address check. CVE-2020-10725 Fixes: 75ed51697820 ("vhost: add packed ring batch deq...
mlx5_tx_match_empw(struct mlx5_txq_data *restrict txq __rte_unused, struct mlx5_wqe_eseg *restrict es, struct mlx5_txq_local *restrict loc, uint32_t dlen, unsigned int olx) { uint8_t swp_flags = 0; /* Compare the checksum flags, if any. */ if (MLX5_TXOFF_CONFIG(CSUM) && txq_ol_cksum_to_cs(l...
0
[]
dpdk-stable
8b090f2664e9d014cd8fa0fde90597aaf4349e7e
303,509,415,644,092,700,000,000,000,000,000,000,000
31
net/mlx5: fix Rx queue recovery mechanism The local variables are getting inconsistent in data receiving routines after queue error recovery. Receive queue consumer index is getting wrong, need to reset one to the size of the queue (as RQ was fully replenished in recovery procedure). In MPRQ case, also the local cons...
static void refs_fn(struct cgit_context *ctx) { cgit_print_refs(); }
0
[]
cgit
02a545e63454530c1639014d3239c14ced2022c6
195,669,330,119,923,120,000,000,000,000,000,000,000
4
Add support for cloning over http This patch implements basic support for cloning over http, based on the work on git-http-backend by Shawn O. Pearce. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
bool PostgreSqlMigrationWriter::writeMo(const UserSettingMO &userSetting) { bindValue(0, userSetting.userid.toInt()); bindValue(1, userSetting.settingname); bindValue(2, userSetting.settingvalue); return exec(); }
0
[ "CWE-89" ]
quassel
aa1008be162cb27da938cce93ba533f54d228869
287,724,544,371,284,160,000,000,000,000,000,000,000
7
Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL. Properly detects whether Qt performs slash escaping in SQL queries or not, and then configures PostgreSQL accordingly. This bug was a introduced due to a bugfix in Qt 4.8.5 disables slash escaping when binding queries: https://bugreports.qt-project.org/brows...
static int snd_seq_ioctl_get_port_info(struct snd_seq_client *client, void __user *arg) { struct snd_seq_client *cptr; struct snd_seq_client_port *port; struct snd_seq_port_info info; if (copy_from_user(&info, arg, sizeof(info))) return -EFAULT; cptr = snd_seq_client_use_ptr(info.addr.client); if (c...
0
[ "CWE-703" ]
linux
030e2c78d3a91dd0d27fef37e91950dde333eba1
54,025,359,026,318,310,000,000,000,000,000,000,000
28
ALSA: seq: Fix missing NULL check at remove_events ioctl snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear() unconditionally even if there is no FIFO assigned, and this leads to an Oops due to NULL dereference. The fix is just to add a proper NULL check. Reported-by: Dmitry Vyukov <dvyukov@google.com> Tested-by...
TEST_F(ConnectionHandlerTest, ListenerFilterTimeout) { InSequence s; Network::ListenerCallbacks* listener_callbacks; auto listener = new NiceMock<Network::MockListener>(); TestListener* test_listener = addListener(1, true, false, "test_listener", listener, &listener_callbacks); EXPECT_CALL(*socket_fact...
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
318,577,021,417,496,500,000,000,000,000,000,000,000
42
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
n_shell_variables () { VAR_CONTEXT *vc; int n; for (n = 0, vc = shell_variables; vc; vc = vc->down) n += HASH_ENTRIES (vc->table); return n; }
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
40,476,392,503,153,310,000,000,000,000,000,000,000
9
commit bash-20120224 snapshot
PJ_DEF(pj_stun_attr_hdr*) pj_stun_attr_clone( pj_pool_t *pool, const pj_stun_attr_hdr *attr) { const struct attr_desc *adesc; /* Get the attribute descriptor */ adesc = find_attr_desc(attr->type); if (adesc) { return (pj_stun_attr_hdr*) (*adesc->clone_attr)(pool, attr); } else { /* Clo...
0
[ "CWE-191" ]
pjproject
15663e3f37091069b8c98a7fce680dc04bc8e865
326,316,553,095,828,730,000,000,000,000,000,000,000
21
Merge pull request from GHSA-2qpg-f6wf-w984
write_log(struct timespec *now, int combined_sources, double freq, double offset, double offset_sd, double uncorrected_offset, double orig_root_distance) { const char leap_codes[4] = {'N', '+', '-', '?'}; double root_dispersion, max_error; static double last_sys_offset = 0.0; if (logfileid ...
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
314,558,120,810,775,000,000,000,000,000,000,000,000
24
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
bool smbXcli_tcon_is_dfs_share(struct smbXcli_tcon *tcon) { if (tcon == NULL) { return false; } if (tcon->is_smb1) { if (tcon->smb1.optional_support & SMB_SHARE_IN_DFS) { return true; } return false; } if (tcon->smb2.capabilities & SMB2_SHARE_CAP_DFS) { return true; } return false; }
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
45,010,136,851,213,840,000,000,000,000,000,000,000
20
CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegCtxEx(gdIOCtx *infile, int ignore_warning) { struct jpeg_decompress_struct cinfo; struct jpeg_error_mgr jerr; jmpbuf_wrapper jmpbufw; /* volatile so we can gdFree them after longjmp */ volatile JSAMPROW row = 0; volatile gdImagePtr im = 0; JSAMPROW rowptr[1]; JDIMENS...
0
[ "CWE-415" ]
libgd
553702980ae89c83f2d6e254d62cf82e204956d0
205,383,750,656,245,970,000,000,000,000,000,000,000
270
Fix #492: Potential double-free in gdImage*Ptr() Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we must not call `gdDPExtractData()`; otherwise a double-free would happen. Since `gdImage*Ctx()` are void functions, and we can't change that for BC reasons, we're introducing static helpers which ar...
void reset_with_sum_func() { m_with_sum_func= false; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
304,221,909,582,831,860,000,000,000,000,000,000,000
1
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
int kernel_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen) { mm_segment_t oldfs = get_fs(); char __user *uoptval; int __user *uoptlen; int err; uoptval = (char __user __force *) optval; uoptlen = (int __user __force *) optlen; set_fs(KERNEL_DS); if (level == SOL_SOCKET) ...
0
[ "CWE-264" ]
net
4de930efc23b92ddf88ce91c405ee645fe6e27ea
218,713,805,715,270,730,000,000,000,000,000,000,000
20
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>
void disableRequestNote(request_rec *r) { RequestNote *note = getRequestNote(r); if (note != NULL) { note->enabled = false; } }
0
[ "CWE-59" ]
passenger
9dda49f4a3ebe9bafc48da1bd45799f30ce19566
230,919,350,476,754,940,000,000,000,000,000,000,000
6
Fixed a problem with graceful web server restarts. This problem was introduced in 4.0.6 during the attempt to fix issue #910.
static inline void iowarrior_delete(struct iowarrior *dev) { dev_dbg(&dev->interface->dev, "minor %d\n", dev->minor); kfree(dev->int_in_buffer); usb_free_urb(dev->int_in_urb); kfree(dev->read_queue); kfree(dev); }
0
[ "CWE-703" ]
linux
4ec0ef3a82125efc36173062a50624550a900ae0
123,855,488,696,808,050,000,000,000,000,000,000,000
8
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...
static int rose_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { struct sock *sk = sock->sk; struct rose_sock *rose = rose_sk(sk); struct sockaddr_rose *addr = (struct sockaddr_rose *)uaddr; struct net_device *dev; ax25_address *source; ax25_uid_assoc *user; int n; if (!sock_flag(sk, SOCK_ZAPP...
0
[ "CWE-200" ]
linux-2.6
17ac2e9c58b69a1e25460a568eae1b0dc0188c25
290,622,658,708,174,230,000,000,000,000,000,000,000
62
rose: Fix rose_getname() leak rose_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
PHP_METHOD(Phar, interceptFileFuncs) { if (zend_parse_parameters_none() == FAILURE) { return; } phar_intercept_functions(TSRMLS_C); }
0
[ "CWE-416" ]
php-src
b2cf3f064b8f5efef89bb084521b61318c71781b
334,290,535,652,951,870,000,000,000,000,000,000,000
7
Fixed bug #68901 (use after free)
int ssl3_send_client_certificate(SSL *s) { X509 *x509=NULL; EVP_PKEY *pkey=NULL; int i; if (s->state == SSL3_ST_CW_CERT_A) { /* Let cert callback update client certificates if required */ if (s->cert->cert_cb) { i = s->cert->cert_cb(s, s->cert->cert_cb_arg); if (i < 0) { s->rwstate=SSL_X509...
0
[]
openssl
17160033765480453be0a41335fa6b833691c049
287,416,427,673,023,620,000,000,000,000,000,000,000
93
Fix DTLS anonymous EC(DH) denial of service CVE-2014-3510 Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
g_tcp_set_non_blocking(int sck) { unsigned long i; #if defined(_WIN32) i = 1; ioctlsocket(sck, FIONBIO, &i); #else i = fcntl(sck, F_GETFL); i = i | O_NONBLOCK; fcntl(sck, F_SETFL, i); #endif return 0; }
0
[]
xrdp
d8f9e8310dac362bb9578763d1024178f94f4ecc
106,588,742,040,688,130,000,000,000,000,000,000,000
14
move temp files from /tmp to /tmp/.xrdp
static int io_prep_rw(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct kiocb *kiocb = &req->rw.kiocb; unsigned ioprio; int ret; kiocb->ki_pos = READ_ONCE(sqe->off); ioprio = READ_ONCE(sqe->ioprio); if (ioprio) { ret = ioprio_check_cap(ioprio); if (ret) return ret; kiocb->ki_ioprio = iopr...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
160,994,249,402,172,870,000,000,000,000,000,000,000
26
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
static void qxl_set_mode(PCIQXLDevice *d, unsigned int modenr, int loadvm) { pcibus_t start = d->pci.io_regions[QXL_RAM_RANGE_INDEX].addr; pcibus_t end = d->pci.io_regions[QXL_RAM_RANGE_INDEX].size + start; QXLMode *mode = d->modes->modes + modenr; uint64_t devmem = d->pci.io_regions[QXL_RAM_RANGE_IND...
0
[ "CWE-476" ]
qemu
d52680fc932efb8a2f334cc6993e705ed1e31e99
313,765,632,034,098,300,000,000,000,000,000,000,000
47
qxl: check release info object When releasing spice resources in release_resource() routine, if release info object 'ext.info' is null, it leads to null pointer dereference. Add check to avoid it. Reported-by: Bugs SysSec <bugs-syssec@rub.de> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Message-id: 20190425...
static void rtl8xxxu_cam_write(struct rtl8xxxu_priv *priv, struct ieee80211_key_conf *key, const u8 *mac) { u32 cmd, val32, addr, ctrl; int j, i, tmp_debug; tmp_debug = rtl8xxxu_debug; if (rtl8xxxu_debug & RTL8XXXU_DEBUG_KEY) rtl8xxxu_debug |= RTL8XXXU_DEBUG_REG_WRITE; /* * This is a bit of a hack ...
0
[ "CWE-400", "CWE-401" ]
linux
a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c
330,618,456,788,029,560,000,000,000,000,000,000,000
41
rtl8xxxu: prevent leaking urb In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
void kvm_arch_destroy_vm(struct kvm *kvm) { if (current->mm == kvm->mm) { /* * Free memory regions allocated on behalf of userspace, * unless the the memory map has changed due to process exit * or fd copying. */ struct kvm_userspace_memory_region mem; memset(&mem, 0, sizeof(mem)); mem.slot = APIC_...
0
[ "CWE-362" ]
linux
a2b9e6c1a35afcc0973acb72e591c714e78885ff
263,309,812,672,370,920,000,000,000,000,000,000,000
27
KVM: x86: Don't report guest userspace emulation error to userspace Commit fc3a9157d314 ("KVM: X86: Don't report L2 emulation failures to user-space") disabled the reporting of L2 (nested guest) emulation failures to userspace due to race-condition between a vmexit and the instruction emulator. The same rational appli...
static void circular_memcpy(uint8_t* dst, uint8_t* window, const uint64_t mask, int64_t start, int64_t end) { if((start & mask) > (end & mask)) { ssize_t len1 = mask + 1 - (start & mask); ssize_t len2 = end & mask; memcpy(dst, &window[start & mask], len1); memcpy(dst + len1, window, len2); } else { mem...
0
[ "CWE-20", "CWE-125" ]
libarchive
94821008d6eea81e315c5881cdf739202961040a
165,709,001,056,251,340,000,000,000,000,000,000,000
13
RAR5 reader: reject files that declare invalid header flags One of the fields in RAR5's base block structure is the size of the header. Some invalid files declare a 0 header size setting, which can confuse the unpacker. Minimum header size for RAR5 base blocks is 7 bytes (4 bytes for CRC, and 3 bytes for the rest), so...
gst_matroska_demux_set_index (GstElement * element, GstIndex * index) { GstMatroskaDemux *demux = GST_MATROSKA_DEMUX (element); GST_OBJECT_LOCK (demux); if (demux->common.element_index) gst_object_unref (demux->common.element_index); demux->common.element_index = index ? gst_object_ref (index) : NULL; GS...
0
[]
gst-plugins-good
9181191511f9c0be6a89c98b311f49d66bd46dc3
27,867,185,542,776,720,000,000,000,000,000,000,000
12
matroskademux: Fix extraction of multichannel WavPack The old code had a couple of issues that all lead to potential memory safety bugs. - Use a constant for the Wavpack4Header size instead of using sizeof. It's written out into the data and not from the struct and who knows what special alignment/padding r...
UnicodeCache* unicode_cache() { return unicode_cache_; }
0
[ "CWE-20", "CWE-119" ]
node
530af9cb8e700e7596b3ec812bad123c9fa06356
251,368,169,422,170,560,000,000,000,000,000,000,000
3
v8: Interrupts must not mask stack overflow. Backport of https://codereview.chromium.org/339883002
static ssize_t v4l2_loopback_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { struct v4l2_loopback_device *dev; int write_index; struct v4l2_buffer *b; MARK(); dev = v4l2loopback_getdevice(file); /* there's at least one writer, so don'stop announcing output capabilities */ dev->...
0
[ "CWE-787" ]
v4l2loopback
64a216af4c09c9ba9326057d7e78994271827eff
87,938,369,335,962,530,000,000,000,000,000,000,000
40
add explicit format specifier to printf() invocations CWE-134
static int init_context_frame(MpegEncContext *s) { int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y; s->mb_width = (s->width + 15) / 16; s->mb_stride = s->mb_width + 1; s->b8_stride = s->mb_width * 2 + 1; mb_array_size = s->mb_height * s->mb_stride; mv_table_size = (s->mb_...
0
[ "CWE-476" ]
FFmpeg
b3332a182f8ba33a34542e4a0370f38b914ccf7d
94,706,549,501,613,450,000,000,000,000,000,000,000
120
avcodec/idctdsp: Transmit studio_profile to init instead of using AVCodecContext profile These 2 fields are not always the same, it is simpler to always use the same field for detecting studio profile Fixes: null pointer dereference Fixes: ffmpeg_crash_3.avi Found-by: Thuan Pham <thuanpv@comp.nus.edu.sg>, Marcel Böh...
ring_buffer_read_events_cpu(struct ring_buffer *buffer, int cpu) { struct ring_buffer_per_cpu *cpu_buffer; if (!cpumask_test_cpu(cpu, buffer->cpumask)) return 0; cpu_buffer = buffer->buffers[cpu]; return cpu_buffer->read; }
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
120,281,759,389,398,200,000,000,000,000,000,000,000
10
ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this...
pfm_no_open(struct inode *irrelevant, struct file *dontcare) { DPRINT(("pfm_no_open called\n")); return -ENXIO; }
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
309,520,360,427,834,600,000,000,000,000,000,000,000
5
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
bool run(OperationContext* txn, const string& dbname, BSONObj& cmdObj, int options, string& errmsg, BSONObjBuilder& result) { RoleName roleName; PrivilegeVector privilegesToRemove; Status status = auth::parseAndValidateRolePriv...
0
[ "CWE-613" ]
mongo
64d8e9e1b12d16b54d6a592bae8110226c491b4e
203,436,409,977,339,700,000,000,000,000,000,000,000
86
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
bool Item_ref_null_helper::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate) { return (owner->was_null|= null_value= (*ref)->get_date_result(ltime, fuzzydate)); }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
139,056,536,641,231,360,000,000,000,000,000,000,000
4
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
PHP_FUNCTION(posix_mknod) { char *path; int path_len; long mode; long major = 0, minor = 0; int result; dev_t php_dev; php_dev = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|ll", &path, &path_len, &mode, &major, &minor) == FAILURE) { RETURN_FALSE; } if (strlen(path) != path_len) { RET...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
2,647,443,353,636,615,000,000,000,000,000,000,000
51
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
bool TABLE::alloc_keys(uint key_count) { key_info= (KEY*) alloc_root(&mem_root, sizeof(KEY)*(s->keys+key_count)); if (s->keys) memmove(key_info, s->key_info, sizeof(KEY)*s->keys); s->key_info= key_info; max_keys= s->keys+key_count; return !(key_info); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
135,728,333,061,539,240,000,000,000,000,000,000,000
9
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.
static NTSTATUS dcesrv_lsa_OpenTrustedDomain_common( struct dcesrv_call_state *dce_call, TALLOC_CTX *tmp_mem, struct lsa_policy_state *policy_state, const char *filter, uint32_t access_mask, struct dcesrv_handle **_handle) { struct lsa_trusted_domain_state *trusted_domain_state; struct d...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
116,749,891,196,694,540,000,000,000,000,000,000,000
81
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
PHP_FUNCTION(imageantialias) { zval *IM; zend_bool alias; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rb", &IM, &alias) == FAILURE) { return; } ZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, "Image", le_gd); gdImageAntialias(im, alias); RETURN_TRUE; }
0
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
120,693,784,411,396,530,000,000,000,000,000,000,000
14
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
static void deletelist (lua_State *L, GCObject *p, GCObject *limit) { while (p != limit) { GCObject *next = p->next; freeobj(L, p); p = next; } }
0
[ "CWE-125" ]
lua
127e7a6c8942b362aa3c6627f44d660a4fb75312
103,140,025,667,144,530,000,000,000,000,000,000,000
7
Fixed bug of old finalized objects in the GC When an object aged OLD1 is finalized, it is moved from the list 'finobj' to the *beginning* of the list 'allgc'. So, this part of the list (and not only the survival list) must be visited by 'markold'.
int __cil_ordered_list_insert(struct cil_list *old, struct cil_list_item *ocurr, struct cil_list_item *nstart, struct cil_list_item *nstop) { struct cil_list_item *ncurr = NULL; for (ncurr = nstart; ncurr != nstop; ncurr = ncurr->next) { ocurr = __cil_ordered_item_insert(old, ocurr, ncurr); if (ocurr == NULL) { ...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
256,474,890,914,322,250,000,000,000,000,000,000,000
12
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); struct ieee80211_chanctx_conf *chanctx_conf; struct ieee80211_channel *chan; struct ieee80211_radiotap_header *prthdr = (struct ieee80211_radiotap_header *)s...
0
[ "CWE-362" ]
linux
1d147bfa64293b2723c4fec50922168658e613ba
136,802,902,527,176,980,000,000,000,000,000,000,000
144
mac80211: fix AP powersave TX vs. wakeup race There is a race between the TX path and the STA wakeup: while a station is sleeping, mac80211 buffers frames until it wakes up, then the frames are transmitted. However, the RX and TX path are concurrent, so the packet indicating wakeup can be processed while a packet is b...
static __be32 nfsd_check_obj_isreg(struct svc_fh *fh) { umode_t mode = d_inode(fh->fh_dentry)->i_mode; if (S_ISREG(mode)) return nfs_ok; if (S_ISDIR(mode)) return nfserr_isdir; /* * Using err_symlink as our catch-all case may look odd; but * there's no other obvious error for this case in 4.0, and we * h...
0
[ "CWE-20", "CWE-129" ]
linux
b550a32e60a4941994b437a8d662432a486235a5
148,390,260,793,739,100,000,000,000,000,000,000,000
17
nfsd: fix undefined behavior in nfsd4_layout_verify UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34 shift exponent 128 is too large for 32-bit type 'int' Depending on compiler+architecture, this may cause the check for layout_type to succeed for overly large values (which seems to be the case with amd64)...
TEST_F(DateExpressionTest, ParsingRejectsEmptyObjectSpecification) { auto expCtx = getExpCtx(); for (auto&& expName : dateExpressions) { BSONObj spec = BSON(expName << BSONObj()); ASSERT_THROWS_CODE(Expression::parseExpression(expCtx, spec, expCtx->variablesParseState), ...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
301,481,132,248,213,170,000,000,000,000,000,000,000
9
SERVER-38070 fix infinite loop in agg expression
Field *Field_blob::new_key_field(MEM_ROOT *root, TABLE *new_table, uchar *new_ptr, uint32 length, uchar *new_null_ptr, uint new_null_bit) { Field_varstring *res= new (root) Field_varstring(new_ptr, length, 2, new_n...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
133,778,735,103,596,850,000,000,000,000,000,000,000
10
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
static void t_stop(struct seq_file *m, void *p) { mutex_unlock(&ftrace_lock); }
0
[ "CWE-703" ]
linux
6a76f8c0ab19f215af2a3442870eeb5f0e81998d
76,238,362,792,972,260,000,000,000,000,000,000,000
4
tracing: Fix possible NULL pointer dereferences Currently set_ftrace_pid and set_graph_function files use seq_lseek for their fops. However seq_open() is called only for FMODE_READ in the fops->open() so that if an user tries to seek one of those file when she open it for writing, it sees NULL seq_file and then panic...
void CLASS parsePentaxMakernotes(int base, unsigned tag, unsigned type, unsigned len, unsigned dng_writer) { int c; if (tag == 0x0005) { unique_id = get4(); setPentaxBodyFeatures(unique_id); } else if (tag == 0x0008) { /* 4 is raw, 7 is raw w/ pixel shift, 8 is raw w/ dynamic pixel shift */ imgda...
0
[ "CWE-400" ]
LibRaw
e67a9862d10ebaa97712f532eca1eb5e2e410a22
20,751,233,991,320,637,000,000,000,000,000,000
101
Fixed Secunia Advisory SA86384 - possible infinite loop in unpacked_load_raw() - possible infinite loop in parse_rollei() - possible infinite loop in parse_sinar_ia() Credits: Laurent Delosieres, Secunia Research at Flexera
static int sctp_getsockopt_maxburst(struct sock *sk, int len, char __user *optval, int __user *optlen) { struct sctp_assoc_value params; struct sctp_association *asoc; if (len == sizeof(int)) { pr_warn_ratelimited(DEPRECATED "%s (pid %d) " "Use of int in max_burst socket option.\n"...
0
[ "CWE-362" ]
linux
b166a20b07382b8bc1dcee2a448715c9c2c81b5b
253,812,671,058,695,900,000,000,000,000,000,000,000
39
net/sctp: fix race condition in sctp_destroy_sock If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock held and sp->do_auto_asconf is true, then an element is removed from the auto_asconf_splist without any proper locking. This can happen in the following functions: 1. In sctp_accept, if sctp_sock_m...
static struct sk_buff *tun_ring_recv(struct tun_file *tfile, int noblock, int *err) { DECLARE_WAITQUEUE(wait, current); struct sk_buff *skb = NULL; int error = 0; skb = skb_array_consume(&tfile->tx_array); if (skb) goto out; if (noblock) { error = -EAGAIN; goto out; } add_wait_queue(&tfile->wq....
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
269,675,176,985,283,550,000,000,000,000,000,000,000
41
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
keyword(identifier arg, expr_ty value, PyArena *arena) { keyword_ty p; if (!value) { PyErr_SetString(PyExc_ValueError, "field value is required for keyword"); return NULL; } p = (keyword_ty)PyArena_Malloc(arena, sizeof(*p)); if (!p) return NULL; p-...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
52,008,789,913,739,080,000,000,000,000,000,000,000
15
bpo-35766: Merge typed_ast back into CPython (GH-11645)
static irqreturn_t __init i8042_aux_test_irq(int irq, void *dev_id) { unsigned long flags; unsigned char str, data; int ret = 0; spin_lock_irqsave(&i8042_lock, flags); str = i8042_read_status(); if (str & I8042_STR_OBF) { data = i8042_read_data(); dbg("%02x <- i8042 (aux_test_irq, %s)\n", data, str & I...
0
[ "CWE-476" ]
linux
340d394a789518018f834ff70f7534fc463d3226
48,204,908,343,277,570,000,000,000,000,000,000,000
21
Input: i8042 - fix crash at boot time The driver checks port->exists twice in i8042_interrupt(), first when trying to assign temporary "serio" variable, and second time when deciding whether it should call serio_interrupt(). The value of port->exists may change between the 2 checks, and we may end up calling serio_int...
string_title(PyStringObject *self) { char *s = PyString_AS_STRING(self), *s_new; Py_ssize_t i, n = PyString_GET_SIZE(self); int previous_is_cased = 0; PyObject *newobj; newobj = PyString_FromStringAndSize(NULL, n); if (newobj == NULL) return NULL; s_new = PyString_AsString(newobj); ...
0
[ "CWE-190" ]
cpython
c3c9db89273fabc62ea1b48389d9a3000c1c03ae
93,282,033,233,268,370,000,000,000,000,000,000,000
27
[2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174)
static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb) { struct net *net = sock_net(skb->sk); int t; int s_t; struct net_device *dev; struct Qdisc *q; struct tcf_proto *tp, **chain; struct tcmsg *tcm = nlmsg_data(cb->nlh); unsigned long cl = 0; const struct Qdisc_class_ops *cops; struct ...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
40,657,639,826,671,886,000,000,000,000,000,000,000
82
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
void setDeferredReplyStreamID(client *c, void *dr, streamID *id) { setDeferredReplyBulkSds(c, dr, createStreamIDString(id)); }
0
[ "CWE-703", "CWE-401" ]
redis
4a7a4e42db8ff757cdf3f4a824f66426036034ef
184,050,299,921,070,920,000,000,000,000,000,000,000
3
Fix memory leak in streamGetEdgeID (#10753) si is initialized by streamIteratorStart(), we should call streamIteratorStop() on it when done. regression introduced in #9127 (redis 7.0)
static int decode_cbf_luma(thread_context* tctx, int trafoDepth) { logtrace(LogSlice,"# cbf_luma\n"); int bit = decode_CABAC_bit(&tctx->cabac_decoder, &tctx->ctx_model[CONTEXT_MODEL_CBF_LUMA + (trafoDepth==0)]); logtrace(LogSlice,"> cbf_luma = %d\n",bit); logtrace(LogSymbols,"$1 cbf_luma=%d\n",bit); ...
0
[]
libde265
e83f3798dd904aa579425c53020c67e03735138d
156,659,531,651,526,170,000,000,000,000,000,000,000
12
fix check for valid PPS idx (#298)
static int pnm_getsintstr(jas_stream_t *in, int_fast32_t *val) { int c; int s; int_fast32_t v; /* Discard any leading whitespace. */ do { if ((c = pnm_getc(in)) == EOF) { return -1; } } while (isspace(c)); /* Get the number, allowing for a negative sign. */ s = 1; if (c == '-') { s = -1; if ((c = ...
0
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
245,197,319,334,564,200,000,000,000,000,000,000,000
44
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
static int tcp6_seq_show(struct seq_file *seq, void *v) { struct tcp_iter_state *st; struct sock *sk = v; if (v == SEQ_START_TOKEN) { seq_puts(seq, " sl " "local_address " "remote_address " "st tx_queue rx_queue tr tm->when retrnsmt" " uid ti...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
228,763,003,561,316,140,000,000,000,000,000,000,000
31
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
static inline int page_zone_id(struct page *page) { return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK; }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
153,664,176,712,878,400,000,000,000,000,000,000,000
4
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static int io_submit_sqes(struct io_ring_ctx *ctx, unsigned int nr, struct file *ring_file, int ring_fd) { struct io_submit_state state; struct io_kiocb *link = NULL; int i, submitted = 0; /* if we have a backlog and couldn't flush it all, return BUSY */ if (test_bit(0, &ctx->sq_check_overflow)) { if (!lis...
1
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
104,271,164,237,215,590,000,000,000,000,000,000,000
75
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
virtual void paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) {}
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
101,548,183,173,116,060,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
set_acl(struct archive *a, int fd, const char *name, struct archive_acl *abstract_acl, int ae_requested_type, const char *tname) { int acl_type = 0; acl_t acl; acl_entry_t acl_entry; acl_permset_t acl_permset; #if ARCHIVE_ACL_FREEBSD_NFS4 acl_flagset_t acl_flagset; int r; #endif int ret; int ...
1
[ "CWE-59", "CWE-61" ]
libarchive
fba4f123cc456d2b2538f811bb831483bf336bad
180,427,972,994,740,670,000,000,000,000,000,000,000
240
Fix handling of symbolic link ACLs On Linux ACLs on symbolic links are not supported. We must avoid calling acl_set_file() on symbolic links as their targets are modified instead. While here, do not try to set default ACLs on non-directories. Fixes #1565
static const char *update_loglevel(cmd_parms *cmd, struct ap_logconf *log, const char *arg) { const char *level_str, *err; module *module; int level; level_str = ap_strrchr_c(arg, ':'); if (level_str == NULL) { err = ap_parse_log_level(arg, &log->level); ...
0
[ "CWE-416", "CWE-284" ]
httpd
4cc27823899e070268b906ca677ee838d07cf67a
162,992,722,314,026,540,000,000,000,000,000,000,000
48
core: Disallow Methods' registration at run time (.htaccess), they may be used only if registered at init time (httpd.conf). Calling ap_method_register() in children processes is not the right scope since it won't be shared for all requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7...
static void wakeup_handler(void) { struct kvm_vcpu *vcpu; int cpu = smp_processor_id(); spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, cpu)); list_for_each_entry(vcpu, &per_cpu(blocked_vcpu_on_cpu, cpu), blocked_vcpu_list) { struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); if (pi_test_on(pi_desc) == 1) kv...
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
259,978,606,369,194,060,000,000,000,000,000,000,000
15
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
decompile_Null_ArgBuiltInFunctionCall(int n, SWF_ACTION *actions, int maxn, char *functionname) { INDENT puts(functionname); // only used for cases w/o return value println("();" ); return 0; }
0
[ "CWE-119", "CWE-125" ]
libming
da9d86eab55cbf608d5c916b8b690f5b76bca462
56,869,520,378,036,645,000,000,000,000,000,000,000
7
decompileAction: Prevent heap buffer overflow and underflow with using OpCode
static void ath10k_usb_remove(struct usb_interface *interface) { struct ath10k_usb *ar_usb; ar_usb = usb_get_intfdata(interface); if (!ar_usb) return; ath10k_core_unregister(ar_usb->ar); ath10k_usb_destroy(ar_usb->ar); usb_put_dev(interface_to_usbdev(interface)); ath10k_core_destroy(ar_usb->ar); }
0
[ "CWE-476" ]
linux
bfd6e6e6c5d2ee43a3d9902b36e01fc7527ebb27
169,135,793,264,875,970,000,000,000,000,000,000,000
13
ath10k: Fix a NULL-ptr-deref bug in ath10k_usb_alloc_urb_from_pipe The `ar_usb` field of `ath10k_usb_pipe_usb_pipe` objects are initialized to point to the containing `ath10k_usb` object according to endpoint descriptors read from the device side, as shown below in `ath10k_usb_setup_pipe_resources`: for (i = 0; i < i...
int rad_encode(RADIUS_PACKET *packet, const RADIUS_PACKET *original, const char *secret) { radius_packet_t *hdr; uint8_t *ptr; uint16_t total_length; int len; VALUE_PAIR *reply; /* * For simplicity in the following logic, we allow * the attributes to "overflow" the 4k maximum * RADIUS pac...
0
[]
freeradius-server
860cad9e02ba344edb0038419e415fe05a9a01f4
258,289,943,097,872,660,000,000,000,000,000,000,000
146
Fix crash on Tunnel-Password attributes with zero length
print_p2r_getparameters (const unsigned char *msg, size_t msglen) { print_p2r_header ("PC_to_RDR_GetParameters", msg, msglen); print_pr_data (msg, msglen, 7); }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
121,705,444,969,734,400,000,000,000,000,000,000,000
5
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static void vhost_net_flush_vq(struct vhost_net *n, int index) { vhost_poll_flush(n->poll + index); vhost_poll_flush(&n->vqs[index].vq.poll); }
0
[ "CWE-399" ]
linux
dd7633ecd553a5e304d349aa6f8eb8a0417098c5
195,930,838,556,686,200,000,000,000,000,000,000,000
5
vhost-net: fix use-after-free in vhost_net_flush vhost_net_ubuf_put_and_wait has a confusing name: it will actually also free it's argument. Thus since commit 1280c27f8e29acf4af2da914e80ec27c3dbd5c01 "vhost-net: flush outstanding DMAs on memory change" vhost_net_flush tries to use the argument after passing it to ...
void SetPreserveImageChannels(bool onoff) { preserve_image_channels_ = onoff; }
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
226,275,689,787,003,030,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`).
ssize_t wait_on_sync_kiocb(struct kiocb *req) { while (!req->ki_ctx) { set_current_state(TASK_UNINTERRUPTIBLE); if (req->ki_ctx) break; io_schedule(); } __set_current_state(TASK_RUNNING); return req->ki_user_data; }
0
[ "CWE-399" ]
linux
d558023207e008a4476a3b7bb8706b2a2bf5d84f
152,315,971,434,126,800,000,000,000,000,000,000,000
11
aio: prevent double free in ioctx_alloc ioctx_alloc() calls aio_setup_ring() to allocate a ring. If aio_setup_ring() fails to do so it would call aio_free_ring() before returning, but ioctx_alloc() would call aio_free_ring() again causing a double free of the ring. This is easily reproducible from userspace. Signed-...
static void io_free_req_many(struct io_ring_ctx *ctx, struct req_batch *rb) { int fixed_refs = rb->to_free; if (!rb->to_free) return; if (rb->need_iter) { int i, inflight = 0; unsigned long flags; fixed_refs = 0; for (i = 0; i < rb->to_free; i++) { struct io_kiocb *req = rb->reqs[i]; if (req->flag...
0
[]
linux
ff002b30181d30cdfbca316dadd099c3ca0d739c
77,012,709,060,937,170,000,000,000,000,000,000,000
47
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>
struct task_struct * __cpuinit fork_idle(int cpu) { struct task_struct *task; struct pt_regs regs; task = copy_process(CLONE_VM, 0, idle_regs(&regs), 0, NULL, &init_struct_pid, 0); if (!IS_ERR(task)) { init_idle_pids(task->pids); init_idle(task, cpu); } return task; }
0
[ "CWE-20" ]
linux
f106eee10038c2ee5b6056aaf3f6d5229be6dcdd
140,602,727,643,519,410,000,000,000,000,000,000,000
14
pids: fix fork_idle() to setup ->pids correctly copy_process(pid => &init_struct_pid) doesn't do attach_pid/etc. It shouldn't, but this means that the idle threads run with the wrong pids copied from the caller's task_struct. In x86 case the caller is either kernel_init() thread or keventd. In particular, this means...
**/ T& atNXY(const int pos, const int x, const int y, const int z, const int c, const T& out_value) { return (pos<0 || pos>=(int)_width)?(cimg::temporary(out_value)=out_value):_data[pos].atXY(x,y,z,c,out_value);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
2,160,387,307,850,210,500,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
const char *http_parse_reqline(struct http_msg *msg, unsigned int state, const char *ptr, const char *end, unsigned int *ret_ptr, unsigned int *ret_state) { const char *msg_start = msg->chn->buf->p; switch (state) { case HTTP_MSG_RQMETH: http_msg_rqmeth: if (likely(HTTP_IS_TOKEN(*ptr))) EA...
0
[]
haproxy
aae75e3279c6c9bd136413a72dafdcd4986bb89a
96,528,835,817,635,960,000,000,000,000,000,000,000
124
BUG/CRITICAL: using HTTP information in tcp-request content may crash the process During normal HTTP request processing, request buffers are realigned if there are less than global.maxrewrite bytes available after them, in order to leave enough room for rewriting headers after the request. This is done in http_wait_fo...
static void perf_ctx_lock(struct perf_cpu_context *cpuctx, struct perf_event_context *ctx) { raw_spin_lock(&cpuctx->ctx.lock); if (ctx) raw_spin_lock(&ctx->lock); }
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
242,851,087,014,856,420,000,000,000,000,000,000,000
7
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
Item_string(THD *thd, const String *str, CHARSET_INFO *tocs, uint *conv_errors, Derivation dv, uint repertoire): Item_basic_constant(thd) { if (str_value.copy(str, tocs, conv_errors)) str_value.set("", 0, tocs); // EOM ? str_value.mark_as_const(); fix_and_set_name_from_value(thd, dv,...
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
157,217,769,601,499,100,000,000,000,000,000,000,000
8
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
static void php_mysqlnd_sha256_pk_request_response_free_mem(void * _packet, zend_bool stack_allocation TSRMLS_DC) { MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE * p = (MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE *) _packet; if (p->public_key) { mnd_efree(p->public_key); p->public_key = NULL; } p->public_key_len = 0;...
0
[ "CWE-119", "CWE-787" ]
php-src
28f80baf3c53e267c9ce46a2a0fadbb981585132
7,543,035,599,857,355,000,000,000,000,000,000,000
13
Fix bug #72293 - Heap overflow in mysqlnd related to BIT fields
int smb_vfs_call_fsetxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags) { VFS_FIND(fsetxattr); return handle->fns->fsetxattr(handle, fsp, name, value, size, flags); }
0
[ "CWE-22" ]
samba
bd269443e311d96ef495a9db47d1b95eb83bb8f4
283,263,618,554,289,000,000,000,000,000,000,000,000
7
Fix bug 7104 - "wide links" and "unix extensions" are incompatible. Change parameter "wide links" to default to "no". Ensure "wide links = no" if "unix extensions = yes" on a share. Fix man pages to refect this. Remove "within share" checks for a UNIX symlink set - even if widelinks = no. The server will not follow t...
max3421_set_speed(struct usb_hcd *hcd, struct usb_device *dev) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); u8 mode_lowspeed, mode_hubpre, mode = max3421_hcd->mode; mode_lowspeed = BIT(MAX3421_MODE_LOWSPEED_BIT); mode_hubpre = BIT(MAX3421_MODE_HUBPRE_BIT); if (max3421_hcd->port_status & USB_PORT_STA...
0
[ "CWE-416" ]
linux
b5fdf5c6e6bee35837e160c00ac89327bdad031b
56,729,783,409,722,660,000,000,000,000,000,000,000
21
usb: max-3421: Prevent corruption of freed memory The MAX-3421 USB driver remembers the state of the USB toggles for a device/endpoint. To save SPI writes, this was only done when a new device/endpoint was being used. Unfortunately, if the old device was removed, this would cause writes to freed memory. To fix this, ...
static struct track *get_track(struct kmem_cache *s, void *object, enum track_item alloc) { struct track *p; if (s->offset) p = object + s->offset + sizeof(void *); else p = object + s->inuse; return p + alloc; }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
225,790,565,058,008,270,000,000,000,000,000,000,000
12
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
int MemIo::seek(long offset, Position pos) { long newIdx = 0; switch (pos) { case BasicIo::cur: newIdx = p_->idx_ + offset; break; case BasicIo::beg: newIdx = offset; break; case BasicIo::end: newIdx = p_->size_ + offset; break; } if (newIdx < 0) ...
0
[ "CWE-125" ]
exiv2
edb4bf78ca5820f2c7a852c8f2df11e6aba45704
53,001,235,352,212,050,000,000,000,000,000,000,000
22
Add bounds check to MemIo::seek(). (#944) - Regression test for missing bounds check in MemIo::seek() - Add bounds check to MemIo::seek(), this fixes CVE-2019-13504 (cherry picked from commit bd0afe0390439b2c424d881c8c6eb0c5624e31d9) Additional fixes for 0.27: - Add fix for the linux variant of MemIo::seek - Change ...
QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) { // This function calculates the ordering of objects, divides them // into the appropriate parts, and computes some values for the // linearization parameter dictionary and hint tables. The file // must be optimized (via ca...
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
12,564,533,954,845,158,000,000,000,000,000,000,000
587
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static inline void process_get_command(conn *c, token_t *tokens, size_t ntokens, bool return_cas) { char *key; size_t nkey; int i = 0; item *it; token_t *key_token = &tokens[KEY_TOKEN]; char *suffix; assert(c != NULL); do { while(key_token->length != 0) { key = key_...
0
[ "CWE-190" ]
memcached
bd578fc34b96abe0f8d99c1409814a09f51ee71c
227,750,703,680,513,400,000,000,000,000,000,000,000
190
CVE reported by cisco talos
remove_connection (NMExportedConnection *exported, GtkWindow *parent, ConnectionRemovedFn callback, gpointer user_data) { GError *error = NULL; gboolean success; success = nm_exported_connection_delete (exported, &error); if (!success) { gboolean auth_pend...
0
[ "CWE-200" ]
network-manager-applet
8627880e07c8345f69ed639325280c7f62a8f894
258,344,939,915,691,980,000,000,000,000,000,000,000
78
editor: prevent any registration of objects on the system bus D-Bus access-control is name-based; so requests for a specific name are allowed/denied based on the rules in /etc/dbus-1/system.d. But apparently apps still get a non-named service on the bus, and if we register *any* object even though we don't have a nam...
static void rsi_disconnect(struct usb_interface *pfunction) { struct rsi_hw *adapter = usb_get_intfdata(pfunction); if (!adapter) return; rsi_mac80211_detach(adapter); if (IS_ENABLED(CONFIG_RSI_COEX) && adapter->priv->coex_mode > 1 && adapter->priv->bt_adapter) { rsi_bt_ops.detach(adapter->priv->bt_adap...
0
[ "CWE-415" ]
wireless-drivers
8b51dc7291473093c821195c4b6af85fadedbc2f
317,861,566,173,374,700,000,000,000,000,000,000,000
21
rsi: fix a double free bug in rsi_91x_deinit() `dev` (struct rsi_91x_usbdev *) field of adapter (struct rsi_91x_usbdev *) is allocated and initialized in `rsi_init_usb_interface`. If any error is detected in information read from the device side, `rsi_init_usb_interface` will be freed. However, in the higher level e...
log_gss_error(struct connectdata *conn, OM_uint32 error_status, const char *prefix) { OM_uint32 maj_stat, min_stat; OM_uint32 msg_ctx = 0; gss_buffer_desc status_string; char buf[1024]; size_t len; snprintf(buf, sizeof(buf), "%s", prefix); len = strlen(buf); do { maj_stat = gss_displa...
0
[ "CWE-284" ]
curl
f78ae415d24b9bd89d6c121c556e411fdb21c6aa
315,105,597,843,962,800,000,000,000,000,000,000,000
28
Don't clear GSSAPI state between each exchange in the negotiation GSSAPI doesn't work very well if we forget everything ever time. XX: Is Curl_http_done() the right place to do the final cleanup?
PHP_METHOD(Phar, setStub) { zval *zstub; char *stub, *error; size_t stub_len; zend_long len = -1; php_stream *stream; PHAR_ARCHIVE_OBJECT(); if (PHAR_G(readonly) && !phar_obj->archive->is_data) { zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Cannot change stub, phar is read-only"); return;...
0
[ "CWE-20" ]
php-src
1e9b175204e3286d64dfd6c9f09151c31b5e099a
333,630,544,104,796,000,000,000,000,000,000,000,000
64
Fix bug #71860: Require valid paths for phar filenames
*/ static int hva_to_pfn_slow(unsigned long addr, bool *async, bool write_fault, bool *writable, kvm_pfn_t *pfn) { unsigned int flags = FOLL_HWPOISON; struct page *page; int npages = 0; might_sleep(); if (writable) *writable = write_fault; if (write_fault) flags |= FOLL_WRITE; if (async) flags |=...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
152,240,678,963,005,680,000,000,000,000,000,000,000
34
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
void ElectronApiIPCHandlerImpl::MessageHost(const std::string& channel, blink::CloneableMessage arguments) { api::WebContents* api_web_contents = api::WebContents::From(web_contents()); if (api_web_contents) { api_web_contents->MessageHost(channel, std::move(arguments...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
63,800,322,588,456,410,000,000,000,000,000,000,000
8
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
RenameSchema(const char *oldname, const char *newname) { Oid nspOid; HeapTuple tup; Relation rel; AclResult aclresult; ObjectAddress address; Form_pg_namespace nspform; rel = table_open(NamespaceRelationId, RowExclusiveLock); tup = SearchSysCacheCopy1(NAMESPACENAME, CStringGetDatum(oldname)); if (!HeapTupl...
0
[ "CWE-94" ]
postgres
b9b21acc766db54d8c337d508d0fe2f5bf2daab0
179,935,055,453,354,650,000,000,000,000,000,000,000
56
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
char *getProtocolVersionString(msg_t *pM) { assert(pM != NULL); return(pM->iProtocolVersion ? "1" : "0"); }
0
[ "CWE-772" ]
rsyslog
8083bd1433449fd2b1b79bf759f782e0f64c0cd2
336,052,849,878,405,900,000,000,000,000,000,000,000
5
backporting abort condition fix from 5.7.7
win_split(int size, int flags) { if (ERROR_IF_POPUP_WINDOW) return FAIL; /* When the ":tab" modifier was used open a new tab page instead. */ if (may_open_tabpage() == OK) return OK; /* Add flags from ":vertical", ":topleft" and ":botright". */ flags |= cmdmod.split; if ((flags & WSP_TOP) &&...
0
[ "CWE-416" ]
vim
ec66c41d84e574baf8009dbc0bd088d2bc5b2421
91,145,719,269,812,740,000,000,000,000,000,000,000
28
patch 8.1.2136: using freed memory with autocmd from fuzzer Problem: using freed memory with autocmd from fuzzer. (Dhiraj Mishra, Dominique Pelle) Solution: Avoid using "wp" after autocommands. (closes #5041)
static int selinux_parse_skb_ipv4(struct sk_buff *skb, struct common_audit_data *ad, u8 *proto) { int offset, ihlen, ret = -EINVAL; struct iphdr _iph, *ih; offset = skb_network_offset(skb); ih = skb_header_pointer(skb, offset, sizeof(_iph), &_iph); if (ih == NULL) goto out; ihlen = ih->ihl * 4; if (ihlen ...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
148,538,931,765,508,560,000,000,000,000,000,000,000
77
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...
split_at_delims (string, slen, delims, sentinel, flags, nwp, cwp) char *string; int slen; char *delims; int sentinel, flags; int *nwp, *cwp; { int ts, te, i, nw, cw, ifs_split, dflags; char *token, *d, *d2; WORD_LIST *ret, *tl; if (string == 0 || *string == '\0') { if (nwp) ...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
253,120,178,100,082,330,000,000,000,000,000,000,000
158
bash-4.4-rc2 release
TEST(AsyncSSLSocketTest, SSLHandshakeValidationSuccess) { EventBase eventBase; auto clientCtx = std::make_shared<SSLContext>(); auto dfServerCtx = std::make_shared<SSLContext>(); NetworkSocket fds[2]; getfds(fds); getctx(clientCtx, dfServerCtx); clientCtx->setVerificationOption(SSLContext::SSLVerifyPeer...
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
159,549,198,728,231,220,000,000,000,000,000,000,000
33
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
void jpc_mqdec_setctxs(jpc_mqdec_t *mqdec, int numctxs, jpc_mqctx_t *ctxs) { jpc_mqstate_t **ctx; int n; ctx = mqdec->ctxs; n = JAS_MIN(mqdec->maxctxs, numctxs); while (--n >= 0) { *ctx = &jpc_mqstates[2 * ctxs->ind + ctxs->mps]; ++ctx; ++ctxs; } n = mqdec->maxctxs - numctxs; while (--n >= 0) { *ctx = ...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
207,029,659,693,860,860,000,000,000,000,000,000,000
18
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
struct buffer_head *ext4_bread(handle_t *handle, struct inode *inode, ext4_lblk_t block, int map_flags) { struct buffer_head *bh; bh = ext4_getblk(handle, inode, block, map_flags); if (IS_ERR(bh)) return bh; if (!bh || ext4_buffer_uptodate(bh)) return bh; ll_rw_block(REQ_OP_READ, REQ_META | REQ_PRIO...
0
[ "CWE-416", "CWE-401" ]
linux
4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a
54,751,832,705,917,370,000,000,000,000,000,000,000
17
ext4: add more paranoia checking in ext4_expand_extra_isize handling It's possible to specify a non-zero s_want_extra_isize via debugging option, and this can cause bad things(tm) to happen when using a file system with an inode size of 128 bytes. Add better checking when the file system is mounted, as well as when w...
UINT rdpgfx_write_color32(wStream* s, const RDPGFX_COLOR32* color32) { Stream_Write_UINT8(s, color32->B); /* B (1 byte) */ Stream_Write_UINT8(s, color32->G); /* G (1 byte) */ Stream_Write_UINT8(s, color32->R); /* R (1 byte) */ Stream_Write_UINT8(s, color32->XA); /* XA (1 byte) */ return CHANNEL_RC_OK; }
0
[ "CWE-190" ]
FreeRDP
40393700642ad38437982e8a3afc34ff33ccf28e
139,254,233,914,013,510,000,000,000,000,000,000,000
8
Fixed input sanitation in rdpgfx_recv_solid_fill_pdu The input rectangle must be checked for plausibility. Thanks to Sunglin and HuanGMz of the Knownsec 404 security team and pangzi of pwnzen
virDomainPMSuspendForDuration(virDomainPtr dom, unsigned int target, unsigned long long duration, unsigned int flags) { virConnectPtr conn; VIR_DOMAIN_DEBUG(dom, "target=%u duration=%llu flags=%x", ta...
0
[ "CWE-254" ]
libvirt
506e9d6c2d4baaf580d489fff0690c0ff2ff588f
74,401,202,130,674,150,000,000,000,000,000,000,000
32
virDomainGetTime: Deny on RO connections We have a policy that if API may end up talking to a guest agent it should require RW connection. We don't obey the rule in virDomainGetTime(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
static MagickBooleanType RenderMVGContent(Image *image, const DrawInfo *draw_info,const size_t depth,ExceptionInfo *exception) { #define RenderImageTag "Render/Image" AffineMatrix affine, current; char keyword[MagickPathExtent], geometry[MagickPathExtent], *next_token, pattern[MagickPat...
0
[ "CWE-703" ]
ImageMagick
d7f1b2b9b816baaa956381ff80c3b120e83faa95
51,494,056,060,624,290,000,000,000,000,000,000,000
2,017
https://github.com/ImageMagick/ImageMagick/issues/4626
void OSD::handle_scrub(MOSDScrub *m) { dout(10) << "handle_scrub " << *m << dendl; if (!require_mon_or_mgr_peer(m)) { m->put(); return; } if (m->fsid != monc->get_fsid()) { dout(0) << "handle_scrub fsid " << m->fsid << " != " << monc->get_fsid() << dendl; m->put(); return; } RWLock::RLo...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
42,411,267,091,176,637,000,000,000,000,000,000,000
35
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 ...
ZEND_VM_HELPER(zend_interrupt_helper, ANY, ANY) { EG(vm_interrupt) = 0; SAVE_OPLINE(); if (EG(timed_out)) { zend_timeout(0); } else if (zend_interrupt_function) { zend_interrupt_function(execute_data); ZEND_VM_ENTER(); } ZEND_VM_CONTINUE(); }
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
269,429,088,909,008,850,000,000,000,000,000,000,000
12
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.