Re: [PATCH] cifs: bound invalid NTLMSSP signature diagnostic

From: Namjae Jeon

Date: Mon Nov 02 2026 - 18:54:24 EST


On Mon, Nov 2, 2026 at 8:58 PM Yifan Zhang <yfzhang23@xxxxxxxxxxxxxx> wrote:
>
> 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")
> Signed-off-by: Yifan Zhang <yfzhang23@xxxxxxxxxxxxxx>

Reviewed-by: Namjae Jeon <linkinjeon@xxxxxxxxxx>

The patch is quoted-printable encoded, so we can not apply it.
Please send it as plain text, preferably using git send-email.
Thanks.