freebsd-dev/sys/geom
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
..
bde gbde: replace malloc_last_fail with a kludge 2020-11-12 20:20:57 +00:00
cache Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
concat gconcat: Zero the metadata block before writing 2021-07-13 17:45:59 -04:00
eli eli: Zero pad bytes that arise when certain auth algorithms are used 2021-07-15 12:23:04 -04:00
gate geom: clean up empty lines in .c and .h files 2020-09-01 22:14:09 +00:00
journal Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
label geom_label: Remove an old sysinstall(8) workaround 2021-07-05 16:15:32 +01:00
linux_lvm Make g_attach() return ENXIO for orphaned providers; update various 2020-10-18 16:24:08 +00:00
mirror gmirror: Zero the metadata block before writing 2021-07-13 17:45:57 -04:00
mountver Make g_attach() return ENXIO for orphaned providers; update various 2020-10-18 16:24:08 +00:00
multipath gmultipath: make physpath distinct from the underlying providers' 2021-05-06 12:32:27 -06:00
nop Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
part Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
raid Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
raid3 graid3: Zero the metadata block before writing 2021-07-13 17:46:02 -04:00
shsec Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
stripe Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
uzip Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
vinum Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
virstor Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
zero geom: clean up empty lines in .c and .h files 2020-09-01 22:14:09 +00:00
geom_bsd_enc.c
geom_ccd.c geom: clean up empty lines in .c and .h files 2020-09-01 22:14:09 +00:00
geom_ctl.c geom_ctl.c: remove stale header files 2020-10-20 20:59:13 +00:00
geom_ctl.h
geom_dbg.h GEOM: Reduce unnecessary log interleaving with sbufs 2019-08-07 19:28:35 +00:00
geom_dev.c Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
geom_disk.c Remove frontstuff 2020-10-27 06:43:24 +00:00
geom_disk.h Add GEOM attribute to report physical device name, and report it 2019-11-09 17:30:19 +00:00
geom_dump.c geom: clean up empty lines in .c and .h files 2020-09-01 22:14:09 +00:00
geom_event.c Move TDP_GEOM check from userret() to ast(); this code path is quite 2020-09-14 10:14:03 +00:00
geom_flashmap.c Remove NAND and NANDFS support 2019-06-25 04:50:09 +00:00
geom_flashmap.h geom: clean up empty lines in .c and .h files 2020-09-01 22:14:09 +00:00
geom_int.h Remove duplicate g_debugflags declaration. 2019-12-05 15:07:32 +00:00
geom_io.c Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
geom_kern.c geom: clean up empty lines in .c and .h files 2020-09-01 22:14:09 +00:00
geom_map.c geom: clean up empty lines in .c and .h files 2020-09-01 22:14:09 +00:00
geom_redboot.c geom_map and geom_redboot: Remove unused ctlreq handler. 2020-07-26 22:30:01 +00:00
geom_slice.c Pass BIO_SPEEDUP through all the geom layers 2020-01-17 01:15:55 +00:00
geom_slice.h
geom_subr.c geom(4): make g_newprovider_event() return if G_P_WITHER is set 2020-12-29 14:29:59 +00:00
geom_vfs.c Make g_attach() return ENXIO for orphaned providers; update various 2020-10-18 16:24:08 +00:00
geom_vfs.h
geom.h ffs: Clamp BIO_SPEEDUP length 2020-11-11 13:48:07 +00:00
notes