func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
qqueueEnqObj(qqueue_t *pThis, flowControl_t flowCtlType, void *pUsr)
{
DEFiRet;
int iCancelStateSave;
ISOBJ_TYPE_assert(pThis, qqueue);
if(pThis->qType != QUEUETYPE_DIRECT) {
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &iCancelStateSave);
d_pthread_mutex_lock(pThis->mut);
}
CHKiRet(doEnqSingleObj(pThis,... | 0 | [
"CWE-772"
] | rsyslog | dfa88369d4ca4290db56b843f9eabdae1bfe0fd5 | 280,729,780,790,118,350,000,000,000,000,000,000,000 | 28 | bugfix: memory leak when $RepeatedMsgReduction on was used
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=225 |
static inline void ipgre_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb)
{
if (INET_ECN_is_ce(iph->tos)) {
if (skb->protocol == htons(ETH_P_IP)) {
IP_ECN_set_ce(ip_hdr(skb));
} else if (skb->protocol == htons(ETH_P_IPV6)) {
IP6_ECN_set_ce(ipv6_hdr(skb));
}
}
} | 0 | [] | linux-2.6 | c2892f02712e9516d72841d5c019ed6916329794 | 266,562,437,947,021,700,000,000,000,000,000,000,000 | 10 | gre: fix netns vs proto registration ordering
GRE protocol receive hook can be called right after protocol addition is done.
If netns stuff is not yet initialized, we're going to oops in
net_generic().
This is remotely oopsable if ip_gre is compiled as module and packet
comes at unfortunate moment of module loading.
... |
static struct nfs_page * nfs_setup_write_request(struct nfs_open_context* ctx,
struct page *page, unsigned int offset, unsigned int bytes)
{
struct inode *inode = page_file_mapping(page)->host;
struct nfs_page *req;
req = nfs_try_to_update_request(inode, page, offset, bytes);
if (req != NULL)
goto out;
req = ... | 0 | [] | linux | c7559663e42f4294ffe31fe159da6b6a66b35d61 | 78,554,636,387,444,880,000,000,000,000,000,000,000 | 16 | NFS: Allow nfs_updatepage to extend a write under additional circumstances
Currently nfs_updatepage allows a write to be extended to cover a full
page only if we don't have a byte range lock lock on the file... but if
we have a write delegation on the file or if we have the whole file
locked for writing then we should... |
xsltNewStyleDocument(xsltStylesheetPtr style, xmlDocPtr doc) {
xsltDocumentPtr cur;
cur = (xsltDocumentPtr) xmlMalloc(sizeof(xsltDocument));
if (cur == NULL) {
xsltTransformError(NULL, style, (xmlNodePtr) doc,
"xsltNewStyleDocument : malloc failed\n");
return(NULL);
}
memset(cur, 0, sizeof(xslt... | 0 | [] | libxslt | e03553605b45c88f0b4b2980adfbbb8f6fca2fd6 | 190,836,947,349,964,850,000,000,000,000,000,000,000 | 17 | Fix security framework bypass
xsltCheckRead and xsltCheckWrite return -1 in case of error but callers
don't check for this condition and allow access. With a specially
crafted URL, xsltCheckRead could be tricked into returning an error
because of a supposedly invalid URL that would still be loaded
succesfully later on... |
AP_DECLARE(const char *) ap_get_remote_logname(request_rec *r)
{
if (r->connection->remote_logname != NULL) {
return r->connection->remote_logname;
}
if (ident_lookup) {
return ident_lookup(r);
}
return NULL;
} | 0 | [
"CWE-416",
"CWE-284"
] | httpd | 4cc27823899e070268b906ca677ee838d07cf67a | 326,590,590,632,819,400,000,000,000,000,000,000,000 | 12 | core: Disallow Methods' registration at run time (.htaccess), they may be
used only if registered at init time (httpd.conf).
Calling ap_method_register() in children processes is not the right scope
since it won't be shared for all requests.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7... |
Status ShapeRefiner::SetShape(const Node* node, int output_port,
ShapeHandle shape) {
auto c = GetContext(node);
if (c == nullptr) {
return errors::Internal("Could not find context for ", node->name());
}
if (output_port < 0 || output_port >= node->num_outputs()) {
return ... | 0 | [
"CWE-416",
"CWE-369"
] | tensorflow | ee119d4a498979525046fba1c3dd3f13a039fbb1 | 103,262,588,316,081,340,000,000,000,000,000,000,000 | 32 | Fix segmentation fault in shape inference logic.
When running shape functions, some functions (such as `MutableHashTableShape`)
produce extra output information in the form of a `ShapeAndType` struct. The
shapes embedded in this struct are owned by an inference context that is
cleaned up almost immediately; if the up... |
int SFDWrite(char *filename,SplineFont *sf,EncMap *map,EncMap *normal,int todir) {
FILE *sfd;
int i, gc;
char *tempfilename = filename;
int err = false;
if ( todir ) {
SFDirClean(filename);
GFileMkDir(filename, 0755); /* this will fail if directory already exists. That's ok */
tempfilename = ma... | 0 | [
"CWE-416"
] | fontforge | 048a91e2682c1a8936ae34dbc7bd70291ec05410 | 108,477,598,317,903,330,000,000,000,000,000,000,000 | 38 | Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function
Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function
Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function
Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many
other potential issues (... |
static time_t asn1_time_to_time_t(ASN1_UTCTIME * timestr TSRMLS_DC) /* {{{ */
{
/*
This is how the time string is formatted:
snprintf(p, sizeof(p), "%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100,
ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
*/
time_t ret;
struct tm thetime;
char * strbuf;
c... | 0 | [
"CWE-754"
] | php-src | 89637c6b41b510c20d262c17483f582f115c66d6 | 182,527,147,579,154,600,000,000,000,000,000,000,000 | 90 | Fix bug #74651 - check EVP_SealInit as it can return -1 |
int iscsi_session_get_param(struct iscsi_cls_session *cls_session,
enum iscsi_param param, char *buf)
{
struct iscsi_session *session = cls_session->dd_data;
int len;
switch(param) {
case ISCSI_PARAM_FAST_ABORT:
len = sprintf(buf, "%d\n", session->fast_abort);
break;
case ISCSI_PARAM_ABORT_TMO:
len =... | 1 | [
"CWE-787"
] | linux | ec98ea7070e94cc25a422ec97d1421e28d97b7ee | 251,760,917,559,417,970,000,000,000,000,000,000,000 | 134 | scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
As the iSCSI parameters are exported back through sysfs, it should be
enforcing that they never are more than PAGE_SIZE (which should be more
than enough) before accepting updates through netlink.
Change all iSCSI sysfs attributes to use sysfs_emit().
Cc:... |
static void k_brl(struct vc_data *vc, unsigned char value, char up_flag)
{
static unsigned pressed, committing;
static unsigned long releasestart;
if (kbd->kbdmode != VC_UNICODE) {
if (!up_flag)
pr_warn("keyboard mode must be unicode for braille patterns\n");
return;
}
if (!value) {
k_unicode(vc, BRL_UC... | 0 | [
"CWE-416"
] | linux | 6ca03f90527e499dd5e32d6522909e2ad390896b | 304,758,669,291,322,980,000,000,000,000,000,000,000 | 43 | vt: keyboard, simplify vt_kdgkbsent
Use 'strlen' of the string, add one for NUL terminator and simply do
'copy_to_user' instead of the explicit 'for' loop. This makes the
KDGKBSENT case more compact.
The only thing we need to take care about is NULL 'func_table[i]'. Use
an empty string in that case.
The original che... |
bool InMatchExpression::matchesSingleElement(const BSONElement& e, MatchDetails* details) const {
if (_hasNull && e.eoo()) {
return true;
}
if (contains(e)) {
return true;
}
for (auto&& regex : _regexes) {
if (regex->matchesSingleElement(e, details)) {
return true... | 0 | [
"CWE-190"
] | mongo | 21d8699ed6c517b45e1613e20231cd8eba894985 | 325,779,852,092,917,200,000,000,000,000,000,000,000 | 14 | SERVER-43699 $mod should not overflow for large negative values |
void pmixp_coll_ring_reset_if_to(pmixp_coll_t *coll, time_t ts) {
pmixp_coll_ring_ctx_t *coll_ctx;
int i;
/* lock the structure */
slurm_mutex_lock(&coll->lock);
for (i = 0; i < PMIXP_COLL_RING_CTX_NUM; i++) {
coll_ctx = &coll->state.ring.ctx_array[i];
if (!coll_ctx->in_use ||
(PMIXP_COLL_RING_SYNC == c... | 0 | [
"CWE-120"
] | slurm | c3142dd87e06621ff148791c3d2f298b5c0b3a81 | 51,282,935,475,251,870,000,000,000,000,000,000,000 | 27 | PMIx - fix potential buffer overflows from use of unpackmem().
CVE-2020-27745. |
TPMS_ALG_PROPERTY_Unmarshal(TPMS_ALG_PROPERTY *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
if (rc == TPM_RC_SUCCESS) {
rc = TPM_ALG_ID_Unmarshal(&target->alg, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
rc = TPMA_ALGORITHM_Unmarshal(&target->algProperties, buffer, size);
... | 0 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 126,641,854,316,598,760,000,000,000,000,000,000,000 | 12 | tpm2: Restore original value if unmarshalled value was illegal
Restore the original value of the memory location where data from
a stream was unmarshalled and the unmarshalled value was found to
be illegal. The goal is to not keep illegal values in memory.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
compilePassOpcode(const FileInfo *file, TranslationTableOpcode opcode, int noback,
int nofor, TranslationTableHeader **table) {
static CharsString passRuleChars;
static CharsString passRuleDots;
/* Compile the operands of a pass opcode */
widechar passSubOp;
const CharacterClass *class;
TranslationTableRule *ru... | 0 | [
"CWE-787"
] | liblouis | 2e4772befb2b1c37cb4b9d6572945115ee28630a | 312,915,430,097,009,240,000,000,000,000,000,000,000 | 449 | Prevent an invalid memory writes in compileRule
Thanks to Han Zheng for reporting it
Fixes #1214 |
rbtk_EventSetupProc(ClientData clientData, int flag)
{
Tcl_Time tcl_time;
tcl_time.sec = 0;
tcl_time.usec = 1000L * (long)no_event_tick;
Tcl_SetMaxBlockTime(&tcl_time);
} | 0 | [] | tk | ebd0fc80d62eeb7b8556522256f8d035e013eb65 | 268,187,666,943,638,700,000,000,000,000,000,000,000 | 7 | tcltklib.c: check argument
* ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and
length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
z_streamp strm;
int good_length;
int max_lazy;
int nice_length;
int max_chain;
{
deflate_state *s;
if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
s = strm->state;
s->good_match = (uInt)good_length;
... | 0 | [
"CWE-284",
"CWE-787"
] | zlib | 5c44459c3b28a9bd3283aaceab7c615f8020c531 | 28,866,034,578,321,216,000,000,000,000,000,000,000 | 17 | Fix a bug that can crash deflate on some input when using Z_FIXED.
This bug was reported by Danilo Ramos of Eideticom, Inc. It has
lain in wait 13 years before being found! The bug was introduced
in zlib 1.2.2.2, with the addition of the Z_FIXED option. That
option forces the use of fixed Huffman codes. For rare input... |
static int cardos_finish(sc_card_t *card)
{
int r = 0;
if (card == NULL )
return 0;
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
/* free priv data */
if (card->drv_data) { /* priv */
free(card->drv_data);
card->drv_data = NULL;
}
SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_VERBOSE, r);
} | 0 | [] | OpenSC | 1252aca9f10771ef5ba8405e73cf2da50827958f | 244,173,873,168,509,100,000,000,000,000,000,000,000 | 17 | cardos: Correctly calculate the left bytes to avoid buffer overrun
Thanks oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29912 |
static int getDepth(const std::shared_ptr<SerializedScope> chain) {
int depth = 0;
const SerializedScope *current = chain.get();
while (current) {
depth += 1;
current = current->parentScope.get();
}
return depth;
} | 0 | [
"CWE-125",
"CWE-787"
] | hermes | 091835377369c8fd5917d9b87acffa721ad2a168 | 141,036,847,685,002,110,000,000,000,000,000,000,000 | 9 | Correctly restore whether or not a function is an inner generator
Summary:
If a generator was large enough to be lazily compiled, we would lose
that information when reconstituting the function's context. This meant
the function was generated as a regular function instead of a generator.
#utd-hermes-ignore-android
R... |
FLAC__bool read_subframe_constant_(FLAC__StreamDecoder *decoder, unsigned channel, unsigned bps, FLAC__bool do_full_decode)
{
FLAC__Subframe_Constant *subframe = &decoder->private_->frame.subframes[channel].data.constant;
FLAC__int32 x;
unsigned i;
FLAC__int32 *output = decoder->private_->output[channel];
decoder... | 0 | [
"CWE-119"
] | flac | 5b3033a2b355068c11fe637e14ac742d273f076e | 15,708,358,965,292,940,000,000,000,000,000,000,000 | 22 | src/libFLAC/stream_decoder.c : Fix buffer read overflow.
This is CVE-2014-8962.
Reported-by: Michele Spagnuolo,
Google Security Team <mikispag@google.com> |
TPM_RESULT SWTPM_NVRAM_Store_Volatile(void)
{
TPM_RESULT rc = 0;
char *name = TPM_VOLATILESTATE_NAME;
uint32_t tpm_number = 0;
unsigned char *buffer = NULL;
uint32_t buflen;
TPM_DEBUG(" SWTPM_Store_Volatile: Name %s\n", name);
if (rc == 0) {
rc = TPMLIB_Vo... | 0 | [] | swtpm | cae5991423826f21b11f7a5bc7f7b2b538bde2a2 | 207,318,545,930,582,670,000,000,000,000,000,000,000 | 21 | swtpm: Do not follow symlinks when opening lockfile (CVE-2020-28407)
This patch addresses CVE-2020-28407.
Prevent us from following symliks when we open the lockfile
for writing.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
utf32le_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED)
{
if (end - p < 4) return 0;
return (OnigCodePoint )(((p[3] * 256 + p[2]) * 256 + p[1]) * 256 + p[0]);
} | 0 | [
"CWE-125"
] | php-src | 9d6c59eeea88a3e9d7039cb4fed5126ef704593a | 308,873,503,644,618,030,000,000,000,000,000,000 | 5 | Fix bug #77418 - Heap overflow in utf32be_mbc_to_code |
static Bool ttml_check_range(TTMLInterval *interval, s64 ts_begin, s64 ts_end)
{
//if in current interval, push node
if ((ts_begin != -1) && (ts_end != -1) && ((ts_begin>=interval->begin) && (ts_end<=interval->end))
) {
return GF_TRUE;
}
//begin not set, end set: in range if end less than interval end range
els... | 0 | [
"CWE-276"
] | gpac | 96699aabae042f8f55cf8a85fa5758e3db752bae | 148,530,419,523,844,860,000,000,000,000,000,000,000 | 17 | fixed #2061 |
evdev_tag_tablet_touchpad(struct evdev_device *device)
{
device->tags |= EVDEV_TAG_TABLET_TOUCHPAD;
} | 0 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 221,313,105,660,788,900,000,000,000,000,000,000,000 | 4 | evdev: strip the device name of format directives
This fixes a format string vulnerabilty.
evdev_log_message() composes a format string consisting of a fixed
prefix (including the rendered device name) and the passed-in format
buffer. This format string is then passed with the arguments to the
actual log handler, whi... |
static void parse_fpe(struct pt_regs *regs)
{
int code = 0;
flush_fp_to_thread(current);
code = __parse_fpscr(current->thread.fp_state.fpscr);
_exception(SIGFPE, regs, code, regs->nip);
} | 0 | [] | linux | 5d176f751ee3c6eededd984ad409bff201f436a7 | 128,426,823,249,689,540,000,000,000,000,000,000,000 | 10 | powerpc: tm: Enable transactional memory (TM) lazily for userspace
Currently the MSR TM bit is always set if the hardware is TM capable.
This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and
TFAIR) must be swapped for each process regardless of if they use TM.
For processes that don't use TM the TM MSR ... |
void kvm_free_physmem(struct kvm *kvm)
{
int i;
struct kvm_memslots *slots = kvm->memslots;
for (i = 0; i < slots->nmemslots; ++i)
kvm_free_physmem_slot(&slots->memslots[i], NULL);
kfree(kvm->memslots);
} | 0 | [
"CWE-20",
"CWE-787"
] | linux | fa3d315a4ce2c0891cdde262562e710d95fba19e | 206,230,908,987,673,300,000,000,000,000,000,000,000 | 10 | KVM: Validate userspace_addr of memslot when registered
This way, we can avoid checking the user space address many times when
we read the guest memory.
Although we can do the same for write if we check which slots are
writable, we do not care write now: reading the guest memory happens
more often than writing.
[avi... |
struct sctp_chunk *sctp_make_datafrag_empty(struct sctp_association *asoc,
const struct sctp_sndrcvinfo *sinfo,
int data_len, __u8 flags, __u16 ssn)
{
struct sctp_chunk *retval;
struct sctp_datahdr dp;
int chunk_len;
/* We assign the TSN as LATE as possible, not here when
* creating the chu... | 0 | [
"CWE-20",
"CWE-399"
] | linux | 9de7922bc709eee2f609cd01d98aaedc4cf5ea74 | 45,836,706,730,831,180,000,000,000,000,000,000,000 | 33 | net: sctp: fix skb_over_panic when receiving malformed ASCONF chunks
Commit 6f4c618ddb0 ("SCTP : Add paramters validity check for
ASCONF chunk") added basic verification of ASCONF chunks, however,
it is still possible to remotely crash a server by sending a
special crafted ASCONF chunk, even up to pre 2.6.12 kernels:
... |
static int csnmp_init(void) {
call_snmp_init_once();
return (0);
} /* int csnmp_init */ | 0 | [
"CWE-415"
] | collectd | d16c24542b2f96a194d43a73c2e5778822b9cb47 | 189,067,800,403,932,970,000,000,000,000,000,000,000 | 5 | snmp plugin: Fix double free of request PDU
snmp_sess_synch_response() always frees request PDU, in both case of request
error and success. If error condition occurs inside of `while (status == 0)`
loop, double free of `req` happens.
Issue: #2291
Signed-off-by: Florian Forster <octo@collectd.org> |
static int hdr_validate_crypt_segment(struct crypt_device *cd,
json_object *jobj, const char *key, json_object *jobj_digests,
uint64_t offset __attribute__((unused)), uint64_t size)
{
json_object *jobj_ivoffset, *jobj_sector_size, *jobj_integrity;
uint32_t sector_size;
uint64_t ivoffset;
if (!(... | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 119,870,907,509,649,260,000,000,000,000,000,000,000 | 48 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
leaving_window(win_T *win)
{
// Only matters for a prompt window.
if (!bt_prompt(win->w_buffer))
return;
// When leaving a prompt window stop Insert mode and perhaps restart
// it when entering that window again.
win->w_buffer->b_prompt_insert = restart_edit;
if (restart_edit != 0 && mode_disp... | 0 | [
"CWE-416"
] | vim | ec66c41d84e574baf8009dbc0bd088d2bc5b2421 | 284,800,429,554,741,300,000,000,000,000,000,000,000 | 23 | patch 8.1.2136: using freed memory with autocmd from fuzzer
Problem: using freed memory with autocmd from fuzzer. (Dhiraj Mishra,
Dominique Pelle)
Solution: Avoid using "wp" after autocommands. (closes #5041) |
nautilus_file_is_in_trash (NautilusFile *file)
{
g_assert (NAUTILUS_IS_FILE (file));
return nautilus_directory_is_in_trash (file->details->directory);
} | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 71,826,959,305,012,230,000,000,000,000,000,000,000 | 6 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
CURLcode Curl_posttransfer(struct Curl_easy *data)
{
#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(HAVE_MSG_NOSIGNAL)
/* restore the signal handler for SIGPIPE before we get back */
if(!data->set.no_signal)
signal(SIGPIPE, data->state.prev_signal);
#else
(void)data; /* unused parameter */
#endif
... | 0 | [
"CWE-200"
] | curl | 7214288898f5625a6cc196e22a74232eada7861c | 162,747,739,079,201,390,000,000,000,000,000,000,000 | 12 | transfer: strip credentials from the auto-referer header field
Added test 2081 to verify.
CVE-2021-22876
Bug: https://curl.se/docs/CVE-2021-22876.html |
void addReplyError(client *c, const char *err) {
addReplyErrorLength(c,err,strlen(err));
} | 0 | [
"CWE-254"
] | redis | 874804da0c014a7d704b3d285aa500098a931f50 | 309,529,162,332,573,050,000,000,000,000,000,000,000 | 3 | Security: Cross Protocol Scripting protection.
This is an attempt at mitigating problems due to cross protocol
scripting, an attack targeting services using line oriented protocols
like Redis that can accept HTTP requests as valid protocol, by
discarding the invalid parts and accepting the payloads sent, for
example, ... |
bool DecimalQuantity::hasIntegerValue() const {
return scale >= 0;
} | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 148,085,897,714,957,800,000,000,000,000,000,000,000 | 3 | ICU-20246 Fixing another integer overflow in number parsing. |
TiledInputFile::setFrameBuffer (const FrameBuffer &frameBuffer)
{
Lock lock (*_data->_streamData);
//
// Set the frame buffer
//
//
// Check if the new frame buffer descriptor is
// compatible with the image file header.
//
const ChannelList &channels = _data->header.channels();
... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 66,216,776,796,868,640,000,000,000,000,000,000,000 | 116 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
TEST_P(Http2UpstreamIntegrationTest, Retry) { testRetry(); } | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 54,959,061,249,776,360,000,000,000,000,000,000,000 | 1 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static int pegasus_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
{
__u16 *data = (__u16 *) &rq->ifr_ifru;
pegasus_t *pegasus = netdev_priv(net);
int res;
switch (cmd) {
case SIOCDEVPRIVATE:
data[0] = pegasus->phy;
case SIOCDEVPRIVATE + 1:
read_mii_word(pegasus, data[0], data[1] & 0x1f, &data[3]);
... | 0 | [
"CWE-119",
"CWE-284"
] | linux | 5593523f968bc86d42a035c6df47d5e0979b5ace | 117,531,444,817,946,260,000,000,000,000,000,000,000 | 24 | pegasus: Use heap buffers for all register access
Allocating USB buffers on the stack is not portable, and no longer
works on x86_64 (with VMAP_STACK enabled as per default).
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
References: https://bugs.debian.org/852556
Reported-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@... |
bool CModule::OnBoot() { return true; } | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 69,381,603,867,751,580,000,000,000,000,000,000,000 | 1 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
explicit SSLAcceptFiberRunner(EventBase* evb) : SSLAcceptEvbRunner(evb) {} | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 150,165,526,721,077,710,000,000,000,000,000,000,000 | 1 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
static void msusb_mspipes_free(MSUSB_PIPE_DESCRIPTOR** MsPipes, UINT32 NumberOfPipes)
{
UINT32 pnum = 0;
if (MsPipes)
{
for (pnum = 0; pnum < NumberOfPipes && MsPipes[pnum]; pnum++)
free(MsPipes[pnum]);
free(MsPipes);
}
} | 0 | [
"CWE-190"
] | FreeRDP | 9f77fc3dd2394373e1be753952b00dafa1a9b7da | 298,850,235,727,179,740,000,000,000,000,000,000,000 | 12 | Fixed int overflow in msusb_mspipes_read
Thanks to hac425 |
int nci_prop_rsp_packet(struct nci_dev *ndev, __u16 opcode,
struct sk_buff *skb)
{
return nci_op_rsp_packet(ndev, opcode, skb, ndev->ops->prop_ops,
ndev->ops->n_prop_ops);
} | 0 | [] | linux | 48b71a9e66c2eab60564b1b1c85f4928ed04e406 | 87,811,475,149,256,290,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 void sha1_update(SHA_CTX *c,const void *data,size_t len)
{ const unsigned char *ptr = data;
size_t res;
if ((res = c->num)) {
res = SHA_CBLOCK-res;
if (len<res) res=len;
SHA1_Update (c,ptr,res);
ptr += res;
len -= res;
}
res = len % SHA_CBLOCK;
len -= res;
if (len) {
sha1_block_data_order(c,... | 0 | [
"CWE-310"
] | openssl | 746c6f3a533b1eb50b909147b35fa1b0e5c61f59 | 70,705,834,250,778,780,000,000,000,000,000,000,000 | 27 | e_aes_cbc_hmac_sha1.c: align calculated MAC at cache line. |
void FilterManager::sendLocalReply(
Code code, absl::string_view body,
const std::function<void(ResponseHeaderMap& headers)>& modify_headers,
const absl::optional<Grpc::Status::GrpcStatus> grpc_status, absl::string_view details) {
ASSERT(!state_.under_on_local_reply_);
const bool is_head_request = state... | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 260,140,322,581,318,950,000,000,000,000,000,000,000 | 53 | 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 void ebu_ttd_remove_samples(GF_XMLNode *root, GF_XMLNode **out_body_node)
{
u32 idx = 0;
GF_XMLNode *node = NULL;
*out_body_node = NULL;
while ( (node = (GF_XMLNode*)gf_list_enum(root->content, &idx))) {
if (!strcmp(node->name, "body")) {
GF_XMLNode *body_node;
u32 body_idx = 0;
*out_body_node = n... | 0 | [
"CWE-276"
] | gpac | 96699aabae042f8f55cf8a85fa5758e3db752bae | 223,430,205,261,559,920,000,000,000,000,000,000,000 | 26 | fixed #2061 |
Expression_Obj Parser::parse_value()
{
lex< css_comments >(false);
if (lex< ampersand >())
{
if (match< ampersand >()) {
warning("In Sass, \"&&\" means two copies of the parent selector. You probably want to use \"and\" instead.", pstate);
}
return SASS_MEMORY_NEW(Parent_Refere... | 0 | [
"CWE-125"
] | libsass | eb15533b07773c30dc03c9d742865604f47120ef | 121,097,306,843,634,850,000,000,000,000,000,000,000 | 76 | Fix memory leak in `parse_ie_keyword_arg`
`kwd_arg` would never get freed when there was a parse error in
`parse_ie_keyword_arg`.
Closes #2656 |
gs_manager_create_windows_for_screen (GSManager *manager,
GdkScreen *screen)
{
GSWindow *window;
int n_monitors;
int i;
g_return_if_fail (manager != NULL);
g_return_if_fail (GS_IS_MANAGER (manager));
g_return_if_fail (GDK... | 1 | [] | gnome-screensaver | f6d3defdc7080a540d7f8df15dc309a9364ae668 | 143,321,559,131,040,370,000,000,000,000,000,000,000 | 37 | Create or remove windows as number of monitors changes due to randr 1.2
2008-08-20 William Jon McCann <jmccann@redhat.com>
* src/gs-manager.c (gs_manager_create_window_for_monitor),
(on_screen_monitors_changed), (gs_manager_destroy_windows),
(gs_manager_finalize), (gs_manager_create_windows_for_screen):
Create ... |
void HGraphBuilder::VisitExpressions(ZoneList<Expression*>* exprs) {
for (int i = 0; i < exprs->length(); ++i) {
CHECK_ALIVE(VisitForValue(exprs->at(i)));
}
} | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 188,105,361,806,318,580,000,000,000,000,000,000,000 | 5 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
static int connecthostport(const char * host, unsigned short port, char * result)
{
int s, n;
char hostname[INET6_ADDRSTRLEN];
char port_str[8], ifname[8], tmp[4];
struct addrinfo *ai, *p;
struct addrinfo hints;
memset(&hints, 0, sizeof(hints));
/* hints.ai_flags = AI_ADDRCONFIG; */
#ifdef AI_NUMERICSERV
hints... | 0 | [
"CWE-476"
] | miniupnp | 13585f15c7f7dc28bbbba1661efb280d530d114c | 266,110,961,945,661,460,000,000,000,000,000,000,000 | 51 | GetOutboundPinholeTimeout: check args |
long Track::GetNext(const BlockEntry* pCurrEntry,
const BlockEntry*& pNextEntry) const {
assert(pCurrEntry);
assert(!pCurrEntry->EOS()); //?
const Block* const pCurrBlock = pCurrEntry->GetBlock();
assert(pCurrBlock && pCurrBlock->GetTrackNumber() == m_info.number);
if (!pCurrBlock || pCu... | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 152,686,065,427,382,240,000,000,000,000,000,000,000 | 85 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dentry)
{
struct superblock_security_struct *sbsec = NULL;
struct inode_security_struct *isec = selinux_inode(inode);
u32 task_sid, sid = 0;
u16 sclass;
struct dentry *dentry;
int rc = 0;
if (isec->initialized == LABEL_INITIALIZED)
re... | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 194,850,759,964,257,520,000,000,000,000,000,000,000 | 174 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
static inline void sync_cr8_to_lapic(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
if (is_guest_mode(vcpu) && (vcpu->arch.hflags & HF_VINTR_MASK))
return;
if (!is_cr_intercept(svm, INTERCEPT_CR8_WRITE)) {
int cr8 = svm->vmcb->control.int_ctl & V_TPR_MASK;
kvm_set_cr8(vcpu, cr8);
}
} | 0 | [] | kvm | 854e8bb1aa06c578c2c9145fa6bfe3680ef63b23 | 9,825,029,085,837,951,000,000,000,000,000,000,000 | 12 | KVM: x86: Check non-canonical addresses upon WRMSR
Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is
written to certain MSRs. The behavior is "almost" identical for AMD and Intel
(ignoring MSRs that are not implemented in either architecture since they would
anyhow #GP). However, IA32_SYSENTE... |
struct page *follow_devmap_pud(struct vm_area_struct *vma, unsigned long addr,
pud_t *pud, int flags, struct dev_pagemap **pgmap)
{
unsigned long pfn = pud_pfn(*pud);
struct mm_struct *mm = vma->vm_mm;
struct page *page;
assert_spin_locked(pud_lockptr(mm, pud));
if (flags & FOLL_WRITE && !pud_write(*pud))
re... | 0 | [
"CWE-362"
] | linux | c444eb564fb16645c172d550359cb3d75fe8a040 | 294,103,260,657,905,400,000,000,000,000,000,000,000 | 44 | mm: thp: make the THP mapcount atomic against __split_huge_pmd_locked()
Write protect anon page faults require an accurate mapcount to decide
if to break the COW or not. This is implemented in the THP path with
reuse_swap_page() ->
page_trans_huge_map_swapcount()/page_trans_huge_mapcount().
If the COW triggers while ... |
static int complete_emulated_mmio(struct kvm_vcpu *vcpu)
{
struct kvm_run *run = vcpu->run;
struct kvm_mmio_fragment *frag;
unsigned len;
BUG_ON(!vcpu->mmio_needed);
/* Complete previous fragment */
frag = &vcpu->mmio_fragments[vcpu->mmio_cur_fragment];
len = min(8u, frag->len);
if (!vcpu->mmio_is_write)
me... | 1 | [
"CWE-119",
"CWE-703",
"CWE-120"
] | linux | a08d3b3b99efd509133946056531cdf8f3a0c09b | 7,140,657,898,321,828,000,000,000,000,000,000,000 | 44 | kvm: x86: fix emulator buffer overflow (CVE-2014-0049)
The problem occurs when the guest performs a pusha with the stack
address pointing to an mmio address (or an invalid guest physical
address) to start with, but then extending into an ordinary guest
physical address. When doing repeated emulated pushes
emulator_re... |
void blk_mq_sched_free_hctx_data(struct request_queue *q,
void (*exit)(struct blk_mq_hw_ctx *))
{
struct blk_mq_hw_ctx *hctx;
int i;
queue_for_each_hw_ctx(q, hctx, i) {
if (exit && hctx->sched_data)
exit(hctx);
kfree(hctx->sched_data);
hctx->sched_data = NULL;
}
} | 0 | [
"CWE-416"
] | linux | c3e2219216c92919a6bd1711f340f5faa98695e6 | 301,648,405,357,966,570,000,000,000,000,000,000,000 | 13 | block: free sched's request pool in blk_cleanup_queue
In theory, IO scheduler belongs to request queue, and the request pool
of sched tags belongs to the request queue too.
However, the current tags allocation interfaces are re-used for both
driver tags and sched tags, and driver tags is definitely host wide,
and doe... |
TEST_F(PathUtilityTest, RemoveQueryAndFragment) {
EXPECT_EQ("", PathUtil::removeQueryAndFragment(""));
EXPECT_EQ("/abc", PathUtil::removeQueryAndFragment("/abc"));
EXPECT_EQ("/abc", PathUtil::removeQueryAndFragment("/abc?"));
EXPECT_EQ("/abc", PathUtil::removeQueryAndFragment("/abc?param=value"));
EXPECT_EQ("... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 134,777,501,105,514,990,000,000,000,000,000,000,000 | 19 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static void csi_m(struct vc_data *vc)
{
int i;
for (i = 0; i <= vc->vc_npar; i++)
switch (vc->vc_par[i]) {
case 0: /* all attributes off */
default_attr(vc);
break;
case 1:
vc->vc_intensity = 2;
break;
case 2:
vc->vc_intensity = 0;
break;
case 3:
vc->vc_italic = 1;
break;
case 21:... | 0 | [
"CWE-416",
"CWE-362"
] | linux | ca4463bf8438b403596edd0ec961ca0d4fbe0220 | 305,187,969,313,241,350,000,000,000,000,000,000,000 | 103 | vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console
The VT_DISALLOCATE ioctl can free a virtual console while tty_release()
is still running, causing a use-after-free in con_shutdown(). This
occurs because VT_DISALLOCATE considers a virtual console's
'struct vc_data' to be unused as soon as the correspond... |
d2flac16_clip_array (const double *src, int32_t *dest, int count, int normalize)
{ double normfact, scaled_value ;
normfact = normalize ? (8.0 * 0x1000) : 1.0 ;
while (--count >= 0)
{ scaled_value = src [count] * normfact ;
if (CPU_CLIPS_POSITIVE == 0 && scaled_value >= (1.0 * 0x7FFF))
{ dest [count] = 0x7FFF ... | 0 | [
"CWE-119",
"CWE-369"
] | libsndfile | 60b234301adf258786d8b90be5c1d437fc8799e0 | 254,644,245,666,231,530,000,000,000,000,000,000,000 | 20 | src/flac.c: Improve error handling
Especially when dealing with corrupt or malicious files. |
uint32_t cli_bcapi_setvirusname(struct cli_bc_ctx* ctx, const uint8_t *name, uint32_t len)
{
ctx->virname = (const char*)name;
return 0;
} | 0 | [
"CWE-189"
] | clamav-devel | 3d664817f6ef833a17414a4ecea42004c35cc42f | 89,667,339,035,366,860,000,000,000,000,000,000,000 | 5 | fix recursion level crash (bb #3706).
Thanks to Stephane Chazelas for the analysis. |
static bool parse_dysymtab(struct MACH0_(obj_t) * bin, ut64 off) {
size_t len, i;
ut32 size_tab;
ut8 dysym[sizeof(struct dysymtab_command)] = { 0 };
ut8 dytoc[sizeof(struct dylib_table_of_contents)] = { 0 };
ut8 dymod[sizeof(struct MACH0_(dylib_module))] = { 0 };
ut8 idsyms[sizeof(ut32)] = { 0 };
if (off > bin-... | 0 | [
"CWE-787"
] | rizin | 348b1447d1452f978b69631d6de5b08dd3bdf79d | 170,567,877,698,759,940,000,000,000,000,000,000,000 | 149 | fix #2956 - oob write in mach0.c |
PHPAPI void php_handle_aborted_connection(void)
{
PG(connection_status) = PHP_CONNECTION_ABORTED;
php_output_set_status(PHP_OUTPUT_DISABLED);
if (!PG(ignore_user_abort)) {
zend_bailout();
}
} | 0 | [] | php-src | 9a07245b728714de09361ea16b9c6fcf70cb5685 | 282,228,300,985,103,930,000,000,000,000,000,000,000 | 10 | Fixed bug #71273 A wrong ext directory setup in php.ini leads to crash |
int nwfilterRegister(void)
{
if (virRegisterConnectDriver(&nwfilterConnectDriver, false) < 0)
return -1;
if (virSetSharedNWFilterDriver(&nwfilterDriver) < 0)
return -1;
if (virRegisterStateDriver(&stateDriver) < 0)
return -1;
return 0;
} | 0 | [
"CWE-667"
] | libvirt | a4947e8f63c3e6b7b067b444f3d6cf674c0d7f36 | 177,552,299,536,424,700,000,000,000,000,000,000,000 | 10 | nwfilter: fix crash when counting number of network filters
The virNWFilterObjListNumOfNWFilters method iterates over the
driver->nwfilters, accessing virNWFilterObj instances. As such
it needs to be protected against concurrent modification of
the driver->nwfilters object.
This API allows unprivileged users to conne... |
static void rfc1002mangle(char *target, char *source, unsigned int length)
{
unsigned int i, j;
for (i = 0, j = 0; i < (length); i++) {
/* mask a nibble at a time and encode */
target[j] = 'A' + (0x0F & (source[i] >> 4));
target[j+1] = 'A' + (0x0F & source[i]);
j += 2;
}
} | 0 | [
"CWE-20"
] | linux | 70945643722ffeac779d2529a348f99567fa5c33 | 236,328,140,138,234,740,000,000,000,000,000,000,000 | 12 | cifs: always do is_path_accessible check in cifs_mount
Currently, we skip doing the is_path_accessible check in cifs_mount if
there is no prefixpath. I have a report of at least one server however
that allows a TREE_CONNECT to a share that has a DFS referral at its
root. The reporter in this case was using a UNC that ... |
void DocumentSourceGraphLookUp::serializeToArray(
std::vector<Value>& array, boost::optional<ExplainOptions::Verbosity> explain) const {
// Serialize default options.
MutableDocument spec(DOC("from" << _from.coll() << "as" << _as.fullPath() << "connectToField"
<< _connect... | 0 | [
"CWE-416"
] | mongo | d6133a3a5464fac202f512b0310dfeb200c126f9 | 127,926,943,447,775,840,000,000,000,000,000,000,000 | 38 | SERVER-43350 $lookup with no local default or user-specified collation should explicitly set the simple collation on the foreign expression context |
lprn_get_params(gx_device * dev, gs_param_list * plist)
{
gx_device_lprn *const lprn = (gx_device_lprn *) dev;
int code = gdev_prn_get_params(dev, plist);
int ncode;
if (code < 0)
return code;
if ((ncode = param_write_bool(plist, "ManualFeed", &lprn->ManualFeed)) < 0)
code = ncode;... | 0 | [
"CWE-787"
] | ghostpdl | 450da26a76286a8342ec0864b3d113856709f8f6 | 259,823,342,956,044,660,000,000,000,000,000,000,000 | 35 | Bug 701785: fixed sanitizer heap-buffer-overflow in lprn_is_black().
In contrib/lips4/gdevlprn.c:lprn_is_black(), it seems that bpl is not
necessarily a multiple of lprn->nBw, so we need to explicitly avoid straying
into the next line's data.
This also avoids accessing beyond our buffer if we are already on the last
... |
int oauth2_try_parse_jwt(const struct oauth2_settings *set,
const char *token, ARRAY_TYPE(oauth2_field) *fields,
bool *is_jwt_r, const char **error_r)
{
const char *const *blobs = t_strsplit(token, ".");
int ret;
i_assert(set->key_dict != NULL);
/* we don't know if it's JWT token yet */
*is_jwt_r = FALSE... | 0 | [
"CWE-22"
] | core | 15682a20d5589ebf5496b31c55ecf9238ff2457b | 145,172,370,476,699,340,000,000,000,000,000,000,000 | 60 | lib-oauth2: Do not escape '.'
This is not really needed and just makes things difficult. |
PosibErr<void> convert_ec(const char * in0, int size,
CharVector & out, ParmStr) const {
ConvDirect::convert(in0, size, out);
return no_err;
} | 0 | [
"CWE-125"
] | aspell | de29341638833ba7717bd6b5e6850998454b044b | 198,899,367,277,557,140,000,000,000,000,000,000,000 | 5 | Don't allow null-terminated UCS-2/4 strings using the original API.
Detect if the encoding is UCS-2/4 and the length is -1 in affected API
functions and refuse to convert the string. If the string ends up
being converted somehow, abort with an error message in DecodeDirect
and ConvDirect. To convert a null terminate... |
EXPORTED int mailbox_rename_cleanup(struct mailbox **mailboxptr)
{
int r = 0;
struct mailbox *oldmailbox = *mailboxptr;
char *name = xstrdup(mailbox_name(oldmailbox));
r = mailbox_delete_internal(mailboxptr);
if (r) {
syslog(LOG_CRIT,
"Rename Failure during mailbox_rename_c... | 0 | [] | cyrus-imapd | 1d6d15ee74e11a9bd745e80be69869e5fb8d64d6 | 82,658,305,567,349,310,000,000,000,000,000,000,000 | 19 | mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path() |
static int init_rmode(struct kvm *kvm)
{
if (!init_rmode_tss(kvm))
return 0;
if (!init_rmode_identity_map(kvm))
return 0;
return 1;
} | 0 | [
"CWE-20"
] | linux-2.6 | 16175a796d061833aacfbd9672235f2d2725df65 | 157,928,279,618,264,660,000,000,000,000,000,000,000 | 8 | KVM: VMX: Don't allow uninhibited access to EFER on i386
vmx_set_msr() does not allow i386 guests to touch EFER, but they can still
do so through the default: label in the switch. If they set EFER_LME, they
can oops the host.
Fix by having EFER access through the normal channel (which will check for
EFER_LME) even o... |
write_linefeed(void)
{
term_cursor *curs = &term.curs;
if (curs->x < term.marg_left || curs->x > term.marg_right)
return;
clear_wrapcontd(term.lines[curs->y], curs->y);
if (curs->y == term.marg_bot)
term_do_scroll(term.marg_top, term.marg_bot, 1, true);
else if (curs->y < term.rows - 1)
curs->y++... | 0 | [
"CWE-703",
"CWE-770"
] | mintty | bd52109993440b6996760aaccb66e68e782762b9 | 339,448,369,390,761,080,000,000,000,000,000,000,000 | 13 | tame some window operations, just in case |
int manager_loop(Manager *m) {
int r;
RATELIMIT_DEFINE(rl, 1*USEC_PER_SEC, 50000);
assert(m);
m->exit_code = MANAGER_RUNNING;
/* Release the path cache */
set_free_free(m->unit_path_cache);
m->unit_path_cache = NULL;
manager_check_finished(m);
... | 0 | [] | systemd | 5ba6985b6c8ef85a8bcfeb1b65239c863436e75b | 185,847,069,572,270,550,000,000,000,000,000,000,000 | 65 | core: allow PIDs to be watched by two units at the same time
In some cases it is interesting to map a PID to two units at the same
time. For example, when a user logs in via a getty, which is reexeced to
/sbin/login that binary will be explicitly referenced as main pid of the
getty service, as well as implicitly refer... |
static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie,
dma_cookie_t last_complete, dma_cookie_t last_used)
{
if (last_complete <= last_used) {
if ((cookie <= last_complete) || (cookie > last_used))
return DMA_COMPLETE;
} else {
if ((cookie <= last_complete) && (cookie > last_used))
retu... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 268,547,723,761,154,640,000,000,000,000,000,000,000 | 12 | 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 int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
struct shared_msr_entry *msr;
int ret = 0;
u32 msr_index = msr_info->index;
u64 data = msr_info->data;
switch (msr_index) {
case MSR_EFER:
ret = kvm_set_msr_common(vcpu, msr_info);
break;
#ifdef C... | 0 | [
"CWE-20"
] | linux | bfd0a56b90005f8c8a004baf407ad90045c2b11e | 5,992,821,257,388,777,000,000,000,000,000,000,000 | 75 | nEPT: Nested INVEPT
If we let L1 use EPT, we should probably also support the INVEPT instruction.
In our current nested EPT implementation, when L1 changes its EPT table
for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in
the course of this modification already calls INVEPT. But if last level
of sh... |
void do_usage()
{
printf("Usage:\n"
" %s <user> log <filename>\n"
" %s <user> exec <command> <args>\n",
my_progname, my_progname);
my_exit(1);
} | 0 | [] | server | 8fcdd6b0ecbb966f4479856efe93a963a7a422f7 | 51,638,032,889,771,430,000,000,000,000,000,000,000 | 8 | Numerous issues in mysqld_safe |
bool Config::remove_notifier(const Notifier * n)
{
Vector<Notifier *>::iterator i = notifier_list.begin();
Vector<Notifier *>::iterator end = notifier_list.end();
while (i != end && *i != n)
++i;
if (i == end) {
return false;
} else {
delete *i;
notifier_l... | 0 | [
"CWE-125"
] | aspell | 80fa26c74279fced8d778351cff19d1d8f44fe4e | 326,734,393,179,366,750,000,000,000,000,000,000,000 | 20 | Fix various bugs found by OSS-Fuze. |
static int get_master_uuid(MYSQL *mysql, Master_info *mi)
{
const char *errmsg;
MYSQL_RES *master_res= NULL;
MYSQL_ROW master_row= NULL;
int ret= 0;
DBUG_EXECUTE_IF("dbug.before_get_MASTER_UUID",
{
const char act[]= "now wait_for signal.get_master_uuid";
... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 278,801,511,585,388,800,000,000,000,000,000,000,000 | 81 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
strtoargvsub(isc_mem_t *mctx, char *s, unsigned int *argcp,
char ***argvp, unsigned int n)
{
isc_result_t result;
/* Discard leading whitespace. */
while (*s == ' ' || *s == '\t')
s++;
if (*s == '\0') {
/* We have reached the end of the string. */
*argcp = n;
*argvp = isc_mem_get(mctx, n * sizeof(ch... | 0 | [
"CWE-269"
] | bind9 | e4cccf9668c7adee4724a7649ec64685f82c8677 | 48,754,042,564,353,010,000,000,000,000,000,000,000 | 29 | Update-policy 'subdomain' was incorrectly treated as 'zonesub'
resulting in names outside the specified subdomain having the wrong
restrictions for the given key. |
static void v9fs_fs_ro(void *opaque)
{
V9fsPDU *pdu = opaque;
pdu_complete(pdu, -EROFS);
} | 0 | [
"CWE-399",
"CWE-772"
] | qemu | e95c9a493a5a8d6f969e86c9f19f80ffe6587e19 | 238,312,080,752,025,000,000,000,000,000,000,000,000 | 5 | 9pfs: fix potential host memory leak in v9fs_read
In 9pfs read dispatch function, it doesn't free two QEMUIOVector
object thus causing potential memory leak. This patch avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Signed-off-by: Greg Kurz <groug@kaod.org> |
static BOOL update_recv_secondary_order(rdpUpdate* update, wStream* s, BYTE flags)
{
BOOL rc = FALSE;
size_t start, end, diff;
BYTE orderType;
UINT16 extraFlags;
UINT16 orderLength;
rdpContext* context = update->context;
rdpSettings* settings = context->settings;
rdpSecondaryUpdate* secondary = update->secondar... | 1 | [
"CWE-703",
"CWE-681"
] | FreeRDP | e7bffa64ef5ed70bac94f823e2b95262642f5296 | 17,145,863,199,436,656,000,000,000,000,000,000,000 | 169 | Fixed OOB read in update_recv_secondary_order
CVE-2020-4032 thanks to @antonio-morales for finding this. |
get_folder_names_to_update (gpointer key,
gpointer value,
gpointer user_data)
{
CamelEwsStore *ews_store = user_data;
const gchar *folder_id = key;
gchar *folder_name;
folder_name = camel_ews_store_summary_get_folder_full_name (ews_store->summary, folder_id, NULL);
if (folder_name != NULL)
ews_sto... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 101,663,125,641,964,000,000,000,000,000,000,000,000 | 12 | 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 |
Parse a set of mail headers contained in a string, and return an object similar to imap_headerinfo() */
PHP_FUNCTION(imap_rfc822_parse_headers)
{
zend_string *headers, *defaulthost = NULL;
ENVELOPE *en;
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "S|S", &headers, &defaulthost) == FAILURE) {
re... | 0 | [
"CWE-88"
] | php-src | 336d2086a9189006909ae06c7e95902d7d5ff77e | 55,314,802,216,250,140,000,000,000,000,000,000,000 | 21 | Disable rsh/ssh functionality in imap by default (bug #77153) |
auth_algo_transform(uint32_t virtio_auth_algo,
enum rte_crypto_auth_algorithm *algo)
{
switch (virtio_auth_algo) {
case VIRTIO_CRYPTO_NO_MAC:
*algo = RTE_CRYPTO_AUTH_NULL;
break;
case VIRTIO_CRYPTO_MAC_HMAC_MD5:
*algo = RTE_CRYPTO_AUTH_MD5_HMAC;
break;
case VIRTIO_CRYPTO_MAC_HMAC_SHA1:
*algo = RTE_CRYPT... | 0 | [
"CWE-125"
] | dpdk | acd4c92fa693bbea695f2bb42bb93fb8567c3ca5 | 285,440,866,895,512,300,000,000,000,000,000,000,000 | 53 | vhost/crypto: validate keys lengths
transform_cipher_param() and transform_chain_param() handle
the payload data for the VHOST_USER_CRYPTO_CREATE_SESS
message. These payloads have to be validated, since it
could come from untrusted sources.
Two buffers and their lengths are defined in this payload,
one the the auth k... |
static int packet_notifier(struct notifier_block *this,
unsigned long msg, void *ptr)
{
struct sock *sk;
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
struct net *net = dev_net(dev);
rcu_read_lock();
sk_for_each_rcu(sk, &net->packet.sklist) {
struct packet_sock *po = pkt_sk(sk);
switch (ms... | 0 | [
"CWE-787"
] | linux | acf69c946233259ab4d64f8869d4037a198c7f06 | 63,478,354,422,236,240,000,000,000,000,000,000,000 | 49 | net/packet: fix overflow in tpacket_rcv
Using tp_reserve to calculate netoff can overflow as
tp_reserve is unsigned int and netoff is unsigned short.
This may lead to macoff receving a smaller value then
sizeof(struct virtio_net_hdr), and if po->has_vnet_hdr
is set, an out-of-bounds write will occur when
calling virt... |
value_free(
struct value *vp /* value structure */
)
{
if (vp->ptr != NULL)
free(vp->ptr);
if (vp->sig != NULL)
free(vp->sig);
memset(vp, 0, sizeof(struct value));
} | 0 | [
"CWE-20"
] | ntp | c4cd4aaf418f57f7225708a93bf48afb2bc9c1da | 233,715,250,624,459,500,000,000,000,000,000,000,000 | 10 | CVE-2014-9297 |
static void __x25_destroy_socket(struct sock *sk)
{
struct sk_buff *skb;
x25_stop_heartbeat(sk);
x25_stop_timer(sk);
x25_remove_socket(sk);
x25_clear_queues(sk); /* Flush the queues */
while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) {
if (skb->sk != sk) { /* A pending connection */
/*
* Q... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 79,772,587,699,238,880,000,000,000,000,000,000,000 | 35 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
iasecc_sdo_get_data(struct sc_card *card, struct iasecc_sdo *sdo)
{
struct sc_context *ctx = card->ctx;
int rv, sdo_tag;
LOG_FUNC_CALLED(ctx);
sdo_tag = iasecc_sdo_tag_from_class(sdo->sdo_class);
rv = iasecc_sdo_get_tagged_data(card, sdo_tag, sdo);
/* When there is no public data 'GET DATA' returns error */
i... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 49,310,794,631,010,860,000,000,000,000,000,000,000 | 19 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
lys_getnext_data(const struct lys_module *mod, const struct lys_node *parent, const char *name, int nam_len,
LYS_NODE type, int getnext_opts, const struct lys_node **ret)
{
const struct lys_node *node;
assert((mod || parent) && name);
assert(!(type & (LYS_AUGMENT | LYS_USES | LYS_GROUPING ... | 0 | [
"CWE-119"
] | libyang | 32fb4993bc8bb49e93e84016af3c10ea53964be5 | 279,302,476,075,258,240,000,000,000,000,000,000,000 | 33 | schema tree BUGFIX do not check features while still resolving schema
Fixes #723 |
encode_LEARN(const struct ofpact_learn *learn,
enum ofp_version ofp_version OVS_UNUSED, struct ofpbuf *out)
{
const struct ofpact_learn_spec *spec;
struct nx_action_learn *nal;
size_t start_ofs;
start_ofs = out->size;
nal = put_NXAST_LEARN(out);
nal->idle_timeout = htons(learn->idl... | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 74,713,672,640,811,635,000,000,000,000,000,000,000 | 42 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
slew_sources(struct timespec *raw, struct timespec *cooked, double dfreq,
double doffset, LCL_ChangeType change_type, void *anything)
{
int i;
for (i=0; i<n_sources; i++) {
if (change_type == LCL_ChangeUnknownStep) {
SST_ResetInstance(sources[i]->stats);
} else {
SST_SlewSamples(so... | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 96,061,367,380,911,130,000,000,000,000,000,000,000 | 18 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
static int vsock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
{
int err;
err = sock_queue_rcv_skb(sk, skb);
if (err)
kfree_skb(skb);
return err;
} | 0 | [
"CWE-667"
] | linux | c518adafa39f37858697ac9309c6cf1805581446 | 219,791,797,004,441,300,000,000,000,000,000,000,000 | 10 | vsock: fix the race conditions in multi-transport support
There are multiple similar bugs implicitly introduced by the
commit c0cfa2d8a788fcf4 ("vsock: add multi-transports support") and
commit 6a2c0962105ae8ce ("vsock: prevent transport modules unloading").
The bug pattern:
[1] vsock_sock.transport pointer is copie... |
void perf_sched_cb_dec(struct pmu *pmu)
{
this_cpu_dec(perf_sched_cb_usages);
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 12ca6ad2e3a896256f086497a7c7406a547ee373 | 21,975,307,481,105,946,000,000,000,000,000,000,000 | 4 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent die... |
T atN(const int pos, const int x, const int y, const int z, const int c, const T& out_value) const {
return (pos<0 || pos>=width())?out_value:(*this)(pos,x,y,z,c);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 26,182,475,480,758,464,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
START_TEST(range_prop_parser)
{
struct parser_test_range {
char *tag;
bool success;
int hi, lo;
} tests[] = {
{ "10:8", true, 10, 8 },
{ "100:-1", true, 100, -1 },
{ "-203813:-502023", true, -203813, -502023 },
{ "238492:28210", true, 238492, 28210 },
{ "none", true, 0, 0 },
{ "0:0", false, 0, 0 },
... | 0 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 339,023,174,101,413,160,000,000,000,000,000,000,000 | 38 | evdev: strip the device name of format directives
This fixes a format string vulnerabilty.
evdev_log_message() composes a format string consisting of a fixed
prefix (including the rendered device name) and the passed-in format
buffer. This format string is then passed with the arguments to the
actual log handler, whi... |
void CLASS convert_to_rgb()
{
int row, col, c, i, j, k;
ushort *img;
float out[3], out_cam[3][4];
double num, inverse[3][3];
static const double xyzd50_srgb[3][3] =
{ { 0.436083, 0.385083, 0.143055 },
{ 0.222507, 0.716888, 0.060608 },
{ 0.013930, 0.097097, 0.714022 } };
static const double rgb_rgb... | 0 | [] | LibRaw | c4e374ea6c979a7d1d968f5082b7d0ea8cd27202 | 179,441,015,315,364,200,000,000,000,000,000,000,000 | 117 | additional data checks backported from 0.15.4 |
static int tipc_nl_retrieve_rekeying(struct nlattr **attrs, u32 *intv)
{
struct nlattr *attr = attrs[TIPC_NLA_NODE_REKEYING];
if (!attr)
return -ENODATA;
*intv = nla_get_u32(attr);
return 0;
} | 0 | [] | linux | 0217ed2848e8538bcf9172d97ed2eeb4a26041bb | 193,816,255,445,229,170,000,000,000,000,000,000,000 | 10 | tipc: better validate user input in tipc_nl_retrieve_key()
Before calling tipc_aead_key_size(ptr), we need to ensure
we have enough data to dereference ptr->keylen.
We probably also want to make sure tipc_aead_key_size()
wont overflow with malicious ptr->keylen values.
Syzbot reported:
BUG: KMSAN: uninit-value in _... |
static inline void assert_list_leaf_cfs_rq(struct rq *rq)
{
} | 0 | [
"CWE-400",
"CWE-703"
] | linux | de53fd7aedb100f03e5d2231cfce0e4993282425 | 221,101,149,505,420,950,000,000,000,000,000,000,000 | 3 | sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices
It has been observed, that highly-threaded, non-cpu-bound applications
running under cpu.cfs_quota_us constraints can hit a high percentage of
periods throttled while simultaneously not consuming the allocated
amount of quota... |
static size_t consume_s8 (ut8 *buf, ut8 *max, st8 *out, ut32 *offset) {
size_t n;
ut32 tmp;
if (!(n = consume_u32 (buf, max, &tmp, offset)) || n > 1) {
return 0;
}
*out = (st8)(tmp & 0x7f);
return 1;
} | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | d2632f6483a3ceb5d8e0a5fb11142c51c43978b4 | 213,258,372,100,569,320,000,000,000,000,000,000,000 | 9 | Fix crash in fuzzed wasm r2_hoobr_consume_init_expr |
void same_file_test()
{
try
{
fclose(QUtil::safe_fopen("qutil.out", "r"));
fclose(QUtil::safe_fopen("other-file", "r"));
}
catch (std::exception const&)
{
std::cout << "same_file_test expects to have qutil.out and other-file"
" exist in the current directory\n";
... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 296,497,994,000,919,480,000,000,000,000,000,000,000 | 20 | 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 ... |
bool ValidateSHARK()
{
std::cout << "\nSHARK validation suite running...\n\n";
bool pass1 = true, pass2 = true;
SHARKEncryption enc; // 128-bit only
pass1 = SHARKEncryption::KEYLENGTH == 16 && pass1;
pass1 = enc.StaticGetValidKeyLength(8) == 16 && pass1;
pass1 = enc.StaticGetValidKeyLength(15) == 16 &&... | 0 | [
"CWE-190",
"CWE-125"
] | cryptopp | 07dbcc3d9644b18e05c1776db2a57fe04d780965 | 259,711,068,236,894,770,000,000,000,000,000,000,000 | 25 | Add Inflator::BadDistanceErr exception (Issue 414)
The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings |
glob_name_is_acceptable (name)
const char *name;
{
struct ign *p;
int flags;
/* . and .. are never matched */
if (name[0] == '.' && (name[1] == '\0' || (name[1] == '.' && name[2] == '\0')))
return (0);
flags = FNM_PATHNAME | FNMATCH_EXTFLAG | FNMATCH_NOCASEGLOB;
for (p = globignore.ignores; p->va... | 0 | [
"CWE-273",
"CWE-787"
] | bash | 951bdaad7a18cc0dc1036bba86b18b90874d39ff | 265,604,678,207,480,320,000,000,000,000,000,000,000 | 18 | commit bash-20190628 snapshot |
std::string HttpFile::getMd5() const
{
return implPtr_->getMd5();
} | 0 | [
"CWE-552"
] | drogon | 3c785326c63a34aa1799a639ae185bc9453cb447 | 296,376,835,214,619,670,000,000,000,000,000,000,000 | 4 | Prevent malformed upload path causing arbitrary write (#1174) |
gsm_xsmp_server_start (GsmXsmpServer *server)
{
GIOChannel *channel;
int i;
for (i = 0; i < server->priv->num_local_xsmp_sockets; i++) {
GsmIceConnectionData *data;
data = g_new0 (GsmIceConnectionData, 1);
data->server = server;
... | 0 | [
"CWE-125",
"CWE-835"
] | gnome-session | b0dc999e0b45355314616321dbb6cb71e729fc9d | 238,302,581,544,864,760,000,000,000,000,000,000,000 | 22 | [gsm] Delay the creation of the GsmXSMPClient until it really exists
We used to create the GsmXSMPClient before the XSMP connection is really
accepted. This can lead to some issues, though. An example is:
https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting:
"What is happening is that a new client (probabl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.