func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void recalibrate_floppy(void) { debugt(__func__, ""); do_floppy = recal_interrupt; output_byte(current_fdc, FD_RECALIBRATE); if (output_byte(current_fdc, UNIT(current_drive)) < 0) reset_fdc(); }
0
[ "CWE-416" ]
linux
233087ca063686964a53c829d547c7571e3f67bf
167,550,845,270,050,340,000,000,000,000,000,000,000
8
floppy: disable FDRAWCMD by default Minh Yuan reported a concurrency use-after-free issue in the floppy code between raw_cmd_ioctl and seek_interrupt. [ It turns out this has been around, and that others have reported the KASAN splats over the years, but Minh Yuan had a reproducer for it and so gets primary credi...
GF_Err moov_AddBox(GF_Box *s, GF_Box *a) { GF_MovieBox *ptr = (GF_MovieBox *)s; switch (a->type) { case GF_ISOM_BOX_TYPE_IODS: if (ptr->iods) ERROR_ON_DUPLICATED_BOX(a, ptr) ptr->iods = (GF_ObjectDescriptorBox *)a; //if no IOD, delete the box if (!ptr->iods->descriptor) { ptr->iods = NULL; gf_isom_box...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
140,548,293,713,092,970,000,000,000,000,000,000,000
46
prevent dref memleak on invalid input (#1183)
void __init skb_init(void) { skbuff_head_cache = kmem_cache_create("skbuff_head_cache", sizeof(struct sk_buff), 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); skbuff_fclone_cache = kmem_cache_create("skbuff_fclone_cache", sizeof(struct sk_buff_fclones), 0, SLAB...
0
[ "CWE-703", "CWE-125" ]
linux
8605330aac5a5785630aec8f64378a54891937cc
37,416,618,268,811,030,000,000,000,000,000,000,000
13
tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs __sock_recv_timestamp can be called for both normal skbs (for receive timestamps) and for skbs on the error queue (for transmit timestamps). Commit 1c885808e456 (tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING) assumes any skb passed to __sock_recv_timest...
int __xmlRandom(void) { int ret; if (xmlDictInitialized == 0) __xmlInitializeDict(); xmlRMutexLock(xmlDictMutex); #ifdef HAVE_RAND_R ret = rand_r(& rand_seed); #else ret = rand(); #endif xmlRMutexUnlock(xmlDictMutex); return(ret); }
0
[ "CWE-119" ]
libxml2
6360a31a84efe69d155ed96306b9a931a40beab9
209,665,159,351,374,200,000,000,000,000,000,000,000
15
CVE-2015-7497 Avoid an heap buffer overflow in xmlDictComputeFastQKey For https://bugzilla.gnome.org/show_bug.cgi?id=756528 It was possible to hit a negative offset in the name indexing used to randomize the dictionary key generation Reported and fix provided by David Drysdale @ Google
onig_get_callout_in_by_name_id(int name_id) { if (name_id < 0 || name_id >= GlobalCalloutNameList->n) return 0; return GlobalCalloutNameList->v[name_id].in; }
0
[ "CWE-400", "CWE-399", "CWE-674" ]
oniguruma
4097828d7cc87589864fecf452f2cd46c5f37180
60,561,643,626,932,110,000,000,000,000,000,000,000
7
fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves.
\note If true, set coordinates (n). **/ template<typename t> bool contains(const T& pixel, t& n) const {
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
110,872,301,551,188,220,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.
int RGWDeleteObj_ObjStore_SWIFT::get_params() { const string& mm = s->info.args.get("multipart-manifest"); multipart_delete = (mm.compare("delete") == 0); return RGWDeleteObj_ObjStore::get_params(); }
0
[ "CWE-617" ]
ceph
f44a8ae8aa27ecef69528db9aec220f12492810e
92,719,500,606,620,130,000,000,000,000,000,000,000
7
rgw: RGWSwiftWebsiteHandler::is_web_dir checks empty subdir_name checking for empty name avoids later assertion in RGWObjectCtx::set_atomic Fixes: CVE-2021-3531 Reviewed-by: Casey Bodley <cbodley@redhat.com> Signed-off-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit 7196a469b4470f3c8628489df9a41ec8b...
static void write_outfile(QPDF& pdf, Options& o) { if (o.split_pages) { // Generate output file pattern std::string before; std::string after; size_t len = strlen(o.outfilename); char* num_spot = strstr(const_cast<char*>(o.outfilename), "%d"); if (num_spot != 0) ...
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
300,818,659,349,135,200,000,000,000,000,000,000,000
93
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
router_parse_entry_from_string(const char *s, const char *end, int cache_copy, int allow_annotations, const char *prepend_annotations) { routerinfo_t *router = NULL; char digest[128]; smartlist_t *tokens = NULL, *exit_policy_tokens = NULL; directory_...
0
[ "CWE-399" ]
tor
57e35ad3d91724882c345ac709666a551a977f0f
168,081,952,750,365,140,000,000,000,000,000,000,000
331
Avoid possible segfault when handling networkstatus vote with bad flavor Fix for 6530; fix on 0.2.2.6-alpha.
static int lookup_umount_fs_by_mountinfo(struct libmnt_context *cxt, const char *tgt) { struct libmnt_fs *fs = NULL; int rc; assert(cxt); assert(cxt->fs); DBG(CXT, ul_debugobj(cxt, " lookup by mountinfo")); /* search */ rc = __mtab_find_umount_fs(cxt, tgt, &fs); if (rc != 0) return rc; /* apply result */...
0
[ "CWE-552", "CWE-703" ]
util-linux
57202f5713afa2af20ffbb6ab5331481d0396f8d
61,479,788,189,084,860,000,000,000,000,000,000,000
30
libmount: fix UID check for FUSE umount [CVE-2021-3995] Improper UID check allows an unprivileged user to unmount FUSE filesystems of users with similar UID. Signed-off-by: Karel Zak <kzak@redhat.com>
cached_NPN_GetStringIdentifier(const NPUTF8 *name) { NPIdentifier ident; if (!use_npidentifier_cache()) ident = invoke_NPN_GetStringIdentifier(name); #if USE_NPIDENTIFIER_CACHE else if (!npidentifier_cache_has_string(name, &ident)) { ident = invoke_NPN_GetStringIdentifier(name); npidentifier_cache_reserve(1); ...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
123,060,272,056,437,700,000,000,000,000,000,000,000
14
Support all the new variables added
SshIo::SshIo(const std::wstring& wurl, size_t blockSize) { p_ = new SshImpl(wurl, blockSize); }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
79,849,792,575,931,990,000,000,000,000,000,000,000
4
Fix https://github.com/Exiv2/exiv2/issues/55
static int ZEND_FASTCALL ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *name = &opline->op1.u.constant; zval *val = &opline->op2.u.constant; zend_constant c; if ((Z_TYPE_P(val) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT || Z_TYPE_P(val) == IS_CONSTANT...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
311,061,432,714,906,450,000,000,000,000,000,000,000
33
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
TEST_F(HttpConnectionManagerConfigTest, RemoveAnyPortTrue) { const std::string yaml_string = R"EOF( stat_prefix: ingress_http route_config: name: local_route strip_any_host_port: true http_filters: - name: envoy.filters.http.router )EOF"; HttpConnectionManagerConfig config(parseHttpConnectionManage...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
136,957,730,615,322,160,000,000,000,000,000,000,000
16
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static int map_delete_elem(union bpf_attr *attr) { void __user *ukey = u64_to_user_ptr(attr->key); int ufd = attr->map_fd; struct bpf_map *map; struct fd f; void *key; int err; if (CHECK_ATTR(BPF_MAP_DELETE_ELEM)) return -EINVAL; f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) return PTR_ERR(ma...
1
[ "CWE-367" ]
bpf
353050be4c19e102178ccc05988101887c25ae53
27,610,323,787,303,283,000,000,000,000,000,000,000
49
bpf: Fix toctou on read-only map's constant scalar tracking Commit a23740ec43ba ("bpf: Track contents of read-only maps as scalars") is checking whether maps are read-only both from BPF program side and user space side, and then, given their content is constant, reading out their data via map->ops->map_direct_value_ad...
static int snd_pcm_substream_proc_done(struct snd_pcm_substream *substream) { snd_info_free_entry(substream->proc_info_entry); substream->proc_info_entry = NULL; snd_info_free_entry(substream->proc_hw_params_entry); substream->proc_hw_params_entry = NULL; snd_info_free_entry(substream->proc_sw_params_entry); subs...
0
[ "CWE-416" ]
linux
362bca57f5d78220f8b5907b875961af9436e229
123,679,782,646,030,990,000,000,000,000,000,000,000
18
ALSA: pcm: prevent UAF in snd_pcm_info When the device descriptor is closed, the `substream->runtime` pointer is freed. But another thread may be in the ioctl handler, case SNDRV_CTL_IOCTL_PCM_INFO. This case calls snd_pcm_info_user() which calls snd_pcm_info() which accesses the now freed `substream->runtime`. Note:...
pax_decode_header (struct tar_sparse_file *file) { if (file->stat_info->sparse_major > 0) { uintmax_t u; char nbuf[UINTMAX_STRSIZE_BOUND]; union block *blk; char *p; size_t i; off_t start; #define COPY_BUF(b,buf,src) do \ { ...
1
[ "CWE-476" ]
tar
cb07844454d8cc9fb21f53ace75975f91185a120
295,216,607,695,136,730,000,000,000,000,000,000,000
80
Fix possible NULL dereference (savannah bug #55369) * src/sparse.c (pax_decode_header): Check return from find_next_block.
asn1_get_length_der (const unsigned char *der, int der_len, int *len) { unsigned int ans; int k, punt, sum; *len = 0; if (der_len <= 0) return 0; if (!(der[0] & 128)) { /* short form */ *len = 1; ans = der[0]; } else { /* Long form */ k = der[0] & 0x7F; ...
0
[ "CWE-674" ]
libtasn1
c593ae84cfcde8fea45787e53950e0ac71e9ca97
265,073,475,671,493,100,000,000,000,000,000,000,000
54
_asn1_decode_simple_ber: restrict the levels of recursion to 3 On indefinite string decoding, setting a maximum level of recursions protects the BER decoder from a stack exhaustion due to large amounts of recursion. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
stop_check(int status) { if (__test_bit(CONFIG_TEST_BIT, &debug)) return; /* This runs in the main process, not in the context of a thread */ checker_terminate_phase1(false); checker_terminate_phase2(); /* unreachable */ exit(status); }
0
[ "CWE-200" ]
keepalived
26c8d6374db33bcfcdcd758b1282f12ceef4b94f
76,259,925,678,876,580,000,000,000,000,000,000,000
13
Disable fopen_safe() append mode by default If a non privileged user creates /tmp/keepalived.log and has it open for read (e.g. tail -f), then even though keepalived will change the owner to root and remove all read/write permissions from non owners, the application which already has the file open will be able to read...
static void process_bin_sasl_auth(conn *c) { // Guard for handling disabled SASL on the server. if (!settings.sasl) { write_bin_error(c, PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND, NULL, c->binary_header.request.bodylen - c->binary_header.request.keylen); ...
0
[]
memcached
f249724cedcab6605ca8a0769ac4b356a8124f63
329,833,979,832,319,600,000,000,000,000,000,000,000
41
crash fix: errstr wasn't initialized in metaget if meta_flag_preparse bailed out early it would try to read uninitialized memory.
static int snd_pcm_pre_stop(struct snd_pcm_substream *substream, snd_pcm_state_t state) { struct snd_pcm_runtime *runtime = substream->runtime; if (runtime->status->state == SNDRV_PCM_STATE_OPEN) return -EBADFD; runtime->trigger_master = substream; return 0; }
0
[ "CWE-125" ]
linux
92ee3c60ec9fe64404dc035e7c41277d74aa26cb
35,299,944,828,915,303,000,000,000,000,000,000,000
9
ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Currently we have neither proper check nor protection against the concurrent calls of PCM hw_params and hw_free ioctls, which may result in a UAF. Since the existing PCM stream lock can't be used for protecting the whole ioctl operations, we need a new...
int XMLRPC_GetResponseFaultCode(XMLRPC_REQUEST response) { return XMLRPC_GetValueFaultCode( XMLRPC_RequestGetData(response) ); }
0
[ "CWE-119" ]
php-src
88412772d295ebf7dd34409534507dc9bcac726e
173,852,107,200,692,970,000,000,000,000,000,000,000
3
Fix bug #68027 - fix date parsing in XMLRPC lib
int ldb_kv_delete_noindex(struct ldb_module *module, const struct ldb_message *msg) { void *data = ldb_module_get_private(module); struct ldb_kv_private *ldb_kv = talloc_get_type(data, struct ldb_kv_private); struct ldb_val key; int ret; TALLOC_CTX *tdb_key_ctx = talloc_new(module); if (tdb_key_ctx == ...
0
[ "CWE-20" ]
samba
3c1fbb18321f61df44d7b0f0c7452ae230960293
152,939,176,435,928,930,000,000,000,000,000,000,000
34
CVE-2018-1140 ldb_tdb: Check for DN validity in add, rename and search This ensures we fail with a good error code before an eventual ldb_dn_get_casefold() which would otherwise fail. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> BUG: https://bugzil...
int nghttp2_session_get_stream_local_close(nghttp2_session *session, int32_t stream_id) { nghttp2_stream *stream; stream = nghttp2_session_get_stream(session, stream_id); if (!stream) { return -1; } return (stream->shut_flags & NGHTTP2_SHUT_WR) != 0; }
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
6,554,990,207,938,580,000,000,000,000,000,000,000
12
Add nghttp2_option_set_max_outbound_ack
nfqnl_recv_verdict(struct sock *ctnl, struct sk_buff *skb, const struct nlmsghdr *nlh, const struct nlattr * const nfqa[]) { struct nfgenmsg *nfmsg = nlmsg_data(nlh); u_int16_t queue_num = ntohs(nfmsg->res_id); struct nfqnl_msg_verdict_hdr *vhdr; struct nfqnl_instance *queue; unsigned int verdict; stru...
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
132,896,964,326,739,090,000,000,000,000,000,000,000
61
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
DEBUG_FUNC char *byte_to_binary(uint8_t byte) { char *bits = malloc(sizeof(char) * 9); if (NULL == bits) { return bits; } for (uint8_t i = 0; i < 8; i++) { bits[i] = byte & (128 >> i) ? '1' : '0'; } bits[8] = '\0'; return bits; }
0
[]
libmaxminddb
51255f113fe3c7b63ffe957636a7656a3ff9d1ff
130,279,480,383,702,970,000,000,000,000,000,000,000
14
Fix several segfaults from missing bounds checks These were found using afl-fuzz. There are several more similar failure that warrant investigation. If we want to add tests, I have several corrupt databases we could add, but these are trivially reproducible when using the existing test databases as input to afl-fuzz.
static int binder_ioctl_set_ctx_mgr(struct file *filp) { int ret = 0; struct binder_proc *proc = filp->private_data; struct binder_context *context = proc->context; struct binder_node *new_node; kuid_t curr_euid = current_euid(); mutex_lock(&context->context_mgr_node_lock); if (context->binder_context_mgr_node)...
0
[ "CWE-416" ]
linux
7bada55ab50697861eee6bb7d60b41e68a961a9c
327,012,190,615,379,100,000,000,000,000,000,000,000
46
binder: fix race that allows malicious free of live buffer Malicious code can attempt to free buffers using the BC_FREE_BUFFER ioctl to binder. There are protections against a user freeing a buffer while in use by the kernel, however there was a window where BC_FREE_BUFFER could be used to free a recently allocated bu...
TEST_F(QueryPlannerTest, ContainedOrOfAndCollapseIndenticalScansWithFilter) { addIndex(BSON("a" << 1 << "b" << 1)); runQuery(fromjson("{c: 1, $or: [{a:1, b:2}, {a:1, b:2, d:3}]}")); assertNumSolutions(2U); assertSolutionExists("{cscan: {dir: 1}}"); assertSolutionExists( "{fetch: {filter: {c...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
294,247,082,396,239,880,000,000,000,000,000,000,000
11
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
Item_sum_sum::Item_sum_sum(THD *thd, Item_sum_sum *item) :Item_sum_num(thd, item), Type_handler_hybrid_field_type(item), curr_dec_buff(item->curr_dec_buff), count(item->count) { /* TODO: check if the following assignments are really needed */ if (Item_sum_sum::result_type() == DECIMAL_RESULT) { my...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
309,875,884,613,707,330,000,000,000,000,000,000,000
15
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
void TopologyManager::onServerRTTUpdated(HostAndPort hostAndPort, IsMasterRTT rtt) { { stdx::lock_guard<mongo::Mutex> lock(_mutex); auto oldServerDescription = _topologyDescription->findServerByAddress(hostAndPort); if (oldServerDescription) { auto newServerDescription = (*oldSe...
0
[ "CWE-755" ]
mongo
75f7184eafa78006a698cda4c4adfb57f1290047
189,460,888,725,225,800,000,000,000,000,000,000,000
24
SERVER-50170 fix max staleness read preference parameter for server selection
static inline void PERF_LOG_FILTER(int32_t pos, int32_t length, int8_t trie) { cli_perf_log_add(RAW_BYTES_SCANNED, length); cli_perf_log_add(FILTER_BYTES_SCANNED, length - pos); cli_perf_log_count2(TRIE_SCANNED, trie, length - pos); }
0
[]
clamav-devel
167c0079292814ec5523d0b97a9e1b002bf8819b
283,984,685,508,872,370,000,000,000,000,000,000,000
6
fix 0.99.3 false negative of virus Pdf.Exploit.CVE_2016_1046-1.
nfssvc_decode_fhandle(struct svc_rqst *rqstp, __be32 *p, struct nfsd_fhandle *args) { p = decode_fh(p, &args->fh); if (!p) return 0; return xdr_argsize_check(rqstp, p); }
0
[ "CWE-119", "CWE-703" ]
linux
13bf9fbff0e5e099e2b6f003a0ab8ae145436309
9,406,255,031,431,897,000,000,000,000,000,000,000
7
nfsd: stricter decoding of write-like NFSv2/v3 ops The NFSv2/v3 code does not systematically check whether we decode past the end of the buffer. This generally appears to be harmless, but there are a few places where we do arithmetic on the pointers involved and don't account for the possibility that a length could b...
static int smaps_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, struct mm_walk *walk) { struct vm_area_struct *vma = walk->vma; pte_t *pte; spinlock_t *ptl; ptl = pmd_trans_huge_lock(pmd, vma); if (ptl) { smaps_pmd_entry(pmd, addr, walk); spin_unlock(ptl); return 0; } if (pmd_trans_un...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
55,672,623,914,770,820,000,000,000,000,000,000,000
28
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static void __netdev_adjacent_dev_remove(struct net_device *dev, struct net_device *adj_dev, struct list_head *dev_list) { struct netdev_adjacent *adj; adj = __netdev_find_adj(adj_dev, dev_list); if (!adj) { pr_err("tried to remove device %s from %s\n", dev->name, adj_dev->name); BUG(); ...
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
119,873,396,520,613,830,000,000,000,000,000,000,000
33
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return get_item_copy<Item_cache_str>(thd, mem_root, this); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
250,741,959,175,265,050,000,000,000,000,000,000,000
2
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
u_eval_tree(u_header_T *first_uhp, list_T *list) { u_header_T *uhp = first_uhp; dict_T *dict; while (uhp != NULL) { dict = dict_alloc(); if (dict == NULL) return; dict_add_nr_str(dict, "seq", uhp->uh_seq, NULL); dict_add_nr_str(dict, "time", (long)uhp->uh_time, NULL); if (uhp == curbuf->b_u_...
0
[ "CWE-190" ]
vim
3eb1637b1bba19519885dd6d377bd5596e91d22c
259,604,606,112,672,900,000,000,000,000,000,000,000
35
patch 8.0.0377: possible overflow when reading corrupted undo file Problem: Possible overflow when reading corrupted undo file. Solution: Check if allocated size is not too big. (King)
Value DocumentSourceGroup::computeId(const Document& root) { // If only one expression, return result directly if (_idExpressions.size() == 1) { Value retValue = _idExpressions[0]->evaluate(root, &pExpCtx->variables); return retValue.missing() ? Value(BSONNULL) : std::move(retValue); } ...
0
[]
mongo
14784757ff5e983ea40b21c14e661aba81dfc083
159,439,244,321,654,800,000,000,000,000,000,000,000
15
SERVER-60218 add initialize helper function for document_source_group (cherry picked from commit 867f52afbb79bc00e35c70f8e0681b7d602f97b2)
static void vmx_cpuid_update(struct kvm_vcpu *vcpu) { struct kvm_cpuid_entry2 *best; struct vcpu_vmx *vmx = to_vmx(vcpu); u32 secondary_exec_ctl = vmx_secondary_exec_control(vmx); if (vmx_rdtscp_supported()) { bool rdtscp_enabled = guest_cpuid_has_rdtscp(vcpu); if (!rdtscp_enabled) secondary_exec_ctl &= ~SE...
0
[ "CWE-388" ]
linux
ef85b67385436ddc1998f45f1d6a210f935b3388
169,231,895,005,731,340,000,000,000,000,000,000,000
45
kvm: nVMX: Allow L1 to intercept software exceptions (#BP and #OF) When L2 exits to L0 due to "exception or NMI", software exceptions (#BP and #OF) for which L1 has requested an intercept should be handled by L1 rather than L0. Previously, only hardware exceptions were forwarded to L1. Signed-off-by: Jim Mattson <jma...
int security_inode_readlink(struct dentry *dentry) { if (unlikely(IS_PRIVATE(dentry->d_inode))) return 0; return security_ops->inode_readlink(dentry); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
132,391,334,330,092,440,000,000,000,000,000,000,000
6
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...
snmp_set_error(cups_snmp_t *packet, /* I - Packet */ const char *message) /* I - Error message */ { _cups_globals_t *cg = _cupsGlobals(); /* Global data */ if (!cg->lang_default) cg->lang_default = cupsLangDefault(); packet->error = _cupsLangString(cg->lang_default, message); }
0
[ "CWE-120" ]
cups
f24e6cf6a39300ad0c3726a41a4aab51ad54c109
337,214,244,150,991,100,000,000,000,000,000,000,000
11
Fix multiple security/disclosure issues: - CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251) - Fixed IPP buffer overflow (rdar://50035411) - Fixed memory disclosure issue in the scheduler (rdar://51373853) - Fixed DoS issues in the scheduler (rdar://51373929)
ex_swapname(exarg_T *eap UNUSED) { if (curbuf->b_ml.ml_mfp == NULL || curbuf->b_ml.ml_mfp->mf_fname == NULL) msg(_("No swap file")); else msg((char *)curbuf->b_ml.ml_mfp->mf_fname); }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
71,155,499,569,067,590,000,000,000,000,000,000,000
7
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
mono_custom_attrs_from_module (MonoImage *image) { guint32 idx; if (image->dynamic) return lookup_custom_attr (image, image); idx = 1; /* there is only one module */ idx <<= MONO_CUSTOM_ATTR_BITS; idx |= MONO_CUSTOM_ATTR_MODULE; return mono_custom_attrs_from_index (image, idx); }
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
277,745,860,618,631,820,000,000,000,000,000,000,000
11
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
long long simple_strtoll(const char *cp, char **endp, unsigned int base) { if (*cp == '-') return -simple_strtoull(cp + 1, endp, base); return simple_strtoull(cp, endp, base); }
0
[ "CWE-200" ]
linux
ad67b74d2469d9b82aaa572d76474c95bc484d57
235,688,542,653,458,230,000,000,000,000,000,000,000
7
printk: hash addresses printed with %p Currently there exist approximately 14 000 places in the kernel where addresses are being printed using an unadorned %p. This potentially leaks sensitive information regarding the Kernel layout in memory. Many of these calls are stale, instead of fixing every call lets hash the a...
SdMmcHcClockSupply ( IN SD_MMC_HC_PRIVATE_DATA *Private, IN UINT8 Slot, IN SD_MMC_BUS_MODE BusTiming, IN BOOLEAN FirstTimeSetup, IN UINT64 ClockFreq ) { EFI_STATUS Status; UINT32 SettingFreq; UINT32...
0
[]
edk2
e36d5ac7d10a6ff5becb0f52fdfd69a1752b0d14
294,763,265,801,016,320,000,000,000,000,000,000,000
135
MdeModulePkg/SdMmcPciHcDxe: Fix double PciIo Unmap in TRB creation (CVE-2019-14587) REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1989 The commit will avoid unmapping the same resource in error handling logic for function BuildAdmaDescTable() and SdMmcCreateTrb(). For the error handling in BuildAdmaDescTable():...
CImgList(const unsigned int n, const unsigned int width, const unsigned int height, const unsigned int depth, const unsigned int spectrum, const double val0, const double val1, ...): _width(0),_allocated_width(0),_data(0) { _CImgList_stdarg(double); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
263,825,261,675,940,400,000,000,000,000,000,000,000
5
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
nv_g_cmd(cmdarg_T *cap) { oparg_T *oap = cap->oap; pos_T tpos; int i; int flag = FALSE; switch (cap->nchar) { case Ctrl_A: case Ctrl_X: #ifdef MEM_PROFILE /* * "g^A": dump log of used memory. */ if (!VIsual_active && cap->nchar == Ctrl_A) vim_mem_profile_dump(); e...
0
[ "CWE-416" ]
vim
35a9a00afcb20897d462a766793ff45534810dc3
52,318,909,636,797,090,000,000,000,000,000,000,000
597
patch 8.2.3428: using freed memory when replacing Problem: Using freed memory when replacing. (Dhiraj Mishra) Solution: Get the line pointer after calling ins_copychar().
xps_add_image_relationship(xps_image_enum_t *pie) { gx_device_xps *xps = (gx_device_xps*) (pie->dev); int code; code = add_new_relationship(xps, pie->file_name); if (code < 0) return gs_rethrow_code(code); return 0; }
0
[]
ghostpdl
94d8955cb7725eb5f3557ddc02310c76124fdd1a
103,131,329,686,088,860,000,000,000,000,000,000,000
10
Bug 701818: better handling of error during PS/PDF image In the xps device, if an error occurred after xps_begin_image() but before xps_image_end_image(), *if* the Postscript had called 'restore' as part of the error handling, the image enumerator would have been freed (by the restore) despite the xps device still hol...
static void do_iccprofile_item(deark *c, lctx *d, i64 pos, i64 len) { i64 selector; i64 data_len; if(len<4) return; selector = de_getu32be(pos); data_len = len-4; de_dbg(c, "ICC profile segment, selector=%d, data len=%d", (int)selector, (int)data_len); if(selector!=1) { // If this is not a Continuation seg...
1
[ "CWE-476" ]
deark
287f5ac31dfdc074669182f51ece637706070eeb
155,542,682,552,589,550,000,000,000,000,000,000,000
27
pict: Fixed a bug with ICC profile extraction Could cause a NULL pointer dereference. Found by F. Çelik.
nfs4_free_ds_server(struct nfs4_ds_server *dss) { rpc_release_client(dss->rpc_clnt); kfree(dss); }
0
[ "CWE-703" ]
linux
dd99e9f98fbf423ff6d365b37a98e8879170f17c
205,065,155,765,865,760,000,000,000,000,000,000,000
5
NFSv4: Initialise connection to the server in nfs4_alloc_client() Set up the connection to the NFSv4 server in nfs4_alloc_client(), before we've added the struct nfs_client to the net-namespace's nfs_client_list so that a downed server won't cause other mounts to hang in the trunking detection code. Reported-by: Mich...
static int setup_subctxt(struct hfi1_ctxtdata *uctxt) { int ret = 0; u16 num_subctxts = uctxt->subctxt_cnt; uctxt->subctxt_uregbase = vmalloc_user(PAGE_SIZE); if (!uctxt->subctxt_uregbase) return -ENOMEM; /* We can take the size of the RcvHdr Queue from the master */ uctxt->subctxt_rcvhdr_base = vmalloc_user(...
0
[ "CWE-416" ]
linux
3d2a9d642512c21a12d19b9250e7a835dcb41a79
313,344,968,462,743,400,000,000,000,000,000,000,000
35
IB/hfi1: Ensure correct mm is used at all times Two earlier bug fixes have created a security problem in the hfi1 driver. One fix aimed to solve an issue where current->mm was not valid when closing the hfi1 cdev. It attempted to do this by saving a cached value of the current->mm pointer at file open time. This is a ...
static int s390_regs_get(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf) { if (target == current) save_access_regs(target->thread.acrs); if (kbuf) { unsigned long *k = kbuf; while (count > 0) { *k++ = __peek_user(...
0
[ "CWE-399" ]
linux-2.6
3d6e48f43340343d97839eadb1ab7b6a3ea98797
51,628,072,311,346,980,000,000,000,000,000,000,000
26
[S390] CVE-2008-1514: prevent ptrace padding area read/write in 31-bit mode When running a 31-bit ptrace, on either an s390 or s390x kernel, reads and writes into a padding area in struct user_regs_struct32 will result in a kernel panic. This is also known as CVE-2008-1514. Test case available here: http://sources.r...
int btrfs_run_dev_stats(struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info) { struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; struct btrfs_device *device; int stats_cnt; int ret = 0; mutex_lock(&fs_devices->device_list_mutex); list_for_each_entry(device, &fs_devices->devices, dev_list)...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
81,680,252,621,839,415,000,000,000,000,000,000,000
36
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
bool Item_cache_real::cache_value() { if (!example) return FALSE; value_cached= TRUE; value= example->val_result(); null_value= example->null_value; return TRUE; }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
36,751,125,369,445,735,000,000,000,000,000,000,000
9
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'...
e1000e_set_tctl(E1000ECore *core, int index, uint32_t val) { E1000E_TxRing txr; core->mac[index] = val; if (core->mac[TARC0] & E1000_TARC_ENABLE) { e1000e_tx_ring_init(core, &txr, 0); e1000e_start_xmit(core, &txr); } if (core->mac[TARC1] & E1000_TARC_ENABLE) { e1000e_tx_rin...
0
[ "CWE-835" ]
qemu
4154c7e03fa55b4cf52509a83d50d6c09d743b77
245,113,702,446,372,660,000,000,000,000,000,000,000
15
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....
CURLcode Curl_urldecode(struct SessionHandle *data, const char *string, size_t length, char **ostring, size_t *olen, bool reject_ctrl) { size_t alloc = (length?length:strlen(string))+1; char *ns = malloc(alloc); unsigned char in; size_t str...
0
[ "CWE-119", "CWE-787" ]
curl
192c4f788d48f82c03e9cef40013f34370e90737
161,155,837,833,174,630,000,000,000,000,000,000,000
60
Curl_urldecode: no peeking beyond end of input buffer Security problem: CVE-2013-2174 If a program would give a string like "%FF" to curl_easy_unescape() but ask for it to decode only the first byte, it would still parse and decode the full hex sequence. The function then not only read beyond the allowed buffer but i...
static OPJ_BOOL opj_tcd_code_block_enc_allocate_data(opj_tcd_cblk_enc_t * p_code_block) { OPJ_UINT32 l_data_size; /* +1 is needed for https://github.com/uclouvain/openjpeg/issues/835 */ /* and actually +2 required for https://github.com/uclouvain/openjpeg/issues/982 */ /* TODO: is there a theor...
1
[ "CWE-122" ]
openjpeg
eaa098b59b346cb88e4d10d505061f669d7134fc
255,784,611,802,815,640,000,000,000,000,000,000,000
33
Encoder: grow buffer size in opj_tcd_code_block_enc_allocate_data() to avoid write heap buffer overflow in opj_mqc_flush (fixes #1283)
static int smack_shm_shmat(struct kern_ipc_perm *isp, char __user *shmaddr, int shmflg) { int may; may = smack_flags_to_may(shmflg); return smk_curacc_shm(isp, may); }
0
[ "CWE-416" ]
linux
a3727a8bac0a9e77c70820655fd8715523ba3db7
96,480,874,862,342,050,000,000,000,000,000,000,000
8
selinux,smack: fix subjective/objective credential use mixups Jann Horn reported a problem with commit eb1231f73c4d ("selinux: clarify task subjective and objective credentials") where some LSM hooks were attempting to access the subjective credentials of a task other than the current task. Generally speaking, it is ...
bool CModules::OnDeleteUser(CUser& User) { MODHALTCHK(OnDeleteUser(User)); }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
311,491,440,868,319,800,000,000,000,000,000,000,000
1
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
static void Ins_MIRP( INS_ARG ) { Int point, cvtEntry; TT_F26Dot6 cvt_dist, distance, cur_dist, org_dist; point = (Int)args[0]; cvtEntry = (Int)args[1]; /* XXX: UNDOCUMENTED! cvt[-1] = 0 always */ if ( BOUNDS( a...
0
[ "CWE-125" ]
ghostpdl
c7c55972758a93350882c32147801a3485b010fe
252,630,304,852,463,760,000,000,000,000,000,000,000
120
Bug 698024: bounds check zone pointer in Ins_MIRP()
static void typebuilder_setup_events (MonoClass *klass, MonoError *error) { MonoReflectionTypeBuilder *tb = klass->reflection_info; MonoReflectionEventBuilder *eb; MonoImage *image = klass->image; MonoEvent *events; int i, j; mono_error_init (error); if (!klass->ext) klass->ext = image_g_new0 (image, MonoCla...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
121,271,925,605,849,880,000,000,000,000,000,000,000
44
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
void CLASS foveon_interpolate() { static const short hood[] = { -1,-1, -1,0, -1,1, 0,-1, 0,1, 1,-1, 1,0, 1,1 }; short *pix, prev[3], *curve[8], (*shrink)[3]; float cfilt=0, ddft[3][3][2], ppm[3][3][3]; float cam_xyz[3][3], correct[3][3], last[3][3], trans[3][3]; float chroma_dq[3], color_dq[3], diag[3][3], di...
0
[ "CWE-189" ]
rawstudio
983bda1f0fa5fa86884381208274198a620f006e
277,532,841,749,718,440,000,000,000,000,000,000,000
396
Avoid overflow in ljpeg_start().
start_input_tga(j_compress_ptr cinfo, cjpeg_source_ptr sinfo) { tga_source_ptr source = (tga_source_ptr)sinfo; U_CHAR targaheader[18]; int idlen, cmaptype, subtype, flags, interlace_type, components; unsigned int width, height, maplen; boolean is_bottom_up; #define GET_2B(offset) ((unsigned int)UCH(targahea...
0
[ "CWE-834" ]
libjpeg-turbo
909a8cfc7bca9b2e6707425bdb74da997e8fa499
100,475,003,816,857,200,000,000,000,000,000,000,000
134
Fix CVE-2018-11813 Refer to change log for details. Fixes #242
EmitMousePosition(TScreen *screen, Char line[], unsigned count, int value) { int mouse_limit = MouseLimit(screen); /* * Add pointer position to key sequence * * In extended mode we encode large positions as two-byte UTF-8. * * NOTE: historically, it was possible to emit 256, which beca...
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
8,277,717,297,722,197,000,000,000,000,000,000,000
41
snapshot of project "xterm", label xterm-365d
static void rdp_read_bitmap_cache_cell_info(wStream* s, BITMAP_CACHE_V2_CELL_INFO* cellInfo) { UINT32 info; /** * numEntries is in the first 31 bits, while the last bit (k) * is used to indicate a persistent bitmap cache. */ Stream_Read_UINT32(s, info); cellInfo->numEntries = (info & 0x7FFFFFFF); cellInfo->p...
0
[ "CWE-119", "CWE-125" ]
FreeRDP
3627aaf7d289315b614a584afb388f04abfb5bbf
243,003,567,530,089,130,000,000,000,000,000,000,000
11
Fixed #6011: Bounds check in rdp_read_font_capability_set
RGWHandler_REST* RGWRESTMgr_S3::get_handler(struct req_state* const s, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix) { bool is_s3website = enable_s3website && (s->prot_flags & RGW_REST_WEBSI...
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
89,063,607,632,487,980,000,000,000,000,000,000,000
36
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
int ssl23_accept(SSL *s) { BUF_MEM *buf; unsigned long Time=(unsigned long)time(NULL); void (*cb)(const SSL *ssl,int type,int val)=NULL; int ret= -1; int new_state,state; RAND_add(&Time,sizeof(Time),0); ERR_clear_error(); clear_sys_error(); if (s->info_callback != NULL) cb=s->info_callback; else if (s->c...
0
[]
openssl
8671b898609777c95aedf33743419a523874e6e8
332,733,821,197,966,560,000,000,000,000,000,000,000
89
Memory saving patch.
static void krb5_end(void *app_data) { OM_uint32 min; gss_ctx_id_t *context = app_data; if(*context != GSS_C_NO_CONTEXT) { OM_uint32 maj = gss_delete_sec_context(&min, context, GSS_C_NO_BUFFER); (void)maj; DEBUGASSERT(maj == GSS_S_COMPLETE); } }
0
[]
curl
6ecdf5136b52af747e7bda08db9a748256b1cd09
118,051,682,674,674,680,000,000,000,000,000,000,000
10
krb5: return error properly on decode errors Bug: https://curl.se/docs/CVE-2022-32208.html CVE-2022-32208 Reported-by: Harry Sintonen Closes #9051
static int cirrus_bitblt_common_patterncopy(CirrusVGAState * s, const uint8_t * src) { uint8_t *dst; dst = s->vram_ptr + (s->cirrus_blt_dstaddr & s->cirrus_addr_mask); if (BLTUNSAFE(s)) return 0; (*s->cirrus_rop) (s, dst, src, s->cirrus_blt_dstpitch, 0, ...
0
[ "CWE-787" ]
qemu
b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef
118,099,782,199,730,600,000,000,000,000,000,000,000
18
CVE-2007-1320 - Cirrus LGD-54XX "bitblt" heap overflow I have just noticed that patch for CVE-2007-1320 has never been applied to the QEMU CVS. Please find it below. | Multiple heap-based buffer overflows in the cirrus_invalidate_region | function in the Cirrus VGA extension in QEMU 0.8.2, as used in Xen and | possib...
SYSCALL_DEFINE2(mlock, unsigned long, start, size_t, len) { unsigned long locked; unsigned long lock_limit; int error = -ENOMEM; if (!can_do_mlock()) return -EPERM; lru_add_drain_all(); /* flush pagevec */ len = PAGE_ALIGN(len + (start & ~PAGE_MASK)); start &= PAGE_MASK; lock_limit = rlimit(RLIMIT_MEMLOCK...
0
[ "CWE-400", "CWE-703", "CWE-264" ]
linux
57e68e9cd65b4b8eb4045a1e0d0746458502554c
305,115,041,115,115,300,000,000,000,000,000,000,000
31
mm: try_to_unmap_cluster() should lock_page() before mlocking A BUG_ON(!PageLocked) was triggered in mlock_vma_page() by Sasha Levin fuzzing with trinity. The call site try_to_unmap_cluster() does not lock the pages other than its check_page parameter (which is already locked). The BUG_ON in mlock_vma_page() is not ...
dissect_kafka_delete_groups_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version _U_) { proto_item *subti; proto_tree *subtree; offset = dissect_kafka_throttle_time(tvb, pinfo, tree, offset); subtree ...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
5,372,049,495,688,579,000,000,000,000,000,000,000
23
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
ZEND_VM_HANDLER(118, ZEND_INIT_USER_CALL, CONST, CONST|TMPVAR|CV, NUM) { USE_OPLINE zend_free_op free_op2; zval *function_name; zend_fcall_info_cache fcc; char *error = NULL; zend_function *func; void *object_or_called_scope; zend_execute_data *call; uint32_t call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_D...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
212,071,710,595,658,660,000,000,000,000,000,000,000
74
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
CImgIOException(const char *const format, ...) { _cimg_exception_err("CImgIOException",true); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
220,806,196,719,486,400,000,000,000,000,000,000,000
1
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static inline int rt_scope(int ifa_scope) { if (ifa_scope & IFA_HOST) return RT_SCOPE_HOST; else if (ifa_scope & IFA_LINK) return RT_SCOPE_LINK; else if (ifa_scope & IFA_SITE) return RT_SCOPE_SITE; else return RT_SCOPE_UNIVERSE; }
0
[]
net
4b08a8f1bd8cb4541c93ec170027b4d0782dab52
186,321,190,115,148,270,000,000,000,000,000,000,000
11
ipv6: remove max_addresses check from ipv6_create_tempaddr Because of the max_addresses check attackers were able to disable privacy extensions on an interface by creating enough autoconfigured addresses: <http://seclists.org/oss-sec/2012/q4/292> But the check is not actually needed: max_addresses protects the kerne...
static int __ext4_get_inode_loc(struct inode *inode, struct ext4_iloc *iloc, int in_mem) { struct ext4_group_desc *gdp; struct buffer_head *bh; struct super_block *sb = inode->i_sb; ext4_fsblk_t block; int inodes_per_block, inode_offset; iloc->bh = NULL; if (!ext4_valid_inum(sb, inode->i_ino)) return -...
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
138,662,179,891,718,430,000,000,000,000,000,000,000
136
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
void setAuthzManager(AuthorizationManager* authzManager) { stdx::lock_guard<stdx::mutex> lk(_mutex); _authzManager = authzManager; }
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
317,011,023,859,339,520,000,000,000,000,000,000,000
4
SERVER-38984 Validate unique User ID on UserCache hit
static inline void tcp_end_cwnd_reduction(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); /* Reset cwnd to ssthresh in CWR or Recovery (unless it's undone) */ if (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR || (tp->undo_marker && tp->snd_ssthresh < TCP_INFINITE_SSTHRESH)) { tp->snd_cwnd = tp->snd_ssthresh...
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
161,345,470,795,128,370,000,000,000,000,000,000,000
12
tcp: fix zero cwnd in tcp_cwnd_reduction Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode conditionally") introduced a bug that cwnd may become 0 when both inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead to a div-by-zero if the connection starts another cwnd reduction phase by set...
zone_replacedb(dns_zone_t *zone, dns_db_t *db, bool dump) { dns_dbversion_t *ver; isc_result_t result; unsigned int soacount = 0; unsigned int nscount = 0; /* * 'zone' and 'zone->db' locked by caller. */ REQUIRE(DNS_ZONE_VALID(zone)); REQUIRE(LOCKED_ZONE(zone)); if (inline_raw(zone)) REQUIRE(LOCKED_ZONE(...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
128,070,951,017,468,960,000,000,000,000,000,000,000
173
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
int mingw_execv(const char *cmd, char *const *argv) { /* check if git_command is a shell script */ if (!try_shell_exec(cmd, argv)) { int pid, status; pid = mingw_spawnv(cmd, (const char **)argv, 0); if (pid < 0) return -1; if (waitpid(pid, &status, 0) < 0) status = 255; exit(status); } return -1; }
0
[ "CWE-20" ]
git
6d8684161ee9c03bed5cb69ae76dfdddb85a0003
81,726,585,944,997,130,000,000,000,000,000,000,000
15
mingw: fix quoting of arguments We need to be careful to follow proper quoting rules. For example, if an argument contains spaces, we have to quote them. Double-quotes need to be escaped. Backslashes need to be escaped, but only if they are followed by a double-quote character. We need to be _extra_ careful to consid...
Field::geometry_type get_geometry_type() const { return m_geometry_type == m_geometry_type_unknown ? Field::GEOM_GEOMETRY : (Field::geometry_type) m_geometry_type; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
254,230,918,649,274,600,000,000,000,000,000,000,000
6
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 ...
static int lo_write_simple(struct loop_device *lo, struct request *rq, loff_t pos) { struct bio_vec bvec; struct req_iterator iter; int ret = 0; rq_for_each_segment(bvec, rq, iter) { ret = lo_write_bvec(lo->lo_backing_file, &bvec, &pos); if (ret < 0) break; cond_resched(); } return ret; }
0
[ "CWE-416", "CWE-362" ]
linux
ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5
207,597,999,113,975,050,000,000,000,000,000,000,000
16
loop: fix concurrent lo_open/lo_release 范龙飞 reports that KASAN can report a use-after-free in __lock_acquire. The reason is due to insufficient serialization in lo_release(), which will continue to use the loop device even after it has decremented the lo_refcnt to zero. In the meantime, another process can come in, o...
static struct mkiss *mkiss_get(struct tty_struct *tty) { struct mkiss *ax; read_lock(&disc_data_lock); ax = tty->disc_data; if (ax) refcount_inc(&ax->refcnt); read_unlock(&disc_data_lock); return ax; }
0
[ "CWE-416" ]
linux
b2f37aead1b82a770c48b5d583f35ec22aabb61e
180,129,454,575,217,600,000,000,000,000,000,000,000
12
hamradio: improve the incomplete fix to avoid NPD The previous commit 3e0588c291d6 ("hamradio: defer ax25 kfree after unregister_netdev") reorder the kfree operations and unregister_netdev operation to prevent UAF. This commit improves the previous one by also deferring the nullify of the ax->tty pointer. Otherwise, ...
static int php_date_initialize_from_hash(php_date_obj **dateobj, HashTable *myht TSRMLS_DC) { zval **z_date = NULL; zval **z_timezone = NULL; zval **z_timezone_type = NULL; zval *tmp_obj = NULL; timelib_tzinfo *tzi; php_timezone_obj *tzobj; if (zend_hash_find(myht...
1
[]
php-src
71335e6ebabc1b12c057d8017fd811892ecdfd24
203,316,366,111,303,750,000,000,000,000,000,000,000
53
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
int vcf_write(htsFile *fp, const bcf_hdr_t *h, bcf1_t *v) { int ret; fp->line.l = 0; if (vcf_format1(h, v, &fp->line) != 0) return -1; if ( fp->format.compression!=no_compression ) ret = bgzf_write(fp->fp.bgzf, fp->line.s, fp->line.l); else ret = hwrite(fp->fp.hfile, fp->line...
0
[ "CWE-787" ]
htslib
dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c
141,055,766,932,032,370,000,000,000,000,000,000,000
22
Fix check for VCF record size The check for excessive record size in vcf_parse_format() only looked at individual fields. It was therefore possible to exceed the limit and overflow fmt_aux_t::offset by having multiple fields with a combined size that went over INT_MAX. Fix by including the amount of memory used so fa...
void read_args(int f_in, char *mod_name, char *buf, size_t bufsiz, int rl_nulls, char ***argv_p, int *argc_p, char **request_p) { int maxargs = MAX_ARGS; int dot_pos = 0, argc = 0, request_len = 0; char **argv, *p; int rl_flags = (rl_nulls ? RL_EOL_NULLS : 0); #ifdef ICONV_OPTION rl_flags |= (protect_args...
0
[ "CWE-59" ]
rsync
962f8b90045ab331fc04c9e65f80f1a53e68243b
96,554,867,097,268,050,000,000,000,000,000,000,000
59
Complain if an inc-recursive path is not right for its dir. This ensures that a malicious sender can't use a just-sent symlink as a trasnfer path.
inline uint8_t* WireFormatLite::WriteSFixed64ToArray( int field_number, const RepeatedField<int64_t>& value, uint8_t* target) { return WritePrimitiveToArray(field_number, value, WriteSFixed64ToArray, target); }
0
[ "CWE-703" ]
protobuf
d1635e1496f51e0d5653d856211e8821bc47adc4
203,534,896,723,833,800,000,000,000,000,000,000,000
5
Apply patch
int sldns_str2wire_cert_alg_buf(const char* str, uint8_t* rd, size_t* len) { sldns_lookup_table *lt = sldns_lookup_by_name(sldns_cert_algorithms, str); if(*len < 2) return LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL; if(lt) { sldns_write_uint16(rd, (uint16_t)lt->id); } else { int s = sldns_str2wire_int16_buf(str, r...
0
[]
unbound
3f3cadd416d6efa92ff2d548ac090f42cd79fee9
276,742,300,216,817,030,000,000,000,000,000,000,000
17
- Fix Out of Bounds Write in sldns_str2wire_str_buf(), reported by X41 D-Sec.
void SplashOutputDev::drawSoftMaskedImage(GfxState *state, Object * /* ref */, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, Stream *maskStr, int maskWidth, int maskHeight, GfxImageColorMap *maskColorMap, bool maskInterpolate) { Spla...
0
[ "CWE-369" ]
poppler
b224e2f5739fe61de9fa69955d016725b2a4b78d
334,729,624,195,095,230,000,000,000,000,000,000,000
199
SplashOutputDev::tilingPatternFill: Fix crash on broken file Issue #802
void Filter::onUpstreamComplete(UpstreamRequest& upstream_request) { if (!downstream_end_stream_) { upstream_request.resetStream(); } Event::Dispatcher& dispatcher = callbacks_->dispatcher(); std::chrono::milliseconds response_time = std::chrono::duration_cast<std::chrono::milliseconds>( dispatcher.ti...
0
[ "CWE-703" ]
envoy
5bf9b0f1e7f247a4eee7180849cb0823926f7fff
95,689,458,992,207,570,000,000,000,000,000,000,000
53
[1.21] CVE-2022-21655 Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
bool is_catchable_by_javascript(MaybeObject* exception) { return (exception != Failure::OutOfMemoryException()) && (exception != heap()->termination_exception()); }
0
[ "CWE-20", "CWE-119" ]
node
530af9cb8e700e7596b3ec812bad123c9fa06356
32,648,612,908,317,072,000,000,000,000,000,000,000
4
v8: Interrupts must not mask stack overflow. Backport of https://codereview.chromium.org/339883002
closeIcuConverter(uconv_t *conv) { if (conv != NULL) { ucnv_close(conv->uconv); ucnv_close(conv->utf8); xmlFree(conv); } }
0
[ "CWE-189" ]
libxml2
69f04562f75212bfcabecd190ea8b06ace28ece2
219,026,527,419,820,450,000,000,000,000,000,000,000
8
Fix an off by one error in encoding this off by one error doesn't seems to reproduce on linux but the error is real.
static int f2fs_write_data_pages(struct address_space *mapping, struct writeback_control *wbc) { struct inode *inode = mapping->host; return __f2fs_write_data_pages(mapping, wbc, F2FS_I(inode)->cp_task == current ? FS_CP_DATA_IO : FS_DATA_IO); }
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
98,038,525,557,949,400,000,000,000,000,000,000,000
9
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static NTSTATUS vfswrap_durable_disconnect(struct vfs_handle_struct *handle, struct files_struct *fsp, const DATA_BLOB old_cookie, TALLOC_CTX *mem_ctx, DATA_BLOB *new_cookie) { return vfs_default_durable_disconnect(fsp, old_cookie, mem_ctx, new_cookie); }
0
[ "CWE-665" ]
samba
30e724cbff1ecd90e5a676831902d1e41ec1b347
191,771,426,923,688,500,000,000,000,000,000,000,000
9
FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zero Otherwise num_volumes and the end marker can return uninitialized data to the client. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
static int qrtr_tun_release(struct inode *inode, struct file *filp) { struct qrtr_tun *tun = filp->private_data; struct sk_buff *skb; qrtr_endpoint_unregister(&tun->ep); /* Discard all SKBs */ while (!skb_queue_empty(&tun->queue)) { skb = skb_dequeue(&tun->queue); kfree_skb(skb); } kfree(tun); return 0;...
0
[ "CWE-400", "CWE-703", "CWE-401" ]
linux
a21b7f0cff1906a93a0130b74713b15a0b36481d
249,750,892,064,202,700,000,000,000,000,000,000,000
17
net: qrtr: fix memort leak in qrtr_tun_write_iter In qrtr_tun_write_iter the allocated kbuf should be release in case of error or success return. v2 Update: Thanks to David Miller for pointing out the release on success path as well. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: David S. ...
static Image *ReadTIFFImage(const ImageInfo *image_info, ExceptionInfo *exception) { #define ThrowTIFFException(severity,message) \ { \ if (pixel_info != (MemoryInfo *) NULL) \ pixel_info=RelinquishVirtualMemory(pixel_info); \ if (quantum_info != (QuantumInfo *) NULL) \ quantum_info=DestroyQuantumInfo(qua...
1
[ "CWE-401" ]
ImageMagick
c6ad94fbb7b280f39c2fbbdc1c140e51b1b466e9
328,774,152,797,638,060,000,000,000,000,000,000,000
1,008
https://github.com/ImageMagick/ImageMagick/issues/3540
LIR_Opr LIRGenerator::remOutOpr() { return FrameMap::rdx_opr; }
0
[]
jdk17u
268c0159253b3de5d72eb826ef2329b27bb33fea
160,234,624,263,999,960,000,000,000,000,000,000,000
1
8272014: Better array indexing Reviewed-by: thartmann Backport-of: 937c31d896d05aa24543b74e98a2ea9f05b5d86f
static void blk_mq_free_hw_queues(struct request_queue *q, struct blk_mq_tag_set *set) { struct blk_mq_hw_ctx *hctx; unsigned int i; queue_for_each_hw_ctx(q, hctx, i) free_cpumask_var(hctx->cpumask); }
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
184,305,600,913,571,700,000,000,000,000,000,000,000
9
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
static pj_status_t STATUS_FROM_SSL_ERR(char *action, pj_ssl_sock_t *ssock, unsigned long err) { int level = 0; int len = 0; //dummy ERROR_LOG("STATUS_FROM_SSL_ERR", err, ssock); level++; /* General SSL error, dig more from OpenSSL error queue */ if (err == SSL_ERROR_SSL) { err = ER...
0
[ "CWE-362", "CWE-703" ]
pjproject
d5f95aa066f878b0aef6a64e60b61e8626e664cd
69,723,502,805,864,930,000,000,000,000,000,000,000
19
Merge pull request from GHSA-cv8x-p47p-99wr * - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count. - Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport. * - Fix silly mistake: accepted active socket created without...
static inline int bio_check_eod(struct bio *bio, sector_t maxsector) { unsigned int nr_sectors = bio_sectors(bio); if (nr_sectors && maxsector && (nr_sectors > maxsector || bio->bi_iter.bi_sector > maxsector - nr_sectors)) { handle_bad_sector(bio, maxsector); return -EIO; } return 0; }
0
[ "CWE-416", "CWE-703" ]
linux
54648cf1ec2d7f4b6a71767799c45676a138ca24
178,332,520,267,316,000,000,000,000,000,000,000,000
12
block: blk_init_allocated_queue() set q->fq as NULL in the fail case We find the memory use-after-free issue in __blk_drain_queue() on the kernel 4.14. After read the latest kernel 4.18-rc6 we think it has the same problem. Memory is allocated for q->fq in the blk_init_allocated_queue(). If the elevator init function...
TEST_P(ProxyProtocolTest, NegativePort) { connect(false); write("PROXY TCP6 1:2:3::4 5:6::7:8 -1 1234\r\nmore data"); expectProxyProtoError(); }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
255,617,008,053,815,500,000,000,000,000,000,000,000
5
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
static enum_func_status php_mysqlnd_rset_field_read(MYSQLND_CONN_DATA * conn, void * _packet) { /* Should be enough for the metadata of a single row */ MYSQLND_PACKET_RES_FIELD *packet = (MYSQLND_PACKET_RES_FIELD *) _packet; MYSQLND_ERROR_INFO * error_info = conn->error_info; MYSQLND_PFC * pfc = conn->protocol_fram...
0
[ "CWE-120" ]
php-src
58006537fc5f133ae8549efe5118cde418b3ace9
14,273,998,877,208,578,000,000,000,000,000,000,000
178
Fix bug #81719: mysqlnd/pdo password buffer overflow