freebsd-dev/sys/geom/eli
Mark Johnston 0fcafe8516 eli: Zero pad bytes that arise when certain auth algorithms are used
When authentication is configured, GELI ensures that the amount of data
per sector is a multiple of 16 bytes.  This is done in
eli_metadata_softc().  When the digest size is not a multiple of 16
bytes, this leaves some extra pad bytes at the end of every sector, and
they were not being zeroed before being written to disk.  In particular,
this happens with the HMAC/SHA1, HMAC/RIPEMD160 and HMAC/SHA384 data
authentication algorithms.

This change ensures that they are zeroed before being written to disk.

Reported by:	KMSAN
Reviewed by:	delphij, asomers
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31170
2021-07-15 12:23:04 -04:00
..
g_eli_crypto.c Add support for optional separate output buffers to in-kernel crypto. 2020-05-25 22:12:04 +00:00
g_eli_ctl.c geom: clean up empty lines in .c and .h files 2020-09-01 22:14:09 +00:00
g_eli_hmac.c geli: style nits 2019-06-12 19:29:48 +00:00
g_eli_integrity.c eli: Zero pad bytes that arise when certain auth algorithms are used 2021-07-15 12:23:04 -04:00
g_eli_key_cache.c Use zfree() instead of explicit_bzero() and free(). 2020-06-25 20:17:34 +00:00
g_eli_key.c Introduce the 'n' flag for the geli attach command. 2018-05-09 20:53:38 +00:00
g_eli_privacy.c opencrypto: Introduce crypto_dispatch_async() 2021-02-08 09:19:19 -05:00
g_eli.c Move kernel env global variables, etc to sys/kenv.h 2020-10-07 06:16:37 +00:00
g_eli.h We don't need the sc_ekeys_lock in standalone environment. 2020-09-14 23:51:14 +00:00
pkcs5v2.c geli: partially revert r348709 2019-06-12 19:29:12 +00:00
pkcs5v2.h geli: partially revert r348709 2019-06-12 19:29:12 +00:00