]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: arm64/poly1305-neon - reorder PAC authentication with SP update
authorArd Biesheuvel <ardb@kernel.org>
Mon, 26 Oct 2020 23:00:27 +0000 (00:00 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 6 Nov 2020 03:29:11 +0000 (14:29 +1100)
commit3a6124b9669c82ab4775a5a6cf2738aeb696d7cd
treed386150e9c60b6cee7b6f506cae01da5e38207c4
parentd452309452b703904629db89ab23f7af52cfce23
crypto: arm64/poly1305-neon - reorder PAC authentication with SP update

PAC pointer authentication signs the return address against the value
of the stack pointer, to prevent stack overrun exploits from corrupting
the control flow. However, this requires that the AUTIASP is issued with
SP holding the same value as it held when the PAC value was generated.
The Poly1305 NEON code got this wrong, resulting in crashes on PAC
capable hardware.

Fixes: 80f996392bcc ("crypto: arm64/poly1305 - incorporate OpenSSL/CRYPTOGAMS ...")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/poly1305-armv8.pl
arch/arm64/crypto/poly1305-core.S_shipped