/[base]
ViewVC logotype

Revision 328849


Jump to revision: Previous Next
Author: asomers
Date: Sun Feb 4 14:49:55 2018 UTC (6 years, 4 months ago)
Changed paths: 10
Log Message:
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


Changed paths

Path Details
Directoryhead/sbin/geom/class/cache/geom_cache.c modified , text changed
Directoryhead/sbin/geom/class/concat/geom_concat.c modified , text changed
Directoryhead/sbin/geom/class/journal/geom_journal.c modified , text changed
Directoryhead/sbin/geom/class/label/geom_label.c modified , text changed
Directoryhead/sbin/geom/class/mirror/geom_mirror.c modified , text changed
Directoryhead/sbin/geom/class/raid3/geom_raid3.c modified , text changed
Directoryhead/sbin/geom/class/shsec/geom_shsec.c modified , text changed
Directoryhead/sbin/geom/class/stripe/geom_stripe.c modified , text changed
Directoryhead/sbin/geom/misc/subr.c modified , text changed
Directoryhead/sys/geom/virstor/g_virstor.c modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.27