pe: tighten validity checks of DOS and PE headers
authorLennart Poettering <lennart@poettering.net>
Mon, 24 Jun 2024 15:40:32 +0000 (17:40 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 26 Jun 2024 15:09:44 +0000 (17:09 +0200)
commitbacc2ed0d5bb10de5d37a1df73c061247f005b59
tree4b60a9073f90477f567fd6edf21494df46140d57
parent4a479597218d40df1097ac882f5db9cc747d0f7f
pe: tighten validity checks of DOS and PE headers

Let's make sure we validate that the DOS/PE header offsets are actually
reasonable, and do not cause overflows when added to the base addresses.

(This shouldn're really be a problem URL, since the DOS header offset is
16bit only, but let's be extra careful with this)
src/boot/efi/pe.c