Re: [PATCH v4] lib/bootconfig: guard xbc_node_compose_key_after() buffer size

From
Steven Rostedt <rostedt@goodmis.org>
Date
2026-03-18 00:43:31
Also in
lkml
Reply to
Masami Hiramatsu (Google), 2026-03-18
On Wed, 18 Mar 2026 09:02:43 +0900
Masami Hiramatsu (Google) [off-list ref] wrote:
Yes, that is checked in vsnprintf(), not its caller.
I think linux kernel should ensure the the return value is smaller
than INT_MAX, and return -EOVERFLOW if not.
Well, there's very few places that could have a buffer size of > 2G.

What's the max bootconfig limit? Could you create a bootconfig that is
greater than 2G?

If not, then yeah, we shouldn't really care about overflows (and that
includes not worrying about typecasting the size variable to int).

-- Steve
Thread (7 messages) 7 messages, 3 authors, last reply 2026-03-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help