mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: syzbot <syzbot+46bbbe175b7eea8036b8@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: [PATCH v1] Testing for a slub out of bounds and uaf...
Date: Sat, 03 Oct 2026 06:13:57 -0700	[thread overview]
Message-ID: <6ac0ff95.9ad129c8.3858c0.0017.GAE@google.com> (raw)
In-Reply-To: <6abeecdc.7503fbd6.2d3f6.0010.GAE@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.

***

Subject: [PATCH v1] Testing for a slub out of bounds and uaf...
Author: nsvatoslav515@gmail.com

#syz test

Signed-off-by: Svyatoslav Nikolenko <nsvatoslav515@gmail.com>
---
 fs/ecryptfs/keystore.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
index 51651314b7a6..b9cdafb98e45 100644
--- a/fs/ecryptfs/keystore.c
+++ b/fs/ecryptfs/keystore.c
@@ -19,6 +19,7 @@
 #include <linux/scatterlist.h>
 #include <linux/slab.h>
 #include "ecryptfs_kernel.h"
+#include <keys/user-type.h>
 
 /*
  * request_key returned an error instead of a valid key address;
@@ -738,6 +739,20 @@ ecryptfs_write_tag_70_packet(char *dest, size_t *remaining_bytes,
 		goto out_free_unlock;
 	}
 
+	struct user_key_payload *ukp = user_key_payload_locked(auth_tok_key);
+		if (!ukp || ukp->datalen < sizeof(struct ecryptfs_auth_tok)) {
+			printk(KERN_ERR "Error key payload too small\n");
+			rc = -EINVAL;
+			goto out_free_unlock;
+		}
+
+	if (s->auth_tok->token.password.session_key_encryption_key_bytes >
+			sizeof(s->auth_tok->token.password.session_key_encryption_key)) {
+		printk(KERN_ERR "Error FNEK key size too large\n");
+		rc = -EINVAL;
+		goto out_free_unlock;
+	}
+
 	md5(s->auth_tok->token.password.session_key_encryption_key,
 	    s->auth_tok->token.password.session_key_encryption_key_bytes,
 	    s->hash);
-- 
2.47.3


      parent reply	other threads:[~2026-10-03 13:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01 23:29 [syzbot] [ecryptfs?] KASAN: slab-out-of-bounds Read in md5_blocks syzbot
2026-10-03 11:06 ` Forwarded: [PATCH v1] Testing for a slub out of bounds syzbot
2026-10-03 13:05 ` Forwarded: [PATCH v1] Testing for a slub out of bounds and uaf syzbot
2026-10-03 13:13 ` syzbot [this message]

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=6ac0ff95.9ad129c8.3858c0.0017.GAE@google.com \
    --to=syzbot+46bbbe175b7eea8036b8@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®