Re: [PATCH smatch] check_idr_alloc: Add a new check to detect start values < 0

Dan Carpenter <[email protected]> Fri, 27 Feb 2026 13:10:16 +0300
Newsgroups org.kernel.vger.smatch
Message-ID <[email protected]>
On Thu, Feb 26, 2026 at 05:21:37AM -0800, Harshit Mogalapalli wrote:
> Motivation: https://lore.kernel.org/all/2026021413-CVE-2026-23149-8329@gregkh/
> 
> When user controlled data can pass start values < 0 to idr_alloc()
> kernel hits a WARN_ON in run time. This check is to catch that using
> static analysis.
> 
> Signed-off-by: Harshit Mogalapalli <[email protected]>
> ---

Applied.  Thanks, Harshit!

regads,
dan carpenter