Skip to content

bootconfig: targeted fixes for stable

Josh Law linux-trace-kernel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v8 Latest2 patches 1 replyIn review

Changes in v8 from the cover letter

- 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.

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2lib/bootconfig: check xbc_init_node() return in override pathlib/bootconfig.c+2 -10 replies
2/2tools/bootconfig: fix fd leak in load_xbc_file() on fstat failuretools/bootconfig/main.c+5 -21 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v8 yet.

Read the v8 thread

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

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