From: Steven Rostedt <rostedt@goodmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Josh Law <objecting@objecting.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v4] lib/bootconfig: guard xbc_node_compose_key_after() buffer size
Date: Tue, 17 Mar 2026 20:43:27 -0400 [thread overview]
Message-ID: <20260317204327.3c61d0ea@robin> (raw)
In-Reply-To: <20260318090243.7c437f2c5e07a1ce00375102@kernel.org>
On Wed, 18 Mar 2026 09:02:43 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> 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
next prev parent reply other threads:[~2026-03-18 0:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 20:44 [PATCH v4] lib/bootconfig: guard xbc_node_compose_key_after() buffer size Josh Law
2026-03-17 23:03 ` Masami Hiramatsu
2026-03-17 23:16 ` Steven Rostedt
2026-03-18 0:02 ` Masami Hiramatsu
2026-03-18 0:43 ` Steven Rostedt [this message]
2026-03-18 3:07 ` Masami Hiramatsu
2026-03-18 13:45 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260317204327.3c61d0ea@robin \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=objecting@objecting.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.