func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int rpmsg_send_offchannel_raw(struct rpmsg_device *rpdev,
u32 src, u32 dst,
void *data, int len, bool wait)
{
struct virtio_rpmsg_channel *vch = to_virtio_rpmsg_channel(rpdev);
struct virtproc_info *vrp = vch->vrp;
struct device *dev = &rpdev->dev;
struct scatterlist sg;
struct rpmsg_hdr *... | 0 | [
"CWE-415"
] | linux | 1680939e9ecf7764fba8689cfb3429c2fe2bb23c | 279,220,054,880,666,100,000,000,000,000,000,000,000 | 97 | rpmsg: virtio: Fix possible double free in rpmsg_virtio_add_ctrl_dev()
vch will be free in virtio_rpmsg_release_device() when
rpmsg_ctrldev_register_device() fails. There is no need to call
kfree() again.
Fixes: c486682ae1e2 ("rpmsg: virtio: Register the rpmsg_char device")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com... |
XML_GetCurrentByteCount(XML_Parser parser)
{
if (eventEndPtr && eventPtr)
return (int)(eventEndPtr - eventPtr);
return 0;
} | 0 | [
"CWE-119"
] | libexpat | ba0f9c3b40c264b8dd392e02a7a060a8fa54f032 | 5,274,780,931,603,550,600,000,000,000,000,000,000 | 6 | CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings
https://sourceforge.net/p/expat/bugs/528/ |
static int copyTruncate(const char *currLog, const char *saveLog, const struct stat *sb,
const struct logInfo *log, int skip_copy)
{
int rc = 1;
int fdcurr = -1, fdsave = -1;
message(MESS_DEBUG, "%scopying %s to %s\n", skip_copy ? "skip " : "", currLog, saveLog);
if (!debug) {
... | 0 | [
"CWE-732"
] | logrotate | 1f76a381e2caa0603ae3dbc51ed0f1aa0d6658b9 | 281,699,301,330,177,700,000,000,000,000,000,000,000 | 80 | skip locking if state file is world-readable
Fixes: CVE-2022-1348 - potential DoS from unprivileged users via the state file
Bug: https://bugzilla.redhat.com/CVE-2022-1348 |
bash_backward_kill_shellword (count, key)
int count, key;
{
int p;
if (count < 0)
return (bash_kill_shellword (-count, key));
p = rl_point;
bash_backward_shellword (count, key);
if (rl_point != p)
rl_kill_text (p, rl_point);
if (rl_editing_mode == 1) /* 1 == emacs_mode */
rl_mark = rl_p... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 296,674,100,855,334,740,000,000,000,000,000,000,000 | 19 | Bash-4.4 patch 7 |
ves_icall_System_Reflection_Assembly_get_location (MonoReflectionAssembly *assembly)
{
MonoDomain *domain = mono_object_domain (assembly);
MonoString *res;
MONO_ARCH_SAVE_REGS;
res = mono_string_new (domain, mono_image_get_filename (assembly->assembly->image));
return res;
} | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 168,057,515,584,081,960,000,000,000,000,000,000,000 | 11 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
void blosc_destroy(void) {
/* Return if Blosc is not initialized */
if (!g_initlib) return;
g_initlib = 0;
release_threadpool(g_global_context);
if (g_global_context->serial_context != NULL) {
free_thread_context(g_global_context->serial_context);
}
my_free(g_global_context);
pthread_mutex_destroy(... | 0 | [
"CWE-787"
] | c-blosc2 | c4c6470e88210afc95262c8b9fcc27e30ca043ee | 4,924,168,554,629,193,000,000,000,000,000,000,000 | 12 | Fixed asan heap buffer overflow when not enough space to write compressed block size. |
ldbm_config_search_entry_callback(Slapi_PBlock *pb __attribute__((unused)),
Slapi_Entry *e,
Slapi_Entry *entryAfter __attribute__((unused)),
int *returncode,
char *returntext,
... | 0 | [
"CWE-399",
"CWE-203"
] | 389-ds-base | cc0f69283abc082488824702dae485b8eae938bc | 281,728,109,873,610,200,000,000,000,000,000,000,000 | 58 | Issue 4480 - Unexpected info returned to ldap request (#4491)
Bug description:
If the bind entry does not exist, the bind result info
reports that 'No such entry'. It should not give any
information if the target entry exists or not
Fix description:
Does not return any additional information d... |
static void core_pmu_enable_event(struct perf_event *event)
{
if (!event->attr.exclude_host)
x86_pmu_enable_event(event);
} | 0 | [
"CWE-20",
"CWE-401"
] | linux | f1923820c447e986a9da0fc6bf60c1dccdf0408e | 285,309,873,734,524,660,000,000,000,000,000,000,000 | 5 | perf/x86: Fix offcore_rsp valid mask for SNB/IVB
The valid mask for both offcore_response_0 and
offcore_response_1 was wrong for SNB/SNB-EP,
IVB/IVB-EP. It was possible to write to
reserved bit and cause a GP fault crashing
the kernel.
This patch fixes the problem by correctly marking the
reserved bits in the valid m... |
xmlSchemaXPathPop(xmlSchemaValidCtxtPtr vctxt)
{
xmlSchemaIDCStateObjPtr sto;
int res;
if (vctxt->xpathStates == NULL)
return(0);
sto = vctxt->xpathStates;
do {
res = xmlStreamPop((xmlStreamCtxtPtr) sto->xpathCtxt);
if (res == -1)
return (-1);
sto = sto->next;
} while (sto != NULL);
... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 64,307,783,321,134,210,000,000,000,000,000,000,000 | 16 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
static unsigned long mmap_rnd(void)
{
unsigned long rnd = 0;
if (current->flags & PF_RANDOMIZE)
rnd = (long)get_random_int() & STACK_RND_MASK;
return rnd << PAGE_SHIFT;
} | 0 | [] | linux | d6c763afab142a85e4770b4bc2a5f40f256d5c5d | 272,777,512,012,694,460,000,000,000,000,000,000,000 | 9 | arm64/mm: Remove hack in mmap randomize layout
Since commit 8a0a9bd4db63 ('random: make get_random_int() more
random'), get_random_int() returns a random value for each call,
so comment and hack introduced in mmap_rnd() as part of commit
1d18c47c735e ('arm64: MMU fault handling and page table management')
are incorrec... |
time_t imap_parse_date (char *s)
{
struct tm t;
time_t tz;
t.tm_mday = (s[0] == ' '? s[1] - '0' : (s[0] - '0') * 10 + (s[1] - '0'));
s += 2;
if (*s != '-')
return 0;
s++;
t.tm_mon = mutt_check_month (s);
s += 3;
if (*s != '-')
return 0;
s++;
t.tm_year = (s[0] - '0') * 1000 + (s[1] - '0') ... | 0 | [
"CWE-78"
] | mutt | 185152818541f5cdc059cbff3f3e8b654fc27c1d | 249,422,652,262,748,470,000,000,000,000,000,000,000 | 46 | Properly quote IMAP mailbox names when (un)subscribing.
When handling automatic subscription (via $imap_check_subscribed), or
manual subscribe/unsubscribe commands, mutt generating a "mailboxes"
command but failed to properly escape backquotes.
Thanks to Jeriko One for the detailed bug report and patch, which this
co... |
size_t size() const { return set_copy_.size(); } | 0 | [
"CWE-476",
"CWE-908"
] | tensorflow | 237822b59fc504dda2c564787f5d3ad9c4aa62d9 | 78,802,652,628,770,630,000,000,000,000,000,000,000 | 1 | Fix tf.compat.v1.placeholder_with_default vulnerability with quantized types.
When iterating through the tensor to extract shape values, an underlying missing kernel
(`StridedSlice` for quantized types) causes an error, which then results in a `nullptr`
being passed to `ParseDimensionValue()`, causing a segfault.
The... |
int mp_unpack_limit(lua_State *L) {
int limit = luaL_checkinteger(L, 2);
int offset = luaL_optinteger(L, 3, 0);
/* Variable pop because offset may not exist */
lua_pop(L, lua_gettop(L)-1);
return mp_unpack_full(L, limit, offset);
} | 0 | [
"CWE-119",
"CWE-787"
] | redis | 52a00201fca331217c3b4b8b634f6a0f57d6b7d3 | 214,952,907,710,538,500,000,000,000,000,000,000,000 | 8 | Security: fix Lua cmsgpack library stack overflow.
During an auditing effort, the Apple Vulnerability Research team discovered
a critical Redis security issue affecting the Lua scripting part of Redis.
-- Description of the problem
Several years ago I merged a pull request including many small changes at
the Lua Msg... |
static int decode_open_downgrade(struct xdr_stream *xdr, struct nfs_closeres *res)
{
int status;
status = decode_op_hdr(xdr, OP_OPEN_DOWNGRADE);
if (status != -EIO)
nfs_increment_open_seqid(status, res->seqid);
if (!status)
status = decode_open_stateid(xdr, &res->stateid);
return status;
} | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 230,907,741,292,039,800,000,000,000,000,000,000,000 | 11 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
int vt_get_kbd_mode_bit(int console, int bit)
{
struct kbd_struct *kb = kbd_table + console;
return vc_kbd_mode(kb, bit);
} | 0 | [
"CWE-416"
] | linux | 6ca03f90527e499dd5e32d6522909e2ad390896b | 282,507,897,598,800,730,000,000,000,000,000,000,000 | 5 | vt: keyboard, simplify vt_kdgkbsent
Use 'strlen' of the string, add one for NUL terminator and simply do
'copy_to_user' instead of the explicit 'for' loop. This makes the
KDGKBSENT case more compact.
The only thing we need to take care about is NULL 'func_table[i]'. Use
an empty string in that case.
The original che... |
int isdn_msncmp( const char * msn1, const char * msn2 )
{
char TmpMsn1[ ISDN_MSNLEN ];
char TmpMsn2[ ISDN_MSNLEN ];
char *p;
for ( p = TmpMsn1; *msn1 && *msn1 != ':'; ) // Strip off a SPID
*p++ = *msn1++;
*p = '\0';
for ( p = TmpMsn2; *msn2 && *msn2 != ':'; ) // Strip off a SPID
*p++ = *msn2++;
*p = '\0'... | 0 | [
"CWE-119"
] | linux-2.6 | eafe1aa37e6ec2d56f14732b5240c4dd09f0613a | 182,656,726,716,963,500,000,000,000,000,000,000,000 | 16 | I4L: fix isdn_ioctl memory overrun vulnerability
Fix possible memory overrun issue in the isdn ioctl code.
Found by ADLAB <adlab@venustech.com.cn>
Signed-off-by: Karsten Keil <kkeil@suse.de>
Cc: ADLAB <adlab@venustech.com.cn>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off... |
ImageRGBA::~ImageRGBA()
{
} | 0 | [
"CWE-189"
] | gnash | bb4dc77eecb6ed1b967e3ecbce3dac6c5e6f1527 | 285,537,526,758,055,530,000,000,000,000,000,000,000 | 3 | Fix crash in GnashImage.cpp |
void free_used_memory()
{
uint i;
// Do not use DBUG_ENTER("free_used_memory"); here, see below.
if (connections)
close_connections();
close_files();
my_hash_free(&var_hash);
for (i= 0 ; i < q_lines.elements ; i++)
{
struct st_command **q= dynamic_element(&q_lines, i, struct st_command**);
m... | 0 | [
"CWE-295"
] | mysql-server | b3e9211e48a3fb586e88b0270a175d2348935424 | 293,091,119,651,620,670,000,000,000,000,000,000,000 | 45 | WL#9072: Backport WL#8785 to 5.5 |
parser_module_append_export_name (parser_context_t *context_p) /**< parser context */
{
if (!(context_p->status_flags & PARSER_MODULE_STORE_IDENT))
{
return;
}
context_p->module_identifier_lit_p = context_p->lit_object.literal_p;
ecma_string_t *name_p = ecma_new_ecma_string_from_utf8 (context_p->lit_obj... | 1 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 296,350,111,167,244,540,000,000,000,000,000,000,000 | 23 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
static int send_stream(struct kiocb *iocb, struct socket *sock,
struct msghdr *m, size_t total_len)
{
struct sock *sk = sock->sk;
struct tipc_port *tport = tipc_sk_port(sk);
struct msghdr my_msg;
struct iovec my_iov;
struct iovec *curr_iov;
int curr_iovlen;
char __user *curr_start;
u32 hdr_size;
int c... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 290,432,740,444,057,560,000,000,000,000,000,000,000 | 89 | 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 struct sk_buff *tcp_maybe_skipping_dsack(struct sk_buff *skb,
struct sock *sk,
struct tcp_sack_block *next_dup,
struct tcp_sacktag_state *state,
u32 skip_to_seq)
{
if (!next_dup)
return skb;
if (before(next_dup->start_seq, skip_to_seq)) {
skb = tcp_sacktag_skip(skb, sk, state, next... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8b8a321ff72c785ed5e8b4cf6eda20b35d427390 | 163,344,447,562,324,760,000,000,000,000,000,000,000 | 18 | tcp: fix zero cwnd in tcp_cwnd_reduction
Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode
conditionally") introduced a bug that cwnd may become 0 when both
inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead
to a div-by-zero if the connection starts another cwnd reduction
phase by set... |
njs_string_cmp(const njs_value_t *v1, const njs_value_t *v2)
{
size_t size, size1, size2;
njs_int_t ret;
const u_char *start1, *start2;
size1 = v1->short_string.size;
if (size1 != NJS_STRING_LONG) {
start1 = v1->short_string.start;
} else {
size1 = v1->long_string.... | 0 | [] | njs | 36f04a3178fcb6da8513cc3dbf35215c2a581b3f | 223,803,615,694,243,250,000,000,000,000,000,000,000 | 36 | Fixed String.prototype.replace() with byte strings.
This closes #522 issue on Github. |
nbd_unlocked_get_export_description (struct nbd_handle *h)
{
char *r;
if (h->eflags == 0) {
set_error (EINVAL, "server has not returned export flags, "
"you need to connect to the server first");
return NULL;
}
if (h->description == NULL) {
set_error (ENOTSUP, "server did not adverti... | 0 | [
"CWE-252"
] | libnbd | c79706af4e7475bf58861a143b77b77a54e7a1cd | 134,223,016,688,840,070,000,000,000,000,000,000,000 | 21 | 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... |
bool copy_up_to(size_t bytes)
{
DBUG_ASSERT(bytes >= from);
return dst->append(src + from, uint32(bytes - from));
} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 60,278,060,354,674,195,000,000,000,000,000,000,000 | 5 | 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.... |
static int allmbox_p(void *rock,
const char *key,
size_t keylen,
const char *data,
size_t datalen)
{
struct allmb_rock *mbrock = (struct allmb_rock *)rock;
int r;
/* skip any dollar keys */
if (keylen && key[0] == '$') ... | 0 | [
"CWE-20"
] | cyrus-imapd | 6bd33275368edfa71ae117de895488584678ac79 | 263,654,754,993,459,800,000,000,000,000,000,000,000 | 23 | mboxlist: fix uninitialised memory use where pattern is "Other Users" |
TEST_F(QueryPlannerTest, NegatedElemMatchValueEqArray) {
addIndex(BSON("i" << 1));
runQuery(fromjson("{i: {$not: {$elemMatch: {$eq: [1]}}}}"));
assertHasOnlyCollscan();
} | 0 | [] | mongo | 64095239f41e9f3841d8be9088347db56d35c891 | 263,620,425,667,224,870,000,000,000,000,000,000,000 | 5 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
m4_changecom (struct obstack *obs, int argc, token_data **argv)
{
if (bad_argc (argv[0], argc, 1, 3))
return;
/* Explicit NULL distinguishes between empty and missing argument. */
set_comment ((argc >= 2) ? TOKEN_DATA_TEXT (argv[1]) : NULL,
(argc >= 3) ? TOKEN_DATA_TEXT (argv[2]) : NULL);
} | 0 | [] | m4 | 5345bb49077bfda9fabd048e563f9e7077fe335d | 154,015,599,330,941,800,000,000,000,000,000,000,000 | 9 | Minor security fix: Quote output of mkstemp.
* src/builtin.c (mkstemp_helper): Produce quoted output.
* doc/m4.texinfo (Mkstemp): Update the documentation and tests.
* NEWS: Document this change.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba) |
TEST_F(QuicServerTransportTest, CloseTransportWontUnbound) {
EXPECT_CALL(routingCallback, onConnectionUnbound(_, _, _)).Times(0);
server->closeTransport();
// Need to do this otherwise server transport destructor will still call
// onConnectionUnbound
server->setRoutingCallback(nullptr);
} | 0 | [
"CWE-617",
"CWE-703"
] | mvfst | a67083ff4b8dcbb7ee2839da6338032030d712b0 | 159,510,863,383,804,370,000,000,000,000,000,000,000 | 7 | Close connection if we derive an extra 1-rtt write cipher
Summary: Fixes CVE-2021-24029
Reviewed By: mjoras, lnicco
Differential Revision: D26613890
fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945 |
jpeg_parse_exif (JpegExifContext *context, j_decompress_ptr cinfo)
{
jpeg_saved_marker_ptr cmarker;
/* check for interesting Exif markers */
cmarker = cinfo->marker_list;
while (cmarker != NULL) {
if (cmarker->marker == JPEG_APP0+1)
jpeg_parse_exif_app1 (context, cmarker);
else if (cmarker->marker == JPEG_A... | 0 | [
"CWE-787"
] | gdk-pixbuf | c2a40a92fe3df4111ed9da51fe3368c079b86926 | 54,709,283,320,443,270,000,000,000,000,000,000,000 | 14 | jpeg: Throw error when number of color components is unsupported
Explicitly check "3" or "4" output color components.
gdk-pixbuf assumed that the value of output_components to be either
3 or 4, but not an invalid value (9) or an unsupported value (1).
The way the buffer size was deduced was using a naive "== 4" chec... |
void SplashOutputDev::clip(GfxState *state) {
SplashPath path = convertPath(state, state->getPath(), true);
splash->clipToPath(&path, false);
} | 0 | [
"CWE-369"
] | poppler | b224e2f5739fe61de9fa69955d016725b2a4b78d | 176,117,567,769,004,700,000,000,000,000,000,000,000 | 4 | SplashOutputDev::tilingPatternFill: Fix crash on broken file
Issue #802 |
sg_new_read(Sg_fd * sfp, char __user *buf, size_t count, Sg_request * srp)
{
sg_io_hdr_t *hp = &srp->header;
int err = 0, err2;
int len;
if (count < SZ_SG_IO_HDR) {
err = -EINVAL;
goto err_out;
}
hp->sb_len_wr = 0;
if ((hp->mx_sb_len > 0) && hp->sbp) {
if ((CHECK_CONDITION & hp->masked_status) ||
(D... | 0 | [
"CWE-190",
"CWE-189"
] | linux | fdc81f45e9f57858da6351836507fbcf1b7583ee | 120,668,439,575,049,950,000,000,000,000,000,000,000 | 35 | sg_start_req(): use import_iovec()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
void free_event_filter(struct event_filter *filter)
{
__free_filter(filter);
} | 0 | [
"CWE-787"
] | linux | 70303420b5721c38998cf987e6b7d30cc62d4ff1 | 295,538,860,047,419,700,000,000,000,000,000,000,000 | 4 | tracing: Check for no filter when processing event filters
The syzkaller detected a out-of-bounds issue with the events filter code,
specifically here:
prog[N].pred = NULL; /* #13 */
prog[N].target = 1; /* TRUE */
prog[N+1].pred = NULL;
prog[N+1].target = 0; /* FALSE */
-> prog[N-1].target = N;
prog[N-1].w... |
void DRM_aac_scalable_main_element(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo,
bitfile *ld, program_config *pce, drc_info *drc)
{
uint8_t retval = 0;
uint8_t channels = hDecoder->fr_channels = 0;
uint8_t ch;
uint8_t this_layer_stereo = (hDecoder->channelConfigu... | 0 | [
"CWE-119",
"CWE-787"
] | faad2 | 942c3e0aee748ea6fe97cb2c1aa5893225316174 | 115,511,693,317,425,960,000,000,000,000,000,000,000 | 208 | Fix a couple buffer overflows
https://hackerone.com/reports/502816
https://hackerone.com/reports/507858
https://github.com/videolan/vlc/blob/master/contrib/src/faad2/faad2-fix-overflows.patch |
FileIo::Impl::Impl(const std::string& path)
: path_(path),
#ifdef EXV_UNICODE_PATH
wpMode_(wpStandard),
#endif
fp_(0), opMode_(opSeek),
#if defined WIN32 && !defined __CYGWIN__
hFile_(0), hMap_(0),
#endif
pMappedArea_(0), mappedLength_(0), isMalloced_(false), isWriteable_(fal... | 0 | [
"CWE-125"
] | exiv2 | 6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97 | 128,874,674,887,794,850,000,000,000,000,000,000,000 | 12 | Fix https://github.com/Exiv2/exiv2/issues/55 |
k5_asn1_encode_bytestring(asn1buf *buf, uint8_t *const *val, size_t len)
{
if (len > 0 && val == NULL)
return ASN1_MISSING_FIELD;
insert_bytes(buf, *val, len);
return 0;
} | 0 | [
"CWE-674",
"CWE-787"
] | krb5 | 57415dda6cf04e73ffc3723be518eddfae599bfd | 263,955,441,220,308,100,000,000,000,000,000,000,000 | 7 | Add recursion limit for ASN.1 indefinite lengths
The libkrb5 ASN.1 decoder supports BER indefinite lengths. It
computes the tag length using recursion; the lack of a recursion limit
allows an attacker to overrun the stack and cause the process to
crash. Reported by Demi Obenour.
CVE-2020-28196:
In MIT krb5 release... |
static void push_data(struct archive_read* a, struct rar5* rar,
const uint8_t* buf, int64_t idx_begin, int64_t idx_end)
{
const uint64_t wmask = rar->cstate.window_mask;
const ssize_t solid_write_ptr = (rar->cstate.solid_offset +
rar->cstate.last_write_ptr) & wmask;
idx_begin += rar->cstate.solid_offset;
... | 0 | [
"CWE-20",
"CWE-125"
] | libarchive | 94821008d6eea81e315c5881cdf739202961040a | 255,987,072,124,207,300,000,000,000,000,000,000,000 | 41 | RAR5 reader: reject files that declare invalid header flags
One of the fields in RAR5's base block structure is the size of the
header. Some invalid files declare a 0 header size setting, which can
confuse the unpacker. Minimum header size for RAR5 base blocks is 7
bytes (4 bytes for CRC, and 3 bytes for the rest), so... |
camel_ews_store_password_will_expire_cb (EEwsConnection *connection,
gint in_days,
const gchar *service_url,
gpointer user_data)
{
CamelEwsStore *ews_store = user_data;
g_return_if_fail (CAMEL_IS_EWS_STORE (ews_store));
if (ews_store->priv->password_expires_in_days < 0 ||
ews_store->priv->pa... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 128,039,624,907,767,400,000,000,000,000,000,000,000 | 44 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
GF_Err npck_Read(GF_Box *s, GF_BitStream *bs)
{
GF_NPCKBox *ptr = (GF_NPCKBox *)s;
ptr->nbPackets = gf_bs_read_u32(bs);
return GF_OK;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 12,474,970,403,663,423,000,000,000,000,000,000,000 | 6 | prevent dref memleak on invalid input (#1183) |
static int do_enc_dec(EXPECTED *bytes, long nbytes,
const TEST_PACKAGE *package)
{
unsigned char *data = NULL;
int len;
int ret = 0;
void *p = bytes;
len = package->i2d(p, &data);
if (len < 0)
return -1;
ret = do_decode(data, len, bytes, nbytes, package);
... | 0 | [
"CWE-476"
] | openssl | 22b88fc9c0e22545401c0b34d24843883ea73fec | 195,257,963,635,328,180,000,000,000,000,000,000,000 | 16 | 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> |
local void infchk(void)
{
int ret, cont, was;
unsigned long check, len;
z_stream strm;
unsigned tmp2;
unsigned long tmp4;
off_t clen;
cont = 0;
do {
/* header already read -- set up for decompression */
g.in_tot = g.in_left; /* track compressed data length */
... | 0 | [
"CWE-703",
"CWE-22"
] | pigz | fdad1406b3ec809f4954ff7cdf9e99eb18c2458f | 224,686,170,665,102,560,000,000,000,000,000,000,000 | 120 | When decompressing with -N or -NT, strip any path from header name.
This uses the path of the compressed file combined with the name
from the header as the name of the decompressed output file. Any
path information in the header name is stripped. This avoids a
possible vulnerability where absolute or descending path... |
static void php_session_send_cookie(TSRMLS_D) /* {{{ */
{
smart_str ncookie = {0};
char *date_fmt = NULL;
char *e_session_name, *e_id;
if (SG(headers_sent)) {
const char *output_start_filename = php_output_get_start_filename(TSRMLS_C);
int output_start_lineno = php_output_get_start_lineno(TSRMLS_C);
if (out... | 0 | [
"CWE-264"
] | php-src | 25e8fcc88fa20dc9d4c47184471003f436927cde | 165,226,724,561,051,190,000,000,000,000,000,000,000 | 72 | Strict session |
void bdrv_io_limits_disable(BlockDriverState *bs)
{
bs->io_limits_enabled = false;
bdrv_start_throttled_reqs(bs);
throttle_destroy(&bs->throttle_state);
} | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 142,273,537,877,460,300,000,000,000,000,000,000,000 | 8 | block: Limit request size (CVE-2014-0143)
Limiting the size of a single request to INT_MAX not only fixes a
direct integer overflow in bdrv_check_request() (which would only
trigger bad behaviour with ridiculously huge images, as in close to
2^64 bytes), but can also prevent overflows in all block drivers.
Signed-off... |
int callback_static_compressed_inmemory_website (const struct _u_request * request, struct _u_response * response, void * user_data) {
struct _u_compressed_inmemory_website_config * config = (struct _u_compressed_inmemory_website_config *)user_data;
char ** accept_list = NULL;
int ret = U_CALLBACK_CONTINUE, compr... | 0 | [
"CWE-269",
"CWE-22"
] | glewlwyd | e3f7245c33897bf9b3a75acfcdb8b7b93974bf11 | 29,393,576,459,837,030,000,000,000,000,000,000,000 | 198 | Fix file access check for directory traversal, and fix call for callback_static_file_uncompressed if header not set |
static int vmxnet3_post_load(void *opaque, int version_id)
{
VMXNET3State *s = opaque;
PCIDevice *d = PCI_DEVICE(s);
net_tx_pkt_init(&s->tx_pkt, PCI_DEVICE(s),
s->max_tx_frags, s->peer_has_vhdr);
net_rx_pkt_init(&s->rx_pkt, s->peer_has_vhdr);
if (s->msix_used) {
if (!v... | 0 | [
"CWE-416"
] | qemu | 6c352ca9b4ee3e1e286ea9e8434bd8e69ac7d0d8 | 225,938,430,350,979,660,000,000,000,000,000,000,000 | 23 | net: vmxnet3: check for device_active before write
Vmxnet3 device emulator does not check if the device is active,
before using it for write. It leads to a use after free issue,
if the vmxnet3_io_bar0_write routine is called after the device is
deactivated. Add check to avoid it.
Reported-by: Li Qiang <liqiang6-s@360... |
get_common_pull_options (GVariantBuilder *builder,
FlatpakRemoteState *state,
const char *ref_to_fetch,
const char *token,
const gchar * const *dirs_to_pull,
const char ... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 291,388,015,654,381,270,000,000,000,000,000,000,000 | 60 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... |
int bdrv_is_encrypted(BlockDriverState *bs)
{
if (bs->backing_hd && bs->backing_hd->encrypted)
return 1;
return bs->encrypted;
} | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 64,535,209,952,292,520,000,000,000,000,000,000,000 | 6 | block: Limit request size (CVE-2014-0143)
Limiting the size of a single request to INT_MAX not only fixes a
direct integer overflow in bdrv_check_request() (which would only
trigger bad behaviour with ridiculously huge images, as in close to
2^64 bytes), but can also prevent overflows in all block drivers.
Signed-off... |
writen(int fd, const void *buf, ssize_t len) {
int nleft;
int nwritten;
char * buffer = (char *)buf;
nleft = len;
while (nleft > 0) {
nwritten = write(fd, buffer, len);
if (nwritten < 0) {
if (errno == EINTR || errno == EAGAIN)
continue;
else {
LOG_ERRNO(LOG_ERR, ("write failed"));
return -... | 0 | [
"CWE-400",
"CWE-703"
] | knc | f237f3e09ecbaf59c897f5046538a7b1a3fa40c1 | 138,351,552,835,792,170,000,000,000,000,000,000,000 | 25 | knc: fix a couple of memory leaks.
One of these can be remotely triggered during the authentication
phase which leads to a remote DoS possibility.
Pointed out by: Imre Rad <radimre83@gmail.com> |
BYTE* freerdp_bitmap_compress_planar(BITMAP_PLANAR_CONTEXT* context, const BYTE* data,
UINT32 format, UINT32 width, UINT32 height, UINT32 scanline,
BYTE* dstData, UINT32* pDstSize)
{
UINT32 size;
BYTE* dstp;
UINT32 planeSize;
UINT32 dstSizes[... | 0 | [
"CWE-125"
] | FreeRDP | 17f547ae11835bb11baa3d045245dc1694866845 | 81,159,742,897,361,090,000,000,000,000,000,000,000 | 166 | Fixed CVE-2020-11521: Out of bounds write in planar codec.
Thanks to Sunglin and HuanGMz from Knownsec 404 |
routerset_needs_geoip(const routerset_t *set)
{
return set && smartlist_len(set->country_names);
} | 0 | [
"CWE-399"
] | tor | 308f6dad20675c42b29862f4269ad1fbfb00dc9a | 90,918,696,449,908,500,000,000,000,000,000,000,000 | 4 | Mitigate a side-channel leak of which relays Tor chooses for a circuit
Tor's and OpenSSL's current design guarantee that there are other leaks,
but this one is likely to be more easily exploitable, and is easy to fix. |
int http_sync_req_state(struct session *s)
{
struct buffer *buf = s->req;
struct http_txn *txn = &s->txn;
unsigned int old_flags = buf->flags;
unsigned int old_state = txn->req.msg_state;
http_silent_debug(__LINE__, s);
if (unlikely(txn->req.msg_state < HTTP_MSG_BODY))
return 0;
if (txn->req.msg_state == HTT... | 0 | [] | haproxy-1.4 | dc80672211e085c211f1fc47e15cfe57ab587d38 | 107,402,295,669,861,230,000,000,000,000,000,000,000 | 114 | 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... |
_nm_singleton_instance_register_destruction(GObject *instance)
{
g_return_if_fail(G_IS_OBJECT(instance));
/* Don't allow registration after shutdown. We only destroy the singletons
* once. */
g_return_if_fail(!_singletons_shutdown);
g_object_weak_ref(instance, _nm_singleton_instance_weak_cb, NULL... | 0 | [
"CWE-20"
] | NetworkManager | 420784e342da4883f6debdfe10cde68507b10d27 | 234,020,547,720,053,900,000,000,000,000,000,000,000 | 12 | core: fix crash in nm_wildcard_match_check()
It's not entirely clear how to treat %NULL.
Clearly "match.interface-name=eth0" should not
match with an interface %NULL. But what about
"match.interface-name=!eth0"? It's now implemented
that negative matches still succeed against %NULL.
What about "match.interface-name=*"... |
get_next_address(
address_node *addr
)
{
const char addr_prefix[] = "192.168.0.";
static int curr_addr_num = 1;
#define ADDR_LENGTH 16 + 1 /* room for 192.168.1.255 */
char addr_string[ADDR_LENGTH];
sockaddr_u *final_addr;
struct addrinfo *ptr;
int gai_error;
final_addr = emalloc(sizeof(*final_addr));
if (... | 0 | [
"CWE-20"
] | ntp | 52e977d79a0c4ace997e5c74af429844da2f27be | 69,161,485,462,951,160,000,000,000,000,000,000,000 | 35 | [Bug 1773] openssl not detected during ./configure.
[Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL. |
R_API void r_bin_java_get_import_json_definitions(RBinJavaObj *bin, PJ *pj) {
r_return_if_fail (pj);
RList *the_list;
RListIter *iter = NULL;
char *new_str;
pj_ka (pj, "imports");
if (!bin || !(the_list = r_bin_java_get_lib_names (bin))) {
pj_end (pj);
return;
}
r_list_foreach (the_list, iter, new_str) {... | 0 | [
"CWE-125"
] | radare2 | 0927ed3ae99444e7b47b84e43118deb10fe37529 | 300,802,946,744,859,200,000,000,000,000,000,000,000 | 27 | Fix oobread crash in java parser ##crash
* Reported by @bet4it via @huntrdev
* BountyID: 229a2e0d-9e5c-402f-9a24-57fa2eb1aaa7
* Reproducer: poc4java |
static PyObject *Dispatch_environ(DispatchObject *self, const char *group)
{
request_rec *r = NULL;
PyObject *vars = NULL;
PyObject *object = NULL;
const apr_array_header_t *head = NULL;
const apr_table_entry_t *elts = NULL;
int i = 0;
/* Create the WSGI environment dictionary. */
v... | 0 | [
"CWE-264"
] | mod_wsgi | d9d5fea585b23991f76532a9b07de7fcd3b649f4 | 290,289,747,204,692,350,000,000,000,000,000,000,000 | 107 | Local privilege escalation when using daemon mode. (CVE-2014-0240) |
static size_t __process_echoes(struct tty_struct *tty)
{
struct n_tty_data *ldata = tty->disc_data;
int space, old_space;
size_t tail;
unsigned char c;
old_space = space = tty_write_room(tty);
tail = ldata->echo_tail;
while (ldata->echo_commit != tail) {
c = echo_buf(ldata, tail);
if (c == ECHO_OP_START) {... | 0 | [
"CWE-362"
] | tty | 4291086b1f081b869c6d79e5b7441633dc3ace00 | 303,637,006,416,525,800,000,000,000,000,000,000,000 | 134 | n_tty: Fix n_tty_write crash when echoing in raw mode
The tty atomic_write_lock does not provide an exclusion guarantee for
the tty driver if the termios settings are LECHO & !OPOST. And since
it is unexpected and not allowed to call TTY buffer helpers like
tty_insert_flip_string concurrently, this may lead to crashe... |
display_debug_abbrev (struct dwarf_section *section,
void *file ATTRIBUTE_UNUSED)
{
abbrev_entry *entry;
unsigned char *start = section->start;
introduce (section, false);
do
{
abbrev_list * list;
dwarf_vma offset;
offset = start - section->start;
list = find_abb... | 0 | [
"CWE-269"
] | binutils-gdb | e98e7d9a70dcc987bff0e925f20b78cd4a2979ed | 285,015,212,942,597,500,000,000,000,000,000,000,000 | 55 | Fix NULL pointer indirection when parsing corrupt DWARF data.
PR 29290
* dwarf.c (read_and_display_attr_value): Check that debug_info_p
is set before dereferencing it. |
R_API const char *r_str_word_get0(const char *str, int idx) {
int i;
const char *ptr = str;
if (!ptr || idx < 0 /* prevent crashes with negative index */) {
return (char *)nullstr;
}
for (i = 0; i != idx; i++) {
ptr += strlen (ptr) + 1;
}
return ptr;
} | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 212,420,082,489,614,400,000,000,000,000,000,000,000 | 11 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
paste_from_archive_extract_ready_cb (GObject *source_object,
GAsyncResult *result,
gpointer user_data)
{
FrWindow *window = user_data;
GError *error = NULL;
if (! fr_archive_operation_finish (FR_ARCHIVE (source_object), result, &error)) {
_paste_from_archive_operation_completed (wind... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 45,367,040,810,934,240,000,000,000,000,000,000,000 | 28 | libarchive: sanitize filenames before extracting |
zone_limit_update(struct conntrack *ct, int32_t zone, uint32_t limit)
{
int err = 0;
ovs_mutex_lock(&ct->ct_lock);
struct zone_limit *zl = zone_limit_lookup(ct, zone);
if (zl) {
zl->czl.limit = limit;
VLOG_INFO("Changed zone limit of %u for zone %d", limit, zone);
} else {
er... | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 171,874,309,211,776,250,000,000,000,000,000,000,000 | 20 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
static bool __in_atomic_pool(void *start, size_t size)
{
struct dma_pool *pool = &atomic_pool;
void *end = start + size;
void *pool_start = pool->vaddr;
void *pool_end = pool->vaddr + pool->size;
if (start < pool_start || start >= pool_end)
return false;
if (end <= pool_end)
return true;
WARN(1, "Wrong co... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 0ea1ec713f04bdfac343c9702b21cd3a7c711826 | 225,248,831,651,045,760,000,000,000,000,000,000,000 | 18 | ARM: dma-mapping: don't allow DMA mappings to be marked executable
DMA mapping permissions were being derived from pgprot_kernel directly
without using PAGE_KERNEL. This causes them to be marked with executable
permission, which is not what we want. Fix this.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk... |
static int mov_imm_reg(RAnal* anal, RAnalOp* op, ut16 code){
op->type = R_ANAL_OP_TYPE_MOV;
op->dst = anal_fill_ai_rg (anal, GET_TARGET_REG(code));
op->src[0] = anal_fill_im (anal, (st8)(code & 0xFF));
return op->size;
} | 0 | [
"CWE-125"
] | radare2 | 77c47cf873dd55b396da60baa2ca83bbd39e4add | 311,062,183,486,882,950,000,000,000,000,000,000,000 | 6 | Fix #9903 - oobread in RAnal.sh |
void ieee80211_txq_set_params(struct ieee80211_local *local)
{
if (local->hw.wiphy->txq_limit)
local->fq.limit = local->hw.wiphy->txq_limit;
else
local->hw.wiphy->txq_limit = local->fq.limit;
if (local->hw.wiphy->txq_memory_limit)
local->fq.memory_limit = local->hw.wiphy->txq_memory_limit;
else
local->hw.w... | 0 | [
"CWE-476"
] | linux | bddc0c411a45d3718ac535a070f349be8eca8d48 | 180,955,450,287,513,300,000,000,000,000,000,000,000 | 17 | mac80211: Fix NULL ptr deref for injected rate info
The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx
queue") moved the code to validate the radiotap header from
ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is
possible to share more code with the new Tx queue selecti... |
static ssize_t __send_control_msg(struct ports_device *portdev, u32 port_id,
unsigned int event, unsigned int value)
{
struct scatterlist sg[1];
struct virtqueue *vq;
unsigned int len;
if (!use_multiport(portdev))
return 0;
vq = portdev->c_ovq;
spin_lock(&portdev->c_ovq_lock);
portdev->cpkt.id = cpu_... | 0 | [
"CWE-119",
"CWE-787"
] | linux | c4baad50297d84bde1a7ad45e50c73adae4a2192 | 89,342,201,306,700,250,000,000,000,000,000,000,000 | 30 | virtio-console: avoid DMA from stack
put_chars() stuffs the buffer it gets into an sg, but that buffer may be
on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it
manifested as printks getting turned into NUL bytes).
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat... |
void *completion_thread(void *arg)
{
struct cg_completion *cgc = (struct cg_completion *)arg;
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
cgc->fn(cgc->fnarg);
cgsem_post(&cgc->cgsem);
return NULL;
} | 0 | [
"CWE-20",
"CWE-703"
] | sgminer | 910c36089940e81fb85c65b8e63dcd2fac71470c | 266,247,836,673,192,730,000,000,000,000,000,000,000 | 10 | stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime.
Might have introduced a memory leak, don't have time to check. :(
Should the other hex2bin()'s be checked?
Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this. |
static void gf_filter_check_pending_tasks(GF_Filter *filter, GF_FSTask *task)
{
if (session_should_abort(filter->session)) {
return;
}
//lock task mx to take the decision whether to requeue a new task or not (cf gf_filter_post_process_task)
//TODO: find a way to bypass this mutex ?
gf_mx_p(filter->tasks_mx);
... | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 36,266,153,893,090,610,000,000,000,000,000,000,000 | 40 | fixed crashes for very long path - cf #1908 |
mj500c_set_bpp(gx_device *pdev, int bits_per_pixel)
{ gx_device_color_info *ci = &pdev->color_info;
/* Only valid bits-per-pixel are 1, 3, 8, 16, 24, 32 */
int bpp = bits_per_pixel < 3 ? 1 : bits_per_pixel < 8 ? 3 :
(bits_per_pixel >> 3) << 3;
ci->num_components = ((bpp == 1) || (bpp == 8) ? 1 : 3);
ci->dep... | 0 | [
"CWE-120"
] | ghostpdl | 849e74e5ab450dd581942192da7101e0664fa5af | 219,649,367,385,248,600,000,000,000,000,000,000,000 | 13 | Bug 701799: avoid out-of-range array access in mj_color_correct().
Code is obscure, so this fix merely avoids out-of-range access in the simplest
way possible, without understanding what the code is trying to do.
Fixes:
./sanbin/gs -sOutputFile=tmp -sDEVICE=mj6000c ../bug-701799.pdf |
TEST(HeaderMapImplTest, RemoveIf) {
LowerCaseString key1 = LowerCaseString("X-postfix-foo");
LowerCaseString key2 = LowerCaseString("X-postfix-");
LowerCaseString key3 = LowerCaseString("x-postfix-eep");
TestRequestHeaderMapImpl headers;
headers.addReference(key1, "value");
headers.addReference(key2, "valu... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 267,151,173,017,981,900,000,000,000,000,000,000,000 | 20 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
static void _wrap_gmac_update(void *_ctx, size_t length, const uint8_t *data)
{
struct gmac_ctx *ctx = _ctx;
if (ctx->pos + length < GCM_BLOCK_SIZE) {
memcpy(&ctx->buffer[ctx->pos], data, length);
ctx->pos += length;
return;
}
if (ctx->pos) {
memcpy(&ctx->buffer[ctx->pos], data, GCM_BLOCK_SIZE - ctx->pos)... | 0 | [
"CWE-476"
] | gnutls | 3db352734472d851318944db13be73da61300568 | 166,159,693,147,294,960,000,000,000,000,000,000,000 | 28 | wrap_nettle_hash_fast: avoid calling _update with zero-length input
As Nettle's hash update functions internally call memcpy, providing
zero-length input may cause undefined behavior.
Signed-off-by: Daiki Ueno <ueno@gnu.org> |
OVS_REQUIRES(ctb->lock)
{
uint32_t hash = ctx->hash;
struct conn *conn;
ctx->conn = NULL;
HMAP_FOR_EACH_WITH_HASH (conn, node, hash, &ctb->connections) {
if (!conn_key_cmp(&conn->key, &ctx->key)
&& !conn_expired(conn, now)) {
ctx->conn = conn;
ctx->r... | 0 | [
"CWE-400"
] | ovs | abd7a457652e6734902720fe6a5dddb3fc0d1e3b | 64,607,189,625,491,640,000,000,000,000,000,000,000 | 22 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
static UINT drdynvc_process_data(drdynvcPlugin* drdynvc, int Sp, int cbChId,
wStream* s)
{
UINT32 ChannelId;
if (Stream_GetRemainingLength(s) < drdynvc_cblen_to_bytes(cbChId))
return ERROR_INVALID_DATA;
ChannelId = drdynvc_read_variable_uint(s, cbChId);
WLog_Print(drdynvc->log, ... | 0 | [
"CWE-125"
] | FreeRDP | baee520e3dd9be6511c45a14c5f5e77784de1471 | 307,451,505,012,515,400,000,000,000,000,000,000,000 | 14 | Fix for #4866: Added additional length checks |
~DenseTensorColumn() override {} | 0 | [
"CWE-843"
] | tensorflow | b1cc5e5a50e7cee09f2c6eb48eb40ee9c4125025 | 54,742,411,314,821,230,000,000,000,000,000,000,000 | 1 | Fix `tf.raw_ops.SparseCross` failing CHECK.
PiperOrigin-RevId: 368701671
Change-Id: Id805729dd9ba0bda36e4bb309408129b55fb649d |
struct vfsmount *clone_private_mount(const struct path *path)
{
struct mount *old_mnt = real_mount(path->mnt);
struct mount *new_mnt;
down_read(&namespace_sem);
if (IS_MNT_UNBINDABLE(old_mnt))
goto invalid;
if (!check_mnt(old_mnt))
goto invalid;
if (has_locked_children(old_mnt, path->dentry))
goto invali... | 0 | [
"CWE-200"
] | linux | 427215d85e8d1476da1a86b8d67aceb485eb3631 | 326,013,469,481,792,940,000,000,000,000,000,000,000 | 30 | ovl: prevent private clone if bind mount is not allowed
Add the following checks from __do_loopback() to clone_private_mount() as
well:
- verify that the mount is in the current namespace
- verify that there are no locked children
Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de>
Fixes: c771d683a62e ("vfs: ... |
StringEnd()
{
struct canvas *cv;
char *p;
int typ;
curr->w_state = LIT;
*curr->w_stringp = '\0';
switch (curr->w_StringType)
{
case OSC: /* special xterm compatibility hack */
if (curr->w_string[0] == ';' || (p = index(curr->w_string, ';')) == 0)
break;
typ = atoi(curr->w_string);
... | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 9,809,937,497,346,076,000,000,000,000,000,000,000 | 121 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
static void readahead_tree_node_children(struct extent_buffer *node)
{
int i;
const int nr_items = btrfs_header_nritems(node);
for (i = 0; i < nr_items; i++)
btrfs_readahead_node_child(node, i);
} | 0 | [
"CWE-476",
"CWE-703"
] | linux | e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091 | 270,140,430,747,791,900,000,000,000,000,000,000,000 | 8 | btrfs: fix NULL pointer dereference when deleting device by invalid id
[BUG]
It's easy to trigger NULL pointer dereference, just by removing a
non-existing device id:
# mkfs.btrfs -f -m single -d single /dev/test/scratch1 \
/dev/test/scratch2
# mount /dev/test/scratch1 /mnt/btrfs
# btrfs device remove 3 /... |
int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode,
struct buffer_head *bh, ext4_fsblk_t blocknr)
{
int err;
if (!ext4_handle_valid(handle))
return 0;
might_sleep();
BUFFER_TRACE(bh, "enter");
jbd_debug(4, "forgetting bh %p: is_metadata = %d, mode %o, "
"data mode %lx\n",
bh, i... | 0 | [
"CWE-399"
] | linux-2.6 | 06a279d636734da32bb62dd2f7b0ade666f65d7c | 38,775,293,904,078,947,000,000,000,000,000,000,000 | 42 | ext4: only use i_size_high for regular files
Directories are not allowed to be bigger than 2GB, so don't use
i_size_high for anything other than regular files. E2fsck should
complain about these inodes, but the simplest thing to do for the
kernel is to only use i_size_high for regular files.
This prevents an intenti... |
int xstateregs_get(struct task_struct *target, const struct user_regset *regset,
unsigned int pos, unsigned int count,
void *kbuf, void __user *ubuf)
{
struct fpu *fpu = &target->thread.fpu;
struct xregs_state *xsave;
int ret;
if (!boot_cpu_has(X86_FEATURE_XSAVE))
return -ENODEV;
xsave = &fpu->state.xsave;... | 0 | [
"CWE-200"
] | linux | 814fb7bb7db5433757d76f4c4502c96fc53b0b5e | 99,204,284,108,912,270,000,000,000,000,000,000,000 | 36 | x86/fpu: Don't let userspace set bogus xcomp_bv
On x86, userspace can use the ptrace() or rt_sigreturn() system calls to
set a task's extended state (xstate) or "FPU" registers. ptrace() can
set them for another task using the PTRACE_SETREGSET request with
NT_X86_XSTATE, while rt_sigreturn() can set them for the curr... |
static int skcipher_sendmsg_nokey(struct socket *sock, struct msghdr *msg,
size_t size)
{
int err;
err = skcipher_check_key(sock);
if (err)
return err;
return skcipher_sendmsg(sock, msg, size);
} | 0 | [] | linux | 4f0414e54e4d1893c6f08260693f8ef84c929293 | 28,049,104,570,683,690,000,000,000,000,000,000,000 | 11 | crypto: algif_skcipher - Load TX SG list after waiting
We need to load the TX SG list in sendmsg(2) after waiting for
incoming data, not before.
Cc: stable@vger.kernel.org
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Dmitry Vyukov <dvyukov@google.c... |
uint8 subselect_union_engine::uncacheable()
{
return unit->uncacheable;
} | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 171,305,599,027,039,100,000,000,000,000,000,000,000 | 4 | MDEV-25994: Crash with union of my_decimal type in ORDER BY clause
When single-row subquery fails with "Subquery reutrns more than 1 row"
error, it will raise an error and return NULL.
On the other hand, Item_singlerow_subselect sets item->maybe_null=0
for table-less subqueries like "(SELECT not_null_value)" (*)
Th... |
void __init free_bootmem_with_active_regions(int nid, unsigned long max_low_pfn)
{
unsigned long start_pfn, end_pfn;
int i, this_nid;
for_each_mem_pfn_range(i, nid, &start_pfn, &end_pfn, &this_nid) {
start_pfn = min(start_pfn, max_low_pfn);
end_pfn = min(end_pfn, max_low_pfn);
if (start_pfn < end_pfn)
mem... | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 281,196,944,627,853,450,000,000,000,000,000,000,000 | 15 | mm: don't warn about allocations which stall for too long
Commit 63f53dea0c98 ("mm: warn about allocations which stall for too
long") was a great step for reducing possibility of silent hang up
problem caused by memory allocation stalls. But this commit reverts it,
for it is possible to trigger OOM lockup and/or soft... |
mailimf_reply_to_parse(const char * message, size_t length,
size_t * indx, struct mailimf_reply_to ** result)
{
struct mailimf_address_list * addr_list;
struct mailimf_reply_to * reply_to;
size_t cur_token;
int r;
int res;
cur_token = * indx;
r = mailimf_token_case_insensitive_parse(message, le... | 0 | [
"CWE-476"
] | libetpan | 1fe8fbc032ccda1db9af66d93016b49c16c1f22d | 71,807,369,800,828,060,000,000,000,000,000,000,000 | 52 | Fixed crash #274 |
static RzList *symbols(RzBinFile *bf) {
if (!bf) {
return NULL;
}
LuacBinInfo *bin_info_obj = GET_INTERNAL_BIN_INFO_OBJ(bf);
if (!bin_info_obj) {
return NULL;
}
return rz_list_clone(bin_info_obj->symbol_list);
} | 0 | [
"CWE-200",
"CWE-787"
] | rizin | 05bbd147caccc60162d6fba9baaaf24befa281cd | 106,128,604,821,747,900,000,000,000,000,000,000,000 | 11 | Fix oob read on _luac_build_info and luac memleaks |
static int emulate_pop_sreg(struct x86_emulate_ctxt *ctxt,
struct x86_emulate_ops *ops, int seg)
{
struct decode_cache *c = &ctxt->decode;
unsigned long selector;
int rc;
rc = emulate_pop(ctxt, ops, &selector, c->op_bytes);
if (rc != 0)
return rc;
rc = kvm_load_segment_descriptor(ctxt->vcpu, (u16)sele... | 0 | [
"CWE-20"
] | kvm | e42d9b8141d1f54ff72ad3850bb110c95a5f3b88 | 106,308,528,611,688,400,000,000,000,000,000,000,000 | 14 | KVM: x86 emulator: limit instructions to 15 bytes
While we are never normally passed an instruction that exceeds 15 bytes,
smp games can cause us to attempt to interpret one, which will cause
large latencies in non-preempt hosts.
Cc: stable@kernel.org
Signed-off-by: Avi Kivity <avi@redhat.com> |
line_send(PG_FUNCTION_ARGS)
{
LINE *line = PG_GETARG_LINE_P(0);
StringInfoData buf;
pq_begintypsend(&buf);
pq_sendfloat8(&buf, line->A);
pq_sendfloat8(&buf, line->B);
pq_sendfloat8(&buf, line->C);
PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
} | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 260,937,644,139,931,300,000,000,000,000,000,000,000 | 11 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
e1000e_calc_rxdesclen(E1000ECore *core)
{
if (e1000e_rx_use_legacy_descriptor(core)) {
core->rx_desc_len = sizeof(struct e1000_rx_desc);
} else {
if (core->mac[RCTL] & E1000_RCTL_DTYP_PS) {
core->rx_desc_len = sizeof(union e1000_rx_desc_packet_split);
} else {
cor... | 0 | [
"CWE-835"
] | qemu | 4154c7e03fa55b4cf52509a83d50d6c09d743b77 | 163,532,197,684,260,830,000,000,000,000,000,000,000 | 13 | net: e1000e: fix an infinite loop issue
This issue is like the issue in e1000 network card addressed in
this commit:
e1000: eliminate infinite loops on out-of-bounds transfer start.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.... |
static void mce_disable_error_reporting(void)
{
int i;
for (i = 0; i < mca_cfg.banks; i++) {
struct mce_bank *b = &mce_banks[i];
if (b->init)
wrmsrl(msr_ops.ctl(i), 0);
}
return;
} | 0 | [
"CWE-362"
] | linux | b3b7c4795ccab5be71f080774c45bbbcc75c2aaf | 257,512,988,504,887,130,000,000,000,000,000,000,000 | 12 | x86/MCE: Serialize sysfs changes
The check_interval file in
/sys/devices/system/machinecheck/machinecheck<cpu number>
directory is a global timer value for MCE polling. If it is changed by one
CPU, mce_restart() broadcasts the event to other CPUs to delete and restart
the MCE polling timer and __mcheck_cpu_init_ti... |
int kvm_get_dirty_log_protect(struct kvm *kvm,
struct kvm_dirty_log *log, bool *flush)
{
struct kvm_memslots *slots;
struct kvm_memory_slot *memslot;
int i, as_id, id;
unsigned long n;
unsigned long *dirty_bitmap;
unsigned long *dirty_bitmap_buffer;
as_id = log->slot >> 16;
id = (u16)log->slot;
if (as_id >... | 0 | [
"CWE-416",
"CWE-362"
] | linux | cfa39381173d5f969daf43582c95ad679189cbc9 | 191,734,699,641,161,200,000,000,000,000,000,000,000 | 63 | kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974)
kvm_ioctl_create_device() does the following:
1. creates a device that holds a reference to the VM object (with a borrowed
reference, the VM's refcount has not been bumped yet)
2. initializes the device
3. transfers the reference to the device t... |
void mnt_set_mountpoint(struct vfsmount *mnt, struct dentry *dentry,
struct vfsmount *child_mnt)
{
child_mnt->mnt_parent = mntget(mnt);
child_mnt->mnt_mountpoint = dget(dentry);
dentry->d_mounted++;
} | 0 | [
"CWE-269"
] | linux-2.6 | ee6f958291e2a768fd727e7a67badfff0b67711a | 254,630,828,835,414,700,000,000,000,000,000,000,000 | 7 | check privileges before setting mount propagation
There's a missing check for CAP_SYS_ADMIN in do_change_type().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torva... |
transchar_nonprint(buf_T *buf, char_u *charbuf, int c)
{
if (c == NL)
c = NUL; // we use newline in place of a NUL
else if (c == CAR && get_fileformat(buf) == EOL_MAC)
c = NL; // we use CR in place of NL in this case
if (dy_flags & DY_UHEX) // 'display' has "uhex"
transchar_hex(charbuf, c);
#ifdef... | 0 | [
"CWE-125",
"CWE-787"
] | vim | 94f3192b03ed27474db80b4d3a409e107140738b | 302,791,877,358,177,700,000,000,000,000,000,000,000 | 63 | patch 8.2.3950: going beyond the end of the line with /\%V
Problem: Going beyond the end of the line with /\%V.
Solution: Check for valid column in getvcol(). |
inline void setptr(U8* p) { ptr = p; } | 0 | [
"CWE-20",
"CWE-787"
] | tigervnc | 0943c006c7d900dfc0281639e992791d6c567438 | 50,618,594,080,487,560,000,000,000,000,000,000,000 | 1 | Use size_t for lengths in stream objects
Provides safety against them accidentally becoming negative because
of bugs in the calculations.
Also does the same to CharArray and friends as they were strongly
connection to the stream objects. |
int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr)
{
struct inet_sock *inet = inet_sk(sk);
struct ip_mc_socklist *iml;
struct ip_mc_socklist __rcu **imlp;
struct in_device *in_dev;
struct net *net = sock_net(sk);
__be32 group = imr->imr_multiaddr.s_addr;
u32 ifindex;
int ret = -EADDRNOTAVAIL;
rtnl_l... | 0 | [
"CWE-399",
"CWE-703",
"CWE-369"
] | linux | a8c1f65c79cbbb2f7da782d4c9d15639a9b94b27 | 225,603,316,726,931,700,000,000,000,000,000,000,000 | 43 | igmp: Avoid zero delay when receiving odd mixture of IGMP queries
Commit 5b7c84066733c5dfb0e4016d939757b38de189e4 ('ipv4: correct IGMP
behavior on v3 query during v2-compatibility mode') added yet another
case for query parsing, which can result in max_delay = 0. Substitute
a value of 1, as in the usual v3 case.
Rep... |
TEST_F(Http1ServerConnectionImplTest, Http11RelativeOnly) {
initialize();
TestRequestHeaderMapImpl expected_headers{
{":authority", "bah"}, {":path", "http://www.somewhere.com/"}, {":method", "GET"}};
Buffer::OwnedImpl buffer("GET http://www.somewhere.com/ HTTP/1.1\r\nHost: bah\r\n\r\n");
expectHeadersTe... | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 252,036,552,991,124,900,000,000,000,000,000,000,000 | 8 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
static void test_bug10729()
{
MYSQL_STMT *stmt;
MYSQL_BIND my_bind[1];
char a[21];
int rc;
const char *stmt_text;
int i= 0;
const char *name_array[3]= { "aaa", "bbb", "ccc" };
ulong type;
myheader("test_bug10729");
mysql_query(mysql, "drop table if exists t1");
mysql_query(mysql, "create table t... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 254,881,591,285,952,570,000,000,000,000,000,000,000 | 55 | 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... |
void cgit_print_filemode(unsigned short mode)
{
if (S_ISDIR(mode))
html("d");
else if (S_ISLNK(mode))
html("l");
else if (S_ISGITLINK(mode))
html("m");
else
html("-");
html_fileperm(mode >> 6);
html_fileperm(mode >> 3);
html_fileperm(mode);
} | 0 | [] | cgit | 513b3863d999f91b47d7e9f26710390db55f9463 | 306,987,558,821,007,420,000,000,000,000,000,000,000 | 14 | ui-shared: prevent malicious filename from injecting headers |
static int tls1_check_cert_param(SSL *s, X509 *x, int set_ee_md)
{
unsigned char comp_id, curve_id[2];
EVP_PKEY *pkey;
int rv;
pkey = X509_get_pubkey(x);
if (!pkey)
return 0;
/* If not EC nothing to do */
if (pkey->type != EVP_PKEY_EC)
{
EVP_PKEY_free(pkey);
return 1;
}
rv = tls1_set_ec_id(curve_id, ... | 0 | [] | openssl | 80bd7b41b30af6ee96f519e629463583318de3b0 | 210,189,851,022,271,630,000,000,000,000,000,000,000 | 56 | Fix SRP ciphersuite DoS vulnerability.
If a client attempted to use an SRP ciphersuite and it had not been
set up correctly it would crash with a null pointer read. A malicious
server could exploit this in a DoS attack.
Thanks to Joonas Kuorilehto and Riku Hietamäki from Codenomicon
for reporting this issue.
CVE-201... |
ephy_embed_add_top_widget (EphyEmbed *embed, GtkWidget *widget, gboolean destroy_on_transition)
{
GSList *list;
if (destroy_on_transition) {
list = embed->priv->destroy_on_transition_list;
list = g_slist_prepend (list, widget);
embed->priv->destroy_on_transition_list = list;
g_signal_connect (widg... | 0 | [] | epiphany | 3e0f7dea754381c5ad11a06ccc62eb153382b498 | 72,978,017,205,815,480,000,000,000,000,000,000,000 | 15 | Report broken certs through the padlock icon
This uses a new feature in libsoup that reports through a
SoupMessageFlag whether the message is talking to a server that has a
trusted server.
Bug #600663 |
server_client_command_error(struct cmdq_item *item, void *data)
{
char *error = data;
cmdq_error(item, "%s", error);
free(error);
return (CMD_RETURN_NORMAL);
} | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 107,488,400,813,590,510,000,000,000,000,000,000,000 | 9 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
f_cmp(VALUE x, VALUE y)
{
if (FIXNUM_P(x) && FIXNUM_P(y)) {
long c = FIX2LONG(x) - FIX2LONG(y);
if (c > 0)
return 1;
else if (c < 0)
return -1;
return 0;
}
return rb_cmpint(rb_funcallv(x, id_cmp, 1, &y), x, y);
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 271,445,393,456,579,450,000,000,000,000,000,000,000 | 12 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
static int io_read_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe,
bool force_nonblock)
{
struct io_async_ctx *io;
struct iov_iter iter;
ssize_t ret;
ret = io_prep_rw(req, sqe, force_nonblock);
if (ret)
return ret;
if (unlikely(!(req->file->f_mode & FMODE_READ)))
return -EBADF;
if (!req->io)... | 0 | [] | linux | ff002b30181d30cdfbca316dadd099c3ca0d739c | 19,929,800,312,846,044,000,000,000,000,000,000,000 | 28 | io_uring: grab ->fs as part of async preparation
This passes it in to io-wq, so it assumes the right fs_struct when
executing async work that may need to do lookups.
Cc: stable@vger.kernel.org # 5.3+
Signed-off-by: Jens Axboe <axboe@kernel.dk> |
uint16_t status(JSObject *obj) {
MOZ_ASSERT(is_instance(obj));
return (uint16_t)JS::GetReservedSlot(obj, Slots::Status).toInt32();
} | 0 | [
"CWE-94"
] | js-compute-runtime | 65524ffc962644e9fc39f4b368a326b6253912a9 | 157,116,509,646,527,970,000,000,000,000,000,000,000 | 4 | use rangom_get instead of arc4random as arc4random does not work correctly with wizer
wizer causes the seed in arc4random to be the same between executions which is not random |
int prepare_binprm(struct linux_binprm *bprm)
{
struct inode *inode = file_inode(bprm->file);
umode_t mode = inode->i_mode;
int retval;
/* clear any previous set[ug]id data from a previous binary */
bprm->cred->euid = current_euid();
bprm->cred->egid = current_egid();
if (!(bprm->file->f_path.mnt->mnt_flags &... | 1 | [
"CWE-362"
] | linux | 8b01fc86b9f425899f8a3a8fc1c47d73c2c20543 | 234,806,126,807,901,260,000,000,000,000,000,000,000 | 42 | fs: take i_mutex during prepare_binprm for set[ug]id executables
This prevents a race between chown() and execve(), where chowning a
setuid-user binary to root would momentarily make the binary setuid
root.
This patch was mostly written by Linus Torvalds.
Signed-off-by: Jann Horn <jann@thejh.net>
Signed-off-by: Linu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.