func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
SPICE_GNUC_VISIBLE spice_compat_version_t spice_get_current_compat_version(void) { return SPICE_COMPAT_VERSION_CURRENT; }
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
91,224,864,598,592,720,000,000,000,000,000,000,000
4
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
f_term_getansicolors(typval_T *argvars, typval_T *rettv) { buf_T *buf = term_get_buf(argvars, "term_getansicolors()"); term_T *term; VTermState *state; VTermColor color; char_u hexbuf[10]; int index; list_T *list; if (rettv_list_alloc(rettv) == FAIL) return; if (buf == NULL) re...
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
174,454,229,310,932,000,000,000,000,000,000,000,000
30
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.
show_fault_oops(struct pt_regs *regs, unsigned long error_code, unsigned long address) { if (!oops_may_print()) return; if (error_code & PF_INSTR) { unsigned int level; pgd_t *pgd; pte_t *pte; pgd = __va(read_cr3() & PHYSICAL_PAGE_MASK); pgd += pgd_index(address); pte = lookup_address_in_pgd(pgd, a...
0
[ "CWE-264" ]
linux
548acf19234dbda5a52d5a8e7e205af46e9da840
138,572,333,575,167,970,000,000,000,000,000,000,000
36
x86/mm: Expand the exception table logic to allow new handling options Huge amounts of help from Andy Lutomirski and Borislav Petkov to produce this. Andy provided the inspiration to add classes to the exception table with a clever bit-squeezing trick, Boris pointed out how much cleaner it would all be if we just had...
static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) { u32 elem_size = sizeof(struct stack_map_bucket) + smap->map.value_size; int err; smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, smap->map.numa_node); if (!smap->elems) return -ENOMEM; err = pcpu_freelist_init(&smap-...
1
[ "CWE-190", "CWE-787" ]
linux
30e29a9a2bc6a4888335a6ede968b75cd329657a
152,023,050,179,134,520,000,000,000,000,000,000,000
22
bpf: Fix integer overflow in prealloc_elems_and_freelist() In prealloc_elems_and_freelist(), the multiplication to calculate the size passed to bpf_map_area_alloc() could lead to an integer overflow. As a result, out-of-bounds write could occur in pcpu_freelist_populate() as reported by KASAN: [...] [ 16.968613] BU...
auto mongo::checkCursorSessionPrivilege(OperationContext* const opCtx, const boost::optional<LogicalSessionId> cursorSessionId) -> Status { if (!AuthorizationSession::exists(opCtx->getClient())) { return Status::OK(); } auto* const authSession = Authorizat...
0
[ "CWE-613" ]
mongo
db19e7ce84cfd702a4ba9983ee2ea5019f470f82
170,640,665,205,923,400,000,000,000,000,000,000,000
55
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
ByteArray::~ByteArray() {}
0
[ "CWE-119", "CWE-703" ]
sfntly
c56b85408bab232efd7e650f0994272a174e3b92
202,239,113,191,061,680,000,000,000,000,000,000,000
1
Add a bounds check to ByteArray::Get().
*/ void re_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyextra = user_defined ;
0
[ "CWE-476", "CWE-703", "CWE-125" ]
yara
3119b232c9c453c98d8fa8b6ae4e37ba18117cd4
291,437,041,907,591,400,000,000,000,000,000,000,000
5
re_lexer: Make reading escape sequences more robust (#586) * Add test for issue #503 * re_lexer: Make reading escape sequences more robust This commit fixes parsing incomplete escape sequences at the end of a regular expression and parsing things like \xxy (invalid hex digits) which before were silently turned...
static int ebcdic_write(BIO *b, const char *in, int inl) { EBCDIC_OUTBUFF *wbuf; int ret = 0; int num; unsigned char n; if ((in == NULL) || (inl <= 0)) return (0); if (b->next_bio == NULL) return (0); wbuf = (EBCDIC_OUTBUFF *) b->ptr; if (inl > (num = wbuf->alloced)) {...
0
[ "CWE-399" ]
openssl
380f18ed5f140e0ae1b68f3ab8f4f7c395658d9e
102,745,282,597,384,960,000,000,000,000,000,000,000
33
CVE-2016-0798: avoid memory leak in SRP The SRP user database lookup method SRP_VBASE_get_by_user had confusing memory management semantics; the returned pointer was sometimes newly allocated, and sometimes owned by the callee. The calling code has no way of distinguishing these two cases. Specifically, SRP servers t...
unsigned long CRYPTO_thread_id(void) { unsigned long ret=0; if (id_callback == NULL) { #ifdef OPENSSL_SYS_WIN16 ret=(unsigned long)GetCurrentTask(); #elif defined(OPENSSL_SYS_WIN32) ret=(unsigned long)GetCurrentThreadId(); #elif defined(GETPID_IS_MEANINGLESS) ret=1L; #elif defined(OPENSSL_SYS_BEOS) ret=(u...
0
[ "CWE-310" ]
openssl
9c00a950604aca819cee977f1dcb4b45f2af3aa6
24,440,597,165,754,777,000,000,000,000,000,000,000
22
Add and use a constant-time memcmp. This change adds CRYPTO_memcmp, which compares two vectors of bytes in an amount of time that's independent of their contents. It also changes several MAC compares in the code to use this over the standard memcmp, which may leak information about the size of a matching prefix. (cher...
void EVP_MD_CTX_init(EVP_MD_CTX *ctx) { memset(ctx,'\0',sizeof *ctx); }
0
[]
openssl
a6c62f0c25a756c263a80ce52afbae888028e986
228,545,547,202,635,300,000,000,000,000,000,000,000
4
Ignore NULL parameter in EVP_MD_CTX_destroy.
_compare_path_table(const void *v1, const void *v2) { const struct isoent *p1, *p2; const char *s1, *s2; int cmp, l; p1 = *((const struct isoent **)(uintptr_t)v1); p2 = *((const struct isoent **)(uintptr_t)v2); /* Compare parent directory number */ cmp = p1->parent->dir_number - p2->parent->dir_number; if (cm...
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
137,502,523,546,184,890,000,000,000,000,000,000,000
40
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
static int rr_index_first(READ_RECORD *info) { int tmp; // tell handler that we are doing an index scan if ((tmp = info->table->file->prepare_index_scan())) { tmp= rr_handle_error(info, tmp); return tmp; } tmp= info->table->file->ha_index_first(info->record); info->read_record= rr_index; if (t...
0
[]
server
1b8bb44106f528f742faa19d23bd6e822be04f39
54,898,954,674,059,310,000,000,000,000,000,000,000
16
MDEV-26351 segfault - (MARIA_HA *) 0x0 in ha_maria::extra use the correct check. before invoking handler methods we need to know that the table was opened, not only created.
void Delete(BoundsCheckKey* key) { Remove(key, key->Hash()); }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
304,715,490,729,301,150,000,000,000,000,000,000,000
3
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
skip_file (CommonJob *common, GFile *file) { if (common->skip_files == NULL) { common->skip_files = g_hash_table_new_full (g_file_hash, (GEqualFunc) g_file_equal, g_object_unref, NULL); } g_hash_table_insert (common->skip_files, g_object_ref (file), file); }
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
11,176,563,216,888,290,000,000,000,000,000,000,000
11
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
mono_image_get_ctorbuilder_token (MonoDynamicImage *assembly, MonoReflectionCtorBuilder *mb) { guint32 token, parent, sig; ReflectionMethodBuilder rmb; char *name; MonoReflectionTypeBuilder *tb = (MonoReflectionTypeBuilder *)mb->type; token = GPOINTER_TO_UINT (mono_g_hash_table_lookup (assembly->handleref_manage...
0
[ "CWE-20" ]
mono
65292a69c837b8a5f7a392d34db63de592153358
124,011,157,666,617,150,000,000,000,000,000,000,000
25
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
*/ static void bfq_update_peak_rate(struct bfq_data *bfqd, struct request *rq) { u64 now_ns = ktime_get_ns(); if (bfqd->peak_rate_samples == 0) { /* first dispatch */ bfq_log(bfqd, "update_peak_rate: goto reset, samples %d", bfqd->peak_rate_samples); bfq_reset_rate_computation(bfqd, rq); goto update_last_v...
0
[ "CWE-416" ]
linux
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
122,003,878,869,552,600,000,000,000,000,000,000,000
58
block, bfq: fix use-after-free in bfq_idle_slice_timer_body In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is not in bfqd-lock critical section. The bfqq, which is not equal to NULL in bfq_idle_slice_timer, may be freed after passing to bfq_idle_slice_timer_body. So we will access the freed memory. In ad...
NTSTATUS get_ea_value(TALLOC_CTX *mem_ctx, connection_struct *conn, files_struct *fsp, const char *fname, const char *ea_name, struct ea_struct *pea) { /* Get the value of this xattr. Max size is 64k. */ size_t attr_size = 256; char *val = NULL; ssize_t sizeret; again: val = TALLOC_REALLOC_ARRAY...
0
[ "CWE-22" ]
samba
bd269443e311d96ef495a9db47d1b95eb83bb8f4
109,642,100,150,667,590,000,000,000,000,000,000,000
48
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...
static ssize_t sockfs_listxattr(struct dentry *dentry, char *buffer, size_t size) { ssize_t len; ssize_t used = 0; len = security_inode_listsecurity(dentry->d_inode, buffer, size); if (len < 0) return len; used += len; if (buffer) { if (size < used) return -ERANGE; buffer += len; } len = (XATTR_N...
0
[ "CWE-264" ]
net
4de930efc23b92ddf88ce91c405ee645fe6e27ea
198,902,078,314,427,630,000,000,000,000,000,000,000
27
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>
const absl::optional<std::string>& responseCodeDetails() const override { return response_code_details_; }
0
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
166,913,878,822,198,270,000,000,000,000,000,000,000
3
internal redirect: fix a lifetime bug (#785) Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
aucmd_restbuf( aco_save_T *aco) /* structure holding saved values */ { int dummy; if (aco->use_aucmd_win) { --curbuf->b_nwindows; /* Find "aucmd_win", it can't be closed, but it may be in another tab * page. Do not trigger autocommands here. */ block_autocmds(); if (curwin != aucmd_win) { ...
0
[ "CWE-200", "CWE-668" ]
vim
5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8
174,473,653,560,704,760,000,000,000,000,000,000,000
104
patch 8.0.1263: others can read the swap file if a user is careless Problem: Others can read the swap file if a user is careless with his primary group. Solution: If the group permission allows for reading but the world permissions doesn't, make sure the group is right.
static void perf_event_interrupt(struct pt_regs *regs) { int i; struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); struct perf_event *event; unsigned long val; int found = 0; int nmi; if (cpuhw->n_limited) freeze_limited_counters(cpuhw, mfspr(SPRN_PMC5), mfspr(SPRN_PMC6)); perf_read_regs(regs...
0
[ "CWE-703", "CWE-189" ]
linux
0837e3242c73566fc1c0196b4ec61779c25ffc93
1,626,744,188,864,071,000,000,000,000,000,000,000
63
perf, powerpc: Handle events that raise an exception without overflowing Events on POWER7 can roll back if a speculative event doesn't eventually complete. Unfortunately in some rare cases they will raise a performance monitor exception. We need to catch this to ensure we reset the PMC. In all cases the PMC will be 25...
ssize_t oe_sendmsg(int sockfd, const struct oe_msghdr* buf, int flags) { ssize_t ret = -1; oe_fd_t* sock; if (!(sock = oe_fdtable_get(sockfd, OE_FD_TYPE_SOCKET))) OE_RAISE_ERRNO(oe_errno); ret = sock->ops.socket.sendmsg(sock, buf, flags); done: return ret; }
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
81,649,105,008,047,520,000,000,000,000,000,000,000
13
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
void php_on_timeout(int seconds) { PG(connection_status) |= PHP_CONNECTION_TIMEOUT; zend_set_timeout(EG(timeout_seconds), 1); if(PG(exit_on_timeout)) sapi_terminate_process(); }
0
[]
php-src
9a07245b728714de09361ea16b9c6fcf70cb5685
170,311,568,877,698,130,000,000,000,000,000,000,000
6
Fixed bug #71273 A wrong ext directory setup in php.ini leads to crash
g_file_supports_thread_contexts (GFile *file) { GFileIface *iface; g_return_val_if_fail (G_IS_FILE (file), FALSE); iface = G_FILE_GET_IFACE (file); return iface->supports_thread_contexts; }
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
205,700,389,362,124,950,000,000,000,000,000,000,000
9
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
static void nf_ct_frag6_expire(struct timer_list *t) { struct inet_frag_queue *frag = from_timer(frag, t, timer); struct frag_queue *fq; struct net *net; fq = container_of(frag, struct frag_queue, q); net = container_of(fq->q.net, struct net, nf_frag.frags); ip6frag_expire_frag_queue(net, fq); }
0
[ "CWE-20" ]
linux
5d407b071dc369c26a38398326ee2be53651cfe4
298,992,477,678,338,300,000,000,000,000,000,000,000
11
ip: frags: fix crash in ip_do_fragment() A kernel crash occurrs when defragmented packet is fragmented in ip_do_fragment(). In defragment routine, skb_orphan() is called and skb->ip_defrag_offset is set. but skb->sk and skb->ip_defrag_offset are same union member. so that frag->sk is not NULL. Hence crash occurrs in s...
void handler::set_ha_share_ptr(Handler_share *arg_ha_share) { DBUG_ENTER("handler::set_ha_share_ptr"); DBUG_ASSERT(ha_share); #ifndef DBUG_OFF if (table_share->tmp_table == NO_TMP_TABLE) mysql_mutex_assert_owner(&table_share->LOCK_ha_data); #endif *ha_share= arg_ha_share; DBUG_VOID_RETURN; }
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
275,501,461,654,290,400,000,000,000,000,000,000,000
12
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
Status GatherNdShape(InferenceContext* c) { ShapeHandle params; std::vector<ShapeAndType> handle_shape_and_type; if (c->input_handle_shapes_and_types(0) != nullptr) { TF_RETURN_IF_ERROR( ValidateVariableResourceHandle(c, &handle_shape_and_type)); params = handle_shape_and_type[0].shape; } else {...
0
[ "CWE-369" ]
tensorflow
8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4
91,796,822,496,485,250,000,000,000,000,000,000,000
35
Prevent division by 0 in common shape functions. PiperOrigin-RevId: 387712197 Change-Id: Id25c7460e35b68aeeeac23b9a88e455b443ee149
static int mnt_alloc_group_id(struct mount *mnt) { int res = ida_alloc_min(&mnt_group_ida, 1, GFP_KERNEL); if (res < 0) return res; mnt->mnt_group_id = res; return 0; }
0
[ "CWE-200" ]
linux
427215d85e8d1476da1a86b8d67aceb485eb3631
329,702,496,065,700,470,000,000,000,000,000,000,000
9
ovl: prevent private clone if bind mount is not allowed Add the following checks from __do_loopback() to clone_private_mount() as well: - verify that the mount is in the current namespace - verify that there are no locked children Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de> Fixes: c771d683a62e ("vfs: ...
static int ext4_check_descriptors(struct super_block *sb, ext4_fsblk_t sb_block, ext4_group_t *first_not_zeroed) { struct ext4_sb_info *sbi = EXT4_SB(sb); ext4_fsblk_t first_block = le32_to_cpu(sbi->s_es->s_first_data_block); ext4_fsblk_t last_block; ext4_fsblk_t last_bg_block = sb_block + ext4_bg_num_g...
0
[ "CWE-416", "CWE-401" ]
linux
4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a
104,657,512,107,552,200,000,000,000,000,000,000,000
118
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...
static RList* sections(RBinFile *bf) { struct Elf_(r_bin_elf_obj_t)* obj = (bf && bf->o)? bf->o->bin_obj : NULL; struct r_bin_elf_section_t *section = NULL; int i, num, found_load = 0; Elf_(Phdr)* phdr = NULL; RBinSection *ptr = NULL; RList *ret = NULL; if (!obj || !(ret = r_list_newf (free))) { return NULL; ...
0
[ "CWE-125" ]
radare2
1f37c04f2a762500222dda2459e6a04646feeedf
310,079,767,952,931,000,000,000,000,000,000,000,000
136
Fix #9904 - crash in r2_hoobr_r_read_le32 (over 9000 entrypoints) and read_le oobread (#9923)
mono_renderer_init (cairo_image_span_renderer_t *r, const cairo_composite_rectangles_t *composite, cairo_antialias_t antialias, cairo_bool_t needs_clip) { cairo_image_surface_t *dst = (cairo_image_surface_t *)composite->surface; if (antialias != CAIRO_ANTIALIAS_NONE) return CAIRO_INT_S...
0
[]
cairo
03a820b173ed1fdef6ff14b4468f5dbc02ff59be
223,171,940,519,597,860,000,000,000,000,000,000,000
82
Fix mask usage in image-compositor
int selinux_netlbl_socket_setsockopt(struct socket *sock, int level, int optname) { int rc = 0; struct sock *sk = sock->sk; struct sk_security_struct *sksec = sk->sk_security; struct netlbl_lsm_secattr secattr; if (level == IPPROTO_IP && optname == IP_OPTIONS && (sksec->nlbl_state == NLBL_L...
0
[]
linux-2.6
d7f59dc4642ce2fc7b79fcd4ec02ffce7f21eb02
121,709,535,833,183,810,000,000,000,000,000,000,000
25
selinux: Fix a panic in selinux_netlbl_inode_permission() Rick McNeal from LSI identified a panic in selinux_netlbl_inode_permission() caused by a certain sequence of SUNRPC operations. The problem appears to be due to the lack of NULL pointer checking in the function; this patch adds the pointer checks so the functi...
static void phy_reset(lan9118_state *s) { s->phy_status = 0x7809; s->phy_control = 0x3000; s->phy_advertise = 0x01e1; s->phy_int_mask = 0; s->phy_int = 0; phy_update_link(s); }
0
[ "CWE-835" ]
qemu
37cee01784ff0df13e5209517e1b3594a5e792d1
119,214,735,806,026,740,000,000,000,000,000,000,000
9
lan9118: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.co...
int LibRaw::copy_mem_image(void *scan0, int stride, int bgr) { // the image memory pointed to by scan0 is assumed to be in the format // returned by get_mem_image_format if ((imgdata.progress_flags & LIBRAW_PROGRESS_THUMB_MASK) < LIBRAW_PROGRESS_PRE_INTERPOLATE) return LIBRAW_OUT_OF_ORDER_CALL; if (...
0
[ "CWE-20", "CWE-125" ]
LibRaw
20ad21c0d87ca80217aee47533d91e633ce1864d
281,677,403,746,200,770,000,000,000,000,000,000,000
88
Thumbnail size range check
static int fts3PromoteSegments( Fts3Table *p, /* FTS table handle */ sqlite3_int64 iAbsLevel, /* Absolute level just updated */ sqlite3_int64 nByte /* Size of new segment at iAbsLevel */ ){ int rc = SQLITE_OK; sqlite3_stmt *pRange; rc = fts3SqlStmt(p, SQL_SELECT_LEVEL_R...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
144,106,877,201,796,500,000,000,000,000,000,000,000
90
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
bool Greeter::start() { // check flag if (m_started) return false; if (daemonApp->testing()) { // create process m_process = new QProcess(this); // delete process on finish connect(m_process, SIGNAL(finished(int,QProcess::ExitStat...
1
[ "CWE-284", "CWE-264" ]
sddm
4cfed6b0a625593fb43876f04badc4dd99799d86
35,207,037,231,701,957,000,000,000,000,000,000,000
107
Disable greeters from loading KDE's debug hander Some themes may use KDE components which will automatically load KDE's crash handler. If the greeter were to then somehow crash, that would leave a crash handler allowing other actions, albeit as the locked down SDDM user. Only SDDM users using the breeze theme from p...
static int atalk_seq_route_show(struct seq_file *seq, void *v) { struct atalk_route *rt; if (v == SEQ_START_TOKEN) { seq_puts(seq, "Target Router Flags Dev\n"); goto out; } if (atrtr_default.dev) { rt = &atrtr_default; seq_printf(seq, "Default %04X:%02X %-4d %s\n", ntohs(rt->gatewa...
0
[ "CWE-416" ]
linux
6377f787aeb945cae7abbb6474798de129e1f3ac
80,309,564,924,058,530,000,000,000,000,000,000,000
24
appletalk: Fix use-after-free in atalk_proc_exit KASAN report this: BUG: KASAN: use-after-free in pde_subdir_find+0x12d/0x150 fs/proc/generic.c:71 Read of size 8 at addr ffff8881f41fe5b0 by task syz-executor.0/2806 CPU: 0 PID: 2806 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45 Hardware name: QEMU Standard PC (i440...
static void test_heap_overflow_vrend_renderer_transfer_write_iov() { struct virgl_renderer_resource_create_args args; args.handle = 4; args.target = 0; args.format = 4; args.bind = 131072; args.width = 0; args.height = 1; args.depth = 1; args.array_size = 0; args.last_level = 0; args.nr...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
91,328,156,327,326,490,000,000,000,000,000,000,000
39
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
MagickExport MagickBooleanType SetBlobExtent(Image *image, const MagickSizeType extent) { BlobInfo *magick_restrict blob_info; assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",ima...
0
[ "CWE-416", "CWE-399" ]
ImageMagick
c5d012a46ae22be9444326aa37969a3f75daa3ba
28,843,011,786,435,155,000,000,000,000,000,000,000
126
https://github.com/ImageMagick/ImageMagick6/issues/43
smb2_validate_iov(unsigned int offset, unsigned int buffer_length, struct kvec *iov, unsigned int min_buf_size) { unsigned int smb_len = iov->iov_len; char *end_of_smb = smb_len + (char *)iov->iov_base; char *begin_of_buf = offset + (char *)iov->iov_base; char *end_of_buf = begin_of_buf + buffer_length; if (...
0
[ "CWE-416", "CWE-200" ]
linux
6a3eb3360667170988f8a6477f6686242061488a
177,545,764,983,457,200,000,000,000,000,000,000,000
29
cifs: Fix use-after-free in SMB2_write There is a KASAN use-after-free: BUG: KASAN: use-after-free in SMB2_write+0x1342/0x1580 Read of size 8 at addr ffff8880b6a8e450 by task ln/4196 Should not release the 'req' because it will use in the trace. Fixes: eccb4422cf97 ("smb3: Add ftrace tracepoints for improved SMB3 de...
static void mmf_recalc_uprobes(struct mm_struct *mm) { struct vm_area_struct *vma; for (vma = mm->mmap; vma; vma = vma->vm_next) { if (!valid_vma(vma, false)) continue; /* * This is not strictly accurate, we can race with * uprobe_unregister() and see the already removed * uprobe if delete_uprobe() w...
0
[ "CWE-416" ]
linux
355627f518978b5167256d27492fe0b343aaf2f2
48,076,881,755,872,750,000,000,000,000,000,000,000
19
mm, uprobes: fix multiple free of ->uprobes_state.xol_area Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable") made it possible to kill a forking task while it is waiting to acquire its ->mmap_sem for write, in dup_mmap(). However, it was overlooked that this introduced an new error p...
void ClientConnectionImpl::onMessageComplete() { ENVOY_CONN_LOG(trace, "message complete", connection_); if (ignore_message_complete_for_100_continue_) { ignore_message_complete_for_100_continue_ = false; return; } if (pending_response_.has_value()) { ASSERT(!pending_response_done_); // After ca...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
305,635,248,381,748,900,000,000,000,000,000,000,000
31
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
int bdecode_node::list_size() const { TORRENT_ASSERT(type() == list_t); if (m_size != -1) return m_size; // make sure this is a list. bdecode_token const* tokens = m_root_tokens; TORRENT_ASSERT(tokens[m_token_idx].type == bdecode_token::list); // this is the first item int token = m_token_idx + 1; ...
0
[ "CWE-125" ]
libtorrent
ec30a5e9ec703afb8abefba757c6d401303b53db
275,109,772,997,495,700,000,000,000,000,000,000,000
30
fix out-of-bounds read in bdecode Fixes #2099
setup_alt_config (Test *test, gconstpointer data) { cockpit_config_file = SRCDIR "/src/ws/mock-config/cockpit/cockpit-alt.conf"; test->auth = cockpit_auth_new (FALSE); }
0
[]
cockpit
c51f6177576d7e12614c64d316cf0b67addd17c9
119,036,323,768,900,910,000,000,000,000,000,000,000
6
ws: Fix bug parsing invalid base64 headers The len parameter to g_base64_decode_inplace() is a inout parameter, and needs to be initialized. Lets just use the simpler g_base64_decode() function. This fixes a segfault. Closes #10819
static void record_times(struct psi_group_cpu *groupc, int cpu, bool memstall_tick) { u32 delta; u64 now; now = cpu_clock(cpu); delta = now - groupc->state_start; groupc->state_start = now; if (groupc->state_mask & (1 << PSI_IO_SOME)) { groupc->times[PSI_IO_SOME] += delta; if (groupc->state_mask & (1 <<...
0
[ "CWE-787" ]
linux
6fcca0fa48118e6d63733eb4644c6cd880c15b8f
40,334,000,317,852,650,000,000,000,000,000,000,000
45
sched/psi: Fix OOB write when writing 0 bytes to PSI files Issuing write() with count parameter set to 0 on any file under /proc/pressure/ will cause an OOB write because of the access to buf[buf_size-1] when NUL-termination is performed. Fix this by checking for buf_size to be non-zero. Signed-off-by: Suren Baghdasa...
static struct sk_buff *ath_tid_dequeue(struct ath_atx_tid *tid) { struct sk_buff *skb; skb = __skb_dequeue(&tid->retry_q); if (!skb) skb = __skb_dequeue(&tid->buf_q); return skb; }
0
[ "CWE-362", "CWE-241" ]
linux
21f8aaee0c62708654988ce092838aa7df4d25d8
251,413,668,066,564,900,000,000,000,000,000,000,000
10
ath9k: protect tid->sched check We check tid->sched without a lock taken on ath_tx_aggr_sleep(). That is race condition which can result of doing list_del(&tid->list) twice (second time with poisoned list node) and cause crash like shown below: [424271.637220] BUG: unable to handle kernel paging request at 00100104 [...
static void ipx_remove_socket(struct sock *sk) { /* Determine interface with which socket is associated */ struct ipx_interface *intrfc = ipx_sk(sk)->intrfc; if (!intrfc) goto out; ipxitf_hold(intrfc); spin_lock_bh(&intrfc->if_sklist_lock); sk_del_node_init(sk); spin_unlock_bh(&intrfc->if_sklist_lock); ipxi...
0
[ "CWE-416" ]
linux
ee0d8d8482345ff97a75a7d747efc309f13b0d80
138,191,608,961,369,140,000,000,000,000,000,000,000
16
ipx: call ipxitf_put() in ioctl error path We should call ipxitf_put() if the copy_to_user() fails. Reported-by: 李强 <liqiang6-s@360.cn> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
CtPtr ProtocolV2::send_reconnect_ok() { ldout(cct, 20) << __func__ << dendl; out_seq = discard_requeued_up_to(out_seq, message_seq); uint64_t ms = in_seq; auto reconnect_ok = ReconnectOkFrame::Encode(ms); ldout(cct, 5) << __func__ << " sending reconnect_ok: msg_seq=" << ms << dendl; connection->lock.unl...
0
[ "CWE-323" ]
ceph
20b7bb685c5ea74c651ca1ea547ac66b0fee7035
88,502,737,841,653,850,000,000,000,000,000,000,000
44
msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities The secure mode uses AES-128-GCM with 96-bit nonces consisting of a 32-bit counter followed by a 64-bit salt. The counter is incremented after processing each frame, the salt is fixed for the duration of the session. Both are initialized from the sessio...
static struct mapped_device *find_device(struct dm_ioctl *param) { struct hash_cell *hc; struct mapped_device *md = NULL; down_read(&_hash_lock); hc = __find_device_hash_cell(param); if (hc) md = hc->md; up_read(&_hash_lock); return md; }
0
[ "CWE-787" ]
linux
4edbe1d7bcffcd6269f3b5eb63f710393ff2ec7a
129,913,414,263,057,510,000,000,000,000,000,000,000
13
dm ioctl: fix out of bounds array access when no devices If there are not any dm devices, we need to zero the "dev" argument in the first structure dm_name_list. However, this can cause out of bounds write, because the "needed" variable is zero and len may be less than eight. Fix this bug by reporting DM_BUFFER_FULL_...
static inline void TCP_ECN_withdraw_cwr(struct tcp_sock *tp) { tp->ecn_flags &= ~TCP_ECN_DEMAND_CWR; }
0
[]
net-next
fdf5af0daf8019cec2396cdef8fb042d80fe71fa
97,330,365,826,518,140,000,000,000,000,000,000,000
4
tcp: drop SYN+FIN messages Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his linux machines to their limits. Dont call conn_request() if the TCP flags includes SYN flag Reported-by: Denys Fedoryshchenko <denys@visp.net.lb> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S...
static struct neighbour *xfrm_neigh_lookup(const struct dst_entry *dst, struct sk_buff *skb, const void *daddr) { const struct dst_entry *path = xfrm_dst_path(dst); if (!skb) daddr = xfrm_get_dst_nexthop(dst, daddr); return path->ops->neigh_lookup(path, skb, daddr); }
0
[ "CWE-703" ]
linux
f85daf0e725358be78dfd208dea5fd665d8cb901
135,925,572,062,103,380,000,000,000,000,000,000,000
10
xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup() xfrm_policy_lookup() will call xfrm_pol_hold_rcu() to get a refcount of pols[0]. This refcount can be dropped in xfrm_expand_policies() when xfrm_expand_policies() return error. pols[0]'s refcount is balanced in here. But xfrm_bundle_look...
void net_clear_error(NET *net) { net->last_errno= 0; net->last_error[0]= '\0'; my_stpcpy(net->sqlstate, not_error_sqlstate); }
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
35,819,237,481,267,703,000,000,000,000,000,000,000
6
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static int mb86a20s_get_segment_count(struct mb86a20s_state *state, unsigned layer) { int rc, count; static unsigned char reg[] = { [0] = 0x89, /* Layer A */ [1] = 0x8d, /* Layer B */ [2] = 0x91, /* Layer C */ }; dev_dbg(&state->i2c->dev, "%s called.\n", __func__); if (layer >= ARRAY_SIZE(reg)) ...
0
[ "CWE-119" ]
media_tree
eca2d34b9d2ce70165a50510659838e28ca22742
257,910,801,387,570,030,000,000,000,000,000,000,000
27
[media] mb86a20s: apply mask to val after checking for read failure Appling the mask 0x0f to the immediate return of the call to mb86a20s_readreg will always result in a positive value, meaning that the check of ret < 0 will never work. Instead, check for a -ve return value first, and then mask val with 0x0f. Kudos ...
static void usbredir_handle_buffered_bulk_in_data(USBRedirDevice *dev, USBPacket *p, uint8_t ep) { /* Input bulk endpoint, buffered packet input */ if (!dev->endpoint[EP2I(ep)].bulk_receiving_started) { int bpt; struct usb_redir_start_bulk_receiving_header start = { .endpoint = e...
0
[ "CWE-770" ]
qemu
7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986
36,573,704,926,642,593,000,000,000,000,000,000,000
37
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:...
static void l2cap_chan_le_send_credits(struct l2cap_chan *chan) { struct l2cap_conn *conn = chan->conn; struct l2cap_le_credits pkt; u16 return_credits; /* We return more credits to the sender only after the amount of * credits falls below half of the initial amount. */ if (chan->rx_credits >= (le_max_credits...
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
1,335,226,070,761,170,000,000,000,000,000,000,000
25
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
static void e1000e_set_rxdctl(E1000ECore *core, int index, uint32_t val) { core->mac[RXDCTL] = core->mac[RXDCTL1] = val;
0
[ "CWE-835" ]
qemu
4154c7e03fa55b4cf52509a83d50d6c09d743b77
226,059,904,053,940,600,000,000,000,000,000,000,000
4
net: e1000e: fix an infinite loop issue This issue is like the issue in e1000 network card addressed in this commit: e1000: eliminate infinite loops on out-of-bounds transfer start. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat....
void *ssh_buffer_get(struct ssh_buffer_struct *buffer){ return buffer->data + buffer->pos; }
0
[ "CWE-476" ]
libssh-mirror
10b3ebbe61a7031a3dae97f05834442220447181
44,856,530,333,035,080,000,000,000,000,000,000,000
3
buffer: Reformat ssh_buffer_add_data() Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
static int ntop_check_profile_syntax(lua_State* vm) { char *filter; NetworkInterfaceView *ntop_interface = getCurrentInterface(vm); NetworkInterface *iface = ntop_interface->getFirst(); ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TSTRING)...
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
200,091,932,685,835,240,000,000,000,000,000,000,000
14
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
static void vmxnet3_reset_interrupt_states(VMXNET3State *s) { int i; for (i = 0; i < ARRAY_SIZE(s->interrupt_states); i++) { s->interrupt_states[i].is_asserted = false; s->interrupt_states[i].is_pending = false; s->interrupt_states[i].is_masked = true; } }
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
245,815,634,482,049,940,000,000,000,000,000,000,000
9
net/vmxnet3: Refine l2 header validation Validation of l2 header length assumed minimal packet size as eth_header + 2 * vlan_header regardless of the actual protocol. This caused crash for valid non-IP packets shorter than 22 bytes, as 'tx_pkt->packet_type' hasn't been assigned for such packets, and 'vmxnet3_on_tx_do...
get_dbnull (MonoDomain *domain, MonoObject **dbnull) { if (!*dbnull) *dbnull = mono_get_dbnull_object (domain); return *dbnull; }
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
6,504,525,671,715,243,000,000,000,000,000,000,000
6
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
static struct snd_seq_client_port *get_client_port(struct snd_seq_addr *addr, struct snd_seq_client **cp) { struct snd_seq_client_port *p; *cp = snd_seq_client_use_ptr(addr->client); if (*cp) { p = snd_seq_port_use_ptr(*cp, addr->port); if (! p) { snd_seq_client_unlock(*cp); *cp = NULL; } retu...
0
[ "CWE-416", "CWE-362" ]
linux
71105998845fb012937332fe2e806d443c09e026
52,796,527,581,259,700,000,000,000,000,000,000,000
15
ALSA: seq: Fix use-after-free at creating a port There is a potential race window opened at creating and deleting a port via ioctl, as spotted by fuzzing. snd_seq_create_port() creates a port object and returns its pointer, but it doesn't take the refcount, thus it can be deleted immediately by another thread. Meanwh...
nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) { __be32 status; status = _nfsd4_verify(rqstp, cstate, &u->nverify); return status == nfserr_same ? nfs_ok : status; }
0
[ "CWE-476" ]
linux
01310bb7c9c98752cc763b36532fab028e0f8f81
304,929,997,964,705,400,000,000,000,000,000,000,000
8
nfsd: COPY and CLONE operations require the saved filehandle to be set Make sure we have a saved filehandle, otherwise we'll oops with a null pointer dereference in nfs4_preprocess_stateid_op(). Signed-off-by: Scott Mayhew <smayhew@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat....
static bool is_prohibited_package_slow(Symbol* class_name) { // Caller has ResourceMark int length; jchar* unicode = class_name->as_unicode(length); return (length >= 5 && unicode[0] == 'j' && unicode[1] == 'a' && unicode[2] == 'v' && unicode[3] == 'a' && unicod...
0
[]
jdk17u
f8eb9abe034f7c6bea4da05a9ea42017b3f80730
234,420,503,413,328,500,000,000,000,000,000,000,000
11
8270386: Better verification of scan methods Reviewed-by: coleenp Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
int RAND_set_rand_engine(ENGINE *engine) { const RAND_METHOD *tmp_meth = NULL; if (!RUN_ONCE(&rand_init, do_rand_init)) return 0; if (engine != NULL) { if (!ENGINE_init(engine)) return 0; tmp_meth = ENGINE_get_RAND(engine); if (tmp_meth == NULL) { EN...
0
[ "CWE-330" ]
openssl
1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be
225,854,466,867,450,680,000,000,000,000,000,000,000
23
drbg: ensure fork-safety without using a pthread_atfork handler When the new OpenSSL CSPRNG was introduced in version 1.1.1, it was announced in the release notes that it would be fork-safe, which the old CSPRNG hadn't been. The fork-safety was implemented using a fork count, which was incremented by a pthread_atfork...
sg_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos) { int mxsize, cmd_size, k; int input_size, blocking; unsigned char opcode; Sg_device *sdp; Sg_fd *sfp; Sg_request *srp; struct sg_header old_hdr; sg_io_hdr_t *hp; unsigned char cmnd[SG_MAX_CDB_SIZE]; if ((!(sfp = (Sg_fd *) filp-...
0
[ "CWE-190", "CWE-189" ]
linux
fdc81f45e9f57858da6351836507fbcf1b7583ee
36,428,888,301,966,080,000,000,000,000,000,000,000
105
sg_start_req(): use import_iovec() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
static int stv0288_frontend_attach(struct dvb_usb_adapter *d) { u8 obuf[] = {7, 1}; d->fe_adap[0].fe = dvb_attach(stv0288_attach, &earda_config, &d->dev->i2c_adap); if (d->fe_adap[0].fe == NULL) return -EIO; if (NULL == dvb_attach(stb6000_attach, d->fe_adap[0].fe, 0x61, &d->dev->i2c_adap)) return -EIO; ...
0
[ "CWE-476", "CWE-119" ]
linux
606142af57dad981b78707234cfbd15f9f7b7125
215,014,672,515,069,600,000,000,000,000,000,000,000
22
[media] dw2102: don't do DMA on stack On Kernel 4.9, WARNINGs about doing DMA on stack are hit at the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach(). Both were due to the use of buffers on the stack as parameters to dvb_usb_generic_rw() and the resulting attempt to do DMA with...
static void ConvertRGBToYCbCr(const double red,const double green, const double blue,double *Y,double *Cb,double *Cr) { ConvertRGBToYPbPr(red,green,blue,Y,Cb,Cr); }
0
[ "CWE-369" ]
ImageMagick
75f6f5032690077cae3eaeda3c0165cc765eaeb5
122,599,745,261,392,160,000,000,000,000,000,000,000
5
https://github.com/ImageMagick/ImageMagick/issues/3295
zfs_fuid_sync(zfsvfs_t *zfsvfs, dmu_tx_t *tx) { nvlist_t *nvp; nvlist_t **fuids; size_t nvsize = 0; char *packed; dmu_buf_t *db; fuid_domain_t *domnode; int numnodes; int i; if (!zfsvfs->z_fuid_dirty) { return; } rw_enter(&zfsvfs->z_fuid_lock, RW_WRITER); /* * First see if table needs to be created? ...
0
[ "CWE-200", "CWE-732" ]
zfs
716b53d0a14c72bda16c0872565dd1909757e73f
173,335,075,092,209,160,000,000,000,000,000,000,000
65
FreeBSD: Fix UNIX permissions checking Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10727
bool PostgreSqlStorage::setupSchemaVersion(int version) { QSqlQuery query(logDb()); query.prepare("INSERT INTO coreinfo (key, value) VALUES ('schemaversion', :version)"); query.bindValue(":version", version); query.exec(); bool success = true; if (query.lastError().isValid()) { qCritica...
0
[ "CWE-89" ]
quassel
aa1008be162cb27da938cce93ba533f54d228869
224,468,444,669,576,100,000,000,000,000,000,000,000
14
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...
v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir, struct dentry *dentry, char *extension, u32 perm, u8 mode) { int err; const unsigned char *name; struct p9_fid *dfid, *ofid, *fid; struct inode *inode; p9_debug(P9_DEBUG_VFS, "name %pd\n", dentry); err = 0; ofid = NULL; fid = NULL; name = dent...
0
[ "CWE-835" ]
linux
5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f
25,418,868,378,851,160,000,000,000,000,000,000,000
68
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...
bool red_stream_is_websocket(RedStream *stream, const void *buf, size_t len) { if (stream->priv->ws) { return false; } stream->priv->ws = websocket_new(buf, len, stream, (websocket_read_cb_t) stream->priv->read, (websocket_wr...
0
[]
spice
95a0cfac8a1c8eff50f05e65df945da3bb501fc9
210,559,633,794,457,030,000,000,000,000,000,000,000
23
With OpenSSL 1.0.2 and earlier: disable client-side renegotiation. Fixed issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
compile_assign_lhs( char_u *var_start, lhs_T *lhs, int cmdidx, int is_decl, int heredoc, int oplen, cctx_T *cctx) { if (compile_lhs(var_start, lhs, cmdidx, heredoc, oplen, cctx) == FAIL) return FAIL; if (!lhs->lhs_has_index && lhs->lhs_lvar == &lhs->lhs_arg_lvar) { semsg(_(e_cannot_assign_to_argum...
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
21,392,204,275,455,017,000,000,000,000,000,000,000
25
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
User(Parser fn) : fn_(fn) {}
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
105,356,861,364,069,800,000,000,000,000,000,000,000
1
Fix #122
Formattable::getString(UnicodeString& result, UErrorCode& status) const { if (fType != kString) { setError(status, U_INVALID_FORMAT_ERROR); result.setToBogus(); } else { if (fValue.fString == NULL) { setError(status, U_MEMORY_ALLOCATION_ERROR); } else { r...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
237,899,075,307,286,300,000,000,000,000,000,000,000
14
ICU-20246 Fixing another integer overflow in number parsing.
static unsigned int poll_urgent(struct file *fp, struct poll_table_struct *pt) { struct hfi1_filedata *fd = fp->private_data; struct hfi1_ctxtdata *uctxt = fd->uctxt; struct hfi1_devdata *dd = uctxt->dd; unsigned pollflag; poll_wait(fp, &uctxt->wait, pt); spin_lock_irq(&dd->uctxt_lock); if (uctxt->urgent !...
0
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
79,680,187,633,490,170,000,000,000,000,000,000,000
22
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
dns_message_dumpsig(dns_message_t *msg, char *txt1) { dns_rdata_t querytsigrdata = DNS_RDATA_INIT; dns_rdata_any_tsig_t querytsig; isc_result_t result; if (msg->tsig != NULL) { result = dns_rdataset_first(msg->tsig); RUNTIME_CHECK(result == ISC_R_SUCCESS); dns_rdataset_current(msg->tsig, &querytsigrdata); ...
0
[ "CWE-617" ]
bind9
6ed167ad0a647dff20c8cb08c944a7967df2d415
190,021,327,236,823,860,000,000,000,000,000,000,000
25
Always keep a copy of the message this allows it to be available even when dns_message_parse() returns a error.
static jpc_enc_band_t *band_create(jpc_enc_band_t *band, jpc_enc_cp_t *cp, jpc_enc_rlvl_t *rlvl, jpc_tsfb_band_t *bandinfos) { uint_fast16_t bandno; uint_fast16_t gblbandno; uint_fast16_t rlvlno; jpc_tsfb_band_t *bandinfo; jpc_enc_tcmpt_t *tcmpt; uint_fast32_t prcno; jpc_enc_prc_t *prc; tcmpt = rlvl->tcmpt; ...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
302,121,097,553,275,660,000,000,000,000,000,000,000
66
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...
static inline void take_selinux_option(char **to, char *from, int *first, int len) { int current_size = 0; if (!*first) { **to = '|'; *to += 1; } else *first = 0; while (current_size < len) { if (*from != '"') { **to = *from; *to += 1; } from += 1; current_size += 1; } }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
159,806,950,474,465,850,000,000,000,000,000,000,000
20
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static int net_param_nic(void *dummy, QemuOpts *opts, Error **errp) { char *mac, *nd_id; int idx, ret; NICInfo *ni; const char *type; type = qemu_opt_get(opts, "type"); if (type && g_str_equal(type, "none")) { return 0; /* Nothing to do, default_net is cleared in vl.c */ } i...
0
[ "CWE-190" ]
qemu
25c01bd19d0e4b66f357618aeefda1ef7a41e21a
65,334,699,771,915,420,000,000,000,000,000,000,000
61
net: drop too large packet early We try to detect and drop too large packet (>INT_MAX) in 1592a9947036 ("net: ignore packet size greater than INT_MAX") during packet delivering. Unfortunately, this is not sufficient as we may hit another integer overflow when trying to queue such large packet in qemu_net_queue_append_...
static int set_altname(X509 *crt, ...) { int ret = 0; GENERAL_NAMES *gens = NULL; GENERAL_NAME *gen = NULL; ASN1_IA5STRING *ia5 = NULL; va_list ap; va_start(ap, crt); gens = sk_GENERAL_NAME_new_null(); if (gens == NULL) goto out; while (1) { int type; const ch...
0
[ "CWE-476" ]
openssl
97ab3c4b538840037812c8d9164d09a1f4bf11a1
260,683,964,283,919,600,000,000,000,000,000,000,000
49
Add a test for GENERAL_NAME_cmp Based on a boringssl test contributed by David Benjamin Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
static MagickBooleanType WritePSDLayersInternal(Image *image, const ImageInfo *image_info,const PSDInfo *psd_info,size_t *layers_size, ExceptionInfo *exception) { char layer_name[MagickPathExtent]; const char *property; const StringInfo *info; Image *base_image, *next_image; Magick...
0
[ "CWE-125" ]
ImageMagick
17a1a6f97fd088a71931bdc422f4e96bb6ffc549
171,385,441,816,473,600,000,000,000,000,000,000,000
205
https://github.com/ImageMagick/ImageMagick/issues/1249
CtPtr ProtocolV1::throttle_dispatch_queue() { ldout(cct, 20) << __func__ << dendl; if (cur_msg_size) { if (!connection->dispatch_queue->dispatch_throttler.get_or_fail( cur_msg_size)) { ldout(cct, 10) << __func__ << " wants " << cur_msg_size << " bytes from dispatch throttl...
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
264,241,008,049,952,200,000,000,000,000,000,000,000
28
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...
static MagickBooleanType IsPCL(const unsigned char *magick,const size_t length) { if (length < 4) return(MagickFalse); if (memcmp(magick,"\033E\033&",4) == 0) return(MagickFalse); if (memcmp(magick,"\033E\033",3) == 0) return(MagickTrue); return(MagickFalse); }
0
[ "CWE-401" ]
ImageMagick6
ff840181f631b1b7f29160cae24d792fcd176bae
32,980,687,003,304,900,000,000,000,000,000,000,000
10
https://github.com/ImageMagick/ImageMagick/issues/1520
ringbuffer_write(struct ringbuffer *buf, const void* src, size_t srclen) { int remaining; if (buf->write_avail == 0 || srclen == 0) return 0; if (srclen > buf->write_avail) srclen = buf->write_avail; remaining = buf->size - buf->write_pos; if (srclen > remaining) { memcpy(buf->buffer + buf...
0
[ "CWE-416" ]
owntone-server
246d8ae0cef27377e5dfe9ee3ad87e864d6b6266
263,827,278,634,148,930,000,000,000,000,000,000,000
28
[misc] Fix use-after-free in net_bind() Thanks to Ba Jinsheng for reporting this bug
Item *get_copy(THD *thd) { return get_item_copy<Item_int>(thd, this); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
190,954,072,730,436,600,000,000,000,000,000,000,000
2
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 ...
sixel_fromgif_tests_main(void) { int nret = EXIT_FAILURE; size_t i; typedef int (* testcase)(void); static testcase const testcases[] = { test1, }; for (i = 0; i < sizeof(testcases) / sizeof(testcase); ++i) { nret = testcases[i](); if (nret != EXIT_SUCCESS) { ...
0
[ "CWE-703", "CWE-787" ]
libsixel
7808a06b88c11dbc502318cdd51fa374f8cd47ee
315,832,520,502,911,080,000,000,000,000,000,000,000
22
gif loader: check LZW code size (Issue #75)
tiff_load_seek (thandle_t handle, toff_t offset, int whence) { TiffContext *context = (TiffContext *)handle; switch (whence) { case SEEK_SET: if (offset > context->used) return -1; context->pos = offset; break; ...
0
[]
gdk-pixbuf
31a6cff3dfc6944aad4612a9668b8ad39122e48b
110,425,006,550,110,070,000,000,000,000,000,000,000
25
tiff: Check for integer overflows in multiplication The checks currently in use are not sufficient, because they depend on undefined behaviour: rowstride = width * 4; if (rowstride / 4 != width) { /* overflow */ If the multiplication has already overflowed, the compiler may decide to optimize the if out and ...
gdm_session_settings_get_layout_name (GdmSessionSettings *settings) { g_return_val_if_fail (GDM_IS_SESSION_SETTINGS (settings), NULL); return g_strdup (settings->priv->layout_name); }
0
[]
gdm
c25ef9245be4e0be2126ef3d075df4401949b570
27,496,663,728,686,206,000,000,000,000,000,000,000
5
Store the face and dmrc files in a cache. Refer to bug #565151.
int __kvm_set_xcr(struct kvm_vcpu *vcpu, u32 index, u64 xcr) { u64 xcr0; /* Only support XCR_XFEATURE_ENABLED_MASK(xcr0) now */ if (index != XCR_XFEATURE_ENABLED_MASK) return 1; xcr0 = xcr; if (kvm_x86_ops->get_cpl(vcpu) != 0) return 1; if (!(xcr0 & XSTATE_FP)) return 1; if ((xcr0 & XSTATE_YMM) && !(xcr0...
0
[ "CWE-200" ]
kvm
831d9d02f9522e739825a51a11e3bc5aa531a905
231,062,701,642,357,500,000,000,000,000,000,000,000
20
KVM: x86: fix information leak to userland Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and kvm_clock_data are copied to userland with some padding and reserved fields unitialized. It leads to leaking of contents of kernel stack memory. We have to initialize them to zero. In patch v1 Jan Kiszka suggest...
int ImagingLibTiffEncodeInit(ImagingCodecState state, char *filename, int fp) { // Open the FD or the pointer as a tiff file, for writing. // We may have to do some monkeying around to make this really work. // If we have a fp, then we're good. // If we have a memory string, we're probably going to have to malloc, ...
0
[ "CWE-119", "CWE-787" ]
Pillow
6dcbf5bd96b717c58d7b642949da8d323099928e
329,287,847,424,768,440,000,000,000,000,000,000,000
61
Fix for buffer overflow in TiffDecode.c CVE-2016-0740
vrrp_print_json(void) { FILE *file; element e; struct json_object *array; if (LIST_ISEMPTY(vrrp_data->vrrp)) return; file = fopen ("/tmp/keepalived.json","w"); if (!file) { log_message(LOG_INFO, "Can't open /tmp/keepalived.json (%d: %s)", errno, strerror(errno)); return; } array = json_object_new_ar...
1
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
181,113,239,589,649,080,000,000,000,000,000,000,000
256
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
static void cache_destructor(void *buffer, void *notused) { destruct_data = buffer; }
0
[ "CWE-20" ]
memcached
75cc83685e103bc8ba380a57468c8f04413033f9
135,324,145,296,857,040,000,000,000,000,000,000,000
3
Issue 102: Piping null to the server will crash it
flow_entry_type_t flow_decode(flow_hash_table_t *fht, const struct pcap_pkthdr *pkthdr, const u_char *pktdata, const int datalink, const int expiry) { uint32_t pkt_len = pkthdr->caplen; const u_char *packet = pktdata; uint32_t _U_ vlan_offset; uint32_t _U_ l2offset; uint16_t ether_type = 0; ...
0
[ "CWE-476" ]
tcpreplay
46cf964a7db636da76abeebf10482acf6f682a87
56,987,942,516,339,380,000,000,000,000,000,000,000
114
Bug #677 - fixes for tcpprep tree
R_API void r_bin_java_print_bootstrap_method_argument_summary(RBinJavaBootStrapArgument *bsm_arg) { if (!bsm_arg) { eprintf ("Attempting to print an invalid RBinJavaBootStrapArgument *.\n"); return; } eprintf ("Bootstrap Method Argument Information:\n"); eprintf (" Offset: 0x%08"PFMT64x"", bsm_arg->file_offset)...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
214,741,714,812,851,780,000,000,000,000,000,000,000
15
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
static void record_init(node_t * n) { field_t *info; pointf ul, sz; int flip, len; char *textbuf; /* temp buffer for storing labels */ int sides = BOTTOM | RIGHT | TOP | LEFT; /* Always use rankdir to determine how records are laid out */ flip = NOT(GD_realflip(agraphof(n))); reclblp =...
0
[ "CWE-120" ]
graphviz
784411ca3655c80da0f6025ab20634b2a6ff696b
309,268,069,166,270,670,000,000,000,000,000,000,000
45
fix: out-of-bounds write on invalid label When the label for a node cannot be parsed (due to it being malformed), it falls back on the symbol name of the node itself. I.e. the default label the node would have had if it had no label attribute at all. However, this is applied by dynamically altering the node's label to...
void LibRaw::copy_bayer(unsigned short cblack[4],unsigned short *dmaxp) { // Both cropped and uncropped int row; #if defined(LIBRAW_USE_OPENMP) #pragma omp parallel for default(shared) #endif for (row=0; row < S.height; row++) { int col; unsigned short ldmax = 0; for (col=0; col < S.width; ...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
105,626,721,363,084,960,000,000,000,000,000,000,000
34
fixed two more problems found by fuzzer
void CNBL::PushMappedNB(CNB *NB) { m_MappedBuffersDetached--; m_MappedBuffers.Push(NB); }
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
271,334,610,653,235,070,000,000,000,000,000,000,000
5
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
bool Item_cache_row::allocate(uint num) { item_count= num; THD *thd= current_thd; return (!(values= (Item_cache **) thd->calloc(sizeof(Item_cache *)*item_count))); }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
123,851,679,330,698,620,000,000,000,000,000,000,000
7
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'...
CImg<T>& project_matrix(const CImg<t>& dictionary, const unsigned int method=0, const unsigned int max_iter=0, const double max_residual=1e-6) { return get_project_matrix(dictionary,method,max_iter,max_residual).move_to(*this); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
335,088,922,980,981,470,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
ipip6_tunnel_del_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a) { struct ip_tunnel_prl_entry *x, **p; int err = 0; write_lock(&ipip6_lock); if (a && a->addr != htonl(INADDR_ANY)) { for (p = &t->prl; *p; p = &(*p)->next) { if ((*p)->addr == a->addr) { x = *p; *p = x->next; kfree(x); t->prl_...
0
[ "CWE-399" ]
linux-2.6
36ca34cc3b8335eb1fe8bd9a1d0a2592980c3f02
238,637,657,051,534,130,000,000,000,000,000,000,000
30
sit: Add missing kfree_skb() on pskb_may_pull() failure. Noticed by Paul Marks <paul@pmarks.net>. Signed-off-by: David S. Miller <davem@davemloft.net>