mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 19:22:47 +00:00
69be211061
r323314: Audit userspace geom code for leaking memory to disk Any geom class using g_metadata_store, as well as geom_virstor which duplicated g_metadata_store internally, would dump sectorsize - mdsize bytes of userspace memory following the metadata block stored. This is most or all geom classes (gcache, gconcat, geli, gjournal, glabel, gmirror, gmultipath, graid3, gshsec, gstripe, and geom_virstor). PR: 222077 (comment #3) Reported by: Maxim Khitrov <max AT mxcrypt.com> Reviewed by: des Security: yes Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12269 r323338: 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 r328849: geom: don't write stack garbage in disk labels Most consumers of g_metadata_store were passing in partially unallocated memory, resulting in stack garbage being written to disk labels. Fix them by zeroing the memory first. gvirstor repeated the same mistake, but in the kernel. Also, glabel's label contained a fixed-size string that wasn't initialized to zero. PR: 222077 Reported by: Maxim Khitrov <max@mxcrypt.com> Reviewed by: cem X-MFC-With: 323314 X-MFC-With: 323338 Differential Revision: https://reviews.freebsd.org/D14164 |
||
---|---|---|
.. | ||
adjkerntz | ||
atm | ||
badsect | ||
bsdlabel | ||
camcontrol | ||
ccdconfig | ||
clri | ||
comcontrol | ||
conscontrol | ||
ddb | ||
devd | ||
devfs | ||
dhclient | ||
dmesg | ||
dump | ||
dumpfs | ||
dumpon | ||
etherswitchcfg | ||
fdisk | ||
fdisk_pc98 | ||
ffsinfo | ||
fsck | ||
fsck_ffs | ||
fsck_msdosfs | ||
fsdb | ||
fsirand | ||
gbde | ||
geom | ||
ggate | ||
growfs | ||
gvinum | ||
hastctl | ||
hastd | ||
ifconfig | ||
init | ||
ipf | ||
ipfw | ||
iscontrol | ||
kldconfig | ||
kldload | ||
kldstat | ||
kldunload | ||
ldconfig | ||
mca | ||
md5 | ||
mdconfig | ||
mdmfs | ||
mknod | ||
mksnap_ffs | ||
mount | ||
mount_cd9660 | ||
mount_fusefs | ||
mount_msdosfs | ||
mount_nfs | ||
mount_nullfs | ||
mount_udf | ||
mount_unionfs | ||
nandfs | ||
natd | ||
newfs | ||
newfs_msdos | ||
newfs_nandfs | ||
nfsiod | ||
nos-tun | ||
nvmecontrol | ||
pfctl | ||
pflogd | ||
ping | ||
ping6 | ||
quotacheck | ||
rcorder | ||
reboot | ||
recoverdisk | ||
resolvconf | ||
restore | ||
route | ||
routed | ||
rtsol | ||
savecore | ||
sconfig | ||
setkey | ||
shutdown | ||
spppcontrol | ||
sunlabel | ||
swapon | ||
sysctl | ||
tests | ||
tunefs | ||
umount | ||
zfsbootcfg | ||
Makefile | ||
Makefile.amd64 | ||
Makefile.arm | ||
Makefile.i386 | ||
Makefile.ia64 | ||
Makefile.inc | ||
Makefile.mips | ||
Makefile.pc98 | ||
Makefile.sparc64 |