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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b508c090dced250a32f413f9ce0d65fd6457f832.camel@sapience.com>
Date: Mon, 31 Mar 2025 13:26:51 -0400
From: Genes Lists <lists@...ience.com>
To: Kurt Borja <kuurtb@...il.com>, Henrique de Moraes Holschuh
 <hmh@....eng.br>,  Hans de Goede <hdegoede@...hat.com>, Ilpo
 Järvinen <ilpo.jarvinen@...ux.intel.com>,  Mark Pearson
 <mpearson-lenovo@...ebb.ca>
Cc: ibm-acpi-devel@...ts.sourceforge.net,
 platform-driver-x86@...r.kernel.org, 	linux-kernel@...r.kernel.org,
 linux-riscv@...ts.infradead.org, Damian Tometzki	 <damian@...cv-rocks.de>
Subject: Re: [PATCH] platform/x86: thinkpad_acpi: Fix NULL pointer
 dereferences while probing

On Sun, 2025-03-30 at 12:39 -0300, Kurt Borja wrote:
> Some subdrivers make use of the global reference tpacpi_pdev during
> initialization, which is called from the platform driver's probe.
> However, after
> 
> commit 38b9ab80db31 ("platform/x86: thinkpad_acpi: Move subdriver
> initialization to tpacpi_pdriver's probe.")
> 
> this variable is only properly initialized *after* probing and this
> can
> result in a NULL pointer dereference.
> 
> In order to fix this without reverting the commit, register the
> platform
> bundle in two steps, first create and initialize tpacpi_pdev, then
> register the driver synchronously with platform_driver_probe(). This
> way
> the benefits of commit 38b9ab80db31 are preserved.
> 
> Additionally,
> 
> commit 43fc63a1e8f6 ("platform/x86: thinkpad_acpi: Move HWMON
> initialization to tpacpi_hwmon_pdriver's probe")
> 
> introduced a similar problem, however tpacpi_sensors_pdev is only
> used
> once inside the probe, so replace the global reference with the one
> given by the probe.
> 
> ...
> base-commit: 1a9239bb4253f9076b5b4b2a1a4e8d7defd77a95
> change-id: 20250330-thinkpad-fix-98db0d8c3be3
> 
Fixed problem seen here on thinkpad.
Tested on mainline commit 4e82c87058f45e79eeaa4d5bcc3b38dd3dce7209

Tested-by: Gene C <arch@...ience.com>


-- 
Gene

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ