All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@sina.com>
To: syzbot+b9529ebe6a9394ddf825@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [ecryptfs?] KASAN: slab-out-of-bounds Read in ecryptfs_verify_auth_tok_from_key
Date: Thu, 17 Sep 2026 09:53:17 +0800	[thread overview]
Message-ID: <20260917015317.975430-1-eadavis@sina.com> (raw)
In-Reply-To: <6aaabb70.86093f18.33004f.0003.GAE@google.com>

From: Edward Aadm Davis <eadavis@sina.com>

#syz test: upstream f6e7b42bf05b

diff --git a/security/keys/user_defined.c b/security/keys/user_defined.c
index 6f88b507f927..6bf3e2da7bda 100644
--- a/security/keys/user_defined.c
+++ b/security/keys/user_defined.c
@@ -61,7 +61,8 @@ int user_preparse(struct key_preparsed_payload *prep)
 	struct user_key_payload *upayload;
 	size_t datalen = prep->datalen;
 
-	if (datalen == 0 || datalen > 32767 || !prep->data)
+	if (datalen == 0 || datalen > 32767 || datalen < sizeof(*upayload) ||
+	    !prep->data)
 		return -EINVAL;
 
 	upayload = kmalloc_flex(*upayload, data, datalen);

  reply	other threads:[~2026-09-17  1:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 15:53 [syzbot] [ecryptfs?] KASAN: slab-out-of-bounds Read in ecryptfs_verify_auth_tok_from_key syzbot
2026-09-17  1:53 ` Edward Adam Davis [this message]
2026-09-17  2:10   ` syzbot
2026-09-17  2:22 ` Edward Adam Davis
2026-09-17  2:46   ` syzbot
2026-09-17  2:46 ` Forwarded: " syzbot
2026-09-17  2:54 ` syzbot
2026-09-17  3:04 ` syzbot
2026-09-17  3:15 ` syzbot
2026-09-17  3:36 ` syzbot
2026-09-17  3:39 ` [syzbot] [ecryptfs?] " Edward Adam Davis
2026-09-17  4:15   ` syzbot
2026-09-17  3:53 ` Forwarded: " syzbot
2026-10-13  6:03 ` [syzbot] [ecryptfs?] " Tyler Hicks
2026-10-13  6:23   ` syzbot
     [not found] <CAFJkwZxO+=cYaCFSAEejhBgJeiJczxuua1y0+Dcs1Fj5Sg_vaw@mail.gmail.com>
2026-09-17  2:48 ` syzbot
     [not found] <CAFJkwZw6b0pX7rft72ke0A3d1UauhQR5kh+tWXg9xKT4CDikEg@mail.gmail.com>
2026-09-17  2:56 ` syzbot
     [not found] <CAFJkwZxNQWU=x4gLojE-jhi82Y4hFj=p2wrK6QK2EBCf69r3nQ@mail.gmail.com>
2026-09-17  3:06 ` syzbot
     [not found] <CAFJkwZx1RyUmXg4RNqQPKVCdyu4-N_4G_JhtL7xGihU5RFnnqw@mail.gmail.com>
2026-09-17  3:31 ` syzbot
     [not found] <CAFJkwZzcu4-z0b+nc4Ki0DjaL3=DWfE7mXgfjL0VK6RL8AK36w@mail.gmail.com>
2026-09-17  3:52 ` syzbot
     [not found] <CAFJkwZw8hjL7xSTayRqbVS37RYYENU5XFTgT0b90J05dG3gVXg@mail.gmail.com>
2026-09-17  4:39 ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260917015317.975430-1-eadavis@sina.com \
    --to=eadavis@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+b9529ebe6a9394ddf825@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.