func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void e1000e_update_flowctl_status(E1000ECore *core)
{
if (e1000e_have_autoneg(core) &&
core->phy[0][PHY_STATUS] & MII_SR_AUTONEG_COMPLETE) {
trace_e1000e_link_autoneg_flowctl(true);
core->mac[CTRL] |= E1000_CTRL_TFCE | E1000_CTRL_RFCE;
} else {
trace_e1000e_link_autoneg_fl... | 0 | [
"CWE-835"
] | qemu | 4154c7e03fa55b4cf52509a83d50d6c09d743b77 | 277,050,280,082,237,300,000,000,000,000,000,000,000 | 10 | net: e1000e: fix an infinite loop issue
This issue is like the issue in e1000 network card addressed in
this commit:
e1000: eliminate infinite loops on out-of-bounds transfer start.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.... |
static void free_bprm(struct linux_binprm *bprm)
{
if (bprm->mm) {
acct_arg_size(bprm, 0);
mmput(bprm->mm);
}
free_arg_pages(bprm);
if (bprm->cred) {
mutex_unlock(¤t->signal->cred_guard_mutex);
abort_creds(bprm->cred);
}
if (bprm->file) {
allow_write_access(bprm->file);
fput(bprm->file);
}
if ... | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 62,431,731,805,564,560,000,000,000,000,000,000,000 | 23 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
static int checkout_remove_the_old(
unsigned int *actions,
checkout_data *data)
{
int error = 0;
git_diff_delta *delta;
const char *str;
size_t i;
git_buf *fullpath;
uint32_t flg = GIT_RMDIR_EMPTY_PARENTS |
GIT_RMDIR_REMOVE_FILES | GIT_RMDIR_REMOVE_BLOCKERS;
if (data->opts.checkout_strategy & GIT_CHECKOUT_S... | 0 | [
"CWE-20",
"CWE-706"
] | libgit2 | 64c612cc3e25eff5fb02c59ef5a66ba7a14751e4 | 120,585,791,721,048,900,000,000,000,000,000,000,000 | 58 | Protect against 8.3 "short name" attacks also on Linux/macOS
The Windows Subsystem for Linux (WSL) is getting increasingly popular,
in particular because it makes it _so_ easy to run Linux software on
Windows' files, via the auto-mounted Windows drives (`C:\` is mapped to
`/mnt/c/`, no need to set that up manually).
... |
spell_find_suggest(
char_u *badptr,
int badlen, // length of bad word or 0 if unknown
suginfo_T *su,
int maxcount,
int banbadword, // don't include badword in suggestions
int need_cap, // word should start with capital
int interactive)
{
hlf_T attr = HLF_COUNT;
char_u buf[MAXPA... | 0 | [
"CWE-121",
"CWE-787"
] | vim | 06f15416bb8d5636200a10776f1752c4d6e49f31 | 223,680,339,684,401,640,000,000,000,000,000,000,000 | 131 | patch 8.2.4247: stack corruption when looking for spell suggestions
Problem: Stack corruption when looking for spell suggestions.
Solution: Prevent the depth increased too much. Add a five second time
limit to finding suggestions. |
vte_sequence_handler_ct (VteTerminal *terminal, GValueArray *params)
{
if (terminal->pvt->tabstops != NULL) {
g_hash_table_destroy(terminal->pvt->tabstops);
terminal->pvt->tabstops = NULL;
}
} | 0 | [] | vte | 58bc3a942f198a1a8788553ca72c19d7c1702b74 | 255,316,089,343,318,740,000,000,000,000,000,000,000 | 7 | fix bug #548272
svn path=/trunk/; revision=2365 |
void rfbTightCleanup(rfbScreenInfoPtr screen)
{
if(tightBeforeBufSize) {
free(tightBeforeBuf);
tightBeforeBufSize=0;
tightBeforeBuf = NULL;
}
if(tightAfterBufSize) {
free(tightAfterBuf);
tightAfterBufSize=0;
tightAfterBuf = NULL;
}
} | 0 | [] | libvncserver | 804335f9d296440bb708ca844f5d89b58b50b0c6 | 339,263,616,340,381,500,000,000,000,000,000,000,000 | 13 | Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422. |
static int io_madvise(struct io_kiocb *req, unsigned int issue_flags)
{
#if defined(CONFIG_ADVISE_SYSCALLS) && defined(CONFIG_MMU)
struct io_madvise *ma = &req->madvise;
int ret;
if (issue_flags & IO_URING_F_NONBLOCK)
return -EAGAIN;
ret = do_madvise(current->mm, ma->addr, ma->len, ma->advice);
if (ret < 0)
... | 0 | [
"CWE-125"
] | linux | 89c2b3b74918200e46699338d7bcc19b1ea12110 | 168,104,397,846,699,240,000,000,000,000,000,000,000 | 18 | io_uring: reexpand under-reexpanded iters
[ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900
[ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task
syz-executor.0/828
[ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted
5.14.0-rc3-next-20210730 #1
[ 74.216525] Hardware n... |
static unsigned long vma_dump_size(struct vm_area_struct *vma,
unsigned long mm_flags)
{
#define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type))
/* The vma can be set up to tell us the answer directly. */
if (vma->vm_flags & VM_ALWAYSDUMP)
goto whole;
/* Hugetlb memory check */
if (vma->vm_flags & VM... | 0 | [
"CWE-476"
] | linux | c8e252586f8d5de906385d8cf6385fee289a825e | 197,502,660,276,072,780,000,000,000,000,000,000,000 | 79 | regset: Prevent null pointer reference on readonly regsets
The regset common infrastructure assumed that regsets would always
have .get and .set methods, but not necessarily .active methods.
Unfortunately people have since written regsets without .set methods.
Rather than putting in stub functions everywhere, handle ... |
static int wanxl_puts_command(card_t *card, u32 cmd)
{
unsigned long timeout = jiffies + 5 * HZ;
writel(cmd, card->plx + PLX_MAILBOX_1);
do {
if (readl(card->plx + PLX_MAILBOX_1) == 0)
return 0;
schedule();
}while (time_after(timeout, jiffies));
return -1;
} | 0 | [
"CWE-399"
] | linux | 2b13d06c9584b4eb773f1e80bbaedab9a1c344e1 | 24,755,153,783,326,183,000,000,000,000,000,000,000 | 14 | wanxl: fix info leak in ioctl
The wanxl_ioctl() code fails to initialize the two padding bytes of
struct sync_serial_settings after the ->loopback member. Add an explicit
memset(0) before filling the structure to avoid the info leak.
Signed-off-by: Salva Peiró <speiro@ai2.upv.es>
Signed-off-by: David S. Miller <davem... |
sv_path (name)
char *name;
{
/* hash -r */
phash_flush ();
} | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 266,354,383,827,977,440,000,000,000,000,000,000,000 | 6 | commit bash-20120224 snapshot |
xsltDocumentElem(xsltTransformContextPtr ctxt, xmlNodePtr node,
xmlNodePtr inst, xsltStylePreCompPtr castedComp)
{
#ifdef XSLT_REFACTORED
xsltStyleItemDocumentPtr comp = (xsltStyleItemDocumentPtr) castedComp;
#else
xsltStylePreCompPtr comp = castedComp;
#endif
xsltStylesheetPtr style = NULL... | 0 | [] | libxslt | 937ba2a3eb42d288f53c8adc211bd1122869f0bf | 66,224,310,736,120,990,000,000,000,000,000,000,000 | 468 | Fix default template processing on namespace nodes |
static void FVMenuInsertFont(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
SplineFont *cidmaster = fv->b.cidmaster;
SplineFont *new;
struct cidmap *map;
char *filename;
extern NameList *force_names_when_opening;
if ( cidmast... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 4,024,914,574,085,378,400,000,000,000,000,000,000 | 40 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
int run_command(struct child_process *cmd)
{
int code;
if (cmd->out < 0 || cmd->err < 0)
die("BUG: run_command with a pipe can cause deadlock");
code = start_command(cmd);
if (code)
return code;
return finish_command(cmd);
} | 0 | [] | git | 321fd82389742398d2924640ce3a61791fd27d60 | 2,372,163,529,818,675,400,000,000,000,000,000,000 | 12 | run-command: mark path lookup errors with ENOENT
Since commit e3a434468f (run-command: use the
async-signal-safe execv instead of execvp, 2017-04-19),
prepare_cmd() does its own PATH lookup for any commands we
run (on non-Windows platforms).
However, its logic does not match the old execvp call when
we fail to find a... |
void iput(struct inode *inode)
{
if (!inode)
return;
BUG_ON(inode->i_state & I_CLEAR);
retry:
if (atomic_dec_and_lock(&inode->i_count, &inode->i_lock)) {
if (inode->i_nlink && (inode->i_state & I_DIRTY_TIME)) {
atomic_inc(&inode->i_count);
spin_unlock(&inode->i_lock);
trace_writeback_lazytime_iput(inode... | 0 | [
"CWE-269"
] | linux | 0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7 | 103,089,842,373,918,000,000,000,000,000,000,000,000 | 17 | Fix up non-directory creation in SGID directories
sgid directories have special semantics, making newly created files in
the directory belong to the group of the directory, and newly created
subdirectories will also become sgid. This is historically used for
group-shared directories.
But group directories writable b... |
static void sco_disconn_cfm(struct hci_conn *hcon, __u8 reason)
{
if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK)
return;
BT_DBG("hcon %p reason %d", hcon, reason);
sco_conn_del(hcon, bt_to_errno(reason));
} | 0 | [
"CWE-200"
] | net | 5233252fce714053f0151680933571a2da9cbfb4 | 184,456,282,629,214,930,000,000,000,000,000,000,000 | 9 | bluetooth: Validate socket address length in sco_sock_bind().
Signed-off-by: David S. Miller <davem@davemloft.net> |
static void dm_put_live_table_fast(struct mapped_device *md) __releases(RCU)
{
rcu_read_unlock();
} | 0 | [
"CWE-362"
] | linux | b9a41d21dceadf8104812626ef85dc56ee8a60ed | 83,933,216,829,509,160,000,000,000,000,000,000,000 | 4 | dm: fix race between dm_get_from_kobject() and __dm_destroy()
The following BUG_ON was hit when testing repeat creation and removal of
DM devices:
kernel BUG at drivers/md/dm.c:2919!
CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44
Call Trace:
[<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a
... |
static int run_decode_and_handler (BODY *b, STATE *s, handler_t handler, int plaintext)
{
int origType;
char *savePrefix = NULL;
FILE *fp = NULL;
BUFFER *tempfile = NULL;
size_t tmplength = 0;
LOFF_T tmpoffset = 0;
int decode = 0;
int rc = 0;
fseeko (s->fpin, b->offset, SEEK_SET);
/* see if we nee... | 0 | [
"CWE-120"
] | mutt | e5ed080c00e59701ca62ef9b2a6d2612ebf765a5 | 208,741,755,431,683,270,000,000,000,000,000,000,000 | 100 | Fix uudecode buffer overflow.
mutt_decode_uuencoded() used each line's initial "length character"
without any validation. It would happily read past the end of the
input line, and with a suitable value even past the length of the
input buffer.
As I noted in ticket 404, there are several other changes that could
be a... |
do_effects(Lineprop m)
{
/* effect end */
do_effect2(PE_UNDER, ulmode, underline(), underlineend());
do_effect2(PE_STAND, somode, standout(), standend());
do_effect2(PE_BOLD, bomode, bold(), boldend());
do_effect2(PE_EMPH, emph_mode, bold(), boldend());
do_effect2(PE_ANCHOR, anch_mode, EFFECT_AN... | 0 | [
"CWE-119"
] | w3m | 0c3f5d0e0d9269ad47b8f4b061d7818993913189 | 74,762,238,630,311,420,000,000,000,000,000,000,000 | 32 | Prevent array index out of bounds for symbol
Bug-Debian: https://github.com/tats/w3m/issues/38 |
ctx_flexible_sched_in(struct perf_event_context *ctx,
struct perf_cpu_context *cpuctx)
{
int can_add_hw = 1;
if (ctx != &cpuctx->ctx)
cpuctx = NULL;
visit_groups_merge(cpuctx, &ctx->flexible_groups,
smp_processor_id(),
merge_sched_in, &can_add_hw);
} | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 44,755,292,891,789,820,000,000,000,000,000,000,000 | 12 | perf/core: Fix a memory leak in perf_event_parse_addr_filter()
As shown through runtime testing, the "filename" allocation is not
always freed in perf_event_parse_addr_filter().
There are three possible ways that this could happen:
- It could be allocated twice on subsequent iterations through the loop,
- or leake... |
correct_table_matrix3(struct table *t, int col, char *flags, double s,
double b)
{
int i, j;
double ss;
int size = t->maxcol + 1;
double w = 1. / (b * b);
int flg = (flags[col] == 0);
for (i = 0; i < size; i++) {
if (!((flg && flags[i] == 0) || (!flg && flags[i] != 0)))
continue;
... | 0 | [
"CWE-119"
] | w3m | 67a3db378f5ee3047c158eae4342f7e3245a2ab1 | 8,170,939,678,239,108,000,000,000,000,000,000,000 | 25 | Fix table rowspan and colspan
Origin: https://github.com/tats/w3m/pull/19
Bug-Debian: https://github.com/tats/w3m/issues/8 |
CModule::EModRet CModule::OnAddUser(CUser& User, CString& sErrorRet) {
return CONTINUE;
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 83,548,704,506,569,575,000,000,000,000,000,000,000 | 3 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
static void GTextFieldPaste(GTextField *gt,enum selnames sel) {
if ( GDrawSelectionHasType(gt->g.base,sel,"UTF8_STRING") ||
GDrawSelectionHasType(gt->g.base,sel,"text/plain;charset=UTF-8")) {
unichar_t *temp; char *ctemp;
int32 len;
ctemp = GDrawRequestSelection(gt->g.base,sel,"UTF8_STRING",&len);
if ( cte... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 99,984,321,275,548,290,000,000,000,000,000,000,000 | 54 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
flatpak_bwrap_add_bind_arg (FlatpakBwrap *bwrap,
const char *type,
const char *src,
const char *dest)
{
g_autofree char *dest_dirname = g_path_get_dirname (dest);
g_autofree char *dest_dirname_real = realpath (dest_dirname, NU... | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | 6d1773d2a54dde9b099043f07a2094a4f1c2f486 | 179,210,920,190,375,540,000,000,000,000,000,000,000 | 15 | run: Convert all environment variables into bwrap arguments
This avoids some of them being filtered out by a setuid bwrap. It also
means that if they came from an untrusted source, they cannot be used
to inject arbitrary code into a non-setuid bwrap via mechanisms like
LD_PRELOAD.
Because they get bundled into a memf... |
control_unspec(
struct recvbuf *rbufp,
int restrict_mask
)
{
struct peer *peer;
/*
* What is an appropriate response to an unspecified op-code?
* I return no errors and no data, unless a specified assocation
* doesn't exist.
*/
if (res_associd) {
peer = findpeerbyassoc(res_associd);
if (NULL == peer)... | 0 | [
"CWE-22"
] | ntp | 184516e143ce4448ddb5b9876dd372008cc779f6 | 99,755,550,807,660,570,000,000,000,000,000,000,000 | 23 | [TALOS-CAN-0062] prevent directory traversal for VMS, too, when using 'saveconfig' command. |
GF_Err gf_gz_compress_payload_ex(u8 **data, u32 data_len, u32 *max_size, u8 data_offset, Bool skip_if_larger, u8 **out_comp_data)
{
z_stream stream;
int err;
char *dest = (char *)gf_malloc(sizeof(char)*data_len*ZLIB_COMPRESS_SAFE);
stream.next_in = (Bytef*)(*data) + data_offset;
stream.avail_in = (uInt)data_len - ... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 55,566,546,305,004,790,000,000,000,000,000,000,000 | 52 | fixed #2138 |
static int countLeadingZeros(ut32 x) {
int count = 0;
while (x) {
x >>= 1;
--count;
}
return count;
} | 0 | [
"CWE-119",
"CWE-787"
] | radare2 | df167c7db545953bb7f71c72e98e7a3ca0c793bf | 82,259,757,226,801,830,000,000,000,000,000,000,000 | 8 | Fix #12376 - crash in: rasm2 -a arm -b 64 '0 ,0,0,0,0,0,0,' |
static int loop_prepare_queue(struct loop_device *lo)
{
kthread_init_worker(&lo->worker);
lo->worker_task = kthread_run(loop_kthread_worker_fn,
&lo->worker, "loop%d", lo->lo_number);
if (IS_ERR(lo->worker_task))
return -ENOMEM;
set_user_nice(lo->worker_task, MIN_NICE);
return 0;
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5 | 274,190,953,182,990,900,000,000,000,000,000,000,000 | 10 | loop: fix concurrent lo_open/lo_release
范龙飞 reports that KASAN can report a use-after-free in __lock_acquire.
The reason is due to insufficient serialization in lo_release(), which
will continue to use the loop device even after it has decremented the
lo_refcnt to zero.
In the meantime, another process can come in, o... |
static int burl_is_unreserved (const int c)
{
return (light_isalnum(c) || c == '-' || c == '.' || c == '_' || c == '~');
} | 0 | [
"CWE-190"
] | lighttpd1.4 | 32120d5b8b3203fc21ccb9eafb0eaf824bb59354 | 135,365,791,273,737,700,000,000,000,000,000,000,000 | 4 | [core] fix abort in http-parseopts (fixes #2945)
fix abort in server.http-parseopts with url-path-2f-decode enabled
(thx stze)
x-ref:
"Security - SIGABRT during GET request handling with url-path-2f-decode enabled"
https://redmine.lighttpd.net/issues/2945 |
static bool get_nic_if_avail(int fd, struct alloted_s *names, int pid, char *intype, char *br, int allowed, char **nicname, char **cnic)
{
off_t len, slen;
struct stat sb;
char *buf = NULL, *newline;
int ret, count = 0;
char *owner;
struct alloted_s *n;
for (n=names; n!=NULL; n=n->next)
cull_entries(fd, n->na... | 0 | [
"CWE-284",
"CWE-862"
] | lxc | 16af238036a5464ae8f2420ed3af214f0de875f9 | 268,566,296,777,977,540,000,000,000,000,000,000,000 | 70 | CVE-2017-5985: Ensure target netns is caller-owned
Before this commit, lxc-user-nic could potentially have been tricked into
operating on a network namespace over which the caller did not hold privilege.
This commit ensures that the caller is privileged over the network namespace by
temporarily dropping privilege.
L... |
int security_real_capable(struct task_struct *tsk, int cap)
{
const struct cred *cred;
int ret;
cred = get_task_cred(tsk);
ret = security_ops->capable(tsk, cred, cap, SECURITY_CAP_AUDIT);
put_cred(cred);
return ret;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 234,641,319,937,228,900,000,000,000,000,000,000,000 | 10 | 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... |
tsize_t t2p_write_pdf_xobject_decode(T2P* t2p, TIFF* output){
tsize_t written=0;
int i=0;
written += t2pWriteFile(output, (tdata_t) "/Decode [ ", 10);
for (i=0;i<t2p->tiff_samplesperpixel;i++){
written += t2pWriteFile(output, (tdata_t) "1 0 ", 4);
}
written += t2pWriteFile(output, (tdata_t) "]\n", 2);
retur... | 0 | [
"CWE-787"
] | libtiff | 7be2e452ddcf6d7abca88f41d3761e6edab72b22 | 330,410,381,481,841,030,000,000,000,000,000,000,000 | 13 | tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr
fixes #220 |
static int ip_mc_del_src(struct in_device *in_dev, __be32 *pmca, int sfmode,
int sfcount, __be32 *psfsrc, int delta)
{
struct ip_mc_list *pmc;
int changerec = 0;
int i, err;
if (!in_dev)
return -ENODEV;
rcu_read_lock();
for_each_pmc_rcu(in_dev, pmc) {
if (*pmca == pmc->multiaddr)
break;
}
if (!pmc) ... | 0 | [
"CWE-362"
] | linux | 23d2b94043ca8835bd1e67749020e839f396a1c2 | 79,553,627,792,242,480,000,000,000,000,000,000,000 | 62 | igmp: Add ip_mc_list lock in ip_check_mc_rcu
I got below panic when doing fuzz test:
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 4056 Comm: syz-executor.3 Tainted: G B 5.14.0-rc1-00195-gcff5c4254439-dirty #2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9... |
static bool __reg64_bound_u32(u64 a)
{
return a > U32_MIN && a < U32_MAX;
} | 0 | [
"CWE-125"
] | bpf | 049c4e13714ecbca567b4d5f6d563f05d431c80e | 112,531,556,937,520,130,000,000,000,000,000,000,000 | 4 | bpf: Fix alu32 const subreg bound tracking on bitwise operations
Fix a bug in the verifier's scalar32_min_max_*() functions which leads to
incorrect tracking of 32 bit bounds for the simulation of and/or/xor bitops.
When both the src & dst subreg is a known constant, then the assumption is
that scalar_min_max_*() will... |
static int _nfs4_proc_readdir(struct dentry *dentry, const struct cred *cred,
u64 cookie, struct page **pages, unsigned int count, bool plus)
{
struct inode *dir = d_inode(dentry);
struct nfs4_readdir_arg args = {
.fh = NFS_FH(dir),
.pages = pages,
.pgbase = 0,
.count = count,
.bitmask = NFS_SERVER(d_ino... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 336,148,073,609,219,250,000,000,000,000,000,000,000 | 37 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
String *Field::val_int_as_str(String *val_buffer, bool unsigned_val)
{
ASSERT_COLUMN_MARKED_FOR_READ;
CHARSET_INFO *cs= &my_charset_bin;
uint length;
longlong value= val_int();
if (val_buffer->alloc(MY_INT64_NUM_DECIMAL_DIGITS))
return 0;
length= (uint) (*cs->cset->longlong10_to_str)(cs, (char*) val_bu... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 321,687,903,752,359,900,000,000,000,000,000,000,000 | 16 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
Item *get_copy(THD *thd)
{ return get_item_copy<Item_decimal>(thd, this); } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 189,702,925,747,265,940,000,000,000,000,000,000,000 | 2 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
void get_global_soft_statistics(struct activity *a, int prev, int curr,
unsigned int flags, unsigned char offline_cpu_bitmap[])
{
int i;
struct stats_softnet *ssnc, *ssnp;
struct stats_softnet *ssnc_all = (struct stats_softnet *) ((char *) a->buf[curr]);
struct stats_softnet *ssnp_all = (struct stats_softnet *)... | 0 | [
"CWE-125"
] | sysstat | fbc691eaaa10d0bcea6741d5a223dc3906106548 | 210,440,543,998,641,170,000,000,000,000,000,000,000 | 54 | Fix #196 and #199: Out of bound reads security issues
Check args before calling memmove() and memset() in remap_struct()
function to avoid out of bound reads which would possibly lead to
unknown code execution and/or sadf command crash.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com> |
bool Lock_tables_prelocking_strategy::
handle_table(THD *thd, Query_tables_list *prelocking_ctx,
TABLE_LIST *table_list, bool *need_prelocking)
{
TABLE_LIST **last= prelocking_ctx->query_tables_last;
if (DML_prelocking_strategy::handle_table(thd, prelocking_ctx, table_list,
... | 0 | [] | server | 0168d1eda30dad4b517659422e347175eb89e923 | 243,254,079,082,738,100,000,000,000,000,000,000,000 | 22 | MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list
Do not assume that subquery Item always present. |
_our_safe_strdup(const char *str, const char *funcname, const int line, const char *file)
{
char *newstr;
if ((newstr = (char *)malloc(strlen(str) + 1)) == NULL) {
fprintf(stderr, "ERROR in %s:%s() line %d: Unable to strdup() %zu bytes\n", file, funcname, line, strlen(str));
exit(-1);
}
... | 0 | [
"CWE-399",
"CWE-125"
] | tcpreplay | 6b830a1640ca20528032c89a4fdd8291a4d2d8b2 | 337,599,386,097,276,360,000,000,000,000,000,000,000 | 14 | Bug #520 Fix heap overflow on zero or 0xFFFF packet length
Add check for packets that report zero packet length. Example
of fix:
src/tcpprep --auto=bridge --pcap=poc16-get_l2len-heapoverflow --cachefile=/dev/null
Warning: poc16-get_l2len-heapoverflow was captured using a snaplen of 17 bytes. This may mean yo... |
TEST_F(GrpcHealthCheckerImplTest, HealthCheckIntervals) {
setupHealthCheckIntervalOverridesHC();
cluster_->prioritySet().getMockHostSet(0)->hosts_ = {
makeTestHost(cluster_->info_, "tcp://128.0.0.1:80", simTime())};
expectSessionCreate();
expectStreamCreate(0);
EXPECT_CALL(*test_sessions_[0]->timeout_ti... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 200,739,124,954,031,340,000,000,000,000,000,000,000 | 212 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
static void add_rev_cmdline_list(struct rev_info *revs,
struct commit_list *commit_list,
int whence,
unsigned flags)
{
while (commit_list) {
struct object *object = &commit_list->item->object;
add_rev_cmdline(revs, object, oid_to_hex(&object->oid),
whence, flags);
commit_list = commit_list->ne... | 0 | [] | git | a937b37e766479c8e780b17cce9c4b252fd97e40 | 66,099,867,529,363,040,000,000,000,000,000,000,000 | 12 | revision: quit pruning diff more quickly when possible
When the revision traversal machinery is given a pathspec,
we must compute the parent-diff for each commit to determine
which ones are TREESAME. We set the QUICK diff flag to avoid
looking at more entries than we need; we really just care
whether there are any cha... |
int RateTransposer::getLatency() const
{
return (bUseAAFilter) ? pAAFilter->getLength() : 0;
}
| 0 | [
"CWE-617"
] | soundtouch | 107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260 | 54,558,567,244,523,120,000,000,000,000,000,000,000 | 4 | Replaced illegal-number-of-channel assertions with run-time exception |
nv_ident(cmdarg_T *cap)
{
char_u *ptr = NULL;
char_u *buf;
unsigned buflen;
char_u *newbuf;
char_u *p;
char_u *kp; // value of 'keywordprg'
int kp_help; // 'keywordprg' is ":he"
int kp_ex; // 'keywordprg' starts with ":"
int n = 0; // init for GCC
int cmdchar;
int g_c... | 0 | [
"CWE-416"
] | vim | 35a9a00afcb20897d462a766793ff45534810dc3 | 197,687,901,050,056,540,000,000,000,000,000,000,000 | 253 | patch 8.2.3428: using freed memory when replacing
Problem: Using freed memory when replacing. (Dhiraj Mishra)
Solution: Get the line pointer after calling ins_copychar(). |
Value ExpressionStrcasecmp::evaluate(const Document& root, Variables* variables) const {
Value pString1(_children[0]->evaluate(root, variables));
Value pString2(_children[1]->evaluate(root, variables));
/* boost::iequals returns a bool not an int so strings must actually be allocated */
string str1 = b... | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 88,537,571,895,341,520,000,000,000,000,000,000,000 | 16 | SERVER-49404 Enforce additional checks in $arrayToObject |
check_against_given_fingerprint (app_t app, const char *fpr, int keyno)
{
unsigned char tmp[20];
const char *s;
int n;
for (s=fpr, n=0; hexdigitp (s); s++, n++)
;
if (n != 40)
return gpg_error (GPG_ERR_INV_ID);
else if (!*s)
; /* okay */
else
return gpg_error (GPG_ERR_INV_ID);
for (s=f... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 202,512,312,530,371,230,000,000,000,000,000,000,000 | 19 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
flatpak_dir_get_system_by_id (const char *id,
GCancellable *cancellable,
GError **error)
{
g_autoptr(GError) local_error = NULL;
GPtrArray *locations = NULL;
FlatpakDir *ret = NULL;
int i;
if (id == NULL || g_strcmp0 (id, SYSTEM_DIR_DEFAULT_I... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 3,617,382,431,441,242,000,000,000,000,000,000,000 | 41 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... |
dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
{
hm_fragment *frag = NULL;
pitem *item = NULL;
int i = -1, is_complete;
unsigned char seq64be[8];
unsigned long frag_len = msg_hdr->frag_len, max_len;
if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len)
goto err;
/* Determine maximum... | 0 | [
"CWE-310"
] | openssl | 34628967f1e65dc8f34e000f0f5518e21afbfc7b | 295,437,793,354,245,800,000,000,000,000,000,000,000 | 100 | Fix DTLS retransmission from previous session.
For DTLS we might need to retransmit messages from the previous session
so keep a copy of write context in DTLS retransmission buffers instead
of replacing it after sending CCS. CVE-2013-6450. |
static void brcmf_configure_wowl(struct brcmf_cfg80211_info *cfg,
struct brcmf_if *ifp,
struct cfg80211_wowlan *wowl)
{
u32 wowl_config;
u32 i;
brcmf_dbg(TRACE, "Suspend, wowl config.\n");
if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_ARP_ND))
brcmf_configure_arp_nd_offload(ifp, false);
brcmf_fil_c... | 0 | [
"CWE-119",
"CWE-703"
] | linux | ded89912156b1a47d940a0c954c43afbabd0c42c | 283,370,815,141,341,640,000,000,000,000,000,000,000 | 53 | brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()
User-space can choose to omit NL80211_ATTR_SSID and only provide raw
IE TLV data. When doing so it can provide SSID IE with length exceeding
the allowed size. The driver further processes this IE copying it
into a local variable without checking the... |
hb_set_del_range (hb_set_t *set,
hb_codepoint_t first,
hb_codepoint_t last)
{
/* Immutible-safe. */
set->del_range (first, last);
} | 0 | [
"CWE-787"
] | harfbuzz | d3e09bf4654fe5478b6dbf2b26ebab6271317d81 | 39,576,326,635,725,997,000,000,000,000,000,000,000 | 7 | [set] Make all operators null-safe again
Changed my mind.
Also for hb_map_clear().
Part of https://github.com/harfbuzz/harfbuzz/pull/3162 |
static int snd_toneport_monitor_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_line6_pcm *line6pcm = snd_kcontrol_chip(kcontrol);
ucontrol->value.integer.value[0] = line6pcm->volume_monitor;
return 0;
} | 0 | [
"CWE-476"
] | linux | 0b074ab7fc0d575247b9cc9f93bb7e007ca38840 | 184,653,998,902,606,800,000,000,000,000,000,000,000 | 8 | ALSA: line6: Assure canceling delayed work at disconnection
The current code performs the cancel of a delayed work at the late
stage of disconnection procedure, which may lead to the access to the
already cleared state.
This patch assures to call cancel_delayed_work_sync() at the beginning
of the disconnection proced... |
check_server_referral(krb5_context context,
krb5_kdc_rep *rep,
unsigned flags,
krb5_const_principal requested,
krb5_const_principal returned,
krb5_keyblock * key)
{
krb5_error_code ret;
PA_ServerReferralData ref;
krb5_crypto session;
EncryptedData ed;
size_t l... | 0 | [
"CWE-345"
] | heimdal | 6dd3eb836bbb80a00ffced4ad57077a1cdf227ea | 149,136,796,428,223,600,000,000,000,000,000,000,000 | 125 | CVE-2017-11103: Orpheus' Lyre KDC-REP service name validation
In _krb5_extract_ticket() the KDC-REP service name must be obtained from
encrypted version stored in 'enc_part' instead of the unencrypted version
stored in 'ticket'. Use of the unecrypted version provides an
opportunity for successful server impersonation... |
WandExport void DrawPathCurveToAbsolute(DrawingWand *wand,const double x1,
const double y1,const double x2,const double y2,const double x,const double y)
{
assert(wand != (DrawingWand *) NULL);
assert(wand->signature == MagickWandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,Ge... | 0 | [
"CWE-476"
] | ImageMagick | 6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9 | 178,639,033,517,349,950,000,000,000,000,000,000,000 | 9 | https://github.com/ImageMagick/ImageMagick/issues/716 |
bool CModule::OnEmbeddedWebRequest(CWebSock& WebSock, const CString& sPageName,
CTemplate& Tmpl) {
return false;
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 246,318,892,837,965,260,000,000,000,000,000,000,000 | 4 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
static guint lo_key_hash(gconstpointer key)
{
const struct lo_key *lkey = key;
return (guint)lkey->ino + (guint)lkey->dev;
} | 0 | [] | qemu | 6084633dff3a05d63176e06d7012c7e15aba15be | 180,574,548,025,061,180,000,000,000,000,000,000,000 | 6 | tools/virtiofsd: xattr name mappings: Add option
Add an option to define mappings of xattr names so that
the client and server filesystems see different views.
This can be used to have different SELinux mappings as
seen by the guest, to run the virtiofsd with less privileges
(e.g. in a case where it can't set trusted/... |
Returns TRUE if the mode outputs blocks */
PHP_FUNCTION(mcrypt_enc_is_block_mode)
{
MCRYPT_GET_TD_ARG
if (mcrypt_enc_is_block_mode(pm->td) == 1) {
RETURN_TRUE
} else {
RETURN_FALSE
} | 0 | [
"CWE-190"
] | php-src | 6c5211a0cef0cc2854eaa387e0eb036e012904d0 | 173,373,867,232,008,970,000,000,000,000,000,000,000 | 10 | Fix bug #72455: Heap Overflow due to integer overflows |
static int ext4_find_delayed_extent(struct inode *inode,
struct extent_status *newes)
{
struct extent_status es;
ext4_lblk_t block, next_del;
if (newes->es_pblk == 0) {
ext4_es_find_extent_range(inode, &ext4_es_is_delayed,
newes->es_lblk,
newes->es_lblk + newes->es_len - 1,
&es);
/... | 0 | [
"CWE-200",
"CWE-908"
] | linux | 592acbf16821288ecdc4192c47e3774a4c48bb64 | 67,156,160,788,489,760,000,000,000,000,000,000,000 | 40 | ext4: zero out the unused memory region in the extent tree block
This commit zeroes out the unused memory region in the buffer_head
corresponding to the extent metablock after writing the extent header
and the corresponding extent node entries.
This is done to prevent random uninitialized data from getting into
the f... |
static int csnmp_config_add_data_blacklist_match_inverted(data_definition_t *dd,
oconfig_item_t *ci) {
if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_BOOLEAN)) {
WARNING("snmp plugin: `InvertMatch' needs exactly one boolean argument.");
... | 0 | [
"CWE-415"
] | collectd | d16c24542b2f96a194d43a73c2e5778822b9cb47 | 203,546,649,522,395,480,000,000,000,000,000,000,000 | 11 | 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 tpm_seal(struct tpm_buf *tb, uint16_t keytype,
uint32_t keyhandle, const unsigned char *keyauth,
const unsigned char *data, uint32_t datalen,
unsigned char *blob, uint32_t *bloblen,
const unsigned char *blobauth,
const unsigned char *pcrinfo, uint32_t pcrinfosize)
{
struct osap... | 0 | [
"CWE-20"
] | linux | 363b02dab09b3226f3bd1420dad9c72b79a42a76 | 171,529,253,944,914,000,000,000,000,000,000,000,000 | 111 | KEYS: Fix race between updating and finding a negative key
Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection
error into one field such that:
(1) The instantiation state can be modified/read atomically.
(2) The error can be accessed atomically with the state.
(3) The error isn't stored unione... |
GF_Err gnra_Size(GF_Box *s)
{
GF_GenericAudioSampleEntryBox *ptr = (GF_GenericAudioSampleEntryBox *)s;
s->type = GF_ISOM_BOX_TYPE_GNRA;
gf_isom_audio_sample_entry_size((GF_AudioSampleEntryBox *)s);
ptr->size += ptr->data_size;
return GF_OK;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 79,174,508,573,652,770,000,000,000,000,000,000,000 | 8 | prevent dref memleak on invalid input (#1183) |
command_process_created_cell(cell_t *cell, or_connection_t *conn)
{
circuit_t *circ;
circ = circuit_get_by_circid_orconn(cell->circ_id, conn);
if (!circ) {
log_info(LD_OR,
"(circID %d) unknown circ (probably got a destroy earlier). "
"Dropping.", cell->circ_id);
return;
}
... | 0 | [
"CWE-264"
] | tor | a74e7fd40f1a77eb4000d8216bb5b80cdd8a6193 | 218,283,959,312,889,450,000,000,000,000,000,000,000 | 45 | Reject create cells on outgoing OR connections from bridges |
int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num)
{
int i,first,len=0,c, use_bn;
char ftmp[24], *tmp = ftmp;
int tmpsize = sizeof ftmp;
const char *p;
unsigned long l;
BIGNUM *bl = NULL;
if (num == 0)
return(0);
else if (num == -1)
num=strlen(buf);
p=buf;
c= *(p++);
num--;
i... | 0 | [
"CWE-200"
] | openssl | 0042fb5fd1c9d257d713b15a1f45da05cf5c1c87 | 37,531,059,646,116,404,000,000,000,000,000,000,000 | 143 | Fix OID handling:
- Upon parsing, reject OIDs with invalid base-128 encoding.
- Always NUL-terminate the destination buffer in OBJ_obj2txt printing function.
CVE-2014-3508
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org> |
is_crypt_key_option(int opt_idx)
{
return options[opt_idx].indir == PV_KEY;
} | 0 | [
"CWE-122"
] | vim | b7081e135a16091c93f6f5f7525a5c58fb7ca9f9 | 250,415,875,029,446,500,000,000,000,000,000,000,000 | 4 | patch 8.2.3402: invalid memory access when using :retab with large value
Problem: Invalid memory access when using :retab with large value.
Solution: Check the number is positive. |
xt_unregister_targets(struct xt_target *target, unsigned int n)
{
unsigned int i;
for (i = 0; i < n; i++)
xt_unregister_target(&target[i]);
} | 0 | [
"CWE-787"
] | linux | 9fa492cdc160cd27ce1046cb36f47d3b2b1efa21 | 133,720,441,207,212,160,000,000,000,000,000,000,000 | 7 | [NETFILTER]: x_tables: simplify compat API
Split the xt_compat_match/xt_compat_target into smaller type-safe functions
performing just one operation. Handle all alignment and size-related
conversions centrally in these function instead of requiring each module to
implement a full-blown conversion function. Replace ->c... |
insert_entry_async_data_free (InsertEntryAsyncData *self)
{
if (self->domain != NULL)
g_object_unref (self->domain);
g_free (self->upload_uri);
if (self->entry)
g_object_unref (self->entry);
g_slice_free (InsertEntryAsyncData, self);
} | 0 | [
"CWE-20"
] | libgdata | 6799f2c525a584dc998821a6ce897e463dad7840 | 48,192,878,946,823,510,000,000,000,000,000,000,000 | 11 | core: Validate SSL certificates for all connections
This prevents MitM attacks which use spoofed SSL certificates.
Note that this bumps our libsoup requirement to 2.37.91.
Closes: https://bugzilla.gnome.org/show_bug.cgi?id=671535 |
static int ixgbe_enable_port_vlan(struct ixgbe_adapter *adapter, int vf,
u16 vlan, u8 qos)
{
struct ixgbe_hw *hw = &adapter->hw;
int err;
err = ixgbe_set_vf_vlan(adapter, true, vlan, vf);
if (err)
goto out;
/* Revoke tagless access via VLAN 0 */
ixgbe_set_vf_vlan(adapter, false, 0, vf);
ixgbe_set_vmvi... | 0 | [
"CWE-20"
] | linux | 63e39d29b3da02e901349f6cd71159818a4737a6 | 16,446,594,552,267,853,000,000,000,000,000,000,000 | 35 | ixgbe: fix large MTU request from VF
Check that the MTU value requested by the VF is in the supported
range of MTUs before attempting to set the VF large packet enable,
otherwise reject the request. This also avoids unnecessary
register updates in the case of the 82599 controller.
Fixes: 872844ddb9e4 ("ixgbe: Enable ... |
void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
{
#ifdef CONFIG_SCHED_DEBUG
/*
* We should never call set_task_cpu() on a blocked task,
* ttwu() will sort out the placement.
*/
WARN_ON_ONCE(p->state != TASK_RUNNING && p->state != TASK_WAKING &&
!(task_thread_info(p)->preempt_count & PREEMPT_AC... | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 32,608,810,487,776,004,000,000,000,000,000,000,000 | 20 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
filter_usage (struct backend *b)
{
struct backend_filter *f = container_of (b, struct backend_filter, backend);
const char *p;
printf ("filter: %s", b->name);
if (f->filter.longname)
printf (" (%s)", f->filter.longname);
printf ("\n");
printf ("(%s)\n", b->filename);
if (f->filter.description) {
... | 0 | [
"CWE-406"
] | nbdkit | a6b88b195a959b17524d1c8353fd425d4891dc5f | 99,496,666,617,162,260,000,000,000,000,000,000,000 | 21 | server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO
Most known NBD clients do not bother with NBD_OPT_INFO (except for
clients like 'qemu-nbd --list' that don't ever intend to connect), but
go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu
to add in an extra client step (whether info on the ... |
router_is_active(const routerinfo_t *ri, const node_t *node, time_t now)
{
time_t cutoff = now - ROUTER_MAX_AGE_TO_PUBLISH;
if (ri->cache_info.published_on < cutoff) {
return 0;
}
if (!node->is_running || !node->is_valid || ri->is_hibernating) {
return 0;
}
/* Only require bandwith capacity in non-t... | 0 | [] | tor | 02e05bd74dbec614397b696cfcda6525562a4675 | 103,231,854,265,837,060,000,000,000,000,000,000,000 | 25 | When examining descriptors as a dirserver, reject ones with bad versions
This is an extra fix for bug 21278: it ensures that these
descriptors and platforms will never be listed in a legit consensus. |
#ifdef GF_ENABLE_CTRN
static u32 ctrn_sample_flags_to_index(u32 val)
{
if (!val) return 0;
if (val & 0x0000FFFF)
return 3;
if (val & 0x00FF0000)
return 2;
return 1; | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 43,062,787,424,139,030,000,000,000,000,000,000,000 | 9 | fixed #1587 |
void qcow2_free_clusters(BlockDriverState *bs,
int64_t offset, int64_t size,
enum qcow2_discard_type type)
{
int ret;
BLKDBG_EVENT(bs->file, BLKDBG_CLUSTER_FREE);
ret = update_refcount(bs, offset, size, -1, type);
if (ret < 0) {
fprintf(stderr... | 0 | [
"CWE-190"
] | qemu | b106ad9185f35fc4ad669555ad0e79e276083bd7 | 109,622,288,222,383,310,000,000,000,000,000,000,000 | 13 | qcow2: Don't rely on free_cluster_index in alloc_refcount_block() (CVE-2014-0147)
free_cluster_index is only correct if update_refcount() was called from
an allocation function, and even there it's brittle because it's used to
protect unfinished allocations which still have a refcount of 0 - if it
moves in the wrong p... |
static HashTable* spl_heap_object_get_debug_info_helper(zend_class_entry *ce, zval *obj, int *is_temp TSRMLS_DC) { /* {{{ */
spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(obj TSRMLS_CC);
zval *tmp, zrv, *heap_array;
char *pnstr;
int pnlen;
int i;
*is_temp = 0;
if (!intern->std.pro... | 0 | [] | php-src | 1cbd25ca15383394ffa9ee8601c5de4c0f2f90e1 | 55,439,931,213,641,860,000,000,000,000,000,000,000 | 47 | Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error |
static inline int fd_copyin(void __user *param, void *address,
unsigned long size)
{
return copy_from_user(address, param, size) ? -EFAULT : 0;
} | 0 | [
"CWE-264",
"CWE-754"
] | linux | ef87dbe7614341c2e7bfe8d32fcb7028cc97442c | 176,427,251,157,203,440,000,000,000,000,000,000,000 | 5 | floppy: ignore kernel-only members in FDRAWCMD ioctl input
Always clear out these floppy_raw_cmd struct members after copying the
entire structure from userspace so that the in-kernel version is always
valid and never left in an interdeterminate state.
Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
Signed-off-by: L... |
int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb)
{
if (rsa->meth->rsa_keygen)
return rsa->meth->rsa_keygen(rsa, bits, e_value, cb);
return rsa_builtin_keygen(rsa, bits, e_value, cb);
} | 0 | [
"CWE-327",
"CWE-310"
] | openssl | 6939eab03a6e23d2bd2c3f5e34fe1d48e542e787 | 77,591,708,905,257,240,000,000,000,000,000,000,000 | 6 | RSA key generation: ensure BN_mod_inverse and BN_mod_exp_mont both get called with BN_FLG_CONSTTIME flag set.
CVE-2018-0737
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org> |
static void dummy_handler(int sig_unused) {} | 0 | [
"CWE-59"
] | abrt | 3287aa12eb205cff95cdd00d6d6c5c9a4f8f0eca | 333,095,173,473,140,200,000,000,000,000,000,000,000 | 1 | daemon: allow only root user to trigger the post-create
There is no reason to allow non-root users to trigger this
functionality. Regular users can create abrt problems only through
abrtd or abrt-dbus and both triggers the post-create.
Other hooks run under root user (CCpp, Koops, VMCore, Xorg).
Related: #1212861
S... |
static void reserve_highatomic_pageblock(struct page *page, struct zone *zone,
unsigned int alloc_order)
{
int mt;
unsigned long max_managed, flags;
/*
* Limit the number reserved to 1 pageblock or roughly 1% of a zone.
* Check is race-prone but harmless.
*/
max_managed = (zone->managed_pages / 100) + pa... | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 102,684,985,005,234,230,000,000,000,000,000,000,000 | 32 | 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... |
handle_nsExtendConfigTable(netsnmp_mib_handler *handler,
netsnmp_handler_registration *reginfo,
netsnmp_agent_request_info *reqinfo,
netsnmp_request_info *requests)
{
netsnmp_request_info *request;
netsnmp_table_request_info... | 1 | [
"CWE-269"
] | net-snmp | 77f6c60f57dba0aaea5d8ef1dd94bcd0c8e6d205 | 244,651,634,320,724,540,000,000,000,000,000,000,000 | 467 | make the extend mib read-only by default |
static void wtp_send_raw_xy_event(struct hidpp_device *hidpp,
struct hidpp_touchpad_raw_xy *raw)
{
int i;
for (i = 0; i < 2; i++)
wtp_touch_event(hidpp, &(raw->fingers[i]));
if (raw->end_of_frame &&
!(hidpp->quirks & HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS))
input_event(hidpp->input, EV_KEY, BTN_LEFT, raw->but... | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 284,250,692,787,952,500,000,000,000,000,000,000,000 | 17 | 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... |
cmsBool CMSEXPORT cmsAppendNamedColor(cmsNAMEDCOLORLIST* NamedColorList,
const char* Name,
cmsUInt16Number PCS[3], cmsUInt16Number Colorant[cmsMAXCHANNELS])
{
cmsUInt32Number i;
if (NamedColorList == NULL) return FALSE;
if (Nam... | 1 | [
"CWE-703"
] | Little-CMS | 91c2db7f2559be504211b283bc3a2c631d6f06d9 | 91,846,882,152,430,600,000,000,000,000,000,000,000 | 33 | Non happy-path fixes |
process_tx_desc(E1000State *s, struct e1000_tx_desc *dp)
{
PCIDevice *d = PCI_DEVICE(s);
uint32_t txd_lower = le32_to_cpu(dp->lower.data);
uint32_t dtype = txd_lower & (E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D);
unsigned int split_size = txd_lower & 0xffff, bytes, sz;
unsigned int msh = 0xfffff;
ui... | 1 | [
"CWE-284"
] | qemu | 3de46e6fc489c52c9431a8a832ad8170a7569bd8 | 178,091,327,559,934,930,000,000,000,000,000,000,000 | 84 | e1000: fail early for evil descriptor
During procss_tx_desc(), driver can try to chain data descriptor with
legacy descriptor, when will lead underflow for the following
calculation in process_tx_desc() for bytes:
if (tp->size + bytes > msh)
bytes = msh - tp->size;
This will lead a infini... |
GF_Err gf_node_remove_id(GF_Node *p)
{
GF_SceneGraph *pSG;
if (!p) return GF_BAD_PARAM;
pSG = p->sgprivate->scenegraph;
#ifndef GPAC_DISABLE_VRML
/*if this is a proto register to the parent graph, not the current*/
if (p == (GF_Node*)pSG->pOwningProto) pSG = pSG->parent_scene;
#endif
/*new DEF ID*/
if (p->sgpr... | 0 | [
"CWE-416"
] | gpac | 9723dd0955894f2cb7be13b94cf7a47f2754b893 | 61,601,581,724,787,230,000,000,000,000,000,000,000 | 19 | fixed #2109 |
template<typename t>
CImg<_cimg_Tt> get_erode(const CImg<t>& kernel, const bool boundary_conditions=true,
const bool is_real=false) const {
if (is_empty() || !kernel) return *this;
if (!is_real && kernel==0) return CImg<T>(width(),height(),depth(),spectrum(),0);
ty... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 221,694,628,757,585,900,000,000,000,000,000,000,000 | 123 | Fix other issues in 'CImg<T>::load_bmp()'. |
static const char *cmd_audit_log_dirmode(cmd_parms *cmd, void *_dcfg,
const char *p1)
{
directory_config *dcfg = (directory_config *)_dcfg;
if (dcfg == NULL) return NULL;
if (strcasecmp(p1, "default") == 0) {
dcfg->auditlog_dirperms = NOT_SET;
}
else {
long int mode = strto... | 0 | [
"CWE-20",
"CWE-611"
] | ModSecurity | d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe | 217,123,421,654,005,400,000,000,000,000,000,000,000 | 21 | Added SecXmlExternalEntity |
static void pool_mayday_timeout(unsigned long __pool)
{
struct worker_pool *pool = (void *)__pool;
struct work_struct *work;
spin_lock_irq(&pool->lock);
spin_lock(&wq_mayday_lock); /* for wq->maydays */
if (need_to_create_worker(pool)) {
/*
* We've been trying to create a new worker but
* haven't been s... | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 330,323,903,313,938,930,000,000,000,000,000,000,000 | 24 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
JPEGCleanup(TIFF* tif)
{
JPEGState *sp = JState(tif);
assert(sp != 0);
tif->tif_tagmethods.vgetfield = sp->vgetparent;
tif->tif_tagmethods.vsetfield = sp->vsetparent;
tif->tif_tagmethods.printdir = sp->printdir;
if( sp->cinfo_initialized )
TIFFjpeg_destroy(sp); /* release libjpeg resourc... | 0 | [
"CWE-369"
] | libtiff | 47f2fb61a3a64667bce1a8398a8fcb1b348ff122 | 259,899,367,824,926,150,000,000,000,000,000,000,000 | 18 | * libtiff/tif_jpeg.c: avoid integer division by zero in
JPEGSetupEncode() when horizontal or vertical sampling is set to 0.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2653 |
static void svg_delete_deferred_anim(SVG_DeferredAnimation *anim, GF_List *deferred_animations)
{
if (deferred_animations) gf_list_del_item(deferred_animations, anim);
if (anim->target_id) gf_free(anim->target_id);
if (anim->to) gf_free(anim->to);
if (anim->from) gf_free(anim->from);
if (anim->by) gf_free(anim->b... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 123,733,637,262,629,760,000,000,000,000,000,000,000 | 12 | fixed #2138 |
static int pinctrl_get_list_and_count(const struct device_node *np,
const char *list_name,
const __be32 **list,
int *cells_size,
int *nr_elements)
{
int size;
*cells_size = 0;
*nr_elements = 0;
*list = of_get_property(np, list_name, &size);
if (!*list)
return -ENOENT;
... | 0 | [
"CWE-125"
] | linux | be4c60b563edee3712d392aaeb0943a768df7023 | 190,329,686,006,489,650,000,000,000,000,000,000,000 | 24 | pinctrl: devicetree: Avoid taking direct reference to device name string
When populating the pinctrl mapping table entries for a device, the
'dev_name' field for each entry is initialised to point directly at the
string returned by 'dev_name()' for the device and subsequently used by
'create_pinctrl()' when looking up... |
switch (yych) {
case 'a': goto yy44;
default: goto yy41;
} | 1 | [
"CWE-787"
] | re2c | 039c18949190c5de5397eba504d2c75dad2ea9ca | 122,613,082,494,981,960,000,000,000,000,000,000,000 | 4 | Emit an error when repetition lower bound exceeds upper bound.
Historically this was allowed and re2c swapped the bounds. However, it
most likely indicates an error in user code and there is only a single
occurrence in the tests (and the test in an artificial one), so although
the change is backwards incompatible ther... |
bgp_update_receive (struct peer *peer, bgp_size_t size)
{
int ret;
u_char *end;
struct stream *s;
struct attr attr;
bgp_size_t attribute_len;
bgp_size_t update_len;
bgp_size_t withdraw_len;
struct bgp_nlri update;
struct bgp_nlri withdraw;
struct bgp_nlri mp_update;
struct bgp_nlri mp_withdraw;
... | 0 | [
"CWE-119"
] | quagga | 5861739f8c38bc36ea9955e5cb2be2bf2f482d70 | 82,721,841,913,782,300,000,000,000,000,000,000,000 | 347 | bgpd: Open option parse errors don't NOTIFY, resulting in abort & DoS
* bgp_packet.c: (bgp_open_receive) Errors from bgp_open_option_parse are
detected, and the code will stop processing the OPEN and return. However
it does so without calling bgp_notify_send to send a NOTIFY - which means
the peer FSM doesn't g... |
static int remove_from_spam_list (SPAM_LIST **list, const char *pat)
{
SPAM_LIST *spam, *prev;
int nremoved = 0;
/* Being first is a special case. */
spam = *list;
if (!spam)
return 0;
if (spam->rx && !mutt_strcmp(spam->rx->pattern, pat))
{
*list = spam->next;
mutt_free_regexp(&spam->rx);
... | 0 | [
"CWE-668"
] | mutt | 6d0624411a979e2e1d76af4dd97d03f47679ea4a | 76,528,487,319,978,420,000,000,000,000,000,000,000 | 36 | use a 64-bit random value in temporary filenames.
closes #3158 |
static int snd_ni_update_cur_val(struct usb_mixer_elem_list *list)
{
struct snd_usb_audio *chip = list->mixer->chip;
unsigned int pval = list->kctl->private_value;
int err;
err = snd_usb_lock_shutdown(chip);
if (err < 0)
return err;
err = usb_control_msg(chip->dev, usb_sndctrlpipe(chip->dev, 0),
(pval... | 0 | [] | sound | 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a | 271,499,157,625,567,230,000,000,000,000,000,000,000 | 16 | ALSA: usb-audio: Add sanity checks for endpoint accesses
Add some sanity check codes before actually accessing the endpoint via
get_endpoint() in order to avoid the invalid access through a
malformed USB descriptor. Mostly just checking bNumEndpoints, but in
one place (snd_microii_spdif_default_get()), the validity o... |
long SimpleBlock::Parse() { return m_block.Parse(m_pCluster); } | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 113,389,347,061,219,020,000,000,000,000,000,000,000 | 1 | 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 void release_reg_references(struct bpf_verifier_env *env,
struct bpf_func_state *state, int id)
{
struct bpf_reg_state *regs = state->regs, *reg;
int i;
for (i = 0; i < MAX_BPF_REG; i++)
if (regs[i].id == id)
mark_reg_unknown(env, regs, i);
bpf_for_each_spilled_reg(i, state, reg) {
if (!reg)
... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 | 94,554,566,109,286,960,000,000,000,000,000,000,000 | 17 | bpf: prevent out of bounds speculation on pointer arithmetic
Jann reported that the original commit back in b2157399cc98
("bpf: prevent out-of-bounds speculation") was not sufficient
to stop CPU from speculating out of bounds memory access:
While b2157399cc98 only focussed on masking array map access
for unprivileged ... |
static JSValue js_bs_skip_bytes(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
{
s32 nb_bytes;
GET_JSBS
if (!bs || !argc) return GF_JS_EXCEPTION(ctx);
if (JS_ToInt32(ctx, &nb_bytes, argv[0])) return GF_JS_EXCEPTION(ctx);
gf_bs_skip_bytes(bs, nb_bytes);
return JS_UNDEFINED;
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 71,854,083,615,113,020,000,000,000,000,000,000,000 | 9 | fixed #2138 |
static int port_broadcast_event(struct snd_seq_client *client,
struct snd_seq_event *event,
int atomic, int hop)
{
int num_ev = 0, err, result = 0;
struct snd_seq_client *dest_client;
struct snd_seq_client_port *port;
dest_client = get_event_dest_client(event, SNDRV_SEQ_FILTER_BROADCAST);
if (dest_client ... | 0 | [
"CWE-703"
] | linux | 030e2c78d3a91dd0d27fef37e91950dde333eba1 | 108,494,993,203,562,260,000,000,000,000,000,000,000 | 32 | ALSA: seq: Fix missing NULL check at remove_events ioctl
snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear()
unconditionally even if there is no FIFO assigned, and this leads to
an Oops due to NULL dereference. The fix is just to add a proper NULL
check.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by... |
CNF_GetStratumWeight(void)
{
return stratum_weight;
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 274,040,911,121,109,940,000,000,000,000,000,000,000 | 4 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
void power_pmu_cancel_txn(struct pmu *pmu)
{
struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events);
cpuhw->group_flag &= ~PERF_EVENT_TXN;
perf_pmu_enable(pmu);
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | 0837e3242c73566fc1c0196b4ec61779c25ffc93 | 271,724,557,135,921,170,000,000,000,000,000,000,000 | 7 | perf, powerpc: Handle events that raise an exception without overflowing
Events on POWER7 can roll back if a speculative event doesn't
eventually complete. Unfortunately in some rare cases they will
raise a performance monitor exception. We need to catch this to
ensure we reset the PMC. In all cases the PMC will be 25... |
static void tcp_tx_timestamp(struct sock *sk, u16 tsflags, struct sk_buff *skb)
{
if (tsflags && skb) {
struct skb_shared_info *shinfo = skb_shinfo(skb);
struct tcp_skb_cb *tcb = TCP_SKB_CB(skb);
sock_tx_timestamp(sk, tsflags, &shinfo->tx_flags);
if (tsflags & SOF_TIMESTAMPING_TX_ACK)
tcb->txstamp_ack = 1;... | 0 | [
"CWE-369"
] | linux | 499350a5a6e7512d9ed369ed63a4244b6536f4f8 | 144,881,293,662,125,300,000,000,000,000,000,000,000 | 13 | tcp: initialize rcv_mss to TCP_MIN_MSS instead of 0
When tcp_disconnect() is called, inet_csk_delack_init() sets
icsk->icsk_ack.rcv_mss to 0.
This could potentially cause tcp_recvmsg() => tcp_cleanup_rbuf() =>
__tcp_select_window() call path to have division by 0 issue.
So this patch initializes rcv_mss to TCP_MIN_MSS... |
TPMI_AES_KEY_BITS_Unmarshal(TPMI_AES_KEY_BITS *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
TPMI_AES_KEY_BITS orig_target = *target; // libtpms added
if (rc == TPM_RC_SUCCESS) {
rc = TPM_KEY_BITS_Unmarshal(target, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
switch (*target... | 0 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 198,292,835,793,101,800,000,000,000,000,000,000,000 | 20 | 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> |
mptctl_fw_download(MPT_ADAPTER *iocp, unsigned long arg)
{
struct mpt_fw_xfer __user *ufwdl = (void __user *) arg;
struct mpt_fw_xfer kfwdl;
if (copy_from_user(&kfwdl, ufwdl, sizeof(struct mpt_fw_xfer))) {
printk(KERN_ERR MYNAM "%s@%d::_ioctl_fwdl - "
"Unable to copy mpt_fw_xfer struct @ %p\n",
__FILE__,... | 0 | [
"CWE-362",
"CWE-369"
] | linux | 28d76df18f0ad5bcf5fa48510b225f0ed262a99b | 249,260,927,462,570,320,000,000,000,000,000,000,000 | 14 | scsi: mptfusion: Fix double fetch bug in ioctl
Tom Hatskevich reported that we look up "iocp" then, in the called
functions we do a second copy_from_user() and look it up again.
The problem that could cause is:
drivers/message/fusion/mptctl.c
674 /* All of these commands require an interrupt or
675 ... |
static char *timelib_string(Scanner *s)
{
char *tmp = calloc(1, s->cur - s->tok + 1);
memcpy(tmp, s->tok, s->cur - s->tok);
return tmp;
} | 0 | [
"CWE-119"
] | php-src | 12fe4e90be7bfa2a763197079f68f5568a14e071 | 46,606,013,573,155,980,000,000,000,000,000,000,000 | 7 | Fixed bug #66060 (Heap buffer over-read in DateInterval) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.