freebsd-skq/sys/geom/virstor
asomers 330d9b337f 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
MFC after:	3 weeks
X-MFC-With:	323314
X-MFC-With:	323338
Differential Revision:	https://reviews.freebsd.org/D14164
2018-02-04 14:49:55 +00:00
..
binstream.c sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
binstream.h sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
g_virstor_md.c sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
g_virstor_md.h sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
g_virstor.c geom: don't write stack garbage in disk labels 2018-02-04 14:49:55 +00:00
g_virstor.h sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00