func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void qemu_aio_release(void *p) { BlockDriverAIOCB *acb = p; g_slice_free1(acb->aiocb_info->aiocb_size, acb); }
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
118,345,957,788,459,330,000,000,000,000,000,000,000
5
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
static ssize_t status_show(struct device *dev, struct device_attribute *attr, char *buf) { char *status; switch (to_devlink(dev)->status) { case DL_STATE_NONE: status = "not tracked"; break; case DL_STATE_DORMANT: status = "dormant"; break; case DL_STATE_AVAILABLE: status = "available"; break; case DL...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
161,777,083,188,996,250,000,000,000,000,000,000,000
23
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...
TEST_F(HttpConnectionManagerConfigTest, SamplingDefault) { const std::string yaml_string = R"EOF( stat_prefix: ingress_http internal_address_config: unix_sockets: true route_config: name: local_route tracing: {} http_filters: - name: envoy.filters.http.router )EOF"; HttpConnectionManagerConfi...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
245,683,144,202,249,260,000,000,000,000,000,000,000
28
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
uv_buf_t EmitToJSStreamListener::OnStreamAlloc(size_t suggested_size) { CHECK_NOT_NULL(stream_); Environment* env = static_cast<StreamBase*>(stream_)->stream_env(); return AllocatedBuffer::AllocateManaged(env, suggested_size).release(); }
0
[ "CWE-416" ]
node
4f8772f9b731118628256189b73cd202149bbd97
315,643,220,461,953,430,000,000,000,000,000,000,000
5
src: retain pointers to WriteWrap/ShutdownWrap Avoids potential use-after-free when wrap req's are synchronously destroyed. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 Refs: https://hackerone.com/bugs?subject=nodejs&report_id=988103 PR-URL: https://github.com/nodejs-private/...
Bool gf_filter_is_supported_mime(GF_Filter *filter, const char *mime) { return gf_fs_is_supported_mime(filter->session, mime); }
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
11,645,362,359,654,570,000,000,000,000,000,000,000
4
fixed crashes for very long path - cf #1908
static u32 get_ccsidr(u32 csselr) { u32 ccsidr; /* Make sure noone else changes CSSELR during this! */ local_irq_disable(); write_sysreg(csselr, csselr_el1); isb(); ccsidr = read_sysreg(ccsidr_el1); local_irq_enable(); return ccsidr; }
0
[ "CWE-20", "CWE-617" ]
linux
9e3f7a29694049edd728e2400ab57ad7553e5aa9
51,139,841,414,205,420,000,000,000,000,000,000,000
13
arm64: KVM: pmu: Fix AArch32 cycle counter access We're missing the handling code for the cycle counter accessed from a 32bit guest, leading to unexpected results. Cc: stable@vger.kernel.org # 4.6+ Signed-off-by: Wei Huang <wei@redhat.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
void LinkResolver::check_field_loader_constraints(Symbol* field, Symbol* sig, Klass* current_klass, Klass* sel_klass, TRAPS) { Handle ref_loader(THREAD, current_klass->class_loader()); Handle sel_loader(THREAD, sel_k...
0
[]
jdk11u
132745902a4601dc64b2c8ca112ca30292feccb4
61,494,091,670,019,840,000,000,000,000,000,000,000
32
8281866: Enhance MethodHandle invocations Reviewed-by: mbaesken Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
static GF_Err DumpProtos(GF_SceneDumper *sdump, GF_List *protoList) { #ifdef GPAC_DISABLE_VRML return GF_OK; #else u32 i, j, count; GF_FieldInfo field; GF_Err e; GF_SceneGraph *prev_sg; GF_Proto *proto, *prev_proto; prev_proto = sdump->current_proto; i=0; while ((proto = (GF_Proto*)gf_list_enum(protoList, &i...
0
[ "CWE-476" ]
gpac
0102c5d4db7fdbf08b5b591b2a6264de33867a07
226,151,060,467,460,920,000,000,000,000,000,000,000
165
fixed #2232
static void task_clock_event_stop(struct perf_event *event, int flags) { perf_swevent_cancel_hrtimer(event); task_clock_event_update(event, event->ctx->time); }
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
238,840,091,358,274,460,000,000,000,000,000,000,000
5
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
static int pixmap_resize(pixmap_t *p, int w, int h) { GLshort* buf; if (!(buf = realloc(p->data, w * h * 4 * sizeof(GLshort)))) { return -1; } p->width = w; p->height = h; p->data = buf; return 0; }
0
[ "CWE-119" ]
jasper
65536647d380571d1a9a6c91fa03775fb5bbd256
208,836,822,334,636,470,000,000,000,000,000,000,000
11
A new experimental memory allocator has been introduced. The allocator is experimental in the sense that its API is not considered stable and the allocator may change or disappear entirely in future versions of the code. This new allocator tracks how much memory is being used by jas_malloc and friends. A maximum upp...
void svr_mailowner( job *pjob, /* I */ int mailpoint, /* note, single character */ int force, /* if set to MAIL_FORCE, force mail delivery */ char *text) /* (optional) additional message text */ { int status = 0; int numargs = 0; int pipes[2]; int ...
0
[ "CWE-94" ]
torque
64da0af7ed27284f3397081313850bba270593db
186,596,026,817,417,770,000,000,000,000,000,000,000
319
Fix CVE 2013-4495. Note: this patch has been verified as fixing this security hole but has not received other regression testing.
ldns_rr_list_free(ldns_rr_list *rr_list) { if (rr_list) { LDNS_FREE(rr_list->_rrs); LDNS_FREE(rr_list); } }
0
[ "CWE-415" ]
ldns
070b4595981f48a21cc6b4f5047fdc2d09d3da91
72,585,663,642,146,840,000,000,000,000,000,000,000
7
CAA and URI
addto_windowchain(s) const char *s; { register int i; for (i = 0; winchoices[i].procs; i++) { if ('+' != winchoices[i].procs->name[0]) continue; if (!strcmpi(s, winchoices[i].procs->name)) { struct winlink *p = wl_new(); p->wincp = &winchoices[i]; ...
0
[ "CWE-120", "CWE-269" ]
NetHack
f3def5c0b999478da2d0a8f0b6a7c370a2065f77
207,441,746,786,560,020,000,000,000,000,000,000,000
29
command line triggered buffer overruns Prevent extremely long command line arguments from overflowing local buffers in raw_printf or config_error_add. The increased buffer sizes they recently got to deal with long configuration file values aren't sufficient to handle command line induced overflows. choose_windows(co...
CtPtr ProtocolV2::_fault() { ldout(cct, 10) << __func__ << dendl; if (state == CLOSED || state == NONE) { ldout(cct, 10) << __func__ << " connection is already closed" << dendl; return nullptr; } if (connection->policy.lossy && !(state >= START_CONNECT && state <= SESSION_RECONNECTING)) { ld...
0
[ "CWE-323" ]
ceph
20b7bb685c5ea74c651ca1ea547ac66b0fee7035
184,476,445,342,983,600,000,000,000,000,000,000,000
99
msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities The secure mode uses AES-128-GCM with 96-bit nonces consisting of a 32-bit counter followed by a 64-bit salt. The counter is incremented after processing each frame, the salt is fixed for the duration of the session. Both are initialized from the sessio...
CURLMcode curl_multi_remove_handle(struct Curl_multi *multi, struct Curl_easy *data) { struct Curl_easy *easy = data; bool premature; struct Curl_llist_element *e; /* First, make some basic checks that the CURLM handle is a good handle */ if(!GOOD_MULTI_HANDLE(multi)) r...
0
[ "CWE-416", "CWE-295" ]
curl
7f4a9a9b2a49547eae24d2e19bc5c346e9026479
317,193,042,098,903,150,000,000,000,000,000,000,000
148
openssl: associate/detach the transfer from connection CVE-2021-22901 Bug: https://curl.se/docs/CVE-2021-22901.html
void env_free(char **envp) { char **p; for (p = envp; *p != NULL; p++) free(*p); free(envp); }
0
[ "CWE-476" ]
cronie
a6576769f01325303b11edc3e0cfb05ef382ce56
323,979,032,993,566,470,000,000,000,000,000,000,000
7
Fix CVE-2019-9704 and CVE-2019-9705 The users can cause DoS of the crond by loading huge crontab files. We now allow maximum 1000 environment variables and 1000 crontab entries. Also the comments and whitespace between the entries and variables are now limited to 32768 characters.
f_join(typval_T *argvars, typval_T *rettv) { garray_T ga; char_u *sep; if (argvars[0].v_type != VAR_LIST) { emsg(_(e_listreq)); return; } if (argvars[0].vval.v_list == NULL) return; if (argvars[1].v_type == VAR_UNKNOWN) sep = (char_u *)" "; else sep = tv_get_string_chk(&argvars[1])...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
22,834,068,811,849,430,000,000,000,000,000,000,000
29
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.
static int zend_generator_get_next_delegated_value(zend_generator *generator) /* {{{ */ { zval *value; if (Z_TYPE(generator->values) == IS_ARRAY) { HashTable *ht = Z_ARR(generator->values); HashPosition pos = Z_FE_POS(generator->values); Bucket *p; do { if (UNEXPECTED(pos >= ht->nNumUsed)) { /* Reache...
0
[]
php-src
83e2b9e2202da6cc25bdaac67a58022b90be88e7
90,194,048,344,277,600,000,000,000,000,000,000,000
83
Fixed bug #76946
LIR_Opr LIRGenerator::exceptionOopOpr() { return FrameMap::rax_oop_opr; }
0
[]
jdk17u
268c0159253b3de5d72eb826ef2329b27bb33fea
298,872,678,179,815,400,000,000,000,000,000,000,000
1
8272014: Better array indexing Reviewed-by: thartmann Backport-of: 937c31d896d05aa24543b74e98a2ea9f05b5d86f
static inline int security_path_unlink(struct path *dir, struct dentry *dentry) { return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
326,991,560,726,621,800,000,000,000,000,000,000,000
4
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...
pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr) { if ((mutex->lock = malloc(sizeof(CRITICAL_SECTION))) == NULL) exit(ENOMEM); InitializeCriticalSection(mutex->lock); return 0; }
0
[ "CWE-703", "CWE-125" ]
portable
17c88164016df821df2dff4b2b1291291ec4f28a
208,943,184,115,726,050,000,000,000,000,000,000,000
7
Make pthread_mutex static initialisation work on Windows. This takes the dynamic initialisation code added to CRYPTO_lock() in e5081719 and applies it to the Window's pthread_mutex implementation. This allows for PTHREAD_MUTEX_INITIALIZER to be used on Windows. bcook has agreed to place this code in the public domain...
QPDFObjectHandle::assertNumber() { assertType("Number", isNumber()); }
0
[ "CWE-835" ]
qpdf
afe0242b263a9e1a8d51dd81e42ab6de2e5127eb
135,853,161,938,707,630,000,000,000,000,000,000,000
4
Handle object ID 0 (fixes #99) This is CVE-2017-9208. The QPDF library uses object ID 0 internally as a sentinel to represent a direct object, but prior to this fix, was not blocking handling of 0 0 obj or 0 0 R as a special case. Creating an object in the file with 0 0 obj could cause various infinite loops. The PDF...
NOEXPORT void session_cache_retrieve(CLI *c) { SSL_SESSION *sess; CRYPTO_THREAD_read_lock(stunnel_locks[LOCK_SESSION]); if(c->opt->option.delayed_lookup) { sess=c->opt->session; } else { /* per-destination client cache */ if(c->opt->connect_session) { sess=c->opt->connect_se...
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
275,422,063,617,634,700,000,000,000,000,000,000,000
18
stunnel-5.57
static int PC4500_accessrid(struct airo_info *ai, u16 rid, u16 accmd) { Cmd cmd; /* for issuing commands */ Resp rsp; /* response from commands */ u16 status; memset(&cmd, 0, sizeof(cmd)); cmd.cmd = accmd; cmd.parm0 = rid; status = issuecommand(ai, &cmd, &rsp); if (status != 0) return status; if ( (rsp.status...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
225,374,895,608,698,930,000,000,000,000,000,000,000
16
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
TEST_F(EncryptedRecordTest, TestWriteAppDataInPlace) { TLSMessage msg{ContentType::application_data, getBuf("1234567890", 5, 17)}; EXPECT_CALL(*writeAead_, _encrypt(_, _, 0)) .WillOnce(Invoke([](std::unique_ptr<IOBuf>& buf, const IOBuf*, uint64_t) { // footer should have been written w/o chaining ...
0
[ "CWE-400", "CWE-703", "CWE-770" ]
fizz
6bf67137ef1ee5cd70c842b014c322b7deaf994b
100,654,703,953,013,080,000,000,000,000,000,000,000
14
Reject zero length handshake records. Summary: Zero length (all padding) handshake are forbidden by RFC. Allowing these was a regression in D13754697 (2c6f78a). This is a partial fix for CVE-2019-11924 Reviewed By: xybu Differential Revision: D16285100 fbshipit-source-id: 05a19d31ad74601ce89156a0e59517aaad8dd928
void testUriHostIpFour2() { UriParserStateA stateA; UriUriA uriA; stateA.uri = &uriA; // 0 4 0 3 0 7 const char * const input = "http" "://" "1.2.3.4"; TEST_ASSERT(0 == uriParseUriA(&stateA, input)); TEST_ASSERT(uriA.hostText.first == input + 4 + 3); TEST_ASSERT(uriA...
0
[ "CWE-787" ]
uriparser
864f5d4c127def386dd5cc926ad96934b297f04e
216,816,340,689,234,170,000,000,000,000,000,000,000
16
UriQuery.c: Fix out-of-bounds-write in ComposeQuery and ...Ex Reported by Google Autofuzz team
static void fdctrl_stop_transfer(FDCtrl *fdctrl, uint8_t status0, uint8_t status1, uint8_t status2) { FDrive *cur_drv; cur_drv = get_cur_drv(fdctrl); fdctrl->status0 &= ~(FD_SR0_DS0 | FD_SR0_DS1 | FD_SR0_HEAD); fdctrl->status0 |= GET_CUR_DRV(fdctrl); if (cur_drv->he...
0
[ "CWE-119" ]
qemu
e907746266721f305d67bc0718795fedee2e824c
108,757,496,175,328,500,000,000,000,000,000,000,000
32
fdc: force the fifo access to be in bounds of the allocated buffer During processing of certain commands such as FD_CMD_READ_ID and FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could get out of bounds leading to memory corruption with values coming from the guest. Fix this by making sure that the index i...
getEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name) { callbacks++; if (noout) return(NULL); fprintf(stdout, "SAX.getEntity(%s)\n", name); return(NULL); }
0
[ "CWE-416" ]
libxml2
1358d157d0bd83be1dfe356a69213df9fac0b539
239,376,679,082,185,070,000,000,000,000,000,000,000
8
Fix use-after-free with `xmllint --html --push` Call htmlCtxtUseOptions to make sure that names aren't stored in dictionaries. Note that this issue only affects xmllint using the HTML push parser. Fixes #230.
lock_and_open_sequence(SeqTable seq) { LocalTransactionId thislxid = MyProc->lxid; /* Get the lock if not already held in this xact */ if (seq->lxid != thislxid) { ResourceOwner currentOwner; currentOwner = CurrentResourceOwner; CurrentResourceOwner = TopTransactionResourceOwner; LockRelationOid(seq->rel...
0
[ "CWE-94" ]
postgres
b9b21acc766db54d8c337d508d0fe2f5bf2daab0
62,941,176,307,588,230,000,000,000,000,000,000,000
23
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
void RGWPutMetadataBucket_ObjStore_SWIFT::send_response() { const auto meta_ret = handle_metadata_errors(s, op_ret); if (meta_ret != op_ret) { op_ret = meta_ret; } else { if (!op_ret && (op_ret != -EINVAL)) { op_ret = STATUS_NO_CONTENT; } set_req_state_err(s, op_ret); } dump_errno(s); ...
0
[ "CWE-617" ]
ceph
f44a8ae8aa27ecef69528db9aec220f12492810e
26,090,728,751,516,240,000,000,000,000,000,000,000
16
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 Image *ReadOneJNGImage(MngInfo *mng_info, const ImageInfo *image_info, ExceptionInfo *exception) { Image *alpha_image, *color_image, *image, *jng_image; ImageInfo *alpha_image_info, *color_image_info; MagickBooleanType logging; ssize_t y; MagickBooleanType st...
0
[ "CWE-416" ]
ImageMagick
916d7bbd2c66a286d379dbd94bc6035c8fab937c
256,988,438,731,909,000,000,000,000,000,000,000,000
751
Removed invalid free reported in #1791.
template<typename t> const CImg<T>& symmetric_eigen(CImg<t>& val, CImg<t>& vec) const { if (is_empty()) { val.assign(); vec.assign(); } else { #ifdef cimg_use_lapack char JOB = 'V', UPLO = 'U'; int N = _width, LWORK = 4*N, INFO; Tfloat *const lapA = new Tfloat[N*N],...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
131,954,625,553,553,910,000,000,000,000,000,000,000
68
Fix other issues in 'CImg<T>::load_bmp()'.
Sort an array of message headers, optionally including only messages that meet specified criteria. */ PHP_FUNCTION(imap_sort) { zval *streamind; zend_string *criteria = NULL, *charset = NULL; zend_long pgm, rev, flags = 0; pils *imap_le_struct; unsigned long *slst, *sl; char *search_criteria; SORTPGM *mypgm=N...
0
[ "CWE-88" ]
php-src
336d2086a9189006909ae06c7e95902d7d5ff77e
53,763,639,134,145,710,000,000,000,000,000,000,000
57
Disable rsh/ssh functionality in imap by default (bug #77153)
bool response_promise_then_handler(JSContext *cx, HandleObject event, HandleValue extra, CallArgs args) { // Step 10.1 // Note: the `then` handler is only invoked after all Promise resolution has // happened. (Even if there were multiple Promises to unwrap first.) That // mean...
0
[ "CWE-94" ]
js-compute-runtime
65524ffc962644e9fc39f4b368a326b6253912a9
3,834,172,853,195,039,300,000,000,000,000,000,000
40
use rangom_get instead of arc4random as arc4random does not work correctly with wizer wizer causes the seed in arc4random to be the same between executions which is not random
parse_args(int argc, char *argv[]) { int r; static struct option longOptions[] = { {"receive-cmd", required_argument, 0, 'v'}, {"send-cmd", required_argument, 0, 's'}, {"imap", required_argument, 0, 'I' }, {"omap", required_argument, 0, 'O' }, {"emap", required_argument, 0, 'E' }, {"es...
0
[ "CWE-77", "CWE-125" ]
picocom
1ebc60b20fbe9a02436d5cbbf8951714e749ddb1
243,216,987,849,468,250,000,000,000,000,000,000,000
186
Do not use "/bin/sh" to run external commands. Picocom no longer uses /bin/sh to run external commands for file-transfer operations. Parsing the command line and spliting it into arguments is now performed internally by picocom, using quoting rules very similar to those of the Unix shell. Hopefully, this makes it impo...
template<typename t> CImg<T>& blur_bilateral(const CImg<t>& guide, const float sigma_x, const float sigma_y, const float sigma_z, const float sigma_r, const float sampling_x, const float sampling_y, c...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
38,386,842,695,869,740,000,000,000,000,000,000,000
102
Fix other issues in 'CImg<T>::load_bmp()'.
static MagickBooleanType SetCacheAlphaChannel(Image *image,const Quantum alpha, ExceptionInfo *exception) { CacheInfo *magick_restrict cache_info; CacheView *magick_restrict image_view; MagickBooleanType status; ssize_t y; assert(image != (Image *) NULL); assert(image->signature == Mag...
0
[ "CWE-772" ]
ImageMagick
7a42f63927e7f2e26846b7ed4560e9cb4984af7b
308,882,607,921,706,330,000,000,000,000,000,000,000
55
https://github.com/ImageMagick/ImageMagick/issues/903
mysql_set_character_set_with_default_collation(MYSQL *mysql) { const char *save= charsets_dir; if (mysql->options.charset_dir) charsets_dir=mysql->options.charset_dir; if ((mysql->charset= get_charset_by_csname(mysql->options.charset_name, MY_CS_PRIMARY, MYF(MY_WM...
0
[ "CWE-254" ]
server
f0d774d48416bb06063184380b684380ca005a41
267,015,805,913,643,300,000,000,000,000,000,000,000
28
MDEV-9212 ssl-validate-cert incorrect hostname check Reimplement ssl_verify_server_cert() using the logic from https://wiki.openssl.org/index.php/Hostname_validation The bug was discovered by Alex Gaynor.
void nci_free_device(struct nci_dev *ndev) { nfc_free_device(ndev->nfc_dev); nci_hci_deallocate(ndev); kfree(ndev); }
0
[]
linux
48b71a9e66c2eab60564b1b1c85f4928ed04e406
123,105,877,214,289,380,000,000,000,000,000,000,000
6
NFC: add NCI_UNREG flag to eliminate the race There are two sites that calls queue_work() after the destroy_workqueue() and lead to possible UAF. The first site is nci_send_cmd(), which can happen after the nci_close_device as below nfcmrvl_nci_unregister_dev | nfc_genl_dev_up nci_close_device | f...
static int get_buffer_internal(AVCodecContext *avctx, AVFrame *frame, int flags) { int override_dimensions = 1; int ret; if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) { if ((ret = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0 || avctx->pix_fmt<0) { av_log(avctx, AV_LOG_...
0
[ "CWE-703" ]
FFmpeg
e5c7229999182ad1cef13b9eca050dba7a5a08da
140,274,224,098,843,050,000,000,000,000,000,000,000
147
avcodec/utils: set AVFrame format unconditional Fixes inconsistency and out of array accesses Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
EbmlElement *EbmlMaster::FindNextElt(const EbmlElement & PastElt) const { size_t Index; for (Index = 0; Index < ElementList.size(); Index++) { if ((ElementList[Index]) == &PastElt) { // found past element, new one is : Index++; break; } } while (Index < ElementList.size()) { if (...
0
[ "CWE-703" ]
libebml
88409e2a94dd3b40ff81d08bf6d92f486d036b24
312,825,238,256,931,740,000,000,000,000,000,000,000
20
EbmlMaster: propagate upper level element after infinite sized one correctly When the parser encountered a deeply nested element with an infinite size then a following element of an upper level was not propagated correctly. Instead the element with the infinite size was added into the EBML element tree a second time r...
static inline void mb_group_bb_bitmap_alloc(struct super_block *sb, struct ext4_group_info *grp, ext4_group_t group) { return; }
0
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
102,661,996,850,536,430,000,000,000,000,000,000,000
5
ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently...
cmsContext CMSEXPORT cmsGetPipelineContextID(const cmsPipeline* lut) { _cmsAssert(lut != NULL); return lut ->ContextID; }
0
[]
Little-CMS
b0d5ffd4ad91cf8683ee106f13742db3dc66599a
155,621,145,355,747,380,000,000,000,000,000,000,000
5
Memory Squeezing: LCMS2: CLUTElemDup Check for allocation failures and tidy up if found.
void __f2fs_replace_block(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, block_t old_blkaddr, block_t new_blkaddr, bool recover_curseg, bool recover_newaddr) { struct sit_info *sit_i = SIT_I(sbi); struct curseg_info *curseg; unsigned int segno, old_cursegno; struct seg_entry *se; int type; unsigned s...
0
[ "CWE-200", "CWE-476" ]
linux
d4fdf8ba0e5808ba9ad6b44337783bd9935e0982
101,199,903,089,112,740,000,000,000,000,000,000,000
66
f2fs: fix a panic caused by NULL flush_cmd_control Mount fs with option noflush_merge, boot failed for illegal address fcc in function f2fs_issue_flush: if (!test_opt(sbi, FLUSH_MERGE)) { ret = submit_flush_wait(sbi); atomic_inc(&fcc->issued_flush); -> Here, fcc illegal ...
rename_buffer(char_u *new_fname) { char_u *fname, *sfname, *xfname; buf_T *buf; buf = curbuf; apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, curbuf); /* buffer changed, don't change name now */ if (buf != curbuf) return FAIL; #ifdef FEAT_EVAL if (aborting()) /* autocmds may abort ...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
276,857,170,345,274,350,000,000,000,000,000,000,000
47
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.
static int vhost_user_set_vring_err(struct virtio_net **pdev __rte_unused, struct VhostUserMsg *msg, int main_fd __rte_unused) { if (validate_msg_fds(msg, 1) != 0) return RTE_VHOST_MSG_RESULT_ERR; if (!(msg->payload.u64 & VHOST_USER_VRING_NOFD_MASK)) close(msg->fds[0]); RTE_LOG(INFO, VHOST_CONFIG, "not im...
0
[]
dpdk
bf472259dde6d9c4dd3ebad2c2b477a168c6e021
198,814,564,199,305,330,000,000,000,000,000,000,000
13
vhost: fix possible denial of service by leaking FDs A malicious Vhost-user master could send in loop hand-crafted vhost-user messages containing more file descriptors the vhost-user slave expects. Doing so causes the application using the vhost-user library to run out of FDs. This issue has been assigned CVE-2019-14...
static void tsc2102_audio_register_write( TSC210xState *s, int reg, uint16_t value) { switch (reg) { case 0x00: /* Audio Control 1 */ s->audio_ctrl1 = value & 0x0f3f; #ifdef TSC_VERBOSE if ((value & ~0x0f3f) || ((value & 7) != ((value >> 3) & 7))) fprintf(stderr, "tsc...
0
[ "CWE-119" ]
qemu
5193be3be35f29a35bc465036cd64ad60d43385f
48,328,112,295,168,260,000,000,000,000,000,000,000
127
tsc210x: fix buffer overrun on invalid state load CVE-2013-4539 s->precision, nextprecision, function and nextfunction come from wire and are used as idx into resolution[] in TSC_CUT_RESOLUTION. Validate after load to avoid buffer overrun. Cc: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael S. Tsirkin <mst...
static void spl_multiple_iterator_get_all(spl_SplObjectStorage *intern, int get_type, zval *return_value TSRMLS_DC) /* {{{ */ { spl_SplObjectStorageElement *element; zval *it, *retval = NULL; int valid = 1, num_elements; num_elements = zend_hash_num_elements(&intern-...
0
[ "CWE-416" ]
php-src
c2e197e4efc663ca55f393bf0e799848842286f3
111,350,364,298,638,030,000,000,000,000,000,000,000
66
Fix bug #70168 - Use After Free Vulnerability in unserialize() with SplObjectStorage
static void ccid3_hc_rx_exit(struct sock *sk) { struct ccid3_hc_rx_sock *hc = ccid3_hc_rx_sk(sk); tfrc_rx_hist_purge(&hc->rx_hist); tfrc_lh_cleanup(&hc->rx_li_hist); }
0
[ "CWE-200" ]
linux
7b07f8eb75aa3097cdfd4f6eac3da49db787381d
81,618,187,030,774,090,000,000,000,000,000,000,000
7
dccp: fix info leak via getsockopt(DCCP_SOCKOPT_CCID_TX_INFO) The CCID3 code fails to initialize the trailing padding bytes of struct tfrc_tx_info added for alignment on 64 bit architectures. It that for potentially leaks four bytes kernel stack via the getsockopt() syscall. Add an explicit memset(0) before filling th...
mrb_fiber_yield(mrb_state *mrb, mrb_int len, const mrb_value *a) { struct mrb_context *c = mrb->c; if (!c->prev) { mrb_raise(mrb, E_FIBER_ERROR, "can't yield from root fiber"); } fiber_check_cfunc(mrb, c); c->prev->status = MRB_FIBER_RUNNING; c->status = MRB_FIBER_SUSPENDED; fiber_switch_context(mrb...
0
[ "CWE-476", "CWE-703" ]
mruby
da48e7dbb20024c198493b8724adae1b842083aa
293,919,827,933,083,720,000,000,000,000,000,000,000
21
fiber.c: should pack 15+ arguments in an array.
char *re_yyget_text (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yytext;
0
[ "CWE-476", "CWE-703", "CWE-125" ]
yara
3119b232c9c453c98d8fa8b6ae4e37ba18117cd4
166,432,932,263,497,500,000,000,000,000,000,000,000
5
re_lexer: Make reading escape sequences more robust (#586) * Add test for issue #503 * re_lexer: Make reading escape sequences more robust This commit fixes parsing incomplete escape sequences at the end of a regular expression and parsing things like \xxy (invalid hex digits) which before were silently turned...
static void list_pending_downloads(digestmap_t *result, digest256map_t *result256, int purpose, const char *prefix) { const size_t p_len = strlen(prefix); smartlist_t *tmp = smartlist_new(); smartlist_t *conns = get_connection_array(); int flags = DSR_HEX; if (purpose == DIR_PURPOSE_FET...
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
175,715,212,581,582,330,000,000,000,000,000,000,000
38
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
struct r_bin_pe_export_t* PE_(r_bin_pe_get_exports)(struct PE_(r_bin_pe_obj_t)* bin) { struct r_bin_pe_export_t* exp, * exports = NULL; PE_Word function_ordinal; PE_VWord functions_paddr, names_paddr, ordinals_paddr, function_rva, name_vaddr, name_paddr; char function_name[PE_NAME_LENGTH + 1], forwarder_name[PE_NAM...
0
[ "CWE-125" ]
radare2
4e1cf0d3e6f6fe2552a269def0af1cd2403e266c
229,516,568,776,048,240,000,000,000,000,000,000,000
108
Fix crash in pe
static int gpr32_get_common(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf, unsigned long *regs) { compat_ulong_t *k = kbuf; compat_ulong_t __user *u = ubuf; compat_ulong_t reg; pos /= sizeof(reg); count...
0
[ "CWE-119", "CWE-787" ]
linux
c1fa0768a8713b135848f78fd43ffc208d8ded70
260,801,057,411,152,800,000,000,000,000,000,000,000
46
powerpc/tm: Flush TM only if CPU has TM feature Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump") added code to access TM SPRs in flush_tmregs_to_thread(). However flush_tmregs_to_thread() does not check if TM feature is available on CPU before trying to access TM SPRs in order to copy live state to th...
__always_inline do_set_perturb_byte (int32_t value) { LIBC_PROBE (memory_mallopt_perturb, 2, value, perturb_byte); perturb_byte = value; return 1;
0
[ "CWE-787" ]
glibc
d6db68e66dff25d12c3bc5641b60cbd7fb6ab44f
62,680,332,481,537,820,000,000,000,000,000,000,000
6
malloc: Mitigate null-byte overflow attacks * malloc/malloc.c (_int_free): Check for corrupt prev_size vs size. (malloc_consolidate): Likewise.
epass2003_process_fci(struct sc_card *card, sc_file_t * file, const u8 * buf, size_t buflen) { sc_context_t *ctx = card->ctx; size_t taglen, len = buflen; const u8 *tag = NULL, *p = buf; sc_log(ctx, "processing FCI bytes"); tag = sc_asn1_find_tag(ctx, p, len, 0x83, &taglen); if (tag != NULL && taglen == 2) { f...
0
[ "CWE-415", "CWE-119" ]
OpenSC
360e95d45ac4123255a4c796db96337f332160ad
317,519,860,329,570,800,000,000,000,000,000,000,000
127
fixed out of bounds writes Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problems.
static char* is_text_file_at(int dir_fd, const char *name, ssize_t *sz) { /* We were using magic.h API to check for file being text, but it thinks * that file containing just "0" is not text (!!) * So, we do it ourself. */ int fd = secure_openat_read(dir_fd, name); if (fd < 0) return...
0
[ "CWE-20" ]
libreport
1951e7282043dfe1268d492aea056b554baedb75
144,476,231,598,020,550,000,000,000,000,000,000,000
97
lib: fix races in dump directory handling code Florian Weimer <fweimer@redhat.com>: dd_opendir() should keep a file handle (opened with O_DIRECTORY) and use openat() and similar functions to access files in it. ... The file system manipulation functions should guard against hard links (check tha...
static ulong find_set(TYPELIB *lib, const char *x, uint length, char **err_pos, uint *err_len) { const char *end= x + length; ulong found= 0; uint find; char buff[255]; *err_pos= 0; /* No error yet */ while (end > x && my_isspace(charset_info, end[-1])) end--; ...
0
[ "CWE-295" ]
mysql-server
b3e9211e48a3fb586e88b0270a175d2348935424
229,629,975,030,445,200,000,000,000,000,000,000,000
39
WL#9072: Backport WL#8785 to 5.5
static noinline void __schedule_bug(struct task_struct *prev) { struct pt_regs *regs = get_irq_regs(); printk(KERN_ERR "BUG: scheduling while atomic: %s/%d/0x%08x\n", prev->comm, prev->pid, preempt_count()); debug_show_held_locks(prev); print_modules(); if (irqs_disabled()) print_irqtrace_events(prev); if ...
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
103,174,358,309,575,590,000,000,000,000,000,000,000
17
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
static void call_nt_transact_ioctl(connection_struct *conn, struct smb_request *req, uint16 **ppsetup, uint32 setup_count, char **ppparams, uint32 parameter_count, char **ppdata, uint32 data_count, uint32 max_data_count) { uint32 function; uint16 fidnum; files_struct *fsp; uint8 i...
0
[ "CWE-189" ]
samba
6ef0e33fe8afa0ebb81652b9d42b42d20efadf04
44,957,130,660,280,210,000,000,000,000,000,000,000
288
Fix bug #10010 - Missing integer wrap protection in EA list reading can cause server to loop with DOS. Ensure we never wrap whilst adding client provided input. CVE-2013-4124 Signed-off-by: Jeremy Allison <jra@samba.org>
static struct nfs_open_context *alloc_nfs_open_context(struct vfsmount *mnt, struct dentry *dentry, struct rpc_cred *cred) { struct nfs_open_context *ctx; ctx = kmalloc(sizeof(*ctx), GFP_KERNEL); if (ctx != NULL) { ctx->path.dentry = dget(dentry); ctx->path.mnt = mntget(mnt); ctx->cred = get_rpccred(cred); ...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
287,027,162,426,778,870,000,000,000,000,000,000,000
18
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
void Compute(OpKernelContext* ctx) override { const Tensor& a = ctx->input(0); const Tensor& b = ctx->input(1); OP_REQUIRES(ctx, TensorShapeUtils::IsMatrix(a.shape()), errors::InvalidArgument("a is not a matrix")); OP_REQUIRES(ctx, TensorShapeUtils::IsMatrix(b.shape()), ...
1
[ "CWE-125" ]
tensorflow
e6cf28c72ba2eb949ca950d834dd6d66bb01cfae
55,113,062,603,670,290,000,000,000,000,000,000,000
107
Validate that matrix dimension sizes in SparseMatMul are positive. PiperOrigin-RevId: 401149683 Change-Id: Ib33eafc561a39c8741ece80b2edce6d4aae9a57d
R_API int r_bin_file_deref(RBin *bin, RBinFile *a) { RBinObject *o = r_bin_cur_object (bin); int res = false; if (a && !o) { //r_list_delete_data (bin->binfiles, a); res = true; } else if (a && o->referenced - 1 < 1) { //r_list_delete_data (bin->binfiles, a); res = true; // not thread safe } else if (o) ...
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
213,429,886,863,439,350,000,000,000,000,000,000,000
19
Fix #8748 - Fix oobread on string search
void jv_parser_free(struct jv_parser* p) { parser_free(p); jv_mem_free(p); }
0
[ "CWE-119", "CWE-787" ]
jq
8eb1367ca44e772963e704a700ef72ae2e12babd
115,859,059,568,249,670,000,000,000,000,000,000,000
4
Heap buffer overflow in tokenadd() (fix #105) This was an off-by one: the NUL terminator byte was not allocated on resize. This was triggered by JSON-encoded numbers longer than 256 bytes.
__do_block_io_op(struct xen_blkif *blkif) { union blkif_back_rings *blk_rings = &blkif->blk_rings; struct blkif_request req; struct pending_req *pending_req; RING_IDX rc, rp; int more_to_do = 0; rc = blk_rings->common.req_cons; rp = blk_rings->common.sring->req_prod; rmb(); /* Ensure we see queued requests up ...
0
[ "CWE-20" ]
linux-2.6
604c499cbbcc3d5fe5fb8d53306aa0fae1990109
168,665,347,601,550,720,000,000,000,000,000,000,000
73
xen/blkback: Check device permissions before allowing OP_DISCARD We need to make sure that the device is not RO or that the request is not past the number of sectors we want to issue the DISCARD operation for. This fixes CVE-2013-2140. Cc: stable@vger.kernel.org Acked-by: Jan Beulich <JBeulich@suse.com> Acked-by: Ia...
frame_need_space (Frame_Chunk *fc, unsigned int reg) { unsigned int prev = fc->ncols; if (reg < (unsigned int) fc->ncols) return 0; if (dwarf_regnames_count > 0 && reg > dwarf_regnames_count) return -1; fc->ncols = reg + 1; /* PR 17512: file: 10450-2643-0.004. If reg == -1 then this can ...
0
[ "CWE-703" ]
binutils-gdb
695c6dfe7e85006b98c8b746f3fd5f913c94ebff
12,805,649,291,803,931,000,000,000,000,000,000,000
47
PR29370, infinite loop in display_debug_abbrev The PR29370 testcase is a fuzzed object file with multiple .trace_abbrev sections. Multiple .trace_abbrev or .debug_abbrev sections are not a violation of the DWARF standard. The DWARF5 standard even gives an example of multiple .debug_abbrev sections contained in group...
static void svm_set_idt(struct kvm_vcpu *vcpu, struct desc_ptr *dt) { struct vcpu_svm *svm = to_svm(vcpu); svm->vmcb->save.idtr.limit = dt->size; svm->vmcb->save.idtr.base = dt->address ; vmcb_mark_dirty(svm->vmcb, VMCB_DT); }
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
263,956,045,504,865,100,000,000,000,000,000,000,000
8
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...
pk_transaction_get_packages (PkTransaction *transaction, GVariant *params, GDBusMethodInvocation *context) { PkBitfield filter; _cleanup_error_free_ GError *error = NULL; g_return_if_fail (PK_IS_TRANSACTION (transaction)); g_return_if_fail (transaction->priv->tid != NULL); g_variant_get (params, ...
0
[ "CWE-287" ]
PackageKit
f176976e24e8c17b80eff222572275517c16bdad
146,446,481,901,560,360,000,000,000,000,000,000,000
33
Reinstallation and downgrade require authorization Added new policy actions: * org.freedesktop.packagekit.package-reinstall * org.freedesktop.packagekit.package-downgrade The first does not depend or require any other actions to be authorized except for org.freedesktop.packagekit.package-install-untrusted in case o...
_gnutls_partition (gnutls_session_t session, void *_base, size_t nmemb, size_t size, int (*compar) (gnutls_session_t, const void *, const void *)) { uint8_t *base = _base; uint8_t tmp[MAX_ELEM_SIZE]; uint8_t ptmp[MAX_ELEM_SIZE]; unsigned int pivot; unsigned int i, j; unsigned int full; i ...
0
[ "CWE-310" ]
gnutls
34d87a7c3f12794a3ec2305cd2fdbae152bf2a76
294,885,442,346,220,450,000,000,000,000,000,000,000
44
(_gnutls_x509_oid2mac_algorithm): Don't crash trying to strcmp the NULL OID value in the hash_algorithms array, which happens when the input OID doesn't match our OIDs for SHA1, MD5, MD2 or RIPEMD160. Reported by satyakumar <satyam_kkd@hyd.hellosoft.com>.
vhost_user_lock_all_queue_pairs(struct virtio_net *dev) { unsigned int i = 0; unsigned int vq_num = 0; while (vq_num < dev->nr_vring) { struct vhost_virtqueue *vq = dev->virtqueue[i]; if (vq) { rte_spinlock_lock(&vq->access_lock); vq_num++; } i++; } }
0
[]
dpdk
612e17cf6d7b2bf05a687d8a9ba7be582a744e50
181,077,714,004,740,200,000,000,000,000,000,000,000
15
vhost: fix possible denial of service on SET_VRING_NUM vhost_user_set_vring_num() performs multiple allocations without checking whether data were previously allocated. It may cause a denial of service because of the memory leaks that happen if a malicious vhost-user master keeps sending VHOST_USER_SET_VRING_NUM requ...
void packrat(const char *a_s, size_t def_id, size_t &len, any &val, T fn) { if (!enablePackratParsing) { fn(val); return; } auto col = a_s - s; auto idx = def_count * static_cast<size_t>(col) + def_id; if (cache_registered[idx]) { if (cache_success[idx]) { auto key = st...
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
310,738,600,730,951,430,000,000,000,000,000,000,000
29
Fix #122
NO_INLINE JsVar *jspeFunctionCall(JsVar *function, JsVar *functionName, JsVar *thisArg, bool isParsing, int argCount, JsVar **argPtr) { if (JSP_SHOULD_EXECUTE && !function) { if (functionName) jsExceptionHere(JSET_ERROR, "Function %q not found!", functionName); else jsExceptionHere(JSET_ERROR, "Fu...
0
[ "CWE-787" ]
Espruino
e069be2ecc5060ef47391716e4de94999595b260
47,373,294,010,931,590,000,000,000,000,000,000,000
377
Fix potential corruption issue caused by `delete [].__proto__` (fix #2142)
PHP_FUNCTION(imagesetthickness) { zval *IM; zend_long thick; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &IM, &thick) == FAILURE) { return; } if ((im = (gdImagePtr)zend_fetch_resource(Z_RES_P(IM), "Image", le_gd)) == NULL) { RETURN_FALSE; } gdImageSetThickness(im, thick); RETURN_TRU...
0
[ "CWE-787" ]
php-src
28022c9b1fd937436ab67bb3d61f652c108baf96
143,767,019,218,360,520,000,000,000,000,000,000,000
18
Fix bug#72697 - select_colors write out-of-bounds (cherry picked from commit b6f13a5ef9d6280cf984826a5de012a32c396cd4) Conflicts: ext/gd/gd.c
static int restore_rand(void) { OPENSSL_free(fake_rand_bytes); fake_rand_bytes = NULL; fake_rand_bytes_offset = 0; if (!TEST_true(RAND_set_rand_method(saved_rand))) return 0; return 1; }
0
[ "CWE-120" ]
openssl
59f5e75f3bced8fc0e130d72a3f582cf7b480b46
131,596,408,526,522,180,000,000,000,000,000,000,000
9
Correctly calculate the length of SM2 plaintext given the ciphertext Previously the length of the SM2 plaintext could be incorrectly calculated. The plaintext length was calculated by taking the ciphertext length and taking off an "overhead" value. The overhead value was assumed to have a "fixed" element of 10 bytes....
e_ews_connection_set_folder_permissions_sync (EEwsConnection *cnc, gint pri, EwsFolderId *folder_id, EEwsFolderType folder_type, const G...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
98,383,880,291,160,430,000,000,000,000,000,000,000
31
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
entry_guards_note_guard_failure(guard_selection_t *gs, entry_guard_t *guard) { tor_assert(gs); guard->is_reachable = GUARD_REACHABLE_NO; guard->is_usable_filtered_guard = 0; guard->is_pending = 0; if (guard->failing_since == 0) guard->failing_since = approx_time(); log...
0
[ "CWE-200" ]
tor
665baf5ed5c6186d973c46cdea165c0548027350
216,855,514,007,783,880,000,000,000,000,000,000,000
17
Consider the exit family when applying guard restrictions. When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code ...
DECLAREContigPutFunc(putRGBUAcontig8bittile) { int samplesperpixel = img->samplesperpixel; (void) y; fromskew *= samplesperpixel; for( ; h > 0; --h) { uint32 r, g, b, a; uint8* m; for (x = w; x > 0; --x) { a = pp[3]; m = img->UaToAa+((size_t) a<<8); r = m[pp[0]]; g = m[pp[1]]; b = m[pp[2]]; ...
0
[ "CWE-787" ]
libtiff
4bb584a35f87af42d6cf09d15e9ce8909a839145
256,866,104,480,383,570,000,000,000,000,000,000,000
21
RGBA interface: fix integer overflow potentially causing write heap buffer overflow, especially on 32 bit builds. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16443. Credit to OSS Fuzz
R_API ut64 r_bin_java_bootstrap_arg_calc_size(RBinJavaBootStrapArgument *bsm_arg) { ut64 size = 0; if (bsm_arg) { // bsm_arg->argument_info_idx = R_BIN_JAVA_USHORT (buffer, offset); size += 2; } return size; }
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
125,181,098,994,186,880,000,000,000,000,000,000,000
8
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
CWebServer::CWebServer(void) : session_store() { m_pWebEm = NULL; m_bDoStop = false; #ifdef WITH_OPENZWAVE m_ZW_Hwidx = -1; #endif }
0
[ "CWE-89" ]
domoticz
ee70db46f81afa582c96b887b73bcd2a86feda00
207,804,997,948,564,060,000,000,000,000,000,000,000
8
Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!)
INST_HANDLER (lds) { // LDS Rd, k int d = ((buf[0] >> 4) & 0xf) | ((buf[1] & 0x1) << 4); int k = (buf[3] << 8) | buf[2]; op->ptr = k; // load value from RAMPD:k __generic_ld_st (op, "ram", 0, 1, 0, k, 0); ESIL_A ("r%d,=,", d); }
1
[ "CWE-125" ]
radare2
041e53cab7ca33481ae45ecd65ad596976d78e68
229,368,276,138,214,740,000,000,000,000,000,000,000
9
Fix crash in anal.avr
int MonClient::_check_auth_tickets() { ceph_assert(monc_lock.is_locked()); if (active_con && auth) { if (auth->need_tickets()) { ldout(cct, 10) << __func__ << " getting new tickets!" << dendl; MAuth *m = new MAuth; m->protocol = auth->get_protocol(); auth->prepare_build_request(); ...
0
[ "CWE-294" ]
ceph
2927fd91d41e505237cc73f9700e5c6a63e5cb4f
105,550,316,904,130,630,000,000,000,000,000,000,000
17
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...
int unit_kill_common( Unit *u, KillWho who, int signo, pid_t main_pid, pid_t control_pid, sd_bus_error *error) { int r = 0; bool killed = false; if (IN_SET(who, KILL_MAIN, KILL_MAIN_FAIL)) { ...
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
222,564,957,477,321,030,000,000,000,000,000,000,000
62
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...
static int usbredir_get_packet_id_q(QEMUFile *f, void *priv, size_t unused, const VMStateField *field) { struct PacketIdQueue *q = priv; USBRedirDevice *dev = q->dev; int i, size; uint64_t id; size = qemu_get_be32(f); DPRINTF("get_packet_id_q %s size %d\n", q...
0
[ "CWE-770" ]
qemu
7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986
169,816,921,878,046,220,000,000,000,000,000,000,000
17
usb/redir: avoid dynamic stack allocation (CVE-2021-3527) Use autofree heap allocation instead. Fixes: 4f4321c11ff ("usb: use iovecs in USBPacket") Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id:...
dissect_kafka_write_txn_markers_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version) { proto_item *subti; proto_tree *subtree; offset = dissect_kafka_throttle_time(tvb, pinfo, tree, offset); subtree = proto_tre...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
185,037,278,327,519,700,000,000,000,000,000,000,000
18
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...
void set_task_blockstep(struct task_struct *task, bool on) { unsigned long debugctl; /* * Ensure irq/preemption can't change debugctl in between. * Note also that both TIF_BLOCKSTEP and debugctl should * be changed atomically wrt preemption. * * NOTE: this means that set/clear TIF_BLOCKSTEP is only safe if...
0
[ "CWE-20", "CWE-362" ]
linux
9899d11f654474d2d54ea52ceaa2a1f4db3abd68
827,135,364,267,190,300,000,000,000,000,000,000
27
ptrace: ensure arch_ptrace/ptrace_request can never race with SIGKILL putreg() assumes that the tracee is not running and pt_regs_access() can safely play with its stack. However a killed tracee can return from ptrace_stop() to the low-level asm code and do RESTORE_REST, this means that debugger can actually read/mod...
parse_cmd_address(exarg_T *eap, char **errormsg, int silent) { int address_count = 1; linenr_T lnum; int need_check_cursor = FALSE; int ret = FAIL; // Repeat for all ',' or ';' separated addresses. for (;;) { eap->line1 = eap->line2; eap->line2 = default_address(eap); eap->cmd = skipw...
0
[ "CWE-284", "CWE-122" ]
vim
f7c7c3fad6d2135d558f3b36d0d1a943118aeb5e
99,409,122,962,285,440,000,000,000,000,000,000,000
159
patch 8.2.5150: read past the end of the first line with ":0;'{" Problem: Read past the end of the first line with ":0;'{". Solution: When on line zero check the column is valid for line one.
static inline struct anon_vma *anon_vma_alloc(void) { struct anon_vma *anon_vma; anon_vma = kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL); if (anon_vma) { atomic_set(&anon_vma->refcount, 1); /* * Initialise the anon_vma root to point to itself. If called * from fork, the root will be reset to the parents ...
0
[ "CWE-400", "CWE-703", "CWE-264" ]
linux
57e68e9cd65b4b8eb4045a1e0d0746458502554c
55,636,601,205,053,270,000,000,000,000,000,000,000
16
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 ...
static struct page **sev_pin_memory(struct kvm *kvm, unsigned long uaddr, unsigned long ulen, unsigned long *n, int write) { struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info; unsigned long npages, size; int npinned; unsigned long locked, lock_limit; struct page **pages; unsigned long first, l...
0
[]
linux
7be74942f184fdfba34ddd19a0d995deb34d4a03
132,439,976,678,915,170,000,000,000,000,000,000,000
60
KVM: SVM: Periodically schedule when unregistering regions on destroy There may be many encrypted regions that need to be unregistered when a SEV VM is destroyed. This can lead to soft lockups. For example, on a host running 4.15: watchdog: BUG: soft lockup - CPU#206 stuck for 11s! [t_virtual_machi:194348] CPU: 206...
opj_image_t* rawtoimage(const char *filename, opj_cparameters_t *parameters, raw_cparameters_t *raw_cp) { return rawtoimage_common(filename, parameters, raw_cp, OPJ_TRUE); }
0
[ "CWE-787" ]
openjpeg
e5285319229a5d77bf316bb0d3a6cbd3cb8666d9
290,555,087,799,255,920,000,000,000,000,000,000,000
5
pgxtoimage(): fix write stack buffer overflow (#997)
static int tty_open(struct inode *inode, struct file *filp) { struct tty_struct *tty = NULL; int noctty, retval; struct tty_driver *driver; int index; dev_t device = inode->i_rdev; unsigned saved_flags = filp->f_flags; nonseekable_open(inode, filp); retry_open: noctty = filp->f_flags & O_NOCTTY; index = -1;...
0
[ "CWE-703" ]
linux
c290f8358acaeffd8e0c551ddcc24d1206143376
70,885,544,503,347,150,000,000,000,000,000,000,000
155
TTY: drop driver reference in tty_open fail path When tty_driver_lookup_tty fails in tty_open, we forget to drop a reference to the tty driver. This was added by commit 4a2b5fddd5 (Move tty lookup/reopen to caller). Fix that by adding tty_driver_kref_put to the fail path. I will refactor the code later. This is for ...
static void sp(void) { if (minify < 1) putchar(' '); }
0
[ "CWE-476" ]
mujs
f5b3c703e18725e380b83427004632e744f85a6f
265,478,913,883,447,620,000,000,000,000,000,000,000
5
Issue #161: Cope with empty programs in mujs-pp.
double operator()(const double x, const double y, const double z, const double c) { mem[_cimg_mp_slot_x] = x; mem[_cimg_mp_slot_y] = y; mem[_cimg_mp_slot_z] = z; mem[_cimg_mp_slot_c] = c; for (p_code = code; p_code<p_code_end; ++p_code) { opcode._data = p_code->_data; const ulo...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
250,902,108,175,113,620,000,000,000,000,000,000,000
9
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
handle_notifications_data_free (struct HandleNotificationsData *hnd) { if (hnd == NULL) return; if (hnd->ews_store) g_object_unref (hnd->ews_store); g_slist_free_full (hnd->folders, g_free); g_free (hnd); }
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
238,001,901,862,331,100,000,000,000,000,000,000,000
11
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) { d->m_pPut_buf_func = pPut_buf_func; d->m_pPut_buf_user = pPut_buf_user; d->m_flags = (mz_uint)(flags); d->m_max_probes[0] = 1 + ((flags & 0xFFF) + ...
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
227,581,875,827,921,460,000,000,000,000,000,000,000
36
Make line_no with too large value(2**20) invalid. Fixes #124
static int pb0100_init_controls(struct sd *sd) { struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler; struct pb0100_ctrls *ctrls; static const struct v4l2_ctrl_config autogain_target = { .ops = &pb0100_ctrl_ops, .id = V4L2_CTRL_CLASS_USER + 0x1000, .type = V4L2_CTRL_TYPE_INTEGER, .name = "Automatic G...
0
[ "CWE-476" ]
linux
485b06aadb933190f4bc44e006076bc27a23f205
111,211,553,827,236,820,000,000,000,000,000,000,000
48
media: stv06xx: add missing descriptor sanity checks Make sure to check that we have two alternate settings and at least one endpoint before accessing the second altsetting structure and dereferencing the endpoint arrays. This specifically avoids dereferencing NULL-pointers or corrupting memory when a device does not...
static char *get_load(void) { static char tmp[64]; static int count = 0; if (count++ % 5 == 0) { struct stat sb; memset(tmp, 0, sizeof(tmp)); if (stat("/proc/loadavg", &sb) == 0) { int d = open("/proc/loadavg", O_RDONLY); if (d >= 0) { read(d, tmp, 60); close(d); } } if (tmp[0] == '\0') {...
0
[ "CWE-862", "CWE-284", "CWE-732" ]
x11vnc
69eeb9f7baa14ca03b16c9de821f9876def7a36a
91,747,103,546,693,720,000,000,000,000,000,000,000
20
scan: limit access to shared memory segments to current user
static TEE_Result set_rmem_param(const struct optee_msg_param_rmem *rmem, struct param_mem *mem) { size_t req_size = 0; uint64_t shm_ref = READ_ONCE(rmem->shm_ref); mem->mobj = mobj_reg_shm_get_by_cookie(shm_ref); if (!mem->mobj) return TEE_ERROR_BAD_PARAMETERS; mem->offs = READ_ONCE(rmem->offs); mem->si...
0
[ "CWE-20", "CWE-119", "CWE-787" ]
optee_os
e3adcf566cb278444830e7badfdcc3983e334fd1
331,087,077,961,268,100,000,000,000,000,000,000,000
23
core: ensure that supplied range matches MOBJ In set_rmem_param() if the MOBJ is found by the cookie it's verified to represent non-secure shared memory. Prior to this patch the supplied sub-range to be used of the MOBJ was not checked here and relied on later checks further down the chain. Those checks seems to be en...
static int u32_dump(struct net *net, struct tcf_proto *tp, void *fh, struct sk_buff *skb, struct tcmsg *t, bool rtnl_held) { struct tc_u_knode *n = fh; struct tc_u_hnode *ht_up, *ht_down; struct nlattr *nest; if (n == NULL) return skb->len; t->tcm_handle = n->handle; nest = nla_nest_start_noflag(skb, T...
0
[ "CWE-416" ]
linux
3db09e762dc79584a69c10d74a6b98f89a9979f8
48,857,107,715,882,240,000,000,000,000,000,000,000
112
net/sched: cls_u32: fix netns refcount changes in u32_change() We are now able to detect extra put_net() at the moment they happen, instead of much later in correct code paths. u32_init_knode() / tcf_exts_init() populates the ->exts.net pointer, but as mentioned in tcf_exts_init(), the refcount on netns has not been ...
proxy_C_DigestEncryptUpdate (CK_X_FUNCTION_LIST *self, CK_SESSION_HANDLE handle, CK_BYTE_PTR part, CK_ULONG part_len, CK_BYTE_PTR enc_part, CK_ULONG_PTR enc_part_len) { State...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
333,405,183,334,944,900,000,000,000,000,000,000,000
16
Check for arithmetic overflows before allocating
static void hardware_disable_all(void) { raw_spin_lock(&kvm_lock); hardware_disable_all_nolock(); raw_spin_unlock(&kvm_lock); }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
222,424,565,220,312,150,000,000,000,000,000,000,000
6
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 ...