bootctl,bootspec: make use of CHASE_PROHIBIT_SYMLINKS whenever we access the ESP...
authorLennart Poettering <lennart@poettering.net>
Fri, 11 Nov 2022 16:36:29 +0000 (17:36 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 13 Nov 2022 08:46:34 +0000 (17:46 +0900)
commitb353d5eee9e8df0aa2f4cbb1bfb0a46a963ba78f
tree0cbef42fe843073d99d91ff9042de6bf3887675d
parentd43e78b643535da398345d5ae680a96d7b65940e
bootctl,bootspec: make use of CHASE_PROHIBIT_SYMLINKS whenever we access the ESP/XBOOTLDR

Let's make use of the new flag whenever we access the ESP or XBOOTLDR.
The resources we make use of in these partitions can't possibly use
symlinks (because UEFI knows no symlink concept), and they are untrusted
territory, hence under no circumstances we should be tricked into
following symlinks that shouldn't be there in the first place.

Of course, you might argue thta ESP/XBOOTLDR are VFAT and thus don#t
know symlinks. But the thing is, they don#t have to be. Firmware can
support other file systems too, and people can use efifs to gain access
to arbitrary Linux file systems from EFI. Hence, let's better be safe
than sorry.
src/boot/bootctl.c
src/shared/bootspec.c