From: Andrew Morton <akpm@linux-foundation.org>
To: LZ <lzsx618@gmail.com>
Cc: Armaan Sandhu <armaan.sandhu0504@gmail.com>,
Andy Shevchenko <andriy.shevchenko@intel.com>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] lib/cmdline: fix get_options() count and overflow with large ranges
Date: Wed, 7 Oct 2026 16:08:56 -0700 [thread overview]
Message-ID: <20261007160856.c97b2d48db0fea0b3744d6aa@linux-foundation.org> (raw)
In-Reply-To: <CAGD6qbSfTmHq7Y_jM7-QS26at=w6OQwfOZjCU8n4PnnFmqgDNg@mail.gmail.com>
On Wed, 7 Oct 2026 18:01:08 -0500 LZ <lzsx618@gmail.com> wrote:
> Hi Andrew,
>
> I came across this issue independently while using ASan and UBSan to look
> for potential vulnerabilities in the Linux kernel. I do not know Armaan and
> have not been in contact with him, so there was no coordination between our
> submissions. The timing appears to be coincidental.
>
> Regarding the KUnit changes, both patches add a test function named
> cmdline_test_range_overflow, but the actual test cases are different.
>
> My fix focuses on preventing the index overflow in get_options(). Armaan's
> patch additionally handles overflow in the range-length subtraction and
> corrects the count when a range exceeds the output array's remaining
> capacity.
OK, thanks.
This is the weirdest thing!
> Based on those differences, Armaan's patch appears to address a broader set
> of related issues. Using his implementation as the basis, while retaining
> any complementary regression tests from my patch, seems reasonable to me.
Great. Can I add your Reviewed-by to Armaan's patch?
Armaan, can you please check the regression tests, see if there's
anything to be incorporated into yours?
next prev parent reply other threads:[~2026-10-07 23:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 21:39 Armaan Sandhu
2026-10-07 22:00 ` Andrew Morton
[not found] ` <CAGD6qbSfTmHq7Y_jM7-QS26at=w6OQwfOZjCU8n4PnnFmqgDNg@mail.gmail.com>
2026-10-07 23:08 ` Andrew Morton [this message]
[not found] ` <CAGD6qbRJFPX9dYHokumQat3q0AZiG7bgC3hr8rMpCc_BUS6f2g@mail.gmail.com>
[not found] ` <CANVJMCFQr9r5-_z3MKkX3G56DWBQTBK8XHW8+YBmme4=F+Cb5A@mail.gmail.com>
2026-10-08 0:08 ` Andrew Morton
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=20261007160856.c97b2d48db0fea0b3744d6aa@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=andriy.shevchenko@intel.com \
--cc=armaan.sandhu0504@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lzsx618@gmail.com \
--cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®