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: <2dc9a9a3-2af7-475d-bfb6-9741ac0f2790@packett.cool>
Date: Fri, 9 Jan 2026 01:42:43 -0300
From: Val Packett <val@...kett.cool>
To: Bartosz Golaszewski <bartosz.golaszewski@....qualcomm.com>,
 Linus Walleij <linusw@...nel.org>, Bartosz Golaszewski <brgl@...nel.org>,
 Marek Szyprowski <m.szyprowski@...sung.com>,
 Konrad Dybcio <konradybcio@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org
Subject: Re: [PATCH] gpiolib: fix lookup table matching

On 1/8/26 7:23 AM, Bartosz Golaszewski wrote:

> If on any iteration in gpiod_find(), gpio_desc_table_match() returns
> NULL (which is normal and expected), we never reinitialize desc back to
> ERR_PTR(-ENOENT) and if we don't find a match later on, we will return
> NULL causing a NULL-pointer dereference in users not expecting it. Don't
> initialize desc, but return ERR_PTR(-ENOENT) explicitly at the end of
> the function.
>
> Fixes: 9700b0fccf38 ("gpiolib: allow multiple lookup tables per consumer")
> Reported-by: Marek Szyprowski <m.szyprowski@...sung.com>
> Closes: https://lore.kernel.org/all/00107523-7737-4b92-a785-14ce4e93b8cb@samsung.com/
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@....qualcomm.com>


Tested-by: Val Packett <val@...kett.cool>

This also fixes things on Qualcomm x1e laptops (same NULL deref logged 
from snd_soc_wcd938x wcd938x_probe, but as a consequence the display&gpu 
subsystem also wouldn't work)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ