[PATCH v8 0/2] bootconfig: targeted fixes for stable

Josh Law
2026-03-18T15:58:58Z

Two bug fixes with Fixes tags, split out from the larger cleanup series
(v7 patches 9/15 and 10/15) per Masami's request so they can go
cleanly into bootconfig/fixes and from there into stable.

Changes since v7:
- Split fixes (this series) from cleanups/improvements into separate
series per maintainer request, so fixes can go into bootconfig/fixes
and the rest into bootconfig/for-next.

Bug fixes:
- Check xbc_init_node() return value in the ':=' override path; a
bootconfig using ':=' near the 32KB data limit could silently
retain the old value, meaning a security-relevant boot parameter
override would not take effect (patch 1).
- Fix file descriptor leak in tools/bootconfig load_xbc_file() when
fstat() fails, and preserve errno across close() on that error path
(patch 2).

Build-tested with both the in-kernel build (lib/bootconfig.o,
init/main.o) and the userspace tools/bootconfig build. All 70
tools/bootconfig test cases pass.

Josh Law (2):
lib/bootconfig: check xbc_init_node() return in override path
tools/bootconfig: fix fd leak in load_xbc_file() on fstat failure

lib/bootconfig.c | 3 ++-
tools/bootconfig/main.c | 7 +++++--
2 files changed, 7 insertions(+), 3 deletions(-)

--
2.34.1