]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
smb: client: Use MD5 library for M-F symlink hashing
authorEric Biggers <ebiggers@kernel.org>
Sun, 12 Oct 2025 01:57:34 +0000 (18:57 -0700)
committerSteve French <stfrench@microsoft.com>
Thu, 16 Oct 2025 03:10:28 +0000 (22:10 -0500)
commitae04b1bb06f8c1738d01dc2f9b9391c4480544e4
treefe414feb63d02de99f19cbc1ac9b68feba370145
parente05b3115e75381369be84abe5d46565ce0fcedc8
smb: client: Use MD5 library for M-F symlink hashing

Convert parse_mf_symlink() and format_mf_symlink() to use the MD5
library instead of a "md5" crypto_shash.  This is simpler and faster.
With the library there's no need to allocate memory, no need to handle
errors, and the MD5 code is accessed directly without inefficient
indirect calls and other unnecessary API overhead.

This also fixes an issue where these functions did not work on kernels
booted in FIPS mode.  The use of MD5 here is for data integrity rather
than a security purpose, so it can use a non-FIPS-approved algorithm.

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/Kconfig
fs/smb/client/link.c