diff options
Diffstat (limited to 'src/boot/bootctl.c')
-rw-r--r-- | src/boot/bootctl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index 1dbe00adb6..2424aa011f 100644 --- a/src/boot/bootctl.c +++ b/src/boot/bootctl.c @@ -96,6 +96,10 @@ static int get_file_version(int fd, char **v) { if (fstat(fd, &st) < 0) return log_error_errno(errno, "Failed to stat EFI binary: %m"); + r = stat_verify_regular(&st); + if (r < 0) + return log_error_errno(errno, "EFI binary is not a regular file: %m"); + if (st.st_size < 27) { *v = NULL; return 0; |