summaryrefslogtreecommitdiff
path: root/lib/bootconfig-data.S
diff options
context:
space:
mode:
authorJosh Law <objecting@objecting.org>2026-03-12 19:11:42 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-03-19 16:15:28 +0100
commitf3075c2c13b751686921079c8f9e13c6f07b6fc8 (patch)
treec32e1acdc45270afcf12ffb0187cf257280bb800 /lib/bootconfig-data.S
parentad6008ca4e33e65c0c0799c33ff53cc34e77e755 (diff)
lib/bootconfig: check bounds before writing in __xbc_open_brace()
commit 560f763baa0f2c9a44da4294c06af071405ac46f upstream. The bounds check for brace_index happens after the array write. While the current call pattern prevents an actual out-of-bounds access (the previous call would have returned an error), the write-before-check pattern is fragile and would become a real out-of-bounds write if the error return were ever not propagated. Move the bounds check before the array write so the function is self-contained and safe regardless of caller behavior. Link: https://lore.kernel.org/all/20260312191143.28719-3-objecting@objecting.org/ Fixes: ead1e19ad905 ("lib/bootconfig: Fix a bug of breaking existing tree nodes") Cc: stable@vger.kernel.org Signed-off-by: Josh Law <objecting@objecting.org> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/bootconfig-data.S')
0 files changed, 0 insertions, 0 deletions