func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void RGWBulkDelete_ObjStore_SWIFT::send_response()
{
set_req_state_err(s, op_ret);
dump_errno(s);
end_header(s, this /* RGWOp */, nullptr /* contype */,
CHUNKED_TRANSFER_ENCODING);
bulkdelete_respond(deleter->get_num_deleted(),
deleter->get_num_unfound(),
... | 0 | [
"CWE-617"
] | ceph | f44a8ae8aa27ecef69528db9aec220f12492810e | 145,929,478,182,054,180,000,000,000,000,000,000,000 | 14 | rgw: RGWSwiftWebsiteHandler::is_web_dir checks empty subdir_name
checking for empty name avoids later assertion in RGWObjectCtx::set_atomic
Fixes: CVE-2021-3531
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 7196a469b4470f3c8628489df9a41ec8b... |
asmlinkage void __exception do_sp_pc_abort(unsigned long addr,
unsigned int esr,
struct pt_regs *regs)
{
struct siginfo info;
info.si_signo = SIGBUS;
info.si_errno = 0;
info.si_code = BUS_ADRALN;
info.si_addr = (void __user *)addr;
arm64_notify_die("", regs, &info, esr);
} | 0 | [] | linux | 1d18c47c735e8adfe531fc41fae31e98f86b68fe | 195,552,058,606,246,970,000,000,000,000,000,000,000 | 12 | arm64: MMU fault handling and page table management
This patch adds support for the handling of the MMU faults (exception
entry code introduced by a previous patch) and page table management.
The user translation table is pointed to by TTBR0 and the kernel one
(swapper_pg_dir) by TTBR1. There is no translation inform... |
__acquires(¤t->sighand->siglock)
{
bool gstop_done = false;
if (arch_ptrace_stop_needed(exit_code, info)) {
/*
* The arch code has something special to do before a
* ptrace stop. This is allowed to block, e.g. for faults
* on user stack pages. We can't keep the siglock while
* calling arch_ptr... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 4ea77014af0d6205b05503d1c7aac6eace11d473 | 220,394,453,347,638,180,000,000,000,000,000,000,000 | 119 | kernel/signal.c: avoid undefined behaviour in kill_something_info
When running kill(72057458746458112, 0) in userspace I hit the following
issue.
UBSAN: Undefined behaviour in kernel/signal.c:1462:11
negation of -2147483648 cannot be represented in type 'int':
CPU: 226 PID: 9849 Comm: test Tainted: G B ... |
static int do_execve_common(const char *filename,
struct user_arg_ptr argv,
struct user_arg_ptr envp)
{
struct linux_binprm *bprm;
struct file *file;
struct files_struct *displaced;
bool clear_in_exec;
int retval;
const struct cred *cred = current_cred();
/*
* We move the actual failure in case of RLI... | 0 | [
"CWE-200"
] | linux-2.6 | b66c5984017533316fd1951770302649baf1aa33 | 106,264,877,396,886,660,000,000,000,000,000,000,000 | 125 | exec: do not leave bprm->interp on stack
If a series of scripts are executed, each triggering module loading via
unprintable bytes in the script header, kernel stack contents can leak
into the command line.
Normally execution of binfmt_script and binfmt_misc happens recursively.
However, when modules are enabled, and... |
static void *nfs_server_list_start(struct seq_file *m, loff_t *_pos)
{
/* lock the list against modification */
spin_lock(&nfs_client_lock);
return seq_list_start_head(&nfs_client_list, *_pos);
} | 0 | [
"CWE-20"
] | linux-2.6 | 54af3bb543c071769141387a42deaaab5074da55 | 182,811,772,519,725,600,000,000,000,000,000,000,000 | 6 | NFS: Fix an Oops in encode_lookup()
It doesn't look as if the NFS file name limit is being initialised correctly
in the struct nfs_server. Make sure that we limit whatever is being set in
nfs_probe_fsinfo() and nfs_init_server().
Also ensure that readdirplus and nfs4_path_walk respect our file name
limits.
Signed-of... |
int perf_event_release_kernel(struct perf_event *event)
{
struct perf_event_context *ctx = event->ctx;
struct perf_event *child, *tmp;
/*
* If we got here through err_file: fput(event_file); we will not have
* attached to a context yet.
*/
if (!ctx) {
WARN_ON_ONCE(event->attach_state &
(PERF_ATTACH_CON... | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 190,176,316,848,537,300,000,000,000,000,000,000,000 | 96 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... |
static debug_info_t *qeth_get_dbf_entry(char *name)
{
struct qeth_dbf_entry *entry;
debug_info_t *rc = NULL;
mutex_lock(&qeth_dbf_list_mutex);
list_for_each_entry(entry, &qeth_dbf_list, dbf_list) {
if (strcmp(entry->dbf_name, name) == 0) {
rc = entry->dbf_info;
break;
}
}
mutex_unlock(&qeth_dbf_list_mu... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 243,490,712,944,147,030,000,000,000,000,000,000,000 | 15 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
TF_LITE_ENSURE_EQ(context, NumInputs(node), 4);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
const TfLiteTensor* indices = GetInput(context, node, kIndicesTensor);
const TfLiteTensor* output_shape =
GetInput(context, node, kOutputShapeT... | 1 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 199,370,677,677,068,220,000,000,000,000,000,000,000 | 49 | [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... |
CollSeq *sqlite3ExprNNCollSeq(Parse *pParse, Expr *pExpr){
CollSeq *p = sqlite3ExprCollSeq(pParse, pExpr);
if( p==0 ) p = pParse->db->pDfltColl;
assert( p!=0 );
return p;
} | 0 | [
"CWE-476"
] | sqlite | 57f7ece78410a8aae86aa4625fb7556897db384c | 295,091,801,455,306,680,000,000,000,000,000,000,000 | 6 | Fix a problem that comes up when using generated columns that evaluate to a
constant in an index and then making use of that index in a join.
FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af |
static struct syscall_metadata *syscall_nr_to_meta(int nr)
{
if (!syscalls_metadata || nr >= NR_syscalls || nr < 0)
return NULL;
return syscalls_metadata[nr];
} | 0 | [
"CWE-125",
"CWE-476",
"CWE-119",
"CWE-264"
] | linux | 086ba77a6db00ed858ff07451bedee197df868c9 | 250,744,493,642,211,560,000,000,000,000,000,000,000 | 7 | 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.
... |
static void lan9118_realize(DeviceState *dev, Error **errp)
{
SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
lan9118_state *s = LAN9118(dev);
int i;
const MemoryRegionOps *mem_ops =
s->mode_16bit ? &lan9118_16bit_mem_ops : &lan9118_mem_ops;
memory_region_init_io(&s->mmio, OBJECT(dev), mem_ops... | 0 | [
"CWE-835"
] | qemu | 37cee01784ff0df13e5209517e1b3594a5e792d1 | 88,595,245,552,422,450,000,000,000,000,000,000,000 | 30 | lan9118: switch to use qemu_receive_packet() for loopback
This patch switches to use qemu_receive_packet() which can detect
reentrancy and return early.
This is intended to address CVE-2021-3416.
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.co... |
static void part_round_stats_single(struct request_queue *q, int cpu,
struct hd_struct *part, unsigned long now,
unsigned int inflight)
{
if (inflight) {
__part_stat_add(cpu, part, time_in_queue,
inflight * (now - part->stamp));
__part_stat_add(cpu, part, io_ticks, (now - part->stamp));
}
par... | 0 | [
"CWE-416",
"CWE-703"
] | linux | 54648cf1ec2d7f4b6a71767799c45676a138ca24 | 323,017,528,920,307,600,000,000,000,000,000,000,000 | 11 | block: blk_init_allocated_queue() set q->fq as NULL in the fail case
We find the memory use-after-free issue in __blk_drain_queue()
on the kernel 4.14. After read the latest kernel 4.18-rc6 we
think it has the same problem.
Memory is allocated for q->fq in the blk_init_allocated_queue().
If the elevator init function... |
cmsBool Type_MPE_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsUInt32Number i, BaseOffset, DirectoryPos, CurrentPos;
int inputChan, outputChan;
cmsUInt32Number ElemCount;
cmsUInt32Number *ElementOffsets = NULL, *ElementSizes = NULL, Before;
cms... | 1 | [] | Little-CMS | 886e2f524268efe8a1c3aa838c28e446fda24486 | 130,133,716,758,447,660,000,000,000,000,000,000,000 | 89 | Fixes from coverity check |
STATIC void GC_check_heap_block(struct hblk *hbp, word dummy GC_ATTR_UNUSED)
{
struct hblkhdr * hhdr = HDR(hbp);
size_t sz = hhdr -> hb_sz;
size_t bit_no;
char *p, *plim;
p = hbp->hb_body;
if (sz > MAXOBJBYTES) {
plim = p;
} else {
plim = hbp->hb_body + HBLKSIZE - sz;
}
... | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 44,294,463,766,906,760,000,000,000,000,000,000,000 | 23 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
list_single_server_status(routerinfo_t *desc, int is_live)
{
char buf[MAX_NICKNAME_LEN+HEX_DIGEST_LEN+4]; /* !nickname=$hexdigest\0 */
char *cp;
tor_assert(desc);
cp = buf;
if (!is_live) {
*cp++ = '!';
}
if (desc->is_valid) {
strlcpy(cp, desc->nickname, sizeof(buf)-(cp-buf));
cp += strlen(cp... | 0 | [
"CWE-264"
] | tor | 00fffbc1a15e2696a89c721d0c94dc333ff419ef | 18,070,469,452,835,132,000,000,000,000,000,000,000 | 21 | Don't give the Guard flag to relays without the CVE-2011-2768 fix |
bool wsrep_sst_method_check (sys_var *self, THD* thd, set_var* var)
{
char buff[FN_REFLEN];
String str(buff, sizeof(buff), system_charset_info), *res;
const char* c_str = NULL;
if ((res = var->value->val_str(&str)) &&
(c_str = res->c_ptr()) &&
strlen(c_str) > 0)
return 0;
... | 0 | [
"CWE-77"
] | mysql-wsrep | 4ea4b0c6a318209ac09b15aaa906c7b4a13b988c | 185,997,713,967,695,830,000,000,000,000,000,000,000 | 14 | codership/mysql-wsrep-bugs#758 Donor uses invalid SST methods |
static void tcf_block_flush_all_chains(struct tcf_block *block, bool rtnl_held)
{
struct tcf_chain *chain;
/* Last reference to block. At this point chains cannot be added or
* removed concurrently.
*/
for (chain = tcf_get_next_chain(block, NULL);
chain;
chain = tcf_get_next_chain(block, chain)) {
... | 0 | [
"CWE-416"
] | linux | 04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5 | 170,252,107,157,148,600,000,000,000,000,000,000,000 | 14 | net: sched: fix use-after-free in tc_new_tfilter()
Whenever tc_new_tfilter() jumps back to replay: label,
we need to make sure @q and @chain local variables are cleared again,
or risk use-after-free as in [1]
For consistency, apply the same fix in tc_ctl_chain()
BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1... |
static void btrfs_dev_replace_update_device_in_mapping_tree(
struct btrfs_fs_info *fs_info,
struct btrfs_device *srcdev,
struct btrfs_device *tgtdev)
{
struct extent_map_tree *em_tree = &fs_info->mapping_tree.map_tree;
struct extent_map *em;
struct map_lookup *map;
u64 start = 0;
int i;
write_l... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 128,264,206,540,479,050,000,000,000,000,000,000,000 | 25 | 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 Field_varstring::sort_string(uchar *to,uint length)
{
String buf;
val_str(&buf, &buf);
if (field_charset == &my_charset_bin)
{
/* Store length last in high-byte order to sort longer strings first */
if (length_bytes == 1)
to[length - 1]= buf.length();
else
mi_int2store(to + length... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 256,410,920,819,137,720,000,000,000,000,000,000,000 | 26 | 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... |
static int udf_read_inode(struct inode *inode, bool hidden_inode)
{
struct buffer_head *bh = NULL;
struct fileEntry *fe;
struct extendedFileEntry *efe;
uint16_t ident;
struct udf_inode_info *iinfo = UDF_I(inode);
struct udf_sb_info *sbi = UDF_SB(inode->i_sb);
struct kernel_lb_addr *iloc = &iinfo->i_location;
un... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 23b133bdc452aa441fcb9b82cbf6dd05cfd342d0 | 215,378,557,601,129,640,000,000,000,000,000,000,000 | 298 | udf: Check length of extended attributes and allocation descriptors
Check length of extended attributes and allocation descriptors when
loading inodes from disk. Otherwise corrupted filesystems could confuse
the code and make the kernel oops.
Reported-by: Carl Henrik Lunde <chlunde@ping.uio.no>
CC: stable@vger.kernel... |
static void sm501_disp_ctrl_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
SM501State *s = (SM501State *)opaque;
SM501_DPRINTF("sm501 disp ctrl regs : write addr=%x, val=%x\n",
(unsigned)addr, (unsigned)value);
switch (addr) {
case ... | 0 | [
"CWE-190"
] | qemu | b15a22bbcbe6a78dc3d88fe3134985e4cdd87de4 | 76,155,965,093,107,480,000,000,000,000,000,000,000 | 135 | sm501: Replace hand written implementation with pixman where possible
Besides being faster this should also prevent malicious guests to
abuse 2D engine to overwrite data or cause a crash.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-id: 58666389b6cae256e4e972a32c05cf8aa51bffc0.1590089984.git.balaton@eik... |
static long vhost_vdpa_set_config(struct vhost_vdpa *v,
struct vhost_vdpa_config __user *c)
{
struct vdpa_device *vdpa = v->vdpa;
const struct vdpa_config_ops *ops = vdpa->config;
struct vhost_vdpa_config config;
unsigned long size = offsetof(struct vhost_vdpa_config, buf);
u8 *buf;
if (copy_from_user(&con... | 0 | [
"CWE-416"
] | linux | f6bbf0010ba004f5e90c7aefdebc0ee4bd3283b9 | 272,380,955,637,534,400,000,000,000,000,000,000,000 | 23 | vhost-vdpa: fix use-after-free of v->config_ctx
When the 'v->config_ctx' eventfd_ctx reference is released we didn't
set it to NULL. So if the same character device (e.g. /dev/vhost-vdpa-0)
is re-opened, the 'v->config_ctx' is invalid and calling again
vhost_vdpa_config_put() causes use-after-free issues like the
foll... |
nlmclnt_test(struct nlm_rqst *req, struct file_lock *fl)
{
int status;
status = nlmclnt_call(nfs_file_cred(fl->fl_file), req, NLMPROC_TEST);
if (status < 0)
goto out;
switch (req->a_res.status) {
case nlm_granted:
fl->fl_type = F_UNLCK;
break;
case nlm_lck_denied:
/*
* Report the conflicting lo... | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 311,113,508,819,267,000,000,000,000,000,000,000,000 | 28 | NLM: Don't hang forever on NLM unlock requests
If the NLM daemon is killed on the NFS server, we can currently end up
hanging forever on an 'unlock' request, instead of aborting. Basically,
if the rpcbind request fails, or the server keeps returning garbage, we
really want to quit instead of retrying.
Tested-by: Vasi... |
int mlx5_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
int attr_mask, struct ib_udata *udata)
{
struct mlx5_ib_dev *dev = to_mdev(ibqp->device);
struct mlx5_ib_qp *qp = to_mqp(ibqp);
struct mlx5_ib_modify_qp ucmd = {};
enum ib_qp_type qp_type;
enum ib_qp_state cur_state, new_state;
size_t requ... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 154,067,247,098,170,440,000,000,000,000,000,000,000 | 125 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <... |
_XimSetIMValuesCheck(
Xim im,
INT16 len,
XPointer data,
XPointer arg)
{
CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE);
CARD8 major_opcode = *((CARD8 *)data);
CARD8 minor_opcode = *((CARD8 *)data + 1);
XIMID imid = buf_s[0];
if ((major_opcode == ... | 0 | [
"CWE-190"
] | libx11 | 1a566c9e00e5f35c1f9e7f3d741a02e5170852b2 | 336,613,263,848,895,920,000,000,000,000,000,000,000 | 22 | Zero out buffers in functions
It looks like uninitialized stack or heap memory can leak
out via padding bytes.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> |
int bdrv_aio_multiwrite(BlockDriverState *bs, BlockRequest *reqs, int num_reqs)
{
MultiwriteCB *mcb;
int i;
/* don't submit writes if we don't have a medium */
if (bs->drv == NULL) {
for (i = 0; i < num_reqs; i++) {
reqs[i].error = -ENOMEDIUM;
}
return -1;
}
... | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 56,820,852,179,079,440,000,000,000,000,000,000,000 | 43 | block: Limit request size (CVE-2014-0143)
Limiting the size of a single request to INT_MAX not only fixes a
direct integer overflow in bdrv_check_request() (which would only
trigger bad behaviour with ridiculously huge images, as in close to
2^64 bytes), but can also prevent overflows in all block drivers.
Signed-off... |
TEST_P(DownstreamProtocolIntegrationTest, Test100AndDisconnect) {
initialize();
codec_client_ = makeHttpConnection(lookupPort("http"));
auto response = codec_client_->makeHeaderOnlyRequest(default_request_headers_);
waitForNextUpstreamRequest();
upstream_request_->encode100ContinueHeaders(Http::TestResponseHe... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 330,678,504,026,006,030,000,000,000,000,000,000,000 | 13 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
int sm2_plaintext_size(const EC_KEY *key, const EVP_MD *digest, size_t msg_len,
size_t *pt_size)
{
const size_t field_size = ec_field_size(EC_KEY_get0_group(key));
const int md_size = EVP_MD_size(digest);
size_t overhead;
if (md_size < 0) {
SM2err(SM2_F_SM2_PLAINTEXT_SIZE... | 1 | [
"CWE-120"
] | openssl | 59f5e75f3bced8fc0e130d72a3f582cf7b480b46 | 77,145,164,304,851,800,000,000,000,000,000,000,000 | 25 | Correctly calculate the length of SM2 plaintext given the ciphertext
Previously the length of the SM2 plaintext could be incorrectly calculated.
The plaintext length was calculated by taking the ciphertext length and
taking off an "overhead" value.
The overhead value was assumed to have a "fixed" element of 10 bytes.... |
static int check_trust(X509_STORE_CTX *ctx)
{
int i, ok;
X509 *x = NULL;
int (*cb)(int xok,X509_STORE_CTX *xctx);
cb=ctx->verify_cb;
/* Check all trusted certificates in chain */
for (i = ctx->last_untrusted; i < sk_X509_num(ctx->chain); i++)
{
x = sk_X509_value(ctx->chain, i);
ok = X509_check_trust(x, ctx-... | 0 | [] | openssl | d65b8b2162f33ac0d53dace588a0847ed827626c | 75,101,666,682,647,280,000,000,000,000,000,000,000 | 32 | Backport OCSP fixes. |
for(i = 0; i < table->num_bins; i++) {
last = 0;
for(ptr = table->bins[i]; ptr != 0;) {
retval = (*func)(ptr->key, ptr->record, arg);
switch (retval) {
case ST_CHECK: /* check if hash is modified during iteration */
tmp = 0;
if (i < table->num_bins) {
for (tmp = table->bins[i]; tmp... | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 116,821,329,910,341,780,000,000,000,000,000,000,000 | 37 | onig-5.9.2 |
int vmtruncate(struct inode * inode, loff_t offset)
{
if (inode->i_size < offset) {
unsigned long limit;
limit = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;
if (limit != RLIM_INFINITY && offset > limit)
goto out_sig;
if (offset > inode->i_sb->s_maxbytes)
goto out_big;
i_size_write(inode, offset);
}... | 0 | [
"CWE-20"
] | linux-2.6 | 89f5b7da2a6bad2e84670422ab8192382a5aeb9f | 228,995,500,974,072,740,000,000,000,000,000,000,000 | 46 | 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... |
static void jpc_dec_opts_destroy(jpc_dec_importopts_t *opts)
{
jas_free(opts);
} | 0 | [
"CWE-190"
] | jasper | a712a2041085e7cd5f2b153e1532ac2a2954ffaa | 272,145,196,018,859,550,000,000,000,000,000,000,000 | 4 | Added some additional checking to prevent a potential integer overflow
due to conversion in the JPC decoder. |
static int compat_getdrvstat(int drive, bool poll,
struct compat_floppy_drive_struct __user *arg)
{
struct compat_floppy_drive_struct v;
memset(&v, 0, sizeof(struct compat_floppy_drive_struct));
mutex_lock(&floppy_mutex);
if (poll) {
if (lock_fdc(drive))
goto Eintr;
if (poll_drive(true, FD_RAW_NEED_... | 0 | [
"CWE-125"
] | linux | 2e90ca68b0d2f5548804f22f0dd61145516171e3 | 22,206,974,945,246,836,000,000,000,000,000,000,000 | 38 | floppy: check FDC index for errors before assigning it
Jordy Zomer reported a KASAN out-of-bounds read in the floppy driver in
wait_til_ready().
Which on the face of it can't happen, since as Willy Tarreau points out,
the function does no particular memory access. Except through the FDCS
macro, which just indexes a ... |
update_monitors_get_all (const char *optional_sender)
{
GList *list = NULL;
G_LOCK (update_monitors);
if (update_monitors)
{
GLNX_HASH_TABLE_FOREACH_V (update_monitors, PortalFlatpakUpdateMonitor *, monitor)
{
UpdateMonitorData *data = update_monitor_get_data (monitor);
if ... | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | aeb6a7ab0abaac4a8f4ad98b3df476d9de6b8bd4 | 116,011,520,726,048,000,000,000,000,000,000,000,000 | 20 | portal: Convert --env in extra-args into --env-fd
This hides overridden variables from the command-line, which means
processes running under other uids can't see them in /proc/*/cmdline,
which might be important if they contain secrets.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of: https://github.com/fl... |
gxps_fonts_get_font (GXPSArchive *zip,
const gchar *font_uri,
GError **error)
{
GHashTable *fonts_cache;
cairo_font_face_t *font_face = NULL;
fonts_cache = g_object_get_data (G_OBJECT (zip), FONTS_CACHE_KEY);
if (fonts_cache) {
font_face = g_hash_table_lookup (fonts_cache, font_uri);
i... | 0 | [
"CWE-125"
] | libgxps | b458226e162fe1ffe7acb4230c114a52ada5131b | 27,713,735,244,756,395,000,000,000,000,000,000,000 | 33 | gxps-archive: Ensure gxps_archive_read_entry() fills the GError in case of failure
And fix the callers to not overwrite the GError. |
static int io_eventfd_register(struct io_ring_ctx *ctx, void __user *arg)
{
__s32 __user *fds = arg;
int fd;
if (ctx->cq_ev_fd)
return -EBUSY;
if (copy_from_user(&fd, fds, sizeof(*fds)))
return -EFAULT;
ctx->cq_ev_fd = eventfd_ctx_fdget(fd);
if (IS_ERR(ctx->cq_ev_fd)) {
int ret = PTR_ERR(ctx->cq_ev_fd);... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 290,939,608,409,158,070,000,000,000,000,000,000,000 | 20 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
static inline int tcp_inq(struct sock *sk)
{
struct tcp_sock *tp = tcp_sk(sk);
int answ;
if ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV)) {
answ = 0;
} else if (sock_flag(sk, SOCK_URGINLINE) ||
!tp->urg_data ||
before(tp->urg_seq, tp->copied_seq) ||
!before(tp->urg_seq, tp->rcv_nxt)) {
... | 0 | [
"CWE-416",
"CWE-269"
] | linux | bb1fceca22492109be12640d49f5ea5a544c6bb4 | 303,864,476,032,087,730,000,000,000,000,000,000,000 | 23 | tcp: fix use after free in tcp_xmit_retransmit_queue()
When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the
tail of the write queue using tcp_add_write_queue_tail()
Then it attempts to copy user data into this fresh skb.
If the copy fails, we undo the work and remove the fresh skb.
Unfortunately, t... |
htmlInitParserCtxt(htmlParserCtxtPtr ctxt)
{
htmlSAXHandler *sax;
if (ctxt == NULL) return(-1);
memset(ctxt, 0, sizeof(htmlParserCtxt));
ctxt->dict = xmlDictCreate();
if (ctxt->dict == NULL) {
htmlErrMemory(NULL, "htmlInitParserCtxt: out of memory\n");
return(-1);
}
sax = (htmlSAX... | 0 | [
"CWE-399"
] | libxml2 | de0cc20c29cb3f056062925395e0f68d2250a46f | 62,512,521,206,517,020,000,000,000,000,000,000,000 | 100 | Fix some buffer conversion issues
https://bugzilla.gnome.org/show_bug.cgi?id=690202
Buffer overflow errors originating from xmlBufGetInputBase in 2.9.0
The pointers from the context input were not properly reset after
that call which can do reallocations. |
pushstr(struct evalstring ***end, struct evalstring *str)
{
str->next = NULL;
**end = str;
*end = &str->next;
} | 0 | [
"CWE-476",
"CWE-284"
] | samurai | d2af3bc375e2a77139c3a28d6128c60cd8d08655 | 123,712,885,056,333,180,000,000,000,000,000,000,000 | 6 | parse: Check for non-empty command/rspfile/rspfile_content
This matches ninja behavior and prevents the possibility of a rule
with an empty (NULL) command string.
Fixes #68. |
static INLINE BOOL freerdp_bitmap_planar_compress_planes_rle(BYTE* inPlanes[4], UINT32 width,
UINT32 height, BYTE* outPlanes,
UINT32* dstSizes, BOOL skipAlpha)
{
UINT32 outPlanesSize = width * heig... | 0 | [
"CWE-125"
] | FreeRDP | 17f547ae11835bb11baa3d045245dc1694866845 | 108,747,213,698,838,820,000,000,000,000,000,000,000 | 50 | Fixed CVE-2020-11521: Out of bounds write in planar codec.
Thanks to Sunglin and HuanGMz from Knownsec 404 |
int hfsplus_find_cat(struct super_block *sb, u32 cnid,
struct hfs_find_data *fd)
{
hfsplus_cat_entry tmp;
int err;
u16 type;
hfsplus_cat_build_key(sb, fd->search_key, cnid, NULL);
err = hfs_brec_read(fd, &tmp, sizeof(hfsplus_cat_entry));
if (err)
return err;
type = be16_to_cpu(tmp.type);
if (type != ... | 1 | [
"CWE-119"
] | linux-2.6 | efc7ffcb4237f8cb9938909041c4ed38f6e1bf40 | 256,655,408,888,579,640,000,000,000,000,000,000,000 | 22 | hfsplus: fix Buffer overflow with a corrupted image
When an hfsplus image gets corrupted it might happen that the catalog
namelength field gets b0rked. If we mount such an image the memcpy() in
hfsplus_cat_build_key_uni() writes more than the 255 that fit in the name
field. Depending on the size of the overwritten d... |
void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag)
{
group->asn1_flag = flag;
} | 0 | [] | openssl | 30c22fa8b1d840036b8e203585738df62a03cec8 | 166,298,873,381,591,500,000,000,000,000,000,000,000 | 4 | [crypto/ec] for ECC parameters with NULL or zero cofactor, compute it
The cofactor argument to EC_GROUP_set_generator is optional, and SCA
mitigations for ECC currently use it. So the library currently falls
back to very old SCA-vulnerable code if the cofactor is not present.
This PR allows EC_GROUP_set_generator to ... |
xmlNodeGetBase(const xmlDoc *doc, const xmlNode *cur) {
xmlChar *oldbase = NULL;
xmlChar *base, *newbase;
if ((cur == NULL) && (doc == NULL))
return(NULL);
if ((cur != NULL) && (cur->type == XML_NAMESPACE_DECL))
return(NULL);
if (doc == NULL) doc = cur->doc;
if ((doc != NULL) &&... | 0 | [
"CWE-20"
] | libxml2 | bdd66182ef53fe1f7209ab6535fda56366bd7ac9 | 271,731,450,752,343,660,000,000,000,000,000,000,000 | 70 | Avoid building recursive entities
For https://bugzilla.gnome.org/show_bug.cgi?id=762100
When we detect a recusive entity we should really not
build the associated data, moreover if someone bypass
libxml2 fatal errors and still tries to serialize a broken
entity make sure we don't risk to get ito a recursion
* parser... |
static inline void GetRootMeanSquarePixelList(PixelList *pixel_list,
Quantum *pixel)
{
double
sum;
register SkipList
*p;
size_t
color;
ssize_t
count;
/*
Find the root mean square value for each of the color.
*/
p=(&pixel_list->skip_list);
color=65536L;
count=0;
sum=0.0;
d... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | 025e77fcb2f45b21689931ba3bf74eac153afa48 | 269,827,787,666,908,650,000,000,000,000,000,000,000 | 31 | https://github.com/ImageMagick/ImageMagick/issues/1615 |
static int rds_tcp_laddr_check(struct net *net, const struct in6_addr *addr,
__u32 scope_id)
{
struct net_device *dev = NULL;
#if IS_ENABLED(CONFIG_IPV6)
int ret;
#endif
if (ipv6_addr_v4mapped(addr)) {
if (inet_addr_type(net, addr->s6_addr32[3]) == RTN_LOCAL)
return 0;
return -EADDRNOTAVAIL;
}
/... | 0 | [
"CWE-416",
"CWE-362"
] | linux | cb66ddd156203daefb8d71158036b27b0e2caf63 | 205,667,737,346,063,900,000,000,000,000,000,000,000 | 34 | net: rds: force to destroy connection if t_sock is NULL in rds_tcp_kill_sock().
When it is to cleanup net namespace, rds_tcp_exit_net() will call
rds_tcp_kill_sock(), if t_sock is NULL, it will not call
rds_conn_destroy(), rds_conn_path_destroy() and rds_tcp_conn_free() to free
connection, and the worker cp_conn_w is ... |
g_socket_client_connect_finish (GSocketClient *client,
GAsyncResult *result,
GError **error)
{
g_return_val_if_fail (g_task_is_valid (result, client), NULL);
return g_task_propagate_pointer (G_TASK (result), error);
} | 0 | [
"CWE-754"
] | glib | d553d92d6e9f53cbe5a34166fcb919ba652c6a8e | 314,716,889,325,489,530,000,000,000,000,000,000,000 | 8 | gsocketclient: Fix criticals
This ensures the parent GTask is kept alive as long as an enumeration
is running and trying to connect.
Closes #1646
Closes #1649 |
static CURLcode tftp_receive_packet(struct connectdata *conn)
{
struct Curl_sockaddr_storage fromaddr;
curl_socklen_t fromlen;
CURLcode result = CURLE_OK;
struct Curl_easy *data = conn->data;
tftp_state_data_t *state = (tftp_state_data_t *)conn->proto.tftpc;
struct SingleRequest *k... | 0 | [
"CWE-787"
] | curl | facb0e4662415b5f28163e853dc6742ac5fafb3d | 108,295,560,273,065,000,000,000,000,000,000,000,000 | 83 | tftp: Alloc maximum blksize, and use default unless OACK is received
Fixes potential buffer overflow from 'recvfrom()', should the server
return an OACK without blksize.
Bug: https://curl.haxx.se/docs/CVE-2019-5482.html
CVE-2019-5482 |
static void destroy_compound_hugetlb_page_for_demote(struct page *page,
unsigned int order)
{
__destroy_compound_gigantic_page(page, order, true);
} | 0 | [] | linux | a4a118f2eead1d6c49e00765de89878288d4b890 | 128,108,469,762,620,300,000,000,000,000,000,000,000 | 5 | hugetlbfs: flush TLBs correctly after huge_pmd_unshare
When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB
flush is missing. This TLB flush must be performed before releasing the
i_mmap_rwsem, in order to prevent an unshared PMDs page from being
released and reused before the TLB flush took place... |
ins_compl_add_matches(
int num_matches,
char_u **matches,
int icase)
{
int i;
int add_r = OK;
int dir = compl_direction;
for (i = 0; i < num_matches && add_r != FAIL; i++)
if ((add_r = ins_compl_add(matches[i], -1, NULL, NULL, NULL, dir,
CP_FAST | (icase ? CP_ICASE : 0), FAL... | 0 | [
"CWE-125"
] | vim | f12129f1714f7d2301935bb21d896609bdac221c | 246,542,895,906,138,820,000,000,000,000,000,000,000 | 16 | patch 9.0.0020: with some completion reading past end of string
Problem: With some completion reading past end of string.
Solution: Check the length of the string. |
long vnc_client_read_buf(VncState *vs, uint8_t *data, size_t datalen)
{
long ret;
#ifdef CONFIG_VNC_TLS
if (vs->tls.session) {
ret = vnc_client_read_tls(&vs->tls.session, data, datalen);
} else {
#ifdef CONFIG_VNC_WS
if (vs->ws_tls.session) {
ret = vnc_client_read_tls(&vs->ws_tls... | 0 | [
"CWE-125"
] | qemu | bea60dd7679364493a0d7f5b54316c767cf894ef | 13,482,468,800,242,522,000,000,000,000,000,000,000 | 22 | ui/vnc: fix potential memory corruption issues
this patch makes the VNC server work correctly if the
server surface and the guest surface have different sizes.
Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH
x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of
VNC_DIRTY_PIXELS... |
sfe_file_type_of_ext (const char *str, int format)
{ char buffer [16], *cptr ;
int k ;
format &= SF_FORMAT_SUBMASK ;
if ((cptr = strrchr (str, '.')) == NULL)
return 0 ;
strncpy (buffer, cptr + 1, 15) ;
buffer [15] = 0 ;
for (k = 0 ; buffer [k] ; k++)
buffer [k] = tolower ((buffer [k])) ;
if (strcmp (bu... | 0 | [
"CWE-125"
] | libsndfile | 2d54514a4f6437b67829717c05472d2e3300a258 | 185,130,461,340,490,830,000,000,000,000,000,000,000 | 31 | sfe_copy_data_fp: check value of "max" variable for being normal
and check elements of the data[] array for being finite.
Both checks use functions provided by the <math.h> header as declared
by the C99 standard.
Fixes #317
CVE-2017-14245
CVE-2017-14246 |
static int snd_pcm_reset(struct snd_pcm_substream *substream)
{
return snd_pcm_action_nonatomic(&snd_pcm_action_reset, substream,
ACTION_ARG_IGNORE);
} | 0 | [
"CWE-125"
] | linux | 92ee3c60ec9fe64404dc035e7c41277d74aa26cb | 272,724,453,866,218,700,000,000,000,000,000,000,000 | 5 | ALSA: pcm: Fix races among concurrent hw_params and hw_free calls
Currently we have neither proper check nor protection against the
concurrent calls of PCM hw_params and hw_free ioctls, which may result
in a UAF. Since the existing PCM stream lock can't be used for
protecting the whole ioctl operations, we need a new... |
_g_utf8_all_spaces (const char *text)
{
const char *scan;
if (text == NULL)
return TRUE;
for (scan = text; *scan != 0; scan = g_utf8_next_char (scan)) {
gunichar c = g_utf8_get_char (scan);
if (! g_unichar_isspace (c))
return FALSE;
}
return TRUE;
} | 0 | [
"CWE-22"
] | file-roller | 57268e51e59b61c9e3125eb0f65551c7084297e2 | 100,962,552,123,131,600,000,000,000,000,000,000,000 | 15 | Path traversal vulnerability
Do not extract files with relative paths.
[bug #794337] |
void skb_free_datagram_locked(struct sock *sk, struct sk_buff *skb)
{
bool slow;
if (likely(atomic_read(&skb->users) == 1))
smp_rmb();
else if (likely(!atomic_dec_and_test(&skb->users)))
return;
slow = lock_sock_fast(sk);
skb_orphan(skb);
sk_mem_reclaim_partial(sk);
unlock_sock_fast(sk, slow);
/* skb is ... | 0 | [] | linux-2.6 | 77c1090f94d1b0b5186fb13a1b71b47b1343f87f | 191,139,172,682,125,720,000,000,000,000,000,000,000 | 17 | net: fix infinite loop in __skb_recv_datagram()
Tommi was fuzzing with trinity and reported the following problem :
commit 3f518bf745 (datagram: Add offset argument to __skb_recv_datagram)
missed that a raw socket receive queue can contain skbs with no payload.
We can loop in __skb_recv_datagram() with MSG_PEEK mode... |
static void u1(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
if (ev == MG_EV_CONNECT) {
((int *) fn_data)[0] += 1;
mg_send(c, "hi", 2);
} else if (ev == MG_EV_WRITE) {
((int *) fn_data)[0] += 100;
} else if (ev == MG_EV_READ) {
((int *) fn_data)[0] += 10;
mg_iobuf_free(&c->r... | 0 | [
"CWE-552"
] | mongoose | c65c8fdaaa257e0487ab0aaae9e8f6b439335945 | 313,599,316,010,930,850,000,000,000,000,000,000,000 | 12 | Protect against the directory traversal in mg_upload() |
Network::FilterChainManager& filterChainManager() override { return filter_chain_manager_; } | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 188,325,389,460,447,770,000,000,000,000,000,000,000 | 1 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
int save_mc_for_early(u8 *mc)
{
struct microcode_intel *mc_saved_tmp[MAX_UCODE_COUNT];
unsigned int mc_saved_count_init;
unsigned int mc_saved_count;
struct microcode_intel **mc_saved;
int ret = 0;
int i;
/*
* Hold hotplug lock so mc_saved_data is not accessed by a CPU in
* hotplug.
*/
mutex_lock(&x86_cp... | 0 | [
"CWE-119",
"CWE-787"
] | linux | f84598bd7c851f8b0bf8cd0d7c3be0d73c432ff4 | 218,813,472,339,235,400,000,000,000,000,000,000,000 | 54 | x86/microcode/intel: Guard against stack overflow in the loader
mc_saved_tmp is a static array allocated on the stack, we need to make
sure mc_saved_count stays within its bounds, otherwise we're overflowing
the stack in _save_mc(). A specially crafted microcode header could lead
to a kernel crash or potentially kerne... |
Status SpaceToBatchShapeHelper(InferenceContext* c, ShapeHandle input_shape,
ShapeHandle block_shape_shape,
const Tensor* block_shape_t,
ShapeHandle paddings_shape,
const Tensor* paddings_t) {
i... | 0 | [
"CWE-703",
"CWE-787"
] | tensorflow | c79ba87153ee343401dbe9d1954d7f79e521eb14 | 76,475,447,026,750,090,000,000,000,000,000,000,000 | 75 | Make Transpose's shape inference function validate that negative `perm` values are within the tensor's rank.
PiperOrigin-RevId: 403252853
Change-Id: Ia6b31b45b237312668bb31c2c3b3c7bbce2d2610 |
static int port_is_suspended(struct usb_hub *hub, unsigned portstatus)
{
int ret = 0;
if (hub_is_superspeed(hub->hdev)) {
if ((portstatus & USB_PORT_STAT_LINK_STATE)
== USB_SS_PORT_LS_U3)
ret = 1;
} else {
if (portstatus & USB_PORT_STAT_SUSPEND)
ret = 1;
}
return ret;
} | 0 | [
"CWE-703"
] | linux | e50293ef9775c5f1cf3fcc093037dd6a8c5684ea | 258,881,536,799,516,500,000,000,000,000,000,000,000 | 15 | USB: fix invalid memory access in hub_activate()
Commit 8520f38099cc ("USB: change hub initialization sleeps to
delayed_work") changed the hub_activate() routine to make part of it
run in a workqueue. However, the commit failed to take a reference to
the usb_hub structure or to lock the hub interface while doing so. ... |
inboth (char **left, char **right)
{
char **both;
char **temp;
size_t lnum, rnum;
if (left == NULL || right == NULL)
return NULL;
both = malloc(sizeof *both);
if (both == NULL)
return NULL;
both[0] = NULL;
for (lnum = 0; left[lnum] != NULL; ++lnum)
{
for (rnum = 0; right[rnum] != NULL... | 0 | [
"CWE-189"
] | grep | cbbc1a45b9f843c811905c97c90a5d31f8e6c189 | 75,050,515,574,530,860,000,000,000,000,000,000,000 | 31 | grep: fix some core dumps with long lines etc.
These problems mostly occur because the code attempts to stuff
sizes into int or into unsigned int; this doesn't work on most
64-bit hosts and the errors can lead to core dumps.
* NEWS: Document this.
* src/dfa.c (token): Typedef to ptrdiff_t, since the enum's
range could... |
encode_MULTIPATH(const struct ofpact_multipath *mp,
enum ofp_version ofp_version OVS_UNUSED, struct ofpbuf *out)
{
struct nx_action_multipath *nam = put_NXAST_MULTIPATH(out);
nam->fields = htons(mp->fields);
nam->basis = htons(mp->basis);
nam->algorithm = htons(mp->algorithm);
nam-... | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 52,774,841,511,164,320,000,000,000,000,000,000,000 | 13 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
GF_Err BM_ParseNodeReplace(GF_BifsDecoder *codec, GF_BitStream *bs, GF_List *com_list)
{
u32 NodeID;
GF_Command *com;
GF_Node *node;
GF_CommandField *inf;
NodeID = 1 + gf_bs_read_int(bs, codec->info->config.NodeIDBits);
/*this is delete / new on a DEF node: replace ALL instances*/
node = gf_sg_find_node(codec->... | 0 | [
"CWE-416"
] | gpac | c535bad50d5812d27ee5b22b54371bddec411514 | 179,669,296,091,800,240,000,000,000,000,000,000,000 | 22 | fixed #2194 |
static inline bool f2fs_is_drop_cache(struct inode *inode)
{
return is_inode_flag_set(inode, FI_DROP_CACHE);
} | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 336,148,646,397,453,400,000,000,000,000,000,000,000 | 4 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
TEST(ExpressionSubstrCPTest, WithPartiallyOutOfRangeString) {
assertExpectedResults("$substrCP", {{{Value("abc"_sd), Value(1), Value(4)}, Value("bc"_sd)}});
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 125,981,174,588,631,510,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
static void canonicalize_ea_name(files_struct *fsp,
fstring unix_ea_name)
{
size_t total_ea_len;
TALLOC_CTX *mem_ctx = talloc_tos();
struct ea_list *ea_list;
NTSTATUS status = get_ea_list_from_fsp(mem_ctx,
fsp,
&total_ea_len,
&ea_list);
if (!NT_STATUS_IS_OK(status)) {
retur... | 0 | [
"CWE-787"
] | samba | 22b4091924977f6437b59627f33a8e6f02b41011 | 190,196,755,630,185,700,000,000,000,000,000,000,000 | 23 | CVE-2021-44142: smbd: add Netatalk xattr used by vfs_fruit to the list of private Samba xattrs
This is an internal xattr that should not be user visible.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
virtual bool use_tcp_for_dns_lookups() const { return false; } | 0 | [
"CWE-400"
] | envoy | 542f84c66e9f6479bc31c6f53157c60472b25240 | 10,666,610,535,178,816,000,000,000,000,000,000,000 | 1 | overload: Runtime configurable global connection limits (#147)
Signed-off-by: Tony Allen <tony@allen.gg> |
compile_lhs(
char_u *var_start,
lhs_T *lhs,
int cmdidx,
int heredoc,
int oplen,
cctx_T *cctx)
{
char_u *var_end;
int is_decl = is_decl_command(cmdidx);
CLEAR_POINTER(lhs);
lhs->lhs_dest = dest_local;
lhs->lhs_vimvaridx = -1;
lhs->lhs_scriptvar_idx = -1;
// "dest_end" is the end of t... | 0 | [
"CWE-416"
] | vim | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 | 14,998,997,996,884,673,000,000,000,000,000,000,000 | 281 | patch 8.2.3902: Vim9: double free with nested :def function
Problem: Vim9: double free with nested :def function.
Solution: Pass "line_to_free" from compile_def_function() and make sure
cmdlinep is valid. |
request_free (struct request *req)
{
int i;
xfree_null (req->arg);
for (i = 0; i < req->hcount; i++)
release_header (&req->headers[i]);
xfree_null (req->headers);
xfree (req);
} | 0 | [
"CWE-20"
] | wget | 3e25a9817f47fbb8660cc6a3b2f3eea239526c6c | 262,800,019,249,598,870,000,000,000,000,000,000,000 | 9 | Introduce --trust-server-names. Close CVE-2010-2252. |
buf16_to_u16 (const void *buffer)
{
const unsigned char *p = buffer;
return (((u16)p[0] << 8) | p[1]);
} | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 225,973,482,556,403,560,000,000,000,000,000,000,000 | 6 | 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 ... |
R_API void r_egg_fill(REgg *egg, int pos, int type, int argc, int length) {
// TODO
} | 0 | [
"CWE-125"
] | radare2 | e710401ebb4a892a87b0c709d709af8b5dcbbb01 | 284,657,377,347,706,000,000,000,000,000,000,000,000 | 3 | patch #14211 heap buffer overflow in large ragg2
inputs. this should be refactored to use an RBuffer to enable dynamic
resizing, but for now just patching it to bail out if we are about to
overwrite the allocated statically sized buffer |
static SDL_INLINE void BG_Blended_Opaque_SSE(const TTF_Image *image, Uint32 *destination, Sint32 srcskip, Uint32 dstskip)
{
const __m128i *src = (__m128i *)image->buffer;
__m128i *dst = (__m128i *)destination;
Uint32 width = image->width / 16;
Uint32 height = image->rows;
... | 0 | [
"CWE-190",
"CWE-787"
] | SDL_ttf | db1b41ab8bde6723c24b866e466cad78c2fa0448 | 270,016,803,152,722,400,000,000,000,000,000,000,000 | 46 | More integer overflow (see bug #187)
Make sure that 'width + alignment' doesn't overflow, otherwise
it could create a SDL_Surface of 'width' but with wrong 'pitch' |
dp_packet_ol_flags_ptr(const struct dp_packet *b)
{
return CONST_CAST(uint64_t *, &b->mbuf.ol_flags);
} | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 189,946,726,708,715,860,000,000,000,000,000,000,000 | 4 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
MagickExport MagickBooleanType ResetImagePage(Image *image,const char *page)
{
MagickStatusType
flags;
RectangleInfo
geometry;
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | aecd0ada163a4d6c769cec178955d5f3e9316f2f | 148,913,906,499,530,170,000,000,000,000,000,000,000 | 44 | Set pixel cache to undefined if any resource limit is exceeded |
index_set_state_flags(Oid indexId, IndexStateFlagsAction action)
{
Relation pg_index;
HeapTuple indexTuple;
Form_pg_index indexForm;
/* Assert that current xact hasn't done any transactional updates */
Assert(GetTopTransactionIdIfAny() == InvalidTransactionId);
/* Open pg_index and fetch a writable copy of the ... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 113,067,412,029,989,600,000,000,000,000,000,000,000 | 72 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static void renumberobjs(fz_context *ctx, pdf_document *doc, pdf_write_state *opts)
{
pdf_xref_entry *newxref = NULL;
int newlen;
int num;
int *new_use_list;
int xref_len = pdf_xref_len(ctx, doc);
new_use_list = fz_calloc(ctx, pdf_xref_len(ctx, doc)+3, sizeof(int));
fz_var(newxref);
fz_try(ctx)
{
/* Apply ... | 0 | [
"CWE-119"
] | mupdf | 520cc26d18c9ee245b56e9e91f9d4fcae02be5f0 | 229,705,590,949,912,600,000,000,000,000,000,000,000 | 91 | Bug 689699: Avoid buffer overrun.
When cleaning a pdf file, various lists (of pdf_xref_len length) are
defined early on.
If we trigger a repair during the clean, this can cause pdf_xref_len
to increase causing an overrun.
Fix this by watching for changes in the length, and checking accesses
to the list for validity.... |
RunBlanker(cmdv)
char **cmdv;
{
char *m;
int pid;
int slave = -1;
char termname[MAXTERMLEN + 6];
#ifndef TIOCSWINSZ
char libuf[20], cobuf[20];
#endif
char **np;
strcpy(termname, "TERM=");
strncpy(termname + 5, D_termname, MAXTERMLEN - 6);
termname[sizeof(termname) - 1] = 0;
KillBlanker();
D_blank... | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 132,442,685,545,214,700,000,000,000,000,000,000,000 | 96 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
gst_h264_debug_category_get (void)
{
static gsize cat_gonce = 0;
if (g_once_init_enter (&cat_gonce)) {
GstDebugCategory *cat = NULL;
GST_DEBUG_CATEGORY_INIT (cat, "codecparsers_h264", 0, "h264 parse library");
g_once_init_leave (&cat_gonce, (gsize) cat);
}
return (GstDebugCategory *) cat_gonce;
... | 0 | [
"CWE-787"
] | gst-plugins-bad | 11353b3f6e2f047cc37483d21e6a37ae558896bc | 70,801,419,695,060,610,000,000,000,000,000,000,000 | 14 | codecparsers: h264parser: guard against ref_pic_markings overflow
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1703> |
int crypto_has_alg(const char *name, u32 type, u32 mask)
{
int ret = 0;
struct crypto_alg *alg = crypto_alg_mod_lookup(name, type, mask);
if (!IS_ERR(alg)) {
crypto_mod_put(alg);
ret = 1;
}
return ret;
} | 0 | [
"CWE-284",
"CWE-264",
"CWE-269"
] | linux | 5d26a105b5a73e5635eae0629b42fa0a90e07b7b | 324,956,096,287,613,470,000,000,000,000,000,000,000 | 12 | crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so we never run
the risk of exposing module auto-loading to userspace via a crypto API,
as demonstrated by Mathias Krause:
https://lkml.org/lkml/2013/3/4/70
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-... |
PHP_FUNCTION(openssl_dh_compute_key)
{
zval *key;
char *pub_str;
size_t pub_len;
DH *dh;
EVP_PKEY *pkey;
BIGNUM *pub;
zend_string *data;
int len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sr", &pub_str, &pub_len, &key) == FAILURE) {
return;
}
if ((pkey = (EVP_PKEY *)zend_fetch_resource(Z_RES_P(key), "Op... | 0 | [
"CWE-326"
] | php-src | 0216630ea2815a5789a24279a1211ac398d4de79 | 338,364,328,837,870,770,000,000,000,000,000,000,000 | 43 | Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV) |
static inline void blk_mq_tag_idle(struct blk_mq_hw_ctx *hctx)
{
if (!(hctx->flags & BLK_MQ_F_TAG_SHARED))
return;
__blk_mq_tag_idle(hctx);
} | 0 | [
"CWE-362",
"CWE-264"
] | linux | 0048b4837affd153897ed1222283492070027aa9 | 103,271,827,234,886,290,000,000,000,000,000,000,000 | 7 | blk-mq: fix race between timeout and freeing request
Inside timeout handler, blk_mq_tag_to_rq() is called
to retrieve the request from one tag. This way is obviously
wrong because the request can be freed any time and some
fiedds of the request can't be trusted, then kernel oops
might be triggered[1].
Currently wrt. ... |
nv_ctrlg(cmdarg_T *cap)
{
if (VIsual_active) // toggle Selection/Visual mode
{
VIsual_select = !VIsual_select;
showmode();
}
else if (!checkclearop(cap->oap))
// print full name if count given or :cd used
fileinfo((int)cap->count0, FALSE, TRUE);
} | 0 | [
"CWE-416"
] | vim | 35a9a00afcb20897d462a766793ff45534810dc3 | 329,119,952,855,426,200,000,000,000,000,000,000,000 | 11 | 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(). |
mono_ArgIterator_IntGetNextArgType (MonoArgIterator *iter)
{
gint i;
MONO_ARCH_SAVE_REGS;
i = iter->sig->sentinelpos + iter->next_arg;
g_assert (i < iter->sig->param_count);
return iter->sig->params [i];
} | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 51,757,197,311,991,020,000,000,000,000,000,000,000 | 11 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
static int verify_reserved_gdb(struct super_block *sb,
struct buffer_head *primary)
{
const ext4_fsblk_t blk = primary->b_blocknr;
const ext4_group_t end = EXT4_SB(sb)->s_groups_count;
unsigned three = 1;
unsigned five = 5;
unsigned seven = 7;
unsigned grp;
__le32 *p = (__le32 *)primary->b_data;
int g... | 0 | [
"CWE-20"
] | linux-2.6 | fdff73f094e7220602cc3f8959c7230517976412 | 128,954,304,814,523,850,000,000,000,000,000,000,000 | 30 | ext4: Initialize the new group descriptor when resizing the filesystem
Make sure all of the fields of the group descriptor are properly
initialized. Previously, we allowed bg_flags field to be contain
random garbage, which could trigger non-deterministic behavior,
including a kernel OOPS.
http://bugzilla.kernel.org/... |
static int ldb_kv_index_dn_leaf(struct ldb_module *module,
struct ldb_kv_private *ldb_kv,
const struct ldb_parse_tree *tree,
struct dn_list *list)
{
if (ldb_kv->disallow_dn_filter &&
(ldb_attr_cmp(tree->u.equality.attr, "dn") == 0)) {
/* in AD mode we do not support "(dn=...)" search filters */
li... | 0 | [
"CWE-20"
] | samba | 0998f2f1bced019db4000ef4b55887abcb65f6d2 | 115,135,075,444,487,080,000,000,000,000,000,000,000 | 72 | CVE-2018-1140 Add NULL check for ldb_dn_get_casefold() in ltdb_index_dn_attr()
Signed-off-by: Andrej Gessel <Andrej.Gessel@janztec.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13374 |
static inline bool nested_cpu_has_apic_reg_virt(struct vmcs12 *vmcs12)
{
return nested_cpu_has2(vmcs12, SECONDARY_EXEC_APIC_REGISTER_VIRT);
} | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 172,611,153,482,307,370,000,000,000,000,000,000,000 | 4 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
static void check_timeout(BOOL allow_keepalive, int keepalive_flags)
{
time_t t, chk;
/* On the receiving side, the generator is now the one that decides
* when a timeout has occurred. When it is sifting through a lot of
* files looking for work, it will be sending keep-alive messages to
* the sender, and eve... | 0 | [
"CWE-59"
] | rsync | 962f8b90045ab331fc04c9e65f80f1a53e68243b | 16,976,815,644,969,638,000,000,000,000,000,000,000 | 40 | Complain if an inc-recursive path is not right for its dir.
This ensures that a malicious sender can't use a just-sent
symlink as a trasnfer path. |
base::FilePath ElectronBrowserClient::GetLoggingFileName(
const base::CommandLine& cmd_line) {
return logging::GetLogFileName(cmd_line);
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 154,449,933,749,137,600,000,000,000,000,000,000,000 | 4 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
static void v9fs_mkdir(void *opaque)
{
V9fsPDU *pdu = opaque;
size_t offset = 7;
int32_t fid;
struct stat stbuf;
V9fsQID qid;
V9fsString name;
V9fsFidState *fidp;
gid_t gid;
int mode;
int err = 0;
v9fs_string_init(&name);
err = pdu_unmarshal(pdu, offset, "dsdd", &fid, &n... | 0 | [
"CWE-399",
"CWE-772"
] | qemu | e95c9a493a5a8d6f969e86c9f19f80ffe6587e19 | 287,149,682,938,630,470,000,000,000,000,000,000,000 | 53 | 9pfs: fix potential host memory leak in v9fs_read
In 9pfs read dispatch function, it doesn't free two QEMUIOVector
object thus causing potential memory leak. This patch avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Signed-off-by: Greg Kurz <groug@kaod.org> |
int netlink_add_tap(struct netlink_tap *nt)
{
if (unlikely(nt->dev->type != ARPHRD_NETLINK))
return -EINVAL;
spin_lock(&netlink_tap_lock);
list_add_rcu(&nt->list, &netlink_tap_all);
spin_unlock(&netlink_tap_lock);
if (nt->module)
__module_get(nt->module);
return 0;
} | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 109,732,976,931,874,910,000,000,000,000,000,000,000 | 14 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
MagickExport void *AcquireAlignedMemory(const size_t count,const size_t quantum)
{
size_t
size;
if (HeapOverflowSanityCheckGetSize(count,quantum,&size) != MagickFalse)
{
errno=ENOMEM;
return(NULL);
}
if (memory_methods.acquire_aligned_memory_handler != (AcquireAlignedMemoryHandler) NULL)
... | 0 | [
"CWE-369"
] | ImageMagick | 70aa86f5d5d8aa605a918ed51f7574f433a18482 | 263,969,223,175,246,930,000,000,000,000,000,000,000 | 14 | possible divide by zero + clear buffers |
onig_node_new_alt(Node* left, Node* right)
{
Node* node = node_new();
CHECK_NULL_RETURN(node);
NODE_SET_TYPE(node, NODE_ALT);
NODE_CAR(node) = left;
NODE_CDR(node) = right;
return node;
} | 0 | [
"CWE-400",
"CWE-399",
"CWE-674"
] | oniguruma | 4097828d7cc87589864fecf452f2cd46c5f37180 | 118,812,064,047,693,130,000,000,000,000,000,000,000 | 10 | fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves. |
static PyObject *Input_readline(InputObject *self, PyObject *args)
{
long size = -1;
PyObject *result = NULL;
char *buffer = NULL;
apr_size_t length = 0;
apr_size_t n;
if (!self->r) {
PyErr_SetString(PyExc_RuntimeError, "request object has expired");
return NULL;
}
if... | 0 | [
"CWE-264"
] | mod_wsgi | d9d5fea585b23991f76532a9b07de7fcd3b649f4 | 156,805,508,041,839,590,000,000,000,000,000,000,000 | 291 | Local privilege escalation when using daemon mode. (CVE-2014-0240) |
RZ_IPI char *rz_core_analysis_function_signature(RzCore *core, RzOutputMode mode, char *fcn_name) {
RzListIter *iter;
RzAnalysisFuncArg *arg;
RzAnalysisFunction *fcn;
if (fcn_name) {
fcn = rz_analysis_get_function_byname(core->analysis, fcn_name);
} else {
fcn = rz_analysis_get_fcn_in(core->analysis, core->off... | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 139,965,237,528,583,460,000,000,000,000,000,000,000 | 117 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
static int h2_init(struct connection *conn)
{
if (conn->mux_ctx) {
/* we don't support outgoing connections for now */
return -1;
}
return h2c_frt_init(conn);
} | 0 | [
"CWE-119"
] | haproxy | 3f0e1ec70173593f4c2b3681b26c04a4ed5fc588 | 77,709,695,980,650,700,000,000,000,000,000,000,000 | 9 | BUG/CRITICAL: h2: fix incorrect frame length check
The incoming H2 frame length was checked against the max_frame_size
setting instead of being checked against the bufsize. The max_frame_size
only applies to outgoing traffic and not to incoming one, so if a large
enough frame size is advertised in the SETTINGS frame, ... |
static __always_inline u64 vmcs_read64(unsigned long field)
{
#ifdef CONFIG_X86_64
return vmcs_readl(field);
#else
return vmcs_readl(field) | ((u64)vmcs_readl(field+1) << 32);
#endif
} | 0 | [] | kvm | a642fc305053cc1c6e47e4f4df327895747ab485 | 409,103,848,506,283,150,000,000,000,000,000,000 | 8 | kvm: vmx: handle invvpid vm exit gracefully
On systems with invvpid instruction support (corresponding bit in
IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid
causes vm exit, which is currently not handled and results in
propagation of unknown exit to userspace.
Fix this by installing an invvpid vm exit ... |
kvm_pfn_t gfn_to_pfn_prot(struct kvm *kvm, gfn_t gfn, bool write_fault,
bool *writable)
{
return __gfn_to_pfn_memslot(gfn_to_memslot(kvm, gfn), gfn, false, NULL,
write_fault, writable, NULL); | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 130,400,584,323,375,800,000,000,000,000,000,000,000 | 6 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
static const char* ConvertScalar(PyObject* v, int64* out) {
#if PY_MAJOR_VERSION < 3
if (TF_PREDICT_TRUE(PyInt_Check(v))) {
*out = PyInt_AS_LONG(v);
return nullptr;
}
#endif
if (TF_PREDICT_TRUE(PyLong_Check(v) || IsPyDimension(v))) {
int overflow = 0;
// Have to use LongLong for 64... | 1 | [
"CWE-20",
"CWE-476"
] | tensorflow | 5ac1b9e24ff6afc465756edf845d2e9660bd34bf | 58,155,147,661,145,400,000,000,000,000,000,000,000 | 25 | Fix segfault when attempting to convert string to float16.
To make sure this gets fixed, add test for converting string to any numeric type.
PiperOrigin-RevId: 286650886
Change-Id: I81f770ec2bbd33a863e8057ce198c679912fa8e0 |
xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt,
const xmlChar *string, void *user_data, xmlNodePtr *lst) {
xmlParserCtxtPtr ctxt;
xmlDocPtr newDoc = NULL;
xmlNodePtr newRoot;
xmlSAXHandlerPtr oldsax = NULL;
xmlNodePtr content = NULL;
xmlNodePtr last = NULL;
int size;
xmlPa... | 0 | [
"CWE-401"
] | libxml2 | 5a02583c7e683896d84878bd90641d8d9b0d0549 | 263,613,290,323,702,800,000,000,000,000,000,000,000 | 172 | Fix memory leak in xmlParseBalancedChunkMemoryRecover
When doc is NULL, namespace created in xmlTreeEnsureXMLDecl
is bind to newDoc->oldNs, in this case, set newDoc->oldNs to
NULL and free newDoc will cause a memory leak.
Found with libFuzzer.
Closes #82. |
int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
int j, loops = server.cronloops++;
REDIS_NOTUSED(eventLoop);
REDIS_NOTUSED(id);
REDIS_NOTUSED(clientData);
/* We take a cached value of the unix time in the global state because
* with virtual memory and aging ther... | 1 | [
"CWE-20"
] | redis | 697af434fbeb2e3ba2ba9687cd283ed1a2734fa5 | 300,172,471,516,530,520,000,000,000,000,000,000,000 | 132 | initial changes needed to turn the current VM code into a cache system. Tons of work to do still. |
JSON::makeNumber(std::string const& encoded)
{
return JSON(new JSON_number(encoded));
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 171,709,118,690,396,620,000,000,000,000,000,000,000 | 4 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.