From: Michail Andreas Michalopoulos <mike.michalo@gmail.com>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
Tom Talpey <tom@talpey.com>,
ChenXiaoSong <chenxiaosong@chenxiaosong.com>,
linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org,
Michail Andreas Michalopoulos <mike.michalo@gmail.com>
Subject: [PATCH] ksmbd: select CRYPTO_AES
Date: Fri, 23 Oct 2026 02:40:45 +0200 [thread overview]
Message-ID: <20261023004045.98484-1-mike.michalo@gmail.com> (raw)
ksmbd allocates "gcm(aes)" and "ccm(aes)" AEAD transforms for SMB3
encryption, but SMB_SERVER only selects CRYPTO_GCM and CRYPTO_CCM, not
an AES cipher. With a configuration in which nothing else enables
CRYPTO_AES, ksmbd builds but cannot allocate the transforms, and every
session that uses encryption fails:
ksmbd: Failed to alloc encrypt aead : -2
ksmbd: crypto alloc failed
Select CRYPTO_AES, as the SMB client already does.
Fixes: a848c4f15ab6 ("cifsd: add Kconfig and Makefile")
Assisted-by: LLM
Signed-off-by: Michail Andreas Michalopoulos <mike.michalo@gmail.com>
---
On x86_64, defconfig plus SMB_SERVER=y ends up with CRYPTO_AES unset
once MAC80211, XFRM_ESP and CRYPTO_KRB5 are disabled; with this patch
olddefconfig enables it. Without CRYPTO_AES, ksmbd logs the messages
above when a client negotiates encryption (seen under UML on
ksmbd-for-next f75c93278608), and with CRYPTO_AES the same client
connects. Distribution configs already enable CRYPTO_AES, so this only
affects custom configs.
The smbtorture smb2 tests run here (dir, create, getinfo, setinfo,
rename, compound, streams, dosmode, read, lock) passed on the kernel
without CRYPTO_AES, as they do not negotiate encryption by default.
fs/smb/server/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/smb/server/Kconfig b/fs/smb/server/Kconfig
index b7665e0e494..f8b03605db5 100644
--- a/fs/smb/server/Kconfig
+++ b/fs/smb/server/Kconfig
@@ -16,6 +16,7 @@ config SMB_SERVER
select CRYPTO_AEAD2
select CRYPTO_CCM
select CRYPTO_GCM
+ select CRYPTO_AES
select ASN1
select OID_REGISTRY
select CRC32
--
2.43.0
next reply other threads:[~2026-10-23 0:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 0:40 Michail Andreas Michalopoulos [this message]
2026-10-23 1:43 ` Namjae Jeon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261023004045.98484-1-mike.michalo@gmail.com \
--to=mike.michalo@gmail.com \
--cc=chenxiaosong@chenxiaosong.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=senozhatsky@chromium.org \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®