[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aGiCV5Vgz00ODrw4@bombadil.infradead.org>
Date: Fri, 4 Jul 2025 18:39:35 -0700
From: Luis Chamberlain <mcgrof@...nel.org>
To: Sergey Shtylyov <s.shtylyov@....ru>
Cc: Russ Weight <russ.weight@...ux.dev>, Danilo Krummrich <dakr@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] firmware_loader: prevent integer overflow in
firmware_loading_timeout()
On Thu, Jul 03, 2025 at 11:38:33PM +0300, Sergey Shtylyov wrote:
> In firmware_loading_timeout(), *int* result of __firmware_loading_timeout()
> multiplied by HZ might overflow before being implicitly cast to *long* when
> being returned. Rewrite the function using check_mul_overflow() and capping
> the result at LONG_MAX on actual overflow...
>
> Found by Linux Verification Center (linuxtesting.org) with the Svace static
> analysis tool.
>
> Signed-off-by: Sergey Shtylyov <s.shtylyov@....ru>
> Cc: stable@...r.kernel.org
Reviewed-by: Luis Chamberlain <mcgrof@...nel.org>
Luis
Powered by blists - more mailing lists