func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int match_revfn(u8 af, const char *name, u8 revision, int *bestp) { const struct xt_match *m; int have_rev = 0; mutex_lock(&xt[af].mutex); list_for_each_entry(m, &xt[af].match, list) { if (strcmp(m->name, name) == 0) { if (m->revision > *bestp) *bestp = m->revision; if (m->revision == revision) ...
0
[]
linux
175e476b8cdf2a4de7432583b49c871345e4f8a1
240,918,109,668,058,420,000,000,000,000,000,000,000
21
netfilter: x_tables: Use correct memory barriers. When a new table value was assigned, it was followed by a write memory barrier. This ensured that all writes before this point would complete before any writes after this point. However, to determine whether the rules are unused, the sequence counter is read. To ensure...
ProcessStartupPacket(Port *port, bool SSLdone) { int32 len; void *buf; ProtocolVersion proto; MemoryContext oldcontext; if (pq_getbytes((char *) &len, 4) == EOF) { /* * EOF after SSLdone probably means the client didn't like our * response to NEGOTIATE_SSL_CODE. That's not an error condition, so ...
1
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
127,571,964,776,307,150,000,000,000,000,000,000,000
312
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth) { X509_VERIFY_PARAM_set_depth(ctx->param, depth); }
0
[]
openssl
d65b8b2162f33ac0d53dace588a0847ed827626c
44,340,504,061,951,380,000,000,000,000,000,000,000
4
Backport OCSP fixes.
static void php_imagefontsize(INTERNAL_FUNCTION_PARAMETERS, int arg) { zend_long SIZE; gdFontPtr font; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &SIZE) == FAILURE) { return; } font = php_find_gd_font(SIZE); RETURN_LONG(arg ? font->h : font->w); }
0
[ "CWE-787" ]
php-src
28022c9b1fd937436ab67bb3d61f652c108baf96
265,065,435,668,371,420,000,000,000,000,000,000,000
12
Fix bug#72697 - select_colors write out-of-bounds (cherry picked from commit b6f13a5ef9d6280cf984826a5de012a32c396cd4) Conflicts: ext/gd/gd.c
compileFile (const char *fileName) { /*Compile a table file */ FileInfo nested; fileCount++; nested.fileName = fileName; nested.encoding = noEncoding; nested.status = 0; nested.lineNumber = 0; if ((nested.in = findTable (fileName))) { while (getALine (&nested)) compileRule (&nested); fclo...
1
[]
liblouis
dc97ef791a4fae9da11592c79f9f79e010596e0c
338,572,681,038,668,370,000,000,000,000,000,000,000
24
Merge branch 'table_resolver'
static TEE_Result op_attr_secret_value_from_user(void *attr, const void *buffer, size_t size) { struct tee_cryp_obj_secret *key = attr; /* Data size has to fit in allocated buffer */ if (size > key->alloc_size) return TEE_ERROR_SECURITY; memcpy(key + 1, buffer, size); key->key_size = size; return TEE_SU...
0
[ "CWE-119", "CWE-787" ]
optee_os
a637243270fc1faae16de059091795c32d86e65e
160,198,768,455,629,080,000,000,000,000,000,000,000
12
svc: check for allocation overflow in crypto calls Without checking for overflow there is a risk of allocating a buffer with size smaller than anticipated and as a consequence of that it might lead to a heap based overflow with attacker controlled data written outside the boundaries of the buffer. Fixes: OP-TEE-2018-...
struct dst_entry *ip6_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6, const struct in6_addr *final_dst, bool can_sleep) { struct dst_entry *dst = NULL; int err; err = ip6_dst_lookup_tail(sk, &dst, fl6); if (err) return ERR_PTR(err); if (final_dst) fl6->daddr = *final_dst; if (can_sle...
0
[ "CWE-119", "CWE-401" ]
linux
2811ebac2521ceac84f2bdae402455baa6a7fb47
339,377,340,932,948,850,000,000,000,000,000,000,000
17
ipv6: udp packets following an UFO enqueued packet need also be handled by UFO In the following scenario the socket is corked: If the first UDP packet is larger then the mtu we try to append it to the write queue via ip6_ufo_append_data. A following packet, which is smaller than the mtu would be appended to the alread...
__global__ void SortedSegmentSumCustomKernel(const Index input_outer_dim_size, const Index inner_dim_size, const Index output_outer_dim_size, const Index* segment_ids, ...
0
[ "CWE-703", "CWE-681", "CWE-787" ]
tensorflow
db4f9717c41bccc3ce10099ab61996b246099892
149,257,465,446,489,920,000,000,000,000,000,000,000
49
Fix heap buffer overflow in UnsortedSegmentSum. When Index=int32, data_size and num_segments were truncated from int64 to int32. This truncation can produce negative numbers, which causes UnsortedSegmentFunctor to access out of bounds memory. Also: - Switches some indexing calculations to int64 to avoid signed intege...
static void svm_set_vintr(struct vcpu_svm *svm) { struct vmcb_control_area *control; /* * The following fields are ignored when AVIC is enabled */ WARN_ON(kvm_apicv_activated(svm->vcpu.kvm)); svm_set_intercept(svm, INTERCEPT_VINTR); /* * This is just a dummy VINTR to actually cause a vmexit to happen. *...
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
307,325,522,761,541,950,000,000,000,000,000,000,000
22
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
static av_always_inline void dnxhd_unquantize_c(DNXHDEncContext *ctx, int16_t *block, int n, int qscale, int last_index) { const uint8_t *weight_matrix; int level; int i; weight_matrix = (n&2) ? ctx->cid_table->chroma_weight : ctx->cid_table->luma_weight; for (i = 1; i <= last_index; i++) { ...
0
[ "CWE-703" ]
FFmpeg
f1caaa1c61310beba705957e6366f0392a0b005b
262,871,303,037,778,730,000,000,000,000,000,000,000
40
dnxhdenc: fix mb_rc size Fixes out of array access with RC_VARIANCE set to 0 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static void ext4_write_super(struct super_block *sb) { lock_super(sb); ext4_commit_super(sb, 1); unlock_super(sb); }
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
251,522,534,565,043,100,000,000,000,000,000,000,000
6
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
static inline void fpu_copy(struct task_struct *dst, struct task_struct *src) { if (use_eager_fpu()) { memset(&dst->thread.fpu.state->xsave, 0, xstate_size); __save_fpu(dst); } else { struct fpu *dfpu = &dst->thread.fpu; struct fpu *sfpu = &src->thread.fpu; unlazy_fpu(src); memcpy(dfpu->state, sfpu->stat...
0
[ "CWE-284", "CWE-264" ]
linux
26bef1318adc1b3a530ecc807ef99346db2aa8b0
283,915,630,087,063,160,000,000,000,000,000,000,000
13
x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround Before we do an EMMS in the AMD FXSAVE information leak workaround we need to clear any pending exceptions, otherwise we trap with a floating-point exception inside this code. Reported-by: halfdog <me@halfdog.net> Tested-by: Borislav Petkov <bp@suse.de> Link: h...
void add_reported_to(struct dump_dir *dd, const char *line) { if (!dd->locked) error_msg_and_die("dump_dir is not opened"); /* bug */ char *reported_to = dd_load_text_ext(dd, FILENAME_REPORTED_TO, DD_FAIL_QUIETLY_ENOENT | DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE); if (reported_to) { unsigned...
0
[ "CWE-264" ]
libreport
3bbf961b1884dd32654dd39b360dd78ef294b10a
44,443,432,841,809,080,000,000,000,000,000,000,000
30
never follow symlinks rhbz#887866 - use lchown instead chown and O_NOFOLLOW where we use open
DEFUN (clear_ip_bgp_all_vpnv4_soft_out, clear_ip_bgp_all_vpnv4_soft_out_cmd, "clear ip bgp * vpnv4 unicast soft out", CLEAR_STR IP_STR BGP_STR "Clear all peers\n" "Address family\n" "Address Family Modifier\n" "Soft reconfig\n" "Soft reconfig outboun...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
131,212,802,549,929,900,000,000,000,000,000,000,000
15
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
lyp_check_include_missing(struct lys_module *main_module) { int ret = 0; uint8_t i; /* in YANG 1.1, all the submodules must be in the main module, check it even for * 1.0 where it will be printed as warning and the include will be added into the main module */ for (i = 0; i < main_module->inc_size...
0
[ "CWE-787" ]
libyang
f6d684ade99dd37b21babaa8a856f64faa1e2e0d
295,964,720,780,365,040,000,000,000,000,000,000,000
15
parser BUGFIX long identity name buffer overflow STRING_OVERFLOW (CWE-120)
static void print_help() { MEM_ROOT mem_root; init_alloc_root(&mem_root, 4096, 4096); pop_dynamic(&all_options); sys_var_add_options(&all_options, sys_var::PARSE_EARLY); add_plugin_options(&all_options, &mem_root); sort_dynamic(&all_options, (qsort_cmp) option_cmp); add_terminator(&all_options); my_pr...
0
[ "CWE-362" ]
server
347eeefbfc658c8531878218487d729f4e020805
32,932,762,186,193,293,000,000,000,000,000,000,000
16
don't use my_copystat in the server it was supposed to be used in command-line tools only. Different fix for 4e5473862e: Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
archive_mstring_copy_wcs_len(struct archive_mstring *aes, const wchar_t *wcs, size_t len) { if (wcs == NULL) { aes->aes_set = 0; return (0); } aes->aes_set = AES_SET_WCS; /* Only WCS form set. */ archive_string_empty(&(aes->aes_mbs)); archive_string_empty(&(aes->aes_utf8)); archive_wstrncpy(&(aes->aes_wcs...
0
[ "CWE-125" ]
libarchive
22b1db9d46654afc6f0c28f90af8cdc84a199f41
255,618,059,265,825,070,000,000,000,000,000,000,000
13
Bugfix and optimize archive_wstring_append_from_mbs() The cal to mbrtowc() or mbtowc() should read up to mbs_length bytes and not wcs_length. This avoids out-of-bounds reads. mbrtowc() and mbtowc() return (size_t)-1 wit errno EILSEQ when they encounter an invalid multibyte character and (size_t)-2 when they they enco...
static inline void vma_adjust_trans_huge(struct vm_area_struct *vma, unsigned long start, unsigned long end, long adjust_next) { if (!vma->anon_vma || vma->vm_ops) return; __vma_adjust_trans_huge(vma, start, end, adjust_next); }
0
[ "CWE-399" ]
linux
78f11a255749d09025f54d4e2df4fbcb031530e2
254,479,437,542,397,500,000,000,000,000,000,000,000
9
mm: thp: fix /dev/zero MAP_PRIVATE and vm_flags cleanups The huge_memory.c THP page fault was allowed to run if vm_ops was null (which would succeed for /dev/zero MAP_PRIVATE, as the f_op->mmap wouldn't setup a special vma->vm_ops and it would fallback to regular anonymous memory) but other THP logics weren't fully ac...
static inline int normal_prio(struct task_struct *p) { int prio; if (task_has_rt_policy(p)) prio = MAX_RT_PRIO-1 - p->rt_priority; else prio = __normal_prio(p); return prio; }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
51,957,293,515,592,670,000,000,000,000,000,000,000
10
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
dp_packet_at(const struct dp_packet *b, size_t offset, size_t size) { return offset + size <= dp_packet_size(b) ? (char *) dp_packet_data(b) + offset : NULL; }
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
93,342,466,422,067,190,000,000,000,000,000,000,000
6
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
static inline av_flatten int get_symbol_inline(RangeCoder *c, uint8_t *state, int is_signed) { if (get_rac(c, state + 0)) return 0; else { int i, e; unsigned a; e = 0; while (get_rac(c, state + 1 + FFMIN(e, 9))) { // 1..10 ...
0
[ "CWE-125" ]
FFmpeg
d893253fcd93d11258e98857175e93be7d158708
178,678,052,786,556,400,000,000,000,000,000,000,000
23
avcodec/ffv1dec: Fix out of array read in slice counting Fixes: test-201710.mp4 Found-by: 连一汉 <lianyihan@360.cn> and Zhibin Hu Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit c20f4fcb74da2d0432c7b54499bb98f48236b904) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
fix_unset_addr_list(UnsetAddrList* uslist, regex_t* reg) { int i, offset; EnclosureNode* en; AbsAddrType addr; for (i = 0; i < uslist->num; i++) { if (! NODE_IS_ADDR_FIXED(uslist->us[i].target)) return ONIGERR_PARSER_BUG; en = ENCLOSURE_(uslist->us[i].target); addr = en->m.called_addr; ...
0
[ "CWE-476" ]
oniguruma
410f5916429e7d2920e1d4867388514f605413b8
11,619,073,687,990,597,000,000,000,000,000,000,000
18
fix #87: Read unknown address in onig_error_code_to_str()
static MagickBooleanType ReadOneLayer(const ImageInfo *image_info,Image* image, XCFDocInfo* inDocInfo,XCFLayerInfo *outLayer,const ssize_t layer, ExceptionInfo *exception) { MagickBooleanType status; MagickOffsetType offset; unsigned int foundPropEnd = 0; size_t hierarchy_offset, laye...
0
[ "CWE-770" ]
ImageMagick
19dbe11c5060f66abb393d1945107c5f54894fa8
241,181,586,554,026,070,000,000,000,000,000,000,000
209
https://github.com/ImageMagick/ImageMagick/issues/679
double ruby_strtod(const char *s00, char **se) { #ifdef Avoid_Underflow int scale; #endif int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign, e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign; const char *s, *s0, *s1; double aadj, adj; double_u aadj1, rv, rv0; Long L; ULong y, z; ...
1
[ "CWE-119" ]
ruby
5cb83d9dab13e14e6146f455ffd9fed4254d238f
336,205,701,680,627,040,000,000,000,000,000,000,000
955
util.c: ignore too long fraction part * util.c (ruby_strtod): ignore too long fraction part, which does not affect the result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
find_status_by_pid (pid) pid_t pid; { int i; i = find_index_by_pid (pid); if (i == NO_PID) return (PROC_BAD); if (pid_list[i].flags & PROC_RUNNING) return (PROC_STILL_ALIVE); return (pid_list[i].status); }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
122,479,295,042,844,280,000,000,000,000,000,000,000
12
bash-4.4-rc2 release
struct json_object* json_tokener_parse_ex(struct json_tokener *tok, const char *str, int len) { struct json_object *obj = NULL; char c = '\1'; #ifdef HAVE_SETLOCALE char *oldlocale=NULL, *tmplocale; tmplocale = setlocale(LC_NUMERIC, NULL); if (tmplocale) oldlocale = strdup(tmplocale); setlocale(LC_N...
1
[ "CWE-119", "CWE-310" ]
json-c
64e36901a0614bf64a19bc3396469c66dcd0b015
207,693,523,410,174,330,000,000,000,000,000,000,000
643
Patch to address the following issues: * CVE-2013-6371: hash collision denial of service * CVE-2013-6370: buffer overflow if size_t is larger than int
static struct kvm_memslots *install_new_memslots(struct kvm *kvm, struct kvm_memslots *slots, struct kvm_memory_slot *new) { struct kvm_memslots *old_memslots = kvm->memslots; update_memslots(slots, new, kvm->memslots->generation); rcu_assign_pointer(kvm->memslots, slots); synchronize_srcu_expedited(&kvm->srcu);...
0
[ "CWE-20" ]
linux
338c7dbadd2671189cec7faf64c84d01071b3f96
21,762,333,018,234,960,000,000,000,000,000,000,000
13
KVM: Improve create VCPU parameter (CVE-2013-4587) In multiple functions the vcpu_id is used as an offset into a bitfield. Ag malicious user could specify a vcpu_id greater than 255 in order to set or clear bits in kernel memory. This could be used to elevate priveges in the kernel. This patch verifies that the vcp...
void kvm_set_pfn_accessed(kvm_pfn_t pfn) { if (!kvm_is_reserved_pfn(pfn) && !kvm_is_zone_device_pfn(pfn)) mark_page_accessed(pfn_to_page(pfn));
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
30,046,446,367,683,970,000,000,000,000,000,000,000
5
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...
static int sctp_setsockopt_rtoinfo(struct sock *sk, char __user *optval, unsigned int optlen) { struct sctp_rtoinfo rtoinfo; struct sctp_association *asoc; unsigned long rto_min, rto_max; struct sctp_sock *sp = sctp_sk(sk); if (optlen != sizeof (struct sctp_rtoinfo)) return -EINVAL; if (copy_from_user(&rtoinf...
0
[ "CWE-617", "CWE-362" ]
linux
2dcab598484185dea7ec22219c76dcdd59e3cb90
58,574,244,708,825,400,000,000,000,000,000,000,000
53
sctp: avoid BUG_ON on sctp_wait_for_sndbuf Alexander Popov reported that an application may trigger a BUG_ON in sctp_wait_for_sndbuf if the socket tx buffer is full, a thread is waiting on it to queue more data and meanwhile another thread peels off the association being used by the first thread. This patch replaces ...
read_packet(int fd, gss_buffer_t buf, int timeout, int first) { int ret; static uint32_t len = 0; static char len_buf[4]; static int len_buf_pos = 0; static char * tmpbuf = 0; static int tmpbuf_pos = 0; if (first) { len_buf_pos = 0; return -2; } if (len_buf_pos < 4) { ret = timed_read(fd, &len_...
0
[ "CWE-400", "CWE-703" ]
knc
f237f3e09ecbaf59c897f5046538a7b1a3fa40c1
304,139,018,340,292,150,000,000,000,000,000,000,000
102
knc: fix a couple of memory leaks. One of these can be remotely triggered during the authentication phase which leads to a remote DoS possibility. Pointed out by: Imre Rad <radimre83@gmail.com>
user_path_parent(int dfd, const char __user *path, struct path *parent, struct qstr *last, int *type, unsigned int flags) { /* only LOOKUP_REVAL is allowed in extra flags */ return filename_parentat(dfd, getname(path), flags & LOOKUP_REVAL, parent, last, type); }
0
[ "CWE-284" ]
linux
9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca
12,722,889,561,999,910,000,000,000,000,000,000,000
10
vfs: rename: check backing inode being equal If a file is renamed to a hardlink of itself POSIX specifies that rename(2) should do nothing and return success. This condition is checked in vfs_rename(). However it won't detect hard links on overlayfs where these are given separate inodes on the overlayfs layer. Over...
xmlSchemaPValAttrNode(xmlSchemaParserCtxtPtr ctxt, xmlSchemaBasicItemPtr ownerItem, xmlAttrPtr attr, xmlSchemaTypePtr type, const xmlChar **value) { const xmlChar *val; if ((ctxt == NULL) || (type == NULL) || (attr == NULL)) return (-1); val = xmlSchemaGetNodeContent(ctxt, (xmlNod...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
201,330,972,331,251,460,000,000,000,000,000,000,000
18
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
TEST(Random, SecureFork) { unsigned char buffer = 0; // Init random buffer folly::Random::secureRandom(&buffer, 1); auto pid = fork(); EXPECT_NE(pid, -1); if (pid) { // parent int status = 0; folly::Random::secureRandom(&buffer, 1); auto pid2 = wait(&status); EXPECT_NE(WEXITSTATUS(statu...
0
[ "CWE-119", "CWE-787" ]
folly
8e927ee48b114c8a2f90d0cbd5ac753795a6761f
243,044,740,183,069,100,000,000,000,000,000,000,000
20
Flush secureRandom buffer on fork Summary: On fork, flush the secureRandom buffer, so that we don't share entropy between the parent and child. Reviewed By: ricklavoie Differential Revision: D9196474 fbshipit-source-id: 12ff8488d814466186df61328a5f1d4000beb27f
void FilterManager::encode1xxHeaders(ActiveStreamEncoderFilter* filter, ResponseHeaderMap& headers) { filter_manager_callbacks_.resetIdleTimer(); ASSERT(proxy_100_continue_); // The caller must guarantee that encode1xxHeaders() is invoked at most once. ASSERT(!state_.has_1xx...
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
269,610,738,041,901,540,000,000,000,000,000,000,000
34
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
static inline void show_node(struct zone *zone) { if (IS_ENABLED(CONFIG_NUMA)) printk("Node %d ", zone_to_nid(zone)); }
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
303,399,235,014,706,700,000,000,000,000,000,000,000
5
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
void SimpleMessenger::queue_reap(Pipe *pipe) { ldout(cct,10) << "queue_reap " << pipe << dendl; lock.Lock(); pipe_reap_queue.push_back(pipe); reaper_cond.Signal(); lock.Unlock(); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
242,515,867,696,507,130,000,000,000,000,000,000,000
8
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 ...
Init_dlhandle() { rb_cDLHandle = rb_define_class_under(rb_mDL, "Handle", rb_cObject); rb_define_alloc_func(rb_cDLHandle, rb_dlhandle_s_allocate); rb_define_method(rb_cDLHandle, "initialize", rb_dlhandle_initialize, -1); rb_define_method(rb_cDLHandle, "to_i", rb_dlhandle_to_i, 0); rb_define_method(rb...
0
[ "CWE-20", "CWE-399" ]
ruby
4600cf725a86ce31266153647ae5aa1197b1215b
270,515,982,786,496,470,000,000,000,000,000,000,000
12
* ext/dl/dl.c (rb_dlhandle_initialize): prohibits DL::dlopen with a tainted name of library. Patch by sheepman <sheepman AT sheepman.sakura.ne.jp>. * ext/dl/dl.c (rb_dlhandle_sym): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static int deliver_to_subscribers(struct snd_seq_client *client, struct snd_seq_event *event, int atomic, int hop) { struct snd_seq_subscribers *subs; int err, result = 0, num_ev = 0; struct snd_seq_event event_saved; struct snd_seq_client_port *src_port; struct snd_seq_port_subs_info *grp; src_port ...
0
[ "CWE-362" ]
linux
b3defb791b26ea0683a93a4f49c77ec45ec96f10
127,324,164,545,149,040,000,000,000,000,000,000,000
51
ALSA: seq: Make ioctls race-free The ALSA sequencer ioctls have no protection against racy calls while the concurrent operations may lead to interfere with each other. As reported recently, for example, the concurrent calls of setting client pool with a combination of write calls may lead to either the unkillable dea...
bool Virtual_column_info::fix_expr(THD *thd) { DBUG_ENTER("fix_vcol_expr"); const enum enum_column_usage saved_column_usage= thd->column_usage; thd->column_usage= COLUMNS_WRITE; int error= expr->fix_fields(thd, &expr); thd->column_usage= saved_column_usage; if (unlikely(error)) { StringBuffer<MAX_...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
22,340,190,165,552,257,000,000,000,000,000,000,000
21
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.
int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size, void **p) { struct kmem_cache_cpu *c; int i; /* memcg and kmem_cache debug support */ s = slab_pre_alloc_hook(s, flags); if (unlikely(!s)) return false; /* * Drain objects in the per cpu slab, while disabling local * IRQs, which...
0
[]
linux
fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8
286,573,245,831,184,630,000,000,000,000,000,000,000
69
mm: slub: add missing TID bump in kmem_cache_alloc_bulk() When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu freelist of length M, and N > M > 0, it will first remove the M elements from the percpu freelist, then call ___slab_alloc() to allocate the next element and repopulate the percpu freelis...
_upnp_delete_redir(unsigned short eport, int proto) { int r; #if defined(__linux__) r = delete_redirect_and_filter_rules(eport, proto); #elif defined(USE_PF) r = delete_redirect_and_filter_rules(ext_if_name, eport, proto); #else r = delete_redirect_rule(ext_if_name, eport, proto); delete_filter_rule(ext_if_name, e...
0
[ "CWE-476" ]
miniupnp
f321c2066b96d18afa5158dfa2d2873a2957ef38
68,215,192,947,058,525,000,000,000,000,000,000,000
20
upnp_redirect(): accept NULL desc argument
static void iov_fault_in_pages_read(struct iovec *iov, unsigned long len) { while (!iov->iov_len) iov++; while (len > 0) { unsigned long this_len; this_len = min_t(unsigned long, len, iov->iov_len); fault_in_pages_readable(iov->iov_base, this_len); len -= this_len; iov++; } }
1
[ "CWE-17" ]
linux
f0d1bec9d58d4c038d0ac958c9af82be6eb18045
185,972,045,487,277,260,000,000,000,000,000,000,000
14
new helper: copy_page_from_iter() parallel to copy_page_to_iter(). pipe_write() switched to it (and became ->write_iter()). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
int URI_FUNC(ParseSingleUriExMm)(URI_TYPE(Uri) * uri, const URI_CHAR * first, const URI_CHAR * afterLast, const URI_CHAR ** errorPos, UriMemoryManager * memory) { URI_TYPE(ParserState) state; int res; /* Check params */ if ((uri == NULL) || (first == NULL) || (afterLast == NULL)) { return URI_ERROR_NULL; } ...
0
[ "CWE-125" ]
uriparser
cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4
64,223,607,256,008,240,000,000,000,000,000,000,000
25
Fix uriParse*Ex* out-of-bounds read
static ssize_t print_cpus_kernel_max(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "%d\n", NR_CPUS - 1); }
1
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
236,444,924,406,476,620,000,000,000,000,000,000,000
5
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
int kvm_arch_hardware_enable(void *garbage) { long status; long tmp_base; unsigned long pte; unsigned long saved_psr; int slot; pte = pte_val(mk_pte_phys(__pa(kvm_vmm_base), PAGE_KERNEL)); local_irq_save(saved_psr); slot = ia64_itr_entry(0x3, KVM_VMM_BASE, pte, KVM_VMM_SHIFT); local_irq_restore(saved_psr); ...
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
39,250,474,077,948,810,000,000,000,000,000,000,000
34
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
ex_sleep(exarg_T *eap) { int n; long len; if (cursor_valid()) { n = W_WINROW(curwin) + curwin->w_wrow - msg_scrolled; if (n >= 0) windgoto((int)n, curwin->w_wincol + curwin->w_wcol); } len = eap->line2; switch (*eap->arg) { case 'm': break; case NUL: len *= 1000L; break; def...
0
[ "CWE-122" ]
vim
35a319b77f897744eec1155b736e9372c9c5575f
239,387,884,951,875,350,000,000,000,000,000,000,000
23
patch 8.2.3489: ml_get error after search with range Problem: ml_get error after search with range. Solution: Limit the line number to the buffer line count.
tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){ tsize_t written=0; char buffer[256]; int buflen=0; float X_W=0.0; float Y_W=0.0; float Z_W=0.0; float X_R=0.0; float Y_R=0.0; float Z_R=0.0; float X_G=0.0; float Y_G=0.0; float Z_G=0.0; float X_B=0.0; float Y_B=0.0; float Z_B=0.0; float x_w...
0
[ "CWE-119" ]
libtiff
b5d6803f0898e931cf772d3d0755704ab8488e63
64,218,964,493,948,340,000,000,000,000,000,000,000
94
* tools/tiff2pdf.c: fix write buffer overflow of 2 bytes on JPEG compressed images. Reported by Tyler Bohan of Cisco Talos as TALOS-CAN-0187 / CVE-2016-5652. Also prevents writing 2 extra uninitialized bytes to the file stream.
bool vma_policy_mof(struct vm_area_struct *vma) { struct mempolicy *pol; if (vma->vm_ops && vma->vm_ops->get_policy) { bool ret = false; pol = vma->vm_ops->get_policy(vma, vma->vm_start); if (pol && (pol->flags & MPOL_F_MOF)) ret = true; mpol_cond_put(pol); return ret; } pol = vma->vm_policy; if (...
0
[ "CWE-388" ]
linux
cf01fb9985e8deb25ccf0ea54d916b8871ae0e62
86,035,000,236,446,190,000,000,000,000,000,000,000
21
mm/mempolicy.c: fix error handling in set_mempolicy and mbind. In the case that compat_get_bitmap fails we do not want to copy the bitmap to the user as it will contain uninitialized stack data and leak sensitive data. Signed-off-by: Chris Salls <salls@cs.ucsb.edu> Signed-off-by: Linus Torvalds <torvalds@linux-founda...
test_gui_scrollbar(dict_T *args) { char_u *which; long value; int dragging; scrollbar_T *sb = NULL; if (dict_find(args, (char_u *)"which", -1) == NULL || dict_find(args, (char_u *)"value", -1) == NULL || dict_find(args, (char_u *)"dragging", -1) == NULL) return FALSE; which = dict_...
0
[ "CWE-121", "CWE-787" ]
vim
34f8117dec685ace52cd9e578e2729db278163fc
327,456,994,961,898,920,000,000,000,000,000,000,000
35
patch 8.2.4397: crash when using many composing characters in error message Problem: Crash when using many composing characters in error message. Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
flatpak_dir_find_remote_related (FlatpakDir *self, FlatpakRemoteState *state, const char *ref, GCancellable *cancellable, GError **error) { const char *m...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
90,454,045,066,936,700,000,000,000,000,000,000,000
36
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
virDomainActualNetDefFree(virDomainActualNetDefPtr def) { if (!def) return; switch (def->type) { case VIR_DOMAIN_NET_TYPE_BRIDGE: case VIR_DOMAIN_NET_TYPE_NETWORK: VIR_FREE(def->data.bridge.brname); break; case VIR_DOMAIN_NET_TYPE_DIRECT: VIR_FREE(def->data.direct.li...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
28,409,275,172,659,030,000,000,000,000,000,000,000
25
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
GF_Box *pasp_New() { ISOM_DECL_BOX_ALLOC(GF_PixelAspectRatioBox, GF_ISOM_BOX_TYPE_PASP); return (GF_Box *)tmp;
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
233,377,451,858,873,780,000,000,000,000,000,000,000
5
prevent dref memleak on invalid input (#1183)
send_progress (GOutputStream *out, int op, int n_ops, int progress, int status, const GError *update_error) { g_autoptr(GVariant) v = NULL; g_autofree gchar *error_name = NULL; if (update_error) error_name = get_progress_error (update...
0
[ "CWE-94", "CWE-74" ]
flatpak
aeb6a7ab0abaac4a8f4ad98b3df476d9de6b8bd4
68,020,371,280,019,520,000,000,000,000,000,000,000
19
portal: Convert --env in extra-args into --env-fd This hides overridden variables from the command-line, which means processes running under other uids can't see them in /proc/*/cmdline, which might be important if they contain secrets. Signed-off-by: Simon McVittie <smcv@collabora.com> Part-of: https://github.com/fl...
TEST_F(StreamErrorOnInvalidHttpMessageTest, ConnectionTerminatedIfCodecStreamErrorIsFalse) { sendInvalidRequestAndVerifyConnectionState(false); }
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
299,710,033,342,044,160,000,000,000,000,000,000,000
3
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
bool Smb4KGlobal::coreIsInitialized() { return p->coreInitialized; }
0
[ "CWE-20" ]
smb4k
71554140bdaede27b95dbe4c9b5a028a83c83cce
27,153,003,588,920,790,000,000,000,000,000,000,000
4
Find the mount/umount commands in the helper Instead of trusting what we get passed in CVE-2017-8849
cms_context_fini(cms_context *cms) { struct list_head *n, *pos; if (cms->cert) { CERT_DestroyCertificate(cms->cert); cms->cert = NULL; } switch (cms->pwdata.source) { case PW_SOURCE_INVALID: case PW_PROMPT: case PW_DEVICE: case PW_FROMFILEDB: case PW_FROMENV: case PW_FROMFILE: case PW_FROMFD: case PW_...
0
[ "CWE-787" ]
pesign
b879dda52f8122de697d145977c285fb0a022d76
126,365,159,753,832,470,000,000,000,000,000,000,000
124
Handle NULL pwdata in cms_set_pw_data() When 12f16710ee44ef64ddb044a3523c3c4c4d90039a rewrote this function, it didn't handle the NULL pwdata invocation from daemon.c. This leads to a explicit NULL dereference and crash on all attempts to daemonize pesign. Signed-off-by: Robbie Harwood <rharwood@redhat.com>
size_t tls12_get_sig_algs(SSL *s, unsigned char *p) { TLS_SIGALGS *sptr = s->cert->conf_sigalgs; size_t slen; /* Use custom signature algorithms if any are set */ if (sptr) { slen = s->cert->conf_sigalgslen; if (p) { size_t i; for (i = 0; i < slen; i++, sptr++) { *p++ = sptr->rhash; *p...
1
[]
openssl
c70a1fee71119a9005b1f304a3bf47694b4a53ac
41,015,729,261,650,327,000,000,000,000,000,000,000
32
Reorganise supported signature algorithm extension processing. Only store encoded versions of peer and configured signature algorithms. Determine shared signature algorithms and cache the result along with NID equivalents of each algorithm. (backport from HEAD)
rb_string_value_cstr(ptr) volatile VALUE *ptr; { VALUE str = rb_string_value(ptr); char *s = RSTRING(str)->ptr; if (!s || RSTRING(str)->len != strlen(s)) { rb_raise(rb_eArgError, "string contains null byte"); } return s; }
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
63,249,896,140,123,080,000,000,000,000,000,000,000
11
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
void *Type_LUT8_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag) { cmsUInt8Number InputChannels, OutputChannels, CLUTpoints; cmsUInt8Number* Temp = NULL; cmsPipeline* NewLUT = NULL; cmsStage *mpemat, *mpeclut; cmsUInt32Number nTabSize, ...
0
[]
Little-CMS
886e2f524268efe8a1c3aa838c28e446fda24486
279,119,072,145,374,070,000,000,000,000,000,000,000
97
Fixes from coverity check
static bool check_btf_id_ok(const struct bpf_func_proto *fn) { int i; for (i = 0; i < ARRAY_SIZE(fn->arg_type); i++) { if (fn->arg_type[i] == ARG_PTR_TO_BTF_ID && !fn->arg_btf_id[i]) return false; if (fn->arg_type[i] != ARG_PTR_TO_BTF_ID && fn->arg_btf_id[i]) return false; } return true; }
0
[]
linux
9b00f1b78809309163dda2d044d9e94a3c0248a3
101,572,012,832,630,820,000,000,000,000,000,000,000
14
bpf: Fix truncation handling for mod32 dst reg wrt zero Recently noticed that when mod32 with a known src reg of 0 is performed, then the dst register is 32-bit truncated in verifier: 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (b7) r0 = 0 1: R0_w=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 1: (b7) r1 = -1 2: R0_w=inv...
R_API void r_io_bank_init(RIO *io) { r_return_if_fail (io); r_io_bank_fini (io); io->banks = r_id_storage_new (0, UT32_MAX); }
0
[ "CWE-416" ]
radare2
b5cb90b28ec71fda3504da04e3cc94a362807f5e
32,958,583,594,162,116,000,000,000,000,000,000,000
5
Prefer memleak over usaf in io.bank's rbtree bug ##crash * That's a workaround, proper fix will come later * Reproducer: bins/fuzzed/iobank-crash * Reported by Akyne Choi via huntr.dev
static int virtio_net_handle_mq(VirtIONet *n, uint8_t cmd, struct iovec *iov, unsigned int iov_cnt) { VirtIODevice *vdev = VIRTIO_DEVICE(n); struct virtio_net_ctrl_mq mq; size_t s; uint16_t queues; s = iov_to_buf(iov, iov_cnt, 0, &mq, sizeof(mq)); if (s != sizeof...
0
[ "CWE-119" ]
qemu
98f93ddd84800f207889491e0b5d851386b459cf
15,127,200,991,551,416,000,000,000,000,000,000,000
34
virtio-net: out-of-bounds buffer write on load CVE-2013-4149 QEMU 1.3.0 out-of-bounds buffer write in virtio_net_load()@hw/net/virtio-net.c > } else if (n->mac_table.in_use) { > uint8_t *buf = g_malloc0(n->mac_table.in_use); We are allocating buffer of size n->mac_table.in_use > qemu...
*/ static __cold void io_uring_del_tctx_node(unsigned long index) { struct io_uring_task *tctx = current->io_uring; struct io_tctx_node *node; if (!tctx) return; node = xa_erase(&tctx->xa, index); if (!node) return; WARN_ON_ONCE(current != node->task); WARN_ON_ONCE(list_empty(&node->ctx_node)); mutex_lo...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
83,790,641,641,650,895,000,000,000,000,000,000,000
22
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...
win_new_width(win_T *wp, int width) { wp->w_width = width; wp->w_lines_valid = 0; changed_line_abv_curs_win(wp); invalidate_botline_win(wp); if (wp == curwin) { update_topline(); curs_columns(TRUE); // validate w_wrow } redraw_win_later(wp, NOT_VALID); wp->w_redr_status = TRUE; }
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
16,386,323,795,977,240,000,000,000,000,000,000,000
14
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
virDomainBlockJobSetSpeed(virDomainPtr dom, const char *disk, unsigned long bandwidth, unsigned int flags) { virConnectPtr conn; VIR_DOMAIN_DEBUG(dom, "disk=%s, bandwidth=%lu, flags=%x", disk, bandwidth, flags); virResetLastError(); virCheckDomainReturn(...
0
[ "CWE-254" ]
libvirt
506e9d6c2d4baaf580d489fff0690c0ff2ff588f
140,579,469,351,613,120,000,000,000,000,000,000,000
30
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>
HttpTransact::handle_cache_operation_on_forward_server_response(State* s) { DebugTxn("http_trans", "[handle_cache_operation_on_forward_server_response] (hcoofsr)"); DebugTxn("http_seq", "[handle_cache_operation_on_forward_server_response]"); HTTPHdr *base_response = NULL; HTTPStatus server_response_code = HTTP...
0
[ "CWE-119" ]
trafficserver
8b5f0345dade6b2822d9b52c8ad12e63011a5c12
149,568,304,298,000,850,000,000,000,000,000,000,000
443
Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug
static void pn_sock_close(struct sock *sk, long timeout) { sk_common_release(sk); }
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
333,829,161,558,082,340,000,000,000,000,000,000,000
4
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
free_parser_data(void) { if (LIST_EXISTS(defs)) free_list(&defs); if (LIST_EXISTS(multiline_stack)) free_list(&multiline_stack); }
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
300,025,461,993,212,520,000,000,000,000,000,000,000
8
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 ...
bool operator()(const QString &left, const QString &right) const { #ifdef QBT_USES_QT5 #if defined(Q_OS_WIN) // Without ICU library, QCollator uses the native API on Windows 7+. But that API // sorts older versions of μTorrent differently than the newer ones because the ...
0
[ "CWE-20", "CWE-79" ]
qBittorrent
6ca3e4f094da0a0017cb2d483ec1db6176bb0b16
9,480,498,440,044,843,000,000,000,000,000,000,000
18
Add Utils::String::toHtmlEscaped
static int coalesced_mmio_in_range(struct kvm_coalesced_mmio_dev *dev, gpa_t addr, int len) { /* is it in a batchable area ? * (addr,len) is fully included in * (zone->addr, zone->size) */ if (len < 0) return 0; if (addr + len < addr) return 0; if (addr < dev->zone.addr) return 0; if (addr + len...
0
[ "CWE-787" ]
kvm
b60fe990c6b07ef6d4df67bc0530c7c90a62623a
231,838,230,199,082,050,000,000,000,000,000,000,000
17
KVM: coalesced_mmio: add bounds checking The first/last indexes are typically shared with a user app. The app can change the 'last' index that the kernel uses to store the next result. This change sanity checks the index before using it for writing to a potentially arbitrary address. This fixes CVE-2019-14821. Cc: ...
GF_Err drep_Size(GF_Box *s) { s->size += 8; return GF_OK; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
297,648,047,849,360,200,000,000,000,000,000,000,000
5
prevent dref memleak on invalid input (#1183)
lambda_function_body( char_u **arg, typval_T *rettv, evalarg_T *evalarg, garray_T *newargs, garray_T *argtypes, int varargs, garray_T *default_args, char_u *ret_type) { int evaluate = (evalarg->eval_flags & EVAL_EVALUATE); garray_T *gap = &evalarg->eval_ga; garray_T *freeg...
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
155,524,476,331,384,000,000,000,000,000,000,000,000
189
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.
static void test_bug1664() { MYSQL_STMT *stmt; int rc, int_data; const char *data; const char *str_data= "Simple string"; MYSQL_BIND my_bind[2]; const char *query= "INSERT INTO test_long_data(col2, col1) VALUES(?, ?)"; myheader("test_bug1664"); rc= mysql_query(mysql, "DROP TABLE...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
149,877,885,369,011,620,000,000,000,000,000,000,000
136
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...
unsigned long get_max_files(void) { return files_stat.max_files; }
0
[ "CWE-17" ]
linux
eee5cc2702929fd41cce28058dc6d6717f723f87
339,325,976,176,935,780,000,000,000,000,000,000,000
4
get rid of s_files and files_lock The only thing we need it for is alt-sysrq-r (emergency remount r/o) and these days we can do just as well without going through the list of files. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
mysql_list_processes(MYSQL *mysql) { MYSQL_DATA *fields; uint field_count; uchar *pos; LINT_INIT(fields); if (ma_simple_command(mysql, COM_PROCESS_INFO,0,0,0,0)) return(NULL); free_old_query(mysql); pos=(uchar*) mysql->net.read_pos; field_count=(uint) net_field_length(&pos); if (!(fields = mysql-...
0
[ "CWE-20" ]
mariadb-connector-c
2759b87d72926b7c9b5426437a7c8dd15ff57945
98,516,357,705,314,600,000,000,000,000,000,000,000
21
sanity checks for client-supplied OK packet content reported by Matthias Kaiser, Apple Information Security
static MagickBooleanType IsPWP(const unsigned char *magick,const size_t length) { if (length < 5) return(MagickFalse); if (LocaleNCompare((char *) magick,"SFW95",5) == 0) return(MagickTrue); return(MagickFalse); }
0
[ "CWE-20", "CWE-252" ]
ImageMagick
6b6bff054d569a77973f2140c0e86366e6168a6c
43,258,781,706,984,890,000,000,000,000,000,000,000
8
https://github.com/ImageMagick/ImageMagick/issues/1199
void regulator_unregister_supply_alias(struct device *dev, const char *id) { struct regulator_supply_alias *map; map = regulator_find_supply_alias(dev, id); if (map) { list_del(&map->list); kfree(map); } }
0
[ "CWE-416" ]
linux
60a2362f769cf549dc466134efe71c8bf9fbaaba
13,035,101,802,931,967,000,000,000,000,000,000,000
10
regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing After freeing pin from regulator_ena_gpio_free, loop can access the pin. So this patch fixes not to access pin after freeing. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
DEFUN(goURL, GOTO, "Open specified document in a new buffer") { goURL0("Goto URL: ", FALSE); }
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
260,743,856,877,671,800,000,000,000,000,000,000,000
4
Make temporary directory safely when ~/.w3m is unwritable
static int dmg_probe(const uint8_t *buf, int buf_size, const char *filename) { int len; if (!filename) { return 0; } len = strlen(filename); if (len > 4 && !strcmp(filename + len - 4, ".dmg")) { return 2; } return 0; }
0
[ "CWE-119" ]
qemu
f0dce23475b5af5da6b17b97c1765271307734b6
268,351,189,225,756,600,000,000,000,000,000,000,000
14
dmg: prevent chunk buffer overflow (CVE-2014-0145) Both compressed and uncompressed I/O is buffered. dmg_open() calculates the maximum buffer size needed from the metadata in the image file. There is currently a buffer overflow since ->lengths[] is accounted against the maximum compressed buffer size but actually us...
HeaderString::HeaderString(HeaderString&& move_value) noexcept { type_ = move_value.type_; string_length_ = move_value.string_length_; switch (move_value.type_) { case Type::Reference: { buffer_.ref_ = move_value.buffer_.ref_; break; } case Type::Dynamic: { // When we move a dynamic header, we s...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
246,425,230,875,018,200,000,000,000,000,000,000,000
26
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static int fuzzer_make_current(UNUSED void *cookie, UNUSED int scanout_idx, virgl_renderer_gl_context ctx) { return virgl_egl_make_context_current(test_egl, ctx); }
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
196,723,659,493,805,700,000,000,000,000,000,000,000
5
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>
static int ntop_snmpgetnext(lua_State* vm) { return(ntop_snmp_get_fctn(vm, SNMP_GETNEXT_REQUEST_TYPE)); }
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
205,837,035,671,656,000,000,000,000,000,000,000,000
1
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
static int dom_size(int peers) { int i = 0; while ((i * i) < peers) i++; return i < MAX_MON_DOMAIN ? i : MAX_MON_DOMAIN; }
0
[ "CWE-787" ]
linux
9aa422ad326634b76309e8ff342c246800621216
279,944,407,203,088,930,000,000,000,000,000,000,000
8
tipc: improve size validations for received domain records The function tipc_mon_rcv() allows a node to receive and process domain_record structs from peer nodes to track their views of the network topology. This patch verifies that the number of members in a received domain record does not exceed the limit defined b...
int rtas_suspend_cpu(struct rtas_suspend_me_data *data) { return __rtas_suspend_cpu(data, 0); }
0
[ "CWE-862" ]
linux
bd59380c5ba4147dcbaad3e582b55ccfd120b764
198,142,674,634,705,860,000,000,000,000,000,000,000
4
powerpc/rtas: Restrict RTAS requests from userspace A number of userspace utilities depend on making calls to RTAS to retrieve information and update various things. The existing API through which we expose RTAS to userspace exposes more RTAS functionality than we actually need, through the sys_rtas syscall, which al...
static unsigned long id_function(void) { return ((unsigned long) CURRENT_THREAD_ID); }
0
[ "CWE-476" ]
libvncserver
33441d90a506d5f3ae9388f2752901227e430553
196,002,046,653,351,400,000,000,000,000,000,000,000
4
libvncclient/tls_openssl: do not deref a NULL pointer Happens in anonTLS mode where cred is NULL. re #347
int inode_wait(void *word) { schedule(); return 0; }
0
[ "CWE-284", "CWE-264" ]
linux
23adbe12ef7d3d4195e80800ab36b37bee28cd03
86,599,448,853,162,970,000,000,000,000,000,000,000
5
fs,userns: Change inode_capable to capable_wrt_inode_uidgid The kernel has no concept of capabilities with respect to inodes; inodes exist independently of namespaces. For example, inode_capable(inode, CAP_LINUX_IMMUTABLE) would be nonsense. This patch changes inode_capable to check for uid and gid mappings and rena...
static int __init nf_conntrack_proto_dccp_init(void) { int err; err = nf_conntrack_l4proto_register(&dccp_proto4); if (err < 0) goto err1; err = nf_conntrack_l4proto_register(&dccp_proto6); if (err < 0) goto err2; return 0; err2: nf_conntrack_l4proto_unregister(&dccp_proto4); err1: return err; }
0
[]
linux
2bc780499aa33311ec0f3e42624dfaa7be0ade5e
335,104,690,955,236,300,000,000,000,000,000,000,000
18
[NETFILTER]: nf_conntrack: add DCCP protocol support Add DCCP conntrack helper. Thanks to Gerrit Renker <gerrit@erg.abdn.ac.uk> for review and testing. Signed-off-by: Patrick McHardy <kaber@trash.net>
AR_10_ConfirmRelease(PRIVATE_NETWORKKEY ** /*network*/, PRIVATE_ASSOCIATIONKEY ** association, int nextState, void * /*params*/) { (*association)->protocolState = nextState; return EC_Normal; }
0
[ "CWE-415", "CWE-703", "CWE-401" ]
dcmtk
a9697dfeb672b0b9412c00c7d36d801e27ec85cb
15,436,647,356,912,308,000,000,000,000,000,000,000
6
Fixed poss. NULL pointer dereference/double free. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches.
//! Resize image to half-size along XY axes, using an optimized filter. CImg<T>& resize_halfXY() { return get_resize_halfXY().move_to(*this);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
115,320,496,418,690,290,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
str_new4(klass, str) VALUE klass, str; { VALUE str2 = str_alloc(klass); RSTRING(str2)->len = RSTRING(str)->len; RSTRING(str2)->ptr = RSTRING(str)->ptr; if (FL_TEST(str, ELTS_SHARED)) { FL_SET(str2, ELTS_SHARED); RSTRING(str2)->aux.shared = RSTRING(str)->aux.shared; } else { FL_SET(str, E...
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
117,853,995,757,430,230,000,000,000,000,000,000,000
18
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static int _annotate_rewrite(struct mailbox *oldmailbox, uint32_t olduid, const char *olduserid, struct mailbox *newmailbox, uint32_t newuid, const char *newuserid, ...
0
[ "CWE-732" ]
cyrus-imapd
621f9e41465b521399f691c241181300fab55995
163,996,081,750,211,150,000,000,000,000,000,000,000
21
annotate: don't allow everyone to write shared server entries
static GF_Node *lsr_read_use(GF_LASeRCodec *lsr, Bool is_same) { GF_FieldInfo info; u32 flag; GF_Node *elt = gf_node_new(lsr->sg, TAG_SVG_use); if (is_same) { if (lsr->prev_use) { lsr_restore_base(lsr, (SVG_Element *)elt, lsr->prev_use, 0, 0); } else { GF_LOG(GF_LOG_WARNING, GF_LOG_CODING, ("[LASeR] sameu...
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
102,512,162,616,681,970,000,000,000,000,000,000,000
34
fixed #2213
rsvp_clear_checksum(void *header) { struct rsvp_common_header *rsvp_com_header = (struct rsvp_common_header *) header; rsvp_com_header->checksum[0] = 0; rsvp_com_header->checksum[1] = 0; }
0
[ "CWE-125" ]
tcpdump
bea2686c296b79609060a104cc139810785b0739
5,723,624,345,988,628,000,000,000,000,000,000,000
7
(for 4.9.3) CVE-2018-14465/RSVP: Add a missing bounds check In rsvp_obj_print(). This fixes a buffer over-read discovered by Bhargava Shastry. Add a test using the capture file supplied by the reporter(s).
static uint64_t vmxnet3_get_mac_high(MACAddr *addr) { return VMXNET3_MAKE_BYTE(0, addr->a[4]) | VMXNET3_MAKE_BYTE(1, addr->a[5]); }
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
273,799,855,050,103,630,000,000,000,000,000,000,000
5
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...
void *jas_realloc(void *ptr, size_t size) { void *result; JAS_DBGLOG(101, ("jas_realloc called with %x,%zu\n", ptr, size)); result = realloc(ptr, size); JAS_DBGLOG(100, ("jas_realloc(%p, %zu) -> %p\n", ptr, size, result)); return result; }
1
[ "CWE-190" ]
jasper
988f8365f7d8ad8073b6786e433d34c553ecf568
139,439,419,542,915,110,000,000,000,000,000,000,000
8
Fixed an integer overflow problem.
PS_READ_FUNC(files) { long n; struct stat sbuf; PS_FILES_DATA; /* If strict mode, check session id existence */ if (PS(use_strict_mode) && ps_files_key_exists(data, key TSRMLS_CC) == FAILURE) { /* key points to PS(id), but cannot change here. */ if (key) { efree(PS(id)); PS(id) = NULL; } PS(id) = ...
0
[]
php-src
a793b709086eed655bc98f933d838b8679b28920
33,532,134,815,063,706,000,000,000,000,000,000,000
66
refix bug #69111, crash in 5.6 only
pixOctreeQuantNumColors(PIX *pixs, l_int32 maxcolors, l_int32 subsample) { l_int32 w, h, minside, bpp, wpls, wpld, i, j, actualcolors; l_int32 rval, gval, bval, nbase, nextra, maxlevel, ncubes, val; l_int32 *lut1, *lut2; l_uint32 index; l_uint32 *lines, *...
0
[ "CWE-125" ]
leptonica
5ee24b398bb67666f6d173763eaaedd9c36fb1e5
117,408,059,232,472,580,000,000,000,000,000,000,000
295
Fixed issue 22140 in oss-fuzz: Heap-buffer-overflow * color quantized pix must be 8 bpp before extra colors are added.
static unsigned HuffmanTree_makeFromLengths2(HuffmanTree* tree) { uivector blcount; uivector nextcode; unsigned bits, n, error = 0; uivector_init(&blcount); uivector_init(&nextcode); tree->tree1d = (unsigned*)calloc(tree->numcodes, sizeof(unsigned)); if(!tree->tree1d) error = 83; /*alloc fail*/ if(!u...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
74,415,327,421,336,180,000,000,000,000,000,000,000
38
Fixed #5645: realloc return handling
long keyctl_keyring_link(key_serial_t id, key_serial_t ringid) { key_ref_t keyring_ref, key_ref; long ret; keyring_ref = lookup_user_key(ringid, KEY_LOOKUP_CREATE, KEY_NEED_WRITE); if (IS_ERR(keyring_ref)) { ret = PTR_ERR(keyring_ref); goto error; } key_ref = lookup_user_key(id, KEY_LOOKUP_CREATE, KEY_NEED_...
0
[ "CWE-347" ]
linux
ee8f844e3c5a73b999edf733df1c529d6503ec2f
200,904,449,988,877,300,000,000,000,000,000,000,000
25
KEYS: Disallow keyrings beginning with '.' to be joined as session keyrings This fixes CVE-2016-9604. Keyrings whose name begin with a '.' are special internal keyrings and so userspace isn't allowed to create keyrings by this name to prevent shadowing. However, the patch that added the guard didn't fix KEYCTL_JOIN_...
apr_status_t h2_session_create(h2_session **psession, conn_rec *c, h2_ctx *ctx, h2_workers *workers) { return h2_session_create_int(psession, c, NULL, ctx, workers); }
0
[]
mod_h2
5e75e5685dd043fe93a5a08a15edd087a43f6968
67,096,842,579,634,230,000,000,000,000,000,000,000
5
v1.11.0 -------------------------------------------------------------------------------- * connection IO event handling reworked. Instead of reacting on incoming bytes, the state machine now acts on incoming frames that are affecting it. This reduces state transitions. * pytest suite now covers some basic tests...