func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static SECURITY_STATUS SEC_ENTRY kerberos_SetContextAttributesW(PCtxtHandle phContext,
ULONG ulAttribute, void* pBuffer,
ULONG cbBuffer)
{
return SEC_E_UNSUPPORTED_FUNCTION;
} | 0 | [] | FreeRDP | 479e891545473f01c187daffdfa05fc752b54b72 | 12,237,322,617,410,103,000,000,000,000,000,000,000 | 6 | check return values for SetCredentialsAttributes, throw warnings for unsupported attributes |
static uint16_t nvme_map_addr_cmb(NvmeCtrl *n, QEMUIOVector *iov, hwaddr addr,
size_t len)
{
if (!len) {
return NVME_SUCCESS;
}
trace_pci_nvme_map_addr_cmb(addr, len);
if (!nvme_addr_is_cmb(n, addr) || !nvme_addr_is_cmb(n, addr + len - 1)) {
return NVM... | 0 | [] | qemu | 736b01642d85be832385063f278fe7cd4ffb5221 | 189,829,740,180,420,900,000,000,000,000,000,000,000 | 17 | hw/nvme: fix CVE-2021-3929
This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the
device itself. This still allows DMA to MMIO regions of other devices
(e.g. doing P2P DMA to the controller memory buffer of another NVMe
device).
Fixes: CVE-2021-3929
Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com>
Review... |
TEST_F(RenameCollectionTest, RenameCollectionToItselfByNsForApplyOps) {
auto dbName = _sourceNss.db().toString();
auto uuid = _createCollectionWithUUID(_opCtx.get(), _sourceNss);
auto uuidDoc = BSON("ui" << uuid);
auto cmd = BSON("renameCollection" << _sourceNss.ns() << "to" << _sourceNss.ns() << "dropT... | 0 | [
"CWE-20"
] | mongo | 35c1b1f588f04926a958ad2fe4d9c59d79f81e8b | 245,739,026,813,236,560,000,000,000,000,000,000,000 | 9 | SERVER-35636 renameCollectionForApplyOps checks for complete namespace |
static int create_user_core(int user_core_fd, pid_t pid, off_t ulimit_c)
{
if (user_core_fd >= 0)
{
off_t core_size = copyfd_size(STDIN_FILENO, user_core_fd, ulimit_c, COPYFD_SPARSE);
if (fsync(user_core_fd) != 0 || close(user_core_fd) != 0 || core_size < 0)
{
/* perror first... | 0 | [
"CWE-362"
] | abrt | a6cdfd6a16251447264d203e145624a96fa811e3 | 305,681,738,374,600,500,000,000,000,000,000,000,000 | 24 | ccpp: add support for containers
A process is considered to be containerized when:
- has the 'container' env variable set to some value
- or has the 'container_uuid' env variable set to some value
- or has remounted /
Signed-off-by: Jakub Filak <jfilak@redhat.com> |
qb_ipcs_connection_stats_get(qb_ipcs_connection_t * c,
struct qb_ipcs_connection_stats * stats,
int32_t clear_after_read)
{
if (c == NULL) {
return -EINVAL;
}
memcpy(stats, &c->stats, sizeof(struct qb_ipcs_connection_stats));
if (clear_after_read) {
memset(&c->stats, 0, sizeof(struct qb_ipcs_con... | 0 | [
"CWE-59"
] | libqb | e322e98dc264bc5911d6fe1d371e55ac9f95a71e | 82,738,685,806,581,020,000,000,000,000,000,000,000 | 14 | ipc: use O_EXCL on SHM files, and randomize the names
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> |
_load_job_limits(void)
{
List steps;
ListIterator step_iter;
step_loc_t *stepd;
int fd;
job_mem_limits_t *job_limits_ptr;
slurmstepd_mem_info_t stepd_mem_info;
if (!job_limits_list)
job_limits_list = list_create(_job_limits_free);
job_limits_loaded = true;
steps = stepd_available(conf->spooldir, conf->node... | 0 | [
"CWE-20"
] | slurm | df545955e4f119974c278bff0c47155257d5afc7 | 319,244,206,858,494,900,000,000,000,000,000,000,000 | 60 | Validate gid and user_name values provided to slurmd up front.
Do not defer until later, and do not potentially miss out on proper
validation of the user_name field which can lead to improper authentication
handling.
CVE-2018-10995. |
BSONObj spec() {
return BSON("$and" << BSON_ARRAY(0 << 1 << "$a"));
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 314,920,896,992,789,550,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
add_watchdog_timer (GSWindow *window,
glong timeout)
{
window->priv->watchdog_timer_id = g_timeout_add_seconds (timeout,
(GSourceFunc)watchdog_timer,
window);... | 0 | [
"CWE-284"
] | cinnamon-screensaver | da7af55f1fa966c52e15cc288d4f8928eca8cc9f | 337,711,463,323,879,560,000,000,000,000,000,000,000 | 7 | Workaround gtk3 bug, don't allow GtkWindow to handle popup_menu. |
g_file_exist(const char* filename)
{
#if defined(_WIN32)
return 0; // use FileAge(filename) <> -1
#else
return access(filename, F_OK) == 0;
#endif
} | 0 | [] | xrdp | d8f9e8310dac362bb9578763d1024178f94f4ecc | 23,417,582,599,938,438,000,000,000,000,000,000,000 | 8 | move temp files from /tmp to /tmp/.xrdp |
static void *input_devices_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
return seq_list_next(v, &input_dev_list, pos);
} | 0 | [
"CWE-703",
"CWE-787"
] | linux | cb222aed03d798fc074be55e59d9a112338ee784 | 295,222,353,194,265,000,000,000,000,000,000,000,000 | 4 | Input: add safety guards to input_set_keycode()
If we happen to have a garbage in input device's keycode table with values
too big we'll end up doing clear_bit() with offset way outside of our
bitmaps, damaging other objects within an input device or even outside of
it. Let's add sanity checks to the returned old keyc... |
redraw_after_callback(int call_update_screen)
{
++redrawing_for_callback;
if (State == HITRETURN || State == ASKMORE)
; // do nothing
else if (State & CMDLINE)
{
// Don't redraw when in prompt_for_number().
if (cmdline_row > 0)
{
// Redrawing only works when the screen didn't scroll. Don't cle... | 0 | [
"CWE-122"
] | vim | 826bfe4bbd7594188e3d74d2539d9707b1c6a14b | 316,290,463,441,877,740,000,000,000,000,000,000,000 | 50 | patch 8.2.3487: illegal memory access if buffer name is very long
Problem: Illegal memory access if buffer name is very long.
Solution: Make sure not to go over the end of the buffer. |
static int backref_match_at_nested_level(regex_t* reg
, OnigStackType* top, OnigStackType* stk_base
, int ignore_case, int case_fold_flag
, int nest, int mem_num, UChar* memp, UChar** s, const UChar* send)
{
UChar *ss, *p, *pstart, *pend = NULL_UCHARP;
int level;
OnigStackType* k;
level = 0;
k = top;
... | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 105,463,502,208,267,350,000,000,000,000,000,000,000 | 55 | onig-5.9.2 |
dwg_ref_object_relative (const Dwg_Data *restrict dwg,
Dwg_Object_Ref *restrict ref,
const Dwg_Object *restrict obj)
{
if (ref->obj && !dwg->dirty_refs)
return ref->obj;
if (dwg_resolve_handleref (ref, obj))
{
Dwg_Object *o = dwg_resolve_handle (dwg, r... | 0 | [
"CWE-787"
] | libredwg | ecf5183d8b3b286afe2a30021353b7116e0208dd | 177,575,650,807,031,930,000,000,000,000,000,000,000 | 16 | dwg_section_wtype: fix fuzzing overflow
with illegal and overlong section names. Fixes GH #349, #352
section names cannot be longer than 24 |
void io_printf(int fd, const char *format, ...)
{
va_list ap;
char buf[BIGPATHBUFLEN];
int len;
va_start(ap, format);
len = vsnprintf(buf, sizeof buf, format, ap);
va_end(ap);
if (len < 0)
exit_cleanup(RERR_PROTOCOL);
if (len >= (int)sizeof buf) {
rprintf(FERROR, "io_printf() was too long for the buffer.... | 0 | [] | rsync | b7231c7d02cfb65d291af74ff66e7d8c507ee871 | 227,135,003,977,066,300,000,000,000,000,000,000,000 | 20 | Some extra file-list safety checks. |
void KrecipesView::show ( void )
{
slotSetPanel( SelectP );
QWidget::show();
} | 0 | [] | krecipes | cd1490fb5fe82cbe9172a43be13298001b446ecd | 321,609,973,777,224,220,000,000,000,000,000,000,000 | 5 | Use WebKit instead of KHTML for printing recipes, fixes sourceforge #2990118 and
#2960140.
svn path=/trunk/extragear/utils/krecipes/; revision=1137824 |
static int vfswrap_fchown(vfs_handle_struct *handle, files_struct *fsp, uid_t uid, gid_t gid)
{
#ifdef HAVE_FCHOWN
int result;
START_PROFILE(syscall_fchown);
result = fchown(fsp->fh->fd, uid, gid);
END_PROFILE(syscall_fchown);
return result;
#else
errno = ENOSYS;
return -1;
#endif
} | 0 | [
"CWE-665"
] | samba | 30e724cbff1ecd90e5a676831902d1e41ec1b347 | 88,653,748,538,625,750,000,000,000,000,000,000,000 | 14 | FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zero
Otherwise num_volumes and the end marker can return uninitialized data
to the client.
Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org> |
setup_bus_child (gpointer data)
{
A11yBusLauncher *app = data;
(void) app;
close (app->pipefd[0]);
dup2 (app->pipefd[1], 3);
close (app->pipefd[1]);
/* On Linux, tell the bus process to exit if this process goes away */
#ifdef __linux
#include <sys/prctl.h>
prctl (PR_SET_PDEATHSIG, 15);
#endif
} | 0 | [] | at-spi2-core | c2e87fe00b596dba20c9d57d406ab8faa744b15a | 213,088,916,003,762,300,000,000,000,000,000,000,000 | 15 | Fix inverted logic.
Don't write more into a buffer than it can hold.
https://bugzilla.gnome.org/show_bug.cgi?id=791124 |
bool Item_in_subselect::test_limit(st_select_lex_unit *unit_arg)
{
if (unit_arg->fake_select_lex &&
unit_arg->fake_select_lex->test_limit())
return(1);
SELECT_LEX *sl= unit_arg->first_select();
for (; sl; sl= sl->next_select())
{
if (sl->test_limit())
return(1);
}
return(0);
} | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 146,367,907,676,467,450,000,000,000,000,000,000,000 | 14 | MDEV-25994: Crash with union of my_decimal type in ORDER BY clause
When single-row subquery fails with "Subquery reutrns more than 1 row"
error, it will raise an error and return NULL.
On the other hand, Item_singlerow_subselect sets item->maybe_null=0
for table-less subqueries like "(SELECT not_null_value)" (*)
Th... |
compileString(const char *inString, CharacterClass **characterClasses,
TranslationTableCharacterAttributes *characterClassAttribute,
short opcodeLengths[], TranslationTableOffset *newRuleOffset,
TranslationTableRule **newRule, RuleName **ruleNames,
TranslationTableHeader **table) {
/* This function can be used... | 0 | [
"CWE-787"
] | liblouis | fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde | 160,577,408,148,992,620,000,000,000,000,000,000,000 | 21 | Fix yet another buffer overflow in the braille table parser
Reported by Henri Salo
Fixes #592 |
int nfs_initiate_commit(struct rpc_clnt *clnt, struct nfs_commit_data *data,
const struct rpc_call_ops *call_ops,
int how, int flags)
{
struct rpc_task *task;
int priority = flush_task_priority(how);
struct rpc_message msg = {
.rpc_argp = &data->args,
.rpc_resp = &data->res,
.rpc_cred = data->cred,
};
... | 0 | [
"CWE-20",
"CWE-200"
] | linux | 263b4509ec4d47e0da3e753f85a39ea12d1eff24 | 321,710,933,013,495,450,000,000,000,000,000,000,000 | 37 | nfs: always make sure page is up-to-date before extending a write to cover the entire page
We should always make sure the cached page is up-to-date when we're
determining whether we can extend a write to cover the full page -- even
if we've received a write delegation from the server.
Commit c7559663 added logic to s... |
sched_feat_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{
char buf[64];
char *cmp;
int i;
if (cnt > 63)
cnt = 63;
if (copy_from_user(&buf, ubuf, cnt))
return -EFAULT;
buf[cnt] = 0;
cmp = strstrip(buf);
i = sched_feat_set(cmp);
if (i == __SCHED_FEAT_NR)
return -EINVAL;... | 0 | [
"CWE-200"
] | linux | 4efbc454ba68def5ef285b26ebfcfdb605b52755 | 204,802,201,250,320,800,000,000,000,000,000,000,000 | 24 | sched: Fix information leak in sys_sched_getattr()
We're copying the on-stack structure to userspace, but forgot to give
the right number of bytes to copy. This allows the calling process to
obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent
kernel memory).
This fix copies only as much as we actually ... |
MagickExport DrawInfo *CloneDrawInfo(const ImageInfo *image_info,
const DrawInfo *draw_info)
{
DrawInfo
*clone_info;
ExceptionInfo
*exception;
clone_info=(DrawInfo *) AcquireMagickMemory(sizeof(*clone_info));
if (clone_info == (DrawInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"Memor... | 0 | [
"CWE-399",
"CWE-119"
] | ImageMagick | 726812fa2fa7ce16bcf58f6e115f65427a1c0950 | 67,134,845,912,661,660,000,000,000,000,000,000,000 | 107 | Prevent buffer overflow in magick/draw.c |
static void gen_reset_hflag(DisasContext *s, uint32_t mask)
{
if (s->flags & mask) {
TCGv_i32 t = tcg_temp_new_i32();
tcg_gen_ld_i32(t, cpu_env, offsetof(CPUX86State, hflags));
tcg_gen_andi_i32(t, t, ~mask);
tcg_gen_st_i32(t, cpu_env, offsetof(CPUX86State, hflags));
tcg_temp_... | 0 | [
"CWE-94"
] | qemu | 30663fd26c0307e414622c7a8607fbc04f92ec14 | 338,426,065,718,723,160,000,000,000,000,000,000,000 | 11 | tcg/i386: Check the size of instruction being translated
This fixes the bug: 'user-to-root privesc inside VM via bad translation
caching' reported by Jann Horn here:
https://bugs.chromium.org/p/project-zero/issues/detail?id=1122
Reviewed-by: Richard Henderson <rth@twiddle.net>
CC: Peter Maydell <peter.maydell@linaro.... |
static RAMBlock *qemu_get_ram_block(ram_addr_t addr)
{
RAMBlock *block;
block = atomic_rcu_read(&ram_list.mru_block);
if (block && addr - block->offset < block->max_length) {
return block;
}
RAMBLOCK_FOREACH(block) {
if (addr - block->offset < block->max_length) {
goto f... | 0 | [
"CWE-125"
] | qemu | 04bf2526ce87f21b32c9acba1c5518708c243ad0 | 243,908,667,241,637,780,000,000,000,000,000,000,000 | 37 | exec: use qemu_ram_ptr_length to access guest ram
When accessing guest's ram block during DMA operation, use
'qemu_ram_ptr_length' to get ram block pointer. It ensures
that DMA operation of given length is possible; And avoids
any OOB memory access situations.
Reported-by: Alex <broscutamaker@gmail.com>
Signed-off-by... |
static inline int zpff_init(struct hid_device *hid)
{
return 0;
} | 1 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 21,292,509,463,556,524,000,000,000,000,000,000,000 | 4 | HID: Fix assumption that devices have inputs
The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff
driver. The problem is caused by the driver's assumption that the
device must have an input report. While this will be true for all
normal HID input devices, a suitably malicious device can violate the... |
static void __vmx_complete_interrupts(struct kvm_vcpu *vcpu,
u32 idt_vectoring_info,
int instr_len_field,
int error_code_field)
{
u8 vector;
int type;
bool idtv_info_valid;
idtv_info_valid = idt_vectoring_info & VECTORING_INFO_VALID_MASK;
vcpu->arch.nmi_injected = false;
kvm_clear_... | 0 | [] | kvm | a642fc305053cc1c6e47e4f4df327895747ab485 | 136,885,787,296,316,570,000,000,000,000,000,000,000 | 53 | kvm: vmx: handle invvpid vm exit gracefully
On systems with invvpid instruction support (corresponding bit in
IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid
causes vm exit, which is currently not handled and results in
propagation of unknown exit to userspace.
Fix this by installing an invvpid vm exit ... |
a2port(const char *s)
{
struct servent *se;
long long port;
const char *errstr;
port = strtonum(s, 0, 65535, &errstr);
if (errstr == NULL)
return (int)port;
if ((se = getservbyname(s, "tcp")) != NULL)
return ntohs(se->s_port);
return -1;
} | 0 | [] | openssh-portable | f3cbe43e28fe71427d41cfe3a17125b972710455 | 10,229,006,911,223,411,000,000,000,000,000,000,000 | 13 | upstream: need initgroups() before setresgid(); reported by anton@,
ok deraadt@
OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce |
static void *udp_seq_start(struct seq_file *seq, loff_t *pos)
{
read_lock(&udp_hash_lock);
return *pos ? udp_get_idx(seq, *pos-1) : (void *)1;
} | 0 | [] | linux-2.6 | 32c1da70810017a98aa6c431a5494a302b6b9a30 | 321,288,858,554,455,040,000,000,000,000,000,000,000 | 5 | [UDP]: Randomize port selection.
This patch causes UDP port allocation to be randomized like TCP.
The earlier code would always choose same port (ie first empty list).
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net> |
HANDLE ves_icall_System_Threading_Thread_Thread_internal(MonoThread *this,
MonoObject *start)
{
guint32 (*start_func)(void *);
struct StartInfo *start_info;
HANDLE thread;
gsize tid;
MonoInternalThread *internal;
THREAD_DEBUG (g_message("%s: Trying to start a new thread: this (%p) start (%p)", __func__, ... | 0 | [
"CWE-399",
"CWE-264"
] | mono | 722f9890f09aadfc37ae479e7d946d5fc5ef7b91 | 231,144,950,822,846,270,000,000,000,000,000,000,000 | 92 | Fix access to freed members of a dead thread
* threads.c: Fix access to freed members of a dead thread. Found
and fixed by Rodrigo Kumpera <rkumpera@novell.com>
Ref: CVE-2011-0992 |
void CServer::ConStopRecord(IConsole::IResult *pResult, void *pUser)
{
((CServer *)pUser)->m_DemoRecorder.Stop();
} | 0 | [
"CWE-20"
] | teeworlds | a766cb44bcffcdb0b88e776d01c5ee1323d44f85 | 285,315,944,889,916,300,000,000,000,000,000,000,000 | 4 | fixed a server crash |
int RESTArgs::get_uint32(struct req_state *s, const string& name,
uint32_t def_val, uint32_t *val, bool *existed)
{
bool exists;
string sval = s->info.args.get(name, &exists);
if (existed)
*existed = exists;
if (!exists) {
*val = def_val;
return 0;
}
int r = stringtoul(sval, val);
if (r... | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 237,381,210,060,805,840,000,000,000,000,000,000,000 | 20 | 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 <... |
//! Return \c true if input character is blank (space, tab, or non-printable character).
inline bool is_blank(const char c) {
return c>=0 && c<=' '; | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 148,979,036,118,727,930,000,000,000,000,000,000,000 | 3 | . |
parse_tsquery(char *buf,
PushFunction pushval,
Datum opaque,
bool isplain)
{
struct TSQueryParserStateData state;
int i;
TSQuery query;
int commonlen;
QueryItem *ptr;
ListCell *cell;
/* init state */
state.buffer = buf;
state.buf = buf;
state.state = (isplain) ? WAITSINGLEOPERAND : WAI... | 1 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 74,086,987,630,414,820,000,000,000,000,000,000,000 | 83 | 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... |
void NumberFormatTest::TestExponentParse() {
UErrorCode status = U_ZERO_ERROR;
Formattable result;
ParsePosition parsePos(0);
// set the exponent symbol
status = U_ZERO_ERROR;
DecimalFormatSymbols symbols(Locale::getDefault(), status);
if(U_FAILURE(status)) {
dataerrln((UnicodeStri... | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 182,592,639,972,806,000,000,000,000,000,000,000,000 | 32 | ICU-20246 Fixing another integer overflow in number parsing. |
xmlFAParseQuantifier(xmlRegParserCtxtPtr ctxt) {
int cur;
cur = CUR;
if ((cur == '?') || (cur == '*') || (cur == '+')) {
if (ctxt->atom != NULL) {
if (cur == '?')
ctxt->atom->quant = XML_REGEXP_QUANT_OPT;
else if (cur == '*')
ctxt->atom->quant = XML_REGEXP_QUANT_MULT;
else if (cur == '+... | 0 | [
"CWE-119"
] | libxml2 | cbb271655cadeb8dbb258a64701d9a3a0c4835b4 | 69,689,000,487,187,780,000,000,000,000,000,000,000 | 52 | Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711>
* xmlregexp.c:
(xmlFAParseCharRange): Only advance to the next character if
there is no error. Advancing to the next character in case of
an error while parsing regexp leads to an out of bounds access. |
xmlSchemaAddElementSubstitutionMember(xmlSchemaParserCtxtPtr pctxt,
xmlSchemaElementPtr head,
xmlSchemaElementPtr member)
{
xmlSchemaSubstGroupPtr substGroup = NULL;
if ((pctxt == NULL) || (head == NULL) || (member == NULL))
return (-1);
substGroup = xmlSchemaSubstGroupGet(pctxt, head... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 1,060,751,461,647,697,000,000,000,000,000,000,000 | 18 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
inline bool IsHybridOp(const TfLiteTensor* input, const TfLiteTensor* weight) {
return ((weight->type == kTfLiteUInt8 || weight->type == kTfLiteInt8) &&
input->type == kTfLiteFloat32);
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 46d5b0852528ddfd614ded79bccc75589f801bd9 | 255,268,135,514,242,750,000,000,000,000,000,000,000 | 4 | [tflite] Test for `kTfLiteOptionalTensor` in `GetInput`.
`GetInput`, `GetVariableInput` and `GetOutput` all fail to check for the case where `node->inputs->data[index]` is the special `kTfLiteOptionalTensor` value (-1) which then causes `context->tensors[node->inputs->data[index]]` to read from invalid memory location... |
static long snd_pcm_oss_bytes(struct snd_pcm_substream *substream, long frames)
{
struct snd_pcm_runtime *runtime = substream->runtime;
long buffer_size = snd_pcm_lib_buffer_bytes(substream);
long bytes = frames_to_bytes(runtime, frames);
if (buffer_size == runtime->oss.buffer_bytes)
return bytes;
#if BITS_PER_LO... | 0 | [
"CWE-362"
] | linux | 8423f0b6d513b259fdab9c9bf4aaa6188d054c2d | 113,949,406,328,903,200,000,000,000,000,000,000,000 | 16 | ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC
There is a small race window at snd_pcm_oss_sync() that is called from
OSS PCM SNDCTL_DSP_SYNC ioctl; namely the function calls
snd_pcm_oss_make_ready() at first, then takes the params_lock mutex
for the rest. When the stream is set up again by another thread
between them, ... |
int find_free_dev_extent_start(struct btrfs_transaction *transaction,
struct btrfs_device *device, u64 num_bytes,
u64 search_start, u64 *start, u64 *len)
{
struct btrfs_fs_info *fs_info = device->fs_info;
struct btrfs_root *root = fs_info->dev_root;
struct btrfs_key key;
struct btrfs_dev_extent ... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 274,657,255,743,536,640,000,000,000,000,000,000,000 | 160 | 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... |
static int select_idle_sibling(struct task_struct *p, int prev, int target)
{
struct sched_domain *sd;
int i, recent_used_cpu;
if (available_idle_cpu(target))
return target;
/*
* If the previous CPU is cache affine and idle, don't be stupid:
*/
if (prev != target && cpus_share_cache(prev, target) && availa... | 0 | [
"CWE-416"
] | linux | 16d51a590a8ce3befb1308e0e7ab77f3b661af33 | 80,532,435,922,017,260,000,000,000,000,000,000,000 | 47 | sched/fair: Don't free p->numa_faults with concurrent readers
When going through execve(), zero out the NUMA fault statistics instead of
freeing them.
During execve, the task is reachable through procfs and the scheduler. A
concurrent /proc/*/sched reader can read data from a freed ->numa_faults
allocation (confirmed... |
static bool zone_allows_reclaim(struct zone *local_zone, struct zone *zone)
{
return node_distance(zone_to_nid(local_zone), zone_to_nid(zone)) <=
RECLAIM_DISTANCE;
} | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 308,852,896,929,862,800,000,000,000,000,000,000,000 | 5 | mm: don't warn about allocations which stall for too long
Commit 63f53dea0c98 ("mm: warn about allocations which stall for too
long") was a great step for reducing possibility of silent hang up
problem caused by memory allocation stalls. But this commit reverts it,
for it is possible to trigger OOM lockup and/or soft... |
tty_clamp_line(struct tty *tty, const struct tty_ctx *ctx, u_int px, u_int py,
u_int nx, u_int *i, u_int *x, u_int *rx, u_int *ry)
{
struct window_pane *wp = ctx->wp;
u_int xoff = wp->xoff + px;
if (!tty_is_visible(tty, ctx, px, py, nx, 1))
return (0);
*ry = ctx->yoff + py - ctx->oy;
if (xoff >= ctx->ox... | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 65,289,045,038,995,200,000,000,000,000,000,000,000 | 36 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
static int ims_pcu_handle_firmware_update(struct ims_pcu *pcu,
const struct firmware *fw)
{
unsigned int n_fw_records;
int retval;
dev_info(pcu->dev, "Updating firmware %s, size: %zu\n",
IMS_PCU_FIRMWARE_NAME, fw->size);
n_fw_records = ims_pcu_count_fw_records(fw);
retval = ims_pcu_flash_firmware(pcu... | 0 | [
"CWE-703"
] | linux | a0ad220c96692eda76b2e3fd7279f3dcd1d8a8ff | 106,190,797,762,432,690,000,000,000,000,000,000,000 | 26 | Input: ims-pcu - sanity check against missing interfaces
A malicious device missing interface can make the driver oops.
Add sanity checking.
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> |
inline void Softmax(const float* input_data, const Dims<4>& input_dims,
float beta, float* output_data,
const Dims<4>& output_dims) {
Softmax(input_data, DimsToShape(input_dims), beta, output_data,
DimsToShape(output_dims));
} | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 167,457,934,222,326,020,000,000,000,000,000,000,000 | 6 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
static void xfrm_audit_common_policyinfo(struct xfrm_policy *xp,
struct audit_buffer *audit_buf)
{
struct xfrm_sec_ctx *ctx = xp->security;
struct xfrm_selector *sel = &xp->selector;
if (ctx)
audit_log_format(audit_buf, " sec_alg=%u sec_doi=%u sec_obj=%s",
ctx->ctx_alg, ctx->ctx_doi, ctx->ctx_str);
s... | 0 | [
"CWE-125"
] | ipsec | 7bab09631c2a303f87a7eb7e3d69e888673b9b7e | 230,169,368,633,517,400,000,000,000,000,000,000,000 | 33 | xfrm: policy: check policy direction value
The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used
as an array index. This can lead to an out-of-bound access, kernel lockup and
DoS. Add a check for the 'dir' value.
This fixes CVE-2017-11600.
References: https://bugzilla.redhat.com/show_bug.cgi?... |
message_handler (const gchar *log_domain,
GLogLevelFlags log_level,
const gchar *message,
gpointer user_data)
{
/* Make this look like normal console output */
if (log_level & G_LOG_LEVEL_DEBUG)
g_printerr ("F: %s\n", message);
else
g_printerr (... | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | aeb6a7ab0abaac4a8f4ad98b3df476d9de6b8bd4 | 325,818,870,859,075,670,000,000,000,000,000,000,000 | 11 | portal: Convert --env in extra-args into --env-fd
This hides overridden variables from the command-line, which means
processes running under other uids can't see them in /proc/*/cmdline,
which might be important if they contain secrets.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of: https://github.com/fl... |
static inline void posix_cpu_timers_init_group(struct signal_struct *sig) { } | 0 | [
"CWE-416",
"CWE-703"
] | linux | 2b7e8665b4ff51c034c55df3cff76518d1a9ee3a | 225,085,097,159,936,500,000,000,000,000,000,000,000 | 1 | fork: fix incorrect fput of ->exe_file causing use-after-free
Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for
write killable") made it possible to kill a forking task while it is
waiting to acquire its ->mmap_sem for write, in dup_mmap().
However, it was overlooked that this introduced an new erro... |
static int _meta_flag_preparse(token_t *tokens, const size_t ntokens,
struct _meta_flags *of, char **errstr) {
unsigned int i;
int32_t tmp_int;
uint8_t seen[127] = {0};
// Start just past the key token. Look at first character of each token.
for (i = KEY_TOKEN+1; i < ntokens-1; i++) {
... | 0 | [] | memcached | f249724cedcab6605ca8a0769ac4b356a8124f63 | 312,797,347,508,376,330,000,000,000,000,000,000,000 | 130 | crash fix: errstr wasn't initialized in metaget
if meta_flag_preparse bailed out early it would try to read
uninitialized memory. |
static int __sdt_alloc(const struct cpumask *cpu_map)
{
struct sched_domain_topology_level *tl;
int j;
for_each_sd_topology(tl) {
struct sd_data *sdd = &tl->data;
sdd->sd = alloc_percpu(struct sched_domain *);
if (!sdd->sd)
return -ENOMEM;
sdd->sg = alloc_percpu(struct sched_group *);
if (!sdd->sg)
... | 0 | [
"CWE-200"
] | linux | 4efbc454ba68def5ef285b26ebfcfdb605b52755 | 326,239,010,577,336,300,000,000,000,000,000,000,000 | 52 | sched: Fix information leak in sys_sched_getattr()
We're copying the on-stack structure to userspace, but forgot to give
the right number of bytes to copy. This allows the calling process to
obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent
kernel memory).
This fix copies only as much as we actually ... |
static inline int security_inode_create(struct inode *dir,
struct dentry *dentry,
int mode)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 30,541,137,555,398,145,000,000,000,000,000,000,000 | 6 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
xdr_dprinc_arg(XDR *xdrs, dprinc_arg *objp)
{
if (!xdr_ui_4(xdrs, &objp->api_version)) {
return (FALSE);
}
if (!xdr_krb5_principal(xdrs, &objp->princ)) {
return (FALSE);
}
return (TRUE);
} | 0 | [
"CWE-703"
] | krb5 | a197e92349a4aa2141b5dff12e9dd44c2a2166e3 | 182,414,707,019,207,330,000,000,000,000,000,000,000 | 10 | Fix kadm5/gssrpc XDR double free [CVE-2014-9421]
[MITKRB5-SA-2015-001] In auth_gssapi_unwrap_data(), do not free
partial deserialization results upon failure to deserialize. This
responsibility belongs to the callers, svctcp_getargs() and
svcudp_getargs(); doing it in the unwrap function results in freeing
the result... |
static int spl_autoload(const char *class_name, const char * lc_name, int class_name_len, const char * file_extension TSRMLS_DC) /* {{{ */
{
char *class_file;
int class_file_len;
int dummy = 1;
zend_file_handle file_handle;
zend_op_array *new_op_array;
zval *result = NULL;
int ret;
class_file_len = spprintf(&... | 0 | [] | php-src | b584b513983319be170f02828bc7c12850b40320 | 59,316,089,617,476,360,000,000,000,000,000,000,000 | 60 | Fixed bug #70290 (Null pointer deref (segfault) in spl_autoload via ob_start) |
get_executing (MonoMethod *m, gint32 no, gint32 ilo, gboolean managed, gpointer data)
{
MonoMethod **dest = data;
/* skip unmanaged frames */
if (!managed)
return FALSE;
if (!(*dest)) {
if (!strcmp (m->klass->name_space, "System.Reflection"))
return FALSE;
*dest = m;
return TRUE;
}
return FALSE;
} | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 262,056,140,424,357,100,000,000,000,000,000,000,000 | 16 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
dp_packet_ip_checksum_bad(const struct dp_packet *p OVS_UNUSED)
{
return false;
} | 0 | [
"CWE-400"
] | ovs | 3512fb512c76a1f08eba4005aa2eb69160d0840e | 5,440,970,865,838,749,000,000,000,000,000,000,000 | 4 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
void saio_del(GF_Box *s)
{
GF_SampleAuxiliaryInfoOffsetBox *ptr = (GF_SampleAuxiliaryInfoOffsetBox*)s;
if (ptr == NULL) return;
if (ptr->offsets) gf_free(ptr->offsets);
if (ptr->offsets_large) gf_free(ptr->offsets_large);
gf_free(ptr); | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 327,692,177,939,004,750,000,000,000,000,000,000,000 | 8 | prevent dref memleak on invalid input (#1183) |
void EvalSparseHybridImpl(TfLiteContext* context, TfLiteNode* node,
TfLiteFullyConnectedParams* params, OpData* data,
const TfLiteTensor* input, const TfLiteTensor* filter,
const TfLiteTensor* bias, int thread_start,
... | 0 | [
"CWE-369"
] | tensorflow | 718721986aa137691ee23f03638867151f74935f | 209,843,386,670,462,520,000,000,000,000,000,000,000 | 77 | Prevent division by 0 in `fully_connected.cc`
PiperOrigin-RevId: 385137282
Change-Id: If201e69b6e0048f0be001330b4b977e2b46db2cb |
static uchar* get_grant_table(GRANT_NAME *buff, size_t *length,
my_bool not_used __attribute__((unused)))
{
*length=buff->key_length;
return (uchar*) buff->hash_key;
} | 0 | [] | mysql-server | 25d1b7e03b9b375a243fabdf0556c063c7282361 | 218,334,366,762,301,600,000,000,000,000,000,000,000 | 6 | Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string |
_gcry_ecc_gost_sign (gcry_mpi_t input, ECC_secret_key *skey,
gcry_mpi_t r, gcry_mpi_t s)
{
gpg_err_code_t rc = 0;
gcry_mpi_t k, dr, sum, ke, x, e;
mpi_point_struct I;
gcry_mpi_t hash;
const void *abuf;
unsigned int abits, qbits;
mpi_ec_t ctx;
if (DBG_CIPHER)
log_mpidump ("gost ... | 1 | [
"CWE-203"
] | libgcrypt | 7c2943309d14407b51c8166c4dcecb56a3628567 | 310,920,962,825,354,200,000,000,000,000,000,000,000 | 94 | dsa,ecdsa: Fix use of nonce, use larger one.
* cipher/dsa-common.c (_gcry_dsa_modify_k): New.
* cipher/pubkey-internal.h (_gcry_dsa_modify_k): New.
* cipher/dsa.c (sign): Use _gcry_dsa_modify_k.
* cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_sign): Likewise.
* cipher/ecc-gost.c (_gcry_ecc_gost_sign): Likewise.
CVE-id: CVE-201... |
void CiffHeader::print(std::ostream& os, const std::string& prefix) const
{
std::ios::fmtflags f( os.flags() );
os << prefix
<< _("Header, offset") << " = 0x" << std::setw(8) << std::setfill('0')
<< std::hex << std::right << offset_ << "\n";
if (pRootDir_) pRootDir_... | 0 | [
"CWE-400"
] | exiv2 | b3d077dcaefb6747fff8204490f33eba5a144edb | 123,483,883,693,636,650,000,000,000,000,000,000,000 | 9 | Fix #460 by adding more checks in CiffDirectory::readDirectory |
static int _rtl_usb_receive(struct ieee80211_hw *hw)
{
struct urb *urb;
int err;
int i;
struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
WARN_ON(0 == rtlusb->rx_urb_num);
/* 1600 == 1514 + max WLAN header + rtk info */
WARN_ON(rtlusb->rx_max_size < 1600);
for (i = 0; i < rtlusb->rx_urb_num; i++) {
err ... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 3f93616951138a598d930dcaec40f2bfd9ce43bb | 28,325,736,381,329,965,000,000,000,000,000,000,000 | 37 | rtlwifi: prevent memory leak in rtl_usb_probe
In rtl_usb_probe if allocation for usb_data fails the allocated hw
should be released. In addition the allocated rtlpriv->usb_data should
be released on error handling path.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeau... |
static bool ok_inflater_compressed_block(ok_inflater *inflater) {
const bool is_fixed = inflater->state == OK_INFLATER_STATE_READING_FIXED_COMPRESSED_BLOCK;
const ok_inflater_huffman_tree *literal_tree =
(is_fixed ? inflater->fixed_literal_huffman : inflater->literal_huffman);
const ok_inflater_huff... | 0 | [
"CWE-787"
] | ok-file-formats | e49cdfb84fb5eca2a6261f3c51a3c793fab9f62e | 315,570,036,355,235,570,000,000,000,000,000,000,000 | 45 | ok_png: Disallow multiple IHDR chunks (#15) |
TEST_F(ConnectionManagerUtilityTest, ContinueIfEscapedSlashesNotFoundAndConfiguredToRedirect) {
ON_CALL(config_, pathWithEscapedSlashesAction())
.WillByDefault(Return(envoy::extensions::filters::network::http_connection_manager::v3::
HttpConnectionManager::UNESCAPE_AND_REDIRECT))... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 15,584,658,866,602,168,000,000,000,000,000,000,000 | 12 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
void CWebServer::Cmd_ClearLog(WebEmSession & session, const request& req, Json::Value &root)
{
root["status"] = "OK";
root["title"] = "ClearLog";
_log.ClearLog();
} | 0 | [
"CWE-89"
] | domoticz | ee70db46f81afa582c96b887b73bcd2a86feda00 | 203,947,333,998,263,400,000,000,000,000,000,000,000 | 6 | Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!) |
win_init_size(void)
{
firstwin->w_height = ROWS_AVAIL;
topframe->fr_height = ROWS_AVAIL;
firstwin->w_width = Columns;
topframe->fr_width = Columns;
} | 0 | [
"CWE-416"
] | vim | ec66c41d84e574baf8009dbc0bd088d2bc5b2421 | 63,471,513,963,274,820,000,000,000,000,000,000,000 | 7 | 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) |
virNodeDevCapPCIDevParseXML(xmlXPathContextPtr ctxt,
virNodeDeviceDefPtr def,
xmlNodePtr node,
virNodeDevCapPCIDevPtr pci_dev)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr iommuGroupNode;
xmlNodePtr pciExpress;
xmlNodeP... | 0 | [
"CWE-119"
] | libvirt | 4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a | 185,495,564,130,212,030,000,000,000,000,000,000,000 | 109 | conf: Fix segfault when parsing mdev types
Commit f1b0890 introduced a potential crash due to incorrect operator
precedence when accessing an element from a pointer to an array.
Backtrace below:
#0 virNodeDeviceGetMdevTypesCaps (sysfspath=0x7fff801661e0 "/sys/devices/pci0000:00/0000:00:02.0", mdev_types=0x7fff801... |
cdf_dump(void *v, size_t len)
{
size_t i, j;
unsigned char *p = v;
char abuf[16];
(void)fprintf(stderr, "%.4x: ", 0);
for (i = 0, j = 0; i < len; i++, p++) {
(void)fprintf(stderr, "%.2x ", *p);
abuf[j++] = isprint(*p) ? *p : '.';
if (j == 16) {
j = 0;
abuf[15] = '\0';
(void)fprintf(stderr, "%s\n%.4"... | 0 | [
"CWE-119"
] | file | 1140872578eedaeecf828f1841d17ff574372dba | 183,300,078,831,096,080,000,000,000,000,000,000,000 | 18 | - add float and double types
- fix debug printf formats
- fix short stream sizes
- don't fail if we don't know about a type |
Status privilegeVectorToBSONArray(const PrivilegeVector& privileges, BSONArray* result) {
BSONArrayBuilder arrBuilder;
for (PrivilegeVector::const_iterator it = privileges.begin(); it != privileges.end(); ++it) {
const Privilege& privilege = *it;
ParsedPrivilege parsedPrivilege;
std::st... | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 79,831,873,125,636,390,000,000,000,000,000,000,000 | 18 | SERVER-38984 Validate unique User ID on UserCache hit |
const char* XMLRPC_RequestSetMethodName(XMLRPC_REQUEST request, const char* methodName) {
if(request) {
simplestring_clear(&request->methodName);
simplestring_add(&request->methodName, methodName);
return request->methodName.str;
}
return NULL;
} | 0 | [
"CWE-119"
] | php-src | 88412772d295ebf7dd34409534507dc9bcac726e | 130,577,393,458,453,470,000,000,000,000,000,000,000 | 8 | Fix bug #68027 - fix date parsing in XMLRPC lib |
int TS_MSG_IMPRINT_print_bio(BIO *bio, TS_MSG_IMPRINT *a)
{
ASN1_OCTET_STRING *msg;
TS_X509_ALGOR_print_bio(bio, TS_MSG_IMPRINT_get_algo(a));
BIO_printf(bio, "Message data:\n");
msg = TS_MSG_IMPRINT_get_msg(a);
BIO_dump_indent(bio, (const char *)M_ASN1_STRING_data(msg),
M_ASN1_STRING_length(msg), 4);
retu... | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 203,061,500,788,008,070,000,000,000,000,000,000,000 | 13 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
CImgDisplay& move(const int posx, const int posy) {
if (is_empty()) return *this;
if (_window_x!=posx || _window_y!=posy) {
if (!_is_fullscreen) {
RECT rect;
rect.left = rect.top = 0; rect.right = (LONG)_window_width - 1; rect.bottom = (LONG)_window_height - 1;
Adj... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 116,706,287,631,234,930,000,000,000,000,000,000,000 | 19 | Fix other issues in 'CImg<T>::load_bmp()'. |
TEST_P(SdsDynamicDownstreamCertValidationContextTest, CombinedValidationContextWithSharedSecret) {
enableCombinedValidationContext(true);
shareValidationSecret(true);
on_server_init_function_ = [this]() {
createSdsStream(*(fake_upstreams_[1]));
sendSdsResponse(getCvcSecretWithOnlyTrustedCa());
};
init... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 294,829,617,204,250,500,000,000,000,000,000,000,000 | 21 | 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... |
create_attr_ival(
int attr,
int value
)
{
attr_val *my_val;
my_val = emalloc_zero(sizeof(*my_val));
my_val->attr = attr;
my_val->value.i = value;
my_val->type = T_Integer;
return my_val;
} | 0 | [
"CWE-19"
] | ntp | fe46889f7baa75fc8e6c0fcde87706d396ce1461 | 148,922,125,622,517,050,000,000,000,000,000,000,000 | 14 | [Sec 2942]: Off-path DoS attack on auth broadcast mode. HStenn. |
static int mxf_read_header(AVFormatContext *s)
{
MXFContext *mxf = s->priv_data;
KLVPacket klv;
int64_t essence_offset = 0;
int64_t last_pos = -1;
uint64_t last_pos_index = 1;
int ret;
mxf->last_forward_tell = INT64_MAX;
mxf->edit_units_per_packet = 1;
if (!mxf_read_sync(s->pb, mxf... | 0 | [
"CWE-703"
] | FFmpeg | f173cdfe669556aa92857adafe60cbe5f2aa1210 | 130,537,631,542,949,500,000,000,000,000,000,000,000 | 157 | avformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array()
Fixes: 20170829A.mxf
Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 900f39692ca0337a98a7cf047e4e2611071810c... |
static int soft_offline_in_use_page(struct page *page, int flags)
{
int ret;
struct page *hpage = compound_head(page);
if (!PageHuge(page) && PageTransHuge(hpage)) {
lock_page(hpage);
if (!PageAnon(hpage) || unlikely(split_huge_page(hpage))) {
unlock_page(hpage);
if (!PageAnon(hpage))
pr_info("soft of... | 0 | [] | linux | c3901e722b2975666f42748340df798114742d6d | 38,483,790,193,530,018,000,000,000,000,000,000,000 | 28 | mm: hwpoison: fix thp split handling in memory_failure()
When memory_failure() runs on a thp tail page after pmd is split, we
trigger the following VM_BUG_ON_PAGE():
page:ffffd7cd819b0040 count:0 mapcount:0 mapping: (null) index:0x1
flags: 0x1fffc000400000(hwpoison)
page dumped because: VM_BUG_ON_PAG... |
ecma_destroy_ecma_string (ecma_string_t *string_p) /**< ecma-string */
{
JERRY_ASSERT (string_p != NULL);
JERRY_ASSERT (!ECMA_IS_DIRECT_STRING (string_p));
JERRY_ASSERT ((string_p->refs_and_container < ECMA_STRING_REF_ONE) || ECMA_STRING_IS_STATIC (string_p));
switch (ECMA_STRING_GET_CONTAINER (string_p))
{
... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 307,654,181,305,817,300,000,000,000,000,000,000,000 | 60 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
static ssize_t recovery_start_store(struct md_rdev *rdev, const char *buf, size_t len)
{
unsigned long long recovery_start;
if (cmd_match(buf, "none"))
recovery_start = MaxSector;
else if (kstrtoull(buf, 10, &recovery_start))
return -EINVAL;
if (rdev->mddev->pers &&
rdev->raid_disk >= 0)
return -EBUSY;... | 0 | [
"CWE-200"
] | linux | b6878d9e03043695dbf3fa1caa6dfc09db225b16 | 95,629,043,417,583,720,000,000,000,000,000,000,000 | 20 | md: use kzalloc() when bitmap is disabled
In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
mdu_bitmap_file_t called "file".
5769 file = kmalloc(sizeof(*file), GFP_NOIO);
5770 if (!file)
5771 return -ENOMEM;
This structure is copied to user space at the end of the fun... |
xps_init_truetype_font(xps_context_t *ctx, xps_font_t *font)
{
int code = 0;
font->font = (void*) gs_alloc_struct(ctx->memory, gs_font_type42, &st_gs_font_type42, "xps_font type42");
if (!font->font)
return gs_throw(gs_error_VMerror, "out of memory");
/* no shortage of things to initialize */
... | 0 | [
"CWE-119"
] | ghostpdl | 3c2aebbedd37fab054e80f2e315de07d7e9b5bdb | 207,008,593,509,182,070,000,000,000,000,000,000,000 | 93 | Bug 698044: restrict font name length to the buffer size. |
do_ip_vs_set_ctl(struct sock *sk, int cmd, void __user *user, unsigned int len)
{
struct net *net = sock_net(sk);
int ret;
unsigned char arg[MAX_ARG_LEN];
struct ip_vs_service_user *usvc_compat;
struct ip_vs_service_user_kern usvc;
struct ip_vs_service *svc;
struct ip_vs_dest_user *udest_compat;
struct ip_vs_de... | 0 | [
"CWE-200"
] | linux | 2d8a041b7bfe1097af21441cb77d6af95f4f4680 | 108,505,597,363,522,640,000,000,000,000,000,000,000 | 142 | ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT)
If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is
not set, __ip_vs_get_timeouts() does not fully initialize the structure
that gets copied to userland and that for leaks up to 12 bytes of kernel
stack. Add an explicit memset(0) before passing... |
findfilendir(
typval_T *argvars UNUSED,
typval_T *rettv,
int find_what UNUSED)
{
#ifdef FEAT_SEARCHPATH
char_u *fname;
char_u *fresult = NULL;
char_u *path = *curbuf->b_p_path == NUL ? p_path : curbuf->b_p_path;
char_u *p;
char_u pathbuf[NUMBUFLEN];
int count = 1;
int first = ... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 115,084,973,229,200,480,000,000,000,000,000,000,000 | 65 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
f_getcmdscreenpos(typval_T *argvars UNUSED, typval_T *rettv)
{
cmdline_info_T *p = get_ccline_ptr();
rettv->vval.v_number = p != NULL ? p->cmdspos + 1 : 0;
} | 0 | [
"CWE-416"
] | vim | 1c3dd8ddcba63c1af5112e567215b3cec2de11d0 | 254,614,686,902,485,700,000,000,000,000,000,000,000 | 6 | patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Problem: Using freed memory with cmdwin and BufEnter autocmd.
Solution: Make sure pointer to b_p_iminsert is still valid. |
void free_pages_exact(void *virt, size_t size)
{
unsigned long addr = (unsigned long)virt;
unsigned long end = addr + PAGE_ALIGN(size);
while (addr < end) {
free_page(addr);
addr += PAGE_SIZE;
}
} | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 103,910,749,823,634,600,000,000,000,000,000,000,000 | 10 | mm: don't warn about allocations which stall for too long
Commit 63f53dea0c98 ("mm: warn about allocations which stall for too
long") was a great step for reducing possibility of silent hang up
problem caused by memory allocation stalls. But this commit reverts it,
for it is possible to trigger OOM lockup and/or soft... |
static inline void gen_op_testl_T0_T1_cc(void)
{
tcg_gen_and_tl(cpu_cc_dst, cpu_T0, cpu_T1);
} | 0 | [
"CWE-94"
] | qemu | 30663fd26c0307e414622c7a8607fbc04f92ec14 | 102,364,961,485,211,550,000,000,000,000,000,000,000 | 4 | tcg/i386: Check the size of instruction being translated
This fixes the bug: 'user-to-root privesc inside VM via bad translation
caching' reported by Jann Horn here:
https://bugs.chromium.org/p/project-zero/issues/detail?id=1122
Reviewed-by: Richard Henderson <rth@twiddle.net>
CC: Peter Maydell <peter.maydell@linaro.... |
soup_auth_ntlm_finalize (GObject *object)
{
SoupAuthNTLMPrivate *priv = soup_auth_ntlm_get_instance_private (SOUP_AUTH_NTLM (object));
g_free (priv->username);
g_free (priv->domain);
memset (priv->nt_hash, 0, sizeof (priv->nt_hash));
memset (priv->lm_hash, 0, sizeof (priv->lm_hash));
#ifdef USE_NTLM_AUTH
sso_n... | 0 | [
"CWE-125"
] | libsoup | f8a54ac85eec2008c85393f331cdd251af8266ad | 3,793,070,642,111,338,500,000,000,000,000,000,000 | 16 | NTLM: Avoid a potential heap buffer overflow in v2 authentication
Check the length of the decoded v2 challenge before attempting to
parse it, to avoid reading past it.
Fixes #173 |
GF_Box *avcc_box_new()
{
GF_AVCConfigurationBox *tmp = (GF_AVCConfigurationBox *) gf_malloc(sizeof(GF_AVCConfigurationBox));
if (tmp == NULL) return NULL;
memset(tmp, 0, sizeof(GF_AVCConfigurationBox));
tmp->type = GF_ISOM_BOX_TYPE_AVCC;
return (GF_Box *)tmp;
} | 0 | [
"CWE-401"
] | gpac | 0a85029d694f992f3631e2f249e4999daee15cbf | 293,058,273,887,973,420,000,000,000,000,000,000,000 | 8 | fixed #1785 (fuzz) |
static void complete_incr_bin(conn *c) {
item *it;
char *key;
size_t nkey;
/* Weird magic in add_delta forces me to pad here */
char tmpbuf[INCR_MAX_STORAGE_LEN];
uint64_t cas = 0;
protocol_binary_response_incr* rsp = (protocol_binary_response_incr*)c->wbuf;
protocol_binary_request_incr... | 0 | [
"CWE-190"
] | memcached | bd578fc34b96abe0f8d99c1409814a09f51ee71c | 174,367,827,284,680,140,000,000,000,000,000,000,000 | 98 | CVE reported by cisco talos |
static int veth_validate(struct nlattr *tb[], struct nlattr *data[])
{
if (tb[IFLA_ADDRESS]) {
if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN)
return -EINVAL;
if (!is_valid_ether_addr(nla_data(tb[IFLA_ADDRESS])))
return -EADDRNOTAVAIL;
}
if (tb[IFLA_MTU]) {
if (!is_valid_veth_mtu(nla_get_u32(tb[IFLA_MTU])))
... | 0 | [
"CWE-399"
] | linux | 6ec82562ffc6f297d0de36d65776cff8e5704867 | 223,581,417,108,674,400,000,000,000,000,000,000,000 | 14 | veth: Dont kfree_skb() after dev_forward_skb()
In case of congestion, netif_rx() frees the skb, so we must assume
dev_forward_skb() also consume skb.
Bug introduced by commit 445409602c092
(veth: move loopback logic to common location)
We must change dev_forward_skb() to always consume skb, and veth to not
double fr... |
gdm_session_new (GdmSessionVerificationMode verification_mode,
uid_t allowed_user,
const char *display_name,
const char *display_hostname,
const char *display_device,
... | 0 | [] | gdm | 5ac224602f1d603aac5eaa72e1760d3e33a26f0a | 140,015,224,188,529,520,000,000,000,000,000,000,000 | 26 | session: disconnect signals from worker proxy when conversation is freed
We don't want an outstanding reference on the worker proxy to lead to
signal handlers getting dispatched after the conversation is freed.
https://bugzilla.gnome.org/show_bug.cgi?id=758032 |
static void enable_step(struct task_struct *child, bool block)
{
/*
* Make sure block stepping (BTF) is not enabled unless it should be.
* Note that we don't try to worry about any is_setting_trap_flag()
* instructions after the first when using block stepping.
* So no one should try to use debugger block step... | 0 | [
"CWE-20",
"CWE-362"
] | linux | 9899d11f654474d2d54ea52ceaa2a1f4db3abd68 | 186,398,726,262,849,700,000,000,000,000,000,000,000 | 14 | ptrace: ensure arch_ptrace/ptrace_request can never race with SIGKILL
putreg() assumes that the tracee is not running and pt_regs_access() can
safely play with its stack. However a killed tracee can return from
ptrace_stop() to the low-level asm code and do RESTORE_REST, this means
that debugger can actually read/mod... |
void http_parse_connection_header(struct http_txn *txn, struct http_msg *msg, int to_del)
{
struct hdr_ctx ctx;
const char *hdr_val = "Connection";
int hdr_len = 10;
if (txn->flags & TX_HDR_CONN_PRS)
return;
if (unlikely(txn->flags & TX_USE_PX_CONN)) {
hdr_val = "Proxy-Connection";
hdr_len = 16;
}
ctx.i... | 0 | [] | haproxy | aae75e3279c6c9bd136413a72dafdcd4986bb89a | 55,505,483,470,069,330,000,000,000,000,000,000,000 | 39 | BUG/CRITICAL: using HTTP information in tcp-request content may crash the process
During normal HTTP request processing, request buffers are realigned if
there are less than global.maxrewrite bytes available after them, in
order to leave enough room for rewriting headers after the request. This
is done in http_wait_fo... |
svcauth_gss_accept_sec_context(struct svc_req *rqst,
struct rpc_gss_init_res *gr)
{
struct svc_rpc_gss_data *gd;
struct rpc_gss_cred *gc;
gss_buffer_desc recv_tok, seqbuf;
gss_OID mech;
OM_uint32 maj_stat = 0, min_stat = 0, ret_flags, seq;
log_debug("in svcauth_gss_accept_context()");
gd = SVC... | 1 | [
"CWE-200"
] | krb5 | 5bb8a6b9c9eb8dd22bc9526751610aaa255ead9c | 257,295,965,070,572,100,000,000,000,000,000,000,000 | 122 | Fix gssrpc data leakage [CVE-2014-9423]
[MITKRB5-SA-2015-001] In svcauth_gss_accept_sec_context(), do not copy
bytes from the union context into the handle field we send to the
client. We do not use this handle field, so just supply a fixed
string of "xxxx".
In gss_union_ctx_id_struct, remove the unused "interposer"... |
void bgp_dump_routes_attr(struct stream *s, struct attr *attr,
struct prefix *prefix)
{
unsigned long cp;
unsigned long len;
size_t aspath_lenp;
struct aspath *aspath;
int addpath_encode = 0;
uint32_t addpath_tx_id = 0;
/* Remember current pointer. */
cp = stream_get_endp(s);
/* Place holder of length. ... | 0 | [
"CWE-20",
"CWE-436"
] | frr | 943d595a018e69b550db08cccba1d0778a86705a | 44,029,970,126,037,300,000,000,000,000,000,000,000 | 163 | bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined
Signed-off-by: Lou Berger <lberger@labn.net> |
static bool trap_dbgauthstatus_el1(struct kvm_vcpu *vcpu,
struct sys_reg_params *p,
const struct sys_reg_desc *r)
{
if (p->is_write) {
return ignore_write(vcpu, p);
} else {
p->regval = read_sysreg(dbgauthstatus_el1);
return true;
}
} | 0 | [
"CWE-20",
"CWE-617"
] | linux | 9e3f7a29694049edd728e2400ab57ad7553e5aa9 | 304,269,066,422,316,120,000,000,000,000,000,000,000 | 11 | arm64: KVM: pmu: Fix AArch32 cycle counter access
We're missing the handling code for the cycle counter accessed
from a 32bit guest, leading to unexpected results.
Cc: stable@vger.kernel.org # 4.6+
Signed-off-by: Wei Huang <wei@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> |
static const char *ModeToString(PSDImageType type)
{
switch (type)
{
case BitmapMode: return "Bitmap";
case GrayscaleMode: return "Grayscale";
case IndexedMode: return "Indexed";
case RGBMode: return "RGB";
case CMYKMode: return "CMYK";
case MultichannelMode: return "Multichannel";
case... | 0 | [] | ImageMagick | bd9f1e7d1bd2c8e2cf7895d133c5c5b5cd3526b6 | 229,469,984,288,374,500,000,000,000,000,000,000,000 | 15 | Fixed memory leak when reading incorrect PSD files |
int check_frequency(struct wif *wi[], int cards)
{
int i, freq;
for(i=0; i<cards; i++)
{
freq = wi_get_freq(wi[i]);
if(freq < 0) continue;
if(G.frequency[i] != freq)
{
memset(G.message, '\x00', sizeof(G.message));
snprintf(G.message, sizeof(G.message),... | 0 | [
"CWE-787"
] | aircrack-ng | ff70494dd389ba570dbdbf36f217c28d4381c6b5 | 328,288,212,086,341,150,000,000,000,000,000,000,000 | 16 | Airodump-ng: Fixed GPS stack overflow (Closes #13 on GitHub).
git-svn-id: http://svn.aircrack-ng.org/trunk@2416 28c6078b-6c39-48e3-add9-af49d547ecab |
cifs_find_tcon(struct cifs_ses *ses, const char *unc)
{
struct list_head *tmp;
struct cifs_tcon *tcon;
spin_lock(&cifs_tcp_ses_lock);
list_for_each(tmp, &ses->tcon_list) {
tcon = list_entry(tmp, struct cifs_tcon, tcon_list);
if (!match_tcon(tcon, unc))
continue;
++tcon->tc_count;
spin_unlock(&cifs_tcp_s... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 1fc29bacedeabb278080e31bb9c1ecb49f143c3b | 290,607,253,701,991,150,000,000,000,000,000,000,000 | 17 | cifs: fix off-by-one bug in build_unc_path_to_root
commit 839db3d10a (cifs: fix up handling of prefixpath= option) changed
the code such that the vol->prepath no longer contained a leading
delimiter and then fixed up the places that accessed that field to
account for that change.
One spot in build_unc_path_to_root wa... |
KernelAndDeviceFunc::~KernelAndDeviceFunc() {
if (handle_ != kInvalidHandle) {
Status status = pflr_->ReleaseHandle(handle_);
if (!status.ok()) {
LOG(INFO) << "Ignoring error status when releasing multi-device function "
"handle "
<< status.ToString();
}
}
} | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | da8558533d925694483d2c136a9220d6d49d843c | 269,813,431,707,707,800,000,000,000,000,000,000,000 | 10 | Fix undefined behavior in `tf.raw_ops.Switch` in eager mode.
PiperOrigin-RevId: 332578058
Change-Id: I9727571d2f21476b10d8aa27c1b7176564b76ac9 |
bool remoteComplete() const { return state_.remote_complete_; } | 1 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 195,304,725,909,186,800,000,000,000,000,000,000,000 | 1 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static int lp_do_ioctl(unsigned int minor, unsigned int cmd,
unsigned long arg, void __user *argp)
{
int status;
int retval = 0;
#ifdef LP_DEBUG
printk(KERN_DEBUG "lp%d ioctl, cmd: 0x%x, arg: 0x%lx\n", minor, cmd, arg);
#endif
if (minor >= LP_NO)
return -ENODEV;
if ((LP_F(minor) & LP_EXIST) == 0)
return -ENO... | 0 | [
"CWE-787"
] | linux | 3e21f4af170bebf47c187c1ff8bf155583c9f3b1 | 130,937,153,518,089,690,000,000,000,000,000,000,000 | 86 | char: lp: fix possible integer overflow in lp_setup()
The lp_setup() code doesn't apply any bounds checking when passing
"lp=none", and only in this case, resulting in an overflow of the
parport_nr[] array. All versions in Git history are affected.
Reported-By: Roee Hay <roee.hay@hcl.com>
Cc: Ben Hutchings <ben@decad... |
static void test_bug49972()
{
int rc;
MYSQL_STMT *stmt;
MYSQL_BIND in_param_bind;
MYSQL_BIND out_param_bind;
int int_data;
my_bool is_null;
DBUG_ENTER("test_bug49972");
myheader("test_bug49972");
rc= mysql_query(mysql, "DROP FUNCTION IF EXISTS f1");
myquery(rc);
rc= mysql_query(mysql, "DROP PR... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 119,763,646,766,259,470,000,000,000,000,000,000,000 | 97 | 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... |
TEST(AsyncSSLSocketTest, SSLClientTest) {
// Start listening on a local port
WriteCallbackBase writeCallback;
ReadCallback readCallback(&writeCallback);
HandshakeCallback handshakeCallback(&readCallback);
SSLServerAcceptCallbackDelay acceptCallback(&handshakeCallback);
TestSSLServer server(&acceptCallback);... | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 91,390,531,748,019,440,000,000,000,000,000,000,000 | 21 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.