opnsense-src/sys/crypto
Mark Johnston 118b866d9c ossl: Fix some bugs in the fallback AES-GCM implementation
gcm_*_aesni() are used when the AVX512 implementation is not available.
Fix two bugs which manifest when handling operations spanning multiple
segments:
- Avoid underflow when the length of the input is smaller than the
  residual.
- In gcm_decrypt_aesni(), ensure that we begin the operation at the
  right offset into the input and output buffers.

Reviewed by:	jhb
Fixes:		9b1d87286c ("ossl: Add a fallback AES-GCM implementation using AES-NI")
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42838

(cherry picked from commit 47d767dab54895f3ba8abac6ab2295797394659e)
2023-12-03 12:48:09 -05:00
..
aesni Delete trailing whitespace from $FreeBSD$ removal 2023-08-21 19:37:28 -06:00
armv8 sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
blake2 sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
camellia sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ccp sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
chacha20 sys: Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:17 -06:00
des sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
libsodium sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
openssl ossl: Fix some bugs in the fallback AES-GCM implementation 2023-12-03 12:48:09 -05:00
rc4 sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
rijndael sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
sha2 sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
siphash sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
skein sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
via sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
chacha20_poly1305.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
chacha20_poly1305.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
curve25519.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
curve25519.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
intake.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
sha1.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
sha1.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00