freebsd-dev/sys/geom
Conrad Meyer ea5eee641e Fix information leak in geli(8) integrity mode
In integrity mode, a larger logical sector (e.g., 4096 bytes) spans several
physical sectors (e.g., 512 bytes) on the backing device.  Due to hash
overhead, a 4096 byte logical sector takes 8.5625 512-byte physical sectors.
This means that only 288 bytes (256 data + 32 hash) of the last 512 byte
sector are used.

The memory allocation used to store the encrypted data to be written to the
physical sectors comes from malloc(9) and does not use M_ZERO.

Previously, nothing initialized the final physical sector backing each
logical sector, aside from the hash + encrypted data portion.  So 224 bytes
of kernel heap memory was leaked to every block :-(.

This patch addresses the issue by initializing the trailing portion of the
physical sector in every logical sector to zeros before use.  A much simpler
but higher overhead fix would be to tag the entire allocation M_ZERO.

PR:		222077
Reported by:	Maxim Khitrov <max AT mxcrypt.com>
Reviewed by:	emaste
Security:	yes
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12272
2017-09-09 01:41:01 +00:00
..
bde
cache
concat
eli Fix information leak in geli(8) integrity mode 2017-09-09 01:41:01 +00:00
gate
journal When read requests are sent from a filesystem running above g_journal, 2017-08-13 18:09:22 +00:00
label
linux_lvm
mirror Synchronize unclean mirrors before adding them to a running gmirror. 2017-05-02 23:29:42 +00:00
mountver
multipath Report disk addition errors on add or create subcommand. 2017-01-20 13:49:04 +00:00
nop
part The hard drive media device path contains the size of the partition, 2017-09-02 07:04:06 +00:00
raid g_raid: Prevent tasters from attempting excessively large reads 2017-01-12 06:58:31 +00:00
raid3
sched
shsec
stripe
uzip Add MD_VERIFY option to enable O_VERIFY in open for vnode type. 2017-05-31 21:18:11 +00:00
vinum
virstor g_virstor.h: macro parenthesization 2017-06-30 22:01:18 +00:00
zero
geom_aes.c
geom_bsd_enc.c
geom_bsd.c Mark geom classes as deprecated. 2017-08-09 16:15:24 +00:00
geom_ccd.c
geom_ctl.c
geom_ctl.h
geom_dev.c Eliminate useless adjustments of aliased device. 2017-08-07 22:42:46 +00:00
geom_disk.c Expose API to allow disks to ask for alias names in devfs. 2017-08-07 21:12:38 +00:00
geom_disk.h Expose API to allow disks to ask for alias names in devfs. 2017-08-07 21:12:38 +00:00
geom_dump.c Add aliasing concept to geom. 2017-08-07 21:12:28 +00:00
geom_event.c
geom_flashmap.c - Allow different slicers for different flash types to be registered 2017-02-22 10:21:39 +00:00
geom_fox.c Also provide a warning for geom_fox. 2017-08-09 16:37:37 +00:00
geom_int.h
geom_io.c
geom_kern.c
geom_map.c
geom_mbr_enc.c
geom_mbr.c Mark geom classes as deprecated. 2017-08-09 16:15:24 +00:00
geom_redboot.c
geom_slice.c
geom_slice.h
geom_subr.c Let g_access() log the actual error number. 2017-08-27 12:24:25 +00:00
geom_sunlabel_enc.c
geom_sunlabel.c Mark geom classes as deprecated. 2017-08-09 16:15:24 +00:00
geom_vfs.c Fix typo. 2017-05-18 08:25:07 +00:00
geom_vfs.h
geom_vol_ffs.c Mark geom classes as deprecated. 2017-08-09 16:15:24 +00:00
geom.h Add aliasing concept to geom. 2017-08-07 21:12:28 +00:00
notes