Bug#1043583: systemd-boot postinst update causes EFI crash

2023-08-25 Thread Maria Lisina
HP 250 G6 (832E). This laptop's nvram is locked and any attempt to
write efi variable will result in EFI crash on kernel side.
Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Found container virtualization none.
File system "/boot" is not a FAT EFI System Partition (ESP) file system.
Using EFI System Partition at /boot/efi.
Checking whether /boot/efi/EFI/systemd/ contains any files…
Directory "/boot" is not the root of the file system.
Didn't find an XBOOTLDR partition, using the ESP as $BOOT.
Loaded machine ID db85663c813b4874828982296141053e from /etc/machine-id.
Using entry token: db85663c813b4874828982296141053e
Comparing versions: "systemd-boot 252.12-1~deb12u1" == "systemd-boot 
252.12-1~deb12u1
Skipping "/boot/efi/EFI/systemd/systemd-bootx64.efi", since same boot loader 
version in place already.
Comparing versions: "systemd-boot 252.12-1~deb12u1" == "systemd-boot 
252.12-1~deb12u1
Skipping "/boot/efi/EFI/BOOT/BOOTX64.EFI", since same boot loader version in 
place already.
Reading EFI variable 
/sys/firmware/efi/efivars/Boot-8be4df61-93ca-11d2-aa0d-00e098032b8c.
EFI variable 
/sys/firmware/efi/efivars/Boot-8be4df61-93ca-11d2-aa0d-00e098032b8c is 
shorter than 4 bytes, refusing.
Reading EFI variable 
/sys/firmware/efi/efivars/Boot0001-8be4df61-93ca-11d2-aa0d-00e098032b8c.
Reading from 
"/sys/firmware/efi/efivars/Boot0001-8be4df61-93ca-11d2-aa0d-00e098032b8c" 
failed: Input/output error
Reading EFI variable 
/sys/firmware/efi/efivars/Boot0002-8be4df61-93ca-11d2-aa0d-00e098032b8c.
EFI variable 
/sys/firmware/efi/efivars/Boot0002-8be4df61-93ca-11d2-aa0d-00e098032b8c is 
shorter than 4 bytes, refusing.
Reading EFI variable 
/sys/firmware/efi/efivars/Boot0003-8be4df61-93ca-11d2-aa0d-00e098032b8c.
EFI variable 
/sys/firmware/efi/efivars/Boot0003-8be4df61-93ca-11d2-aa0d-00e098032b8c is 
shorter than 4 bytes, refusing.
Reading EFI variable 
/sys/firmware/efi/efivars/Boot2001-8be4df61-93ca-11d2-aa0d-00e098032b8c.
Reading from 
"/sys/firmware/efi/efivars/Boot2001-8be4df61-93ca-11d2-aa0d-00e098032b8c" 
failed: Input/output error
Reading EFI variable 
/sys/firmware/efi/efivars/Boot2002-8be4df61-93ca-11d2-aa0d-00e098032b8c.
Reading from 
"/sys/firmware/efi/efivars/Boot2002-8be4df61-93ca-11d2-aa0d-00e098032b8c" 
failed: Input/output error
Reading EFI variable 
/sys/firmware/efi/efivars/Boot3001-8be4df61-93ca-11d2-aa0d-00e098032b8c.
Reading from 
"/sys/firmware/efi/efivars/Boot3001-8be4df61-93ca-11d2-aa0d-00e098032b8c" 
failed: Input/output error
Reading EFI variable 
/sys/firmware/efi/efivars/Boot0004-8be4df61-93ca-11d2-aa0d-00e098032b8c.
open("/sys/firmware/efi/efivars/Boot0004-8be4df61-93ca-11d2-aa0d-00e098032b8c") 
failed: No such file or directory
Failed to create EFI Boot variable entry, skipping: Input/output error
[57615.451200] [ cut here ]
[57615.451215] [Firmware Bug]: Page fault caused by firmware at PA: 0x6791e7f0
[57615.451221] WARNING: CPU: 0 PID: 31945 at arch/x86/platform/efi/quirks.c:735 
efi_crash_gracefully_on_page_fault+0x51/0xf0
[57615.451232] Modules linked in: uas usb_storage ccm uinput rfcomm 
snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cmac algif_hash algif_skcipher 
af_alg bnep binfmt_misc snd_sof_pci_intel_apl snd_sof_intel_hda_common 
soundwire_intel soundwire_generic_allocation soundwire_cadence 
snd_sof_intel_hda x86_pkg_temp_thermal snd_sof_pci snd_sof_xtensa_dsp 
intel_powerclamp snd_sof snd_sof_utils nls_ascii snd_hda_codec_hdmi nls_cp437 
coretemp vfat soundwire_bus fat snd_ctl_led snd_soc_skl snd_soc_hdac_hda 
kvm_intel snd_hda_ext_core btusb snd_hda_codec_realtek snd_soc_sst_ipc mei_hdcp 
snd_soc_sst_dsp btrtl btbcm snd_soc_acpi_intel_match snd_hda_codec_generic 
btintel btmtk kvm snd_soc_acpi iwlmvm ledtrig_audio intel_rapl_msr irqbypass 
bluetooth snd_soc_core mac80211 snd_compress ghash_clmulni_intel hid_generic 
jitterentropy_rng libarc4 sha512_ssse3 sha512_generic aesni_intel crypto_simd 
snd_hda_intel ctr iwlwifi snd_intel_dspcfg snd_intel_sdw_acpi drbg cryptd 
snd_hda_codec rapl intel_cstate
[57615.451315]  snd_hda_core processor_thermal_device_pci_legacy 
processor_thermal_device cfg80211 ansi_cprng processor_thermal_rfim snd_hwdep 
processor_thermal_mbox ecdh_generic at24 ecc snd_pcm wdat_wdt mei_me snd_timer 
processor_thermal_rapl pcspkr wmi_bmof watchdog intel_rapl_common rfkill snd 
mei intel_xhci_usb_role_switch int340x_thermal_zone intel_soc_dts_iosf roles 
soundcore int3400_thermal ac acpi_thermal_rel int3406_thermal intel_pmc_core 
joydev sg serio_raw evdev uvcvideo videobuf2_vmalloc videobuf2_memops 
videobuf2_v4l2 videobuf2_common usbhid videodev hid mc loop fuse dm_mod 
efi_pstore configfs efivarfs ip_tables x_tables autofs4 ext4 crc16 mbcache jbd2 
crc32c_generic sd_mod t10_pi crc64_rocksoft crc64 crc_t10dif crct10dif_generic 
i915 ahci libahci drm_buddy i2c_algo_bit xhci_pci libata drm_display_helper 
xhci_hcd cec rc_core scsi_mod ttm usbcore r8169 drm_kms_helper i2c_i801 realtek 
crct10dif_pclmul mdio_devres 

Bug#1043583: systemd-boot postinst update causes EFI crash

2023-08-13 Thread Luca Boccassi
Control: severity -1 minor
Control: tags -1 moreinfo

On Sun, 13 Aug 2023 12:59:07 +0300 Maria Lisina
 wrote:
> Package: systemd-boot
> Version: 252.12-1~deb12u1
> Severity: critical
> Tags: patch
> Justification: breaks unrelated software
> X-Debbugs-Cc: sekoohaka.sari...@gmail.com
> 
> Dear Maintainer, when systemd-boot updates and if bootctl is-
installed reports
> 0, it runs bootctl update --graceful without --no-variables option.
It causes
> EFI crash on my machine because it doesn't support nvram. Official
systemd-boot
> update service has this option (/usr/lib/systemd/system/systemd-boot-
> update.service:21). I think it should be added to postints too.

Which hardware is that? And what does 'EFI crash' mean exactly? What's
the output of 'SYSTEMD_LOG_LEVEL=debug bootctl update' ?

-- 
Kind regards,
Luca Boccassi


signature.asc
Description: This is a digitally signed message part


Bug#1043583: systemd-boot postinst update causes EFI crash

2023-08-13 Thread Maria Lisina
Package: systemd-boot
Version: 252.12-1~deb12u1
Severity: critical
Tags: patch
Justification: breaks unrelated software
X-Debbugs-Cc: sekoohaka.sari...@gmail.com

Dear Maintainer, when systemd-boot updates and if bootctl is-installed reports
0, it runs bootctl update --graceful without --no-variables option. It causes
EFI crash on my machine because it doesn't support nvram. Official systemd-boot
update service has this option (/usr/lib/systemd/system/systemd-boot-
update.service:21). I think it should be added to postints too.


-- System Information:
Debian Release: 12.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-11-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages systemd-boot depends on:
ii  libc6  2.36-9+deb12u1
ii  libsystemd-shared  252.12-1~deb12u1
ii  systemd-boot-efi   252.12-1~deb12u1

Versions of packages systemd-boot recommends:
ii  efibootmgr  17-2

systemd-boot suggests no packages.

-- no debconf information
--- postinst2023-08-13 12:57:31.625391255 +0300
+++ postinst.1  2023-08-13 12:57:55.169585926 +0300
@@ -14,6 +14,6 @@
 fi
 
 if [ "$1" = configure ] && [ -n "$2" ] && bootctl is-installed > /dev/null 
2>&1; then
-bootctl update --graceful
+bootctl update --no-variables --graceful
 fi
 
--- postinst2023-08-13 12:57:31.625391255 +0300
+++ postinst.1  2023-08-13 12:57:55.169585926 +0300
@@ -14,6 +14,6 @@
 fi
 
 if [ "$1" = configure ] && [ -n "$2" ] && bootctl is-installed > /dev/null 
2>&1; then
-bootctl update --graceful
+bootctl update --no-variables --graceful
 fi