lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240823074211.GM6858@google.com>
Date: Fri, 23 Aug 2024 08:42:11 +0100
From: Lee Jones <lee@...nel.org>
To: Kees Cook <kees@...nel.org>
Cc: "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
	Pavel Machek <pavel@....cz>, linux-leds@...r.kernel.org,
	"Gustavo A. R. Silva" <gustavoars@...nel.org>,
	linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] leds: gpio: Set num_leds after allocation

On Thu, 22 Aug 2024, Kees Cook wrote:

> On Thu, Jul 25, 2024 at 11:22:40AM +0100, Lee Jones wrote:
> > On Tue, 16 Jul 2024, Gustavo A. R. Silva wrote:
> > 
> > > 
> > > 
> > > On 16/07/24 15:24, Kees Cook wrote:
> > > > With the new __counted_by annotation, the "num_leds" variable needs to
> > > > valid for accesses to the "leds" array. This requirement is not met in
> > > > gpio_leds_create(), since "num_leds" starts at "0", so "leds" index "0"
> > > > will not be considered valid (num_leds would need to be "1" to access
> > > > index "0").
> > > > 
> > > > Fix this by setting the allocation size after allocation, and then update
> > > > the final count based on how many were actually added to the array.
> > > > 
> > > > Fixes: 52cd75108a42 ("leds: gpio: Annotate struct gpio_leds_priv with __counted_by")
> > > > Signed-off-by: Kees Cook <kees@...nel.org>
> > > 
> > > Reviewed-by: Gustavo A. R. Silva <gustavoars@...nel.org>
> > > 
> > > Thanks
> > > -- 
> > 
> > Using the signature tag in the middle of an email turns the remainder of
> > the body into a signature block, which is odd to say the least.  By all
> > means sign-off in the middle of a mail, but please refrain from
> > converting the rest of the mail.
> 
> Ping. Shall I take this via the hardening tree?

Certainly not. :)

Apologies, looks like I relied to Gustavo then marked the submission as
reviewed.  Applied to the LED tree now, thanks.

-- 
Lee Jones [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ