Skip to content

efivars: reading variables can generate SMIs

Joe Konno linux-efi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 46 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2fs/efivarfs: restrict inode permissionsfs/efivarfs/super.c+2 -235 replies
2/2efi: restrict top-level attribute permissionsdrivers/firmware/efi/efi.c+6 -40 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchAndy LutomirskiArd Biesheuvel
1/2A-b A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] efivars: reading variables can generate SMIs

From: Joe Konno <[email protected]>

It was pointed out that normal, unprivileged users reading certain EFI variables (through efivarfs) can generate SMIs. Given these nodes are created with 0644 permissions, normal users could generate a lot of SMIs. By restricting permissions a bit (patch 1), we can make it harder for normal users to generate spurious SMIs.

A normal user could generate lots of SMIs by reading the efivarfs in a trivial loop:

```
while true; do
    cat /sys/firmware/efi/evivars/* > /dev/null
done
```

Patch 1 in this series limits read and write permissions on efivarfs to the owner/superuser. Group and world cannot access.

Patch 2 is for consistency and hygiene. If we restrict permissions for either efivarfs or efi/vars, the other interface should get the same treatment.

Joe Konno (2):
fs/efivarfs: restrict inode permissions
efi: restrict top-level attribute permissions

 drivers/firmware/efi/efi.c | 10 ++++++----
 fs/efivarfs/super.c        |  4 ++--
 2 files changed, 8 insertions(+), 6 deletions(-)
Signature · 1 line
2.14.1