func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
filter_memory(unsigned long start, unsigned long end, void *arg)
{
void (*func)(unsigned long, unsigned long, int);
#if IGNORE_PFN0
if (start == PAGE_OFFSET) {
printk(KERN_WARNING "warning: skipping physical page 0\n");
start += PAGE_SIZE;
if (start >= end)
return 0;
}
#endif
func = arg;
if (start < end)... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 4dcc29e1574d88f4465ba865ed82800032f76418 | 141,217,556,060,413,080,000,000,000,000,000,000,000 | 17 | [IA64] Workaround for RSE issue
Problem: An application violating the architectural rules regarding
operation dependencies and having specific Register Stack Engine (RSE)
state at the time of the violation, may result in an illegal operation
fault and invalid RSE state. Such faults may initiate a cascade of
repeated ... |
void sctp_transport_immediate_rtx(struct sctp_transport *t)
{
/* Stop pending T3_rtx_timer */
if (timer_pending(&t->T3_rtx_timer)) {
(void)del_timer(&t->T3_rtx_timer);
sctp_transport_put(t);
}
sctp_retransmit(&t->asoc->outqueue, t, SCTP_RTXR_T3_RTX);
if (!timer_pending(&t->T3_rtx_timer)) {
if (!mod_timer(&t-... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 75,602,219,026,592,020,000,000,000,000,000,000,000 | 14 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
cdio_generic_free (void *p_user_data)
{
generic_img_private_t *p_env = p_user_data;
if (NULL == p_env) return;
if (p_env->source_name) free (p_env->source_name);
if (NULL != p_env->cdtext) {
cdtext_destroy(p_env->cdtext);
p_env->cdtext = NULL;
}
if (p_env->fd >= 0)
close (p_env->fd);
i... | 0 | [
"CWE-415"
] | libcdio | dec2f876c2d7162da213429bce1a7140cdbdd734 | 94,890,820,077,123,300,000,000,000,000,000,000,000 | 20 | Removed wrong line |
vips_tracked_get_allocs( void )
{
int n;
vips_tracked_init();
g_mutex_lock( vips_tracked_mutex );
n = vips_tracked_allocs;
g_mutex_unlock( vips_tracked_mutex );
return( n );
} | 0 | [
"CWE-200",
"CWE-908"
] | libvips | 00622428bda8d7521db8d74260b519fa41d69d0a | 186,840,981,880,013,660,000,000,000,000,000,000,000 | 14 | zero memory on malloc
to prevent write of uninit memory under some error conditions
thanks Balint |
static int SRP_user_pwd_set_sv(SRP_user_pwd *vinfo, const char *s,
const char *v)
{
unsigned char tmp[MAX_LEN];
int len;
if (strlen(s) > MAX_LEN || strlen(v) > MAX_LEN)
return 0;
len = t_fromb64(tmp, v);
if (NULL == (vinfo->v = BN_bin2bn(tmp, len, NULL)) )
return 0;
len = t_fromb64(tmp, s);
re... | 0 | [] | openssl | edc032b5e3f3ebb1006a9c89e0ae00504f47966f | 127,842,941,393,736,170,000,000,000,000,000,000,000 | 14 | Add SRP support. |
static int php_libxml_clear_object(php_libxml_node_object *object)
{
if (object->properties) {
object->properties = NULL;
}
php_libxml_decrement_node_ptr(object);
return php_libxml_decrement_doc_ref(object);
} | 0 | [] | php-src | f15f8fc573eb38c3c73e23e0930063a6f6409ed4 | 119,686,567,258,144,000,000,000,000,000,000,000,000 | 8 | Fix #79971: special character is breaking the path in xml function
The libxml based XML functions accepting a filename actually accept
URIs with possibly percent-encoded characters. Percent-encoded NUL
bytes lead to truncation, like non-encoded NUL bytes would. We catch
those, and let the functions fail with a respe... |
struct ubuf_info *sock_zerocopy_realloc(struct sock *sk, size_t size,
struct ubuf_info *uarg)
{
if (uarg) {
const u32 byte_limit = 1 << 19; /* limit to a few TSO */
u32 bytelen, next;
/* realloc only when socket is locked (TCP, UDP cork),
* so uarg->len and sk_zckey access is serialized
*/
if (!s... | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 282,817,317,679,013,440,000,000,000,000,000,000,000 | 38 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
static int mov_write_stsz_tag(AVIOContext *pb, MOVTrack *track)
{
int equalChunks = 1;
int i, j, entries = 0, tst = -1, oldtst = -1;
int64_t pos = avio_tell(pb);
avio_wb32(pb, 0); /* size */
ffio_wfourcc(pb, "stsz");
avio_wb32(pb, 0); /* version & flags */
for (i = 0; i < track->entry; i++... | 0 | [
"CWE-369"
] | FFmpeg | 2c0e98a0b478284bdff6d7a4062522605a8beae5 | 203,512,706,973,876,360,000,000,000,000,000,000,000 | 34 | avformat/movenc: Write version 2 of audio atom if channels is not known
The version 1 needs the channel count and would divide by 0
Fixes: division by 0
Fixes: fpe_movenc.c_1108_1.ogg
Fixes: fpe_movenc.c_1108_2.ogg
Fixes: fpe_movenc.c_1108_3.wav
Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael N... |
static void sctp_add_backlog(struct sock *sk, struct sk_buff *skb)
{
struct sctp_chunk *chunk = SCTP_INPUT_CB(skb)->chunk;
struct sctp_ep_common *rcvr = chunk->rcvr;
/* Hold the assoc/ep while hanging on the backlog queue.
* This way, we know structures we need will not disappear from us
*/
if (SCTP_EP_TYPE_AS... | 0 | [] | linux | bbd0d59809f923ea2b540cbd781b32110e249f6e | 226,902,529,980,623,050,000,000,000,000,000,000,000 | 17 | [SCTP]: Implement the receive and verification of AUTH chunk
This patch implements the receive path needed to process authenticated
chunks. Add ability to process the AUTH chunk and handle edge cases
for authenticated COOKIE-ECHO as well.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David ... |
int ldb_msg_difference(struct ldb_context *ldb,
TALLOC_CTX *mem_ctx,
struct ldb_message *msg1,
struct ldb_message *msg2,
struct ldb_message **_msg_out)
{
int ldb_res;
unsigned int i;
struct ldb_message *mod;
struct ldb_message_element *el;
TALLOC_CTX *temp_ctx;
temp_ctx = tall... | 0 | [
"CWE-200"
] | samba | 7efe8182c165fbf17d2f88c173527a7a554e214b | 20,595,511,644,348,320,000,000,000,000,000,000,000 | 77 | CVE-2022-32746 ldb: Add flag to mark message element values as shared
When making a shallow copy of an ldb message, mark the message elements
of the copy as sharing their values with the message elements in the
original message.
This flag value will be heeded in the next commit.
BUG: https://bugzilla.samba.org/show_... |
void LibRaw::convertFloatToInt(float dmin/* =4096.f */, float dmax/* =32767.f */, float dtarget /*= 16383.f */)
{
int samples = 0;
float *data = 0;
if(imgdata.rawdata.float_image)
{
samples = 1;
data = imgdata.rawdata.float_image;
}
else if (imgdata.rawdata.float3_image)
{
samples = 3;
data = (float*)img... | 0 | [
"CWE-787"
] | LibRaw | 8682ad204392b914ab1cc6ebcca9c27c19c1a4b4 | 278,637,616,921,542,700,000,000,000,000,000,000,000 | 69 | 0.18.17 |
list_complete (void *opaque, int *err)
{
struct list_helper *h = opaque;
h->err = *err;
FREE_CALLBACK (h->list);
return 0;
} | 0 | [
"CWE-617"
] | libnbd | fb4440de9cc76e9c14bd3ddf3333e78621f40ad0 | 267,542,528,054,034,040,000,000,000,000,000,000,000 | 7 | opt_go: Tolerate unplanned server death
While debugging some experimental nbdkit code that was triggering an
assertion failure in nbdkit, I noticed a secondary failure of nbdsh
also dying from an assertion:
libnbd: debug: nbdsh: nbd_opt_go: transition: NEWSTYLE.OPT_GO.SEND -> DEAD
libnbd: debug: nbdsh: nbd_opt_go: op... |
fix_input_buffer(char_u *buf, int len)
{
int i;
char_u *p = buf;
/*
* Two characters are special: NUL and K_SPECIAL.
* When compiled With the GUI CSI is also special.
* Replace NUL by K_SPECIAL KS_ZERO KE_FILLER
* Replace K_SPECIAL by K_SPECIAL KS_SPECIAL KE_FILLER
* Replace... | 0 | [
"CWE-78"
] | vim | 53575521406739cf20bbe4e384d88e7dca11f040 | 299,659,116,582,153,100,000,000,000,000,000,000,000 | 59 | patch 8.1.1365: source command doesn't check for the sandbox
Problem: Source command doesn't check for the sandbox. (Armin Razmjou)
Solution: Check for the sandbox when sourcing a file. |
QPDFNumberTreeObjectHelper::getAsMap() const
{
std::map<numtree_number, QPDFObjectHandle> result;
for (Members::idx_map::const_iterator iter = this->m->entries.begin();
iter != this->m->entries.end(); ++iter)
{
result[(*iter).first] = (*iter).second;
}
return result;
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 150,960,509,136,372,670,000,000,000,000,000,000,000 | 10 | 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 ... |
const Network::ListenerConfig& PerListenerFactoryContextImpl::listenerConfig() const {
return *listener_config_;
} | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 302,716,569,783,640,650,000,000,000,000,000,000,000 | 3 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
static bool has_pid_permissions(struct pid_namespace *pid,
struct task_struct *task,
int hide_pid_min)
{
if (pid->hide_pid < hide_pid_min)
return true;
if (in_group_p(pid->pid_gid))
return true;
return ptrace_may_access(task, PTRACE_MODE_READ);
} | 0 | [] | linux | 0499680a42141d86417a8fbaa8c8db806bea1201 | 160,792,398,115,337,900,000,000,000,000,000,000,000 | 10 | procfs: add hidepid= and gid= mount options
Add support for mount options to restrict access to /proc/PID/
directories. The default backward-compatible "relaxed" behaviour is left
untouched.
The first mount option is called "hidepid" and its value defines how much
info about processes we want to be available for non... |
static bool cgfs_unfreeze(void *hdata)
{
struct cgfs_data *d = hdata;
char *cgabspath, *cgrelpath;
int ret;
if (!d)
return false;
cgrelpath = lxc_cgroup_get_hierarchy_path_data("freezer", d);
cgabspath = lxc_cgroup_find_abs_path("freezer", cgrelpath, true, NULL);
if (!cgabspath)
return false;
ret = do_cg... | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 272,010,906,919,636,300,000,000,000,000,000,000,000 | 18 | CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the container's inital fstree
by doing a bunch of mounting, guided by the container configuration
file. The container config is owned by the admin or user on the host,
so we do not try to guard against bad entries. Howev... |
std::chrono::milliseconds requestHeadersTimeout() const override {
return request_headers_timeout_;
} | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 322,785,408,421,364,200,000,000,000,000,000,000,000 | 3 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
GF_Err iSFM_dump(GF_Box *a, FILE * trace)
{
GF_ISMASampleFormatBox *p;
const char *name = (a->type==GF_ISOM_BOX_TYPE_ISFM) ? "ISMASampleFormat" : "OMADRMAUFormatBox";
p = (GF_ISMASampleFormatBox *)a;
gf_isom_box_dump_start(a, name, trace);
fprintf(trace, "selective_encryption=\"%d\" key_indicator_length=\"%d\" IV_... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 234,130,340,486,596,250,000,000,000,000,000,000,000 | 10 | fixed 2 possible heap overflows (inc. #1088) |
static int send_mono_rect(VncState *vs, int x, int y,
int w, int h, uint32_t bg, uint32_t fg)
{
ssize_t bytes;
int stream = 1;
int level = tight_conf[vs->tight.compression].mono_zlib_level;
#ifdef CONFIG_VNC_PNG
if (tight_can_send_png_rect(vs, w, h)) {
int ret;
... | 0 | [
"CWE-125"
] | qemu | 9f64916da20eea67121d544698676295bbb105a7 | 113,098,835,934,335,270,000,000,000,000,000,000,000 | 57 | pixman/vnc: use pixman images in vnc.
The vnc code uses *three* DisplaySurfaces:
First is the surface of the actual QemuConsole, usually the guest
screen, but could also be a text console (monitor/serial reachable via
Ctrl-Alt-<nr> keys). This is left as-is.
Second is the current server's view of the screen content... |
zneedinput(i_ctx_t *i_ctx_p)
{
return gs_error_NeedInput; /* interpreter will exit to caller */
} | 0 | [
"CWE-200"
] | ghostpdl | 34cc326eb2c5695833361887fe0b32e8d987741c | 778,784,400,585,569,100,000,000,000,000,000,000 | 4 | Bug 699927: don't include operator arrays in execstack output
When we transfer the contents of the execution stack into the array, take the
extra step of replacing any operator arrays on the stack with the operator
that reference them.
This prevents the contents of Postscript defined, internal only operators (those
c... |
static int tcp_prune_ofo_queue(struct sock *sk)
{
struct tcp_sock *tp = tcp_sk(sk);
int res = 0;
if (!skb_queue_empty(&tp->out_of_order_queue)) {
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_OFOPRUNED);
__skb_queue_purge(&tp->out_of_order_queue);
/* Reset SACK state. A conforming SACK implementation will
* d... | 0 | [] | net-next | fdf5af0daf8019cec2396cdef8fb042d80fe71fa | 93,904,245,788,278,840,000,000,000,000,000,000,000 | 21 | tcp: drop SYN+FIN messages
Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his
linux machines to their limits.
Dont call conn_request() if the TCP flags includes SYN flag
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S... |
static int drbg_init_sym_kernel(struct drbg_state *drbg)
{
int ret = 0;
struct crypto_cipher *tfm;
tfm = crypto_alloc_cipher(drbg->core->backend_cra_name, 0, 0);
if (IS_ERR(tfm)) {
pr_info("DRBG: could not allocate cipher TFM handle\n");
return PTR_ERR(tfm);
}
BUG_ON(drbg_blocklen(drbg) != crypto_cipher_bloc... | 0 | [
"CWE-476"
] | linux | 8fded5925d0a733c46f8d0b5edd1c9b315882b1d | 298,634,615,218,109,080,000,000,000,000,000,000,000 | 14 | crypto: drbg - Convert to new rng interface
This patch converts the DRBG implementation to the new low-level
rng interface.
This allows us to get rid of struct drbg_gen by using the new RNG
API instead.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Stephan Mueller <smueller@chronox.de> |
int php_mb_regex_set_default_mbctype(const char *encname)
{
OnigEncoding mbctype = _php_mb_regex_name2mbctype(encname);
if (mbctype == ONIG_ENCODING_UNDEF) {
return FAILURE;
}
MBREX(default_mbctype) = mbctype;
return SUCCESS;
} | 0 | [
"CWE-125"
] | php-src | e617f03066ce81d26f56c06d6bd7787c7de08703 | 72,517,327,379,401,240,000,000,000,000,000,000,000 | 9 | Fix #77367: Negative size parameter in mb_split
When adding the last element to the result value of `mb_split`, the
`chunk_pos` may point beyond the end of the string, in which case the
unsigned `n` would underflow. Therefore, we check whether this is the
case in the first place, and only calculate `n` otherwise. Si... |
_equalPrepareStmt(const PrepareStmt *a, const PrepareStmt *b)
{
COMPARE_STRING_FIELD(name);
COMPARE_NODE_FIELD(argtypes);
COMPARE_NODE_FIELD(query);
return true;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 304,613,121,157,067,870,000,000,000,000,000,000,000 | 8 | 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 int print_media_desc(const pjmedia_sdp_media *m, char *buf, pj_size_t len)
{
char *p = buf;
char *end = buf+len;
unsigned i;
int printed;
/* check length for the "m=" line. */
if (len < (pj_size_t)m->desc.media.slen+m->desc.transport.slen+12+24) {
return -1;
}
*p++ = 'm'; /*... | 0 | [
"CWE-121",
"CWE-120",
"CWE-787"
] | pjproject | 560a1346f87aabe126509bb24930106dea292b00 | 314,272,961,557,641,100,000,000,000,000,000,000,000 | 72 | Merge pull request from GHSA-f5qg-pqcg-765m |
search_in_range(regex_t* reg, const UChar* str, const UChar* end,
const UChar* start, const UChar* range, /* match start range */
const UChar* data_range, /* subject string range */
OnigRegion* region,
OnigOptionType option, OnigMatchParam* mp)
{
int r;
... | 1 | [
"CWE-125"
] | oniguruma | 778a43dd56925ed58bbe26e3a7bb8202d72c3f3f | 78,725,223,172,307,750,000,000,000,000,000,000,000 | 357 | fix #164: Integer overflow related to reg->dmax in search_in_range() |
I32
Perl_regexec_flags(pTHX_ REGEXP * const rx, char *stringarg, char *strend,
char *strbeg, SSize_t minend, SV *sv, void *data, U32 flags)
/* stringarg: the point in the string at which to begin matching */
/* strend: pointer to null at end of string */
/* strbeg: real beginning of string */
/* minend: ... | 0 | [
"CWE-416"
] | perl5 | 22b433eff9a1ffa2454e18405a56650f07b385b5 | 224,937,584,110,219,100,000,000,000,000,000,000,000 | 680 | PATCH [perl #123562] Regexp-matching "hangs"
The regex engine got into an infinite loop because of the malformation.
It is trying to back-up over a sequence of UTF-8 continuation bytes.
But the character just before the sequence should be a start byte. If
not, there is a malformation. I added a test to croak if that... |
static int print_nc_ipadd(BIO *bp, ASN1_OCTET_STRING *ip)
{
int i, len;
unsigned char *p;
p = ip->data;
len = ip->length;
BIO_puts(bp, "IP:");
if (len == 8) {
BIO_printf(bp, "%d.%d.%d.%d/%d.%d.%d.%d",
p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]);
} else if (len ... | 0 | [
"CWE-125"
] | openssl | 8393de42498f8be75cf0353f5c9f906a43a748d2 | 210,033,736,613,097,440,000,000,000,000,000,000,000 | 23 | Fix the name constraints code to not assume NUL terminated strings
ASN.1 strings may not be NUL terminated. Don't assume they are.
CVE-2021-3712
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org> |
static int __init init_inodecache(void)
{
isofs_inode_cachep = kmem_cache_create("isofs_inode_cache",
sizeof(struct iso_inode_info),
0, (SLAB_RECLAIM_ACCOUNT|
SLAB_MEM_SPREAD),
init_once);
if (isofs_inode_cachep == NULL)
return -ENOMEM;
return 0;
} | 0 | [
"CWE-20",
"CWE-399"
] | linux | 410dd3cf4c9b36f27ed4542ee18b1af5e68645a4 | 209,404,060,238,295,160,000,000,000,000,000,000,000 | 11 | isofs: Fix unbounded recursion when processing relocated directories
We did not check relocated directory in any way when processing Rock
Ridge 'CL' tag. Thus a corrupted isofs image can possibly have a CL
entry pointing to another CL entry leading to possibly unbounded
recursion in kernel code and thus stack overflow... |
must_have_n_keys (const char *filename, const char *option, const struct key2 *key2, int n)
{
if (key2->n < n)
{
#ifdef ENABLE_SMALL
msg (M_FATAL, "Key file '%s' used in --%s contains insufficient key material [keys found=%d required=%d]", filename, option, key2->n, n);
#else
msg (M_FATAL, "Key file '... | 0 | [
"CWE-200"
] | openvpn | 11d21349a4e7e38a025849479b36ace7c2eec2ee | 61,505,650,303,945,160,000,000,000,000,000,000,000 | 11 | Use constant time memcmp when comparing HMACs in openvpn_decrypt.
Signed-off-by: Steffan Karger <steffan.karger@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: Gert Doering <gert@greenie.muc.de> |
static void cleanup_mapped_device(struct mapped_device *md)
{
if (md->wq)
destroy_workqueue(md->wq);
if (md->kworker_task)
kthread_stop(md->kworker_task);
mempool_destroy(md->io_pool);
if (md->bs)
bioset_free(md->bs);
if (md->dax_dev) {
kill_dax(md->dax_dev);
put_dax(md->dax_dev);
md->dax_dev = NULL;
... | 0 | [
"CWE-362"
] | linux | b9a41d21dceadf8104812626ef85dc56ee8a60ed | 164,343,705,658,976,810,000,000,000,000,000,000,000 | 36 | dm: fix race between dm_get_from_kobject() and __dm_destroy()
The following BUG_ON was hit when testing repeat creation and removal of
DM devices:
kernel BUG at drivers/md/dm.c:2919!
CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44
Call Trace:
[<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a
... |
void blk_mq_start_hw_queues(struct request_queue *q)
{
struct blk_mq_hw_ctx *hctx;
int i;
queue_for_each_hw_ctx(q, hctx, i)
blk_mq_start_hw_queue(hctx);
} | 0 | [
"CWE-362",
"CWE-264"
] | linux | 0048b4837affd153897ed1222283492070027aa9 | 49,209,584,419,111,680,000,000,000,000,000,000,000 | 8 | 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. ... |
static int mov_metadata_track_or_disc_number(MOVContext *c, AVIOContext *pb,
unsigned len, const char *key)
{
char buf[16];
short current, total = 0;
avio_rb16(pb); // unknown
current = avio_rb16(pb);
if (len >= 6)
total = avio_rb16(pb);
if (... | 0 | [
"CWE-399",
"CWE-834"
] | FFmpeg | 9cb4eb772839c5e1de2855d126bf74ff16d13382 | 46,873,558,410,436,050,000,000,000,000,000,000,000 | 19 | avformat/mov: Fix DoS in read_tfra()
Fixes: Missing EOF check in loop
No testcase
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
input_osc_4(struct input_ctx *ictx, const char *p)
{
struct window_pane *wp = ictx->wp;
char *copy, *s, *next = NULL;
long idx;
u_int r, g, b;
if (wp == NULL)
return;
copy = s = xstrdup(p);
while (s != NULL && *s != '\0') {
idx = strtol(s, &next, 10);
if (*next++ != ';')
goto bad;
if (idx < ... | 0 | [
"CWE-787"
] | tmux | a868bacb46e3c900530bed47a1c6f85b0fbe701c | 318,043,208,673,014,340,000,000,000,000,000,000,000 | 35 | Do not write after the end of the array and overwrite the stack when
colon-separated SGR sequences contain empty arguments. Reported by Sergey
Nizovtsev. |
get_chainname_rulenum(const struct ipt_entry *s, const struct ipt_entry *e,
const char *hookname, const char **chainname,
const char **comment, unsigned int *rulenum)
{
const struct xt_standard_target *t = (void *)ipt_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TARGET) == 0)... | 0 | [
"CWE-119"
] | nf-next | d7591f0c41ce3e67600a982bab6989ef0f07b3ce | 134,494,332,471,539,150,000,000,000,000,000,000,000 | 28 | netfilter: x_tables: introduce and use xt_copy_counters_from_user
The three variants use same copy&pasted code, condense this into a
helper and use that.
Make sure info.name is 0-terminated.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> |
void vma_set_page_prot(struct vm_area_struct *vma)
{
unsigned long vm_flags = vma->vm_flags;
pgprot_t vm_page_prot;
vm_page_prot = vm_pgprot_modify(vma->vm_page_prot, vm_flags);
if (vma_wants_writenotify(vma, vm_page_prot)) {
vm_flags &= ~VM_SHARED;
vm_page_prot = vm_pgprot_modify(vm_page_prot, vm_flags);
}
... | 0 | [
"CWE-362"
] | linux | 246c320a8cfe0b11d81a4af38fa9985ef0cc9a4c | 272,741,382,390,725,700,000,000,000,000,000,000,000 | 13 | mm/mmap.c: close race between munmap() and expand_upwards()/downwards()
VMA with VM_GROWSDOWN or VM_GROWSUP flag set can change their size under
mmap_read_lock(). It can lead to race with __do_munmap():
Thread A Thread B
__do_munmap()
detach_vmas_to_be_unmapped()
mmap_write_downgrade()
expand_downwards()
... |
static void process_bin_append_prepend(conn *c) {
char *key;
int nkey;
int vlen;
item *it;
assert(c != NULL);
key = binary_get_key(c);
nkey = c->binary_header.request.keylen;
vlen = c->binary_header.request.bodylen - nkey;
if (settings.verbose > 1) {
fprintf(stderr, "Value... | 0 | [
"CWE-125"
] | memcached | 554b56687a19300a75ec24184746b5512580c819 | 200,500,560,339,827,970,000,000,000,000,000,000,000 | 62 | fix strncpy call to avoid ASAN violation
Ensure we're only reading to the size of the smallest buffer, since
they're both on the stack and could potentially overlap. Overlapping is
defined as ... undefined behavior. I've looked through all available
implementations of strncpy and they still only copy from the first \0... |
void udp_destroy_sock(struct sock *sk)
{
lock_sock(sk);
udp_flush_pending_frames(sk);
release_sock(sk);
} | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 234,650,928,529,707,750,000,000,000,000,000,000,000 | 6 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
void ActiveClient::drain() {
if (currentUnusedCapacity() <= 0) {
return;
}
if (state() == ActiveClient::State::CONNECTING) {
// If connecting, update both the cluster capacity and the local connecting
// capacity.
parent_.decrConnectingAndConnectedStreamCapacity(currentUnusedCapacity());
} else ... | 0 | [
"CWE-703",
"CWE-674"
] | envoy | 4b6dd3b53cd5c6d4d4df378a2fc62c1707522b31 | 107,866,381,124,049,310,000,000,000,000,000,000,000 | 14 | CVE-2022-23606
Avoid closing other connections to prevent deep recursion when a large number of idle connections are closed at the start of a pool drain, when a connection is closed.
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static int avi_read_tag(AVFormatContext *s, AVStream *st, uint32_t tag,
uint32_t size)
{
AVIOContext *pb = s->pb;
char key[5] = { 0 };
char *value;
size += (size & 1);
if (size == UINT_MAX)
return AVERROR(EINVAL);
value = av_malloc(size + 1);
if (!value... | 0 | [
"CWE-200"
] | FFmpeg | a5d849b149ca67ced2d271dc84db0bc95a548abb | 45,831,758,217,754,800,000,000,000,000,000,000,000 | 23 | avformat/avidec: Limit formats in gab2 to srt and ass/ssa
This prevents part of one exploit leading to an information leak
Found-by: Emil Lerner and Pavel Cheremushkin
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static int proc_root_readdir(struct file *file, struct dir_context *ctx)
{
if (ctx->pos < FIRST_PROCESS_ENTRY) {
int error = proc_readdir(file, ctx);
if (unlikely(error <= 0))
return error;
ctx->pos = FIRST_PROCESS_ENTRY;
}
return proc_pid_readdir(file, ctx);
} | 0 | [
"CWE-119"
] | linux | e54ad7f1ee263ffa5a2de9c609d58dfa27b21cd9 | 280,281,463,474,783,120,000,000,000,000,000,000,000 | 11 | proc: prevent stacking filesystems on top
This prevents stacking filesystems (ecryptfs and overlayfs) from using
procfs as lower filesystem. There is too much magic going on inside
procfs, and there is no good reason to stack stuff on top of procfs.
(For example, procfs does access checks in VFS open handlers, and
e... |
static int cbtls_new_session(UNUSED SSL *s, SSL_SESSION *sess)
{
size_t size;
char buffer[2 * MAX_SESSION_SIZE + 1];
size = sess->session_id_length;
if (size > MAX_SESSION_SIZE) size = MAX_SESSION_SIZE;
fr_bin2hex(sess->session_id, buffer, size);
DEBUG2(" SSL: adding session %s to cache", buffer);
return 1;... | 0 | [
"CWE-119"
] | freeradius-server | 78e5aed56c36a9231bc91ea5f55b3edf88a9d2a4 | 209,936,284,279,167,600,000,000,000,000,000,000,000 | 14 | Fix CVE-2012-3547. Found by Timo Warns |
static void seek_interrupt(void)
{
debugt(__func__, "");
if (inr != 2 || (ST0 & 0xF8) != 0x20) {
DPRINT("seek failed\n");
DRS->track = NEED_2_RECAL;
cont->error();
cont->redo();
return;
}
if (DRS->track >= 0 && DRS->track != ST1 && !blind_seek) {
debug_dcl(DP->flags,
"clearing NEWCHANGE flag becaus... | 0 | [
"CWE-264",
"CWE-754"
] | linux | ef87dbe7614341c2e7bfe8d32fcb7028cc97442c | 140,607,532,742,121,590,000,000,000,000,000,000,000 | 21 | floppy: ignore kernel-only members in FDRAWCMD ioctl input
Always clear out these floppy_raw_cmd struct members after copying the
entire structure from userspace so that the in-kernel version is always
valid and never left in an interdeterminate state.
Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
Signed-off-by: L... |
MagickExport Image *StatisticImage(const Image *image,const StatisticType type,
const size_t width,const size_t height,ExceptionInfo *exception)
{
Image
*statistic_image;
statistic_image=StatisticImageChannel(image,DefaultChannels,type,width,
height,exception);
return(statistic_image);
} | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick6 | 91e58d967a92250439ede038ccfb0913a81e59fe | 113,365,530,124,386,950,000,000,000,000,000,000,000 | 10 | https://github.com/ImageMagick/ImageMagick/issues/1615 |
void logMV(int x0,int y0,int nPbW,int nPbH, const char* mode,const PBMotion* mv)
{
int pred0 = mv->predFlag[0];
int pred1 = mv->predFlag[1];
logtrace(LogMotion,
"*MV %d;%d [%d;%d] %s: (%d) %d;%d @%d (%d) %d;%d @%d\n", x0,y0,nPbW,nPbH,mode,
pred0,
pred0 ? mv->mv[0].x : 0,pred0 ?... | 0 | [
"CWE-787"
] | libde265 | 697aa4f7c774abd6374596e6707a6f4f54265355 | 249,835,841,533,661,960,000,000,000,000,000,000,000 | 12 | fix MC with HDR chroma, but SDR luma (#301) |
_bt_newroot(Relation rel, Buffer lbuf, Buffer rbuf)
{
Buffer rootbuf;
Page lpage,
rootpage;
BlockNumber lbkno,
rbkno;
BlockNumber rootblknum;
BTPageOpaque rootopaque;
BTPageOpaque lopaque;
ItemId itemid;
IndexTuple item;
IndexTuple left_item;
Size left_item_sz;
IndexTuple right_item;
Size right... | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 11,685,117,508,319,769,000,000,000,000,000,000,000 | 153 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
virDomainNetDefCheckABIStability(virDomainNetDefPtr src,
virDomainNetDefPtr dst)
{
char srcmac[VIR_MAC_STRING_BUFLEN];
char dstmac[VIR_MAC_STRING_BUFLEN];
if (virMacAddrCmp(&src->mac, &dst->mac) != 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 308,580,358,786,272,340,000,000,000,000,000,000,000 | 46 | 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... |
inq_writecert_parms (void *opaque, const char *line)
{
int rc;
struct writecert_parm_s *parm = opaque;
if (has_leading_keyword (line, "CERTDATA"))
{
rc = assuan_send_data (parm->dflt->ctx,
parm->certdata, parm->certdatalen);
}
else
rc = default_inq_cb (parm->dflt,... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 47,726,710,358,835,810,000,000,000,000,000,000,000 | 15 | 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 ... |
display_offset_entry_loclists (struct dwarf_section *section)
{
unsigned char * start = section->start;
unsigned char * const end = start + section->size;
introduce (section, false);
do
{
dwarf_vma length;
unsigned short version;
unsigned char address_size;
unsigned ch... | 0 | [
"CWE-703"
] | binutils-gdb | 695c6dfe7e85006b98c8b746f3fd5f913c94ebff | 176,435,353,000,004,440,000,000,000,000,000,000,000 | 210 | PR29370, infinite loop in display_debug_abbrev
The PR29370 testcase is a fuzzed object file with multiple
.trace_abbrev sections. Multiple .trace_abbrev or .debug_abbrev
sections are not a violation of the DWARF standard. The DWARF5
standard even gives an example of multiple .debug_abbrev sections
contained in group... |
static int StreamTcpTest22 (void)
{
StreamTcpThread stt;
struct in_addr addr;
char os_policy_name[10] = "windows";
const char *ip_addr;
TcpStream stream;
Packet *p = SCMalloc(SIZE_OF_PACKET);
if (unlikely(p == NULL))
return 0;
IPV4Hdr ipv4h;
int ret = 0;
memset(&addr, 0,... | 0 | [
"CWE-436",
"CWE-94"
] | suricata | fa692df37a796c3330c81988d15ef1a219afc006 | 192,675,514,189,742,600,000,000,000,000,000,000,000 | 50 | stream: reject broken ACK packets
Fix evasion posibility by rejecting packets with a broken ACK field.
These packets have a non-0 ACK field, but do not have a ACK flag set.
Bug #3324.
Reported-by: Nicolas Adba |
static inline unsigned long get_desc_limit(const struct desc_struct *desc)
{
return desc->limit0 | (desc->limit << 16);
} | 0 | [
"CWE-119"
] | linux-2.6 | 5ac37f87ff18843aabab84cf75b2f8504c2d81fe | 214,069,198,175,820,600,000,000,000,000,000,000,000 | 4 | x86: fix ldt limit for 64 bit
Fix size of LDT entries. On x86-64, ldt_desc is a double-sized descriptor.
Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu> |
TEST(ComparisonsTest, NotEqualBroadcastString) {
if (SingleOpModel::GetForceUseNnapi()) {
return;
}
ComparisonOpModel model({1, 1, 1, 4}, {1, 1, 1, 1}, TensorType_STRING,
BuiltinOperator_NOT_EQUAL);
model.PopulateTensor<std::string>(model.input1(), {"A", "B", "A", "B"});
model.Po... | 0 | [
"CWE-20",
"CWE-703"
] | tensorflow | a989426ee1346693cc015792f11d715f6944f2b8 | 267,093,813,331,354,100,000,000,000,000,000,000,000 | 13 | Improve to cover scale value greater than one
PiperOrigin-RevId: 433050921 |
static TEE_Result op_attr_bignum_from_user(void *attr, const void *buffer,
size_t size)
{
struct bignum **bn = attr;
return crypto_bignum_bin2bn(buffer, size, *bn);
} | 0 | [
"CWE-119",
"CWE-787"
] | optee_os | a637243270fc1faae16de059091795c32d86e65e | 173,811,105,743,979,700,000,000,000,000,000,000,000 | 7 | svc: check for allocation overflow in crypto calls
Without checking for overflow there is a risk of allocating a buffer
with size smaller than anticipated and as a consequence of that it might
lead to a heap based overflow with attacker controlled data written
outside the boundaries of the buffer.
Fixes: OP-TEE-2018-... |
void ipc_rcu_putref(void *ptr)
{
if (!atomic_dec_and_test(&container_of(ptr, struct ipc_rcu_hdr, data)->refcount))
return;
if (container_of(ptr, struct ipc_rcu_hdr, data)->is_vmalloc) {
call_rcu(&container_of(ptr, struct ipc_rcu_grace, data)->rcu,
ipc_schedule_free);
} else {
kfree_rcu(container_of(ptr, s... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 6062a8dc0517bce23e3c2f7d2fea5e22411269a3 | 170,456,589,116,617,100,000,000,000,000,000,000,000 | 12 | ipc,sem: fine grained locking for semtimedop
Introduce finer grained locking for semtimedop, to handle the common case
of a program wanting to manipulate one semaphore from an array with
multiple semaphores.
If the call is a semop manipulating just one semaphore in an array with
multiple semaphores, only take the loc... |
static void sev_unlock_vcpus_for_migration(struct kvm *kvm)
{
struct kvm_vcpu *vcpu;
unsigned long i;
kvm_for_each_vcpu(i, vcpu, kvm) {
mutex_unlock(&vcpu->mutex);
}
} | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 102,659,322,841,908,770,000,000,000,000,000,000,000 | 9 | 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... |
int epo_finish_copydevice(gx_device *dev, const gx_device *from_dev)
{
/* We musn't allow the following pointers to remain shared with the from_dev
because we're about to tell the caller it's only allowed to copy the prototype
and free the attempted copy of a non-prototype. If from_dev is the prototyp... | 0 | [] | ghostpdl | c9b362ba908ca4b1d7c72663a33229588012d7d9 | 93,197,039,599,968,400,000,000,000,000,000,000,000 | 13 | Bug 699670: disallow copying of the epo device
The erasepage optimisation (epo) subclass device shouldn't be allowed to be
copied because the subclass private data, child and parent pointers end up
being shared between the original device and the copy.
Add an epo_finish_copydevice which NULLs the three offending poin... |
ipmi_fru_get_help()
{
lprintf(LOG_NOTICE,
"fru get <fruid> oem iana <record> <format> <args> - limited OEM support");
} /* ipmi_fru_get_help() */ | 0 | [
"CWE-120",
"CWE-787"
] | ipmitool | e824c23316ae50beb7f7488f2055ac65e8b341f2 | 325,943,254,257,822,370,000,000,000,000,000,000,000 | 5 | fru: Fix buffer overflow vulnerabilities
Partial fix for CVE-2020-5208, see
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
The `read_fru_area_section` function only performs size validation of
requested read size, and falsely assumes that the IPMI message will not
respond with more than ... |
void HierarchicalBitmapRequester::RequestUserDataForEncoding(class BitMapHook *bmh,RectAngle<LONG> ®ion,bool alpha)
{
#if ACCUSOFT_CODE
int i;
m_ulMaxMCU = MAX_ULONG;
for(i = 0;i < m_ucCount;i++) {
ULONG max;
//
// Components are always requested completely on encoding.
RequestUserData(bmh,... | 0 | [
"CWE-125",
"CWE-787"
] | libjpeg | 187035b9726710b4fe11d565c7808975c930895d | 47,413,653,622,093,740,000,000,000,000,000,000,000 | 25 | The code now checks for consistency of the MCU sizes across
hierarchical levels, and fails in case they are different. |
static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi,
bool reconnect, bool suppress_warnings)
{
int slave_was_killed= 0;
int last_errno= -2; // impossible error
ulong err_count=0;
char llbuff[22];
char password[MAX_PASSWORD_LENGTH + 1];
... | 1 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 301,676,363,571,273,250,000,000,000,000,000,000,000 | 146 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
njs_string_bytes_from_array_like(njs_vm_t *vm, njs_value_t *value)
{
u_char *p;
int64_t length;
uint32_t u32;
njs_int_t ret;
njs_array_t *array;
njs_value_t *octet, index, prop;
njs_array_buffer_t *buffer;
array = NULL;
... | 0 | [] | njs | 36f04a3178fcb6da8513cc3dbf35215c2a581b3f | 202,717,271,404,265,380,000,000,000,000,000,000,000 | 84 | Fixed String.prototype.replace() with byte strings.
This closes #522 issue on Github. |
static struct nft_chain *nf_tables_chain_lookup(const struct nft_table *table,
const struct nlattr *nla)
{
struct nft_chain *chain;
if (nla == NULL)
return ERR_PTR(-EINVAL);
list_for_each_entry(chain, &table->chains, list) {
if (!nla_strcmp(nla, chain->name))
return chain;
}
return ERR_PTR(-ENOENT)... | 0 | [
"CWE-19"
] | nf | a2f18db0c68fec96631c10cad9384c196e9008ac | 330,617,633,704,055,730,000,000,000,000,000,000,000 | 15 | netfilter: nf_tables: fix flush ruleset chain dependencies
Jumping between chains doesn't mix well with flush ruleset. Rules
from a different chain and set elements may still refer to us.
[ 353.373791] ------------[ cut here ]------------
[ 353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159!
[ 353.373896... |
acl_fetch_chdr_ip(struct proxy *px, struct session *l4, void *l7, int dir,
struct acl_expr *expr, struct acl_test *test)
{
struct http_txn *txn = l7;
if (!txn)
return 0;
if (txn->req.msg_state < HTTP_MSG_BODY)
return 0;
if (txn->rsp.msg_state != HTTP_MSG_RPBEFORE)
/* ensure the indexes are not affecte... | 0 | [] | haproxy-1.4 | dc80672211e085c211f1fc47e15cfe57ab587d38 | 219,427,490,692,013,230,000,000,000,000,000,000,000 | 17 | BUG/CRITICAL: using HTTP information in tcp-request content may crash the process
During normal HTTP request processing, request buffers are realigned if
there are less than global.maxrewrite bytes available after them, in
order to leave enough room for rewriting headers after the request. This
is done in http_wait_fo... |
int TS_MSG_IMPRINT_print_bio(BIO *bio, TS_MSG_IMPRINT *a)
{
const ASN1_OCTET_STRING *msg;
TS_X509_ALGOR_print_bio(bio, TS_MSG_IMPRINT_get_algo(a));
BIO_printf(bio, "Message data:\n");
msg = TS_MSG_IMPRINT_get_msg(a);
BIO_dump_indent(bio, (const char *)M_ASN1_STRING_data(msg),
M... | 0 | [
"CWE-125"
] | openssl | 6adf409c7432b90c06d9890787fe56c48f2a16e7 | 269,096,630,233,144,740,000,000,000,000,000,000,000 | 13 | Fix OOB read in TS_OBJ_print_bio().
TS_OBJ_print_bio() misuses OBJ_txt2obj: it should print the result
as a null terminated buffer. The length value returned is the total
length the complete text reprsentation would need not the amount of
data written.
CVE-2016-2180
Thanks to Shi Lei for reporting this bug.
Reviewe... |
rb_set_head_page(struct ring_buffer_per_cpu *cpu_buffer)
{
struct buffer_page *head;
struct buffer_page *page;
struct list_head *list;
int i;
if (RB_WARN_ON(cpu_buffer, !cpu_buffer->head_page))
return NULL;
/* sanity check */
list = cpu_buffer->pages;
if (RB_WARN_ON(cpu_buffer, rb_list_head(list->prev->next... | 0 | [
"CWE-835"
] | linux | 67f0d6d9883c13174669f88adac4f0ee656cc16a | 15,353,048,585,871,577,000,000,000,000,000,000,000 | 36 | tracing: Fix bug in rb_per_cpu_empty() that might cause deadloop.
The "rb_per_cpu_empty()" misinterpret the condition (as not-empty) when
"head_page" and "commit_page" of "struct ring_buffer_per_cpu" points to
the same buffer page, whose "buffer_data_page" is empty and "read" field
is non-zero.
An error scenario coul... |
static biasFn *lineSubtractFn (unsigned bits)
{
switch (bits) {
case 8: return subtract8;
case 16: return subtract16;
case 32: return subtract32;
}
return NULL;
} | 0 | [
"CWE-190"
] | libtiff | 43c0b81a818640429317c80fea1e66771e85024b | 246,246,182,885,664,050,000,000,000,000,000,000,000 | 9 | * tools/tiffcp.c: fix read of undefined variable in case of missing
required tags. Found on test case of MSVR 35100.
* tools/tiffcrop.c: fix read of undefined buffer in
readContigStripsIntoBuffer() due to uint16 overflow. Probably not a
security issue but I can be wrong. Reported as MSVR 35100 by Axel
Souchet from the ... |
#ifdef CONFIG_PROC_FS
static __cold int io_uring_show_cred(struct seq_file *m, unsigned int id,
const struct cred *cred)
{
struct user_namespace *uns = seq_user_ns(m);
struct group_info *gi;
kernel_cap_t cap;
unsigned __capi;
int g;
seq_printf(m, "%5d\n", id);
seq_put_decimal_ull(m, "\tUid:\t", from_kuid_mung... | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 128,162,426,113,554,210,000,000,000,000,000,000,000 | 31 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
static int su3000_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
int num)
{
struct dvb_usb_device *d = i2c_get_adapdata(adap);
u8 obuf[0x40], ibuf[0x40];
if (!d)
return -ENODEV;
if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
return -EAGAIN;
switch (num) {
case 1:
switch (msg[0].add... | 1 | [
"CWE-476",
"CWE-119"
] | linux | 606142af57dad981b78707234cfbd15f9f7b7125 | 35,123,086,252,660,730,000,000,000,000,000,000,000 | 63 | [media] dw2102: don't do DMA on stack
On Kernel 4.9, WARNINGs about doing DMA on stack are hit at
the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach().
Both were due to the use of buffers on the stack as parameters to
dvb_usb_generic_rw() and the resulting attempt to do DMA with... |
ippNewResponse(ipp_t *request) /* I - IPP request message */
{
ipp_t *response; /* IPP response message */
ipp_attribute_t *attr; /* Current attribute */
/*
* Range check input...
*/
if (!request)
return (NULL);
/*
* Create a new IPP message...
*/
if ((response = ippNew()) == NULL)
re... | 0 | [
"CWE-120"
] | cups | f24e6cf6a39300ad0c3726a41a4aab51ad54c109 | 162,054,924,797,644,530,000,000,000,000,000,000,000 | 92 | 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) |
main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
int i, a, ret = 0;
int subset = 0;
initializeLibxml2();
for (a = 1; a < argc;a++) {
if (!strcmp(argv[a], "-v"))
verbose = 1;
else if (!strcmp(argv[a], "-u"))
update_results = 1;
else if (!strcmp(argv[a], ... | 0 | [
"CWE-125"
] | libxml2 | a820dbeac29d330bae4be05d9ecd939ad6b4aa33 | 261,353,191,513,795,700,000,000,000,000,000,000,000 | 41 | Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605>
Reviewed by David Kilzer.
* HTMLparser.c:
(htmlParseName): Add bounds check.
(htmlParseNameComplex): Ditto.
* result/HTML/758605.html: Added.
* result/HTML/758605.html.err: Added.
* result/HTML/758605.html.s... |
void intel_guc_ads_destroy(struct intel_guc *guc)
{
i915_vma_unpin_and_release(&guc->ads_vma, I915_VMA_RELEASE_MAP);
} | 0 | [
"CWE-20",
"CWE-190"
] | linux | c784e5249e773689e38d2bc1749f08b986621a26 | 244,277,952,964,629,040,000,000,000,000,000,000,000 | 4 | drm/i915/guc: Update to use firmware v49.0.1
The latest GuC firmware includes a number of interface changes that
require driver updates to match.
* Starting from Gen11, the ID to be provided to GuC needs to contain
the engine class in bits [0..2] and the instance in bits [3..6].
NOTE: this patch breaks pointer d... |
static MagickBooleanType WritePTIFImage(const ImageInfo *image_info,
Image *image,ExceptionInfo *exception)
{
Image
*images,
*next,
*pyramid_image;
ImageInfo
*write_info;
MagickBooleanType
status;
PointInfo
resolution;
size_t
columns,
rows;
/*
Create pyramid-encode... | 0 | [
"CWE-119"
] | ImageMagick | 1b811f7e7dad92b2992939f854201370a7d8084a | 5,529,887,563,452,841,000,000,000,000,000,000,000 | 71 | https://github.com/ImageMagick/ImageMagick/issues/584 |
static BOOL cliprdr_validate_file_contents_request(const CLIPRDR_FILE_CONTENTS_REQUEST* request)
{
/*
* [MS-RDPECLIP] 2.2.5.3 File Contents Request PDU (CLIPRDR_FILECONTENTS_REQUEST).
*
* A request for the size of the file identified by the lindex field. The size MUST be
* returned as a 64-bit, unsigned intege... | 0 | [
"CWE-125"
] | FreeRDP | b73143cf7ee5fe4cdabcbf56908aa15d8a883821 | 214,393,694,443,776,080,000,000,000,000,000,000,000 | 29 | Fixed oob read in cliprdr_read_format_list |
ProcLockWakeup(LockMethod lockMethodTable, LOCK *lock)
{
PROC_QUEUE *waitQueue = &(lock->waitProcs);
int queue_size = waitQueue->size;
PGPROC *proc;
LOCKMASK aheadRequests = 0;
Assert(queue_size >= 0);
if (queue_size == 0)
return;
proc = (PGPROC *) waitQueue->links.next;
while (queue_size-- > 0)
{
... | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 338,439,269,588,600,740,000,000,000,000,000,000,000 | 50 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
const char* SegmentInfo::GetMuxingAppAsUTF8() const {
return m_pMuxingAppAsUTF8;
} | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 169,091,774,891,444,080,000,000,000,000,000,000,000 | 3 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
assign_array_var_from_string (var, value, flags)
SHELL_VAR *var;
char *value;
int flags;
{
WORD_LIST *nlist;
if (value == 0)
return var;
nlist = expand_compound_array_assignment (var, value, flags);
assign_compound_array_list (var, nlist, flags);
if (nlist)
dispose_words (nlist);
... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 233,144,049,447,998,100,000,000,000,000,000,000,000 | 21 | bash-4.4-rc2 release |
void Item::print_value(String *str)
{
char buff[MAX_FIELD_WIDTH];
String *ptr, tmp(buff,sizeof(buff),str->charset());
ptr= val_str(&tmp);
if (!ptr)
str->append("NULL");
else
{
switch (result_type()) {
case STRING_RESULT:
append_unescaped(str, ptr->ptr(), ptr->length());
break;
ca... | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 304,567,551,238,921,830,000,000,000,000,000,000,000 | 25 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
STATIC void GC_win32_MessageBoxA(const char *msg, const char *caption,
unsigned flags)
{
# ifndef DONT_USE_USER32_DLL
/* Use static binding to "user32.dll". */
(void)MessageBoxA(NULL, msg, caption, flags);
# else
/* This simplifies linking - resolve "Messa... | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 159,836,035,914,920,310,000,000,000,000,000,000,000 | 18 | 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... |
Pl_ASCII85Decoder::write(unsigned char* buf, size_t len)
{
if (eod > 1)
{
return;
}
for (size_t i = 0; i < len; ++i)
{
if (eod > 1)
{
break;
}
else if (eod == 1)
{
if (buf[i] == '>')
{
flush();
eod = 2;
}
else
{
throw std::runtime_error(
"broken end-of... | 0 | [
"CWE-787"
] | qpdf | dc92574c10f3e2516ec6445b88c5d584f40df4e5 | 296,717,236,728,451,370,000,000,000,000,000,000,000 | 77 | Fix some pipelines to be safe if downstream write fails (fuzz issue 28262) |
decode_NXAST_RAW_DECAP(const struct nx_action_decap *nad,
enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *ofpacts)
{
struct ofpact_decap * decap;
if (ntohs(nad->len) > sizeof *nad) {
/* No properties supported yet. */
return OFPERR_NXBAC_UNK... | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 37,661,695,786,836,660,000,000,000,000,000,000,000 | 16 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
gst_rtsp_connection_connect (GstRTSPConnection * conn, GTimeVal * timeout)
{
GstRTSPResult result;
GstRTSPMessage response;
memset (&response, 0, sizeof (response));
gst_rtsp_message_init (&response);
result = gst_rtsp_connection_connect_with_response (conn, timeout, &response);
gst_rtsp_message_unset (&... | 0 | [] | gst-plugins-base | f672277509705c4034bc92a141eefee4524d15aa | 61,806,073,342,322,270,000,000,000,000,000,000,000 | 14 | gstrtspconnection: Security loophole making heap overflow
The former code allowed an attacker to create a heap overflow by
sending a longer than allowed session id in a response and including a
semicolon to change the maximum length. With this change, the parser
will never go beyond 512 bytes. |
static uint64_t ticks_to_ns(uint64_t value)
{
return (muldiv64(value, HPET_CLK_PERIOD, FS_PER_NS));
} | 0 | [
"CWE-119"
] | qemu | 3f1c49e2136fa08ab1ef3183fd55def308829584 | 130,081,560,386,190,180,000,000,000,000,000,000,000 | 4 | hpet: fix buffer overrun on invalid state load
CVE-2013-4527 hw/timer/hpet.c buffer overrun
hpet is a VARRAY with a uint8 size but static array of 32
To fix, make sure num_timers is valid using VMSTATE_VALID hook.
Reported-by: Anthony Liguori <anthony@codemonkey.ws>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com... |
_render_state_rescale( RenderState state )
{
if ( state->need_rescale && state->size )
{
FT_Set_Char_Size( state->face, 0,
(FT_F26Dot6)( state->char_size * 64.0 ),
0, state->resolution );
state->need_rescale = 0;
}
} | 0 | [
"CWE-120"
] | freetype2-demos | b995299b73ba4cd259f221f500d4e63095508bec | 271,540,515,449,444,100,000,000,000,000,000,000,000 | 10 | Fix Savannah bug #30054.
* src/ftdiff.c, src/ftgrid.c, src/ftmulti.c, src/ftstring.c,
src/ftview.c: Use precision for `%s' where appropriate to avoid
buffer overflows. |
PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv)
{
ERR("Warning: Function pam_sm_open_session() is not implemented in this module");
pam_syslog(pamh, LOG_WARNING,
"Function pm_sm_open_session() is not implemented in this module");
return PAM_SERVICE_ERR;
... | 0 | [] | pam_pkcs11 | a0c9b6ffc020944f03f57e7de66ad4363d52125d | 257,745,200,481,424,600,000,000,000,000,000,000,000 | 7 | fixed wiping secrets with OpenSSL_cleanse()
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
static bool imap_client_input_next_cmd(struct client *_client)
{
struct imap_client *client = (struct imap_client *)_client;
const struct imap_arg *args;
bool parsed;
int ret;
if (strcasecmp(client->cmd_name, "AUTHENTICATE") == 0) {
/* SASL-IR may need more space than input buffer's size,
so we'll handle i... | 0 | [] | core | 62061e8cf68f506c0ccaaba21fd4174764ca875f | 256,744,981,215,922,940,000,000,000,000,000,000,000 | 45 | imap-login: Split off client_invalid_command() |
static int ax25_rt_seq_show(struct seq_file *seq, void *v)
{
char buf[11];
if (v == SEQ_START_TOKEN)
seq_puts(seq, "callsign dev mode digipeaters\n");
else {
struct ax25_route *ax25_rt = v;
const char *callsign;
int i;
if (ax25cmp(&ax25_rt->callsign, &null_ax25_address) == 0)
callsign = "default";
... | 0 | [
"CWE-416"
] | linux | d01ffb9eee4af165d83b08dd73ebdf9fe94a519b | 95,919,672,756,422,430,000,000,000,000,000,000,000 | 41 | ax25: add refcount in ax25_dev to avoid UAF bugs
If we dereference ax25_dev after we call kfree(ax25_dev) in
ax25_dev_device_down(), it will lead to concurrency UAF bugs.
There are eight syscall functions suffer from UAF bugs, include
ax25_bind(), ax25_release(), ax25_connect(), ax25_ioctl(),
ax25_getname(), ax25_send... |
struct blk_mq_tags *blk_mq_init_tags(unsigned int total_tags,
unsigned int reserved_tags,
int node, int alloc_policy)
{
struct blk_mq_tags *tags;
if (total_tags > BLK_MQ_TAG_MAX) {
pr_err("blk-mq: tag depth too large\n");
return NULL;
}
tags = kzalloc_node(sizeof(*tags), GFP_KERNEL, node);
... | 0 | [
"CWE-362",
"CWE-264"
] | linux | 0048b4837affd153897ed1222283492070027aa9 | 152,588,510,475,210,280,000,000,000,000,000,000,000 | 25 | 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. ... |
inet_cidrtomask(uint8_t cidr)
{
uint32_t mask = 0;
int b;
for (b = 0; b < cidr; b++)
mask |= (1 << (31 - b));
return ntohl(mask);
} | 0 | [
"CWE-59",
"CWE-61"
] | keepalived | 04f2d32871bb3b11d7dc024039952f2fe2750306 | 251,621,755,050,940,500,000,000,000,000,000,000,000 | 9 | When opening files for write, ensure they aren't symbolic links
Issue #1048 identified that if, for example, a non privileged user
created a symbolic link from /etc/keepalvied.data to /etc/passwd,
writing to /etc/keepalived.data (which could be invoked via DBus)
would cause /etc/passwd to be overwritten.
This commit ... |
static void ohci_bus_stop(OHCIState *ohci)
{
trace_usb_ohci_stop(ohci->name);
timer_del(ohci->eof_timer);
} | 0 | [
"CWE-835"
] | qemu | 95ed56939eb2eaa4e2f349fe6dcd13ca4edfd8fb | 185,796,847,350,184,130,000,000,000,000,000,000,000 | 5 | usb: ohci: limit the number of link eds
The guest may builds an infinite loop with link eds. This patch
limit the number of linked ed to avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Message-id: 5899a02e.45ca240a.6c373.93c1@mx.google.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> |
dns_zone_getssutable(dns_zone_t *zone, dns_ssutable_t **table) {
REQUIRE(DNS_ZONE_VALID(zone));
REQUIRE(table != NULL);
REQUIRE(*table == NULL);
LOCK_ZONE(zone);
if (zone->ssutable != NULL)
dns_ssutable_attach(zone->ssutable, table);
UNLOCK_ZONE(zone);
} | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 161,865,058,024,219,360,000,000,000,000,000,000,000 | 10 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
static void qemu_input_queue_process(void *opaque)
{
struct QemuInputEventQueueHead *queue = opaque;
QemuInputEventQueue *item;
g_assert(!QTAILQ_EMPTY(queue));
item = QTAILQ_FIRST(queue);
g_assert(item->type == QEMU_INPUT_QUEUE_DELAY);
QTAILQ_REMOVE(queue, item, node);
g_free(item);
wh... | 1 | [
"CWE-772"
] | qemu | 77b0359bf414ad666d1714dc9888f1017c08e283 | 246,973,549,667,306,800,000,000,000,000,000,000,000 | 31 | input: Decrement queue count on kbd delay
Delays in the input layer are special cased input events. Every input
event is accounted for in a global intput queue count. The special cased
delays however did not get removed from the queue, leading to queue overruns
and thus silent key drops after typing quite a few charac... |
inline std::shared_ptr<Ope> Reference::get_core_operator() const {
return rule_->holder_;
} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 206,834,927,845,768,640,000,000,000,000,000,000,000 | 3 | Fix #122 |
static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
#define BitSet(byte,bit) (((byte) & (bit)) == (bit))
#define LSBFirstOrder(x,y) (((y) << 8) | (x))
Image
*image,
*meta_image;
int
number_extensionss=0;
MagickBooleanType
status;
RectangleInfo
page;
re... | 0 | [
"CWE-200"
] | ImageMagick | 9fd10cf630832b36a588c1545d8736539b2f1fb5 | 93,239,256,134,657,190,000,000,000,000,000,000,000 | 448 | https://github.com/ImageMagick/ImageMagick/issues/592 |
int proc_remount(struct super_block *sb, int *flags, char *data)
{
struct pid_namespace *pid = sb->s_fs_info;
sync_filesystem(sb);
return !proc_parse_options(data, pid);
} | 0 | [
"CWE-119"
] | linux | e54ad7f1ee263ffa5a2de9c609d58dfa27b21cd9 | 55,564,966,400,184,060,000,000,000,000,000,000,000 | 7 | proc: prevent stacking filesystems on top
This prevents stacking filesystems (ecryptfs and overlayfs) from using
procfs as lower filesystem. There is too much magic going on inside
procfs, and there is no good reason to stack stuff on top of procfs.
(For example, procfs does access checks in VFS open handlers, and
e... |
static int setup_microhttpd_socket(RemoteServer *s,
const char *address,
const char *key,
const char *cert,
const char *trust) {
int fd;
fd = make_socket_fd(LOG_DE... | 0 | [
"CWE-770"
] | systemd | ef4d6abe7c7fab6cbff975b32e76b09feee56074 | 28,808,380,164,543,280,000,000,000,000,000,000,000 | 13 | journal-remote: set a limit on the number of fields in a message
Existing use of E2BIG is replaced with ENOBUFS (entry too long), and E2BIG is
reused for the new error condition (too many fields).
This matches the change done for systemd-journald, hence forming the second
part of the fix for CVE-2018-16865
(https://b... |
static void finish_commit(struct commit *commit, void *data)
{
if (commit->parents) {
free_commit_list(commit->parents);
commit->parents = NULL;
}
free_commit_buffer(commit);
} | 0 | [
"CWE-119",
"CWE-787"
] | git | de1e67d0703894cb6ea782e36abb63976ab07e60 | 48,434,932,436,613,420,000,000,000,000,000,000,000 | 8 | list-objects: pass full pathname to callbacks
When we find a blob at "a/b/c", we currently pass this to
our show_object_fn callbacks as two components: "a/b/" and
"c". Callbacks which want the full value then call
path_name(), which concatenates the two. But this is an
inefficient interface; the path is a strbuf, and ... |
static bmp_info_t *bmp_getinfo(jas_stream_t *in)
{
bmp_info_t *info;
int i;
bmp_palent_t *palent;
if (!(info = bmp_info_create())) {
return 0;
}
if (bmp_getint32(in, &info->len) || info->len != 40 ||
bmp_getint32(in, &info->width) || bmp_getint32(in, &info->height) ||
bmp_getint16(in, &info->numplanes) ... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 236,489,827,692,948,450,000,000,000,000,000,000,000 | 64 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
GF_Err gf_isom_set_inplace_padding(GF_ISOFile *file, u32 padding)
{
if (!file) return GF_BAD_PARAM;
file->padding = padding;
return GF_OK;
} | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 332,748,863,235,768,100,000,000,000,000,000,000,000 | 6 | fixed #1706 |
njs_generate_name(njs_vm_t *vm, njs_generator_t *generator,
njs_parser_node_t *node)
{
njs_int_t ret;
njs_variable_t *var;
njs_parser_scope_t *scope;
njs_vmcode_variable_t *variable;
njs_vmcode_function_copy_t *copy;
var = njs_variable_referenc... | 0 | [
"CWE-703",
"CWE-754"
] | njs | 404553896792b8f5f429dc8852d15784a59d8d3e | 80,941,545,691,424,340,000,000,000,000,000,000,000 | 42 | Fixed break instruction in a try-catch block.
Previously, JUMP offset for a break instruction inside a try-catch
block was not set to a correct offset during code generation
when a return instruction was present in inner try-catch block.
The fix is to update the JUMP offset appropriately.
This closes #553 issue on G... |
static int fuse_notify_delete(struct fuse_conn *fc, unsigned int size,
struct fuse_copy_state *cs)
{
struct fuse_notify_delete_out outarg;
int err = -ENOMEM;
char *buf;
struct qstr name;
buf = kzalloc(FUSE_NAME_MAX + 1, GFP_KERNEL);
if (!buf)
goto err;
err = -EINVAL;
if (size < sizeof(outarg))
go... | 0 | [
"CWE-416"
] | linux | 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb | 20,190,986,706,717,061,000,000,000,000,000,000,000 | 50 | fs: prevent page refcount overflow in pipe_buf_get
Change pipe_buf_get() to return a bool indicating whether it succeeded
in raising the refcount of the page (if the thing in the pipe is a page).
This removes another mechanism for overflowing the page refcount. All
callers converted to handle a failure.
Reported-by:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.