func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
TEST_F(Http1ServerConnectionImplTest, LargeTrailersRejected) {
// Default limit of 60 KiB
std::string long_string = "big: " + std::string(60 * 1024, 'q') + "\r\n";
testTrailersExceedLimit(long_string, true);
} | 1 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 143,158,142,598,952,030,000,000,000,000,000,000,000 | 5 | [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 int tc_dump_tclass(struct sk_buff *skb, struct netlink_callback *cb)
{
struct tcmsg *tcm = (struct tcmsg*)NLMSG_DATA(cb->nlh);
struct net *net = sock_net(skb->sk);
struct netdev_queue *dev_queue;
struct net_device *dev;
int t, s_t;
if (net != &init_net)
return 0;
if (cb->nlh->nlmsg_len < NLMSG_LENGTH(... | 0 | [
"CWE-909"
] | linux-2.6 | 16ebb5e0b36ceadc8186f71d68b0c4fa4b6e781b | 148,026,292,654,141,450,000,000,000,000,000,000,000 | 33 | tc: Fix unitialized kernel memory leak
Three bytes of uninitialized kernel memory are currently leaked to user
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static void scalar32_min_max_lsh(struct bpf_reg_state *dst_reg,
struct bpf_reg_state *src_reg)
{
u32 umax_val = src_reg->u32_max_value;
u32 umin_val = src_reg->u32_min_value;
/* u32 alu operation will zext upper bits */
struct tnum subreg = tnum_subreg(dst_reg->var_off);
__scalar32_min_max_lsh(dst_reg, umin_... | 0 | [
"CWE-119",
"CWE-681",
"CWE-787"
] | linux | 5b9fbeb75b6a98955f628e205ac26689bcb1383e | 99,320,587,181,751,610,000,000,000,000,000,000,000 | 17 | bpf: Fix scalar32_min_max_or bounds tracking
Simon reported an issue with the current scalar32_min_max_or() implementation.
That is, compared to the other 32 bit subreg tracking functions, the code in
scalar32_min_max_or() stands out that it's using the 64 bit registers instead
of 32 bit ones. This leads to bounds tra... |
flatpak_dir_get_system_list (GCancellable *cancellable,
GError **error)
{
g_autoptr(GPtrArray) result = NULL;
g_autoptr(GError) local_error = NULL;
GPtrArray *locations = NULL;
int i;
/* An error in flatpak_get_system_base_dir_locations() will still return
* return an emp... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 216,675,462,058,761,550,000,000,000,000,000,000,000 | 28 | 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 ... |
static int uio_fasync(int fd, struct file *filep, int on)
{
struct uio_listener *listener = filep->private_data;
struct uio_device *idev = listener->dev;
return fasync_helper(fd, filep, on, &idev->async_queue);
} | 0 | [
"CWE-119",
"CWE-189",
"CWE-703"
] | linux | 7314e613d5ff9f0934f7a0f74ed7973b903315d1 | 67,149,044,145,486,050,000,000,000,000,000,000,000 | 7 | 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 event_join(IRC_SERVER_REC *server, const char *data, const char *nick, const char *address)
{
char *params, *channel, *tmp, *shortchan;
IRC_CHANNEL_REC *chanrec;
g_return_if_fail(data != NULL);
if (g_ascii_strcasecmp(nick, server->nick) != 0) {
/* someone else joined channel, no need to do anything ... | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 295,992,845,024,053,600,000,000,000,000,000,000,000 | 71 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
EnvmapAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version)
{
unsigned char tmp;
Xdr::read <StreamIO> (is, tmp);
_value = Envmap (tmp);
} | 0 | [] | openexr | 2da13029bf4abd3ed553a2eef7663acd2b637017 | 300,180,196,111,863,570,000,000,000,000,000,000,000 | 6 | suppress sanitizer warnings when writing invalid enums
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
TEST_F(AccessControlTest, validate_topic_access_ok_no_partitions)
{
topic_name = "HelloWorldTopic_no_partitions";
RTPSParticipantAttributes subscriber_participant_attr;
fill_subscriber_participant_security_attributes(subscriber_participant_attr);
check_local_datareader(subscriber_participant_attr, true... | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 90,535,763,324,278,140,000,000,000,000,000,000,000 | 14 | check remote permissions (#1387)
* Refs 5346. Blackbox test
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. one-way string compare
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. Do not add partition separator on last partition
Signed-off-by: Iker Luengo <ikerluengo@e... |
static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
{
int i;
uint16_t limit;
uint32_t freq;
VncDisplay *vd = vs->vd;
if (data[0] > 3) {
update_displaychangelistener(&vd->dcl, VNC_REFRESH_INTERVAL_BASE);
}
switch (data[0]) {
case VNC_MSG_CLIENT_SET_PIXEL_FORM... | 0 | [
"CWE-401"
] | qemu | 6bf21f3d83e95bcc4ba35a7a07cc6655e8b010b0 | 238,979,155,127,867,430,000,000,000,000,000,000,000 | 159 | vnc: fix memory leak when vnc disconnect
Currently when qemu receives a vnc connect, it creates a 'VncState' to
represent this connection. In 'vnc_worker_thread_loop' it creates a
local 'VncState'. The connection 'VcnState' and local 'VncState' exchange
data in 'vnc_async_encoding_start' and 'vnc_async_encoding_end'.
... |
EXPORTED void response_header(long code, struct transaction_t *txn)
{
time_t now;
char datestr[30];
unsigned keepalive;
const char **hdr;
struct auth_challenge_t *auth_chal;
struct resp_body_t *resp_body;
static struct buf log = BUF_INITIALIZER;
/* Stop method processing alarm */
ke... | 0 | [
"CWE-787"
] | cyrus-imapd | a5779db8163b99463e25e7c476f9cbba438b65f3 | 271,363,190,147,188,700,000,000,000,000,000,000,000 | 443 | HTTP: don't overrun buffer when parsing strings with sscanf() |
CtPtr ProtocolV2::send_client_ident() {
ldout(cct, 20) << __func__ << dendl;
if (!connection->policy.lossy && !client_cookie) {
client_cookie = ceph::util::generate_random_number<uint64_t>(1, -1ll);
}
uint64_t flags = 0;
if (connection->policy.lossy) {
flags |= CEPH_MSG_CONNECT_LOSSY;
}
auto cl... | 0 | [
"CWE-323"
] | ceph | 20b7bb685c5ea74c651ca1ea547ac66b0fee7035 | 183,556,391,680,520,970,000,000,000,000,000,000,000 | 38 | msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities
The secure mode uses AES-128-GCM with 96-bit nonces consisting of a
32-bit counter followed by a 64-bit salt. The counter is incremented
after processing each frame, the salt is fixed for the duration of
the session. Both are initialized from the sessio... |
static inline int init_emergency_isa_pool(void)
{
return 0;
} | 0 | [
"CWE-416"
] | linux | c3e2219216c92919a6bd1711f340f5faa98695e6 | 210,955,821,108,752,380,000,000,000,000,000,000,000 | 4 | block: free sched's request pool in blk_cleanup_queue
In theory, IO scheduler belongs to request queue, and the request pool
of sched tags belongs to the request queue too.
However, the current tags allocation interfaces are re-used for both
driver tags and sched tags, and driver tags is definitely host wide,
and doe... |
static char proto_method_implemented(const void *method)
{
return method == NULL ? 'n' : 'y';
} | 0 | [
"CWE-264"
] | linux-2.6 | df0bca049d01c0ee94afb7cd5dfd959541e6c8da | 223,818,774,076,486,300,000,000,000,000,000,000,000 | 4 | net: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2
In function sock_getsockopt() located in net/core/sock.c, optval v.val
is not correctly initialized and directly returned in userland in case
we have SO_BSDCOMPAT option set.
This dummy code should trigger the bug:
int main(void)
{
unsigned char buf... |
static int build_lut(int idx, mp_int* a, mp_int* modulus, mp_digit mp,
mp_int* mu)
{
int err;
unsigned x, y, bitlen, lut_gap;
mp_int tmp;
if (mp_init(&tmp) != MP_OKAY)
return GEN_MEM_ERR;
/* sanity check to make sure lut_order table is of correct size,
should compile out to a NOP if tr... | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 254,884,178,411,292,700,000,000,000,000,000,000,000 | 134 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
size_t ZSTD_estimateCDictSize_advanced(
size_t dictSize, ZSTD_compressionParameters cParams,
ZSTD_dictLoadMethod_e dictLoadMethod)
{
DEBUGLOG(5, "sizeof(ZSTD_CDict) : %u", (U32)sizeof(ZSTD_CDict));
return sizeof(ZSTD_CDict) + HUF_WORKSPACE_SIZE + ZSTD_sizeof_matchState(&cParams, /* forCCtx */ 0)... | 0 | [
"CWE-362"
] | zstd | 3e5cdf1b6a85843e991d7d10f6a2567c15580da0 | 84,495,962,659,105,580,000,000,000,000,000,000,000 | 8 | fixed T36302429 |
peer_flag_modify_vty (struct vty *vty, const char *ip_str,
u_int16_t flag, int set)
{
int ret;
struct peer *peer;
peer = peer_and_group_lookup_vty (vty, ip_str);
if (! peer)
return CMD_WARNING;
if (set)
ret = peer_flag_set (peer, flag);
else
ret = peer_flag_unset (peer, ... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 176,992,190,750,270,230,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... |
acl_fetch_url_port(struct proxy *px, struct session *l4, void *l7, int dir,
struct acl_expr *expr, struct acl_test *test)
{
struct http_txn *txn = l7;
if (!txn)
return 0;
if (txn->req.msg_state < HTTP_MSG_BODY)
return 0;
if (txn->rsp.msg_state != HTTP_MSG_RPBEFORE)
/* ensure the indexes are not affect... | 0 | [] | haproxy-1.4 | dc80672211e085c211f1fc47e15cfe57ab587d38 | 264,192,648,240,027,400,000,000,000,000,000,000,000 | 25 | 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... |
static void ext4_clear_journal_err(struct super_block *sb,
struct ext4_super_block *es)
{
journal_t *journal;
int j_errno;
const char *errstr;
BUG_ON(!EXT4_HAS_COMPAT_FEATURE(sb, EXT4_FEATURE_COMPAT_HAS_JOURNAL));
journal = EXT4_SB(sb)->s_journal;
/*
* Now check for any error status which may have bee... | 0 | [
"CWE-20"
] | linux-2.6 | 4ec110281379826c5cf6ed14735e47027c3c5765 | 170,757,079,087,134,740,000,000,000,000,000,000,000 | 33 | ext4: Add sanity checks for the superblock before mounting the filesystem
This avoids insane superblock configurations that could lead to kernel
oops due to null pointer derefences.
http://bugzilla.kernel.org/show_bug.cgi?id=12371
Thanks to David Maciejak at Fortinet's FortiGuard Global Security
Research Team who di... |
static void SRP_gN_free(SRP_gN_cache *gN_cache)
{
if (gN_cache == NULL)
return;
OPENSSL_free(gN_cache->b64_bn);
BN_free(gN_cache->bn);
OPENSSL_free(gN_cache);
} | 0 | [
"CWE-399"
] | openssl | 380f18ed5f140e0ae1b68f3ab8f4f7c395658d9e | 301,930,698,329,321,870,000,000,000,000,000,000,000 | 8 | CVE-2016-0798: avoid memory leak in SRP
The SRP user database lookup method SRP_VBASE_get_by_user had confusing
memory management semantics; the returned pointer was sometimes newly
allocated, and sometimes owned by the callee. The calling code has no
way of distinguishing these two cases.
Specifically, SRP servers t... |
static void sig_window_print_info(WINDOW_REC *win)
{
GUI_WINDOW_REC *gui;
gui = WINDOW_GUI(win);
if (gui->use_scroll) {
printformat_window(win, MSGLEVEL_CLIENTCRAP,
TXT_WINDOW_INFO_SCROLL,
gui->scroll ? "yes" : "no");
}
if (WINDOW_MAIN(win)->sticky_windows)
windows_print_sticky(wi... | 0 | [
"CWE-476"
] | irssi | 5b5bfef03596d95079c728f65f523570dd7b03aa | 127,906,625,410,562,500,000,000,000,000,000,000,000 | 14 | check the error condition of mainwindow_create |
template<typename tf, typename tp, typename tff>
CImg<T>& append_object3d(CImgList<tf>& primitives, const CImg<tp>& obj_vertices,
const CImgList<tff>& obj_primitives) {
if (!obj_vertices || !obj_primitives) return *this;
if (obj_vertices._height!=3 || obj_vertices._depth... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 219,924,895,227,521,450,000,000,000,000,000,000,000 | 33 | . |
static int is_ipv4(char *addr)
{
int ret;
struct in_addr ipv4_addr;
ret = inet_pton(AF_INET, addr, &ipv4_addr);
if (ret == 1)
return 1;
return 0;
} | 0 | [] | char-misc | 95a69adab9acfc3981c504737a2b6578e4d846ef | 192,574,070,053,300,020,000,000,000,000,000,000,000 | 11 | tools: hv: Netlink source address validation allows DoS
The source code without this patch caused hypervkvpd to exit when it processed
a spoofed Netlink packet which has been sent from an untrusted local user.
Now Netlink messages with a non-zero nl_pid source address are ignored
and a warning is printed into the sysl... |
PyParser_ASTFromFile(FILE *fp, const char *filename_str, const char* enc,
int start, const char *ps1,
const char *ps2, PyCompilerFlags *flags, int *errcode,
PyArena *arena)
{
mod_ty mod;
PyObject *filename;
filename = PyUnicode_DecodeFSDefault(f... | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 164,078,734,036,819,260,000,000,000,000,000,000,000 | 15 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
void ZRtp::generateKeysInitiator(ZrtpPacketDHPart *dhPart, ZIDRecord *zidRec) {
const uint8_t* setD[3];
int32_t rsFound = 0;
setD[0] = setD[1] = setD[2] = NULL;
detailInfo.secretsMatchedDH = 0;
if (memcmp(rs1IDr, dhPart->getRs1Id(), HMAC_SIZE) == 0 || memcmp(rs1IDr, dhPart->getRs2Id(), HMAC_SIZE) ... | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 86,662,034,805,643,710,000,000,000,000,000,000,000 | 154 | Fix vulnerabilities found and reported by Mark Dowd
- limit length of memcpy
- limit number of offered algorithms in Hello packet
- length check in PING packet
- fix a small coding error |
static void release_maps(struct bpf_verifier_env *env)
{
enum bpf_cgroup_storage_type stype;
int i;
for_each_cgroup_storage_type(stype) {
if (!env->prog->aux->cgroup_storage[stype])
continue;
bpf_cgroup_storage_release(env->prog,
env->prog->aux->cgroup_storage[stype]);
}
for (i = 0; i < env->used_map_c... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 | 5,682,820,866,065,269,000,000,000,000,000,000,000 | 15 | bpf: prevent out of bounds speculation on pointer arithmetic
Jann reported that the original commit back in b2157399cc98
("bpf: prevent out-of-bounds speculation") was not sufficient
to stop CPU from speculating out of bounds memory access:
While b2157399cc98 only focussed on masking array map access
for unprivileged ... |
static int tcm_loop_port_link(
struct se_portal_group *se_tpg,
struct se_lun *lun)
{
struct tcm_loop_tpg *tl_tpg = container_of(se_tpg,
struct tcm_loop_tpg, tl_se_tpg);
struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba;
atomic_inc(&tl_tpg->tl_tpg_port_count);
smp_mb__after_atomic_inc();
/*
* Add Linux/SCSI str... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 12f09ccb4612734a53e47ed5302e0479c10a50f8 | 152,135,986,032,515,970,000,000,000,000,000,000,000 | 18 | loopback: off by one in tcm_loop_make_naa_tpg()
This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result
in memory corruption.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org> |
rfbSendSetColourMapEntries(rfbClientPtr cl,
int firstColour,
int nColours)
{
char buf[sz_rfbSetColourMapEntriesMsg + 256 * 3 * 2];
rfbSetColourMapEntriesMsg *scme = (rfbSetColourMapEntriesMsg *)buf;
uint16_t *rgb = (uint16_t *)(&buf[sz_rfbSetColourMapEnt... | 0 | [
"CWE-119"
] | vino | dff52694a384fe95195f2211254026b752d63ec4 | 288,063,242,804,839,200,000,000,000,000,000,000,000 | 41 | Avoid out-of-bounds memory accesses
This fixes two critical security vulnerabilities that lead to an
out-of-bounds memory access with a crafted client framebuffer update
request packet. The dimensions of the update from the packet are checked
to ensure that they are within the screen dimensions.
Thanks to Kevin Chen ... |
static INLINE BOOL update_read_delta_rects(wStream* s, DELTA_RECT* rectangles, UINT32* nr)
{
UINT32 number = *nr;
UINT32 i;
BYTE flags = 0;
BYTE* zeroBits;
UINT32 zeroBitsSize;
if (number > 45)
{
WLog_WARN(TAG, "Invalid number of delta rectangles %" PRIu32, number);
return FALSE;
}
zeroBitsSize = ((numbe... | 0 | [
"CWE-125"
] | FreeRDP | 17f547ae11835bb11baa3d045245dc1694866845 | 101,133,367,027,060,670,000,000,000,000,000,000,000 | 65 | Fixed CVE-2020-11521: Out of bounds write in planar codec.
Thanks to Sunglin and HuanGMz from Knownsec 404 |
void dictRedisObjectDestructor(void *privdata, void *val)
{
DICT_NOTUSED(privdata);
if (val == NULL) return; /* Values of swapped out keys as set to NULL */
decrRefCount(val);
} | 0 | [
"CWE-20"
] | redis | 697af434fbeb2e3ba2ba9687cd283ed1a2734fa5 | 310,729,233,762,294,760,000,000,000,000,000,000,000 | 7 | initial changes needed to turn the current VM code into a cache system. Tons of work to do still. |
void smb_vfs_call_disconnect(struct vfs_handle_struct *handle)
{
VFS_FIND(disconnect);
handle->fns->disconnect_fn(handle);
} | 0 | [
"CWE-264"
] | samba | 4278ef25f64d5fdbf432ff1534e275416ec9561e | 172,441,793,392,162,360,000,000,000,000,000,000,000 | 5 | CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share).
Ensure matching component ends in '/' or '\0'.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org> |
inline void WriteWrap::OnDone(int status) {
stream()->EmitAfterWrite(this, status);
Dispose();
} | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 45,096,059,729,908,730,000,000,000,000,000,000,000 | 4 | src: use unique_ptr for WriteWrap
This commit attempts to avoid a use-after-free error by using unqiue_ptr
and passing a reference to it.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
PR-URL: https://github.com/nodejs-private/node-private/pull/238
Reviewed-By: Michael Dawson <... |
inline void Logistic(const int16* input_data, const Dims<4>& input_dims,
int16* output_data, const Dims<4>& output_dims) {
Logistic(DimsToShape(input_dims), input_data, DimsToShape(output_dims),
output_data);
} | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 276,757,247,460,980,850,000,000,000,000,000,000,000 | 5 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm)
{
int ret = 0;
int checkPathLen = 0;
int decrementMaxPathLen = 0;
word32 confirmOID = 0;
#if defined(WOLFSSL_RENESAS_TSIP)
int idx = 0;
#endif
byte* tsip_encRsaKeyIdx;
#ifdef WOLFSSL_CERT_REQ
int len = 0... | 1 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 76,159,483,721,445,150,000,000,000,000,000,000,000 | 430 | OCSP: improve handling of OCSP no check extension |
static inline u8 ip6_frag_ecn(const struct ipv6hdr *ipv6h)
{
return 1 << (ipv6_get_dsfield(ipv6h) & INET_ECN_MASK);
} | 0 | [
"CWE-20"
] | linux | 5d407b071dc369c26a38398326ee2be53651cfe4 | 34,735,423,131,014,820,000,000,000,000,000,000,000 | 4 | ip: frags: fix crash in ip_do_fragment()
A kernel crash occurrs when defragmented packet is fragmented
in ip_do_fragment().
In defragment routine, skb_orphan() is called and
skb->ip_defrag_offset is set. but skb->sk and
skb->ip_defrag_offset are same union member. so that
frag->sk is not NULL.
Hence crash occurrs in s... |
Item_ident::Item_ident(TABLE_LIST *view_arg, const char *field_name_arg)
:orig_db_name(NullS), orig_table_name(view_arg->table_name),
orig_field_name(field_name_arg), context(&view_arg->view->select_lex.context),
db_name(NullS), table_name(view_arg->alias),
field_name(field_name_arg),
alias_name_used(FALS... | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 82,577,427,657,587,960,000,000,000,000,000,000,000 | 11 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
static void desc_write_cb(struct gatt_db_attribute *attrib,
unsigned int id, uint16_t offset,
const uint8_t *value, size_t len,
uint8_t opcode, struct bt_att *att,
void *user_data)
{
struct external_desc *desc = user_data;
struct btd_device *device;
if (desc->attrib != attrib) {
error("Read ca... | 1 | [
"CWE-416"
] | bluez | 838c0dc7641e1c991c0f3027bf94bee4606012f8 | 268,911,625,822,842,700,000,000,000,000,000,000,000 | 44 | gatt: Fix not cleaning up when disconnected
There is a current use after free possible on a gatt server if a client
disconnects while a WriteValue call is being processed with dbus.
This patch includes the addition of a pending disconnect callback to handle
cleanup better if a disconnect occurs during a write, an acq... |
uchar *Field_enum::pack(uchar *to, const uchar *from, uint max_length)
{
DBUG_ENTER("Field_enum::pack");
DBUG_PRINT("debug", ("packlength: %d", packlength));
DBUG_DUMP("from", from, packlength);
DBUG_RETURN(pack_int(to, from, packlength));
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 249,695,294,445,304,360,000,000,000,000,000,000,000 | 7 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
char *
remove_backslashes (string)
char *string;
{
char *r, *ret, *s;
r = ret = (char *)xmalloc (strlen (string) + 1);
for (s = string; s && *s; )
{
if (*s == '\\')
s++;
if (*s == 0)
break;
*r++ = *s++;
}
*r = '\0';
return ret; | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 218,178,226,752,777,100,000,000,000,000,000,000,000 | 17 | Bash-4.4 patch 7 |
static void skb_xmit_done(struct virtqueue *vq)
{
struct virtnet_info *vi = vq->vdev->priv;
/* Suppress further interrupts. */
virtqueue_disable_cb(vq);
/* We were probably waiting for more output buffers. */
netif_wake_subqueue(vi->dev, vq2txq(vq));
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39 | 255,265,449,999,823,370,000,000,000,000,000,000,000 | 10 | virtio-net: drop NETIF_F_FRAGLIST
virtio declares support for NETIF_F_FRAGLIST, but assumes
that there are at most MAX_SKB_FRAGS + 2 fragments which isn't
always true with a fraglist.
A longer fraglist in the skb will make the call to skb_to_sgvec overflow
the sg array, leading to memory corruption.
Drop NETIF_F_FRA... |
static int ntop_inet_ntoa(lua_State* vm) {
u_int32_t ip;
struct in_addr in;
ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__);
if(lua_type(vm, 1) == LUA_TSTRING)
ip = atol((char*)lua_tostring(vm, 1));
else if(lua_type(vm, 1) == LUA_TNUMBER)
ip = (u_int32_t)lua_tonumber(vm, 1);
... | 0 | [
"CWE-254"
] | ntopng | 2e0620be3410f5e22c9aa47e261bc5a12be692c6 | 112,241,463,963,252,380,000,000,000,000,000,000,000 | 17 | Added security fix to avoid escalating privileges to non-privileged users
Many thanks to Dolev Farhi for reporting it |
ReadVariablesOp::ReadVariablesOp(OpKernelConstruction* c) : OpKernel(c) {
int n;
OP_REQUIRES_OK(c, c->GetAttr("N", &n));
OP_REQUIRES_OK(c, c->GetAttr("dtypes", &dtypes_));
OP_REQUIRES(c, n == dtypes_.size(),
errors::InvalidArgument(
"Mismatched number of arguments to ReadVariable... | 0 | [
"CWE-369"
] | tensorflow | ac117ee8a8ea57b73d34665cdf00ef3303bc0b11 | 126,747,826,703,454,400,000,000,000,000,000,000,000 | 9 | Prevent division by 0 in `resource_variable_ops.cc`
PiperOrigin-RevId: 387939939
Change-Id: Ib04902d63756633999959a70613f2eaa30c2c151 |
longlong Item_hex_hybrid::val_int()
{
// following assert is redundant, because fixed=1 assigned in constructor
DBUG_ASSERT(fixed == 1);
char *end=(char*) str_value.ptr()+str_value.length(),
*ptr=end-min(str_value.length(),sizeof(longlong));
ulonglong value=0;
for (; ptr != end ; ptr++)
value=(val... | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 55,256,551,618,546,520,000,000,000,000,000,000,000 | 12 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
void btrfs_wait_space_cache_v1_finished(struct btrfs_block_group *cache,
struct btrfs_caching_control *caching_ctl)
{
wait_event(caching_ctl->wait, space_cache_v1_done(cache));
} | 0 | [
"CWE-703",
"CWE-667"
] | linux | 1cb3db1cf383a3c7dbda1aa0ce748b0958759947 | 38,060,406,927,178,583,000,000,000,000,000,000,000 | 5 | btrfs: fix deadlock with concurrent chunk allocations involving system chunks
When a task attempting to allocate a new chunk verifies that there is not
currently enough free space in the system space_info and there is another
task that allocated a new system chunk but it did not finish yet the
creation of the respecti... |
static int perf_event_read(struct perf_event *event, bool group)
{
enum perf_event_state state = READ_ONCE(event->state);
int event_cpu, ret = 0;
/*
* If event is enabled and currently active on a CPU, update the
* value in the event structure:
*/
again:
if (state == PERF_EVENT_STATE_ACTIVE) {
struct perf_... | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 112,841,533,774,267,160,000,000,000,000,000,000,000 | 76 | perf/core: Fix a memory leak in perf_event_parse_addr_filter()
As shown through runtime testing, the "filename" allocation is not
always freed in perf_event_parse_addr_filter().
There are three possible ways that this could happen:
- It could be allocated twice on subsequent iterations through the loop,
- or leake... |
TEST_P(RemoteJwksIntegrationTest, WithGoodToken) {
initializeFilter(/*add_cluster=*/true);
codec_client_ = makeHttpConnection(lookupPort("http"));
auto response = codec_client_->makeHeaderOnlyRequest(Http::TestRequestHeaderMapImpl{
{":method", "GET"},
{":path", "/"},
{":scheme", "http"},
... | 0 | [
"CWE-476",
"CWE-703"
] | envoy | 9371333230b1a6e1be2eccf4868771e11af6253a | 227,892,865,794,258,200,000,000,000,000,000,000,000 | 32 | CVE-2021-43824
jwt_atuhn: fixed the crash when a CONNECT request is sent to JWT filter
configured with regex match.
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static void vhost_net_exit(void)
{
misc_deregister(&vhost_net_misc);
} | 0 | [
"CWE-399"
] | linux | dd7633ecd553a5e304d349aa6f8eb8a0417098c5 | 280,991,488,659,080,300,000,000,000,000,000,000,000 | 4 | vhost-net: fix use-after-free in vhost_net_flush
vhost_net_ubuf_put_and_wait has a confusing name:
it will actually also free it's argument.
Thus since commit 1280c27f8e29acf4af2da914e80ec27c3dbd5c01
"vhost-net: flush outstanding DMAs on memory change"
vhost_net_flush tries to use the argument after passing it
to ... |
Formattable::operator==(const Formattable& that) const
{
int32_t i;
if (this == &that) return TRUE;
// Returns FALSE if the data types are different.
if (fType != that.fType) return FALSE;
// Compares the actual data values.
UBool equal = TRUE;
switch (fType) {
case kDate:
equ... | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 13,633,830,339,472,481,000,000,000,000,000,000,000 | 50 | ICU-20246 Fixing another integer overflow in number parsing. |
void set_command(enum enum_server_command command)
{
m_command= command;
#ifdef HAVE_PSI_THREAD_INTERFACE
PSI_STATEMENT_CALL(set_thread_command)(m_command);
#endif
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 309,692,227,037,356,700,000,000,000,000,000,000,000 | 7 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
static int nfs4_xdr_dec_locku(struct rpc_rqst *rqstp, __be32 *p, struct nfs_locku_res *res)
{
struct xdr_stream xdr;
struct compound_hdr hdr;
int status;
xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
status = decode_compound_hdr(&xdr, &hdr);
if (status)
goto out;
status = decode_putfh(&xdr);
if (status)
go... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 214,702,888,656,355,400,000,000,000,000,000,000,000 | 17 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
static void sp_put(struct sixpack *sp)
{
if (refcount_dec_and_test(&sp->refcnt))
complete(&sp->dead);
} | 0 | [
"CWE-787"
] | linux | 19d1532a187669ce86d5a2696eb7275310070793 | 110,826,470,314,020,060,000,000,000,000,000,000,000 | 5 | net: 6pack: fix slab-out-of-bounds in decode_data
Syzbot reported slab-out-of bounds write in decode_data().
The problem was in missing validation checks.
Syzbot's reproducer generated malicious input, which caused
decode_data() to be called a lot in sixpack_decode(). Since
rx_count_cooked is only 400 bytes and noone... |
void net_inc_egress_queue(void)
{
static_branch_inc(&egress_needed_key);
} | 0 | [
"CWE-416"
] | linux | a4270d6795b0580287453ea55974d948393e66ef | 42,814,402,987,410,995,000,000,000,000,000,000,000 | 4 | net-gro: fix use-after-free read in napi_gro_frags()
If a network driver provides to napi_gro_frags() an
skb with a page fragment of exactly 14 bytes, the call
to gro_pull_from_frag0() will 'consume' the fragment
by calling skb_frag_unref(skb, 0), and the page might
be freed and reused.
Reading eth->h_proto at the en... |
static int unloadMem(const char *mem) {
free((char *)mem);
return(0);
} | 0 | [
"CWE-125"
] | libxml2 | a820dbeac29d330bae4be05d9ecd939ad6b4aa33 | 163,104,167,859,115,420,000,000,000,000,000,000,000 | 4 | Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605>
Reviewed by David Kilzer.
* HTMLparser.c:
(htmlParseName): Add bounds check.
(htmlParseNameComplex): Ditto.
* result/HTML/758605.html: Added.
* result/HTML/758605.html.err: Added.
* result/HTML/758605.html.s... |
static int vidioc_g_output(struct file *file, void *fh, unsigned int *i)
{
struct v4l2_loopback_device *dev = v4l2loopback_getdevice(file);
if (!dev->announce_all_caps && !dev->ready_for_output)
return -ENOTTY;
if (i)
*i = 0;
return 0;
} | 0 | [
"CWE-787"
] | v4l2loopback | 64a216af4c09c9ba9326057d7e78994271827eff | 26,340,941,670,725,823,000,000,000,000,000,000,000 | 9 | add explicit format specifier to printf() invocations
CWE-134 |
GF_Err gf_isom_set_media_type(GF_ISOFile *movie, u32 trackNumber, u32 new_type)
{
GF_TrackBox *trak = gf_isom_get_track_from_file(movie, trackNumber);
if (!trak || !new_type) return GF_BAD_PARAM;
trak->Media->handler->handlerType = new_type;
return GF_OK;
} | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 260,986,771,817,463,400,000,000,000,000,000,000,000 | 7 | fixed #1706 |
static int send_png_rect(VncState *vs, int x, int y, int w, int h,
VncPalette *palette)
{
png_byte color_type;
png_structp png_ptr;
png_infop info_ptr;
png_colorp png_palette = NULL;
int level = tight_png_conf[vs->tight.compression].png_zlib_level;
int filters = tight_pn... | 0 | [
"CWE-125"
] | qemu | 9f64916da20eea67121d544698676295bbb105a7 | 340,011,633,365,779,640,000,000,000,000,000,000,000 | 88 | pixman/vnc: use pixman images in vnc.
The vnc code uses *three* DisplaySurfaces:
First is the surface of the actual QemuConsole, usually the guest
screen, but could also be a text console (monitor/serial reachable via
Ctrl-Alt-<nr> keys). This is left as-is.
Second is the current server's view of the screen content... |
NOEXPORT LPTSTR log_txt(void) {
LPTSTR buff;
size_t ptr=0, len=0;
struct LIST *curr;
for(curr=head; curr; curr=curr->next)
len+=curr->len+2; /* +2 for trailing '\r\n' */
buff=str_alloc((len+1)*sizeof(TCHAR)); /* +1 for trailing '\0' */
for(curr=head; curr; curr=curr->next) {
mem... | 0 | [
"CWE-295"
] | stunnel | ebad9ddc4efb2635f37174c9d800d06206f1edf9 | 277,374,581,966,768,300,000,000,000,000,000,000,000 | 19 | stunnel-5.57 |
testSuite_SecureChannel(void) {
Suite *s = suite_create("SecureChannel");
TCase *tc_initAndDelete = tcase_create("Initialize and delete Securechannel");
tcase_add_checked_fixture(tc_initAndDelete, setup_funcs_called, teardown_funcs_called);
tcase_add_checked_fixture(tc_initAndDelete, setup_key_sizes, t... | 0 | [
"CWE-703",
"CWE-770"
] | open62541 | b79db1ac78146fc06b0b8435773d3967de2d659c | 16,928,894,200,164,885,000,000,000,000,000,000,000 | 48 | fix(plugin): Add default limits for chunks and message size
Based on a reported DoS vulnerability reported by Team82 (Claroty
Research). |
void test_delta_apply__read_at_off(void)
{
unsigned char base[16] = { 0 }, delta[] = { 0x10, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x00, 0x00 };
void *out;
size_t outlen;
cl_git_fail(git_delta_apply(&out, &outlen, base, sizeof(base), delta, sizeof(delta)));
} | 0 | [
"CWE-190",
"CWE-125"
] | libgit2 | 3f461902dc1072acb8b7607ee65d0a0458ffac2a | 335,089,237,054,905,770,000,000,000,000,000,000,000 | 8 | delta: fix sign-extension of big left-shift
Our delta code was originally adapted from JGit, which itself adapted it
from git itself. Due to this heritage, we inherited a bug from git.git
in how we compute the delta offset, which was fixed upstream in
48fb7deb5 (Fix big left-shifts of unsigned char, 2009-06-17). As
ex... |
static struct request *blk_old_get_request(struct request_queue *q,
unsigned int op, blk_mq_req_flags_t flags)
{
struct request *rq;
gfp_t gfp_mask = flags & BLK_MQ_REQ_NOWAIT ? GFP_ATOMIC : GFP_NOIO;
int ret = 0;
WARN_ON_ONCE(q->mq_ops);
/* create ioc upfront */
create_io_context(gfp_mask, q->node);
ret ... | 0 | [
"CWE-416",
"CWE-703"
] | linux | 54648cf1ec2d7f4b6a71767799c45676a138ca24 | 123,638,782,989,336,320,000,000,000,000,000,000,000 | 29 | block: blk_init_allocated_queue() set q->fq as NULL in the fail case
We find the memory use-after-free issue in __blk_drain_queue()
on the kernel 4.14. After read the latest kernel 4.18-rc6 we
think it has the same problem.
Memory is allocated for q->fq in the blk_init_allocated_queue().
If the elevator init function... |
static void cache_associativity(struct cacheinfo *this_leaf)
{
unsigned int line_size = this_leaf->coherency_line_size;
unsigned int nr_sets = this_leaf->number_of_sets;
unsigned int size = this_leaf->size;
/*
* If the cache is fully associative, there is no need to
* check the other properties.
*/
if (!(nr... | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 120,976,425,927,551,200,000,000,000,000,000,000,000 | 13 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
static gboolean notify_addressed_player_changed(gpointer user_data)
{
struct avrcp_player *player = user_data;
uint8_t events[6] = { AVRCP_EVENT_STATUS_CHANGED,
AVRCP_EVENT_TRACK_CHANGED,
AVRCP_EVENT_TRACK_REACHED_START,
AVRCP_EVENT_TRACK_REACHED_END,
AVRCP_EVENT_SETTINGS_CHANGED,
AVRCP_EVENT... | 0 | [
"CWE-200"
] | bluez | e2b0f0d8d63e1223bb714a9efb37e2257818268b | 173,230,427,241,108,450,000,000,000,000,000,000,000 | 26 | avrcp: Fix not checking if params_len match number of received bytes
This makes sure the number of bytes in the params_len matches the
remaining bytes received so the code don't end up accessing invalid
memory. |
void gdImageFill(gdImagePtr im, int x, int y, int nc)
{
int l, x1, x2, dy;
int oc; /* old pixel value */
int wx2,wy2;
int alphablending_bak;
/* stack of filled segments */
/* struct seg stack[FILL_MAX],*sp = stack;; */
struct seg *stack = NULL;
struct seg *sp;
if (!im->trueColor && nc > (im->colorsTotal -... | 0 | [
"CWE-190"
] | php-src | c395c6e5d7e8df37a21265ff76e48fe75ceb5ae6 | 31,247,908,747,070,423,000,000,000,000,000,000,000 | 94 | iFixed bug #72446 - Integer Overflow in gdImagePaletteToTrueColor() resulting in heap overflow |
static void verify(unsigned char *zl, zlentry *e) {
int len = ziplistLen(zl);
zlentry _e;
ZIPLIST_ENTRY_ZERO(&_e);
for (int i = 0; i < len; i++) {
memset(&e[i], 0, sizeof(zlentry));
zipEntry(ziplistIndex(zl, i), &e[i]);
memset(&_e, 0, sizeof(zlentry));
zipEntry(ziplist... | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 30,286,460,479,313,817,000,000,000,000,000,000,000 | 16 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
f_wincol(typval_T *argvars UNUSED, typval_T *rettv)
{
validate_cursor();
rettv->vval.v_number = curwin->w_wcol + 1;
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 205,869,184,458,334,300,000,000,000,000,000,000,000 | 5 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
static void io_req_task_queue_fail(struct io_kiocb *req, int ret)
{
percpu_ref_get(&req->ctx->refs);
req->result = ret;
req->task_work.func = io_req_task_cancel;
if (unlikely(io_req_task_work_add(req)))
io_req_task_work_add_fallback(req, io_req_task_cancel);
} | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 223,734,553,289,022,670,000,000,000,000,000,000,000 | 9 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
stl_remove_degenerate(stl_file *stl, int facet) {
int edge1;
int edge2;
int edge3;
int neighbor1;
int neighbor2;
int neighbor3;
int vnot1;
int vnot2;
int vnot3;
if (stl->error) return;
if( !memcmp(&stl->facet_start[facet].vertex[0],
&stl->facet_start[facet].vertex[1], sizeof(st... | 1 | [
"CWE-125"
] | admesh | e84d8353f1347e1f26f0a95770d92ba14e6ede38 | 141,682,010,662,553,050,000,000,000,000,000,000,000 | 76 | Fix heap buffer overflow in stl_update_connects_remove_1
- Add argument value check to the stl_update_connects_remove_1
- Add neighbor value check in stl_remove_degenerate
Fixes https://github.com/admesh/admesh/issues/28
Merges https://github.com/admesh/admesh/pull/55 |
on_name_acquired (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
g_debug ("Name acquired");
} | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | aeb6a7ab0abaac4a8f4ad98b3df476d9de6b8bd4 | 26,473,573,253,343,870,000,000,000,000,000,000,000 | 6 | portal: Convert --env in extra-args into --env-fd
This hides overridden variables from the command-line, which means
processes running under other uids can't see them in /proc/*/cmdline,
which might be important if they contain secrets.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of: https://github.com/fl... |
static int FNAME(walk_addr_generic)(struct guest_walker *walker,
struct kvm_vcpu *vcpu, struct kvm_mmu *mmu,
gpa_t addr, u32 access)
{
int ret;
pt_element_t pte;
pt_element_t __user *ptep_user;
gfn_t table_gfn;
u64 pt_access, pte_access;
unsigned index, accessed_dirty, pte_pkey;
unsigned nested_a... | 1 | [] | linux | b1bd5cba3306691c771d558e94baa73e8b0b96b7 | 253,399,993,870,561,550,000,000,000,000,000,000,000 | 200 | KVM: X86: MMU: Use the correct inherited permissions to get shadow page
When computing the access permissions of a shadow page, use the effective
permissions of the walk up to that point, i.e. the logic AND of its parents'
permissions. Two guest PxE entries that point at the same table gfn need to
be shadowed with di... |
void WebContents::OnFirstNonEmptyLayout(
content::RenderFrameHost* render_frame_host) {
if (render_frame_host == web_contents()->GetMainFrame()) {
Emit("ready-to-show");
}
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 193,338,094,969,674,300,000,000,000,000,000,000,000 | 6 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
f_ch_logfile(typval_T *argvars, typval_T *rettv UNUSED)
{
char_u *fname;
char_u *opt = (char_u *)"";
char_u buf[NUMBUFLEN];
/* Don't open a file in restricted mode. */
if (check_restricted() || check_secure())
return;
fname = tv_get_string(&argvars[0]);
if (argvars[1].v_type == VAR_STRING)... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 142,202,783,501,259,340,000,000,000,000,000,000,000 | 14 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
void expectHealthcheckStop(size_t index, int interval_ms = 0) {
if (interval_ms > 0) {
EXPECT_CALL(*test_sessions_[index]->interval_timer_,
enableTimer(std::chrono::milliseconds(interval_ms), _));
} else {
EXPECT_CALL(*test_sessions_[index]->interval_timer_, enableTimer(_, _));
... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 314,065,676,346,967,560,000,000,000,000,000,000,000 | 9 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
static MagickBooleanType WriteTXTImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
char
buffer[MagickPathExtent],
colorspace[MagickPathExtent],
tuple[MagickPathExtent];
MagickBooleanType
status;
MagickOffsetType
scene;
PixelInfo
pixel;
register const Qua... | 0 | [
"CWE-476"
] | ImageMagick | b61d35eaccc0a7ddeff8a1c3abfcd0a43ccf210b | 102,063,215,016,855,600,000,000,000,000,000,000,000 | 157 | https://github.com/ImageMagick/ImageMagick/issues/298 |
bind_keyseq_to_unix_command (line)
char *line;
{
Keymap kmap, cmd_xmap;
char *kseq, *value;
int i, kstart;
kmap = rl_get_keymap ();
/* We duplicate some of the work done by rl_parse_and_bind here, but
this code only has to handle `"keyseq": ["]command["]' and can
generate an error for anythin... | 0 | [
"CWE-273",
"CWE-787"
] | bash | 951bdaad7a18cc0dc1036bba86b18b90874d39ff | 309,488,687,232,502,900,000,000,000,000,000,000,000 | 49 | commit bash-20190628 snapshot |
HttpIntegrationTest::makeHttpConnection(Network::ClientConnectionPtr&& conn) {
auto codec = makeRawHttpConnection(std::move(conn));
EXPECT_TRUE(codec->connected()) << codec->connection()->transportFailureReason();
return codec;
} | 1 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 37,655,949,738,838,802,000,000,000,000,000,000,000 | 5 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static void tipc_node_write_unlock(struct tipc_node *n)
{
struct net *net = n->net;
u32 addr = 0;
u32 flags = n->action_flags;
u32 link_id = 0;
u32 bearer_id;
struct list_head *publ_list;
if (likely(!flags)) {
write_unlock_bh(&n->lock);
return;
}
addr = n->addr;
link_id = n->link_id;
bearer_id = link_i... | 0 | [] | linux | 0217ed2848e8538bcf9172d97ed2eeb4a26041bb | 326,656,340,971,105,500,000,000,000,000,000,000,000 | 41 | tipc: better validate user input in tipc_nl_retrieve_key()
Before calling tipc_aead_key_size(ptr), we need to ensure
we have enough data to dereference ptr->keylen.
We probably also want to make sure tipc_aead_key_size()
wont overflow with malicious ptr->keylen values.
Syzbot reported:
BUG: KMSAN: uninit-value in _... |
print_double_string (where, string1, size1, string2, size2)
const char *where;
const char *string1;
const char *string2;
int size1;
int size2;
{
int this_char;
if (where == NULL)
printf ("(null)");
else
{
if (FIRST_STRING_P (where))
{
for (this_char = where - s... | 0 | [
"CWE-190",
"CWE-252"
] | glibc | 2864e767053317538feafa815046fff89e5a16be | 318,569,831,848,160,780,000,000,000,000,000,000,000 | 25 | Update.
1999-11-09 Ulrich Drepper <drepper@cygnus.com>
* elf/dl-load.c (_dl_dst_count): Allow $ORIGIN to point to
directory with the reference since this is as secure as using the
object with the dependency.
(_dl_dst_substitute): Likewise.
* elf/dl-load.c (_dl_dst_count): Change strings in first two
strncmp ... |
test_dir_is_parent (GFile *child, GFile *root)
{
GFile *f;
f = g_file_dup (child);
while (f) {
if (g_file_equal (f, root)) {
g_object_unref (f);
return TRUE;
}
f = g_file_get_parent (f);
}
if (f) {
g_object_unref (f);
}
return FALSE;
} | 0 | [] | nautilus | ca2fd475297946f163c32dcea897f25da892b89d | 285,916,892,130,903,400,000,000,000,000,000,000,000 | 18 | Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file-operations.h:
Add nautilus_file_mark_desktop_file_trusted(), this now
adds a #! line if th... |
GF_Err trep_Read(GF_Box *s, GF_BitStream *bs)
{
GF_TrackExtensionPropertiesBox *ptr = (GF_TrackExtensionPropertiesBox *)s;
ptr->trackID = gf_bs_read_u32(bs);
ISOM_DECREASE_SIZE(ptr, 4);
return gf_isom_box_array_read(s, bs, gf_isom_box_add_default); | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 267,348,570,601,630,200,000,000,000,000,000,000,000 | 9 | prevent dref memleak on invalid input (#1183) |
static int mov_metadata_gnre(MOVContext *c, AVIOContext *pb,
unsigned len, const char *key)
{
short genre;
char buf[20];
avio_r8(pb); // unknown
genre = avio_r8(pb);
if (genre < 1 || genre > ID3v1_GENRE_MAX)
return 0;
snprintf(buf, sizeof(buf), "%s", ff_id3... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 689e59b7ffed34eba6159dcc78e87133862e3746 | 246,221,647,243,434,170,000,000,000,000,000,000,000 | 16 | mov: reset dref_count on realloc to keep values consistent.
This fixes a potential crash.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
ColumnType operator()(const std::string& str) const {
return TEXT_TYPE;
} | 0 | [
"CWE-77",
"CWE-295"
] | osquery | c3f9a3dae22d43ed3b4f6a403cbf89da4cba7c3c | 240,799,599,438,819,380,000,000,000,000,000,000,000 | 3 | Merge pull request from GHSA-4g56-2482-x7q8
* Proposed fix for attach tables vulnerability
* Add authorizer to ATC tables and cleanups
- Add unit test for authorizer function |
CImg<T>& load_bmp(const char *const filename) {
return _load_bmp(0,filename);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 297,085,263,952,973,600,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
e_mail_parser_application_smime_class_init (EMailParserExtensionClass *class)
{
class->mime_types = parser_mime_types;
class->priority = G_PRIORITY_LOW;
class->flags = E_MAIL_PARSER_EXTENSION_INLINE;
class->parse = empe_app_smime_parse;
} | 0 | [
"CWE-347"
] | evolution | f66cd3e1db301d264563b4222a3574e2e58e2b85 | 287,459,350,631,701,600,000,000,000,000,000,000,000 | 7 | eds-I#3 - [GPG] Mails that are not encrypted look encrypted
Related to https://gitlab.gnome.org/GNOME/evolution-data-server/issues/3 |
void mdri_box_del(GF_Box *s)
{
GF_OMADRMMutableInformationBox*ptr = (GF_OMADRMMutableInformationBox*)s;
if (ptr == NULL) return;
gf_free(ptr);
} | 0 | [
"CWE-703"
] | gpac | f19668964bf422cf5a63e4dbe1d3c6c75edadcbb | 226,510,643,113,290,900,000,000,000,000,000,000,000 | 6 | fixed #1879 |
int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n)
{
nfnl_lock(n->subsys_id);
if (table[n->subsys_id].subsys) {
nfnl_unlock(n->subsys_id);
return -EBUSY;
}
rcu_assign_pointer(table[n->subsys_id].subsys, n);
nfnl_unlock(n->subsys_id);
return 0;
} | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 227,417,630,667,085,770,000,000,000,000,000,000,000 | 12 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
int __init l2cap_init(void)
{
int err;
err = l2cap_init_sockets();
if (err < 0)
return err;
hci_register_cb(&l2cap_cb);
if (IS_ERR_OR_NULL(bt_debugfs))
return 0;
l2cap_debugfs = debugfs_create_file("l2cap", 0444, bt_debugfs,
NULL, &l2cap_debugfs_fops);
debugfs_create_u16("l2cap_le_max_credits",... | 0 | [
"CWE-787"
] | linux | e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3 | 288,526,483,686,531,430,000,000,000,000,000,000,000 | 23 | Bluetooth: Properly check L2CAP config option output buffer length
Validate the output buffer length for L2CAP config requests and responses
to avoid overflowing the stack buffer used for building the option blocks.
Cc: stable@vger.kernel.org
Signed-off-by: Ben Seri <ben@armis.com>
Signed-off-by: Marcel Holtmann <mar... |
GF_Err gf_isom_add_desc_to_root_od(GF_ISOFile *movie, const GF_Descriptor *theDesc)
{
GF_Err e;
GF_Descriptor *desc, *dupDesc;
e = CanAccessMovie(movie, GF_ISOM_OPEN_WRITE);
if (e) return e;
e = gf_isom_insert_moov(movie);
if (e) return e;
if (!movie->moov->iods) {
e = AddMovieIOD(movie->moov, 0);
if (e) r... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 322,192,589,819,187,200,000,000,000,000,000,000,000 | 35 | fixed #1706 |
rsvg_filter_draw (RsvgNode *node, gpointer impl, RsvgDrawingCtx *ctx, int dominate)
{
/* nothing; filters are drawn in rsvg-cairo-draw.c */
} | 0 | [
"CWE-369"
] | librsvg | ecf9267a24b2c3c0cd211dbdfa9ef2232511972a | 65,005,491,812,237,630,000,000,000,000,000,000,000 | 4 | bgo#783835 - Don't divide by zero in box_blur_line() for gaussian blurs
We were making the decision to use box blurs, instead of a true
Gaussian kernel, based on the size of *both* x and y dimensions. Do
them individually instead. |
evdns_request_len(const size_t name_len) {
return 96 + /* length of the DNS standard header */
name_len + 2 +
4; /* space for the resource type */
} | 0 | [
"CWE-125"
] | libevent | 96f64a022014a208105ead6c8a7066018449d86d | 330,042,883,147,253,370,000,000,000,000,000,000,000 | 5 | evdns: name_parse(): fix remote stack overread
@asn-the-goblin-slayer:
"the name_parse() function in libevent's DNS code is vulnerable to a buffer overread.
971 if (cp != name_out) {
972 if (cp + 1 >= end) return -1;
973 *cp++ = '.';
974 }
975 if (cp + ... |
parser_new_ecma_string_from_literal (lexer_literal_t *literal_p) /**< literal */
{
JERRY_ASSERT (literal_p != NULL);
ecma_string_t *new_string = NULL;
if (literal_p->status_flags & LEXER_FLAG_ASCII)
{
new_string = ecma_new_ecma_string_from_ascii (literal_p->u.char_p, literal_p->prop.length);
}
else
... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 319,258,187,591,423,820,000,000,000,000,000,000,000 | 17 | 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 |
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
const int num_inputs = NumInputs(node);
const bool is_soft_nms = num_inputs == 6;
if (num_inputs != 5 && num_inputs != 6) {
context->ReportError(context, "Found NMS op with invalid num inputs: %d",
NumInputs(node));
... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 204,456,633,387,614,400,000,000,000,000,000,000,000 | 109 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
static void iwl_trans_pcie_resume(struct iwl_trans *trans)
{
} | 0 | [
"CWE-476"
] | linux | 8188a18ee2e48c9a7461139838048363bfce3fef | 30,126,373,821,115,925,000,000,000,000,000,000,000 | 3 | iwlwifi: pcie: fix rb_allocator workqueue allocation
We don't handle failures in the rb_allocator workqueue allocation
correctly. To fix that, move the code earlier so the cleanup is
easier and we don't have to undo all the interrupt allocations in
this case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Sig... |
CJSON_PUBLIC(cJSON *) cJSON_CreateFloatArray(const float *numbers, int count)
{
size_t i = 0;
cJSON *n = NULL;
cJSON *p = NULL;
cJSON *a = NULL;
if ((count < 0) || (numbers == NULL))
{
return NULL;
}
a = cJSON_CreateArray();
for(i = 0; a && (i < (size_t)count); i++)
{
... | 0 | [
"CWE-754",
"CWE-787"
] | cJSON | be749d7efa7c9021da746e685bd6dec79f9dd99b | 45,718,277,879,458,030,000,000,000,000,000,000,000 | 35 | Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays |
find_lively_task_by_vpid(pid_t vpid)
{
struct task_struct *task;
rcu_read_lock();
if (!vpid)
task = current;
else
task = find_task_by_vpid(vpid);
if (task)
get_task_struct(task);
rcu_read_unlock();
if (!task)
return ERR_PTR(-ESRCH);
return task;
} | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 35,121,648,110,730,080,000,000,000,000,000,000,000 | 18 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... |
static int __init initialize_ptr_random(void)
{
int ret = add_random_ready_callback(&random_ready);
if (!ret) {
return 0;
} else if (ret == -EALREADY) {
fill_random_ptr_key(&random_ready);
return 0;
}
return ret;
} | 0 | [
"CWE-200"
] | linux | ad67b74d2469d9b82aaa572d76474c95bc484d57 | 121,675,690,711,524,100,000,000,000,000,000,000,000 | 13 | printk: hash addresses printed with %p
Currently there exist approximately 14 000 places in the kernel where
addresses are being printed using an unadorned %p. This potentially
leaks sensitive information regarding the Kernel layout in memory. Many
of these calls are stale, instead of fixing every call lets hash the
a... |
static void vcpu_pause(struct kvm_vcpu *vcpu)
{
wait_queue_head_t *wq = kvm_arch_vcpu_wq(vcpu);
wait_event_interruptible(*wq, !vcpu->arch.pause);
} | 0 | [
"CWE-399",
"CWE-284"
] | linux | e8180dcaa8470ceca21109f143876fdcd9fe050a | 206,152,756,396,764,270,000,000,000,000,000,000,000 | 6 | ARM: KVM: prevent NULL pointer dereferences with KVM VCPU ioctl
Some ARM KVM VCPU ioctls require the vCPU to be properly initialized
with the KVM_ARM_VCPU_INIT ioctl before being used with further
requests. KVM_RUN checks whether this initialization has been
done, but other ioctls do not.
Namely KVM_GET_REG_LIST will ... |
struct file *do_file_open_root(struct dentry *dentry, struct vfsmount *mnt,
const char *name, const struct open_flags *op)
{
struct nameidata nd;
struct file *file;
struct filename *filename;
int flags = op->lookup_flags | LOOKUP_ROOT;
nd.root.mnt = mnt;
nd.root.dentry = dentry;
if (d_is_symlink(dentry) && o... | 0 | [
"CWE-254"
] | linux | 397d425dc26da728396e66d392d5dcb8dac30c37 | 70,493,238,597,149,630,000,000,000,000,000,000,000 | 28 | vfs: Test for and handle paths that are unreachable from their mnt_root
In rare cases a directory can be renamed out from under a bind mount.
In those cases without special handling it becomes possible to walk up
the directory tree to the root dentry of the filesystem and down
from the root dentry to every other file ... |
void qpdf_set_r2_encryption_parameters(
qpdf_data qpdf, char const* user_password, char const* owner_password,
QPDF_BOOL allow_print, QPDF_BOOL allow_modify,
QPDF_BOOL allow_extract, QPDF_BOOL allow_annotate)
{
QTC::TC("qpdf", "qpdf-c called qpdf_set_r2_encryption_parameters");
qpdf->qpdf_writer->se... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 212,398,956,610,057,280,000,000,000,000,000,000,000 | 10 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static enum dc_status dce110_add_stream_to_ctx(
struct dc *dc,
struct dc_state *new_ctx,
struct dc_stream_state *dc_stream)
{
enum dc_status result = DC_ERROR_UNEXPECTED;
result = resource_map_pool_resources(dc, new_ctx, dc_stream);
if (result == DC_OK)
result = resource_map_clock_resources(dc, new_ctx, dc... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 104c307147ad379617472dd91a5bcb368d72bd6d | 139,515,056,366,780,740,000,000,000,000,000,000,000 | 18 | 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> |
static void nfnl_err_deliver(struct list_head *err_list, struct sk_buff *skb)
{
struct nfnl_err *nfnl_err, *next;
list_for_each_entry_safe(nfnl_err, next, err_list, head) {
netlink_ack(skb, nfnl_err->nlh, nfnl_err->err);
nfnl_err_del(nfnl_err);
}
} | 0 | [
"CWE-200",
"CWE-125"
] | linux | c58d6c93680f28ac58984af61d0a7ebf4319c241 | 139,509,393,597,070,710,000,000,000,000,000,000,000 | 9 | netfilter: nfnetlink: correctly validate length of batch messages
If nlh->nlmsg_len is zero then an infinite loop is triggered because
'skb_pull(skb, msglen);' pulls zero bytes.
The calculation in nlmsg_len() underflows if 'nlh->nlmsg_len <
NLMSG_HDRLEN' which bypasses the length validation and will later
trigger an ... |
TPMS_CREATION_INFO_Marshal(TPMS_CREATION_INFO *source, BYTE **buffer, INT32 *size)
{
UINT16 written = 0;
written += TPM2B_NAME_Marshal(&source->objectName, buffer, size);
written += TPM2B_DIGEST_Marshal(&source->creationHash, buffer, size);
return written;
} | 0 | [
"CWE-787"
] | libtpms | 3ef9b26cb9f28bd64d738bff9505a20d4eb56acd | 208,353,349,066,271,950,000,000,000,000,000,000,000 | 8 | tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks
Add maxSize parameter to TPM2B_Marshal and assert on it checking
the size of the data intended to be marshaled versus the maximum
buffer size.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.