]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 4 Jan 2021 15:36:34 +0000 (16:36 +0100)
commit70865153dba7a1387730dc936db1b7755face955
tree6248a5dbc765225a845607aee686dad523ad7087
parent1428cd4739fbbab753943ecfbb7bfb7d60bc6dbb
crypto: arm64/poly1305-neon - reorder PAC authentication with SP update

BugLink: https://bugs.launchpad.net/bugs/1910111
[ Upstream commit 519a0d7e495a6d3ce62594e485aea2a3a4a2ca0a ]

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: f569ca164751 ("crypto: arm64/poly1305 - incorporate OpenSSL/CRYPTOGAMS ...")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
arch/arm64/crypto/poly1305-armv8.pl
arch/arm64/crypto/poly1305-core.S_shipped