From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Luca Boccassi <bluca@debian.org>,
Ard Biesheuvel <ardb@kernel.org>,
Emanuele Giuseppe Esposito <eesposit@redhat.com>,
x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
lennart@poettering.net, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>,
Masahiro Yamada <masahiroy@kernel.org>,
Alexander Potapenko <glider@google.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v2] x86/boot: add .sbat section to the bzImage
Date: Tue, 18 Jul 2023 17:35:19 +0100 [thread overview]
Message-ID: <ZLa/R9tZ0hB0KOXj@redhat.com> (raw)
In-Reply-To: <CABgObfb_jGgs-yMSsHtHhEStFDp4f072LN7pW+3dSuVhAP87Ag@mail.gmail.com>
On Tue, Jul 18, 2023 at 05:51:56PM +0200, Paolo Bonzini wrote:
> On Tue, Jul 18, 2023 at 4:03 PM Luca Boccassi <bluca@debian.org> wrote:
> > > So perhaps there could be some kind of protocol that would let a new
> > > kernel tell the bootloader "don't boot an older kernel than me in the
> > > future". It could even be an extension to the SBAT spec itself. I
> > > haven't really thought much about it, tbh. However, I'm quite positive
> > > that a revocation index attached to the kernel image cannot really work
> > > as a concept, not even if it is managed by the distro.
> >
> > You are pretty much describing SBAT there. Except for the detail that
> > it can't be the component that can be compromised that tells you
> > whether it's compromised and you should trust it... A system's SBAT
> > policy is a single entity, managed centrally, and deployed everywhere.
>
> Fine, so can the SBAT spec be extended to have some kind of version
> that is not a single number? If that is provided, Linux could have the
> mechanism to place the kernel version in the .sbat section. But I
> agree with Borislav, Greg and others that a single revocation index
> simply doesn't cut it.
In theory it could already be treated as being a version if you were
to just encode the 3 version number components into an integer.
There's a slight caveat that when parsing sbat shim currently appears
to store the generation number in a uint16, so the size is somewhat
limited. Probably still just enough bits to encode a kernel version,
though changing shim code to uint32 looks easy enough too.
Directly encoding the version number though has implications for
revokation wrt stable branches though. My impression is that the
generation number was intentionally separate from a version number,
so that people could backport particular fixes to a stable branch
and then declare it to be the same "generation" as the latest
devel branch, or other stable branches which also included the
equiv fixes.
Obviously that presumes that an old branch can be made secure by
selectively backporting patches. That is a view which is obviously
not universally accepted, especially in upstream context, as clearly
expressed in several mails in this thread. It is what distros would
typically claim to achieve though. I'm not sure it is possible to
satisfy both those differing views.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2023-07-18 16:36 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 15:44 Emanuele Giuseppe Esposito
2023-07-12 1:21 ` H. Peter Anvin
2023-07-12 1:33 ` H. Peter Anvin
2023-07-12 6:19 ` Emanuele Giuseppe Esposito
2023-07-12 12:00 ` Borislav Petkov
2023-07-12 12:48 ` Daniel P. Berrangé
2023-07-12 13:28 ` Borislav Petkov
2023-07-12 14:06 ` Daniel P. Berrangé
2023-07-12 15:43 ` Greg KH
2023-07-12 16:23 ` Luca Boccassi
2023-07-12 16:57 ` Greg KH
2023-07-12 18:59 ` Luca Boccassi
2023-07-12 19:05 ` Greg KH
2023-07-12 19:35 ` Luca Boccassi
2023-07-12 19:42 ` Borislav Petkov
2023-07-12 19:56 ` Luca Boccassi
2023-07-12 20:01 ` Borislav Petkov
2023-07-12 20:16 ` Luca Boccassi
2023-07-12 20:07 ` Greg KH
2023-07-12 20:41 ` Luca Boccassi
2023-07-12 21:11 ` Greg KH
2023-07-12 21:12 ` Willy Tarreau
2023-07-12 22:32 ` Luca Boccassi
2023-07-12 21:20 ` Greg KH
2023-07-12 21:50 ` Luca Boccassi
2023-07-13 6:09 ` Greg KH
2023-07-14 0:29 ` Luca Boccassi
2023-07-15 6:51 ` Greg KH
2023-07-16 17:41 ` Luca Boccassi
2023-07-16 18:28 ` Greg KH
2023-07-17 9:22 ` Daniel P. Berrangé
2023-07-17 11:06 ` Peter Zijlstra
2023-07-17 11:47 ` Daniel P. Berrangé
2023-07-17 14:10 ` Greg KH
2023-07-17 11:12 ` Luca Boccassi
2023-07-17 14:11 ` Greg KH
2023-07-17 14:06 ` Greg KH
2023-07-12 15:45 ` Greg KH
2023-07-13 8:57 ` Vitaly Kuznetsov
2023-07-13 9:16 ` Peter Zijlstra
2023-07-13 14:58 ` Greg KH
2023-07-13 15:51 ` Vitaly Kuznetsov
2023-07-13 16:58 ` Greg KH
2023-07-13 20:49 ` Emanuele Giuseppe Esposito
2023-07-13 22:04 ` Greg KH
2023-07-14 6:57 ` Emanuele Giuseppe Esposito
2023-07-15 6:59 ` Greg KH
2023-07-13 13:33 ` Ard Biesheuvel
2023-07-13 13:52 ` Ard Biesheuvel
2023-07-13 20:39 ` Emanuele Giuseppe Esposito
2023-07-13 22:31 ` Luca Boccassi
2023-07-14 8:52 ` Ard Biesheuvel
2023-07-14 9:13 ` Matthew Garrett
2023-07-14 9:14 ` Ard Biesheuvel
2023-07-14 9:25 ` Luca Boccassi
2023-07-17 16:08 ` James Bottomley
2023-07-17 16:56 ` Daniel P. Berrangé
2023-07-17 17:15 ` James Bottomley
2023-07-17 18:16 ` Daniel P. Berrangé
2023-07-20 16:46 ` Eric Snowberg
2023-07-20 17:07 ` James Bottomley
2023-07-20 18:10 ` Eric Snowberg
2023-07-20 19:16 ` Luca Boccassi
2023-07-21 0:02 ` Eric Snowberg
2023-07-21 8:55 ` Luca Boccassi
2023-07-21 11:24 ` James Bottomley
2023-07-21 12:40 ` Luca Boccassi
2023-07-21 13:01 ` James Bottomley
2023-07-21 13:10 ` Luca Boccassi
2023-07-21 13:33 ` James Bottomley
2023-07-21 15:14 ` Luca Boccassi
2023-07-21 15:22 ` Luca Boccassi
2023-07-21 15:27 ` James Bottomley
2023-07-13 23:13 ` Luca Boccassi
2023-07-14 9:33 ` Ard Biesheuvel
2023-07-14 9:59 ` Daniel P. Berrangé
2023-07-14 10:40 ` Luca Boccassi
2023-07-18 13:34 ` Paolo Bonzini
2023-07-18 14:02 ` Luca Boccassi
2023-07-18 15:51 ` Paolo Bonzini
2023-07-18 16:35 ` Daniel P. Berrangé [this message]
2023-07-19 13:21 ` Paolo Bonzini
2023-07-19 13:34 ` Luca Boccassi
2023-07-19 15:11 ` Paolo Bonzini
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=ZLa/R9tZ0hB0KOXj@redhat.com \
--to=berrange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=bluca@debian.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=eesposit@redhat.com \
--cc=glider@google.com \
--cc=hpa@zytor.com \
--cc=lennart@poettering.net \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mingo@redhat.com \
--cc=ndesaulniers@google.com \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=x86@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome