From: Robbie Harwood <rharwood@redhat.com>
To: Steve McIntyre <steve@einval.com>, grub-devel@gnu.org
Subject: Re: Fonts and theming and what to do in future with SB
Date: Tue, 29 Nov 2022 15:24:51 -0500 [thread overview]
Message-ID: <jlgk03dld9o.fsf@redhat.com> (raw)
In-Reply-To: <20221129183523.GN3245702@tack.einval.com>
[-- Attachment #1: Type: text/plain, Size: 3574 bytes --]
Steve McIntyre <steve@einval.com> writes:
> Hey folks!
>
> So, with the latest set of GRUB CVE patches we've fixed up a bunch of
> potential crashes in font-handling code that could lead to Secure Boot
> holes. These are good and useful fixes, and thanks to Zhang Boyang and
> everyone else involved!
>
> There were also a few other changes:
>
> * In SB mode, refuse to load fonts from outside of the signed GRUB
> image
> * Restrictions to image dimensions
> * Fix integer overflow in fbutil
>
> Locking down fonts here has caused some issues that I've seen.
>
> We didn't update the config generation code in util/grub.d, so we're
> still generating grub.cfg files that will try (and fail!) to load
> fonts from other locations at runtime in SB mode. This causes ugly
> errors, and also causes GRUB to fail to set up video as normal. We can
> fix this, but it would be nice to agree on something upstream rather
> than as diverging distro patches.
>
> AFAIK Chris Coulson has a patch for the font loader to cause it to try
> loading fonts from the embedded memdisk first. Is that the best
> approach? If so, what fonts should we be embedding in the signed
> image? It's a tradeoff between size and functionality, of course -
> some people are happy with just "unicode" while others may want a
> wider choice for added theming options. Is the size an issue for most
> people?
>
> Or... Could/should we look at options to sign fonts separately? I've
> heard suggestions to embed them into faked-up modules that we could
> load with insmod, but of course we don't support signing modules yet
> anyway... :-)
I personally don't like that we *pretend* we do have signed modules -
that is, we pretend that `insmod` works when it doesn't. (I am
ambivalent on whether we should have signed standalone module support in
general.) So while I appreciate Chris's patch and am shipping it, I
don't think faking `loadfont` too is a good longer-term solution.
I understood that these kinds of decisions have been made because it's
easier than patching the config generation code. I know we're getting
into "boil the ocean" territory, but maybe there's work that could be
done to improve that situation? In general the feedback I've been
getting on grub config is that it would be nice if we had less of it,
for whatever that's worth.
It's also odd that we've elected to lock down fonts in this way but not
images. Perhaps this is a good opportunity to rethink how much
customization we actually want to provide to distros and end users of
our packages. Concretely, it seems that we expose customization for
three use cases:
1. Distro branding. A Debian or RHEL or what have you wants to make
their ISO perhaps say the distro name at the top and have a logo
background or something.
2. Localization. It is reasonable for users to want prompts and text on
the screen to appear in the language of their choice.
3. Making it look cool / use the font I want / etc.
I think localization is resolved by bundling the unicode font, and it's
a good idea to default to having that around. Distro branding seems to
me a limited use case - we can just bundle whatever we need for that
into our signed images, if we want. I'm less interested in any other
customization: in RHEL and Fedora, we generally don't show a menu at
all. I would not personally be upset if we just removed most of the
customizability - but I'm also not the target audience.
Thanks Steve for raising the issue on-list. I'm curious what other
distro vendors here think too.
Be well,
--Robbie
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
next prev parent reply other threads:[~2022-11-29 20:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-29 18:35 Fonts and theming and what to do in future with SB Steve McIntyre
2022-11-29 20:24 ` Robbie Harwood [this message]
2022-11-30 6:00 ` Michael Chang
2022-11-30 10:37 ` Zhang Boyang
2022-11-30 16:08 ` Robbie Harwood
2022-12-01 8:30 ` Zhang Boyang
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=jlgk03dld9o.fsf@redhat.com \
--to=rharwood@redhat.com \
--cc=grub-devel@gnu.org \
--cc=steve@einval.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.