func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
AP_DECLARE(int) ap_run_sub_req(request_rec *r)
{
int retval = DECLINED;
/* Run the quick handler if the subrequest is not a dirent or file
* subrequest
*/
if (!(r->filename && r->finfo.filetype != APR_NOFILE)) {
retval = ap_run_quick_handler(r, 0);
}
if (retval != OK) {
ret... | 0 | [] | httpd | eb986059aa5aa0b6c1d52714ea83e3dd758afdd1 | 74,041,600,808,381,090,000,000,000,000,000,000,000 | 18 | Merge r1889036 from trunk:
legacy default slash-matching behavior w/ 'MergeSlashes OFF'
Submitted By: Ruediger Pluem
Reviewed By: covener, rpluem, ylavic
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1889038 13f79535-47bb-0310-9956-ffa450edef68 |
TORRENT_TEST(parse_int_overflow)
{
char b[] = "9223372036854775808:";
boost::int64_t val = 0;
bdecode_errors::error_code_enum ec;
char const* e = parse_int(b, b + sizeof(b)-1, ':', val, ec);
TEST_EQUAL(ec, bdecode_errors::overflow);
TEST_EQUAL(e, b + 18);
} | 0 | [
"CWE-125"
] | libtorrent | ec30a5e9ec703afb8abefba757c6d401303b53db | 112,579,358,678,794,980,000,000,000,000,000,000,000 | 9 | fix out-of-bounds read in bdecode
Fixes #2099 |
every_finfo(proto_node *node, gpointer data)
{
field_info *fi = PNODE_FINFO(node);
if (fi && fi->hfinfo) {
g_ptr_array_add(((ffdata_t*)data)->array, fi);
}
/* Don't stop traversing. */
return FALSE;
} | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 237,758,256,602,443,730,000,000,000,000,000,000,000 | 10 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
xmlParseSystemLiteral(xmlParserCtxtPtr ctxt) {
xmlChar *buf = NULL;
int len = 0;
int size = XML_PARSER_BUFFER_SIZE;
int cur, l;
xmlChar stop;
int state = ctxt->instate;
int count = 0;
SHRINK;
if (RAW == '"') {
NEXT;
stop = '"';
} else if (RAW == '\'') {
NEXT;
s... | 0 | [
"CWE-776"
] | libxml2 | 8598060bacada41a0eb09d95c97744ff4e428f8e | 44,700,666,665,292,540,000,000,000,000,000,000,000 | 77 | Patch for security issue CVE-2021-3541
This is relapted to parameter entities expansion and following
the line of the billion laugh attack. Somehow in that path the
counting of parameters was missed and the normal algorithm based
on entities "density" was useless. |
static int unix_set_peek_off(struct sock *sk, int val)
{
struct unix_sock *u = unix_sk(sk);
if (mutex_lock_interruptible(&u->iolock))
return -EINTR;
sk->sk_peek_off = val;
mutex_unlock(&u->iolock);
return 0;
} | 0 | [
"CWE-362"
] | linux | cbcf01128d0a92e131bd09f1688fe032480b65ca | 7,194,975,118,953,644,000,000,000,000,000,000,000 | 12 | af_unix: fix garbage collect vs MSG_PEEK
unix_gc() assumes that candidate sockets can never gain an external
reference (i.e. be installed into an fd) while the unix_gc_lock is
held. Except for MSG_PEEK this is guaranteed by modifying inflight
count under the unix_gc_lock.
MSG_PEEK does not touch any variable protec... |
static struct sljit_jump *jump_if_utf_char_start(struct sljit_compiler *compiler, sljit_s32 reg)
{
#if PCRE2_CODE_UNIT_WIDTH == 8
OP2(SLJIT_AND, reg, 0, reg, 0, SLJIT_IMM, 0xc0);
return CMP(SLJIT_NOT_EQUAL, reg, 0, SLJIT_IMM, 0x80);
#elif PCRE2_CODE_UNIT_WIDTH == 16
OP2(SLJIT_AND, reg, 0, reg, 0, SLJIT_IMM, 0xfc00);
re... | 0 | [
"CWE-125"
] | php-src | 8947fd9e9fdce87cd6c59817b1db58e789538fe9 | 320,695,530,168,071,720,000,000,000,000,000,000,000 | 12 | Fix #78338: Array cross-border reading in PCRE
We backport r1092 from pcre2. |
static GF_Err gf_crypt_file_ex(GF_ISOFile *mp4, const char *drm_file, const char *dst_file, Double interleave_time, const char *fragment_name, u32 fs_dump_flags)
{
char *szArgs=NULL;
char an_arg[100];
char *arg_dst=NULL;
u32 progress = (u32) -1;
GF_Filter *src, *dst, *crypt;
GF_FilterSession *fsess;
GF_Err e = G... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 94,694,864,215,026,830,000,000,000,000,000,000,000 | 103 | fixed #2138 |
static inline __maybe_unused void h2s_error(struct h2s *h2s, enum h2_err err)
{
if (h2s->id && h2s->st < H2_SS_ERROR) {
h2s->errcode = err;
h2s->st = H2_SS_ERROR;
if (h2s->cs)
cs_set_error(h2s->cs);
}
} | 0 | [
"CWE-125"
] | haproxy | a01f45e3ced23c799f6e78b5efdbd32198a75354 | 241,981,700,238,365,300,000,000,000,000,000,000,000 | 9 | BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used
Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder
when the PRIORITY flag is present. A check is missing to ensure the 5
extra bytes needed with this flag are actually part of the frame. As per
RFC7540#4.2, let's return a connec... |
void ext2_write_super(struct super_block *sb)
{
if (!(sb->s_flags & MS_RDONLY))
ext2_sync_fs(sb, 1);
} | 0 | [
"CWE-241",
"CWE-19"
] | linux | be0726d33cb8f411945884664924bed3cb8c70ee | 106,603,257,637,070,650,000,000,000,000,000,000,000 | 5 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
sti... |
static inline pte_t pte_mkspecial(pte_t pte)
{
pte_val(pte) |= PTE_SPECIAL;
return pte;
} | 0 | [
"CWE-241",
"CWE-19"
] | linux | 5a0fdfada3a2aa50d7b947a2e958bf00cbe0d830 | 3,073,666,845,348,327,400,000,000,000,000,000,000 | 5 | Revert "arm64: Introduce execute-only page access permissions"
This reverts commit bc07c2c6e9ed125d362af0214b6313dca180cb08.
While the aim is increased security for --x memory maps, it does not
protect against kernel level reads. Until SECCOMP is implemented for
arm64, revert this patch to avoid giving a false idea o... |
nbd_create (void)
{
static _Atomic int hnums = 1;
struct nbd_handle *h;
const char *s;
nbd_internal_set_error_context ("nbd_create");
h = calloc (1, sizeof *h);
if (h == NULL) {
set_error (errno, "calloc");
goto error1;
}
if (asprintf (&h->hname, "nbd%d", hnums++) == -1) {
set_error (errn... | 1 | [
"CWE-252"
] | libnbd | c79706af4e7475bf58861a143b77b77a54e7a1cd | 185,271,784,026,597,700,000,000,000,000,000,000,000 | 67 | api: Add new API nbd_set_pread_initialize()
The recent patch series for CVE-2022-0485 demonstrated that when
applications using libnbd are not careful about error checking, the
difference on whether a data leak is at least sanitized (all zeroes,
partial reads, or data leftover from a prior read) vs. a dangerous
inform... |
void updateUserCredentials(OperationContext* txn,
const StringData& sourceDB,
const BSONObj& userDoc) {
// Skip users in $external, SERVER-18475
if (userDoc["db"].String() == "$external") {
return;
}
BSONElement credentialsElement = userDoc[... | 0 | [
"CWE-613"
] | mongo | 64d8e9e1b12d16b54d6a592bae8110226c491b4e | 338,575,732,883,259,660,000,000,000,000,000,000,000 | 49 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
String *Item_func_concat_ws::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
char tmp_str_buff[10];
String tmp_sep_str(tmp_str_buff, sizeof(tmp_str_buff),default_charset_info),
*sep_str, *res, *res2,*use_as_buff;
uint i;
bool is_const= 0;
null_value=0;
if (!(sep_str= args[0]->val_str(&tmp_sep_st... | 0 | [] | mysql-server | 475dcde2c7856dd0050b967099a86c087d94f32f | 75,272,489,322,344,560,000,000,000,000,000,000,000 | 150 | Bug#27099029: UNLIMITED LENGTH OF THE PASSWORD
Description: my_crypt_genhash depends on the length of
plaintext password. Longer the password,
more is the time required to produce the
transformation. An unusually large password
may consume considerable amount of time... |
int wc_DsaKeyToDer(DsaKey* key, byte* output, word32 inLen)
{
if (!key || !output)
return BAD_FUNC_ARG;
if (key->type != DSA_PRIVATE)
return BAD_FUNC_ARG;
return DsaKeyIntsToDer(key, output, inLen, DSA_INTS, 1);
} | 0 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 9,298,838,126,357,703,000,000,000,000,000,000,000 | 10 | OCSP: improve handling of OCSP no check extension |
void CalendarRegressionTest::test4145158()
{
UErrorCode status = U_ZERO_ERROR;
GregorianCalendar *calendar = new GregorianCalendar(status);
if(status == U_USING_FALLBACK_WARNING || U_FAILURE(status)) {
dataerrln("Error creating calendar %s", u_errorName(status));
delete calendar;
return;
... | 0 | [
"CWE-190"
] | icu | 71dd84d4ffd6600a70e5bca56a22b957e6642bd4 | 276,749,276,801,562,340,000,000,000,000,000,000,000 | 26 | ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J
X-SVN-Rev: 40654 |
GC_API void * GC_CALL GC_clear_stack(void *arg)
{
# ifndef STACK_NOT_SCANNED
ptr_t sp = GC_approx_sp(); /* Hotter than actual sp */
# ifdef THREADS
word volatile dummy[SMALL_CLEAR_SIZE];
static unsigned random_no = 0;
/* Should be more random than it is ... */
... | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 298,680,045,679,006,380,000,000,000,000,000,000,000 | 75 | 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... |
static int do_decode(unsigned char *bytes, long nbytes,
const EXPECTED *expected, size_t expected_size,
const TEST_PACKAGE *package)
{
EXPECTED *enctst = NULL;
const unsigned char *start;
int ret = 0;
start = bytes;
enctst = package->d2i(NULL, &bytes, nbyte... | 0 | [
"CWE-476"
] | openssl | 22b88fc9c0e22545401c0b34d24843883ea73fec | 156,752,224,300,182,340,000,000,000,000,000,000,000 | 28 | Add a test for encoding/decoding using an invalid ASN.1 Template
If you have a CHOICE type that it must use explicit tagging - otherwise
the template is invalid. We add tests for this.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> |
static const char *cmd_debug_log_level(cmd_parms *cmd, void *_dcfg,
const char *p1)
{
directory_config *dcfg = (directory_config *)_dcfg;
dcfg->debuglog_level = atoi(p1);
if ((dcfg->debuglog_level >= 0)&&(dcfg->debuglog_level <= 9)) return NULL;
return apr_psprin... | 0 | [
"CWE-20",
"CWE-611"
] | ModSecurity | d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe | 152,357,992,980,174,430,000,000,000,000,000,000,000 | 10 | Added SecXmlExternalEntity |
static void pppoe_flush_dev(struct net_device *dev)
{
struct pppoe_net *pn;
int i;
pn = pppoe_pernet(dev_net(dev));
write_lock_bh(&pn->hash_lock);
for (i = 0; i < PPPOE_HASH_SIZE; i++) {
struct pppox_sock *po = pn->hash_table[i];
struct sock *sk;
while (po) {
while (po && po->pppoe_dev != dev) {
po ... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 217,468,787,136,561,630,000,000,000,000,000,000,000 | 57 | 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... |
static int __init checkreqprot_setup(char *str)
{
unsigned long checkreqprot;
if (!kstrtoul(str, 0, &checkreqprot)) {
selinux_checkreqprot_boot = checkreqprot ? 1 : 0;
if (checkreqprot)
pr_warn("SELinux: checkreqprot set to 1 via kernel parameter. This is deprecated and will be rejected in a future kernel re... | 0 | [
"CWE-349"
] | linux | fb73974172ffaaf57a7c42f35424d9aece1a5af6 | 250,427,833,203,059,200,000,000,000,000,000,000,000 | 11 | selinux: properly handle multiple messages in selinux_netlink_send()
Fix the SELinux netlink_send hook to properly handle multiple netlink
messages in a single sk_buff; each message is parsed and subject to
SELinux access control. Prior to this patch, SELinux only inspected
the first message in the sk_buff.
Cc: stab... |
ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in,
size_t inlen) {
const uint8_t *first = in, *last = in + inlen;
nghttp2_inbound_frame *iframe = &session->iframe;
size_t readlen;
ssize_t padlen;
int rv;
int busy = 0;
nghttp2_frame_hd cont_hd;
... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 149,821,467,364,494,320,000,000,000,000,000,000,000 | 1,402 | Add nghttp2_option_set_max_outbound_ack |
call_decode(struct rpc_task *task)
{
struct rpc_clnt *clnt = task->tk_client;
struct rpc_rqst *req = task->tk_rqstp;
kxdrdproc_t decode = task->tk_msg.rpc_proc->p_decode;
__be32 *p;
dprintk("RPC: %5u call_decode (status %d)\n",
task->tk_pid, task->tk_status);
if (task->tk_flags & RPC_CALL_MAJORSEEN) {
if ... | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 260,009,062,245,762,120,000,000,000,000,000,000,000 | 66 | 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... |
virtual void session_save_default(THD *thd, set_var *var) {} | 0 | [
"CWE-416"
] | server | c05fd700970ad45735caed3a6f9930d4ce19a3bd | 41,568,328,055,450,783,000,000,000,000,000,000,000 | 1 | MDEV-26323 use-after-poison issue of MariaDB server |
xml_end(void *userData, const char *name)
{
struct archive_read *a;
struct xar *xar;
a = (struct archive_read *)userData;
xar = (struct xar *)(a->format->data);
#if DEBUG
fprintf(stderr, "xml_end:[%s]\n", name);
#endif
switch (xar->xmlsts) {
case INIT:
break;
case XAR:
if (strcmp(name, "xar") == 0)
xar... | 0 | [
"CWE-125"
] | libarchive | fa7438a0ff4033e4741c807394a9af6207940d71 | 180,135,585,175,591,400,000,000,000,000,000,000,000 | 331 | Do something sensible for empty strings to make fuzzers happy. |
static float mxEndianFloat_Swap(float a)
{
#if defined(__GNUC__) || defined(__llvm__)
uint32_t result = __builtin_bswap32(*(uint32_t *)&a);
return *(float *)&result;
#else
float b;
txU1 *p1 = (txU1 *) &a, *p2 = (txU1 *) &b;
int i;
for (i = 0; i < 4; i++)
p2[i] = p1[3 - i];
return b;
#endif
} | 0 | [
"CWE-125"
] | moddable | 135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45 | 236,907,853,382,192,370,000,000,000,000,000,000,000 | 14 | XS: #896 |
unescape_html_in_place(char *s)
{
size_t sz = strlen(s) + 1;
size_t pos = 0;
char *s1;
dprintf("unescaping pos:%zd sz:%zd \"%s\"", pos, sz, s);
do {
s1 = strchrnul(&s[pos], '%');
if (s1[0] == '\0')
break;
dprintf("s1 is \"%s\"", s1);
if ((size_t)(s1 - s) < (size_t)(sz - 3)) {
int c;
c = (hexchar... | 0 | [
"CWE-787"
] | pesign | b879dda52f8122de697d145977c285fb0a022d76 | 167,455,489,448,632,100,000,000,000,000,000,000,000 | 26 | Handle NULL pwdata in cms_set_pw_data()
When 12f16710ee44ef64ddb044a3523c3c4c4d90039a rewrote this function, it
didn't handle the NULL pwdata invocation from daemon.c. This leads to a
explicit NULL dereference and crash on all attempts to daemonize pesign.
Signed-off-by: Robbie Harwood <rharwood@redhat.com> |
DEFUN (neighbor_activate,
neighbor_activate_cmd,
NEIGHBOR_CMD2 "activate",
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Enable the Address Family for this Neighbor\n")
{
struct peer *peer;
peer = peer_and_group_lookup_vty (vty, argv[0]);
if (! peer)
return CMD_WARNING;
peer_activate... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 288,430,930,356,769,070,000,000,000,000,000,000,000 | 17 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
static void FVTimer(FontView *fv, GEvent *event) {
if ( event->u.timer.timer==fv->pressed ) {
GEvent e;
GDrawGetPointerPosition(fv->v,&e);
if ( e.u.mouse.y<0 || e.u.mouse.y >= fv->height ) {
real dy = 0;
if ( e.u.mouse.y<0 )
dy = -1;
else if ( e.u.mouse.y>=fv->height )
dy = 1;
if ( fv->r... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 316,672,977,032,044,770,000,000,000,000,000,000,000 | 31 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
int drm_mode_getconnector(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
struct drm_mode_get_connector *out_resp = data;
struct drm_mode_object *obj;
struct drm_connector *connector;
struct drm_display_mode *mode;
int mode_count = 0;
int props_count = 0;
int encoders_count = 0;
int ret =... | 0 | [
"CWE-190",
"CWE-189"
] | linux | a5cd335165e31db9dbab636fd29895d41da55dd2 | 54,511,403,707,606,745,000,000,000,000,000,000,000 | 132 | drm: integer overflow in drm_mode_dirtyfb_ioctl()
There is a potential integer overflow in drm_mode_dirtyfb_ioctl()
if userspace passes in a large num_clips. The call to kmalloc would
allocate a small buffer, and the call to fb->funcs->dirty may result
in a memory corruption.
Reported-by: Haogang Chen <haogangchen@g... |
bool asn1_read_BOOLEAN_context(struct asn1_data *data, bool *v, int context)
{
uint8_t tmp = 0;
asn1_start_tag(data, ASN1_CONTEXT_SIMPLE(context));
asn1_read_uint8(data, &tmp);
if (tmp == 0xFF) {
*v = true;
} else {
*v = false;
}
asn1_end_tag(data);
return !data->has_error;
} | 1 | [
"CWE-399"
] | samba | 9d989c9dd7a5b92d0c5d65287935471b83b6e884 | 199,782,832,557,118,850,000,000,000,000,000,000,000 | 13 | CVE-2015-7540: lib: util: Check *every* asn1 return call and early return.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep... |
_asn1_type_set_config (asn1_node node)
{
asn1_node p, p2;
int move;
if (node == NULL)
return ASN1_ELEMENT_NOT_FOUND;
p = node;
move = DOWN;
while (!((p == node) && (move == UP)))
{
if (move != UP)
{
if (type_field (p->type) == ASN1_ETYPE_SET)
{
p2 = p->down;
while (p2... | 0 | [
"CWE-119"
] | libtasn1 | 5520704d075802df25ce4ffccc010ba1641bd484 | 106,356,533,589,321,200,000,000,000,000,000,000,000 | 57 | asn1_find_node: added safety check on asn1_find_node()
This prevents a stack overflow in asn1_find_node() which
is triggered by too long variable names in the definitions
files. That means that applications have to deliberately
pass a too long 'name' constant to asn1_write_value()
and friends. Reported by Jakub Jiras... |
R_API void r_core_anal_paths(RCore *core, ut64 from, ut64 to, bool followCalls, int followDepth, bool is_json) {
RAnalBlock *b0 = r_anal_bb_from_offset (core->anal, from);
RAnalBlock *b1 = r_anal_bb_from_offset (core->anal, to);
PJ *pj = NULL;
if (!b0) {
eprintf ("Cannot find basic block for 0x%08"PFMT64x"\n", fr... | 0 | [
"CWE-416"
] | radare2 | 10517e3ff0e609697eb8cde60ec8dc999ee5ea24 | 183,432,768,512,289,220,000,000,000,000,000,000,000 | 45 | aaef on arm/thumb switches causes uaf ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer: poc_uaf_r_reg_get |
fiber_check(mrb_state *mrb, mrb_value fib)
{
struct RFiber *f = fiber_ptr(fib);
mrb_assert(f->tt == MRB_TT_FIBER);
if (!f->cxt) {
mrb_raise(mrb, E_FIBER_ERROR, "uninitialized Fiber");
}
return f->cxt;
} | 0 | [
"CWE-476",
"CWE-703"
] | mruby | da48e7dbb20024c198493b8724adae1b842083aa | 211,599,789,158,875,600,000,000,000,000,000,000,000 | 10 | fiber.c: should pack 15+ arguments in an array. |
static int has_fsl_hypervisor(void)
{
struct device_node *node;
int ret;
node = of_find_node_by_path("/hypervisor");
if (!node)
return 0;
ret = of_find_property(node, "fsl,hv-version", NULL) != NULL;
of_node_put(node);
return ret;
} | 0 | [
"CWE-190"
] | linux | 6a024330650e24556b8a18cc654ad00cfecf6c6c | 38,866,369,738,948,637,000,000,000,000,000,000,000 | 15 | drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl
The "param.count" value is a u64 thatcomes from the user. The code
later in the function assumes that param.count is at least one and if
it's not then it leads to an Oops when we dereference the ZERO_SIZE_PTR.
Also the addition can have an integer over... |
void __init x86_64_start_reservations(char *real_mode_data)
{
/* version is always not zero if it is copied */
if (!boot_params.hdr.version)
copy_bootdata(__va(real_mode_data));
x86_early_init_platform_quirks();
switch (boot_params.hdr.hardware_subarch) {
case X86_SUBARCH_INTEL_MID:
x86_intel_mid_early_setup... | 0 | [
"CWE-703"
] | linux | 96e8fc5818686d4a1591bb6907e7fdb64ef29884 | 270,974,040,878,254,950,000,000,000,000,000,000,000 | 18 | x86/xen: Use clear_bss() for Xen PV guests
Instead of clearing the bss area in assembly code, use the clear_bss()
function.
This requires to pass the start_info address as parameter to
xen_start_kernel() in order to avoid the xen_start_info being zeroed
again.
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-of... |
static void put_pi_state(struct futex_pi_state *pi_state)
{
if (!pi_state)
return;
if (!atomic_dec_and_test(&pi_state->refcount))
return;
/*
* If pi_state->owner is NULL, the owner is most probably dying
* and has cleaned up the pi_state already
*/
if (pi_state->owner) {
raw_spin_lock_irq(&pi_state->o... | 0 | [
"CWE-416"
] | linux | 65d8fc777f6dcfee12785c057a6b57f679641c90 | 199,725,776,084,662,840,000,000,000,000,000,000,000 | 33 | futex: Remove requirement for lock_page() in get_futex_key()
When dealing with key handling for shared futexes, we can drastically reduce
the usage/need of the page lock. 1) For anonymous pages, the associated futex
object is the mm_struct which does not require the page lock. 2) For inode
based, keys, we can check un... |
inline void writeit(int f, void *buf, size_t len) {
ssize_t res;
while (len > 0) {
DEBUG("+");
if ((res = write(f, buf, len)) <= 0)
err("Send failed: %m");
len -= res;
buf += res;
}
} | 0 | [
"CWE-119"
] | nbd | 4ed24fe0d64c7cc9963c57b52cad1555ad7c6b60 | 72,386,531,866,710,080,000,000,000,000,000,000,000 | 10 | r134: CVE-2005-3534 |
test_util_find_str_at_start_of_line(void *ptr)
{
const char *long_string =
"hello world. hello world. hello hello. howdy.\n"
"hello hello world\n";
(void)ptr;
/* not-found case. */
tt_assert(! find_str_at_start_of_line(long_string, "fred"));
/* not-found case where haystack doesn't end with \n */
... | 0 | [] | tor | 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 | 36,070,962,802,219,085,000,000,000,000,000,000,000 | 24 | Fix assertion failure in tor_timegm.
Fixes bug 6811. |
static loff_t ext4_max_size(int blkbits, int has_huge_files)
{
loff_t res;
loff_t upper_limit = MAX_LFS_FILESIZE;
BUILD_BUG_ON(sizeof(blkcnt_t) < sizeof(u64));
if (!has_huge_files) {
upper_limit = (1LL << 32) - 1;
/* total blocks in file system block size */
upper_limit >>= (blkbits - 9);
upper_limit <<=... | 0 | [
"CWE-416",
"CWE-401"
] | linux | 4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a | 177,154,208,463,224,700,000,000,000,000,000,000,000 | 29 | ext4: add more paranoia checking in ext4_expand_extra_isize handling
It's possible to specify a non-zero s_want_extra_isize via debugging
option, and this can cause bad things(tm) to happen when using a file
system with an inode size of 128 bytes.
Add better checking when the file system is mounted, as well as when
w... |
R_API ut64 r_bin_java_do_nothing_calc_size(RBinJavaCPTypeObj *obj) {
return 0;
} | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 11,064,286,254,128,613,000,000,000,000,000,000,000 | 3 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
static int zlib_expand_block(COMP_CTX *ctx, unsigned char *out,
unsigned int olen, unsigned char *in, unsigned int ilen)
{
unsigned long l;
int i;
if (in[0])
{
l=olen;
i=zz_uncompress(out,&l,&(in[1]),(unsigned long)ilen-1);
if (i != Z_OK)
return(-1);
}
else
{
memcpy(out,&(in[1]),ilen-1);
l=ile... | 0 | [
"CWE-399"
] | openssl | 1b31b5ad560b16e2fe1cad54a755e3e6b5e778a3 | 162,633,503,378,913,820,000,000,000,000,000,000,000 | 24 | Modify compression code so it avoids using ex_data free functions. This
stops applications that call CRYPTO_free_all_ex_data() prematurely leaking
memory. |
static const struct nft_expr_type *nft_expr_type_get(struct net *net,
u8 family,
struct nlattr *nla)
{
const struct nft_expr_type *type;
if (nla == NULL)
return ERR_PTR(-EINVAL);
type = __nft_expr_type_get(family, nla);
if (type != NULL && try_module_get(type->owner))
return type;
lock... | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 111,503,569,810,477,920,000,000,000,000,000,000,000 | 27 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
size_t iov_iter_copy_from_user_atomic(struct page *page,
struct iov_iter *i, unsigned long offset, size_t bytes)
{
char *kaddr;
size_t copied;
kaddr = kmap_atomic(page);
if (likely(i->nr_segs == 1)) {
int left;
char __user *buf = i->iov->iov_base + i->iov_offset;
left = __copy_from_user_inatomic(kaddr + of... | 0 | [
"CWE-17"
] | linux | f0d1bec9d58d4c038d0ac958c9af82be6eb18045 | 82,128,385,457,287,770,000,000,000,000,000,000,000 | 20 | new helper: copy_page_from_iter()
parallel to copy_page_to_iter(). pipe_write() switched to it (and became
->write_iter()).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
bool agg_arg_charsets_for_comparison(CHARSET_INFO **cs, Item **a, Item **b)
{
DTCollation tmp;
if (tmp.set((*a)->collation, (*b)->collation, MY_COLL_CMP_CONV) ||
tmp.derivation == DERIVATION_NONE)
{
my_error(ER_CANT_AGGREGATE_2COLLATIONS,MYF(0),
(*a)->collation.collation->na... | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 25,617,252,509,431,300,000,000,000,000,000,000,000 | 22 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
void CLASS phase_one_flat_field (int is_float, int nc)
{
ushort head[8];
unsigned wide, high, y, x, c, rend, cend, row, col;
float *mrow, num, mult[4];
read_shorts (head, 8);
if (head[2] * head[3] * head[4] * head[5] == 0) return;
wide = head[2] / head[4] + (head[2] % head[4] != 0);
high = head[3] / head... | 0 | [
"CWE-129"
] | LibRaw | 89d065424f09b788f443734d44857289489ca9e2 | 84,640,161,232,040,150,000,000,000,000,000,000,000 | 52 | fixed two more problems found by fuzzer |
MagickExport void XConstrainWindowPosition(Display *display,
XWindowInfo *window_info)
{
int
limit;
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(display != (Display *) NULL);
assert(window_info != (XWindowInfo *) NULL);
limit=XDisplayWidth(display,window_info->screen)-window_info->... | 0 | [
"CWE-401"
] | ImageMagick6 | 13801f5d0bd7a6fdb119682d34946636afdb2629 | 317,758,321,463,487,300,000,000,000,000,000,000,000 | 22 | https://github.com/ImageMagick/ImageMagick/issues/1531 |
BlockEntry::Kind BlockGroup::GetKind() const { return kBlockGroup; } | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 137,218,675,435,259,580,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
TEST_F(RouterTest, DirectResponse) {
NiceMock<MockDirectResponseEntry> direct_response;
std::string route_name("route-test-name");
EXPECT_CALL(direct_response, routeName()).WillOnce(ReturnRef(route_name));
EXPECT_CALL(direct_response, responseCode()).WillRepeatedly(Return(Http::Code::OK));
EXPECT_CALL(direct_... | 0 | [
"CWE-703"
] | envoy | 18871dbfb168d3512a10c78dd267ff7c03f564c6 | 234,687,278,115,234,870,000,000,000,000,000,000,000 | 21 | [1.18] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
gdm_display_get_remote_hostname (GdmDisplay *self,
char **hostname,
GError **error)
{
GdmDisplayPrivate *priv;
g_return_val_if_fail (GDM_IS_DISPLAY (self), FALSE);
priv = gdm_display_get_instance_private (self);
... | 0 | [
"CWE-754"
] | gdm | 4e6e5335d29c039bed820c43bfd1c19cb62539ff | 334,602,291,467,170,500,000,000,000,000,000,000,000 | 15 | display: Use autoptr to handle errors in look for existing users
It will make things just cleaner |
static int vfio_pci_for_each_slot_or_bus(struct pci_dev *pdev,
int (*fn)(struct pci_dev *,
void *data), void *data,
bool slot)
{
struct vfio_pci_walk_info walk = {
.fn = fn, .data = data, .pdev = pdev, .slot = slot, .ret = 0,
};
pci_walk_bus(pdev->bus, vfio_pci_walk_wrapper, &walk);
return ... | 0 | [
"CWE-399",
"CWE-190"
] | linux | 05692d7005a364add85c6e25a6c4447ce08f913a | 125,724,950,199,325,980,000,000,000,000,000,000,000 | 13 | vfio/pci: Fix integer overflows, bitmask check
The VFIO_DEVICE_SET_IRQS ioctl did not sufficiently sanitize
user-supplied integers, potentially allowing memory corruption. This
patch adds appropriate integer overflow checks, checks the range bounds
for VFIO_IRQ_SET_DATA_NONE, and also verifies that only single element... |
bool ass_gaussian_blur(const BitmapEngine *engine, Bitmap *bm, double r2)
{
BlurMethod blur;
find_best_method(&blur, r2);
int w = bm->w, h = bm->h;
int offset = ((2 * (blur.prefilter + blur.filter) + 17) << blur.level) - 5;
int end_w = ((w + offset) & ~((1 << blur.level) - 1)) - 4;
int end_h = ... | 0 | [
"CWE-119",
"CWE-787"
] | libass | 08e754612019ed84d1db0d1fc4f5798248decd75 | 31,081,520,339,063,863,000,000,000,000,000,000,000 | 70 | Fix blur coefficient calculation buffer overflow
Found by fuzzer test case id:000082,sig:11,src:002579,op:havoc,rep:8.
Correctness should be checked, but this fixes the overflow for good. |
bgp_afi_safi_valid_indices (afi_t afi, safi_t *safi)
{
switch (afi)
{
case AFI_IP:
#ifdef HAVE_IPV6
case AFI_IP6:
#endif
switch (*safi)
{
/* BGP MPLS-labeled VPN SAFI isn't contigious with others, remap */
case SAFI_MPLS_LABELED_VPN:
*safi = SAFI... | 0 | [
"CWE-119"
] | quagga | 5861739f8c38bc36ea9955e5cb2be2bf2f482d70 | 133,835,574,423,052,650,000,000,000,000,000,000,000 | 23 | bgpd: Open option parse errors don't NOTIFY, resulting in abort & DoS
* bgp_packet.c: (bgp_open_receive) Errors from bgp_open_option_parse are
detected, and the code will stop processing the OPEN and return. However
it does so without calling bgp_notify_send to send a NOTIFY - which means
the peer FSM doesn't g... |
flatpak_dir_remote_has_ref (FlatpakDir *self,
const char *remote,
const char *ref)
{
g_autoptr(GError) local_error = NULL;
g_autoptr(FlatpakRemoteState) state = NULL;
state = flatpak_dir_get_remote_state_optional (self, remote, NULL, &local_error);
if (st... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 308,244,950,796,929,660,000,000,000,000,000,000,000 | 16 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
int sock_no_sendmsg(struct socket *sock, struct msghdr *m, size_t len)
{
return -EOPNOTSUPP;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | b98b0bc8c431e3ceb4b26b0dfc8db509518fb290 | 210,760,705,498,663,960,000,000,000,000,000,000,000 | 4 | net: avoid signed overflows for SO_{SND|RCV}BUFFORCE
CAP_NET_ADMIN users should not be allowed to set negative
sk_sndbuf or sk_rcvbuf values, as it can lead to various memory
corruptions, crashes, OOM...
Note that before commit 82981930125a ("net: cleanups in
sock_setsockopt()"), the bug was even more serious, since ... |
offset2bytes(int nr, char_u *buf)
{
int rem;
int b1, b2, b3, b4;
// Split the number in parts of base 255. We need to avoid NUL bytes.
b1 = nr % 255 + 1;
rem = nr / 255;
b2 = rem % 255 + 1;
rem = rem / 255;
b3 = rem % 255 + 1;
b4 = rem / 255 + 1;
if (b4 > 1 || b3 > 0x1... | 0 | [
"CWE-787"
] | vim | 7c824682d2028432ee082703ef0ab399867a089b | 176,327,099,409,858,140,000,000,000,000,000,000,000 | 38 | patch 8.2.4919: can add invalid bytes with :spellgood
Problem: Can add invalid bytes with :spellgood.
Solution: Check for a valid word string. |
TEST_F(StreamInfoImplTest, SetFrom) {
StreamInfoImpl s1(Http::Protocol::Http2, test_time_.timeSystem(), nullptr);
s1.addBytesReceived(1);
s1.downstreamTiming().onLastDownstreamRxByteReceived(test_time_.timeSystem());
#ifdef __clang__
#if defined(__linux__)
#if defined(__has_feature) && !(__has_feature(thread_sa... | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 331,034,099,885,220,100,000,000,000,000,000,000,000 | 27 | internal redirect: fix a lifetime bug (#785)
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
struct pipe_ctx *dcn20_acquire_idle_pipe_for_layer(
struct dc_state *state,
const struct resource_pool *pool,
struct dc_stream_state *stream)
{
struct resource_context *res_ctx = &state->res_ctx;
struct pipe_ctx *head_pipe = resource_get_head_pipe_for_stream(res_ctx, stream);
struct pipe_ctx *idle_pipe = find_... | 0 | [
"CWE-400",
"CWE-703",
"CWE-401"
] | linux | 055e547478a11a6360c7ce05e2afc3e366968a12 | 174,049,241,204,819,260,000,000,000,000,000,000,000 | 26 | drm/amd/display: memory leak
In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated
clk_src needs release.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
ConnectionManagerImpl::ActiveStream::commonEncodePrefix(
ActiveStreamEncoderFilter* filter, bool end_stream,
FilterIterationStartState filter_iteration_start_state) {
// Only do base state setting on the initial call. Subsequent calls for filtering do not touch
// the base state.
if (filter == nullptr) {
... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 282,729,497,735,853,100,000,000,000,000,000,000,000 | 19 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
void CalendarRegressionTest::test4092362() {
UErrorCode status = U_ZERO_ERROR;
GregorianCalendar *cal1 = new GregorianCalendar(1997, 10, 11, 10, 20, 40,status);
if (U_FAILURE(status)) {
dataerrln("Fail new GregorianCalendar: %s", u_errorName(status));
delete cal1;
return;
}
/... | 0 | [
"CWE-190"
] | icu | 71dd84d4ffd6600a70e5bca56a22b957e6642bd4 | 183,840,769,257,995,400,000,000,000,000,000,000,000 | 36 | ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J
X-SVN-Rev: 40654 |
ATExecReplicaIdentity(Relation rel, ReplicaIdentityStmt *stmt, LOCKMODE lockmode)
{
Oid indexOid;
Relation indexRel;
int key;
if (stmt->identity_type == REPLICA_IDENTITY_DEFAULT)
{
relation_mark_replica_identity(rel, stmt->identity_type, InvalidOid, true);
return;
}
else if (stmt->identity_type == REPLI... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 113,971,678,619,653,850,000,000,000,000,000,000,000 | 103 | 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 ssize_t trace_store(struct kmem_cache *s, const char *buf,
size_t length)
{
s->flags &= ~SLAB_TRACE;
if (buf[0] == '1')
s->flags |= SLAB_TRACE;
return length;
} | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 153,074,182,054,975,820,000,000,000,000,000,000,000 | 8 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
p11_rpc_buffer_add_attribute (p11_buffer *buffer, const CK_ATTRIBUTE *attr)
{
unsigned char validity;
p11_rpc_attribute_serializer *serializer;
p11_rpc_value_type value_type;
/* The attribute type */
if (attr->type > UINT32_MAX) {
p11_buffer_fail (buffer);
return;
}
p11_rpc_buffer_add_uint32 (buffer, attr->... | 0 | [
"CWE-787"
] | p11-kit | 2617f3ef888e103324a28811886b99ed0a56346d | 303,228,933,643,304,650,000,000,000,000,000,000,000 | 34 | Check attribute length against buffer size
If an attribute's length does not match the length of the byte array
inside it, one length was used for allocation, and the other was used
for memcpy. This additional check will instead return an error on
malformed messages. |
static int aes_ocb_cleanup(EVP_CIPHER_CTX *c)
{
EVP_AES_OCB_CTX *octx = EVP_C_DATA(EVP_AES_OCB_CTX,c);
CRYPTO_ocb128_cleanup(&octx->ocb);
return 1;
} | 0 | [
"CWE-125"
] | openssl | 2198b3a55de681e1f3c23edb0586afe13f438051 | 286,826,786,823,139,000,000,000,000,000,000,000,000 | 6 | crypto/evp: harden AEAD ciphers.
Originally a crash in 32-bit build was reported CHACHA20-POLY1305
cipher. The crash is triggered by truncated packet and is result
of excessive hashing to the edge of accessible memory. Since hash
operation is read-only it is not considered to be exploitable
beyond a DoS condition. Oth... |
MONGO_EXPORT double bson_iterator_double( const bson_iterator *i ) {
switch ( bson_iterator_type( i ) ) {
case BSON_INT:
return bson_iterator_int_raw( i );
case BSON_LONG:
return bson_iterator_long_raw( i );
case BSON_DOUBLE:
return bson_iterator_double_raw( i );
default:
... | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 31,247,577,959,462,597,000,000,000,000,000,000,000 | 12 | don't mix up int and size_t (first pass to fix that) |
void gf_void_del(void *p)
{
gf_free(p);
} | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 89,539,023,237,143,370,000,000,000,000,000,000,000 | 4 | fixed crashes for very long path - cf #1908 |
size_t Magick::Image::totalColors(void) const
{
size_t
colors;
GetPPException;
colors=GetNumberColors(constImage(),(FILE *) NULL,exceptionInfo);
ThrowImageException;
return colors;
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 300,400,085,385,410,970,000,000,000,000,000,000,000 | 10 | Added missing return to avoid use after free. |
bool operator <(const ARN& l, const ARN& r) {
return ((l.partition < r.partition) ||
(l.service < r.service) ||
(l.region < r.region) ||
(l.account < r.account) ||
(l.resource < r.resource));
} | 0 | [
"CWE-617"
] | ceph | b3118cabb8060a8cc6a01c4e8264cb18e7b1745a | 100,846,973,169,429,530,000,000,000,000,000,000,000 | 7 | rgw: Remove assertions in IAM Policy
A couple of them could be triggered by user input.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com> |
void ip6_datagram_recv_specific_ctl(struct sock *sk, struct msghdr *msg,
struct sk_buff *skb)
{
struct ipv6_pinfo *np = inet6_sk(sk);
struct inet6_skb_parm *opt = IP6CB(skb);
unsigned char *nh = skb_network_header(skb);
if (np->rxopt.bits.rxhlim) {
int hlim = ipv6_hdr(skb)->hop_limit;
put_cmsg(msg, SOL... | 0 | [
"CWE-416",
"CWE-284",
"CWE-264"
] | linux | 45f6fad84cc305103b28d73482b344d7f5b76f39 | 189,726,181,587,309,040,000,000,000,000,000,000,000 | 124 | ipv6: add complete rcu protection around np->opt
This patch addresses multiple problems :
UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions
while socket is not locked : Other threads can change np->opt
concurrently. Dmitry posted a syzkaller
(http://github.com/google/syzkaller) program desmonstrating
use-a... |
au_event_disable(char *what)
{
char_u *new_ei;
char_u *save_ei;
save_ei = vim_strsave(p_ei);
if (save_ei != NULL)
{
new_ei = vim_strnsave(p_ei, (int)(STRLEN(p_ei) + STRLEN(what)));
if (new_ei != NULL)
{
if (*what == ',' && *p_ei == NUL)
STRCPY(new_ei, what + 1);
else
STRCAT(new_ei,... | 0 | [
"CWE-200",
"CWE-668"
] | vim | 5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8 | 52,592,360,500,409,710,000,000,000,000,000,000,000 | 22 | patch 8.0.1263: others can read the swap file if a user is careless
Problem: Others can read the swap file if a user is careless with his
primary group.
Solution: If the group permission allows for reading but the world
permissions doesn't, make sure the group is right. |
Status BasicCommand::checkAuthForOperation(OperationContext* opCtx,
const std::string& dbname,
const BSONObj& cmdObj) const {
return checkAuthForCommand(opCtx->getClient(), dbname, cmdObj);
} | 0 | [
"CWE-20"
] | mongo | 722f06f3217c029ef9c50062c8cc775966fd7ead | 332,802,814,929,303,030,000,000,000,000,000,000,000 | 5 | SERVER-38275 ban find explain with UUID |
keydb_insert_keyblock (KEYDB_HANDLE hd, kbnode_t kb)
{
gpg_error_t err;
int idx;
if (!hd)
return gpg_error (GPG_ERR_INV_ARG);
keyblock_cache_clear ();
if (opt.dry_run)
return 0;
if (hd->found >= 0 && hd->found < hd->used)
idx = hd->found;
else if (hd->current >= 0 && hd->current < hd->used... | 0 | [
"CWE-416"
] | gnupg | f0f71a721ccd7ab9e40b8b6b028b59632c0cc648 | 301,912,077,426,098,600,000,000,000,000,000,000,000 | 57 | gpg: Prevent an invalid memory read using a garbled keyring.
* g10/keyring.c (keyring_get_keyblock): Whitelist allowed packet
types.
* g10/keydb.c (parse_keyblock_image): Ditto.
--
The keyring DB code did not reject packets which don't belong into a
keyring. If for example the keyblock contains a literal data packet... |
bool Sys_var_tx_isolation::session_update(THD *thd, set_var *var)
{
if (var->type == OPT_SESSION && Sys_var_enum::session_update(thd, var))
return TRUE;
if (var->type == OPT_DEFAULT || !thd->in_active_multi_stmt_transaction())
{
/*
Update the isolation level of the next transaction.
I.e. if on... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 137,183,939,823,157,090,000,000,000,000,000,000,000 | 23 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
int snd_interval_ranges(struct snd_interval *i, unsigned int count,
const struct snd_interval *ranges, unsigned int mask)
{
unsigned int k;
struct snd_interval range_union;
struct snd_interval range;
if (!count) {
snd_interval_none(i);
return -EINVAL;
}
snd_interval_any(&range_union);
range_union.min = U... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4 | 202,682,197,959,686,470,000,000,000,000,000,000,000 | 38 | ALSA: pcm : Call kill_fasync() in stream lock
Currently kill_fasync() is called outside the stream lock in
snd_pcm_period_elapsed(). This is potentially racy, since the stream
may get released even during the irq handler is running. Although
snd_pcm_release_substream() calls snd_pcm_drop(), this doesn't
guarantee th... |
static int uio_release(struct inode *inode, struct file *filep)
{
int ret = 0;
struct uio_listener *listener = filep->private_data;
struct uio_device *idev = listener->dev;
if (idev->info->release)
ret = idev->info->release(idev->info, inode);
module_put(idev->owner);
kfree(listener);
return ret;
} | 0 | [
"CWE-119",
"CWE-189",
"CWE-703"
] | linux | 7314e613d5ff9f0934f7a0f74ed7973b903315d1 | 254,760,710,854,324,050,000,000,000,000,000,000,000 | 13 | Fix a few incorrectly checked [io_]remap_pfn_range() calls
Nico Golde reports a few straggling uses of [io_]remap_pfn_range() that
really should use the vm_iomap_memory() helper. This trivially converts
two of them to the helper, and comments about why the third one really
needs to continue to use remap_pfn_range(), ... |
static void ide_nop_restart(void *opaque, int x, RunState y)
{
} | 0 | [
"CWE-189"
] | qemu | 940973ae0b45c9b6817bab8e4cf4df99a9ef83d7 | 139,680,341,359,196,370,000,000,000,000,000,000,000 | 3 | ide: Correct improper smart self test counter reset in ide core.
The SMART self test counter was incorrectly being reset to zero,
not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE:
* We would write off the beginning of a dynamically allocated buffer
* We forgot the SMART history
Fix this.
Signed-o... |
uint64_t xbzrle_mig_pages_transferred(void)
{
return acct_info.xbzrle_pages;
} | 0 | [
"CWE-20"
] | qemu | 0be839a2701369f669532ea5884c15bead1c6e08 | 179,648,797,742,897,300,000,000,000,000,000,000,000 | 4 | migration: fix parameter validation on ram load
During migration, the values read from migration stream during ram load
are not validated. Especially offset in host_from_stream_offset() and
also the length of the writes in the callers of said function.
To fix this, we need to make sure that the [offset, offset + leng... |
virtual ~TfFinder()
{
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 242,609,568,029,023,400,000,000,000,000,000,000,000 | 3 | 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 ... |
service_info *getServiceList(IXML_Node *node, service_info **end, char *URLBase)
{
IXML_Node *serviceList = NULL;
IXML_Node *current_service = NULL;
IXML_Node *UDN = NULL;
IXML_Node *serviceType = NULL;
IXML_Node *serviceId = NULL;
IXML_Node *SCPDURL = NULL;
IXML_Node *controlURL = NULL;
IXML_Node *eventURL = ... | 0 | [
"CWE-476"
] | pupnp | c805c1de1141cb22f74c0d94dd5664bda37398e0 | 311,685,646,137,547,630,000,000,000,000,000,000,000 | 142 | Fixes #177: NULL pointer dereference in FindServiceControlURLPath
Also fixes its dual bug in FindServiceEventURLPath. |
mono_custom_attrs_from_class (MonoClass *klass)
{
guint32 idx;
if (klass->generic_class)
klass = klass->generic_class->container_class;
if (klass->image->dynamic)
return lookup_custom_attr (klass->image, klass);
if (klass->byval_arg.type == MONO_TYPE_VAR || klass->byval_arg.type == MONO_TYPE_MVAR) {
idx = ... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 151,986,612,045,707,040,000,000,000,000,000,000,000 | 21 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
inline bool is_datetime() const
{
switch (field_type())
{
case MYSQL_TYPE_DATE:
case MYSQL_TYPE_DATETIME:
case MYSQL_TYPE_TIMESTAMP:
return TRUE;
default:
break;
}
return FALSE;
} | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 172,211,595,172,992,700,000,000,000,000,000,000,000 | 13 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
static int _open_and_activate_reencrypt_device(struct crypt_device *cd,
struct luks2_hdr *hdr,
int keyslot,
const char *name,
const char *passphrase,
size_t passphrase_size,
uint32_t flags)
{
bool dynamic_size;
crypt_reencrypt_info ri;
uint64_t minimal_size, device_size;
struct volume_key *vks = NULL;
int r ... | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 57,888,331,905,426,840,000,000,000,000,000,000,000 | 87 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
gdm_manager_handle_open_reauthentication_channel (GdmDBusManager *manager,
GDBusMethodInvocation *invocation,
const char *username)
{
GdmManager *self = GDM_MANAGER (manager);
cons... | 0 | [] | gdm | ff98b2817014684ae1acec78ff06f0f461a56a9f | 298,758,939,626,083,750,000,000,000,000,000,000,000 | 67 | manager: if falling back to X11 retry autologin
Right now, we get one shot to autologin. If it fails, we fall back to
the greeter. We should give it another go if the reason for the failure
was wayland fallback to X.
https://bugzilla.gnome.org/show_bug.cgi?id=780520 |
static void hash_cleanup(Hash* hash)
{
free(hash->head);
free(hash->val);
free(hash->chain);
free(hash->zeros);
free(hash->headz);
free(hash->chainz);
} | 0 | [
"CWE-401"
] | FreeRDP | 9fee4ae076b1ec97b97efb79ece08d1dab4df29a | 292,274,756,768,612,470,000,000,000,000,000,000,000 | 10 | Fixed #5645: realloc return handling |
static int mcryptd_hash_update_enqueue(struct ahash_request *req)
{
return mcryptd_hash_enqueue(req, mcryptd_hash_update);
} | 0 | [
"CWE-476",
"CWE-284"
] | linux | 48a992727d82cb7db076fa15d372178743b1f4cd | 15,971,088,614,321,226,000,000,000,000,000,000,000 | 4 | crypto: mcryptd - Check mcryptd algorithm compatibility
Algorithms not compatible with mcryptd could be spawned by mcryptd
with a direct crypto_alloc_tfm invocation using a "mcryptd(alg)" name
construct. This causes mcryptd to crash the kernel if an arbitrary
"alg" is incompatible and not intended to be used with mcr... |
static int create_riff_header (WavpackContext *wpc, int64_t total_samples, void *outbuffer)
{
int do_rf64 = 0, write_junk = 1;
ChunkHeader ds64hdr, datahdr, fmthdr;
char *outptr = outbuffer;
RiffChunkHeader riffhdr;
DS64Chunk ds64_chunk;
JunkChunk junkchunk;
WaveHeader wavhdr;
int64_t t... | 0 | [
"CWE-787"
] | WavPack | 89df160596132e3bd666322e1c20b2ebd4b92cd0 | 39,171,571,699,008,114,000,000,000,000,000,000,000 | 117 | issue #91: fix integer overflows resulting in buffer overruns and sanitize a few more encoding parameters for clarity |
static void nlmclnt_cancel_callback(struct rpc_task *task, void *data)
{
struct nlm_rqst *req = data;
u32 status = ntohl(req->a_res.status);
if (RPC_ASSASSINATED(task))
goto die;
if (task->tk_status < 0) {
dprintk("lockd: CANCEL call error %d, retrying.\n",
task->tk_status);
goto retry_cancel;
}
dpr... | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 48,821,594,707,054,350,000,000,000,000,000,000,000 | 42 | 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... |
void ha_partition::unlock_row()
{
DBUG_ENTER("ha_partition::unlock_row");
m_file[m_last_part]->unlock_row();
DBUG_VOID_RETURN;
} | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 270,791,827,120,222,000,000,000,000,000,000,000,000 | 6 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
static void NAttrClearFlag(ntfs_attr *na, FILE_ATTR_FLAGS flag)
{
if (na->type == AT_DATA && na->name == AT_UNNAMED)
na->ni->flags &= ~flag;
} | 0 | [
"CWE-703"
] | ntfs-3g | 60717a846deaaea47e50ce58872869f7bd1103b5 | 202,713,337,620,117,460,000,000,000,000,000,000,000 | 5 | Avoided allocating and reading an attribute beyond its full size
Before reading a full attribute value for internal use, its expected
length has been checked to be < 0x40000. However the allocated size
in the runlist may be much bigger as a consequence of a bug or malice.
To prevent malloc'ing excessive size, restrict... |
static void set_stream_out_varyings(MAYBE_UNUSED struct vrend_context *ctx,
int prog_id,
struct vrend_shader_info *sinfo)
{
struct pipe_stream_output_info *so = &sinfo->so_info;
char *varyings[PIPE_MAX_SHADER_OUTPUTS*2];
int j;
uint i, ... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 238,676,578,497,308,840,000,000,000,000,000,000,000 | 59 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
enum dc_status dce110_validate_global(
struct dc *dc,
struct dc_state *context)
{
if (!dce110_validate_surface_sets(context))
return DC_FAIL_SURFACE_VALIDATE;
return DC_OK;
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 104c307147ad379617472dd91a5bcb368d72bd6d | 59,958,898,599,037,940,000,000,000,000,000,000,000 | 9 | drm/amd/display: prevent memory leak
In dcn*_create_resource_pool the allocated memory should be released if
construct pool fails.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
int __init dmar_parse_one_rmrr(struct acpi_dmar_header *header, void *arg)
{
struct acpi_dmar_reserved_memory *rmrr;
int prot = DMA_PTE_READ|DMA_PTE_WRITE;
struct dmar_rmrr_unit *rmrru;
size_t length;
rmrru = kzalloc(sizeof(*rmrru), GFP_KERNEL);
if (!rmrru)
goto out;
rmrru->hdr = header;
rmrr = (struct acpi... | 0 | [] | linux | d8b8591054575f33237556c32762d54e30774d28 | 294,059,762,813,538,170,000,000,000,000,000,000,000 | 38 | iommu/vt-d: Disable ATS support on untrusted devices
Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted
devices") disables ATS support on the devices which have been marked
as untrusted. Unfortunately this is not enough to fix the DMA attack
vulnerabiltiies because IOMMU driver allows translated reques... |
static int __packet_rcv_vnet(const struct sk_buff *skb,
struct virtio_net_hdr *vnet_hdr)
{
*vnet_hdr = (const struct virtio_net_hdr) { 0 };
if (virtio_net_hdr_from_skb(skb, vnet_hdr, vio_le()))
BUG();
return 0;
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 84ac7260236a49c79eede91617700174c2c19b0c | 156,211,407,722,138,330,000,000,000,000,000,000,000 | 10 | packet: fix race condition in packet_set_ring
When packet_set_ring creates a ring buffer it will initialize a
struct timer_list if the packet version is TPACKET_V3. This value
can then be raced by a different thread calling setsockopt to
set the version to TPACKET_V1 before packet_set_ring has finished.
This leads to... |
std::unique_ptr<OperationPass<FuncOp>> CreateOptimizePass(
bool enable_canonicalization) {
return std::make_unique<OptimizePass>(enable_canonicalization);
} | 0 | [
"CWE-476",
"CWE-125"
] | tensorflow | d6b57f461b39fd1aa8c1b870f1b974aac3554955 | 241,521,710,541,555,670,000,000,000,000,000,000,000 | 4 | Prevent nullptr dereference in MLIR TFLite dialect/optimizer.
PiperOrigin-RevId: 387220762
Change-Id: Id136ef04bb3d36123b4685d316ae81a9ec924d6b |
void CIRCSock::PauseCap() { ++m_uCapPaused; } | 0 | [
"CWE-20",
"CWE-284"
] | znc | d22fef8620cdd87490754f607e7153979731c69d | 327,918,292,496,965,680,000,000,000,000,000,000,000 | 1 | Better cleanup lines coming from network.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. |
int llhttp__on_header_field_complete(llhttp_t* s, const char* p, const char* endp) {
int err;
CALLBACK_MAYBE(s, on_header_field_complete);
return err;
} | 0 | [
"CWE-444"
] | node | af488f8dc82d69847992ea1cd2f53dc8082b3b91 | 75,041,032,130,241,050,000,000,000,000,000,000,000 | 5 | deps: update llhttp to 6.0.4
Refs: https://hackerone.com/reports/1238099
Refs: https://hackerone.com/reports/1238709
Refs: https://github.com/nodejs-private/llhttp-private/pull/6
Refs: https://github.com/nodejs-private/llhttp-private/pull/5
CVE-ID: CVE-2021-22959
CVE-ID: CVE-2021-22960
PR-URL: https://github.com/node... |
static void i40e_vsi_free_tx_resources(struct i40e_vsi *vsi)
{
int i;
if (vsi->tx_rings) {
for (i = 0; i < vsi->num_queue_pairs; i++)
if (vsi->tx_rings[i] && vsi->tx_rings[i]->desc)
i40e_free_tx_resources(vsi->tx_rings[i]);
}
if (vsi->xdp_rings) {
for (i = 0; i < vsi->num_queue_pairs; i++)
if (vsi->... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 226,885,491,434,262,650,000,000,000,000,000,000,000 | 16 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
mono_method_is_valid_generic_instantiation (VerifyContext *ctx, MonoMethod *method)
{
MonoMethodInflated *gmethod = (MonoMethodInflated *)method;
MonoGenericInst *ginst = gmethod->context.method_inst;
MonoGenericContainer *gc = mono_method_get_generic_container (gmethod->declaring);
if (!gc) /*non-generic inflated ... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 281,864,439,185,126,000,000,000,000,000,000,000,000 | 12 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
void mspack_destroy_kwaj_decompressor(struct mskwaj_decompressor *base)
{
struct mskwaj_decompressor_p *self = (struct mskwaj_decompressor_p *) base;
if (self) {
struct mspack_system *sys = self->system;
sys->free(self);
}
} | 0 | [
"CWE-310",
"CWE-787"
] | libmspack | 0b0ef9344255ff5acfac6b7af09198ac9c9756c8 | 282,581,709,813,152,000,000,000,000,000,000,000,000 | 8 | kwaj_read_headers(): fix handling of non-terminated strings |
static int linear_iterate_devices(struct dm_target *ti,
iterate_devices_callout_fn fn, void *data)
{
struct linear_c *lc = ti->private;
return fn(ti, lc->dev, lc->start, ti->len, data);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | ec8013beddd717d1740cfefb1a9b900deef85462 | 153,824,916,713,674,230,000,000,000,000,000,000,000 | 7 | dm: do not forward ioctls from logical volumes to the underlying device
A logical volume can map to just part of underlying physical volume.
In this case, it must be treated like a partition.
Based on a patch from Alasdair G Kergon.
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: dm-devel@redhat.com
Signed-off-by: Paolo ... |
CachedQuery::CachedQuery(const std::string &res, unsigned int ttl) : data(res)
{
expires = ServerInstance->Time() + ttl;
} | 0 | [] | inspircd | 58c893e834ff20495d007709220881a3ff13f423 | 202,767,206,347,763,000,000,000,000,000,000,000,000 | 4 | Fixed infinite loop cauesd by invalid dns packets |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.