]> git.ipfire.org Git - thirdparty/openssl.git/commit
SPARC assembly: Don't file aes-cbc on T4 with small sizes.
authorSebastian Andrzej Siewior <sebastian@breakpoint.cc>
Tue, 8 Oct 2024 20:38:17 +0000 (22:38 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 14 Feb 2025 10:43:05 +0000 (11:43 +0100)
commitf01b0a9d01989ead56a5c4f72cb17756e01e1b64
tree074a4eddc42974d7401ff970567e426b0dfbfb09
parentc4802f718d28aad5eccb806599c9a3993bba784e
SPARC assembly: Don't file aes-cbc on T4 with small sizes.

The "openssl speed -testmode -seconds 1 -bytes 1 aes-128-cbc" test
revealed that the assembly code is crashing if length is less than 16.
The code shifts the provided length by 4 and than subtracts one until
the length hits zero. If it was already zero then it underflows the
counter and continues until it segfaults on reading or writing.

Replace the check against 0 with less than 15.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25637)

(cherry picked from commit c71c65b9222135a767c39a24cb254ed792d1c942)
crypto/perlasm/sparcv9_modes.pl