]> git.ipfire.org Git - thirdparty/linux.git/commit
smb: client: Compare MACs in constant time
authorEric Biggers <ebiggers@kernel.org>
Wed, 18 Feb 2026 04:27:02 +0000 (20:27 -0800)
committerSteve French <stfrench@microsoft.com>
Wed, 4 Mar 2026 02:56:36 +0000 (20:56 -0600)
commit26bc83b88bbbf054f0980a4a42047a8d1e210e4c
tree44acc0de73a5c17e95a83a5727d5c45ce778628d
parent8098179dc981c361c4ff238bc3935329a93bbdfb
smb: client: 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: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb1encrypt.c
fs/smb/client/smb2transport.c