All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Joe Konno <joe.konno@linux.intel.com>,
	Matthew Garrett <mjg59@google.com>,
	Ingo Molnar <mingo@kernel.org>, Andy Lutomirski <luto@kernel.org>,
	linux-efi@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jeremy Kerr <jk@ozlabs.org>, Andi Kleen <ak@linux.intel.com>,
	Tony Luck <tony.luck@intel.com>,
	Benjamin Drung <benjamin.drung@profitbricks.com>,
	Peter Jones <pjones@redhat.com>
Subject: Re: [PATCH 0/2] efivars: reading variables can generate SMIs
Date: Fri, 16 Feb 2018 10:58:47 +0000	[thread overview]
Message-ID: <CAKv+Gu8qm2wFxY56-eRLkLZB6fRUCmZbZo=4cvo5e4JDFh01Gg@mail.gmail.com> (raw)
In-Reply-To: <20180216105548.GA29042@pd.tnic>

On 16 February 2018 at 10:55, Borislav Petkov <bp@alien8.de> wrote:
> On Fri, Feb 16, 2018 at 10:41:45AM +0000, Ard Biesheuvel wrote:
>> On 15 February 2018 at 18:22, Joe Konno <joe.konno@linux.intel.com> wrote:
>> > 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.
>> >
>>
>> I am inclined to apply this as a fix, but I will give the x86 guys a
>> chance to respond as well.
>
> That stinking pile EFI never ceases to amaze me...
>
> Just one question: by narrowing permissions this way, aren't you
> breaking some userspace which reads those?
>
> And if you do, then that's a no-no.
>
> Which then would mean that you'd have to come up with some caching
> scheme to protect the firmware from itself.
>
> Or we could simply admit that EFI is a piece of crap, kill it and
> start anew, this time much more conservatively and not add a whole OS
> underneath the actual OS.
>

By your own reasoning above, that's a no-no as well.

But thanks for your input. Anyone else got something constructive to contribute?

  reply	other threads:[~2018-02-16 10:58 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
2018-02-20 19:18   ` Andy Lutomirski
2018-02-20 21:18     ` Luck, Tony
2018-02-20 21:22       ` Matthew Garrett
2018-02-20 21:32         ` Luck, Tony
2018-02-20 21:35           ` Matthew Garrett
2018-02-20 22:01       ` Linus Torvalds
2018-02-20 23:30         ` Luck, Tony
2018-02-20 23:39           ` Matthew Garrett
2018-02-20 23:50             ` Luck, Tony
2018-02-21  0:49           ` Linus Torvalds
2018-02-21  1:05             ` Luck, Tony
2018-02-21  2:16               ` Linus Torvalds
2018-02-21  9:03                 ` Ard Biesheuvel
2018-02-21 18:02                   ` Linus Torvalds
2018-02-21 18:21                     ` Andi Kleen
2018-02-21 19:47                       ` Luck, Tony
2018-02-21 19:50                         ` Linus Torvalds
2018-02-21 19:58                           ` Luck, Tony
2018-02-21 20:40                             ` Linus Torvalds
2018-02-22  1:45                               ` [PATCH] efivarfs: Limit the rate for non-root to read files Luck, Tony
2018-02-22  1:58                                 ` Linus Torvalds
2018-02-22  5:34                                   ` Luck, Tony
2018-02-22 17:10                                     ` Eric W. Biederman
     [not found]                                     ` <CA+55aFy0hRexJkLbN7t31LjfGr4Ae0W5g6sBMqHHJi8aYuGKeA@mail.gmail.com>
     [not found]                                       ` <612E894E-62C8-4155-AED8-D53702EDC8DC@intel.com>
     [not found]                                         ` <CA+55aFxeBaTbwvbWqx1MKYjKKzLUs=1O43Bx2=JaO8qrnY-8HA@mail.gmail.com>
2018-02-22 17:15                                           ` [PATCH v2] " Luck, Tony
2018-02-22 17:39                                             ` Linus Torvalds
2018-02-22 17:54                                               ` Luck, Tony
2018-02-22 18:07                                                 ` Linus Torvalds
2018-02-22 18:08                                                   ` Ard Biesheuvel
2018-02-23 20:34                                                     ` Andy Lutomirski
2018-02-23 19:47                                         ` [PATCH] " Peter Jones
2018-02-21 19:52                       ` [PATCH 1/2] fs/efivarfs: restrict inode permissions Linus Torvalds
2018-02-24 20:06                   ` Alan Cox
2018-02-25 10:56                     ` Ard Biesheuvel
2018-02-21  0:49         ` Peter Jones
2018-02-20 23:19     ` Andy Lutomirski
2018-02-15 18:22 ` [PATCH 2/2] efi: restrict top-level attribute permissions Joe Konno
2018-02-15 18:22   ` 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 [this message]
2018-02-16 11:08       ` Borislav Petkov
2018-02-16 11:18         ` Ard Biesheuvel
2018-02-16 11:18           ` Ard Biesheuvel
2018-02-16 18:48           ` Joe Konno
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
2018-02-16 19:51                 ` Matthew Garrett
2018-02-16 19:51                   ` Matthew Garrett
2018-02-16 19:32               ` Luck, Tony
2018-02-16 19:54                 ` Peter Jones
2018-02-16 20:51   ` James Bottomley
2018-02-16 20:51     ` James Bottomley
2018-02-16 21:09     ` Luck, Tony
2018-02-16 21:09       ` Luck, Tony
2018-02-16 21:45       ` Andy Lutomirski
2018-02-16 21:58         ` Matthew Garrett
2018-02-16 22:02           ` Luck, Tony
2018-02-16 22:02             ` Luck, Tony
2018-02-16 22:03             ` Matthew Garrett
2018-02-16 22:03               ` Matthew Garrett
2018-02-17 18:12               ` Andy Lutomirski
2018-02-17 18:12                 ` Andy Lutomirski
2018-02-16 22:05       ` Peter Jones
2018-02-17  9:36         ` Ard Biesheuvel
2018-02-17  9:36           ` Ard Biesheuvel
2018-02-17 16:17           ` Andi Kleen
2018-02-17 16:17             ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKv+Gu8qm2wFxY56-eRLkLZB6fRUCmZbZo=4cvo5e4JDFh01Gg@mail.gmail.com' \
    --to=ard.biesheuvel@linaro.org \
    --cc=ak@linux.intel.com \
    --cc=benjamin.drung@profitbricks.com \
    --cc=bp@alien8.de \
    --cc=jk@ozlabs.org \
    --cc=joe.konno@linux.intel.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=mjg59@google.com \
    --cc=pjones@redhat.com \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.