freebsd-src/sys/crypto
Mark Johnston 5c0dac0b7a ossl: Keep mutable AES-GCM state on the stack
ossl(4)'s AES-GCM implementation keeps mutable state in the session
structure, together with the key schedule.  This was done for
convenience, as both are initialized together.  However, some OCF
consumers, particularly ZFS, assume that requests may be dispatched to
the same session in parallel.  Without serialization, this results in
incorrect output.

Fix the problem by explicitly copying per-session state onto the stack
at the beginning of each operation.

PR:		275306
Reviewed by:	jhb
Fixes:		9a3444d91c ("ossl: Add a VAES-based AES-GCM implementation for amd64")
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42783
2023-11-29 12:55:51 -05:00
..
aesni sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
armv8 sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
blake2 sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
camellia sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
ccp sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
chacha20 sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
des sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
libsodium sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
openssl ossl: Keep mutable AES-GCM state on the stack 2023-11-29 12:55:51 -05:00
rc4 sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
rijndael sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
sha2 sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
siphash sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
skein sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
via sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07: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: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
sha1.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00