func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void add_ignore_packed(struct rev_info *revs, const char *name)
{
int num = ++revs->num_ignore_packed;
revs->ignore_packed = xrealloc(revs->ignore_packed,
sizeof(const char **) * (num + 1));
revs->ignore_packed[num-1] = name;
revs->ignore_packed[num] = NULL;
} | 0 | [
"CWE-119"
] | git | fd55a19eb1d49ae54008d932a65f79cd6fda45c9 | 283,284,199,469,041,860,000,000,000,000,000,000,000 | 9 | Fix buffer overflow in git diff
If PATH_MAX on your system is smaller than a path stored, it may cause
buffer overflow and stack corruption in diff_addremove() and diff_change()
functions when running git-diff
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com> |
pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr,
spinlock_t **ptl)
{
pgd_t * pgd = pgd_offset(mm, addr);
pud_t * pud = pud_alloc(mm, pgd, addr);
if (pud) {
pmd_t * pmd = pmd_alloc(mm, pud, addr);
if (pmd)
return pte_alloc_map_lock(mm, pmd, addr, ptl);
}
return NULL;
} | 0 | [
"CWE-20"
] | linux-2.6 | 89f5b7da2a6bad2e84670422ab8192382a5aeb9f | 134,058,814,089,074,570,000,000,000,000,000,000,000 | 12 | Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP
KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit
557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed
the ZERO_PAGE from the VM mappings, any users of get_user_pages() will
generally now populate the VM with real emp... |
enum ha_base_keytype key_type() const
{ return unsigned_flag ? HA_KEYTYPE_BINARY : HA_KEYTYPE_INT8; } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 236,162,565,034,904,070,000,000,000,000,000,000,000 | 2 | 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... |
svcauth_gss_unwrap(SVCAUTH *auth, XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr)
{
struct svc_rpc_gss_data *gd;
log_debug("in svcauth_gss_unwrap()");
gd = SVCAUTH_PRIVATE(auth);
if (!gd->established || gd->sec.svc == RPCSEC_GSS_SVC_NONE) {
return ((*xdr_func)(xdrs, xdr_ptr));
}
return (xdr_rpc_gss_data(xdrs... | 0 | [
"CWE-200"
] | krb5 | 5bb8a6b9c9eb8dd22bc9526751610aaa255ead9c | 126,354,188,239,308,440,000,000,000,000,000,000,000 | 15 | 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"... |
update_stats_curr_start(struct cfs_rq *cfs_rq, struct sched_entity *se)
{
/*
* We are starting a new run period:
*/
se->exec_start = rq_clock_task(rq_of(cfs_rq));
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 29,672,937,054,573,904,000,000,000,000,000,000,000 | 7 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) re... |
static void close_files(struct files_struct * files)
{
int i, j;
struct fdtable *fdt;
j = 0;
/*
* It is safe to dereference the fd table without RCU or
* ->file_lock because this is the last reference to the
* files structure.
*/
fdt = files_fdtable(files);
for (;;) {
unsigned long set;
i = j * __NF... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8141c7f3e7aee618312fa1c15109e1219de784a7 | 147,059,204,728,819,630,000,000,000,000,000,000,000 | 32 | Move "exit_robust_list" into mm_release()
We don't want to get rid of the futexes just at exit() time, we want to
drop them when doing an execve() too, since that gets rid of the
previous VM image too.
Doing it at mm_release() time means that we automatically always do it
when we disassociate a VM map from the task.
... |
bytes_getnewargs(PyBytesObject *v)
{
return Py_BuildValue("(y#)", v->ob_sval, Py_SIZE(v));
} | 0 | [
"CWE-190"
] | cpython | 6c004b40f9d51872d848981ef1a18bb08c2dfc42 | 256,824,716,736,059,200,000,000,000,000,000,000,000 | 4 | bpo-30657: Fix CVE-2017-1000158 (#4758)
Fixes possible integer overflow in PyBytes_DecodeEscape.
Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com> |
void CLASS lossy_dng_load_raw()
{
struct jpeg_decompress_struct cinfo;
struct jpeg_error_mgr jerr;
JSAMPARRAY buf;
JSAMPLE (*pixel)[3];
unsigned sorder=order, ntags, opcode, deg, i, j, c;
unsigned save=data_offset-4, trow=0, tcol=0, row, col;
ushort t_curve[3][256];
double coeff[9], tot;
fseek (ifp, ... | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 75,252,945,368,058,680,000,000,000,000,000,000,000 | 65 | cumulated data checks patch |
size_t sdsZmallocSize(sds s) {
void *sh = sdsAllocPtr(s);
return zmalloc_size(sh);
} | 0 | [
"CWE-254"
] | redis | 874804da0c014a7d704b3d285aa500098a931f50 | 230,383,177,020,714,000,000,000,000,000,000,000,000 | 4 | Security: Cross Protocol Scripting protection.
This is an attempt at mitigating problems due to cross protocol
scripting, an attack targeting services using line oriented protocols
like Redis that can accept HTTP requests as valid protocol, by
discarding the invalid parts and accepting the payloads sent, for
example, ... |
static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
{
u32 intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
struct vcpu_vmx *vmx = to_vmx(vcpu);
struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
u32 exit_reason = vmx->exit_reason;
trace_kvm_nested_vmexit(kvm_rip_read(vcpu), exit_reason,
vmcs_readl(EXIT_QUALIFICATION... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 3ce424e45411cf5a13105e0386b6ecf6eeb4f66f | 331,709,494,684,552,100,000,000,000,000,000,000,000 | 142 | kvm:vmx: more complete state update on APICv on/off
The function to update APICv on/off state (in particular, to deactivate
it when enabling Hyper-V SynIC) is incomplete: it doesn't adjust
APICv-related fields among secondary processor-based VM-execution
controls. As a result, Windows 2012 guests get stuck when SynIC... |
static int syscall_exit_register(struct ftrace_event_call *event,
enum trace_reg type, void *data)
{
struct ftrace_event_file *file = data;
switch (type) {
case TRACE_REG_REGISTER:
return reg_event_syscall_exit(file, event);
case TRACE_REG_UNREGISTER:
unreg_event_syscall_exit(file, event);
return 0;
#i... | 0 | [
"CWE-125",
"CWE-476",
"CWE-119",
"CWE-264"
] | linux | 086ba77a6db00ed858ff07451bedee197df868c9 | 124,029,070,216,506,600,000,000,000,000,000,000,000 | 27 | tracing/syscalls: Ignore numbers outside NR_syscalls' range
ARM has some private syscalls (for example, set_tls(2)) which lie
outside the range of NR_syscalls. If any of these are called while
syscall tracing is being performed, out-of-bounds array access will
occur in the ftrace and perf sys_{enter,exit} handlers.
... |
void CLASS lossless_jpeg_load_raw()
{
int jwide, jhigh, jrow, jcol, val, jidx, i, j, row=0, col=0;
struct jhead jh;
ushort *rp;
if (!ljpeg_start (&jh, 0)) return;
if(jh.wide<1 || jh.high<1 || jh.clrs<1 || jh.bits <1)
#ifdef LIBRAW_LIBRARY_BUILD
throw LIBRAW_EXCEPTION_IO_CORRUPT;
#else
longjmp (failu... | 0 | [
"CWE-129"
] | LibRaw | 89d065424f09b788f443734d44857289489ca9e2 | 320,104,514,057,442,030,000,000,000,000,000,000,000 | 60 | fixed two more problems found by fuzzer |
static void __exit ipip_fini(void)
{
if (xfrm4_tunnel_deregister(&ipip_handler, AF_INET))
printk(KERN_INFO "ipip close: can't deregister tunnel\n");
unregister_pernet_device(&ipip_net_ops);
} | 0 | [] | linux-2.6 | d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978 | 323,127,753,315,718,770,000,000,000,000,000,000,000 | 7 | tunnels: fix netns vs proto registration ordering
Same stuff as in ip_gre patch: receive hook can be called before netns
setup is done, oopsing in net_generic().
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int ext4_blkdev_put(struct block_device *bdev)
{
bd_release(bdev);
return blkdev_put(bdev, FMODE_READ|FMODE_WRITE);
} | 0 | [
"CWE-20"
] | linux-2.6 | 4ec110281379826c5cf6ed14735e47027c3c5765 | 189,506,822,892,686,970,000,000,000,000,000,000,000 | 5 | ext4: Add sanity checks for the superblock before mounting the filesystem
This avoids insane superblock configurations that could lead to kernel
oops due to null pointer derefences.
http://bugzilla.kernel.org/show_bug.cgi?id=12371
Thanks to David Maciejak at Fortinet's FortiGuard Global Security
Research Team who di... |
static int resolve_relative_path(int argc, const char **argv, const char *prefix)
{
struct strbuf sb = STRBUF_INIT;
if (argc != 3)
die("submodule--helper relative-path takes exactly 2 arguments, got %d", argc);
printf("%s", relative_path(argv[1], argv[2], &sb));
strbuf_release(&sb);
return 0;
} | 0 | [
"CWE-88"
] | git | 98afac7a7cefdca0d2c4917dd8066a59f7088265 | 304,543,688,259,095,330,000,000,000,000,000,000,000 | 10 | submodule--helper: use "--" to signal end of clone options
When we clone a submodule, we call "git clone $url $path".
But there's nothing to say that those components can't begin
with a dash themselves, confusing git-clone into thinking
they're options. Let's pass "--" to make it clear what we
expect.
There's no test... |
QPDFObjectHandle::assertName()
{
assertType("name", isName());
} | 0 | [
"CWE-399",
"CWE-674"
] | qpdf | b4d6cf6836ce025ba1811b7bbec52680c7204223 | 34,515,863,656,357,060,000,000,000,000,000,000,000 | 4 | Limit depth of nesting in direct objects (fixes #202)
This fixes CVE-2018-9918. |
static int _progress_ufwd_wpc(pmixp_coll_t *coll)
{
pmixp_coll_tree_t *tree = &coll->state.tree;
xassert(PMIXP_COLL_TREE_UPFWD_WPC == tree->state);
if (!tree->contrib_prnt) {
return false;
}
/* Need to wait only for the local completion callback if installed*/
tree->dfwd_status = PMIXP_COLL_TREE_SND_ACTIVE;
... | 0 | [
"CWE-120"
] | slurm | c3142dd87e06621ff148791c3d2f298b5c0b3a81 | 11,485,604,164,701,637,000,000,000,000,000,000,000 | 46 | PMIx - fix potential buffer overflows from use of unpackmem().
CVE-2020-27745. |
static int show_vfsstat(struct seq_file *m, void *v)
{
struct vfsmount *mnt = v;
int err = 0;
/* device */
if (mnt->mnt_devname) {
seq_puts(m, "device ");
mangle(m, mnt->mnt_devname);
} else
seq_puts(m, "no device");
/* mount point */
seq_puts(m, " mounted on ");
seq_path(m, mnt, mnt->mnt_root, " \t\n\\... | 0 | [
"CWE-269"
] | linux-2.6 | ee6f958291e2a768fd727e7a67badfff0b67711a | 218,712,821,477,980,770,000,000,000,000,000,000,000 | 30 | check privileges before setting mount propagation
There's a missing check for CAP_SYS_ADMIN in do_change_type().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torva... |
mesh_create(struct module_stack* stack, struct module_env* env)
{
struct mesh_area* mesh = calloc(1, sizeof(struct mesh_area));
if(!mesh) {
log_err("mesh area alloc: out of memory");
return NULL;
}
mesh->histogram = timehist_setup();
mesh->qbuf_bak = sldns_buffer_new(env->cfg->msg_buffer_size);
if(!mesh->hist... | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 7,632,344,565,913,775,000,000,000,000,000,000,000 | 34 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
static int count_contiguous_clusters(uint64_t nb_clusters, int cluster_size,
uint64_t *l2_table, uint64_t stop_flags)
{
int i;
uint64_t mask = stop_flags | L2E_OFFSET_MASK | QCOW_OFLAG_COMPRESSED;
uint64_t first_entry = be64_to_cpu(l2_table[0]);
uint64_t offset = first_entry & mask;
if (!of... | 0 | [
"CWE-190"
] | qemu | cab60de930684c33f67d4e32c7509b567f8c445b | 293,541,625,031,623,000,000,000,000,000,000,000,000 | 22 | qcow2: Fix new L1 table size check (CVE-2014-0143)
The size in bytes is assigned to an int later, so check that instead of
the number of entries.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> |
void* LogSoftmaxInit(TfLiteContext* context, const char* buffer,
size_t length) {
return new LogSoftmaxOpData;
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 88,076,179,707,374,930,000,000,000,000,000,000,000 | 4 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
maybeLowerPrivilege() {
struct passwd *user;
struct group *group;
/* Sanity check user accounts. */
user = getpwnam(username.c_str());
if (user == NULL) {
throw NonExistentUserException(string("The configuration option ") +
"'PassengerAnalyticsLogUser' (Apache) or " +
"'passenger_analytics_log_user' (... | 0 | [
"CWE-59"
] | passenger | 9dda49f4a3ebe9bafc48da1bd45799f30ce19566 | 103,016,919,827,808,750,000,000,000,000,000,000,000 | 50 | Fixed a problem with graceful web server restarts.
This problem was introduced in 4.0.6 during the attempt to fix issue #910. |
static BOOL rfx_write_tile(RFX_CONTEXT* context, wStream* s, RFX_TILE* tile)
{
UINT32 blockLen;
blockLen = rfx_tile_length(tile);
if (!Stream_EnsureRemainingCapacity(s, blockLen))
return FALSE;
Stream_Write_UINT16(s, CBT_TILE); /* BlockT.blockType (2 bytes) */
Stream_Write_UINT32(s, blockLen); ... | 0 | [
"CWE-125"
] | FreeRDP | 3a06ce058f690b7fc1edad2f352c453376c2ebfe | 319,440,607,682,803,330,000,000,000,000,000,000,000 | 23 | Fixed oob read in rfx_process_message_tileset
Check input data length
Thanks to hac425 CVE-2020-11043 |
static int bind_sampler_locs(struct vrend_linked_shader_program *sprog,
int id, int next_sampler_id)
{
if (sprog->ss[id]->sel->sinfo.samplers_used_mask) {
uint32_t mask = sprog->ss[id]->sel->sinfo.samplers_used_mask;
int nsamp = util_bitcount(sprog->ss[id]->sel->sinfo.sampler... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 30,460,764,205,687,200,000,000,000,000,000,000,000 | 44 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
bool initiate_stratum(struct pool *pool)
{
bool ret = false, recvd = false, noresume = false, sockd = false;
char s[RBUFSIZE], *sret = NULL, *nonce1, *sessionid;
json_t *val = NULL, *res_val, *err_val;
json_error_t err;
int n2size;
resend:
if (!setup_stratum_socket(pool)) {
sockd = false;
goto out;
}
sock... | 0 | [
"CWE-119",
"CWE-787"
] | cgminer | e1c5050734123973b99d181c45e74b2cbb00272e | 98,087,666,556,919,610,000,000,000,000,000,000,000 | 136 | Do some random sanity checking for stratum message parsing |
static BROTLI_BOOL BROTLI_NOINLINE BrotliEnsureRingBuffer(
BrotliDecoderState* s) {
uint8_t* old_ringbuffer = s->ringbuffer;
if (s->ringbuffer_size == s->new_ringbuffer_size) {
return BROTLI_TRUE;
}
s->ringbuffer = (uint8_t*)BROTLI_DECODER_ALLOC(s,
(size_t)(s->new_ringbuffer_size) + kRingBufferWr... | 0 | [
"CWE-120"
] | brotli | 223d80cfbec8fd346e32906c732c8ede21f0cea6 | 79,055,440,752,649,260,000,000,000,000,000,000,000 | 28 | Update (#826)
* IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB
* simplify max Huffman table size calculation
* eliminate symbol duplicates (static arrays in .h files)
* minor combing in research/ code |
xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def)
{
int ret = -1;
if (def == NULL) {
return (-1);
}
if ((def->type != XML_RELAXNG_ELEMENT) &&
(def->dflags & IS_COMPILABLE))
return (1);
if ((def->type != XML_RELAXNG_ELEMENT) &&
(def->dflags & IS_NOT_COMPILABLE))
... | 0 | [
"CWE-134"
] | libxml2 | 502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b | 106,424,867,926,974,250,000,000,000,000,000,000,000 | 139 | More format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
adds a new xmlEscapeFormatString() function to escape composed format
strings |
static void ndisc_send_unsol_na(struct net_device *dev)
{
struct inet6_dev *idev;
struct inet6_ifaddr *ifa;
idev = in6_dev_get(dev);
if (!idev)
return;
read_lock_bh(&idev->lock);
list_for_each_entry(ifa, &idev->addr_list, if_list) {
ndisc_send_na(dev, NULL, &in6addr_linklocal_allnodes, &ifa->addr,
... | 0 | [
"CWE-17"
] | linux | 6fd99094de2b83d1d4c8457f2c83483b2828e75a | 253,470,186,996,402,300,000,000,000,000,000,000,000 | 20 | ipv6: Don't reduce hop limit for an interface
A local route may have a lower hop_limit set than global routes do.
RFC 3756, Section 4.2.7, "Parameter Spoofing"
> 1. The attacker includes a Current Hop Limit of one or another small
> number which the attacker knows will cause legitimate packets to
> be... |
static int stellaris_enet_can_receive(NetClientState *nc)
{
stellaris_enet_state *s = qemu_get_nic_opaque(nc);
if ((s->rctl & SE_RCTL_RXEN) == 0)
return 1;
return (s->np < 31);
} | 0 | [
"CWE-119",
"CWE-787"
] | qemu | 2e1198672759eda6e122ff38fcf6df06f27e0fe2 | 109,211,408,149,237,960,000,000,000,000,000,000,000 | 9 | hw/net/stellaris_enet: Convert to vmstate
Convert this device to use vmstate for its save/load, including
providing a post_load function that sanitizes inbound data to
avoid possible buffer overflows if it is malicious.
The sanitizing fixes CVE-2013-4532 (though nobody should be
relying on the security properties of ... |
SYSCALL_DEFINE5(fchownat, int, dfd, const char __user *, filename, uid_t, user,
gid_t, group, int, flag)
{
struct path path;
int error = -EINVAL;
int lookup_flags;
if ((flag & ~(AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH)) != 0)
goto out;
lookup_flags = (flag & AT_SYMLINK_NOFOLLOW) ? 0 : LOOKUP_FOLLOW;
if (flag & ... | 0 | [
"CWE-17"
] | linux | eee5cc2702929fd41cce28058dc6d6717f723f87 | 196,392,588,018,235,230,000,000,000,000,000,000,000 | 31 | get rid of s_files and files_lock
The only thing we need it for is alt-sysrq-r (emergency remount r/o)
and these days we can do just as well without going through the
list of files.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
build_gs_sub_font(i_ctx_t *i_ctx_p, const ref *op, gs_font **ppfont,
font_type ftype, gs_memory_type_ptr_t pstype,
const build_proc_refs * pbuild, const ref *pencoding,
ref *fid_op)
{
gs_matrix mat, omat;
ref fname; /* t_string */
gs_font *pfont;
f... | 0 | [
"CWE-704"
] | ghostpdl | 548bb434e81dadcc9f71adf891a3ef5bea8e2b4e | 236,294,386,560,940,030,000,000,000,000,000,000,000 | 55 | PS interpreter - add some type checking
These were 'probably' safe anyway, since they mostly treat the objects
as integers without checking, which at least can't result in a crash.
Nevertheless, we ought to check.
The return from comparedictkeys could be wrong if one of the keys had
a value which was not an array, i... |
SPL_METHOD(SplDoublyLinkedList, serialize)
{
spl_dllist_object *intern = (spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
smart_str buf = {0};
spl_ptr_llist_element *current = intern->llist->head, *next;
zval *flags;
php_serialize_data_t var_hash;
... | 0 | [] | php-src | df78c48354f376cf419d7a97f88ca07d572f00fb | 173,188,939,614,588,700,000,000,000,000,000,000,000 | 42 | Fixed Bug #67538 (SPL Iterators use-after-free) |
_flatpak_dir_fetch_remote_state_metadata_branch (FlatpakDir *self,
FlatpakRemoteState *state, /* This state does not have metadata filled out yet */
GCancellable *cancellable,
... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 157,019,522,288,867,640,000,000,000,000,000,000,000 | 139 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
void add_map_bl(epoch_t e, bufferlist& bl) {
Mutex::Locker l(map_cache_lock);
return _add_map_bl(e, bl);
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 291,113,221,777,552,320,000,000,000,000,000,000,000 | 4 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
static long btrfs_ioctl_qgroup_limit(struct file *file, void __user *arg)
{
struct inode *inode = file_inode(file);
struct btrfs_root *root = BTRFS_I(inode)->root;
struct btrfs_ioctl_qgroup_limit_args *sa;
struct btrfs_trans_handle *trans;
int ret;
int err;
u64 qgroupid;
if (!capable(CAP_SYS_ADMIN))
return -... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 17,458,254,126,074,700,000,000,000,000,000,000,000 | 47 | 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... |
void BinaryProtocolReader::readMessageBegin(
std::string& name,
MessageType& messageType,
int32_t& seqid) {
int32_t sz;
readI32(sz);
if (sz < 0) {
// Check for correct version number
int32_t version = sz & VERSION_MASK;
if (version != VERSION_1) {
throwBadVersionIdentifier(sz);
... | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | c9a903e5902834e95bbd4ab0e9fa53ba0189f351 | 202,517,042,465,860,000,000,000,000,000,000,000,000 | 29 | Better handling of truncated data when reading strings
Summary:
Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB).
This diff changes the logic to check if we have enough data in the buffer bef... |
static void test_ps_conj_select()
{
MYSQL_STMT *stmt;
int rc;
MYSQL_BIND my_bind[2];
int32 int_data;
char str_data[32];
unsigned long str_length;
char query[MAX_TEST_QUERY_LENGTH];
myheader("test_ps_conj_select");
rc= mysql_query(mysql, "drop table if exists t1");
myquery(rc);
... | 0 | [
"CWE-416"
] | server | eef21014898d61e77890359d6546d4985d829ef6 | 281,799,645,835,739,530,000,000,000,000,000,000,000 | 55 | MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list
mysql_prune_stmt_list() was walking the list following
element->next pointers, but inside the loop it was invoking
list_add(element) that modified element->next. So, mysql_prune_stmt_list()
failed to visit and reset all elements, and some of them were left... |
static int decode_attr_files_avail(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *res)
{
__be32 *p;
int status = 0;
*res = 0;
if (unlikely(bitmap[0] & (FATTR4_WORD0_FILES_AVAIL - 1U)))
return -EIO;
if (likely(bitmap[0] & FATTR4_WORD0_FILES_AVAIL)) {
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
r... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 191,852,633,305,378,860,000,000,000,000,000,000,000 | 18 | 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... |
int page_referenced_one(struct page *page, struct vm_area_struct *vma,
unsigned long address, void *arg)
{
struct mm_struct *mm = vma->vm_mm;
spinlock_t *ptl;
int referenced = 0;
struct page_referenced_arg *pra = arg;
if (unlikely(PageTransHuge(page))) {
pmd_t *pmd;
/*
* rmap might return false positiv... | 0 | [
"CWE-400",
"CWE-703",
"CWE-264"
] | linux | 57e68e9cd65b4b8eb4045a1e0d0746458502554c | 25,566,872,188,112,280,000,000,000,000,000,000,000 | 72 | mm: try_to_unmap_cluster() should lock_page() before mlocking
A BUG_ON(!PageLocked) was triggered in mlock_vma_page() by Sasha Levin
fuzzing with trinity. The call site try_to_unmap_cluster() does not lock
the pages other than its check_page parameter (which is already locked).
The BUG_ON in mlock_vma_page() is not ... |
snd_compr_set_metadata(struct snd_compr_stream *stream, unsigned long arg)
{
struct snd_compr_metadata metadata;
int retval;
if (!stream->ops->set_metadata)
return -ENXIO;
/*
* we should allow parameter change only when stream has been
* opened not in other cases
*/
if (copy_from_user(&metadata, (void __user... | 0 | [
"CWE-703"
] | linux | 6217e5ede23285ddfee10d2e4ba0cc2d4c046205 | 112,773,128,873,160,710,000,000,000,000,000,000,000 | 19 | ALSA: compress: fix an integer overflow check
I previously added an integer overflow check here but looking at it now,
it's still buggy.
The bug happens in snd_compr_allocate_buffer(). We multiply
".fragments" and ".fragment_size" and that doesn't overflow but then we
save it in an unsigned int so it truncates the h... |
static void dav_parse_paramfilter(xmlNodePtr root, struct param_filter **param,
struct filter_profile_t *profile,
struct error_t *error)
{
xmlChar *attr;
xmlNodePtr node;
attr = xmlGetProp(root, BAD_CAST "name");
if (!attr) {
e... | 0 | [] | cyrus-imapd | 6703ff881b6056e0c045a7b795ce8ba1bbb87027 | 95,730,058,314,779,300,000,000,000,000,000,000,000 | 65 | http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication |
epass2003_sm_unwrap_apdu(struct sc_card *card, struct sc_apdu *sm, struct sc_apdu *plain)
{
int r;
size_t len = 0;
epass2003_exdata *exdata = NULL;
if (!card->drv_data)
return SC_ERROR_INVALID_ARGUMENTS;
exdata = (epass2003_exdata *)card->drv_data;
LOG_FUNC_CALLED(card->ctx);
r = sc_check_sw(card, sm->sw1... | 1 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 333,391,125,738,477,340,000,000,000,000,000,000,000 | 34 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
ippAddRange(ipp_t *ipp, /* I - IPP message */
ipp_tag_t group, /* I - IPP group */
const char *name, /* I - Name of attribute */
int lower, /* I - Lower value */
int upper) /* I - Upper value */
{
ipp_attribute_t *attr; /* New attribute */
DEBUG_printf(("ippAdd... | 0 | [
"CWE-120"
] | cups | f24e6cf6a39300ad0c3726a41a4aab51ad54c109 | 119,274,747,983,346,500,000,000,000,000,000,000,000 | 31 | Fix multiple security/disclosure issues:
- CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251)
- Fixed IPP buffer overflow (rdar://50035411)
- Fixed memory disclosure issue in the scheduler (rdar://51373853)
- Fixed DoS issues in the scheduler (rdar://51373929) |
makeascii(
int length,
const char *data,
FILE *fp
)
{
const u_char *data_u_char;
const u_char *cp;
int c;
data_u_char = (const u_char *)data;
for (cp = data_u_char; cp < data_u_char + length; cp++) {
c = (int)*cp;
if (c & 0x80) {
putc('M', fp);
putc('-', fp);
c &= 0x7f;
}
if (c < ' ') {
... | 0 | [
"CWE-20"
] | ntp | 07a5b8141e354a998a52994c3c9cd547927e56ce | 12,124,699,173,286,210,000,000,000,000,000,000,000 | 30 | [TALOS-CAN-0063] avoid buffer overrun in ntpq |
PHPAPI char *php_escape_html_entities(unsigned char *old, size_t oldlen, size_t *newlen, int all, int flags, char *hint_charset TSRMLS_DC)
{
return php_escape_html_entities_ex(old, oldlen, newlen, all, flags, hint_charset, 1 TSRMLS_CC);
} | 0 | [
"CWE-190"
] | php-src | 0da8b8b801f9276359262f1ef8274c7812d3dfda | 77,520,995,064,850,340,000,000,000,000,000,000,000 | 4 | Fix bug #72135 - don't create strings with lengths outside int range |
static int selinux_socket_recvmsg(struct socket *sock, struct msghdr *msg,
int size, int flags)
{
return sock_has_perm(current, sock->sk, SOCKET__READ);
} | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 202,961,206,177,886,650,000,000,000,000,000,000,000 | 5 | Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is t... |
static bool is_imm8(int value)
{
return value <= 127 && value >= -128;
} | 0 | [
"CWE-17"
] | net | 3f7352bf21f8fd7ba3e2fcef9488756f188e12be | 134,798,313,607,890,270,000,000,000,000,000,000,000 | 4 | x86: bpf_jit: fix compilation of large bpf programs
x86 has variable length encoding. x86 JIT compiler is trying
to pick the shortest encoding for given bpf instruction.
While doing so the jump targets are changing, so JIT is doing
multiple passes over the program. Typical program needs 3 passes.
Some very short progr... |
static int add_parents_only(struct rev_info *revs, const char *arg_, int flags)
{
unsigned char sha1[20];
struct object *it;
struct commit *commit;
struct commit_list *parents;
const char *arg = arg_;
if (*arg == '^') {
flags ^= UNINTERESTING | BOTTOM;
arg++;
}
if (get_sha1_committish(arg, sha1))
return ... | 0 | [
"CWE-119",
"CWE-787"
] | git | 34fa79a6cde56d6d428ab0d3160cb094ebad3305 | 239,916,726,694,091,540,000,000,000,000,000,000,000 | 35 | prefer memcpy to strcpy
When we already know the length of a string (e.g., because
we just malloc'd to fit it), it's nicer to use memcpy than
strcpy, as it makes it more obvious that we are not going to
overflow the buffer (because the size we pass matches the
size in the allocation).
This also eliminates calls to st... |
builtin_breakpoint(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *keywords)
{
PyObject *hook = PySys_GetObject("breakpointhook");
if (hook == NULL) {
PyErr_SetString(PyExc_RuntimeError, "lost sys.breakpointhook");
return NULL;
}
Py_INCREF(hook);
PyObject *retval ... | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 258,032,876,201,206,900,000,000,000,000,000,000,000 | 13 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
static void dane_reset(struct dane_st *dane)
{
/*
* Reset state to verify another chain, or clear after failure.
*/
X509_free(dane->mcert);
dane->mcert = NULL;
dane->mtlsa = NULL;
dane->mdpth = -1;
dane->pdpth = -1;
} | 0 | [] | openssl | 33cc5dde478ba5ad79f8fd4acd8737f0e60e236e | 268,629,620,844,230,240,000,000,000,000,000,000,000 | 11 | Compat self-signed trust with reject-only aux data
When auxiliary data contains only reject entries, continue to trust
self-signed objects just as when no auxiliary data is present.
This makes it possible to reject specific uses without changing
what's accepted (and thus overring the underlying EKU).
Added new suppo... |
tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error)
{
guchar *pixels = NULL;
guchar *tmppix;
uint32 *rast, *tmp_rast;
gint w, h, x, y, num_pixs;
GdkPixbuf *pixbuf;
/* We're called with the lock held. */
g_return_val_if_fail (global_error == NULL, NULL);
if (!TIFFGetField... | 0 | [
"CWE-20"
] | gdk-pixbuf | 3bac204e0d0241a0d68586ece7099e6acf0e9bea | 241,328,389,168,719,400,000,000,000,000,000,000,000 | 102 | Initial stab at getting the focus code to work.
Fri Jun 1 18:54:47 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c: (gtk_tree_view_focus): Initial stab at
getting the focus code to work.
(gtk_tree_view_class_init): Add a bunch of keybindings.
* gtk/gtktreeviewcolumn.c
(gtk_tree_view_column_set_c... |
mark_context(mrb_state *mrb, struct mrb_context *c)
{
int i;
mrb_callinfo *ci;
start:
if (c->status == MRB_FIBER_TERMINATED) return;
/* mark VM stack */
mark_context_stack(mrb, c);
/* mark call stack */
if (c->cibase) {
for (ci = c->cibase; ci <= c->ci; ci++) {
mrb_gc_mark(mrb, (struct RBasi... | 0 | [
"CWE-415"
] | mruby | 97319697c8f9f6ff27b32589947e1918e3015503 | 227,389,430,229,135,270,000,000,000,000,000,000,000 | 30 | Cancel 9cdf439
Should not free the pointer in `realloc` since it can cause
use-after-free problem. |
static void reparent_to_kthreadd(void)
{
write_lock_irq(&tasklist_lock);
ptrace_unlink(current);
/* Reparent to init */
current->real_parent = current->parent = kthreadd_task;
list_move_tail(¤t->sibling, ¤t->real_parent->children);
/* Set the exit signal to SIGCHLD so we signal init on exit */
curr... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8141c7f3e7aee618312fa1c15109e1219de784a7 | 262,965,863,415,969,240,000,000,000,000,000,000,000 | 24 | Move "exit_robust_list" into mm_release()
We don't want to get rid of the futexes just at exit() time, we want to
drop them when doing an execve() too, since that gets rid of the
previous VM image too.
Doing it at mm_release() time means that we automatically always do it
when we disassociate a VM map from the task.
... |
pk_transaction_install_files (PkTransaction *transaction,
GVariant *params,
GDBusMethodInvocation *context)
{
gboolean ret;
GError *error_local = NULL;
guint length;
guint i;
PkBitfield transaction_flags;
gchar **full_paths;
_cleanup_error_free_ GError *error = NULL;
_cleanup_free_ gchar *cont... | 0 | [
"CWE-287"
] | PackageKit | f176976e24e8c17b80eff222572275517c16bdad | 138,330,722,556,098,960,000,000,000,000,000,000,000 | 106 | Reinstallation and downgrade require authorization
Added new policy actions:
* org.freedesktop.packagekit.package-reinstall
* org.freedesktop.packagekit.package-downgrade
The first does not depend or require any other actions to be authorized
except for org.freedesktop.packagekit.package-install-untrusted in case
o... |
AWSBrowserUploadAbstractor::get_auth_data(const req_state* const s) const
{
if (s->auth.s3_postobj_creds.x_amz_algorithm == AWS4_HMAC_SHA256_STR) {
ldpp_dout(s, 0) << "Signature verification algorithm AWS v4"
<< " (AWS4-HMAC-SHA256)" << dendl;
return get_auth_data_v4(s);
} else {
ld... | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 130,046,010,220,458,140,000,000,000,000,000,000,000 | 11 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
static void php_apache_add_version(apr_pool_t *p)
{
TSRMLS_FETCH();
if (PG(expose_php)) {
ap_add_version_component(p, "PHP/" PHP_VERSION);
}
} | 0 | [
"CWE-20"
] | php-src | 809610f5ea38a83b284e1125d1fff129bdd615e7 | 198,493,457,599,286,940,000,000,000,000,000,000,000 | 7 | Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4) |
int git_smart_subtransport_http(git_smart_subtransport **out, git_transport *owner, void *param)
{
http_subtransport *t;
GIT_UNUSED(param);
if (!out)
return -1;
t = git__calloc(sizeof(http_subtransport), 1);
GITERR_CHECK_ALLOC(t);
t->owner = (transport_smart *)owner;
t->parent.action = http_action;
t->par... | 0 | [
"CWE-284"
] | libgit2 | b5c6a1b407b7f8b952bded2789593b68b1876211 | 11,583,752,727,997,427,000,000,000,000,000,000,000 | 26 | http: check certificate validity before clobbering the error variable |
int js_isnumber(js_State *J, int idx) { return stackidx(J, idx)->type == JS_TNUMBER; } | 0 | [
"CWE-476"
] | mujs | 77ab465f1c394bb77f00966cd950650f3f53cb24 | 135,518,483,280,244,070,000,000,000,000,000,000,000 | 1 | Fix 697401: Error when dropping extra arguments to lightweight functions. |
static std::string getVersionedMethodPath(const std::string& service_full_name_template,
absl::string_view method_name,
envoy::config::core::v3::ApiVersion api_version,
bool use_alpha = ... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 98,610,609,700,660,430,000,000,000,000,000,000,000 | 10 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
static ssize_t align_show(struct kmem_cache *s, char *buf)
{
return sprintf(buf, "%u\n", s->align);
} | 0 | [] | linux | fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8 | 76,649,843,368,333,390,000,000,000,000,000,000,000 | 4 | mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu
freelist of length M, and N > M > 0, it will first remove the M elements
from the percpu freelist, then call ___slab_alloc() to allocate the next
element and repopulate the percpu freelis... |
chash_end(int type, void *base, uschar *string, int length, uschar *digest)
{
if (type == HMAC_MD5)
md5_end((md5 *)base, string, length, digest);
else
sha1_end((sha1 *)base, string, length, digest);
} | 0 | [
"CWE-189"
] | exim | 7685ce68148a083d7759e78d01aa5198fc099c44 | 86,825,642,962,992,700,000,000,000,000,000,000,000 | 7 | Only expand integers for integer math once |
compileError (FileInfo * nested, char *format, ...)
{
#ifndef __SYMBIAN32__
char buffer[MAXSTRING];
va_list arguments;
va_start (arguments, format);
#ifdef _WIN32
_vsnprintf (buffer, sizeof (buffer), format, arguments);
#else
vsnprintf (buffer, sizeof (buffer), format, arguments);
#endif
va_end (arguments);... | 0 | [] | liblouis | dc97ef791a4fae9da11592c79f9f79e010596e0c | 314,730,743,823,880,400,000,000,000,000,000,000,000 | 20 | Merge branch 'table_resolver' |
CACHE_LIMITER_ENTRY(nocache)
{0} | 0 | [
"CWE-264"
] | php-src | 25e8fcc88fa20dc9d4c47184471003f436927cde | 4,834,812,371,812,603,000,000,000,000,000,000,000 | 2 | Strict session |
static int ntop_nagios_reload_config(lua_State* vm) {
NagiosManager *nagios = ntop->getNagios();
ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__);
if(!nagios) {
ntop->getTrace()->traceEvent(TRACE_ERROR, "%s(): unable to get the nagios manager",
__FUNCTION__);
return(CONST_LUA... | 0 | [
"CWE-476"
] | ntopng | 01f47e04fd7c8d54399c9e465f823f0017069f8f | 322,692,614,605,954,430,000,000,000,000,000,000,000 | 13 | Security fix: prevents empty host from being used |
evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg)
{
EVBUFFER_LOCK(buffer);
if (!TAILQ_EMPTY(&buffer->callbacks))
evbuffer_remove_all_callbacks(buffer);
if (cb) {
struct evbuffer_cb_entry *ent =
evbuffer_add_cb(buffer, NULL, cbarg);
ent->cb.cb_obsolete = cb;
ent->flags |= EVBUFFER_C... | 0 | [
"CWE-189"
] | libevent | 20d6d4458bee5d88bda1511c225c25b2d3198d6c | 24,121,164,435,827,202,000,000,000,000,000,000,000 | 15 | Fix CVE-2014-6272 in Libevent 2.0
For this fix, we need to make sure that passing too-large inputs to
the evbuffer functions can't make us do bad things with the heap.
Also, lower the maximum chunk size to the lower of off_t, size_t maximum.
This is necessary since otherwise we could get into an infinite loop
if we ... |
CImg<T>& load_pandore(std::FILE *const file) {
return _load_pandore(file,0);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 326,100,571,943,477,940,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int acm_tty_write_room(struct tty_struct *tty)
{
struct acm *acm = tty->driver_data;
/*
* Do not let the line discipline to know that we have a reserve,
* or it might get too enthusiastic.
*/
return acm_wb_is_avail(acm) ? acm->writesize : 0;
} | 0 | [
"CWE-703"
] | linux | 8835ba4a39cf53f705417b3b3a94eb067673f2c9 | 297,490,110,525,971,000,000,000,000,000,000,000,000 | 9 | USB: cdc-acm: more sanity checking
An attack has become available which pretends to be a quirky
device circumventing normal sanity checks and crashes the kernel
by an insufficient number of interfaces. This patch adds a check
to the code path for quirky devices.
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: sta... |
static int rtrs_rdma_conn_established(struct rtrs_clt_con *con,
struct rdma_cm_event *ev)
{
struct rtrs_clt_path *clt_path = to_clt_path(con->c.path);
struct rtrs_clt_sess *clt = clt_path->clt;
const struct rtrs_msg_conn_rsp *msg;
u16 version, queue_depth;
int errno;
u8 len;
msg = ev->param.conn.priv... | 0 | [
"CWE-415"
] | linux | 8700af2cc18c919b2a83e74e0479038fd113c15d | 216,283,564,993,762,570,000,000,000,000,000,000,000 | 89 | RDMA/rtrs-clt: Fix possible double free in error case
Callback function rtrs_clt_dev_release() for put_device() calls kfree(clt)
to free memory. We shouldn't call kfree(clt) again, and we can't use the
clt after kfree too.
Replace device_register() with device_initialize() and device_add() so that
dev_set_name can() ... |
static loff_t vaddr_to_offset(struct vm_area_struct *vma, unsigned long vaddr)
{
return ((loff_t)vma->vm_pgoff << PAGE_SHIFT) + (vaddr - vma->vm_start);
} | 0 | [
"CWE-416"
] | linux | 355627f518978b5167256d27492fe0b343aaf2f2 | 240,543,176,708,715,880,000,000,000,000,000,000,000 | 4 | mm, uprobes: fix multiple free of ->uprobes_state.xol_area
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 error p... |
htp_status_t htp_tx_finalize(htp_tx_t *tx) {
if (tx == NULL) return HTP_ERROR;
if (!htp_tx_is_complete(tx)) return HTP_OK;
// Run hook TRANSACTION_COMPLETE.
htp_status_t rc = htp_hook_run_all(tx->connp->cfg->hook_transaction_complete, tx);
if (rc != HTP_OK) return rc;
// In streaming processi... | 0 | [] | libhtp | c7c03843cd6b1cbf44eb435d160ba53aec948828 | 157,948,675,872,337,720,000,000,000,000,000,000,000 | 16 | Harden decompress code against memory stress
Under severe memory pressure the decompress code can fail to setup
properly. Add checks before dereferencing pointers. |
Error Box_ipma::parse(BitstreamRange& range)
{
parse_full_box_header(range);
int entry_cnt = range.read32();
for (int i = 0; i < entry_cnt && !range.error() && !range.eof(); i++) {
Entry entry;
if (get_version()<1) {
entry.item_ID = range.read16();
}
else {
entry.item_ID = range.read3... | 0 | [
"CWE-703"
] | libheif | 2710c930918609caaf0a664e9c7bc3dce05d5b58 | 123,614,703,158,964,300,000,000,000,000,000,000,000 | 38 | force fraction to a limited resolution to finally solve those pesky numerical edge cases |
ShapeHandle InferenceContext::MakeShape(
std::initializer_list<DimensionOrConstant> dims) {
std::vector<DimensionHandle> dims_actual;
dims_actual.reserve(dims.size());
for (const DimensionOrConstant& d : dims) {
dims_actual.push_back(MakeDim(d));
}
return shape_manager_.MakeShape(dims_actual);
} | 0 | [
"CWE-190"
] | tensorflow | acd56b8bcb72b163c834ae4f18469047b001fadf | 23,386,217,707,502,680,000,000,000,000,000,000,000 | 10 | Fix security vulnerability with SpaceToBatchNDOp.
PiperOrigin-RevId: 445527615 |
bool Database::fuzzyMatch(QString &name, QString &user, QString &pw, QString &hostname, unsigned short port) {
QSqlQuery query;
if (! user.isEmpty()) {
query.prepare(QLatin1String("SELECT `username`, `password`, `hostname`, `name` FROM `servers` WHERE `username` LIKE ? AND `hostname` LIKE ? AND `port`=?"));
query... | 0 | [
"CWE-310"
] | mumble | 5632c35d6759f5e13a7dfe78e4ee6403ff6a8e3e | 319,113,471,305,634,820,000,000,000,000,000,000,000 | 23 | Explicitly remove file permissions for settings and DB |
static int mailbox_open_advanced(const char *name,
int locktype,
int index_locktype,
const mbentry_t *mbe,
struct mailbox **mailboxptr)
{
mbentry_t *mbentry = NULL;
struct mailboxl... | 0 | [] | cyrus-imapd | 1d6d15ee74e11a9bd745e80be69869e5fb8d64d6 | 276,151,279,252,709,040,000,000,000,000,000,000,000 | 129 | mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path() |
void ActiveStreamEncoderFilter::doData(bool end_stream) {
parent_.encodeData(this, *parent_.buffered_response_data_, end_stream,
FilterManager::FilterIterationStartState::CanStartFromCurrent);
} | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 147,242,818,019,421,450,000,000,000,000,000,000,000 | 4 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
inline void unused(const T&, ...) {} | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 121,278,484,025,495,220,000,000,000,000,000,000,000 | 1 | Fix other issues in 'CImg<T>::load_bmp()'. |
static ssize_t remote_node_defrag_ratio_show(struct kmem_cache *s, char *buf)
{
return sprintf(buf, "%u\n", s->remote_node_defrag_ratio / 10);
} | 0 | [] | linux | fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8 | 306,978,364,042,359,040,000,000,000,000,000,000,000 | 4 | mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu
freelist of length M, and N > M > 0, it will first remove the M elements
from the percpu freelist, then call ___slab_alloc() to allocate the next
element and repopulate the percpu freelis... |
TEST_F(OptimizePipeline, ComputedProjectThenMetaMatchPushedDown) {
auto pipeline = Pipeline::parse(
makeVector(fromjson("{$_internalUnpackBucket: { exclude: [], timeField: 'time', metaField: "
"'myMeta', bucketMaxSpanSeconds: 3600}}"),
fromjson("{$project: {y: ... | 0 | [] | mongo | b3107d73a2c58d7e016b834dae0acfd01c0db8d7 | 186,332,586,861,964,050,000,000,000,000,000,000,000 | 23 | SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt
(cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec) |
bt_popup(buf_T *buf)
{
return buf != NULL && buf->b_p_bt != NULL
&& buf->b_p_bt[0] == 'p' && buf->b_p_bt[1] == 'o';
} | 0 | [
"CWE-416"
] | vim | 9b4a80a66544f2782040b641498754bcb5b8d461 | 256,346,223,420,418,880,000,000,000,000,000,000,000 | 5 | patch 8.2.4281: using freed memory with :lopen and :bwipe
Problem: Using freed memory with :lopen and :bwipe.
Solution: Do not use a wiped out buffer. |
nv_end(cmdarg_T *cap)
{
if (cap->arg || (mod_mask & MOD_MASK_CTRL)) // CTRL-END = goto last line
{
cap->arg = TRUE;
nv_goto(cap);
cap->count1 = 1; // to end of current line
}
nv_dollar(cap);
} | 0 | [
"CWE-416"
] | vim | 35a9a00afcb20897d462a766793ff45534810dc3 | 113,428,978,086,857,080,000,000,000,000,000,000,000 | 10 | 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(). |
int ssl_flush_output( ssl_context *ssl )
{
int ret;
unsigned char *buf;
SSL_DEBUG_MSG( 2, ( "=> flush output" ) );
while( ssl->out_left > 0 )
{
SSL_DEBUG_MSG( 2, ( "message length: %d, out_left: %d",
5 + ssl->out_msglen, ssl->out_left ) );
if( ssl->out_msgle... | 0 | [
"CWE-310"
] | polarssl | 4582999be608c9794d4518ae336b265084db9f93 | 213,507,820,906,249,730,000,000,000,000,000,000,000 | 42 | Fixed timing difference resulting from badly formatted padding. |
bool virDomainObjTaint(virDomainObjPtr obj,
virDomainTaintFlags taint)
{
unsigned int flag = (1 << taint);
if (obj->taint & flag)
return false;
obj->taint |= flag;
return true;
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 56,381,256,802,731,840,000,000,000,000,000,000,000 | 11 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
static SQInteger base_setroottable(HSQUIRRELVM v)
{
SQObjectPtr o = v->_roottable;
if(SQ_FAILED(sq_setroottable(v))) return SQ_ERROR;
v->Push(o);
return 1;
} | 0 | [
"CWE-703",
"CWE-787"
] | squirrel | a6413aa690e0bdfef648c68693349a7b878fe60d | 10,211,636,482,443,107,000,000,000,000,000,000,000 | 7 | fix in thread.call |
int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx)
{
if (group->meth->invert == 0)
{
ECerr(EC_F_EC_POINT_INVERT, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
return 0;
}
if (group->meth != a->meth)
{
ECerr(EC_F_EC_POINT_INVERT, EC_R_INCOMPATIBLE_OBJECTS);
return 0;
}
return group->meth->inv... | 0 | [
"CWE-320"
] | openssl | 8aed2a7548362e88e84a7feb795a3a97e8395008 | 309,533,075,566,781,800,000,000,000,000,000,000,000 | 14 | Reserve option to use BN_mod_exp_mont_consttime in ECDSA.
Submitted by Shay Gueron, Intel Corp.
RT: 3149
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit f54be179aa4cbbd944728771d7d59ed588158a12) |
~Abort_on_warning_instant_set()
{
m_thd->abort_on_warning= m_save_abort_on_warning;
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 160,652,005,711,802,600,000,000,000,000,000,000,000 | 4 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
static int dissect_CPMConnect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, gboolean in, void *private_data)
{
proto_item *ti;
proto_tree *tree;
gint offset = 16;
guint len;
guint32 version;
struct message_data *data = NULL;
struct mswsp_ct *ct = NULL;
ti = proto_tree_add_item(parent_tree, hf_msw... | 0 | [
"CWE-770"
] | wireshark | b7a0650e061b5418ab4a8f72c6e4b00317aff623 | 222,211,541,411,334,850,000,000,000,000,000,000,000 | 79 | MS-WSP: Don't allocate huge amounts of memory.
Add a couple of memory allocation sanity checks, one of which
fixes #17331. |
pci_get_cfgdata32(struct pci_vdev *dev, int offset)
{
if ((offset > PCI_REGMAX - 3) || (offset & 3) != 0) {
pr_err("%s: out of range of PCI config space!\n", __func__);
return 0xffffffff;
}
return (*(uint32_t *)(dev->cfgdata + offset));
} | 0 | [
"CWE-617",
"CWE-703"
] | acrn-hypervisor | 2b3dedfb9ba13f15887f22b935d373f36c9a59fa | 144,023,819,650,349,320,000,000,000,000,000,000,000 | 8 | dm: pci: clean up assert() in pci core
Tracked-On: #3252
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com> |
check_for_string_or_list_or_blob_arg(typval_T *args, int idx)
{
if (args[idx].v_type != VAR_STRING
&& args[idx].v_type != VAR_LIST
&& args[idx].v_type != VAR_BLOB)
{
semsg(_(e_string_list_or_blob_required_for_argument_nr), idx + 1);
return FAIL;
}
return OK;
} | 0 | [
"CWE-125",
"CWE-122"
] | vim | 1e56bda9048a9625bce6e660938c834c5c15b07d | 64,557,622,957,208,840,000,000,000,000,000,000,000 | 11 | patch 9.0.0104: going beyond allocated memory when evaluating string constant
Problem: Going beyond allocated memory when evaluating string constant.
Solution: Properly skip over <Key> form. |
static inline gpa_t translate_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access,
struct x86_exception *exception)
{
return gpa;
} | 0 | [] | kvm | 854e8bb1aa06c578c2c9145fa6bfe3680ef63b23 | 50,914,532,329,047,040,000,000,000,000,000,000,000 | 5 | KVM: x86: Check non-canonical addresses upon WRMSR
Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is
written to certain MSRs. The behavior is "almost" identical for AMD and Intel
(ignoring MSRs that are not implemented in either architecture since they would
anyhow #GP). However, IA32_SYSENTE... |
void payt_del(GF_Box *s)
{
GF_PAYTBox *payt = (GF_PAYTBox *)s;
if (payt->payloadString) gf_free(payt->payloadString);
gf_free(payt);
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 222,779,751,606,147,870,000,000,000,000,000,000,000 | 6 | prevent dref memleak on invalid input (#1183) |
f_findfile(typval_T *argvars, typval_T *rettv)
{
findfilendir(argvars, rettv, FINDFILE_FILE);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 58,147,864,880,616,830,000,000,000,000,000,000,000 | 4 | 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. |
curwin_col_off2(void)
{
return win_col_off2(curwin);
} | 0 | [
"CWE-122"
] | vim | 777e7c21b7627be80961848ac560cb0a9978ff43 | 12,428,461,487,063,440,000,000,000,000,000,000,000 | 4 | patch 8.2.3564: invalid memory access when scrolling without valid screen
Problem: Invalid memory access when scrolling without a valid screen.
Solution: Do not set VALID_BOTLINE in w_valid. |
static void rtps_add_zlib_compressed_typeobject(proto_tree *tree, packet_info * pinfo,
tvbuff_t * tvb, gint offset, const guint encoding, guint compressed_size,
guint decompressed_size, type_mapping * type_mapping_object) {
tvbuff_t *decompressed_data_child_tvb;
tvbuff_t *compressed_type_object_subset;
proto... | 0 | [
"CWE-401"
] | wireshark | 33e63d19e5496c151bad69f65cdbc7cba2b4c211 | 120,800,391,437,554,190,000,000,000,000,000,000,000 | 21 | RTPS: Fixup our coherent set map.
coherent_set_tracking.coherent_set_registry_map uses a struct as a key,
but the hash and comparison routines treat keys as a sequence of bytes.
Make sure every key byte is initialized. Fixes #16994.
Call wmem_strong_hash on our key in coherent_set_key_hash_by_key instead
of creating ... |
extract_l4_udp(struct conn_key *key, const void *data, size_t size,
size_t *chk_len)
{
const struct udp_header *udp = data;
if (OVS_UNLIKELY(size < (chk_len ? *chk_len : UDP_HEADER_LEN))) {
return false;
}
key->src.port = udp->udp_src;
key->dst.port = udp->udp_dst;
/* P... | 0 | [
"CWE-400"
] | ovs | 35c280072c1c3ed58202745b7d27fbbd0736999b | 106,944,889,027,064,560,000,000,000,000,000,000,000 | 15 | 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... |
unsigned long long thread_group_sched_runtime(struct task_struct *p)
{
struct task_cputime totals;
unsigned long flags;
struct rq *rq;
u64 ns;
rq = task_rq_lock(p, &flags);
thread_group_cputime(p, &totals);
ns = totals.sum_exec_runtime + do_task_delta_exec(p, rq);
task_rq_unlock(rq, &flags);
return ns;
} | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 256,315,594,987,666,200,000,000,000,000,000,000,000 | 14 | 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... |
virDomainDiskSetSource(virDomainDiskDefPtr def, const char *src)
{
char *tmp = g_strdup(src);
g_free(def->src->path);
def->src->path = tmp;
return 0;
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 88,666,753,971,176,370,000,000,000,000,000,000,000 | 7 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
TEST_P(Security, BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsDisableDiscoveryDisableAccessNone_validation_ok_enable_discovery_disable_access_encrypt)
// *INDENT-ON*
{
PubSubReader<HelloWorldType> reader(TEST_TOPIC_NAME);
PubSubWriter<HelloWorldType> writer(TEST_TOPIC_NAME);
std::string governan... | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 75,281,061,749,559,200,000,000,000,000,000,000,000 | 9 | check remote permissions (#1387)
* Refs 5346. Blackbox test
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. one-way string compare
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. Do not add partition separator on last partition
Signed-off-by: Iker Luengo <ikerluengo@e... |
int main(int argc, char *argv[])
{
int option;
int passlen=0;
FILE *outfp = NULL;
char outfile[1024];
unsigned char pass[MAX_PASSWD_BUF];
int file_count = 0;
unsigned char bom[2];
int password_acquired = 0;
while ((option = getopt(argc, argv, "vhg:p:o:")) != -1)
{
switch... | 0 | [
"CWE-287",
"CWE-787"
] | AESCrypt | 68761851b595e96c68c3f46bfc21167e72c6a22c | 114,928,096,344,998,380,000,000,000,000,000,000,000 | 154 | Fixed security issue with passwords entered via a prompt |
_TIFFPrettyPrintField(TIFF* tif, const TIFFField *fip, FILE* fd, uint32 tag,
uint32 value_count, void *raw_data)
{
(void) tif;
/* do not try to pretty print auto-defined fields */
if (strncmp(fip->field_name,"Tag ", 4) == 0) {
return 0;
}
switch (tag)
{
case TIFFTAG_INKSET:
if (val... | 0 | [
"CWE-476"
] | libtiff | c6f41df7b581402dfba3c19a1e3df4454c551a01 | 226,300,429,159,000,370,000,000,000,000,000,000,000 | 87 | libtiff/tif_print.c: TIFFPrintDirectory(): fix null pointer dereference on corrupted file. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2770 |
HRESULT Http::HrResponseHeader(unsigned int ulCode, const std::string &strResponse)
{
m_ulRetCode = ulCode;
// do not set headers if once set
if (!m_strRespHeader.empty())
return MAPI_E_CALL_FAILED;
m_strRespHeader = "HTTP/1.1 " + stringify(ulCode) + " " + strResponse;
return hrSuccess;
} | 0 | [
"CWE-770"
] | kopano-core | 512457466b87039c6a8d25887fdaca6173619546 | 94,039,446,103,434,640,000,000,000,000,000,000,000 | 9 | Set limit on header size to prevent bad alloc
This sets a hard limit of 64 KiB to the header to prevent a memory
allocation exception from being thrown during the parsing of the request
headers. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.