]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Ensure we have a full EFI_DEVICE_PATH header before we try to look at
authorimp <imp@FreeBSD.org>
Fri, 26 Oct 2018 23:08:22 +0000 (23:08 +0000)
committerimp <imp@FreeBSD.org>
Fri, 26 Oct 2018 23:08:22 +0000 (23:08 +0000)
commit38be2ba0cfedd628129d186384b8c361b0f7d24a
tree670e4c64ed4fc1153e20bad8ce5589552406c306
parentc58442f3529f68c60bc2e2ac148181d6dd7a3d18
Ensure we have a full EFI_DEVICE_PATH header before we try to look at
its length. Some BIOSes pad the length of the device path to an even
amount. When we had a device path that was somehow an odd length, we'd
wind up having 1 byte left that we were bogusly interpreting as a full
device path. We'd then dereference 2 bytes into that to get a length
of the node, which had undefined (and quite undesired) effects.

Sponsored by: Netflix, Inc
MFC After: 3 days
stand/efi/loader/main.c