Browse Source

crypto/poly1305/asm: fix armv8 pointer authentication

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 armv8 code got this wrong, resulting in crashes on PAC
capable hardware.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13256)
master
Ard Biesheuvel 2 years ago
committed by Tomas Mraz
parent
commit
fcf6e9d056
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      crypto/poly1305/asm/poly1305-armv8.pl

+ 1
- 1
crypto/poly1305/asm/poly1305-armv8.pl View File

@ -866,8 +866,8 @@ poly1305_blocks_neon:
st1 {$ACC4}[0],[$ctx]
.Lno_data_neon:
.inst 0xd50323bf // autiasp
ldr x29,[sp],#80
.inst 0xd50323bf // autiasp
ret
.size poly1305_blocks_neon,.-poly1305_blocks_neon


Loading…
Cancel
Save