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]
Date: Tue, 2 Apr 2024 21:22:41 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Denis Kirjanov <kirjanov@...il.com>
Cc: netdev@...r.kernel.org, edumazet@...gle.com, jgg@...pe.ca,
	Denis Kirjanov <dkirjanov@...e.de>,
	syzbot+5fe14f2ff4ccbace9a26@...kaller.appspotmail.com,
	RDMA mailing list <linux-rdma@...r.kernel.org>
Subject: Re: [PATCH 5 net] RDMA/core: fix UAF with ib_device_get_netdev()

On Tue, Apr 02, 2024 at 09:26:41AM -0400, Denis Kirjanov wrote:
> A call to ib_device_get_netdev may lead to a race condition
> while accessing a netdevice instance since we don't hold
> the rtnl lock while checking
> the registration state:
> 	if (res && res->reg_state != NETREG_REGISTERED) {
> 
> v2: unlock rtnl on error path
> v3: update remaining callers of ib_device_get_netdev
> v4: don't call a cb with rtnl lock in ib_enum_roce_netdev
> v5: put rtnl lock/unlock inside ib_device_get_netdev
> 
> Reported-by: syzbot+5fe14f2ff4ccbace9a26@...kaller.appspotmail.com
> Fixes: d41861942fc55 ("IB/core: Add generic function to extract IB speed from netdev")
> Signed-off-by: Denis Kirjanov <dkirjanov@...e.de>
> ---
>  drivers/infiniband/core/device.c | 3 +++
>  1 file changed, 3 insertions(+)

1. You are changing RDMA code and not net code, please add linux-rdma
   mailing list to the CC list.
2. Please put changelog after --- trailer.
3. Please add to the commit message stack trace.
4. "May lead to a race condition ..." makes me wonder how it is
possible, because RoCE/iWARP devices can't leave without netdev. So
please explain how it is possible in the commit message.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ