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] [thread-next>] [day] [month] [year] [list]
Message-ID: <97746540.1782404.1759973048120.JavaMail.zimbra@raptorengineeringinc.com>
Date: Wed, 8 Oct 2025 20:24:08 -0500 (CDT)
From: Timothy Pearson <tpearson@...torengineering.com>
To: Timothy Pearson <tpearson@...torengineering.com>
Cc: Jiri Slaby <jirislaby@...nel.org>, 
	linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>, 
	linux-kernel <linux-kernel@...r.kernel.org>, 
	linux-pci <linux-pci@...r.kernel.org>, 
	Madhavan Srinivasan <maddy@...ux.ibm.com>, 
	Michael Ellerman <mpe@...erman.id.au>, 
	christophe leroy <christophe.leroy@...roup.eu>, 
	Naveen N Rao <naveen@...nel.org>, 
	Bjorn Helgaas <bhelgaas@...gle.com>, 
	Shawn Anastasio <sanastasio@...torengineering.com>
Subject: [PATCH] PCI: pnv_php: Fix potential NULL dereference in slot
  allocator

A highly unlikely NULL dereference in the allocation error handling path was
introduced in 466861909255.  Avoid dereferencing php_slot->bus by using
dev_warn() instead of SLOT_WARN() in the error path.

Fixes: 466861909255 ("PCI: pnv_php: Clean up allocated IRQs on unplug")
Signed-off-by: Timothy Pearson <tpearson@...torengineering.com>
---
 drivers/pci/hotplug/pnv_php.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c
index c5345bff9a55..f735935d80e7 100644
--- a/drivers/pci/hotplug/pnv_php.c
+++ b/drivers/pci/hotplug/pnv_php.c
@@ -804,7 +804,7 @@ static struct pnv_php_slot *pnv_php_alloc_slot(struct device_node *dn)
 	/* Allocate workqueue for this slot's interrupt handling */
 	php_slot->wq = alloc_workqueue("pciehp-%s", 0, 0, php_slot->name);
 	if (!php_slot->wq) {
-		SLOT_WARN(php_slot, "Cannot alloc workqueue\n");
+		dev_warn(&bus->dev, "Cannot alloc workqueue\n");
 		kfree(php_slot->name);
 		kfree(php_slot);
 		return NULL;
-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ