lib-bootconfig-fix-off-by-one-in-xbc_verify_tree-unclosed-brace-error.patch removed from -mm tree
The quilt patch titled
Subject: lib/bootconfig: fix off-by-one in xbc_verify_tree() unclosed brace error
has been removed from the -mm tree. Its filename was
lib-bootconfig-fix-off-by-one-in-xbc_verify_tree-unclosed-brace-error.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Josh Law <[email protected]>
Subject: lib/bootconfig: fix off-by-one in xbc_verify_tree() unclosed brace error
Date: Thu, 12 Mar 2026 19:11:41 +0000
Patch series "lib/bootconfig: three bug fixes", v2.
Three fixes for lib/bootconfig.c:
1. Fix off-by-one in xbc_verify_tree() unclosed brace error reporting.
2. Check bounds before writing in __xbc_open_brace() to prevent potential out-of-bounds writes.
3. Fix snprintf truncation check in xbc_node_compose_key_after().
This patch (of 3):
__xbc_open_brace() pushes entries with post-increment (open_brace[brace_index++]), so brace_index always points one past the last valid entry. xbc_verify_tree() reads open_brace[brace_index] to report which brace is unclosed, but this is one past the last pushed entry and contains stale/zero data, causing the error message to reference the wrong node.
Use open_brace[brace_index - 1] to correctly identify the unclosed brace. brace_index is known to be > 0 here since we are inside the if (brace_index) guard.
---
lib/bootconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bootconfig.c renamed from lib/bootconfig.c~lib-bootconfig-fix-off-by-one-in-xbc_verify_tree-unclosed-brace-error +1 -1
@@ -802,7 +802,7 @@ static int __init xbc_verify_tree(void)/* Brace closing */ if (brace_index) { - n = &xbc_nodes[open_brace[brace_index]]; + n = &xbc_nodes[open_brace[brace_index -1 ]];return xbc_parse_error ("Brace is not closed" ,xbc_node_get_data (n)); }
_
Patches currently in -mm which might be from [email protected] are
lib-maple_tree-fix-swapped-arguments-in-mas_safe_pivot-call.patch lib-glob-fix-grammar-and-replace-non-inclusive-terminology.patch lib-glob-add-explicit-include-for-exporth.patch lib-glob-replace-bitwise-or-with-logical-operation-on-boolean.patch lib-glob-clean-up-bool-abuse-in-pointer-arithmetic.patch lib-uuid-fix-typo-reversion-to-revision-in-comment.patch lib-inflate-fix-memory-leak-in-inflate_fixed-on-inflate_codes-failure.patch lib-inflate-fix-memory-leak-in-inflate_dynamic-on-inflate_codes-failure.patch lib-inflate-fix-grammar-in-comment-variable-to-variables.patch lib-inflate-fix-typo-this-results-to-the-results-in-comment.patch lib-bug-fix-inconsistent-capitalization-in-bug-message.patch lib-bug-remove-unnecessary-variable-initializations.patch lib-idr-fix-ida_find_first_range-missing-ids-across-chunk-boundaries.patch lib-decompress_bunzip2-fix-32-bit-shift-undefined-behavior.patch lib-ts_bm-fix-integer-overflow-in-pattern-length-calculation.patch lib-ts_kmp-fix-integer-overflow-in-pattern-length-calculation.patch lib-bootconfig-fix-snprintf-truncation-check-in-xbc_node_compose_key_after.patch lib-glob-initialize-back_str-to-silence-uninitialized-variable-warning.patch