]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ksmbd: Compare MACs in constant time
authorEric Biggers <ebiggers@kernel.org>
Wed, 18 Feb 2026 04:28:29 +0000 (20:28 -0800)
committerSteve French <stfrench@microsoft.com>
Mon, 23 Feb 2026 03:27:28 +0000 (21:27 -0600)
commitc5794709bc9105935dbedef8b9cf9c06f2b559fa
treea942924745e9f909b3555e094b4db81cfcca2f00
parent6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
ksmbd: Compare MACs in constant time

To prevent timing attacks, MAC comparisons need to be constant-time.
Replace the memcmp() with the correct function, crypto_memneq().

Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/Kconfig
fs/smb/server/auth.c
fs/smb/server/smb2pdu.c