]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
lib/crypto: arm/curve25519: Disable on CPU_BIG_ENDIAN
authorEric Biggers <ebiggers@kernel.org>
Tue, 11 Nov 2025 20:29:41 +0000 (12:29 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2025 21:12:34 +0000 (06:12 +0900)
commitc3ee48468bb4b0dac913047a2263e920713105cf
tree8b66376d3df40b451c93ae919b2967ecbac21afb
parente2e1f50fc5ebd2826c4e8c558dc65434382d0c0b
lib/crypto: arm/curve25519: Disable on CPU_BIG_ENDIAN

commit 44e8241c51f762aafa50ed116da68fd6ecdcc954 upstream.

On big endian arm kernels, the arm optimized Curve25519 code produces
incorrect outputs and fails the Curve25519 test.  This has been true
ever since this code was added.

It seems that hardly anyone (or even no one?) actually uses big endian
arm kernels.  But as long as they're ostensibly supported, we should
disable this code on them so that it's not accidentally used.

Note: for future-proofing, use !CPU_BIG_ENDIAN instead of
CPU_LITTLE_ENDIAN.  Both of these are arch-specific options that could
get removed in the future if big endian support gets dropped.

Fixes: d8f1308a025f ("crypto: arm/curve25519 - wire up NEON implementation")
Cc: stable@vger.kernel.org
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20251104054906.716914-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/crypto/Kconfig