Relax GTP header validity check by allowing 1 sector size usable
authorkrw <krw@openbsd.org>
Fri, 2 Sep 2022 12:24:26 +0000 (12:24 +0000)
committerkrw <krw@openbsd.org>
Fri, 2 Sep 2022 12:24:26 +0000 (12:24 +0000)
commit9dfb435af5176bab3d98bfc6210d550575e6bd66
tree447f5b5906516c24a127988b535dd39c5396a8c5
parentfdb0798ee010f8a6ed300fc3ea1cdf6869a709b0
Relax GTP header validity check by allowing 1 sector size usable
LBA area (gh_lba_start == gh_lba_end) and allowing either or both
of gh_lba_start and gh_lba_end to exceed the size of the disk the
GPT currently inhabits.

Reduces false negatives and inappropriate fall through to MBR
spoofing and allows repair of otherwise valid GPT.
sys/kern/subr_disk.c