func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void parse_host_arg(char *extra_args, int buflen)
{
char *val;
int vallen;
char *end = extra_args + buflen;
if (extra_args < end && *extra_args) {
saw_extended_args = 1;
if (strncasecmp("host=", extra_args, 5) == 0) {
val = extra_args + 5;
vallen = strlen(val) + 1;
if (*val) {
/* Split <hos... | 0 | [] | git | 73bb33a94ec67a53e7d805b12ad9264fa25f4f8d | 182,436,583,488,036,700,000,000,000,000,000,000,000 | 84 | daemon: Strictly parse the "extra arg" part of the command
Since 1.4.4.5 (49ba83fb67 "Add virtualization support to git-daemon")
git daemon enters an infinite loop and never terminates if a client
hides any extra arguments in the initial request line which is not
exactly "\0host=blah\0".
Since that change, a client m... |
int32_t RotationMap::degrees(uint16_t orientation)
{
int32_t d = 0;
for (int i = 0; omList_[i].orientation != 0; ++i) {
if (omList_[i].orientation == orientation) {
d = omList_[i].degrees;
break;
}
}
return d;
} | 0 | [
"CWE-400"
] | exiv2 | b3d077dcaefb6747fff8204490f33eba5a144edb | 336,721,722,328,824,030,000,000,000,000,000,000,000 | 11 | Fix #460 by adding more checks in CiffDirectory::readDirectory |
bool CUser::IsHostAllowed(const CString& sHost) const {
if (m_ssAllowedHosts.empty()) {
return true;
}
for (const CString& sAllowedHost : m_ssAllowedHosts) {
if (CUtils::CheckCIDR(sHost, sAllowedHost)) {
return true;
}
}
return false;
} | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 263,280,893,005,248,880,000,000,000,000,000,000,000 | 13 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
check_prefs_warning(PKT_public_key *pk)
{
log_info(_("WARNING: key %s contains preferences for unavailable\n"
"algorithms on these user IDs:\n"), keystr_from_pk(pk));
} | 0 | [
"CWE-20"
] | gnupg | f0b33b6fb8e0586e9584a7a409dcc31263776a67 | 294,666,422,627,239,360,000,000,000,000,000,000,000 | 5 | gpg: Import only packets which are allowed in a keyblock.
* g10/import.c (valid_keyblock_packet): New.
(read_block): Store only valid packets.
--
A corrupted key, which for example included a mangled public key
encrypted packet, used to corrupt the keyring. This change skips all
packets which are not allowed in a ke... |
nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
struct nfsd4_create_session *sess)
{
DECODE_HEAD;
u32 dummy;
READ_BUF(16);
COPYMEM(&sess->clientid, 8);
sess->seqid = be32_to_cpup(p++);
sess->flags = be32_to_cpup(p++);
/* Fore channel attrs */
READ_BUF(28);
dummy = be32_to_cpup(p++); /* he... | 0 | [
"CWE-20",
"CWE-129"
] | linux | f961e3f2acae94b727380c0b74e2d3954d0edf79 | 40,876,119,119,888,040,000,000,000,000,000,000,000 | 50 | nfsd: encoders mustn't use unitialized values in error cases
In error cases, lgp->lg_layout_type may be out of bounds; so we
shouldn't be using it until after the check of nfserr.
This was seen to crash nfsd threads when the server receives a LAYOUTGET
request with a large layout type.
GETDEVICEINFO has the same pro... |
qeh_write_type (struct qpack_enc_hdl *qeh)
{
int s;
#ifndef NDEBUG
const char *env = getenv("LSQUIC_RND_VARINT_LEN");
if (env && atoi(env))
{
s = rand() & 3;
LSQ_DEBUG("writing %d-byte stream type", 1 << s);
}
else
#endif
s = 0;
switch (s)
{
case 0:
... | 0 | [
"CWE-476",
"CWE-269"
] | lsquic | a74702c630e108125e71898398737baec8f02238 | 153,695,163,560,854,090,000,000,000,000,000,000,000 | 32 | Release 3.1.0 |
TEST_F(QueryPlannerTest, ContainedOrMoveToElemMatchObject) {
addIndex(BSON("b.c" << 1 << "a" << 1));
addIndex(BSON("d" << 1 << "a" << 1));
runQuery(fromjson("{$and: [{a: 5}, {$or: [{b: {$elemMatch: {c: 6}}}, {d: 7}]}]}"));
assertNumSolutions(2);
assertSolutionExists(
"{fetch: {filter: null,... | 0 | [
"CWE-834"
] | mongo | 94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5 | 35,516,468,404,865,005,000,000,000,000,000,000,000 | 15 | SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch |
TEST_P(Http2CodecImplTest, WatermarkUnderEndStream) {
initialize();
MockStreamCallbacks callbacks;
request_encoder_->getStream().addCallbacks(callbacks);
TestHeaderMapImpl request_headers;
HttpTestUtility::addDefaultHeaders(request_headers);
EXPECT_CALL(request_decoder_, decodeHeaders_(_, false));
reques... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 134,200,084,915,225,700,000,000,000,000,000,000,000 | 43 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
std::shared_ptr<UpstreamInfo> upstreamInfo() override { return upstream_info_; } | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 306,574,464,205,481,380,000,000,000,000,000,000,000 | 1 | internal redirect: fix a lifetime bug (#785)
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
static int readContigTilesIntoBuffer (TIFF* in, uint8* buf,
uint32 imagelength,
uint32 imagewidth,
uint32 tw, uint32 tl,
tsample_t spp, uint16 bps)
{
int status ... | 0 | [
"CWE-119",
"CWE-125"
] | libtiff | 9657bbe3cdce4aaa90e07d50c1c70ae52da0ba6a | 214,567,098,417,662,430,000,000,000,000,000,000,000 | 206 | * tools/tiffcrop.c: fix readContigStripsIntoBuffer() in -i (ignore) mode so
that the output buffer is correctly incremented to avoid write outside bounds.
Reported by Agostino Sarubbo.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2620 |
void CLASS phase_one_load_raw()
{
int a, b, i;
ushort akey, bkey, t_mask;
fseek (ifp, ph1.key_off, SEEK_SET);
akey = get2();
bkey = get2();
t_mask = ph1.format == 1 ? 0x5555:0x1354;
#ifdef LIBRAW_LIBRARY_BUILD
if (ph1.black_col || ph1.black_row )
{
imgdata.rawdata.ph1_cblack = (short(*)[2])call... | 0 | [
"CWE-129"
] | LibRaw | 89d065424f09b788f443734d44857289489ca9e2 | 69,031,914,509,932,570,000,000,000,000,000,000,000 | 38 | fixed two more problems found by fuzzer |
TEST_F(QueryPlannerTest, RootedOrOfAndDontCollapseDifferentBounds) {
addIndex(BSON("a" << 1 << "b" << 1));
addIndex(BSON("c" << 1 << "d" << 1));
runQuery(fromjson("{$or: [{a: 1, b: 2}, {c: 3, d: 4}, {a: 1, b: 99}]}"));
assertNumSolutions(2U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSol... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 72,171,021,966,273,480,000,000,000,000,000,000,000 | 16 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
PHP_FUNCTION(dom_document_create_element_ns)
{
zval *id;
xmlDocPtr docp;
xmlNodePtr nodep = NULL;
xmlNsPtr nsptr = NULL;
int ret, uri_len = 0, name_len = 0, value_len = 0;
char *uri, *name, *value = NULL;
char *localname = NULL, *prefix = NULL;
int errorcode;
dom_object *intern;
if (zend_parse_method_paramet... | 0 | [
"CWE-20"
] | php-src | f7d7befae8bcc2db0093f8adaa9f72eeb7ad891e | 24,468,678,329,619,378,000,000,000,000,000,000,000 | 57 | Fix #69719 - more checks for nulls in paths |
Elf64_Shdr const *PackLinuxElf64::elf_find_section_name(
char const *const name
) const
{
Elf64_Shdr const *shdr = shdri;
int j = e_shnum;
for (; 0 <=--j; ++shdr) {
unsigned ndx = get_te64(&shdr->sh_name);
if (0==strcmp(name, &shstrtab[ndx])) {
return shdr;
}
}
... | 0 | [
"CWE-476"
] | upx | ef336dbcc6dc8344482f8cf6c909ae96c3286317 | 220,333,449,215,731,370,000,000,000,000,000,000,000 | 14 | Protect against bad crafted input.
https://github.com/upx/upx/issues/128
modified: p_lx_elf.cpp |
int args_verify(char ***pargs, int *pargc,
int *badarg, BIO *err, X509_VERIFY_PARAM **pm)
{
ASN1_OBJECT *otmp = NULL;
unsigned long flags = 0;
int i;
int purpose = 0, depth = -1;
char **oldargs = *pargs;
char *arg = **pargs, *argn = (*pargs)[1];
const X509_VERIFY_PARAM *vpm = NULL;
time_t at_time = 0;
if (... | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 109,932,951,726,588,590,000,000,000,000,000,000,000 | 177 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
static ssize_t picolcd_operation_mode_delay_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct picolcd_data *data = dev_get_drvdata(dev);
return snprintf(buf, PAGE_SIZE, "%hu\n", data->opmode_delay);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 844817e47eef14141cf59b8d5ac08dd11c0a9189 | 14,908,007,210,801,724,000,000,000,000,000,000,000 | 7 | HID: picolcd: sanity check report size in raw_event() callback
The report passed to us from transport driver could potentially be
arbitrarily large, therefore we better sanity-check it so that raw_data
that we hold in picolcd_pending structure are always kept within proper
bounds.
Cc: stable@vger.kernel.org
Reported-... |
int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void))
{
if (pthread_once(once, init) != 0)
return 0;
return 1;
} | 0 | [
"CWE-330"
] | openssl | 1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be | 265,693,836,581,437,650,000,000,000,000,000,000,000 | 7 | drbg: ensure fork-safety without using a pthread_atfork handler
When the new OpenSSL CSPRNG was introduced in version 1.1.1,
it was announced in the release notes that it would be fork-safe,
which the old CSPRNG hadn't been.
The fork-safety was implemented using a fork count, which was
incremented by a pthread_atfork... |
static int no_givcrypt(struct aead_givcrypt_request *req)
{
return -ENOSYS;
} | 0 | [
"CWE-310"
] | linux | 9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6 | 59,315,487,507,352,580,000,000,000,000,000,000,000 | 4 | crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of th... |
static void print_binder_ref_olocked(struct seq_file *m,
struct binder_ref *ref)
{
binder_node_lock(ref->node);
seq_printf(m, " ref %d: desc %d %snode %d s %d w %d d %pK\n",
ref->data.debug_id, ref->data.desc,
ref->node->proc ? "" : "dead ",
ref->node->debug_id, ref->data.strong,
ref->da... | 0 | [
"CWE-416"
] | linux | 7bada55ab50697861eee6bb7d60b41e68a961a9c | 170,906,724,928,784,780,000,000,000,000,000,000,000 | 11 | 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... |
\param chroma_subsampling Type of chroma subsampling. Can be <tt>{ 420 | 422 | 444 }</tt>.
\param is_rgb Tells if the RGB to YUV conversion must be done for saving.
**/
const CImgList<T>& save_yuv(std::FILE *const file,
const unsigned int chroma_subsampling=444, | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 159,640,448,987,076,620,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. |
de265_error decoder_context::read_sps_NAL(bitreader& reader)
{
logdebug(LogHeaders,"----> read SPS\n");
std::shared_ptr<seq_parameter_set> new_sps = std::make_shared<seq_parameter_set>();
de265_error err;
if ((err=new_sps->read(this, &reader)) != DE265_OK) {
return err;
}
if (param_sps_headers_fd>=0)... | 0 | [
"CWE-416"
] | libde265 | f538254e4658ef5ea4e233c2185dcbfd165e8911 | 85,582,774,270,530,490,000,000,000,000,000,000,000 | 28 | fix streams where SPS image size changes without refreshing PPS (#299) |
static void unlock_trace(struct task_struct *task)
{
mutex_unlock(&task->signal->cred_guard_mutex);
} | 0 | [] | linux | 0499680a42141d86417a8fbaa8c8db806bea1201 | 208,369,199,052,646,680,000,000,000,000,000,000,000 | 4 | procfs: add hidepid= and gid= mount options
Add support for mount options to restrict access to /proc/PID/
directories. The default backward-compatible "relaxed" behaviour is left
untouched.
The first mount option is called "hidepid" and its value defines how much
info about processes we want to be available for non... |
static void delayed_mem_copy_move(delayed_mem_copy_status *status, int load_base, sljit_sw load_offset,
int store_base, sljit_sw store_offset)
{
struct sljit_compiler *compiler = status->compiler;
int next_tmp_reg = status->next_tmp_reg;
int tmp_reg = status->tmp_regs[next_tmp_reg];
SLJIT_ASSERT(load_base > 0 && sto... | 0 | [
"CWE-125"
] | php-src | 8947fd9e9fdce87cd6c59817b1db58e789538fe9 | 69,089,159,107,295,170,000,000,000,000,000,000,000 | 24 | Fix #78338: Array cross-border reading in PCRE
We backport r1092 from pcre2. |
hstore_ne(PG_FUNCTION_ARGS)
{
int res = DatumGetInt32(DirectFunctionCall2(hstore_cmp,
PG_GETARG_DATUM(0),
PG_GETARG_DATUM(1)));
PG_RETURN_BOOL(res != 0);
} | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 104,480,813,121,363,840,000,000,000,000,000,000,000 | 8 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
gst_h264_slice_parse_dec_ref_pic_marking (GstH264SliceHdr * slice,
GstH264NalUnit * nalu, NalReader * nr)
{
GstH264DecRefPicMarking *dec_ref_pic_m;
guint start_pos;
GST_DEBUG ("parsing \"Decoded reference picture marking\"");
start_pos = nal_reader_get_pos (nr);
dec_ref_pic_m = &slice->dec_ref_pic_mark... | 1 | [
"CWE-787"
] | gst-plugins-bad | 11353b3f6e2f047cc37483d21e6a37ae558896bc | 259,663,381,108,923,850,000,000,000,000,000,000,000 | 57 | codecparsers: h264parser: guard against ref_pic_markings overflow
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1703> |
dissect_header_lens_v2(tvbuff_t *tvb, wtap_syscall_header* syscall_header, int offset, proto_tree *tree, int encoding)
{
guint32 param_count;
proto_item *ti;
proto_tree *len_tree;
ti = proto_tree_add_item(tree, hf_se_param_lens, tvb, offset, syscall_header->nparams * SYSDIG_PARAM_SIZE_V2, ENC_NA);
... | 0 | [
"CWE-703"
] | wireshark | 41bfc9112480c3d83331ed93470c7f675a9d5b1a | 178,476,734,186,786,300,000,000,000,000,000,000,000 | 16 | dissectors: re-generated sysdig events using provided tool.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com> |
static pj_status_t tls_send_msg(pjsip_transport *transport,
pjsip_tx_data *tdata,
const pj_sockaddr_t *rem_addr,
int addr_len,
void *token,
pjsip_transport_callback callback)
{
struct tls_transport *tls = (struct tls_transport*)transport;
pj_ssize_t size;
pj_bool_t delayed = PJ_FALSE;
... | 0 | [
"CWE-362",
"CWE-703"
] | pjproject | d5f95aa066f878b0aef6a64e60b61e8626e664cd | 291,501,518,892,564,600,000,000,000,000,000,000,000 | 100 | 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 is_hwc_enabled(SM501State *state, int crt)
{
uint32_t addr = crt ? state->dc_crt_hwc_addr : state->dc_panel_hwc_addr;
return addr & SM501_HWC_EN;
} | 0 | [
"CWE-190"
] | qemu | b15a22bbcbe6a78dc3d88fe3134985e4cdd87de4 | 52,911,544,485,249,070,000,000,000,000,000,000,000 | 5 | sm501: Replace hand written implementation with pixman where possible
Besides being faster this should also prevent malicious guests to
abuse 2D engine to overwrite data or cause a crash.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-id: 58666389b6cae256e4e972a32c05cf8aa51bffc0.1590089984.git.balaton@eik... |
static int do_seekable(__G__ lastchance) /* return PK-type error code */
__GDEF
int lastchance;
{
#ifndef SFX
/* static int no_ecrec = FALSE; SKM: moved to globals.h */
int maybe_exe=FALSE;
int too_weird_to_continue=FALSE;
#ifdef TIMESTAMP
time_t uxstamp;
ulg nmember = 0L;
#endif
#en... | 1 | [
"CWE-400"
] | unzip | 6d351831be705cc26d897db44f878a978f4138fc | 60,251,483,763,949,270,000,000,000,000,000,000,000 | 2,380 | Do not raise a zip bomb alert for a misplaced central directory.
There is a zip-like file in the Firefox distribution, omni.ja,
which is a zip container with the central directory placed at the
start of the file instead of after the local entries as required
by the zip standard. This commit marks the actual location o... |
static PHP_INI_MH(OnUpdateTimeout)
{
if (stage==PHP_INI_STAGE_STARTUP) {
/* Don't set a timeout on startup, only per-request */
ZEND_ATOL(EG(timeout_seconds), ZSTR_VAL(new_value));
return SUCCESS;
}
zend_unset_timeout();
ZEND_ATOL(EG(timeout_seconds), ZSTR_VAL(new_value));
zend_set_timeout(EG(timeout_seconds... | 0 | [] | php-src | 9a07245b728714de09361ea16b9c6fcf70cb5685 | 120,178,873,395,564,260,000,000,000,000,000,000,000 | 12 | Fixed bug #71273 A wrong ext directory setup in php.ini leads to crash |
static void update_mds_branch_idle(void)
{
/*
* Enable the idle clearing if SMT is active on CPUs which are
* affected only by MSBDS and not any other MDS variant.
*
* The other variants cannot be mitigated when SMT is enabled, so
* clearing the buffers on idle just to prevent the Store Buffer
* repartitio... | 0 | [] | linux | a2059825986a1c8143fd6698774fa9d83733bb11 | 178,053,529,522,569,370,000,000,000,000,000,000,000 | 18 | x86/speculation: Enable Spectre v1 swapgs mitigations
The previous commit added macro calls in the entry code which mitigate the
Spectre v1 swapgs issue if the X86_FEATURE_FENCE_SWAPGS_* features are
enabled. Enable those features where applicable.
The mitigations may be disabled with "nospectre_v1" or "mitigations... |
structured_reply_in_bounds (uint64_t offset, uint32_t length,
const struct command *cmd)
{
if (offset < cmd->offset ||
offset >= cmd->offset + cmd->count ||
offset + length > cmd->offset + cmd->count) {
set_error (0, "range of structured reply is out of bounds, "
... | 0 | [] | libnbd | 2c1987fc23d6d0f537edc6d4701e95a2387f7917 | 83,994,192,244,442,820,000,000,000,000,000,000,000 | 16 | lib: Fix stack corruption with structured reply containing negative offset.
Because of improper bounds checking, when receiving a structured reply
some offset/lengths sent by the server could cause libnbd to execute
arbitrary code under control of a malicious server.
A structured reply segment containing (for example... |
static void MoveToFront(uint8_t* v, size_t index) {
uint8_t value = v[index];
size_t i;
for (i = index; i != 0; --i) {
v[i] = v[i - 1];
}
v[0] = value;
} | 0 | [
"CWE-120"
] | brotli | 223d80cfbec8fd346e32906c732c8ede21f0cea6 | 292,255,350,439,810,240,000,000,000,000,000,000,000 | 8 | Update (#826)
* IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB
* simplify max Huffman table size calculation
* eliminate symbol duplicates (static arrays in .h files)
* minor combing in research/ code |
static OPJ_BOOL opj_j2k_write_regions( opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager )
{
OPJ_UINT32 compno;
const opj_tccp_t *l_tccp = 00;
/*... | 0 | [
"CWE-416"
] | openjpeg | 940100c28ae28931722290794889cf84a92c5f6f | 321,797,376,410,538,480,000,000,000,000,000,000,000 | 27 | Fix potential use-after-free in opj_j2k_write_mco function
Fixes #563 |
check_v8086_mode(struct pt_regs *regs, unsigned long address,
struct task_struct *tsk)
{
#ifdef CONFIG_VM86
unsigned long bit;
if (!v8086_mode(regs) || !tsk->thread.vm86)
return;
bit = (address - 0xA0000) >> PAGE_SHIFT;
if (bit < 32)
tsk->thread.vm86->screen_bitmap |= 1 << bit;
#endif
} | 0 | [
"CWE-264"
] | linux | 548acf19234dbda5a52d5a8e7e205af46e9da840 | 198,255,231,825,635,740,000,000,000,000,000,000,000 | 14 | x86/mm: Expand the exception table logic to allow new handling options
Huge amounts of help from Andy Lutomirski and Borislav Petkov to
produce this. Andy provided the inspiration to add classes to the
exception table with a clever bit-squeezing trick, Boris pointed
out how much cleaner it would all be if we just had... |
int nfs_readdir_add_to_array(struct nfs_entry *entry, struct page *page)
{
struct nfs_cache_array *array;
struct nfs_cache_array_entry *cache_entry;
const char *name;
int ret;
name = nfs_readdir_copy_name(entry->name, entry->len);
if (!name)
return -ENOMEM;
array = kmap_atomic(page);
ret = nfs_readdir_array... | 0 | [
"CWE-909"
] | linux | ac795161c93699d600db16c1a8cc23a65a1eceaf | 303,032,743,749,053,200,000,000,000,000,000,000,000 | 34 | NFSv4: Handle case where the lookup of a directory fails
If the application sets the O_DIRECTORY flag, and tries to open a
regular file, nfs_atomic_open() will punt to doing a regular lookup.
If the server then returns a regular file, we will happily return a
file descriptor with uninitialised open state.
The fix is ... |
void vbe_ioport_write_index(void *opaque, uint32_t addr, uint32_t val)
{
VGACommonState *s = opaque;
s->vbe_index = val;
} | 0 | [
"CWE-200"
] | qemu | c1b886c45dc70f247300f549dce9833f3fa2def5 | 87,513,120,599,210,300,000,000,000,000,000,000,000 | 5 | vbe: rework sanity checks
Plug a bunch of holes in the bochs dispi interface parameter checking.
Add a function doing verification on all registers. Call that
unconditionally on every register write. That way we should catch
everything, even changing one register affecting the valid range of
another register.
Some ... |
Item_param::clone_item()
{
/* see comments in the header file */
switch (state) {
case NULL_VALUE:
return new Item_null(name);
case INT_VALUE:
return (unsigned_flag ?
new Item_uint(name, value.integer, max_length) :
new Item_int(name, value.integer, max_length));
case REAL_VALU... | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 284,177,225,024,363,100,000,000,000,000,000,000,000 | 24 | 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'... |
char *xstrdup_between(const char *src, const char *open, const char *close)
{
const char *start = strstr(src, open);
if (start == NULL)
{
log_debug("Open tag not found: '%s'", open);
return NULL;
}
start += strlen(open);
const char *stop = strstr(start, close);
if (stop == ... | 0 | [
"CWE-20"
] | libreport | 1951e7282043dfe1268d492aea056b554baedb75 | 318,253,952,551,277,660,000,000,000,000,000,000,000 | 20 | 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 int FUZ_GetMilliSpan( int nTimeStart )
{
int nSpan = FUZ_GetMilliStart() - nTimeStart;
if ( nSpan < 0 )
nSpan += 0x100000 * 1000;
return nSpan;
} | 0 | [
"CWE-20"
] | lz4 | da5373197e84ee49d75b8334d4510689731d6e90 | 140,281,291,893,353,440,000,000,000,000,000,000,000 | 7 | Fixed : issue 52 (reported by Ludwig Strigeus) |
static int wcd9335_codec_enable_rx_bias(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kc, int event)
{
struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm);
struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev);
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
wcd->rx_bias_count++;
if (wcd->... | 0 | [] | sound | a54988113985ca22e414e132054f234fc8a92604 | 293,442,015,760,095,800,000,000,000,000,000,000,000 | 29 | wcd9335: fix a incorrect use of kstrndup()
In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup().
However, according to doc: "Note: Use kmemdup_nul() instead if the size
is known exactly." So we should use kmemdup_nul() here instead of
kstrndup().
Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
... |
static void pw_write(void)
{
char tmp[FILENAMELEN + 4];
sprintf(tmp, "%s%s", orig_file, ".OLD");
unlink(tmp);
if (link(orig_file, tmp))
warn(_("%s: create a link to %s failed"), orig_file, tmp);
#ifdef HAVE_LIBSELINUX
if (is_selinux_enabled() > 0) {
security_context_t passwd_context = NULL;
int ret = 0;
... | 0 | [
"CWE-264"
] | util-linux | bde91c85bdc77975155058276f99d2e0f5eab5a9 | 52,979,597,306,763,310,000,000,000,000,000,000,000 | 36 | chsh, chfn, vipw: fix filenames collision
The utils when compiled WITHOUT libuser then mkostemp()ing
"/etc/%s.XXXXXX" where the filename prefix is argv[0] basename.
An attacker could repeatedly execute the util with modified argv[0]
and after many many attempts mkostemp() may generate suffix which
makes sense. The re... |
static int rtnl_net_getid(struct sk_buff *skb, struct nlmsghdr *nlh,
struct netlink_ext_ack *extack)
{
struct net *net = sock_net(skb->sk);
struct nlattr *tb[NETNSA_MAX + 1];
struct net_fill_args fillargs = {
.portid = NETLINK_CB(skb).portid,
.seq = nlh->nlmsg_seq,
.cmd = RTM_NEWNSID,
};
struct net *pee... | 0 | [
"CWE-200",
"CWE-190",
"CWE-326"
] | linux | 355b98553789b646ed97ad801a619ff898471b92 | 102,623,976,741,167,170,000,000,000,000,000,000,000 | 77 | netns: provide pure entropy for net_hash_mix()
net_hash_mix() currently uses kernel address of a struct net,
and is used in many places that could be used to reveal this
address to a patient attacker, thus defeating KASLR, for
the typical case (initial net namespace, &init_net is
not dynamically allocated)
I believe ... |
pch_repl_lines (void)
{
return p_repl_lines;
} | 0 | [
"CWE-59"
] | patch | 44a987e02f04b9d81a0db4a611145cad1093a2d3 | 53,732,862,703,613,070,000,000,000,000,000,000,000 | 4 | Add line number overflow checking
* bootstrap.conf: use intprops module.
* src/common.h: Define LINENUM_MIN and LINENUM_MAX macros.
* src/pch.c (another_hunk): Add line number overflow checking. Based on Robert
C. Seacord's INT32-C document for integer overflow checking and Tobias
Stoeckmann's "integer overflows and ... |
tohex(const void *vp, size_t l)
{
const u_char *p = (const u_char *)vp;
char b[3], *r;
size_t i, hl;
if (l > 65536)
return xstrdup("tohex: length > 65536");
hl = l * 2 + 1;
r = xcalloc(1, hl);
for (i = 0; i < l; i++) {
snprintf(b, sizeof(b), "%02x", p[i]);
strlcat(r, b, hl);
}
return (r);
} | 0 | [] | openssh-portable | f3cbe43e28fe71427d41cfe3a17125b972710455 | 258,868,533,269,034,050,000,000,000,000,000,000,000 | 17 | upstream: need initgroups() before setresgid(); reported by anton@,
ok deraadt@
OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce |
static int xen_pvclock_gtod_notify(struct notifier_block *nb,
unsigned long was_set, void *priv)
{
/* Protected by the calling core code serialization */
static struct timespec64 next_sync;
struct xen_platform_op op;
struct timespec64 now, system_time;
struct timekeeper *tk = priv;
now.tv_sec = tk->xtime... | 0 | [] | linux | fa1f57421e0b1c57843902c89728f823abc32f02 | 13,955,389,597,449,068,000,000,000,000,000,000,000 | 38 | xen/virtio: Enable restricted memory access using Xen grant mappings
In order to support virtio in Xen guests add a config option XEN_VIRTIO
enabling the user to specify whether in all Xen guests virtio should
be able to access memory via Xen grant mappings only on the host side.
Also set PLATFORM_VIRTIO_RESTRICTED_M... |
ext4_access_path(handle_t *handle, struct inode *inode,
struct ext4_ext_path *path)
{
int credits, err;
if (!ext4_handle_valid(handle))
return 0;
/*
* Check if need to extend journal credits
* 3 for leaf, sb, and inode plus 2 (bmap and group
* descriptor) for each block group; assume two block
* groups... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 61,191,596,899,227,990,000,000,000,000,000,000,000 | 25 | 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... |
asmlinkage long compat_sys_mbind(compat_ulong_t start, compat_ulong_t len,
compat_ulong_t mode, compat_ulong_t __user *nmask,
compat_ulong_t maxnode, compat_ulong_t flags)
{
long err = 0;
unsigned long __user *nm = NULL;
unsigned long nr_bits, alloc_size;
nodemask_t bm;
nr_bits = min_t(unsigned lo... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 214,552,279,361,135,900,000,000,000,000,000,000,000 | 23 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
static long do_splice(struct file *in, loff_t __user *off_in,
struct file *out, loff_t __user *off_out,
size_t len, unsigned int flags)
{
struct pipe_inode_info *pipe;
loff_t offset, *off;
long ret;
pipe = in->f_dentry->d_inode->i_pipe;
if (pipe) {
if (off_in)
return -ESPIPE;
if (off_out) {... | 0 | [
"CWE-264"
] | linux-2.6 | 8c34e2d63231d4bf4852bac8521883944d770fe3 | 308,743,426,811,430,860,000,000,000,000,000,000,000 | 52 | [PATCH] Remove SUID when splicing into an inode
Originally from Mark Fasheh <mark.fasheh@oracle.com>
generic_file_splice_write() does not remove S_ISUID or S_ISGID. This is
inconsistent with the way we generally write to files.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe... |
static struct page *__mbochs_get_page(struct mdev_state *mdev_state,
pgoff_t pgoff)
{
WARN_ON(!mutex_is_locked(&mdev_state->ops_lock));
if (!mdev_state->pages[pgoff]) {
mdev_state->pages[pgoff] =
alloc_pages(GFP_HIGHUSER | __GFP_ZERO, 0);
if (!mdev_state->pages[pgoff])
return NULL;
}
get_page(... | 0 | [
"CWE-200",
"CWE-401"
] | linux | de5494af4815a4c9328536c72741229b7de88e7f | 222,596,568,478,332,670,000,000,000,000,000,000,000 | 15 | vfio/mbochs: Fix missing error unwind of mbochs_used_mbytes
Convert mbochs to use an atomic scheme for this like mtty was changed
into. The atomic fixes various race conditions with probing. Add the
missing error unwind. Also add the missing kfree of mdev_state->pages.
Fixes: 681c1615f891 ("vfio/mbochs: Convert to us... |
SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd)
{
if (unlikely(newfd == oldfd)) { /* corner case */
struct files_struct *files = current->files;
int retval = oldfd;
rcu_read_lock();
if (!fcheck_files(files, oldfd))
retval = -EBADF;
rcu_read_unlock();
return retval;
}
return ksys_dup3(... | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 318,870,864,367,758,380,000,000,000,000,000,000,000 | 14 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
flatpak_dir_system_helper_call_prune_local_repo (FlatpakDir *self,
guint arg_flags,
const gchar *arg_installation,
GCancellable *cancellable,
... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 306,472,545,816,771,370,000,000,000,000,000,000,000 | 18 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... |
e_ews_connection_utils_authenticate (EEwsConnection *cnc,
SoupSession *session,
SoupMessage *msg,
SoupAuth *auth,
gboolean retrying)
{
CamelNetworkSettings *network_settings;
ESoupAuthBearer *using_bearer_auth;
gchar *user, *password, *service_url = NULL;
gboolean expired = FALSE... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 85,334,885,563,455,350,000,000,000,000,000,000,000 | 80 | 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 |
njs_vmcode_debug(njs_vm_t *vm, u_char *pc, const char *prefix)
{
njs_vm_code_t *code;
code = njs_lookup_code(vm, pc);
njs_printf("%s %V\n", prefix,
(code != NULL) ? &code->name : &njs_entry_unknown);
} | 0 | [
"CWE-703",
"CWE-754"
] | njs | 222d6fdcf0c6485ec8e175f3a7b70d650c234b4e | 48,695,132,630,822,410,000,000,000,000,000,000,000 | 9 | Fixed njs_vmcode_interpreter() when "toString" conversion fails.
Previously, while interpreting a user function, njs_vmcode_interpreter()
might return prematurely when an error happens. This is not correct
because the current frame has to be unwound (or exception caught)
first.
The fix is exit through only 5 appropr... |
PHP_FUNCTION(ldap_escape)
{
char *value, *ignores, *result;
int valuelen = 0, ignoreslen = 0, i;
size_t resultlen;
long flags = 0;
zend_bool map[256] = {0}, havecharlist = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sl", &value, &valuelen, &ignores, &ignoreslen, &flags) != SUCCESS) {
return;
}
... | 0 | [
"CWE-476"
] | php-src | 49782c54994ecca2ef2a061063bd5a7079c43527 | 127,343,067,028,146,920,000,000,000,000,000,000,000 | 40 | Fix bug #76248 - Malicious LDAP-Server Response causes Crash |
static int __btrfs_balance(struct btrfs_fs_info *fs_info)
{
struct btrfs_balance_control *bctl = fs_info->balance_ctl;
struct btrfs_root *chunk_root = fs_info->chunk_root;
u64 chunk_type;
struct btrfs_chunk *chunk;
struct btrfs_path *path = NULL;
struct btrfs_key key;
struct btrfs_key found_key;
struct extent_b... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 310,949,555,248,940,050,000,000,000,000,000,000,000 | 188 | 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... |
coolkey_process_combined_object(sc_card_t *card, coolkey_private_data_t *priv, u8 *object, size_t object_length)
{
coolkey_combined_header_t *header = (coolkey_combined_header_t *)object;
unsigned short compressed_offset;
unsigned short compressed_length;
unsigned short compressed_type;
unsigned short object_offse... | 0 | [
"CWE-415"
] | OpenSC | c246f6f69a749d4f68626b40795a4f69168008f4 | 126,302,216,055,953,870,000,000,000,000,000,000,000 | 115 | coolkey: Make sure the object ID is unique when filling list
Thanks to oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19208 |
ZrtpPacketConfirm* ZRtp::prepareConfirm2(ZrtpPacketConfirm* confirm1, uint32_t* errMsg) {
sendInfo(Info, InfoInitConf1Received);
uint8_t confMac[MAX_DIGEST_LENGTH];
uint32_t macLen;
// Use the Responder's keys here because we are Initiator here and
// receive packets from Responder
int16_t hm... | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 284,738,430,818,992,670,000,000,000,000,000,000,000 | 109 | Fix vulnerabilities found and reported by Mark Dowd
- limit length of memcpy
- limit number of offered algorithms in Hello packet
- length check in PING packet
- fix a small coding error |
inline void WireFormatLite::WriteTag(int field_number, WireType type,
io::CodedOutputStream* output) {
output->WriteTag(MakeTag(field_number, type));
} | 0 | [
"CWE-703"
] | protobuf | d1635e1496f51e0d5653d856211e8821bc47adc4 | 83,184,511,567,026,210,000,000,000,000,000,000,000 | 4 | Apply patch |
bool IsAlive() override { return !closed_; } | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 46,760,283,013,920,690,000,000,000,000,000,000,000 | 1 | src: use unique_ptr for WriteWrap
This commit attempts to avoid a use-after-free error by using unqiue_ptr
and passing a reference to it.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
PR-URL: https://github.com/nodejs-private/node-private/pull/238
Reviewed-By: Michael Dawson <... |
static int pfkey_xfrm_policy2msg(struct sk_buff *skb, const struct xfrm_policy *xp, int dir)
{
struct sadb_msg *hdr;
struct sadb_address *addr;
struct sadb_lifetime *lifetime;
struct sadb_x_policy *pol;
struct sadb_x_sec_ctx *sec_ctx;
struct xfrm_sec_ctx *xfrm_ctx;
int i;
int size;
int sockaddr_size = pfkey_so... | 0 | [
"CWE-119",
"CWE-787"
] | linux | a5cc68f3d63306d0d288f31edfc2ae6ef8ecd887 | 128,553,581,216,630,160,000,000,000,000,000,000,000 | 153 | af_key: fix info leaks in notify messages
key_notify_sa_flush() and key_notify_policy_flush() miss to initialize
the sadb_msg_reserved member of the broadcasted message and thereby
leak 2 bytes of heap memory to listeners. Fix that.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Steffen Klassert <steffen.... |
static void parse_id3(AVFormatContext *s, AVIOContext *pb,
AVDictionary **metadata, int64_t *dts,
ID3v2ExtraMetaAPIC **apic, ID3v2ExtraMeta **extra_meta)
{
static const char id3_priv_owner_ts[] = "com.apple.streaming.transportStreamTimestamp";
ID3v2ExtraMeta *meta;
... | 0 | [
"CWE-703"
] | FFmpeg | 7ba100d3e6e8b1e5d5342feb960a7f081d6e15af | 135,511,165,976,589,130,000,000,000,000,000,000,000 | 24 | avformat/hls: Fix DoS due to infinite loop
Fixes: loop.m3u
The default max iteration count of 1000 is arbitrary and ideas for a better solution are welcome
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Previous version reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <... |
int SSL_get_verify_depth(const SSL *s)
{
return X509_VERIFY_PARAM_get_depth(s->param);
} | 0 | [
"CWE-310"
] | openssl | 56f1acf5ef8a432992497a04792ff4b3b2c6f286 | 141,045,949,664,586,800,000,000,000,000,000,000,000 | 4 | Disable SSLv2 default build, default negotiation and weak ciphers.
SSLv2 is by default disabled at build-time. Builds that are not
configured with "enable-ssl2" will not support SSLv2. Even if
"enable-ssl2" is used, users who want to negotiate SSLv2 via the
version-flexible SSLv23_method() will need to explicitly ca... |
void ObjectBuildMeta(const GCCell *cell, Metadata::Builder &mb) {
// This call is just for debugging and consistency purposes.
mb.addJSObjectOverlapSlots(JSObject::numOverlapSlots<JSObject>());
const auto *self = static_cast<const JSObject *>(cell);
mb.addField("parent", &self->parent_);
mb.addField("class",... | 0 | [
"CWE-843",
"CWE-125"
] | hermes | fe52854cdf6725c2eaa9e125995da76e6ceb27da | 275,199,632,185,385,700,000,000,000,000,000,000,000 | 18 | [CVE-2020-1911] Look up HostObject computed properties on the right object in the prototype chain.
Summary:
The change in the hermes repository fixes the security vulnerability
CVE-2020-1911. This vulnerability only affects applications which
allow evaluation of uncontrolled, untrusted JavaScript code not
shipped wit... |
int OBJ_create(const char *oid, const char *sn, const char *ln)
{
int ok=0;
ASN1_OBJECT *op=NULL;
unsigned char *buf;
int i;
i=a2d_ASN1_OBJECT(NULL,0,oid,-1);
if (i <= 0) return(0);
if ((buf=(unsigned char *)OPENSSL_malloc(i)) == NULL)
{
OBJerr(OBJ_F_OBJ_CREATE,ERR_R_MALLOC_FAILURE);
return(0);
}
i=a... | 0 | [
"CWE-200"
] | openssl | 0042fb5fd1c9d257d713b15a1f45da05cf5c1c87 | 188,188,738,992,891,200,000,000,000,000,000,000,000 | 27 | Fix OID handling:
- Upon parsing, reject OIDs with invalid base-128 encoding.
- Always NUL-terminate the destination buffer in OBJ_obj2txt printing function.
CVE-2014-3508
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org> |
void simpleExpandTo(const string& label, unsigned int frompos, string& ret)
{
unsigned int labellen=0;
while((labellen=(unsigned char)label.at(frompos++))) {
ret.append(label.c_str()+frompos, labellen);
ret.append(1,'.');
frompos+=labellen;
}
} | 0 | [
"CWE-399"
] | pdns | adb10be102ddd4d2baf7a8adbb5673946fe5e555 | 284,777,384,077,176,400,000,000,000,000,000,000,000 | 9 | fix forward reference-check in getLabelFromContent() |
static u32 cdc_ncm_check_rx_max(struct usbnet *dev, u32 new_rx)
{
struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0];
u32 val, max, min;
/* clamp new_rx to sane values */
min = USB_CDC_NCM_NTB_MIN_IN_SIZE;
max = min_t(u32, CDC_NCM_NTB_MAX_SIZE_RX, le32_to_cpu(ctx->ncm_parm.dwNtbInMaxSize));
/* dwNtbIn... | 0 | [
"CWE-703"
] | linux | 4d06dd537f95683aba3651098ae288b7cbff8274 | 115,757,659,327,661,740,000,000,000,000,000,000,000 | 22 | cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind
usbnet_link_change will call schedule_work and should be
avoided if bind is failing. Otherwise we will end up with
scheduled work referring to a netdev which has gone away.
Instead of making the call conditional, we can just defer
it to usbnet_probe, using the... |
static int mem_cgroup_move_parent(struct page *page,
struct page_cgroup *pc,
struct mem_cgroup *child,
gfp_t gfp_mask)
{
struct cgroup *cg = child->css.cgroup;
struct cgroup *pcg = cg->parent;
struct mem_cgroup *parent;
unsigned int nr_pages;
unsigned long uninitialized_var(flags);
int ret;
/*... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 154,064,659,661,096,200,000,000,000,000,000,000,000 | 45 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
static int r_cmd_java_print_json_definitions( RBinJavaObj *obj ) {
DsoJsonObj *json_obj = r_bin_java_get_bin_obj_json (obj);
char *str = dso_json_obj_to_str (json_obj);
dso_json_obj_del (json_obj); // XXX memleak
r_cons_println (str);
return true;
} | 0 | [
"CWE-703",
"CWE-193"
] | radare2 | ced0223c7a1b3b5344af315715cd28fe7c0d9ebc | 146,966,248,369,351,050,000,000,000,000,000,000,000 | 7 | Fix unmatched array length in core_java.c (issue #16304) (#16313) |
static void tipc_aead_users_inc(struct tipc_aead __rcu *aead, int lim)
{
struct tipc_aead *tmp;
rcu_read_lock();
tmp = rcu_dereference(aead);
if (tmp)
atomic_add_unless(&tmp->users, 1, lim);
rcu_read_unlock();
} | 0 | [
"CWE-20"
] | linux | fa40d9734a57bcbfa79a280189799f76c88f7bb0 | 73,613,796,713,773,600,000,000,000,000,000,000,000 | 10 | tipc: fix size validations for the MSG_CRYPTO type
The function tipc_crypto_key_rcv is used to parse MSG_CRYPTO messages
to receive keys from other nodes in the cluster in order to decrypt any
further messages from them.
This patch verifies that any supplied sizes in the message body are
valid for the received message... |
int register_blkdev(unsigned int major, const char *name)
{
struct blk_major_name **n, *p;
int index, ret = 0;
mutex_lock(&block_class_lock);
/* temporary */
if (major == 0) {
for (index = ARRAY_SIZE(major_names)-1; index > 0; index--) {
if (major_names[index] == NULL)
break;
}
if (index == 0) {
... | 0 | [
"CWE-416"
] | linux-stable | 77da160530dd1dc94f6ae15a981f24e5f0021e84 | 40,878,422,738,832,863,000,000,000,000,000,000,000 | 53 | block: fix use-after-free in seq file
I got a KASAN report of use-after-free:
==================================================================
BUG: KASAN: use-after-free in klist_iter_exit+0x61/0x70 at addr ffff8800b6581508
Read of size 8 by task trinity-c1/315
======================================... |
static void mp_wait_until_sent(struct tty_struct *tty, int timeout)
{
struct sb_uart_state *state = tty->driver_data;
struct sb_uart_port *port = state->port;
unsigned long char_time, expire;
if (port->type == PORT_UNKNOWN || port->fifosize == 0)
return;
char_time = (port->timeout - HZ/50) / port->fifosize;
c... | 0 | [
"CWE-200"
] | linux | a8b33654b1e3b0c74d4a1fed041c9aae50b3c427 | 76,053,964,937,480,450,000,000,000,000,000,000,000 | 31 | Staging: sb105x: info leak in mp_get_count()
The icount.reserved[] array isn't initialized so it leaks stack
information to userspace.
Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Li... |
cmsBool Type_LUT8_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsUInt32Number j, nTabSize;
cmsUInt8Number val;
cmsPipeline* NewLUT = (cmsPipeline*) Ptr;
cmsStage* mpe;
_cmsStageToneCurvesData* PreMPE = NULL, *PostMPE = NULL;
_cmsStageMatri... | 0 | [] | Little-CMS | 886e2f524268efe8a1c3aa838c28e446fda24486 | 243,333,874,149,370,340,000,000,000,000,000,000,000 | 103 | Fixes from coverity check |
static void xdr_buf_tail_shift_right(const struct xdr_buf *buf,
unsigned int base, unsigned int len,
unsigned int shift)
{
const struct kvec *tail = buf->tail;
if (base >= tail->iov_len || !shift || !len)
return;
xdr_buf_tail_copy_right(buf, base, len, shift);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 6d1c0f3d28f98ea2736128ed3e46821496dc3a8c | 162,782,180,096,650,040,000,000,000,000,000,000,000 | 10 | sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base()
This seems to happen fairly easily during READ_PLUS testing on NFS v4.2.
I found that we could end up accessing xdr->buf->pages[pgnr] with a pgnr
greater than the number of pages in the array. So let's just return
early if we're setting base to a poin... |
TEST(AsyncSSLSocketTest, NoClientCertHandshakeError) {
EventBase eventBase;
auto clientCtx = std::make_shared<SSLContext>();
auto serverCtx = std::make_shared<SSLContext>();
serverCtx->setVerificationOption(
SSLContext::SSLVerifyPeerEnum::VERIFY_REQ_CLIENT_CERT);
serverCtx->ciphers("ALL:!ADH:!LOW:!EXP:!... | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 214,773,780,437,472,640,000,000,000,000,000,000,000 | 33 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
static const char *getobjname (const Proto *p, int lastpc, int reg,
const char **name) {
int pc;
*name = luaF_getlocalname(p, reg + 1, lastpc);
if (*name) /* is a local? */
return "local";
/* else try symbolic execution */
pc = findsetreg(p, lastpc, reg);
if (pc != -1) { ... | 0 | [
"CWE-703"
] | lua | a2195644d89812e5b157ce7bac35543e06db05e3 | 199,954,304,700,239,500,000,000,000,000,000,000,000 | 60 | Fixed bug: invalid 'oldpc' when returning to a function
The field 'L->oldpc' is not always updated when control returns to a
function; an invalid value can seg. fault when computing 'changedline'.
(One example is an error in a finalizer; control can return to
'luaV_execute' without executing 'luaD_poscall'.) Instead o... |
static int php_htoi(char *s)
{
int value;
int c;
c = ((unsigned char *)s)[0];
if (isupper(c))
c = tolower(c);
value = (c >= '0' && c <= '9' ? c - '0' : c - 'a' + 10) * 16;
c = ((unsigned char *)s)[1];
if (isupper(c))
c = tolower(c);
value += c >= '0' && c <= '9' ? c - '0' : c - 'a' + 10;
return (value);... | 0 | [
"CWE-119"
] | php-src | e1ba58f068f4bfc8ced75bb017cd31d8beddf3c2 | 190,925,814,140,789,600,000,000,000,000,000,000,000 | 17 | Fix bug #70480 (php_url_parse_ex() buffer overflow read)
(cherry picked from commit 629e4da7cc8b174acdeab84969cbfc606a019b31) |
void reply_sesssetup_and_X(struct smb_request *req)
{
int sess_vuid;
int smb_bufsize;
DATA_BLOB lm_resp;
DATA_BLOB nt_resp;
DATA_BLOB plaintext_password;
char *tmp;
const char *user;
fstring sub_user; /* Sainitised username for substituion */
const char *domain;
const char *native_os;
const char *native_lanm... | 0 | [
"CWE-119"
] | samba | 9280051bfba337458722fb157f3082f93cbd9f2b | 230,779,417,927,762,940,000,000,000,000,000,000,000 | 445 | s3: Fix an uninitialized variable read
Found by Laurent Gaffie <laurent.gaffie@gmail.com>
Thanks for that,
Volker
Fix bug #7254 (An uninitialized variable read could cause an smbd crash). |
PJ_DEF(pj_status_t) pjsip_auth_clt_reinit_req( pjsip_auth_clt_sess *sess,
const pjsip_rx_data *rdata,
pjsip_tx_data *old_request,
pjsip_tx_data **new_request )
{
pjsip_tx_data *tdata;
const pjsip_hdr *hdr;
unsigned chal_cnt, auth_cnt;
pjsip_via_hdr *via;
pj_status_t status;
pj_... | 0 | [
"CWE-120",
"CWE-787"
] | pjproject | d27f79da11df7bc8bb56c2f291d71e54df8d2c47 | 219,864,015,608,242,760,000,000,000,000,000,000,000 | 130 | Use PJ_ASSERT_RETURN() on pjsip_auth_create_digest() and pjsua_init_tpselector() (#3009)
* Use PJ_ASSERT_RETURN on pjsip_auth_create_digest
* Use PJ_ASSERT_RETURN on pjsua_init_tpselector()
* Fix incorrect check.
* Add return value to pjsip_auth_create_digest() and pjsip_auth_create_digestSHA256()
* Modifi... |
http_start_data (http_t hd)
{
if (!hd->in_data)
{
if (opt_debug || (hd->flags & HTTP_FLAG_LOG_RESP))
log_debug_with_string ("\r\n", "http.c:request-header:");
es_fputs ("\r\n", hd->fp_write);
es_fflush (hd->fp_write);
hd->in_data = 1;
}
else
es_fflush (hd->fp_write);
} | 0 | [
"CWE-352"
] | gnupg | 4a4bb874f63741026bd26264c43bb32b1099f060 | 179,638,087,063,025,060,000,000,000,000,000,000,000 | 13 | dirmngr: Avoid possible CSRF attacks via http redirects.
* dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path.
(http_redir_info_t): New.
* dirmngr/http.c (do_parse_uri): Set new fields.
(same_host_p): New.
(http_prepare_redirect): New.
* dirmngr/t-http-basic.c: New test.
* dirmngr/ks-engine-hkp.c (send_re... |
static int xattr_map_client(const struct lo_data *lo, const char *client_name,
char **out_name)
{
size_t i;
for (i = 0; i < lo->xattr_map_nentries; i++) {
const XattrMapEntry *cur_entry = lo->xattr_map_list + i;
if ((cur_entry->flags & XATTR_MAP_FLAG_CLIENT) &&
... | 0 | [
"CWE-273"
] | qemu | 449e8171f96a6a944d1f3b7d3627ae059eae21ca | 211,764,027,001,157,150,000,000,000,000,000,000,000 | 33 | virtiofsd: Drop membership of all supplementary groups (CVE-2022-0358)
At the start, drop membership of all supplementary groups. This is
not required.
If we have membership of "root" supplementary group and when we switch
uid/gid using setresuid/setsgid, we still retain membership of existing
supplemntary groups. An... |
bool CmdLine::store( const std::vector<std::string>& argv,
boost::program_options::options_description& visible,
boost::program_options::options_description& hidden,
boost::program_options::positional_options_description& positional,
... | 0 | [
"CWE-20"
] | mongo | f9817a6cf64bdba8e1e1cef30a798110df746b58 | 49,691,864,672,988,740,000,000,000,000,000,000,000 | 272 | SERVER-7769 - turn objcheck on by default and use new fast bson validate |
static int xudc_pullup(struct usb_gadget *gadget, int is_on)
{
struct xusb_udc *udc = to_udc(gadget);
unsigned long flags;
u32 crtlreg;
spin_lock_irqsave(&udc->lock, flags);
crtlreg = udc->read_fn(udc->addr + XUSB_CONTROL_OFFSET);
if (is_on)
crtlreg |= XUSB_CONTROL_USB_READY_MASK;
else
crtlreg &= ~XUSB_CON... | 0 | [
"CWE-20",
"CWE-129"
] | linux | 7f14c7227f342d9932f9b918893c8814f86d2a0d | 188,389,347,558,577,930,000,000,000,000,000,000,000 | 20 | USB: gadget: validate endpoint index for xilinx udc
Assure that host may not manipulate the index to point
past endpoint array.
Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
static void ev_ngh2_done(h2_proxy_session *session, int arg, const char *msg)
{
switch (session->state) {
case H2_PROXYS_ST_DONE:
/* nop */
break;
default:
transit(session, "nghttp2 done", H2_PROXYS_ST_DONE);
break;
}
} | 0 | [
"CWE-770"
] | mod_h2 | dd05d49abe0f67512ce9ed5ba422d7711effecfb | 248,158,292,639,317,700,000,000,000,000,000,000,000 | 11 | * fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now,
mpm event backport to 2.4.x up for vote).
* Fixes stream cleanup when connection throttling is in place.
* Counts stream resets by client on streams initiated by client as cause
for connection throttling.
* Header length checks are no... |
static void tcp_undo_cwnd_reduction(struct sock *sk, bool unmark_loss)
{
struct tcp_sock *tp = tcp_sk(sk);
if (unmark_loss) {
struct sk_buff *skb;
tcp_for_write_queue(skb, sk) {
if (skb == tcp_send_head(sk))
break;
TCP_SKB_CB(skb)->sacked &= ~TCPCB_LOST;
}
tp->lost_out = 0;
tcp_clear_all_retrans... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 95,181,780,137,047,340,000,000,000,000,000,000,000 | 34 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static inline bool cpu_has_vmx_pml(void)
{
return vmcs_config.cpu_based_2nd_exec_ctrl & SECONDARY_EXEC_ENABLE_PML;
} | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 295,994,276,174,823,820,000,000,000,000,000,000,000 | 4 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
mono_image_basic_init (MonoReflectionAssemblyBuilder *assemblyb)
{
MonoDynamicAssembly *assembly;
MonoDynamicImage *image;
MonoDomain *domain = mono_object_domain (assemblyb);
MONO_ARCH_SAVE_REGS;
if (assemblyb->dynamic_assembly)
return;
#if HAVE_BOEHM_GC
assembly = assemblyb->dynamic_assembly = GC_MALLOC (... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 205,885,744,657,895,100,000,000,000,000,000,000,000 | 73 | 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 |
BGD_DECLARE(int) gdTransformAffineGetImage(gdImagePtr *dst,
const gdImagePtr src,
gdRectPtr src_area,
const double affine[6])
{
int res;
double m[6];
gdRect bbox;
gdRect area_full;
if (src_area == NULL) {
area_full.x = 0;
area_full.y = 0;
area_full.width = gdImageSX(src);
area_full.height = g... | 0 | [
"CWE-125",
"CWE-191"
] | libgd | 60bfb401ad5a4a8ae995dcd36372fe15c71e1a35 | 229,025,715,219,169,400,000,000,000,000,000,000,000 | 50 | Fix potential unsigned underflow
No need to decrease `u`, so we don't do it. While we're at it, we also factor
out the overflow check of the loop, what improves performance and readability.
This issue has been reported by Stefan Esser to security@libgd.org. |
int main(int argc, char **argv)
{
for (int i = 1; i < argc; i++)
{
PointerHolder<unsigned char> file_buf;
size_t size = 0;
read_file_into_memory(argv[i], file_buf, size);
LLVMFuzzerTestOneInput(file_buf.getPointer(), size);
std::cout << argv[i] << " successful" << std::en... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 331,083,479,022,540,800,000,000,000,000,000,000,000 | 12 | 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 ... |
int _ma_killed_ptr(HA_CHECK *param)
{
if (likely(thd_killed((THD*)param->thd)) == 0)
return 0;
my_errno= HA_ERR_ABORTED_BY_USER;
return 1;
} | 0 | [
"CWE-400"
] | server | 9e39d0ae44595dbd1570805d97c9c874778a6be8 | 107,680,117,150,164,940,000,000,000,000,000,000,000 | 7 | MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields
fix a debug assert to account for not opened temp tables |
size_t IOBufHash::operator()(const IOBuf& buf) const noexcept {
folly::hash::SpookyHashV2 hasher;
hasher.Init(0, 0);
io::Cursor cursor(&buf);
for (;;) {
auto b = cursor.peekBytes();
if (b.empty()) {
break;
}
hasher.Update(b.data(), b.size());
cursor.skip(b.size());
}
uint64_t h1;
... | 0 | [
"CWE-787"
] | folly | 4f304af1411e68851bdd00ef6140e9de4616f7d3 | 301,387,347,514,731,070,000,000,000,000,000,000,000 | 17 | [folly] Add additional overflow checks to IOBuf - CVE-2021-24036
Summary:
As per title
CVE-2021-24036
Reviewed By: jan
Differential Revision: D27938605
fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c |
void *hns_gmac_config(struct hns_mac_cb *mac_cb, struct mac_params *mac_param)
{
struct mac_driver *mac_drv;
mac_drv = devm_kzalloc(mac_cb->dev, sizeof(*mac_drv), GFP_KERNEL);
if (!mac_drv)
return NULL;
mac_drv->mac_init = hns_gmac_init;
mac_drv->mac_enable = hns_gmac_enable;
mac_drv->mac_disable = hns_gmac_d... | 0 | [
"CWE-119",
"CWE-703"
] | linux | 412b65d15a7f8a93794653968308fc100f2aa87c | 181,361,502,997,781,800,000,000,000,000,000,000,000 | 43 | net: hns: fix ethtool_get_strings overflow in hns driver
hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated
is not enough for ethtool_get_strings(), which will cause random memory
corruption.
When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the
the following can be observed ... |
static int asn1_template_noexp_d2i(ASN1_VALUE **val,
const unsigned char **in, long len,
const ASN1_TEMPLATE *tt, char opt,
ASN1_TLC *ctx)
{
int flags, aclass;
int ret;
ASN1_VALUE *tval;
const unsign... | 1 | [
"CWE-400",
"CWE-674",
"CWE-787"
] | openssl | 2ac4c6f7b2b2af20c0e2b0ba05367e454cd11b33 | 335,401,726,489,976,700,000,000,000,000,000,000,000 | 130 | Limit ASN.1 constructed types recursive definition depth
Constructed types with a recursive definition (such as can be found in
PKCS7) could eventually exceed the stack given malicious input with
excessive recursion. Therefore we limit the stack depth.
CVE-2018-0739
Credit to OSSFuzz for finding this issue.
Reviewe... |
cleanup(struct archive_read *a)
{
struct mtree *mtree;
struct mtree_entry *p, *q;
mtree = (struct mtree *)(a->format->data);
p = mtree->entries;
while (p != NULL) {
q = p->next;
free(p->name);
free_options(p->options);
free(p);
p = q;
}
archive_string_free(&mtree->line);
archive_string_free(&mtree->... | 0 | [
"CWE-476",
"CWE-119"
] | libarchive | a550daeecf6bc689ade371349892ea17b5b97c77 | 266,763,037,002,615,500,000,000,000,000,000,000,000 | 25 | Fix libarchive/archive_read_support_format_mtree.c:1388:11: error: array subscript is above array bounds |
int RGWHandler::error_handler(int err_no, string *error_content) {
// This is the do-nothing error handler
return err_no;
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 261,135,273,396,462,670,000,000,000,000,000,000,000 | 4 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
invalid_range(exarg_T *eap)
{
buf_T *buf;
if ( eap->line1 < 0
|| eap->line2 < 0
|| eap->line1 > eap->line2)
return _(e_invalid_range);
if (eap->argt & EX_RANGE)
{
switch (eap->addr_type)
{
case ADDR_LINES:
if (eap->line2 > curbuf->b_ml.ml_line_count
#ifdef FEAT_DIFF
+ ... | 0 | [
"CWE-122"
] | vim | 35a319b77f897744eec1155b736e9372c9c5575f | 319,000,031,717,783,300,000,000,000,000,000,000,000 | 86 | patch 8.2.3489: ml_get error after search with range
Problem: ml_get error after search with range.
Solution: Limit the line number to the buffer line count. |
static Quantum ApplyFunction(Quantum pixel,const MagickFunction function,
const size_t number_parameters,const double *parameters,
ExceptionInfo *exception)
{
double
result;
ssize_t
i;
(void) exception;
result=0.0;
switch (function)
{
case PolynomialFunction:
{
/*
Polynom... | 0 | [] | ImageMagick | 4717744e4bb27de8ea978e51c6d5bcddf62ffe49 | 67,328,351,938,312,050,000,000,000,000,000,000,000 | 97 | https://github.com/ImageMagick/ImageMagick/issues/3332 |
ar6000_disconnect(struct ar6_softc *ar)
{
if ((ar->arConnected == true) || (ar->arConnectPending == true)) {
wmi_disconnect_cmd(ar->arWmi);
/*
* Disconnect cmd is issued, clear connectPending.
* arConnected will be cleard in disconnect_event notification.
*/
ar->a... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 85,754,716,861,559,680,000,000,000,000,000,000,000 | 13 | 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... |
gs_gstate_putdeviceparams(gs_gstate *pgs, gx_device *dev, gs_param_list *plist)
{
int code;
gx_device *dev2;
if (dev)
dev2 = dev;
else
dev2 = pgs->device;
code = gs_putdeviceparams(dev2, plist);
if (code >= 0)
gs_gstate_update_device(pgs, dev2);
return code;
} | 0 | [] | ghostpdl | 79cccf641486a6595c43f1de1cd7ade696020a31 | 172,728,993,213,450,700,000,000,000,000,000,000,000 | 15 | Bug 699654(2): preserve LockSafetyParams in the nulldevice
The nulldevice does not necessarily use the normal setpagedevice machinery,
but can be set using the nulldevice operator. In which case, we don't preserve
the settings from the original device (in the way setpagedevice does).
Since nulldevice does nothing, th... |
static int kvm_write_guest_virt_system(gva_t addr, void *val,
unsigned int bytes,
struct kvm_vcpu *vcpu,
struct x86_exception *exception)
{
void *data = val;
int r = X86EMUL_CONTINUE;
while (bytes) {
gpa_t gpa = vcpu->arch.walk_mmu->gva_to_gpa(vcpu, addr,
PFERR_WRITE_... | 0 | [
"CWE-362",
"CWE-401"
] | linux | fc3a9157d3148ab91039c75423da8ef97be3e105 | 227,509,147,268,044,000,000,000,000,000,000,000,000 | 31 | KVM: X86: Don't report L2 emulation failures to user-space
This patch prevents that emulation failures which result
from emulating an instruction for an L2-Guest results in
being reported to userspace.
Without this patch a malicious L2-Guest would be able to
kill the L1 by triggering a race-condition between an vmexit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.