History

efi/efi_test: Lock down /dev/efi_test and require CAP_SYS_ADMIN

The driver exposes EFI runtime services to user-space through an IOCTL interface, calling the EFI services function pointers directly without using the efivar API. Disallow access to the /dev/efi_test character device when the kernel is locked down to prevent arbitrary user-space to call EFI runtime services. Also require CAP_SYS_ADMIN to open the chardev to prevent unprivileged users to call the EFI runtime services, instead of just relying on the chardev file mode bits for this. The main user of this driver is the fwts [0] tool that already checks if the effective user ID is 0 and fails otherwise. So this change shouldn't cause any regression to this tool. [0]: https://wiki.ubuntu.com/FirmwareTestSuite/Reference/uefivarinfo

Javier Martinez Canillas committed 7 years ago

Commit 359efcc1 parent 220dd763 files · +10 −0Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/security.h+1−0
@@ -105,6 +105,7 @@ enum lockdown_reason { · 104 unmodified lines
105105 LOCKDOWN_NONE,
106106 LOCKDOWN_MODULE_SIGNATURE,
107107 LOCKDOWN_DEV_MEM,
108+ LOCKDOWN_EFI_TEST,
108109 LOCKDOWN_KEXEC,
109110 LOCKDOWN_HIBERNATION,
110111 LOCKDOWN_PCI_ACCESS,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t