Files
linux/lib
Eric Biggers e073f1238e crypto: aes - Fix conditions for selecting MAC dependencies
Starting in commit 7137cbf2b5 ("crypto: aes - Add cmac, xcbc, and
cbcmac algorithms using library"), the aes module (CRYPTO_AES) supports
CBC based MACs using the corresponding library functions.

To avoid including unneeded functionality, that support honors the
existing CRYPTO_CMAC, CRYPTO_XCBC, and CRYPTO_CCM kconfig options.  The
dependencies are selected if at least one of those is enabled.

However, the select statements don't correctly handle the case where
CRYPTO_AES=y and (for example) CRYPTO_CMAC=m.  In that case the
dependencies get selected at level 'm', due to how the kconfig language
works.  That causes a linker error.

Fix this by changing the selection conditions to use '!= n'.

A similar issue also exists for CRYPTO_LIB_AES's conditional selection
of CRYPTO_LIB_UTILS.  The same '!= n' would work, but instead just make
CRYPTO_LIB_AES always select CRYPTO_LIB_UTILS.  CRYPTO_LIB_UTILS is
lightweight, and it's needed by most AES modes and many other things.

Fixes: 7137cbf2b5 ("crypto: aes - Add cmac, xcbc, and cbcmac algorithms using library")
Fixes: 309a7e514d ("lib/crypto: aes: Add support for CBC-based MACs")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260709022954.45113-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2026-07-09 11:06:22 -04:00
..
2025-03-16 22:30:49 -07:00
2025-04-11 17:32:37 -07:00
2026-03-05 22:16:08 -05:00
2021-08-19 09:02:55 +09:00
2023-02-02 22:50:01 -08:00
2023-02-02 22:50:01 -08:00
2021-01-03 20:05:18 -05:00
2021-08-19 09:02:55 +09:00
2024-10-14 16:33:24 -05:00
2026-01-11 06:09:11 -10:00
2026-02-27 16:40:16 +01:00
2021-07-08 11:48:20 -07:00
2021-06-18 11:43:09 +02:00
2026-03-24 13:39:53 -04:00
2025-03-25 10:18:31 -03:00
2026-04-18 00:10:48 -07:00
2024-12-09 13:48:29 -08:00
2025-09-13 16:54:46 -07:00