* FAILED: patch "[PATCH] smb: client: bound invalid NTLMSSP signature diagnostic" failed to apply to 5.10-stable tree
@ 2026-11-25 11:10 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2026-11-25 11:10 UTC (permalink / raw)
To: yfzhang23, linkinjeon, pc; +Cc: stable
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x 0584b02669c3e76188097174b4f25ed13723e94c
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026112511-calamari-disabled-3216@gregkh' --subject-prefix 'PATCH 5.10.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 0584b02669c3e76188097174b4f25ed13723e94c Mon Sep 17 00:00:00 2001
From: Yifan Zhang <yfzhang23@stu.pku.edu.cn>
Date: Tue, 3 Nov 2026 10:45:19 +0800
Subject: [PATCH] smb: client: bound invalid NTLMSSP signature diagnostic
The NTLMSSP Signature field is an eight-byte binary value and need not be
NUL-terminated. decode_ntlmssp_challenge() prints it with %s on the
signature-mismatch path, so the diagnostic can continue beyond the received
blob until it encounters a zero byte.
KASAN reports:
BUG: KASAN: slab-out-of-bounds in string
Read of size 1
string
vsnprintf
_printk
decode_ntlmssp_challenge
Print the fixed-width field with the bounded hexadecimal format.
The patched kernel reaches the invalid-signature path and returns -EINVAL
without a KASAN report.
Fixes: 0b3cc858003b ("[CIFS] NTLMSSP reenabled after move from connect.c to sess.c")
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Yifan Zhang <yfzhang23@stu.pku.edu.cn>
Cc: stable@vger.kernel.org
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c
index c1fc90726e2d..fe006e9f2e10 100644
--- a/fs/smb/client/sess.c
+++ b/fs/smb/client/sess.c
@@ -666,8 +666,8 @@ int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len,
}
if (memcmp(pblob->Signature, "NTLMSSP", 8)) {
- cifs_dbg(VFS, "blob signature incorrect %s\n",
- pblob->Signature);
+ cifs_dbg(VFS, "%s: blob signature incorrect: %8phN\n",
+ __func__, pblob->Signature);
return -EINVAL;
}
if (pblob->MessageType != NtLmChallenge) {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-25 11:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 11:10 FAILED: patch "[PATCH] smb: client: bound invalid NTLMSSP signature diagnostic" failed to apply to 5.10-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox