Linux EFI development
 help / color / mirror / Atom feed
* [PATCH 0/2] efivars: reading variables can generate SMIs
@ 2018-02-15 18:22 Joe Konno
  2018-02-15 18:22 ` [PATCH 1/2] fs/efivarfs: restrict inode permissions Joe Konno
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Joe Konno @ 2018-02-15 18:22 UTC (permalink / raw)
  To: linux-efi, linux-kernel
  Cc: ard.biesheuvel, matthew.garrett, jk, ak, tony.luck

From: Joe Konno <joe.konno@intel.com>

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(-)

-- 
2.14.1

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2018-02-17 18:12 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-15 18:22 [PATCH 0/2] efivars: reading variables can generate SMIs Joe Konno
2018-02-15 18:22 ` [PATCH 1/2] fs/efivarfs: restrict inode permissions Joe Konno
     [not found] ` <20180215182208.35003-1-joe.konno-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2018-02-15 18:22   ` [PATCH 2/2] efi: restrict top-level attribute permissions Joe Konno
2018-02-16 10:41 ` [PATCH 0/2] efivars: reading variables can generate SMIs Ard Biesheuvel
2018-02-16 10:55   ` Borislav Petkov
2018-02-16 10:58     ` Ard Biesheuvel
2018-02-16 11:08       ` Borislav Petkov
     [not found]         ` <20180216110821.GB29042-fF5Pk5pvG8Y@public.gmane.org>
2018-02-16 11:18           ` Ard Biesheuvel
     [not found]             ` <CAKv+Gu_SD6yWJMGbTwGUWXtrgZKPkpANNaGe1PUruTG9j0yhcg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-16 18:48               ` Joe Konno
2018-02-16 18:58                 ` Borislav Petkov
2018-02-16 19:22                 ` Peter Jones
2018-02-16 19:31                   ` Ard Biesheuvel
     [not found]                     ` <CAKv+Gu9=wny1J+-tZCdoGYUSZjfWgbiB9b_MdgpssdcTVXtKkA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-16 19:51                       ` Matthew Garrett
2018-02-16 19:32                   ` Luck, Tony
2018-02-16 19:54                     ` Peter Jones
     [not found]   ` <CAKv+Gu80pJ5tbGoJqBm8CCKrEZXdkE83c944383KbQ5jREUC0Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-16 20:51     ` James Bottomley
     [not found]       ` <1518814319.4419.10.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2018-02-16 21:09         ` Luck, Tony
2018-02-16 21:45           ` Andy Lutomirski
2018-02-16 21:58             ` Matthew Garrett
     [not found]               ` <CACdnJutPvMPUTWWjS3oRadQAqn+HpRpY+fhO0pXBj6OsQkAAag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-16 22:02                 ` Luck, Tony
     [not found]                   ` <3908561D78D1C84285E8C5FCA982C28F7B3795A3-8oqHQFITsIHTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2018-02-16 22:03                     ` Matthew Garrett
     [not found]                       ` <CACdnJuvR4NTdCwp=jT3AoW898EXuq6zakfo5hm6dd9mP-SWoGQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-17 18:12                         ` Andy Lutomirski
2018-02-16 22:05           ` Peter Jones
     [not found]             ` <20180216220536.liew4p4kqmaxwmfh-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-02-17  9:36               ` Ard Biesheuvel
     [not found]                 ` <CAKv+Gu982mt==TaBRpwLLOLrX03zVJ+RznqCgDrxGNctJUVQVA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-17 16:17                   ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox