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: <20250221174347.GA314593@nvidia.com>
Date: Fri, 21 Feb 2025 13:43:47 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Parav Pandit <parav@...lanox.com>
Cc: Roman Gushchin <roman.gushchin@...ux.dev>,
	Leon Romanovsky <leon@...nel.org>,
	Maher Sanalla <msanalla@...dia.com>,
	"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] RDMA/core: fix a NULL-pointer dereference in
 hw_stat_device_show()

On Fri, Feb 21, 2025 at 04:34:25AM +0000, Parav Pandit wrote:

> I just tried reproducing now on 6.12+ kernel manually.
> It appears impossible to reach flow to me as intended in the commit
> I listed.

It looks to me like this:

static void rdma_init_coredev(struct ib_core_device *coredev,
			      struct ib_device *dev, struct net *net)
{
	coredev->dev.groups = dev->groups;
                   ^^^^^^^^^^^^^^^^^^^^^

Copies the sysfs groups from the normal ib_dev which includes the hw_*
stuff to the per-NS device?

Everything in that groups list must use rdma_device_to_ibdev()

int ib_setup_device_attrs(struct ib_device *ibdev)
{
[..]
		attr->attr.show = hw_stat_device_show;
		attr->show = show_hw_stats;
		data->group.attrs[pos] = &attr->attr.attr;
[..]
			ibdev->groups[i] = &data->group;

Which means the sysfs reported here is in that list?

Maybe this was misses when the sysfs was shut off?

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ