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: <aXnSl20A2RD4RsfV@smile.fi.intel.com>
Date: Wed, 28 Jan 2026 11:10:47 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Bartosz Golaszewski <brgl@...nel.org>
Cc: Mika Westerberg <westeri@...nel.org>, linux-gpio@...r.kernel.org,
	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
	Linus Walleij <linusw@...nel.org>,
	Mika Westerberg <mika.westerberg@...ux.intel.com>
Subject: Re: [PATCH v2 1/1] gpiolib: acpi: Fix potential out-of-boundary left
 shift

On Wed, Jan 28, 2026 at 01:02:11AM -0800, Bartosz Golaszewski wrote:
> On Tue, 27 Jan 2026 14:49:51 +0100, Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com> said:
> > On Tue, Jan 27, 2026 at 02:43:00PM +0100, Mika Westerberg wrote:
> >> On Tue, Jan 27, 2026 at 12:06:30PM +0100, Andy Shevchenko wrote:
> >> > GPIO Address Space handler gets a pointer to the in or out value.
> >> > This value is supposed to be at least 64-bit, but it's not limited
> >> > to be exactly 64-bit. When ACPI tables are being parsed, for
> >> > the bigger Connection():s ACPICA creates a Buffer instead of regular
> >> > Integer object. The Buffer exists as long as Namespace holds
> >> > the certain Connection(). Hence we can access the necessary bits
> >> > without worrying. On the other hand, the left shift, used in
> >> > the code, is limited by 31 (on 32-bit platforms) and otherwise
> >> > considered to be Undefined Behaviour. Also the code uses only
> >> > the first 64-bit word for the value, and anything bigger than 63
> >> > will be also subject to UB. Fix all this by modifying the code
> >> > to correctly set or clear the respective bit in the bitmap constructed
> >> > of 64-bit words.
> >> >
> >> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> >>
> >> Perfect, thanks!
> >
> >> Reviewed-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
> >
> > Thank you!
> >
> > Bart, since you picked up the patch in the same lines of code, feel free to
> > take this one on top (I think it's your gpio/for-current branch).
> 
> Don't you want a Fixes: and Cc: stable tags?

Okay, I will add them in v3, thanks!

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ