Don't trust gpt header data read from disk until after its
authorkrw <krw@openbsd.org>
Thu, 11 Aug 2022 20:22:27 +0000 (20:22 +0000)
committerkrw <krw@openbsd.org>
Thu, 11 Aug 2022 20:22:27 +0000 (20:22 +0000)
commit8ad6f46fb70476de70b63be79bfb4566c56cc0e3
tree94fa2eb84936ed98e40fd26981eeebb8c0a8ff3a
parent5cbf2c1d788b602d64e77f269ba0344bf3a947bb
Don't trust gpt header data read from disk until after its
validity is checked.

Found the hard way by kn@

Cluebats from millert@ and deraadt@.

Fix tested by and ok kn@
sys/kern/subr_disk.c