Public bug reported:

Ubuntu 24.04 kernel 6.8.0-139.139, running on Linux Mint 22.3, which ships the 
Ubuntu
kernel unmodified.

## Symptom

On every boot, before Plymouth takes over, the screen shows:

    EFI stub: WARNING: Failed to measure data for event 1:
0x800000000000000b

The system then boots normally and nothing is broken. The problem is that the 
user is shown
this at all.

Expected behaviour on a machine booting with `quiet splash`: the Plymouth 
splash, or a black
screen — no kernel text whatsoever. What actually happens is a lone line saying 
WARNING on an
otherwise black screen, which a non-technical user cannot tell apart from a 
real failure. The
diagnostic belongs somewhere a technical user can go look for it, not on the 
boot console of
every machine with this firmware. On an LTS release this is a first-impression 
bug.

## Why `quiet` does not suppress it — the actual defect

The message comes from `efi_measure_tagged_event()`,
`drivers/firmware/efi/libstub/efi-stub-helper.c:271` (v6.8).

Event 1 is `EFISTUB_EVT_LOAD_OPTIONS`, and its call site is inside
`efi_convert_cmdline()`:

    efi-stub-helper.c:292
        if (options_size > 0)
                efi_measure_tagged_event((unsigned long)options, options_size,
                                         EFISTUB_EVT_LOAD_OPTIONS);

`efi_convert_cmdline()` necessarily runs *before* `efi_parse_options()` — the 
command line has
to be converted from UTF-16 before anything can parse it (`efi-stub.c:124` then 
`:141`;
`x86-stub.c:487` then `:880`).

`quiet` is precisely what sets `efi_loglevel = CONSOLE_LOGLEVEL_QUIET`
(`efi-stub-helper.c:72-73`), and `efi_printk()` filters only on `efi_loglevel`
(`printk.c:135`). At the moment this warning is emitted, `efi_loglevel` is still
`CONSOLE_LOGLEVEL_DEFAULT`.

So `quiet splash` cannot suppress this particular warning, by construction. 
Neither the user
nor the distro can turn it off without rebuilding the kernel.

Still present in mainline v6.17: same call site, `efi-stub-helper.c:320`
/ `:341`.

## Why the firmware refuses

`0x800000000000000b` = `EFI_VOLUME_FULL` (bit 63 + 11, UEFI spec appendix D). 
The firmware's
`EFI_TCG2_PROTOCOL.HashLogExtendEvent()` rejects the event because its TCG 
event log has no
room left. Others have reported the same status correlating with the number of 
UEFI boot
entries: https://lkml.iu.edu/hypermail/linux/kernel/2411.2/01195.html

On this machine Secure Boot is disabled and nothing consumes the PCR 
measurements, so the
failed measurement has no practical consequence. It *would* matter for 
TPM-sealed secrets
(`systemd-cryptenroll --tpm2-device`), but a console warning during a splash 
boot is not a
useful way to signal that either — the affected tooling checks the event log 
itself.

## Requested

The user must not see this line. Whether the measurement itself is fixed is 
secondary — a
firmware event log that is full is not actionable by the person watching the 
boot.

Any one of:

1. Perform the LOAD_OPTIONS measurement after option parsing (or parse `quiet` 
before it), so
   the documented way of silencing early boot output also covers this path and 
the splash is
   all the user sees.
2. Downgrade firmware refusals such as `EFI_VOLUME_FULL` to `efi_debug()` for 
this event, so
   it is reachable with `efi=debug` by whoever actually wants it and invisible 
otherwise.
3. Ubuntu-side: carry (1) or (2) as a patch. 24.04 is supported into 2029 and 
users on
   affected firmware see this on every single boot until then.


## System

    Linux Mint 22.3 Zena (Ubuntu 24.04 noble base), Cinnamon
    linux-image-6.8.0-139-generic 6.8.0-139.139
    /proc/version_signature: Ubuntu 6.8.0-139.139-generic 6.8.12
    Lenovo ThinkPad T14 Gen 2i (20W100DLBO), BIOS N34ET61W (1.61), 2024-03-08
    11th Gen Intel Core i5-1145G7
    TPM: Infineon 2.0 (tpm_tis IFX0785:00, device-id 0x1B, rev-id 22)
    Secure Boot: disabled
    /proc/cmdline: BOOT_IMAGE=/boot/vmlinuz-6.8.0-139-generic 
root=UUID=<redacted> ro quiet splash
    25 UEFI boot entries (mostly Lenovo firmware built-ins)
    plymouth 24.004.60-1ubuntu7.2

Note: the message is absent from dmesg/journalctl — EFI stub output goes to the 
EFI console
before ExitBootServices. It can only be observed on screen, or with 
`earlycon=efifb`.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: efistub noble tpm uefi

** Description changed:

  Ubuntu 24.04 kernel 6.8.0-139.139, running on Linux Mint 22.3, which ships 
the Ubuntu
  kernel unmodified.
  
  ## Symptom
  
  On every boot, before Plymouth takes over, the screen shows:
  
      EFI stub: WARNING: Failed to measure data for event 1:
  0x800000000000000b
  
- The system then boots normally and nothing is broken. The problem is 
presentational: a raw
- kernel warning is displayed on a machine booting with `quiet splash`. It is 
the only thing on
- an otherwise black screen, it says WARNING, and a non-technical user has no 
way to tell it
- apart from a real failure. On an LTS release that is a first-impression bug.
+ The system then boots normally and nothing is broken. The problem is that the 
user is shown
+ this at all.
+ 
+ Expected behaviour on a machine booting with `quiet splash`: the Plymouth 
splash, or a black
+ screen — no kernel text whatsoever. What actually happens is a lone line 
saying WARNING on an
+ otherwise black screen, which a non-technical user cannot tell apart from a 
real failure. The
+ diagnostic belongs somewhere a technical user can go look for it, not on the 
boot console of
+ every machine with this firmware. On an LTS release this is a 
first-impression bug.
  
  ## Why `quiet` does not suppress it — the actual defect
  
  The message comes from `efi_measure_tagged_event()`,
  `drivers/firmware/efi/libstub/efi-stub-helper.c:271` (v6.8).
  
  Event 1 is `EFISTUB_EVT_LOAD_OPTIONS`, and its call site is inside
  `efi_convert_cmdline()`:
  
      efi-stub-helper.c:292
          if (options_size > 0)
                  efi_measure_tagged_event((unsigned long)options, options_size,
                                           EFISTUB_EVT_LOAD_OPTIONS);
  
  `efi_convert_cmdline()` necessarily runs *before* `efi_parse_options()` — the 
command line has
  to be converted from UTF-16 before anything can parse it (`efi-stub.c:124` 
then `:141`;
  `x86-stub.c:487` then `:880`).
  
  `quiet` is precisely what sets `efi_loglevel = CONSOLE_LOGLEVEL_QUIET`
  (`efi-stub-helper.c:72-73`), and `efi_printk()` filters only on `efi_loglevel`
  (`printk.c:135`). At the moment this warning is emitted, `efi_loglevel` is 
still
  `CONSOLE_LOGLEVEL_DEFAULT`.
  
  So `quiet splash` cannot suppress this particular warning, by construction. 
Neither the user
  nor the distro can turn it off without rebuilding the kernel.
  
  Still present in mainline v6.17: same call site, `efi-stub-helper.c:320`
  / `:341`.
  
  ## Why the firmware refuses
  
  `0x800000000000000b` = `EFI_VOLUME_FULL` (bit 63 + 11, UEFI spec appendix D). 
The firmware's
  `EFI_TCG2_PROTOCOL.HashLogExtendEvent()` rejects the event because its TCG 
event log has no
  room left. Others have reported the same status correlating with the number 
of UEFI boot
  entries: https://lkml.iu.edu/hypermail/linux/kernel/2411.2/01195.html
  
  On this machine Secure Boot is disabled and nothing consumes the PCR 
measurements, so the
  failed measurement has no practical consequence. It *would* matter for 
TPM-sealed secrets
  (`systemd-cryptenroll --tpm2-device`), but a console warning during a splash 
boot is not a
  useful way to signal that either — the affected tooling checks the event log 
itself.
  
  ## Requested
  
+ The user must not see this line. Whether the measurement itself is fixed is 
secondary — a
+ firmware event log that is full is not actionable by the person watching the 
boot.
+ 
  Any one of:
  
  1. Perform the LOAD_OPTIONS measurement after option parsing (or parse 
`quiet` before it), so
-    the documented way of silencing early boot output also covers this path.
- 2. Downgrade firmware refusals such as `EFI_VOLUME_FULL` to `efi_debug()` for 
this event — a
-    full firmware event log is not something a user can act on.
+    the documented way of silencing early boot output also covers this path 
and the splash is
+    all the user sees.
+ 2. Downgrade firmware refusals such as `EFI_VOLUME_FULL` to `efi_debug()` for 
this event, so
+    it is reachable with `efi=debug` by whoever actually wants it and 
invisible otherwise.
  3. Ubuntu-side: carry (1) or (2) as a patch. 24.04 is supported into 2029 and 
users on
     affected firmware see this on every single boot until then.
+ 
  
  ## System
  
      Linux Mint 22.3 Zena (Ubuntu 24.04 noble base), Cinnamon
      linux-image-6.8.0-139-generic 6.8.0-139.139
      /proc/version_signature: Ubuntu 6.8.0-139.139-generic 6.8.12
      Lenovo ThinkPad T14 Gen 2i (20W100DLBO), BIOS N34ET61W (1.61), 2024-03-08
      11th Gen Intel Core i5-1145G7
      TPM: Infineon 2.0 (tpm_tis IFX0785:00, device-id 0x1B, rev-id 22)
      Secure Boot: disabled
      /proc/cmdline: BOOT_IMAGE=/boot/vmlinuz-6.8.0-139-generic 
root=UUID=<redacted> ro quiet splash
      25 UEFI boot entries (mostly Lenovo firmware built-ins)
      plymouth 24.004.60-1ubuntu7.2
  
  Note: the message is absent from dmesg/journalctl — EFI stub output goes to 
the EFI console
  before ExitBootServices. It can only be observed on screen, or with 
`earlycon=efifb`.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2167519

Title:
  efistub: "Failed to measure data for event 1" warning bypasses `quiet`
  and is shown on splash boot

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2167519/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to