func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg)
{
struct crypto_report_cipher rcipher;
memset(&rcipher, 0, sizeof(rcipher));
strscpy(rcipher.type, "cipher", sizeof(rcipher.type));
rcipher.blocksize = alg->cra_blocksize;
rcipher.min_keysize = alg->cra_cipher.cia_min_keysize;
rcipher... | 0 | [
"CWE-400",
"CWE-401"
] | linux | ffdde5932042600c6807d46c1550b28b0db6a3bc | 214,170,744,806,493,920,000,000,000,000,000,000,000 | 15 | crypto: user - fix memory leak in crypto_report
In crypto_report, a new skb is created via nlmsg_new(). This skb should
be released if crypto_report_alg() fails.
Fixes: a38f7907b926 ("crypto: Add userspace configuration API")
Cc: <stable@vger.kernel.org>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Sign... |
static cache_imgxtr_t *read_cache_imgextra(RBuffer *cache_buf, cache_hdr_t *hdr, cache_accel_t *accel) {
if (!cache_buf || !hdr || !hdr->imagesCount || !accel || !accel->imageExtrasCount || !accel->imagesExtrasOffset) {
return NULL;
}
ut64 size = sizeof (cache_imgxtr_t) * accel->imageExtrasCount;
cache_imgxtr_t ... | 0 | [
"CWE-787"
] | radare2 | c84b7232626badd075caf3ae29661b609164bac6 | 85,262,725,634,290,430,000,000,000,000,000,000,000 | 18 | Fix heap buffer overflow in dyldcache parser ##crash
* Reported by: Lazymio via huntr.dev
* Reproducer: dyldovf |
XML_GetCurrentLineNumber(XML_Parser parser)
{
if (parser == NULL)
return 0;
if (parser->m_eventPtr && parser->m_eventPtr >= parser->m_positionPtr) {
XmlUpdatePosition(parser->m_encoding, parser->m_positionPtr, parser->m_eventPtr, &parser->m_position);
parser->m_positionPtr = parser->m_eventPtr;
}
re... | 0 | [
"CWE-611"
] | libexpat | 11f8838bf99ea0a6f0b76f9760c43704d00c4ff6 | 204,777,995,046,234,170,000,000,000,000,000,000,000 | 10 | xmlparse.c: Fix extraction of namespace prefix from XML name (#186) |
/* {{{ proto boolean tidy_parse_file(string file [, mixed config_options [, string encoding [, bool use_include_path]]])
Parse markup in file or URI */
static PHP_FUNCTION(tidy_parse_file)
{
char *inputfile, *enc = NULL;
int input_len, contents_len, enc_len = 0;
zend_bool use_include_path = 0;
char *contents;
... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 307,063,990,585,411,130,000,000,000,000,000,000,000 | 36 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
TfLiteStatus SelectEval(TfLiteContext* context, TfLiteNode* node) {
OpData* data = reinterpret_cast<OpData*>(node->user_data);
const TfLiteTensor* input_condition;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTensorCondition,
&input_condition));
const Tf... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 216,332,183,269,925,000,000,000,000,000,000,000,000 | 66 | [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... |
bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
bool *error_reported, vcol_init_mode mode)
{
CHARSET_INFO *save_character_set_client= thd->variables.character_set_client;
CHARSET_INFO *save_collation= thd->variables.collation_connection;
Query_arena *backup_stmt_arena_ptr= t... | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 10,336,182,784,978,267,000,000,000,000,000,000,000 | 170 | 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... |
void zend_ts_hash_display(TsHashTable *ht)
{
begin_read(ht);
zend_hash_display(TS_HASH(ht));
end_read(ht);
} | 0 | [] | php-src | 24125f0f26f3787c006e4a51611ba33ee3b841cb | 113,782,425,310,263,800,000,000,000,000,000,000,000 | 6 | Fixed bug #68676 (Explicit Double Free) |
static int fixup_owner(u32 __user *uaddr, struct futex_q *q, int locked)
{
int ret = 0;
if (locked) {
/*
* Got the lock. We might not be the anticipated owner if we
* did a lock-steal - fix up the PI-state in that case:
*
* Speculative pi_state->owner read (we don't hold wait_lock);
* since we own t... | 0 | [
"CWE-190"
] | linux | fbe0e839d1e22d88810f3ee3e2f1479be4c0aa4a | 171,896,424,016,749,030,000,000,000,000,000,000,000 | 45 | futex: Prevent overflow by strengthen input validation
UBSAN reports signed integer overflow in kernel/futex.c:
UBSAN: Undefined behaviour in kernel/futex.c:2041:18
signed integer overflow:
0 - -2147483648 cannot be represented in type 'int'
Add a sanity check to catch negative values of nr_wake and nr_requeue.
... |
void genl_notify(const struct genl_family *family, struct sk_buff *skb,
struct genl_info *info, u32 group, gfp_t flags)
{
struct net *net = genl_info_net(info);
struct sock *sk = net->genl_sock;
int report = 0;
if (info->nlhdr)
report = nlmsg_report(info->nlhdr);
if (WARN_ON_ONCE(group >= family->n_mcgrps))... | 0 | [
"CWE-399",
"CWE-401"
] | linux | ceabee6c59943bdd5e1da1a6a20dc7ee5f8113a2 | 235,866,099,662,224,100,000,000,000,000,000,000,000 | 15 | genetlink: Fix a memory leak on error path
In genl_register_family(), when idr_alloc() fails,
we forget to free the memory we possibly allocate for
family->attrbuf.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 2ae0f17df1cd ("genetlink: use idr to track families")
Signed-off-by: YueHaibing <yuehaibing@huawei.com... |
static COMMANDS *find_command(char cmd_char)
{
DBUG_ENTER("find_command");
DBUG_PRINT("enter", ("cmd_char: %d", cmd_char));
int index= -1;
/*
In binary-mode, we disallow all mysql commands except '\C'
and DELIMITER.
*/
if (real_binary_mode)
{
if (cmd_char == 'C')
index= charset_index;
... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 197,280,146,743,163,100,000,000,000,000,000,000,000 | 27 | 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... |
format_packet_type_masked(struct ds *s, ovs_be32 value, ovs_be32 mask)
{
if (value == htonl(PT_ETH) && mask == OVS_BE32_MAX) {
ds_put_cstr(s, "eth");
} else {
ds_put_cstr(s, "packet_type=(");
put_u16_masked(s, pt_ns(value), pt_ns(mask));
ds_put_char(s, ',');
put_u16_maske... | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 251,707,534,769,639,450,000,000,000,000,000,000,000 | 12 | 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 int action_dev(struct multipath *m, struct dm_dev *dev,
action_fn action)
{
int r = -EINVAL;
struct pgpath *pgpath;
struct priority_group *pg;
list_for_each_entry(pg, &m->priority_groups, list) {
list_for_each_entry(pgpath, &pg->pgpaths, list) {
if (pgpath->path.dev == dev)
r = action(pgpat... | 0 | [
"CWE-284",
"CWE-264"
] | linux | ec8013beddd717d1740cfefb1a9b900deef85462 | 315,561,118,408,659,170,000,000,000,000,000,000,000 | 16 | dm: do not forward ioctls from logical volumes to the underlying device
A logical volume can map to just part of underlying physical volume.
In this case, it must be treated like a partition.
Based on a patch from Alasdair G Kergon.
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: dm-devel@redhat.com
Signed-off-by: Paolo ... |
GF_Err ilst_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
u32 sub_type;
GF_Box *a;
GF_ItemListBox *ptr = (GF_ItemListBox *)s;
while (ptr->size) {
/*if no ilst type coded, break*/
sub_type = gf_bs_peek_bits(bs, 32, 0);
if (sub_type) {
e = gf_isom_box_parse_ex(&a, bs, s->type, GF_FALSE);
/* the macr... | 0 | [
"CWE-476"
] | gpac | 6170024568f4dda310e98ef7508477b425c58d09 | 100,006,165,693,080,840,000,000,000,000,000,000,000 | 31 | fixed potential crash - cf #1263 |
void kvm_vcpu_wake_up(struct kvm_vcpu *vcpu)
{
struct swait_queue_head *wqp;
wqp = kvm_arch_vcpu_wq(vcpu);
if (swait_active(wqp)) {
swake_up(wqp);
++vcpu->stat.halt_wakeup;
}
} | 0 | [
"CWE-416",
"CWE-284"
] | linux | a0f1d21c1ccb1da66629627a74059dd7f5ac9c61 | 191,341,413,197,160,230,000,000,000,000,000,000,000 | 11 | KVM: use after free in kvm_ioctl_create_device()
We should move the ops->destroy(dev) after the list_del(&dev->vm_node)
so that we don't use "dev" after freeing it.
Fixes: a28ebea2adc4 ("KVM: Protect device ops->create and list_add with kvm->lock")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: ... |
static inline unsigned long ext4_blocks_for_truncate(struct inode *inode)
{
ext4_lblk_t needed;
needed = inode->i_blocks >> (inode->i_sb->s_blocksize_bits - 9);
/* Give ourselves just enough room to cope with inodes in which
* i_blocks is corrupt: we've seen disk corruptions in the past
* which resulted in ran... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 249,535,583,515,468,250,000,000,000,000,000,000,000 | 22 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
uint8_t llhttp_get_upgrade(llhttp_t* parser) {
return parser->upgrade;
} | 0 | [
"CWE-444"
] | node | af488f8dc82d69847992ea1cd2f53dc8082b3b91 | 7,900,514,791,029,941,000,000,000,000,000,000,000 | 3 | deps: update llhttp to 6.0.4
Refs: https://hackerone.com/reports/1238099
Refs: https://hackerone.com/reports/1238709
Refs: https://github.com/nodejs-private/llhttp-private/pull/6
Refs: https://github.com/nodejs-private/llhttp-private/pull/5
CVE-ID: CVE-2021-22959
CVE-ID: CVE-2021-22960
PR-URL: https://github.com/node... |
template<typename t>
CImgList<t>& move_to(CImgList<t>& list) {
list.assign(_width);
bool is_one_shared_element = false;
cimglist_for(*this,l) is_one_shared_element|=_data[l]._is_shared;
if (is_one_shared_element) cimglist_for(*this,l) list[l].assign(_data[l]);
else cimglist_for(*th... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 297,337,465,135,446,320,000,000,000,000,000,000,000 | 9 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void console_put_lf(QemuConsole *s)
{
TextCell *c;
int x, y1;
s->y++;
if (s->y >= s->height) {
s->y = s->height - 1;
if (s->y_displayed == s->y_base) {
if (++s->y_displayed == s->total_height)
s->y_displayed = 0;
}
if (++s->y_base == s... | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 185,034,930,154,483,900,000,000,000,000,000,000,000 | 45 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
void kvm_arch_flush_shadow_all(struct kvm *kvm)
{
kvm_mmu_invalidate_zap_all_pages(kvm);
} | 0 | [
"CWE-119",
"CWE-703",
"CWE-120"
] | linux | a08d3b3b99efd509133946056531cdf8f3a0c09b | 38,754,418,619,394,850,000,000,000,000,000,000,000 | 4 | kvm: x86: fix emulator buffer overflow (CVE-2014-0049)
The problem occurs when the guest performs a pusha with the stack
address pointing to an mmio address (or an invalid guest physical
address) to start with, but then extending into an ordinary guest
physical address. When doing repeated emulated pushes
emulator_re... |
parse_tcp_flags(struct dp_packet *packet)
{
const void *data = dp_packet_data(packet);
const char *frame = (const char *)data;
size_t size = dp_packet_size(packet);
ovs_be16 dl_type;
uint8_t nw_frag = 0, nw_proto = 0;
if (packet->packet_type != htonl(PT_ETH)) {
return 0;
}
dp_p... | 0 | [
"CWE-400"
] | ovs | abd7a457652e6734902720fe6a5dddb3fc0d1e3b | 286,654,947,125,408,720,000,000,000,000,000,000,000 | 63 | 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... |
new_connection (int sockin, int sockout, int nworkers)
{
struct connection *conn;
conn = calloc (1, sizeof *conn);
if (conn == NULL) {
perror ("malloc");
return NULL;
}
conn->status = 1;
conn->nworkers = nworkers;
conn->sockin = sockin;
conn->sockout = sockout;
pthread_mutex_init (&conn->req... | 0 | [
"CWE-406"
] | nbdkit | 22b30adb796bb6dca264a38598f80b8a234ff978 | 328,830,483,579,779,760,000,000,000,000,000,000,000 | 25 | server: Wait until handshake complete before calling .open callback
Currently we call the plugin .open callback as soon as we receive a
TCP connection:
$ nbdkit -fv --tls=require --tls-certificates=tests/pki null \
--run "telnet localhost 10809"
[...]
Trying ::1...
Connected to localhost.
Escape ... |
void CClient::Con_RemoveFavorite(IConsole::IResult *pResult, void *pUserData)
{
CClient *pSelf = (CClient *)pUserData;
NETADDR Addr;
if(net_addr_from_str(&Addr, pResult->GetString(0)) == 0)
pSelf->m_ServerBrowser.RemoveFavorite(Addr);
} | 0 | [
"CWE-119",
"CWE-787"
] | teeworlds | ff254722a2683867fcb3e67569ffd36226c4bc62 | 49,440,191,698,772,235,000,000,000,000,000,000,000 | 7 | added some checks to snap handling |
virDomainInputDefEquals(const virDomainInputDef *a,
const virDomainInputDef *b)
{
if (a->type != b->type)
return false;
if (a->bus != b->bus)
return false;
if (a->type == VIR_DOMAIN_INPUT_TYPE_PASSTHROUGH &&
STRNEQ_NULLABLE(a->source.evdev, b->source.evdev))... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 233,496,952,539,720,900,000,000,000,000,000,000,000 | 19 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
static void vrend_pause_render_condition(struct vrend_context *ctx, bool pause)
{
if (pause) {
if (ctx->sub->cond_render_q_id) {
if (has_feature(feat_gl_conditional_render))
glEndConditionalRender();
else if (has_feature(feat_nv_conditional_render))
glEndConditionalRen... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 237,657,565,892,780,100,000,000,000,000,000,000,000 | 20 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
static bool ide_error_needed(void *opaque)
{
IDEBus *bus = opaque;
return (bus->error_status != 0);
} | 0 | [
"CWE-189"
] | qemu | 940973ae0b45c9b6817bab8e4cf4df99a9ef83d7 | 198,398,560,495,665,380,000,000,000,000,000,000,000 | 6 | ide: Correct improper smart self test counter reset in ide core.
The SMART self test counter was incorrectly being reset to zero,
not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE:
* We would write off the beginning of a dynamically allocated buffer
* We forgot the SMART history
Fix this.
Signed-o... |
struct posix_acl *ceph_get_acl(struct inode *inode, int type)
{
int size;
const char *name;
char *value = NULL;
struct posix_acl *acl;
switch (type) {
case ACL_TYPE_ACCESS:
name = XATTR_NAME_POSIX_ACL_ACCESS;
break;
case ACL_TYPE_DEFAULT:
name = XATTR_NAME_POSIX_ACL_DEFAULT;
break;
default:
BUG();
}... | 0 | [
"CWE-862",
"CWE-285"
] | linux | 073931017b49d9458aa351605b43a7e34598caef | 270,722,059,436,537,080,000,000,000,000,000,000,000 | 40 | posix_acl: Clear SGID bit when setting file permissions
When file permissions are modified via chmod(2) and the user is not in
the owning group or capable of CAP_FSETID, the setgid bit is cleared in
inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file
permissions as well as the new ACL, but doesn't cl... |
* Malformed skbs with wrong lengths or invalid creds are not processed.
*/
static void
iscsi_if_rx(struct sk_buff *skb)
{
u32 portid = NETLINK_CB(skb).portid;
mutex_lock(&rx_queue_mutex);
while (skb->len >= NLMSG_HDRLEN) {
int err;
uint32_t rlen;
struct nlmsghdr *nlh;
struct iscsi_uevent *ev;
uint32_t g... | 0 | [
"CWE-787"
] | linux | ec98ea7070e94cc25a422ec97d1421e28d97b7ee | 301,574,115,642,297,700,000,000,000,000,000,000,000 | 51 | scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
As the iSCSI parameters are exported back through sysfs, it should be
enforcing that they never are more than PAGE_SIZE (which should be more
than enough) before accepting updates through netlink.
Change all iSCSI sysfs attributes to use sysfs_emit().
Cc:... |
MaybeObject* scheduled_exception() {
ASSERT(has_scheduled_exception());
return thread_local_top_.scheduled_exception_;
} | 0 | [
"CWE-20",
"CWE-119"
] | node | 530af9cb8e700e7596b3ec812bad123c9fa06356 | 7,308,156,554,961,466,000,000,000,000,000,000,000 | 4 | v8: Interrupts must not mask stack overflow.
Backport of https://codereview.chromium.org/339883002 |
Status RoleGraph::removePrivilegesFromRole(const RoleName& role,
const PrivilegeVector& privilegesToRemove) {
for (PrivilegeVector::const_iterator it = privilegesToRemove.begin();
it != privilegesToRemove.end();
++it) {
Status status = removePrivi... | 0 | [
"CWE-863"
] | mongo | 521e56b407ac72bc69a97a24d1253f51a5b6e81b | 305,353,460,127,234,400,000,000,000,000,000,000,000 | 12 | SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON |
int CMSEXPORT cmsIT8FindDataFormat(cmsHANDLE hIT8, const char* cSample)
{
cmsIT8* it8 = (cmsIT8*) hIT8;
_cmsAssert(hIT8 != NULL);
return LocateSample(it8, cSample);
} | 0 | [] | Little-CMS | 65e2f1df3495edc984f7e0d7b7b24e29d851e240 | 318,183,074,650,988,320,000,000,000,000,000,000,000 | 8 | Fix some warnings from static analysis |
execute_shell_function (var, words)
SHELL_VAR *var;
WORD_LIST *words;
{
int ret;
struct fd_bitmap *bitmap;
bitmap = new_fd_bitmap (FD_BITMAP_DEFAULT_SIZE);
begin_unwind_frame ("execute-shell-function");
add_unwind_protect (dispose_fd_bitmap, (char *)bitmap);
ret = execute_function (var, wo... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 320,269,598,586,962,970,000,000,000,000,000,000,000 | 18 | bash-4.4-rc2 release |
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
static char *set_ssl_option_unpack_path(const char *arg)
{
char *opt_var= NULL;
if (arg)
{
char *buff= (char *)my_malloc(FN_REFLEN + 1, MYF(MY_WME));
unpack_filename(buff, (char *)arg);
opt_var= my_strdup(buff, MYF(MY_WME));
my_free(buff);
... | 0 | [
"CWE-319"
] | mysql-server | 060b1eadf4913f7066484ea34ec62feead1bca44 | 58,755,005,422,557,810,000,000,000,000,000,000,000 | 12 | BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION
MYSQL_OPT_SSL_MODE option introduced.
It is set in case of --ssl-mode=REQUIRED and permits only SSL connection.
(cherry picked from commit 3b2d28578c526f347f5cfe763681eff365731f99) |
static void cil_reset_sens(struct cil_sens *sens)
{
/* during a re-resolve, we need to reset the categories associated with
* this sensitivity from a (sensitivitycategory) statement */
cil_list_destroy(&sens->cats_list, CIL_FALSE);
sens->ordered = CIL_FALSE;
} | 0 | [
"CWE-416"
] | selinux | f34d3d30c8325e4847a6b696fe7a3936a8a361f3 | 53,486,953,776,161,330,000,000,000,000,000,000,000 | 7 | libsepol/cil: Destroy classperms list when resetting classpermission
Nicolas Iooss reports:
A few months ago, OSS-Fuzz found a crash in the CIL compiler, which
got reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28648 (the title
is misleading, or is caused by another issue that conflicts with... |
GF_Box *rssr_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_ReceivedSsrcBox, GF_ISOM_BOX_TYPE_RSSR);
return (GF_Box *)tmp;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 101,304,937,369,391,060,000,000,000,000,000,000,000 | 5 | fixed #1587 |
pcm_reader_t *raw_open(pcm_io_context_t *io,
const pcm_sample_description_t *desc)
{
wav_reader_t *reader = 0;
if ((reader = calloc(1, sizeof(wav_reader_t))) == 0)
return 0;
memcpy(&reader->io, io, sizeof(pcm_io_context_t));
memcpy(&reader->sample_format, desc, sizeof(pcm... | 0 | [
"CWE-703"
] | fdkaac | 4ec1422bd951a137225ffa4052da120e2ab0a0f4 | 172,217,867,152,363,180,000,000,000,000,000,000,000 | 19 | wav/caf parser: ensure fmt/desc chunk
fixes https://github.com/nu774/fdkaac/issues/52 |
get_lisp_indent(void)
{
pos_T *pos, realpos, paren;
int amount;
char_u *that;
colnr_T col;
colnr_T firsttry;
int parencount, quotecount;
int vi_lisp;
// Set vi_lisp to use the vi-compatible method
vi_lisp = (vim_strchr(p_cpo, CPO_LISP) != NULL);
realpos = curwin->w_cursor;
... | 0 | [
"CWE-125"
] | vim | 8eba2bd291b347e3008aa9e565652d51ad638cfa | 38,334,499,758,378,930,000,000,000,000,000,000,000 | 186 | patch 8.2.5151: reading beyond the end of the line with lisp indenting
Problem: Reading beyond the end of the line with lisp indenting.
Solution: Avoid going over the NUL at the end of the line. |
static int nfs4_proc_unlink_done(struct rpc_task *task, struct inode *dir)
{
struct nfs_removeres *res = task->tk_msg.rpc_resp;
if (!nfs4_sequence_done(task, &res->seq_res))
return 0;
if (nfs4_async_handle_error(task, res->server, NULL) == -EAGAIN)
return 0;
update_changeattr(dir, &res->cinfo);
nfs_post_op_up... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 20e0fa98b751facf9a1101edaefbc19c82616a68 | 141,362,846,256,003,350,000,000,000,000,000,000,000 | 12 | Fix length of buffer copied in __nfs4_get_acl_uncached
_copy_from_pages() used to copy data from the temporary buffer to the
user passed buffer is passed the wrong size parameter when copying
data. res.acl_len contains both the bitmap and acl lenghts while
acl_len contains the acl length after adjusting for the bitmap... |
static void virtualdmabug_workaround(void)
{
int hard_sectors;
int end_sector;
if (CT(COMMAND) == FD_WRITE) {
COMMAND &= ~0x80; /* switch off multiple track mode */
hard_sectors = raw_cmd->length >> (7 + SIZECODE);
end_sector = SECTOR + hard_sectors - 1;
if (end_sector > SECT_PER_TRACK) {
pr_info("too m... | 0 | [
"CWE-264",
"CWE-754"
] | linux | ef87dbe7614341c2e7bfe8d32fcb7028cc97442c | 2,357,364,774,773,258,400,000,000,000,000,000,000 | 20 | floppy: ignore kernel-only members in FDRAWCMD ioctl input
Always clear out these floppy_raw_cmd struct members after copying the
entire structure from userspace so that the in-kernel version is always
valid and never left in an interdeterminate state.
Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
Signed-off-by: L... |
int cpia2_register_camera(struct camera_data *cam)
{
struct v4l2_ctrl_handler *hdl = &cam->hdl;
struct v4l2_ctrl_config cpia2_usb_alt = {
.ops = &cpia2_ctrl_ops,
.id = CPIA2_CID_USB_ALT,
.name = "USB Alternate",
.type = V4L2_CTRL_TYPE_INTEGER,
.min = USBIF_ISO_1,
.max = USBIF_ISO_6,
.step = 1,
};
int ... | 0 | [
"CWE-416"
] | linux | dea37a97265588da604c6ba80160a287b72c7bfd | 303,760,385,146,810,760,000,000,000,000,000,000,000 | 74 | media: cpia2: Fix use-after-free in cpia2_exit
Syzkaller report this:
BUG: KASAN: use-after-free in sysfs_remove_file_ns+0x5f/0x70 fs/sysfs/file.c:468
Read of size 8 at addr ffff8881f59a6b70 by task syz-executor.0/8363
CPU: 0 PID: 8363 Comm: syz-executor.0 Not tainted 5.0.0-rc8+ #3
Hardware name: QEMU Standard PC (i... |
http_raw_connect (http_t *r_hd, const char *server, unsigned short port,
unsigned int flags, const char *srvtag, unsigned int timeout)
{
gpg_error_t err = 0;
http_t hd;
cookie_t cookie;
*r_hd = NULL;
if ((flags & HTTP_FLAG_FORCE_TOR))
{
int mode;
if (assuan_sock_get_flag (... | 0 | [
"CWE-352"
] | gnupg | 4a4bb874f63741026bd26264c43bb32b1099f060 | 78,604,503,160,945,170,000,000,000,000,000,000,000 | 106 | dirmngr: Avoid possible CSRF attacks via http redirects.
* dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path.
(http_redir_info_t): New.
* dirmngr/http.c (do_parse_uri): Set new fields.
(same_host_p): New.
(http_prepare_redirect): New.
* dirmngr/t-http-basic.c: New test.
* dirmngr/ks-engine-hkp.c (send_re... |
dns_reset(void)
{
const or_options_t *options = get_options();
if (! server_mode(options)) {
if (!the_evdns_base) {
if (!(the_evdns_base = evdns_base_new(tor_libevent_get_base(), 0))) {
log_err(LD_BUG, "Couldn't create an evdns_base");
return -1;
}
}
evdns_base_clear_namese... | 0 | [
"CWE-399"
] | tor | 62637fa22405278758febb1743da9af562524d4c | 185,517,076,396,910,600,000,000,000,000,000,000,000 | 24 | Avoid hard (impossible?)-to-trigger double-free in dns_resolve()
Fixes 6480; fix on 0.2.0.1-alpha; based on pseudonymous patch. |
check_vars(char_u *name, int len)
{
int cc;
char_u *varname;
hashtab_T *ht;
if (eval_lavars_used == NULL)
return;
// truncate the name, so that we can use strcmp()
cc = name[len];
name[len] = NUL;
ht = find_var_ht(name, &varname);
if (ht == get_funccal_local_ht() || ht == get_fu... | 0 | [
"CWE-476"
] | vim | 0f6e28f686dbb59ab3b562408ab9b2234797b9b1 | 5,956,826,516,709,058,000,000,000,000,000,000,000 | 22 | patch 8.2.4428: crash when switching tabpage while in the cmdline window
Problem: Crash when switching tabpage while in the cmdline window.
Solution: Disallow switching tabpage when in the cmdline window. |
nouveau_sgdma_destroy(struct ttm_tt *ttm)
{
struct nouveau_sgdma_be *nvbe = (struct nouveau_sgdma_be *)ttm;
if (ttm) {
ttm_dma_tt_fini(&nvbe->ttm);
kfree(nvbe);
}
} | 0 | [] | linux | 5de5b6ecf97a021f29403aa272cb4e03318ef586 | 243,380,298,573,348,200,000,000,000,000,000,000,000 | 9 | drm/ttm/nouveau: don't call tt destroy callback on alloc failure.
This is confusing, and from my reading of all the drivers only
nouveau got this right.
Just make the API act under driver control of it's own allocation
failing, and don't call destroy, if the page table fails to
create there is nothing to cleanup here... |
void TfLiteTensorReset(TfLiteType type, const char* name, TfLiteIntArray* dims,
TfLiteQuantizationParams quantization, char* buffer,
size_t size, TfLiteAllocationType allocation_type,
const void* allocation, bool is_variable,
Tf... | 0 | [
"CWE-190"
] | tensorflow | 7c8cc4ec69cd348e44ad6a2699057ca88faad3e5 | 286,608,610,382,386,980,000,000,000,000,000,000,000 | 19 | Fix a dangerous integer overflow and a malloc of negative size.
PiperOrigin-RevId: 371254154
Change-Id: I250a98a3df26328770167025670235a963a72da0 |
need_type_where(
type_T *actual,
type_T *expected,
int offset,
where_T where,
cctx_T *cctx,
int silent,
int actual_is_const)
{
int ret;
if (expected == &t_bool && actual != &t_bool
&& (actual->tt_flags & TTFLAG_BOOL_OK))
{
// Using "0", "1" or the result of an expression with "&&" or "||" as a... | 0 | [
"CWE-416"
] | vim | 1889f499a4f248cd84e0e0bf6d0d820016774494 | 180,611,545,072,749,700,000,000,000,000,000,000,000 | 41 | patch 9.0.0221: accessing freed memory if compiling nested function fails
Problem: Accessing freed memory if compiling nested function fails.
Solution: Mess up the variable name so that it won't be found. |
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op2;
zval *result = &EX_T(opline->result.u.var).tmp_var;
compare_function(result,
_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
_get_zval_ptr_var(&opl... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 53,582,649,378,856,750,000,000,000,000,000,000,000 | 14 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
st_select_lex() : group_list_ptrs(NULL), braces(0), automatic_brackets(0),
n_sum_items(0), n_child_sum_items(0)
{} | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 34,567,955,010,183,137,000,000,000,000,000,000,000 | 3 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
int
routerinfo_has_curve25519_onion_key(const routerinfo_t *ri)
{
if (!ri) {
return 0;
}
if (!ri->onion_curve25519_pkey) {
return 0;
}
if (tor_mem_is_zero((const char*)ri->onion_curve25519_pkey->public_key,
CURVE25519_PUBKEY_LEN)) {
return 0;
}
return 1; | 0 | [] | tor | 1afc2ed956a35b40dfd1d207652af5b50c295da7 | 301,195,037,800,956,850,000,000,000,000,000,000,000 | 17 | Fix policies.c instance of the "if (r=(a-b)) return r" pattern
I think this one probably can't underflow, since the input ranges
are small. But let's not tempt fate.
This patch also replaces the "cmp" functions here with just "eq"
functions, since nothing actually checked for anything besides 0 and
nonzero.
Related... |
int kvm_get_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata)
{
return kvm_x86_ops->get_msr(vcpu, msr_index, pdata);
} | 0 | [
"CWE-476"
] | linux-2.6 | 59839dfff5eabca01cc4e20b45797a60a80af8cb | 331,269,476,681,060,450,000,000,000,000,000,000,000 | 4 | KVM: x86: check for cr3 validity in ioctl_set_sregs
Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity
checking for the new cr3 value:
"Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to
the kernel. This will trigger a NULL pointer access in gfn_to_rmap()
when userspace next tries... |
static inline struct bucket *__select_bucket(struct bpf_htab *htab, u32 hash)
{
return &htab->buckets[hash & (htab->n_buckets - 1)];
} | 0 | [
"CWE-787"
] | bpf | c4eb1f403243fc7bbb7de644db8587c03de36da6 | 113,422,073,299,139,320,000,000,000,000,000,000,000 | 4 | bpf: Fix integer overflow involving bucket_size
In __htab_map_lookup_and_delete_batch(), hash buckets are iterated
over to count the number of elements in each bucket (bucket_size).
If bucket_size is large enough, the multiplication to calculate
kvmalloc() size could overflow, resulting in out-of-bounds write
as repor... |
static int __check_func_call(struct bpf_verifier_env *env, struct bpf_insn *insn,
int *insn_idx, int subprog,
set_callee_state_fn set_callee_state_cb)
{
struct bpf_verifier_state *state = env->cur_state;
struct bpf_func_info_aux *func_info_aux;
struct bpf_func_state *caller, *callee;
int err;
bool ... | 0 | [
"CWE-787"
] | linux | 64620e0a1e712a778095bd35cbb277dc2259281f | 14,582,413,512,386,686,000,000,000,000,000,000,000 | 116 | bpf: Fix out of bounds access for ringbuf helpers
Both bpf_ringbuf_submit() and bpf_ringbuf_discard() have ARG_PTR_TO_ALLOC_MEM
in their bpf_func_proto definition as their first argument. They both expect
the result from a prior bpf_ringbuf_reserve() call which has a return type of
RET_PTR_TO_ALLOC_MEM_OR_NULL.
Meani... |
/* {{{ date_interval_format - */
static char *date_interval_format(char *format, int format_len, timelib_rel_time *t)
{
smart_str string = {0};
int i, length, have_format_spec = 0;
char buffer[33];
if (!format_len) {
return estrdup("");
}
for (i = 0; i < format_len... | 0 | [] | php-src | c377f1a715476934133f3254d1e0d4bf3743e2d2 | 274,109,465,612,168,800,000,000,000,000,000,000,000 | 59 | Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone) |
wrap_cursor(NCURSES_SP_DCL0)
{
if (eat_newline_glitch) {
/*
* xenl can manifest two different ways. The vt100 way is that, when
* you'd expect the cursor to wrap, it stays hung at the right margin
* (on top of the character just emitted) and doesn't wrap until the
* *next* graphic char is emitted. The c1... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 195,434,642,347,562,870,000,000,000,000,000,000,000 | 39 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
int llhttp__internal__c_update_type_1(
llhttp__internal_t* state,
const unsigned char* p,
const unsigned char* endp) {
state->type = 2;
return 0;
} | 0 | [
"CWE-444"
] | node | 641f786bb1a1f6eb1ff8750782ed939780f2b31a | 174,309,693,908,071,280,000,000,000,000,000,000,000 | 7 | http: unset `F_CHUNKED` on new `Transfer-Encoding`
Duplicate `Transfer-Encoding` header should be a treated as a single,
but with original header values concatenated with a comma separator. In
the light of this, even if the past `Transfer-Encoding` ended with
`chunked`, we should be not let the `F_CHUNKED` to leak int... |
static bool io_poll_remove_all(struct io_ring_ctx *ctx, struct task_struct *tsk)
{
struct hlist_node *tmp;
struct io_kiocb *req;
int posted = 0, i;
spin_lock_irq(&ctx->completion_lock);
for (i = 0; i < (1U << ctx->cancel_hash_bits); i++) {
struct hlist_head *list;
list = &ctx->cancel_hash[i];
hlist_for_eac... | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 297,079,066,113,570,000,000,000,000,000,000,000,000 | 23 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
dwg_decode_handleref (Bit_Chain *restrict dat, Dwg_Object *restrict obj,
Dwg_Data *restrict dwg)
{
// Welcome to the house of evil code
Dwg_Object_Ref *ref = (Dwg_Object_Ref *)calloc (1, sizeof (Dwg_Object_Ref));
if (!ref)
{
LOG_ERROR ("Out of memory");
return NULL;
}
... | 0 | [
"CWE-703",
"CWE-835"
] | libredwg | c6f6668b82bfe595899cc820279ac37bb9ef16f5 | 165,986,038,866,543,720,000,000,000,000,000,000,000 | 100 | cleanup tio.unknown
not needed anymore, we only have UNKNOWN_OBJ or UNKNOWN_ENT with full common
entity_data.
Fixes GH #178 heap_overflow2 |
virDomainDiskSetFormat(virDomainDiskDefPtr def, int format)
{
def->src->format = format;
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 329,948,786,413,387,100,000,000,000,000,000,000,000 | 4 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
void RGWGetObjLayout::pre_exec()
{
rgw_bucket_object_pre_exec(s);
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 270,639,522,108,798,130,000,000,000,000,000,000,000 | 4 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
void blk_mq_cancel_requeue_work(struct request_queue *q)
{
cancel_work_sync(&q->requeue_work);
} | 0 | [
"CWE-362",
"CWE-264"
] | linux | 0048b4837affd153897ed1222283492070027aa9 | 228,139,624,612,960,800,000,000,000,000,000,000,000 | 4 | blk-mq: fix race between timeout and freeing request
Inside timeout handler, blk_mq_tag_to_rq() is called
to retrieve the request from one tag. This way is obviously
wrong because the request can be freed any time and some
fiedds of the request can't be trusted, then kernel oops
might be triggered[1].
Currently wrt. ... |
void set_maybe_null(bool maybe_null_arg) { maybe_null= maybe_null_arg; } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 185,674,760,129,103,800,000,000,000,000,000,000,000 | 1 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
void html_txt(const char *txt)
{
const char *t = txt;
while (t && *t) {
int c = *t;
if (c == '<' || c == '>' || c == '&') {
html_raw(txt, t - txt);
if (c == '>')
html(">");
else if (c == '<')
html("<");
else if (c == '&')
html("&");
txt = t + 1;
}
t++;
}
if (t != txt)
... | 0 | [] | cgit | 513b3863d999f91b47d7e9f26710390db55f9463 | 159,894,586,269,621,180,000,000,000,000,000,000,000 | 20 | ui-shared: prevent malicious filename from injecting headers |
static u64 ___bpf_prog_run(u64 *regs, const struct bpf_insn *insn, u64 *stack)
{
u64 tmp;
#define BPF_INSN_2_LBL(x, y) [BPF_##x | BPF_##y] = &&x##_##y
#define BPF_INSN_3_LBL(x, y, z) [BPF_##x | BPF_##y | BPF_##z] = &&x##_##y##_##z
static const void *jumptable[256] = {
[0 ... 255] = &&default_label,
/* Now over... | 0 | [
"CWE-120"
] | linux | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | 136,067,320,281,823,900,000,000,000,000,000,000,000 | 417 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_ve... |
PJ_DEF(pjsip_transport_type_e) pjsip_transport_get_type_from_name(const pj_str_t *name)
{
unsigned i;
if (name->slen == 0)
return PJSIP_TRANSPORT_UNSPECIFIED;
/* Get transport type from name. */
for (i=0; i<PJ_ARRAY_SIZE(transport_names); ++i) {
if (pj_stricmp(name, &transport_names[i].name) == 0) {... | 0 | [
"CWE-297",
"CWE-295"
] | pjproject | 67e46c1ac45ad784db5b9080f5ed8b133c122872 | 146,329,064,282,032,470,000,000,000,000,000,000,000 | 17 | Merge pull request from GHSA-8hcp-hm38-mfph
* Check hostname during TLS transport selection
* revision based on feedback
* remove the code in create_request that has been moved |
Format a GMT date/time */
PHP_FUNCTION(gmdate)
{
php_date(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); | 0 | [] | php-src | c377f1a715476934133f3254d1e0d4bf3743e2d2 | 92,912,268,652,976,700,000,000,000,000,000,000,000 | 4 | Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone) |
UnicodeStringTest::TestUInt16Pointers() {
static const uint16_t carr[] = { 0x61, 0x62, 0x63, 0 };
uint16_t arr[4];
UnicodeString expected(u"abc");
assertEquals("abc from pointer", expected, UnicodeString(carr));
assertEquals("abc from pointer+length", expected, UnicodeString(carr, 3));
assertEq... | 0 | [
"CWE-190",
"CWE-787"
] | icu | b7d08bc04a4296982fcef8b6b8a354a9e4e7afca | 192,378,845,102,147,740,000,000,000,000,000,000,000 | 19 | ICU-20958 Prevent SEGV_MAPERR in append
See #971 |
pair_count(char *s, char delim)
{
int ndelim = 0;
while ((s = strchr(s, delim)) != NULL)
{
ndelim++;
s++;
}
return (ndelim % 2) ? ((ndelim + 1) / 2) : -1;
} | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 259,990,722,231,729,200,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... |
health_status_t Monitor::timecheck_status(ostringstream &ss,
const double skew_bound,
const double latency)
{
health_status_t status = HEALTH_OK;
assert(latency >= 0);
double abs_skew;
if (timecheck_has_skew(skew_bound, &abs_sk... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 53,061,293,081,157,370,000,000,000,000,000,000,000 | 16 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
TEST(ProtocolTruncatedDataTest, TuncatedString_Compact) {
TestStruct s;
s.a_string_ref() = "foobarbazstring";
testPartialDataHandling<CompactSerializer>(
s, 2 /* field & length header */ + s.a_string_ref()->size());
} | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | c9a903e5902834e95bbd4ab0e9fa53ba0189f351 | 238,979,889,144,708,420,000,000,000,000,000,000,000 | 7 | Better handling of truncated data when reading strings
Summary:
Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB).
This diff changes the logic to check if we have enough data in the buffer bef... |
static int ssl_parse_server_dh_params( mbedtls_ssl_context *ssl, unsigned char **p,
unsigned char *end )
{
int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE;
/*
* Ephemeral DH parameters:
*
* struct {
* opaque dh_p<1..2^16-1>;
* opaque dh_g<1.... | 0 | [
"CWE-119",
"CWE-125",
"CWE-295"
] | mbedtls | a1098f81c252b317ad34ea978aea2bc47760b215 | 72,754,880,238,229,140,000,000,000,000,000,000,000 | 34 | Add bounds check before signature length read |
virtual Item_func *get_item_func() { return NULL; } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 105,246,347,027,656,570,000,000,000,000,000,000,000 | 1 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
static int de_thread(struct task_struct *tsk)
{
struct signal_struct *sig = tsk->signal;
struct sighand_struct *oldsighand = tsk->sighand;
spinlock_t *lock = &oldsighand->siglock;
if (thread_group_empty(tsk))
goto no_thread_group;
/*
* Kill all other threads in the thread group.
*/
spin_lock_irq(lock);
i... | 0 | [
"CWE-401"
] | linux | f612acfae86af7ecad754ae6a46019be9da05b8e | 314,320,430,903,888,830,000,000,000,000,000,000,000 | 167 | exec: Fix mem leak in kernel_read_file
syzkaller report this:
BUG: memory leak
unreferenced object 0xffffc9000488d000 (size 9195520):
comm "syz-executor.0", pid 2752, jiffies 4294787496 (age 18.757s)
hex dump (first 32 bytes):
ff ff ff ff ff ff ff ff a8 00 00 00 01 00 00 00 ................
02 00 00 00 00... |
int rdbSaveRio(rio *rdb, int *error, int rdbflags, rdbSaveInfo *rsi) {
dictIterator *di = NULL;
dictEntry *de;
char magic[10];
int j;
uint64_t cksum;
size_t processed = 0;
if (server.rdb_checksum)
rdb->update_cksum = rioGenericUpdateChecksum;
snprintf(magic,sizeof(magic),"REDIS%... | 0 | [
"CWE-190"
] | redis | a30d367a71b7017581cf1ca104242a3c644dec0f | 230,607,242,829,093,140,000,000,000,000,000,000,000 | 89 | Fix Integer overflow issue with intsets (CVE-2021-32687)
The vulnerability involves changing the default set-max-intset-entries
configuration parameter to a very large value and constructing specially
crafted commands to manipulate sets |
njs_decode_base64(njs_str_t *dst, const njs_str_t *src)
{
njs_decode_base64_core(dst, src, njs_basis64);
} | 0 | [] | njs | 36f04a3178fcb6da8513cc3dbf35215c2a581b3f | 245,683,465,796,607,930,000,000,000,000,000,000,000 | 4 | Fixed String.prototype.replace() with byte strings.
This closes #522 issue on Github. |
int tw5864_video_init(struct tw5864_dev *dev, int *video_nr)
{
int i;
int ret;
unsigned long flags;
int last_dma_allocated = -1;
int last_input_nr_registered = -1;
for (i = 0; i < H264_BUF_CNT; i++) {
struct tw5864_h264_frame *frame = &dev->h264_buf[i];
frame->vlc.addr = dma_alloc_coherent(&dev->pci->dev,
... | 0 | [
"CWE-476"
] | linux | 2e7682ebfc750177a4944eeb56e97a3f05734528 | 335,682,544,170,083,500,000,000,000,000,000,000,000 | 150 | media: tw5864: Fix possible NULL pointer dereference in tw5864_handle_frame
'vb' null check should be done before dereferencing it in
tw5864_handle_frame, otherwise a NULL pointer dereference
may occur.
Fixes: 34d1324edd31 ("[media] pci: Add tw5864 driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-of... |
static void printPEEROpcodeVersion1(const uint8_t *buf)
{
char ext_addr[INET6_ADDRSTRLEN];
char peer_addr[INET6_ADDRSTRLEN];
syslog(LOG_DEBUG, "PCP PEER: v1 Opcode specific information. \n");
syslog(LOG_DEBUG, "Protocol: \t\t %d\n", (int)buf[0]);
syslog(LOG_DEBUG, "Internal port: \t\t %d\n", READNU16(buf + 4));
s... | 0 | [
"CWE-476"
] | miniupnp | cb8a02af7a5677cf608e86d57ab04241cf34e24f | 83,980,774,371,407,380,000,000,000,000,000,000,000 | 14 | pcpserver.c: copyIPv6IfDifferent() check for NULL src argument |
static int armpmu_runtime_suspend(struct device *dev)
{
struct arm_pmu_platdata *plat = dev_get_platdata(dev);
if (plat && plat->runtime_suspend)
return plat->runtime_suspend(dev);
return 0;
} | 0 | [
"CWE-20"
] | linux | c95eb3184ea1a3a2551df57190c81da695e2144b | 242,970,853,989,533,760,000,000,000,000,000,000,000 | 9 | ARM: 7809/1: perf: fix event validation for software group leaders
It is possible to construct an event group with a software event as a
group leader and then subsequently add a hardware event to the group.
This results in the event group being validated by adding all members
of the group to a fake PMU and attempting ... |
static void dev_seq_printf_stats(struct seq_file *seq, struct net_device *dev)
{
const struct net_device_stats *stats = dev_get_stats(dev);
seq_printf(seq, "%6s: %7lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu "
"%8lu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n",
dev->name, stats->rx_bytes, stats->rx_packets,
stat... | 0 | [
"CWE-399"
] | linux | 6ec82562ffc6f297d0de36d65776cff8e5704867 | 174,985,151,307,372,700,000,000,000,000,000,000,000 | 22 | veth: Dont kfree_skb() after dev_forward_skb()
In case of congestion, netif_rx() frees the skb, so we must assume
dev_forward_skb() also consume skb.
Bug introduced by commit 445409602c092
(veth: move loopback logic to common location)
We must change dev_forward_skb() to always consume skb, and veth to not
double fr... |
static gboolean request_timeout(gpointer user_data)
{
GDHCPClient *dhcp_client = user_data;
debug(dhcp_client, "request timeout (retries %d)",
dhcp_client->retry_times);
dhcp_client->retry_times++;
start_request(dhcp_client);
return FALSE;
} | 0 | [] | connman | a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1 | 198,488,165,223,959,400,000,000,000,000,000,000,000 | 13 | gdhcp: Avoid leaking stack data via unitiialized variable
Fixes: CVE-2021-26676 |
active_request(const struct intel_timeline * const tl, struct i915_request *rq)
{
struct i915_request *active = rq;
rcu_read_lock();
list_for_each_entry_continue_reverse(rq, &tl->requests, link) {
if (i915_request_completed(rq))
break;
active = rq;
}
rcu_read_unlock();
return active;
} | 0 | [] | linux | bc8a76a152c5f9ef3b48104154a65a68a8b76946 | 309,222,236,841,502,300,000,000,000,000,000,000,000 | 15 | drm/i915/gen9: Clear residual context state on context switch
Intel ID: PSIRT-TA-201910-001
CVEID: CVE-2019-14615
Intel GPU Hardware prior to Gen11 does not clear EU state
during a context switch. This can result in information
leakage between contexts.
For Gen8 and Gen9, hardware provides a mechanism for
fast clear... |
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
&opline->op2.u.constant TSRMLS_CC);
zval_dtor(fre... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 311,543,126,629,866,600,000,000,000,000,000,000,000 | 12 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
static int allocate_vpid(void)
{
int vpid;
if (!enable_vpid)
return 0;
spin_lock(&vmx_vpid_lock);
vpid = find_first_zero_bit(vmx_vpid_bitmap, VMX_NR_VPIDS);
if (vpid < VMX_NR_VPIDS)
__set_bit(vpid, vmx_vpid_bitmap);
else
vpid = 0;
spin_unlock(&vmx_vpid_lock);
return vpid;
} | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 159,634,770,161,450,350,000,000,000,000,000,000,000 | 15 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
void LibRaw::x3f_dpq_interpolate_af(int xstep, int ystep, int scale)
{
unsigned short *image = (ushort*)imgdata.rawdata.color3_image;
unsigned int rowpitch = imgdata.rawdata.sizes.raw_pitch/2; // in 16-bit words
// Interpolate single pixel
for(int y = 0; y < imgdata.rawdata.sizes.height+imgdata.rawdata.sizes.top_... | 0 | [
"CWE-787"
] | LibRaw | 8682ad204392b914ab1cc6ebcca9c27c19c1a4b4 | 56,617,629,691,686,415,000,000,000,000,000,000,000 | 55 | 0.18.17 |
mouse_set_hor_scroll_step(long step)
{
mouse_hor_step = step;
} | 0 | [
"CWE-476",
"CWE-703"
] | vim | 80525751c5ce9ed82c41d83faf9ef38667bf61b1 | 182,633,548,793,747,700,000,000,000,000,000,000,000 | 4 | patch 9.0.0259: crash with mouse click when not initialized
Problem: Crash with mouse click when not initialized.
Solution: Check TabPageIdxs[] is not NULL. |
static void cmd_dcc_get(const char *data)
{
cmd_dcc_receive(data, dcc_get_connect, dcc_get_passive);
} | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 217,691,504,448,549,640,000,000,000,000,000,000,000 | 4 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
update_stats_wait_start(struct cfs_rq *cfs_rq, struct sched_entity *se)
{
u64 wait_start, prev_wait_start;
if (!schedstat_enabled())
return;
wait_start = rq_clock(rq_of(cfs_rq));
prev_wait_start = schedstat_val(se->statistics.wait_start);
if (entity_is_task(se) && task_on_rq_migrating(task_of(se)) &&
lik... | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 63,132,301,482,180,820,000,000,000,000,000,000,000 | 16 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) re... |
xmlSchemaFreeAttributeUseProhib(xmlSchemaAttributeUseProhibPtr prohib)
{
if (prohib == NULL)
return;
xmlFree(prohib);
} | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 153,395,721,150,945,950,000,000,000,000,000,000,000 | 6 | 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. |
input_csi_dispatch_sm(struct input_ctx *ictx)
{
u_int i;
for (i = 0; i < ictx->param_list_len; i++) {
switch (input_get(ictx, i, 0, -1)) {
case -1:
break;
case 4: /* IRM */
screen_write_mode_set(&ictx->ctx, MODE_INSERT);
break;
case 34:
screen_write_mode_clear(&ictx->ctx, MODE_BLINKING);
brea... | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 100,856,539,311,366,270,000,000,000,000,000,000,000 | 20 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
void CWebServer::UploadFloorplanImage(WebEmSession & session, const request& req, std::string & redirect_uri)
{
redirect_uri = "/index.html";
if (session.rights != 2)
{
session.reply_status = reply::forbidden;
return; //Only admin user allowed
}
std::string planname = request::findValue(&req... | 0 | [
"CWE-89"
] | domoticz | ee70db46f81afa582c96b887b73bcd2a86feda00 | 10,080,325,698,222,378,000,000,000,000,000,000,000 | 22 | Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!) |
mk_ptr_t parse_referer_host(mk_ptr_t ref)
{
unsigned int i, beginHost, endHost;
mk_ptr_t host;
host.data = NULL;
host.len = 0;
// Find end of "protocol://"
for (i = 0; i < ref.len && !(ref.data[i] == '/' && ref.data[i+1] == '/'); i++);
if (i == ref.len) {
goto error;
}
begi... | 0 | [
"CWE-284",
"CWE-264"
] | monkey | 15f72c1ee5e0afad20232bdf0fcecab8d62a5d89 | 195,533,771,759,334,900,000,000,000,000,000,000,000 | 33 | Mandril: check decoded URI (fix #92)
Signed-off-by: Eduardo Silva <eduardo@monkey.io> |
static NTSTATUS shadow_copy2_get_nt_acl(vfs_handle_struct *handle,
const char *fname,
uint32_t security_info,
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
time_t timestamp;
char *stripped;
NTSTATUS status;
char *conv;
if (!shadow_copy2_strip_snapshot(talloc_tos(), handle, fname,... | 0 | [
"CWE-200"
] | samba | 675fd8d771f9d43e354dba53ddd9b5483ae0a1d7 | 223,988,421,825,485,360,000,000,000,000,000,000,000 | 29 | CVE-2015-5299: s3-shadow-copy2: fix missing access check on snapdir
Fix originally from <partha@exablox.com>
https://bugzilla.samba.org/show_bug.cgi?id=11529
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org> |
camel_pop3_stream_class_init (CamelPOP3StreamClass *class)
{
GObjectClass *object_class;
CamelStreamClass *stream_class;
object_class = G_OBJECT_CLASS (class);
object_class->dispose = pop3_stream_dispose;
object_class->finalize = pop3_stream_finalize;
stream_class = CAMEL_STREAM_CLASS (class);
stream_class->re... | 0 | [
"CWE-74"
] | evolution-data-server | ba82be72cfd427b5d72ff21f929b3a6d8529c4df | 94,808,941,589,050,370,000,000,000,000,000,000,000 | 16 | I#226 - CVE-2020-14928: Response Injection via STARTTLS in SMTP and POP3
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/226 |
void ring_buffer_record_enable_cpu(struct ring_buffer *buffer, int cpu)
{
struct ring_buffer_per_cpu *cpu_buffer;
if (!cpumask_test_cpu(cpu, buffer->cpumask))
return;
cpu_buffer = buffer->buffers[cpu];
atomic_dec(&cpu_buffer->record_disabled);
} | 0 | [
"CWE-190"
] | linux-stable | 59643d1535eb220668692a5359de22545af579f6 | 211,023,979,577,031,600,000,000,000,000,000,000,000 | 10 | ring-buffer: Prevent overflow of size in ring_buffer_resize()
If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE
then the DIV_ROUND_UP() will return zero.
Here's the details:
# echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb
tracing_entries_write() processes this... |
static int sync_helper(struct ImapData *idata, int right, int flag, const char *name)
{
int count = 0;
int rc;
char buf[LONG_STRING];
if (!idata->ctx)
return -1;
if (!mutt_bit_isset(idata->ctx->rights, right))
return 0;
if (right == MUTT_ACL_WRITE && !imap_has_flag(&idata->flags, name))
retur... | 0 | [
"CWE-78",
"CWE-77"
] | neomutt | 95e80bf9ff10f68cb6443f760b85df4117cb15eb | 15,491,715,748,963,585,000,000,000,000,000,000,000 | 29 | Quote path in imap_subscribe |
std::string Magick::Image::fileName(void) const
{
return(constOptions()->fileName());
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 156,026,984,758,469,430,000,000,000,000,000,000,000 | 4 | Added missing return to avoid use after free. |
NodeDef* AutoParallel::AddNodeDiv(const string& name, const string& input_a,
const string& input_b) {
NodeDef* node = graph_.add_node();
node->set_name(strings::StrCat(kAutoParallelPrefix, "-Div-", name));
node->set_op("RealDiv");
node->add_input(input_a);
node->add_input(inp... | 0 | [
"CWE-703",
"CWE-908"
] | tensorflow | 68867bf01239d9e1048f98cbad185bf4761bedd3 | 241,601,785,893,418,940,000,000,000,000,000,000,000 | 12 | Prevent unitialized variable use in grappler.
PiperOrigin-RevId: 399702928
Change-Id: Id7e75451fbff297692dfb687f60ea04b25c96b24 |
static int emitjump(JF, int opcode)
{
int inst;
emit(J, F, opcode);
inst = F->codelen;
emitarg(J, F, 0);
return inst;
} | 0 | [
"CWE-703",
"CWE-787"
] | mujs | df8559e7bdbc6065276e786217eeee70f28fce66 | 128,273,122,878,716,400,000,000,000,000,000,000,000 | 8 | Bug 704749: Clear jump list after patching jump addresses.
Since we can emit a statement multiple times when compiling try/finally
we have to use a new patch list for each instance. |
sym_equal(VALUE sym1, VALUE sym2)
{
if (sym1 == sym2) return Qtrue;
return Qfalse;
} | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 263,485,024,764,347,000,000,000,000,000,000,000,000 | 5 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
void SetUp() override {
clientAddr = folly::SocketAddress("127.0.0.1", 1000);
serverAddr = folly::SocketAddress("1.2.3.4", 8080);
clientConnectionId = getTestConnectionId();
initialDestinationConnectionId = clientConnectionId;
// change the initialDestinationConnectionId to be different
// to ... | 0 | [
"CWE-617",
"CWE-703"
] | mvfst | a67083ff4b8dcbb7ee2839da6338032030d712b0 | 208,053,871,480,868,750,000,000,000,000,000,000,000 | 60 | 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 |
static int dissect_CPMGetRowsetNotify(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, gboolean in, void *data _U_)
{
gint offset = 16;
proto_item *item;
proto_tree *tree;
col_append_str(pinfo->cinfo, COL_INFO, "GetRowsetNotify");
if (!in) {
item = proto_tree_add_item(parent_tree, hf_mswsp_msg, tvb, o... | 0 | [
"CWE-770"
] | wireshark | b7a0650e061b5418ab4a8f72c6e4b00317aff623 | 130,241,324,399,590,580,000,000,000,000,000,000,000 | 38 | MS-WSP: Don't allocate huge amounts of memory.
Add a couple of memory allocation sanity checks, one of which
fixes #17331. |
static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long elements, int objprops)
{
while (elements-- > 0) {
zval *key, *data, **old_data;
ALLOC_INIT_ZVAL(key);
if (!php_var_unserialize(&key, p, max, NULL TSRMLS_CC)) {
zval_dtor(key);
FREE_ZVAL(key);
return 0;
}
if (Z_TYPE_... | 1 | [] | php-src | df4bf28f9f104ca3ef78ed94b497859f15b004e5 | 233,316,303,358,119,950,000,000,000,000,000,000,000 | 66 | Fix bug #70219 (Use after free vulnerability in session deserializer) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.