poly1305-ppc.pl: Fix vector register clobbering
authorRohan McLure <rmclure@linux.ibm.com>
Thu, 4 Jan 2024 09:25:50 +0000 (10:25 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 9 Jan 2024 14:46:39 +0000 (15:46 +0100)
commitf3fc5808fe9ff74042d639839610d03b8fdcc015
treedbe684b1b041b4eca36a93dfc0a57453638d7d90
parent01088602522015906654877ad2730ce805f3f925
poly1305-ppc.pl: Fix vector register clobbering

Fixes CVE-2023-6129

The POLY1305 MAC (message authentication code) implementation in OpenSSL for
PowerPC CPUs saves the the contents of vector registers in different order
than they are restored. Thus the contents of some of these vector registers
is corrupted when returning to the caller. The vulnerable code is used only
on newer PowerPC processors supporting the PowerISA 2.07 instructions.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23200)

(cherry picked from commit 8d847a3ffd4f0b17ee33962cf69c36224925b34f)
crypto/poly1305/asm/poly1305-ppc.pl