dracut/0112.patch
Pavel Valena 9afa387eea dracut-057-118.git20260624
(Includes partial revert of 8107ee642f9929e7e656fc52759816b51fbaef90.)

- feat(resume): add device used for resume
- fix(dracut): remove trailing null characters from SBATs when building UKIs
- fix(network-legacy): replace `echo` writes with `printf` to prevent injection via DHCP
- fix(iscsi): replace `echo` writes with `printf` to prevent variable injection
- fix(network): warn on suspicious shell metacharacters in hostname file
- fix(base): escape arguments in initqueue hook script generation
- revert: "feat(i18n): pull 'drm' or 'simpledrm' module unless excluded"

Resolves: RHEL-119785,RHEL-140458,RHEL-170858,RHEL-178488
2026-06-25 01:40:34 +02:00

31 lines
877 B
Diff

From 124a6ae95b58d10047c4b866e36db16e768eb03a Mon Sep 17 00:00:00 2001
From: Li Tian <litian@redhat.com>
Date: Wed, 14 Jan 2026 13:24:36 +0800
Subject: [PATCH] fix(dracut): remove trailing null characters from SBATs when
building UKIs
SBAT of kernel has null character paddings at the end. Using tools
like ukify will display massive amount of '\0' in SBAT. Ukify is
doing ".rstrip('b\x00')" when merging SBATs.
(cherry picked from commit cbe71b639522c3f328d2a1757a3c54214df66b31)
Resolves: RHEL-140458
---
dracut.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/dracut.sh b/dracut.sh
index 47adee2f..4b6410c0 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -2641,6 +2641,7 @@ get_sbat_string() {
local inp=$1
local out=$uefi_outdir/$2
objcopy -O binary --only-section=.sbat "$inp" "$out"
+ sed -i 's/\x00*$//' "$out"
clean_sbat_string "$out"
}