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] [day] [month] [year] [list]
Message-ID: <13cc74e7-4a18-45e6-b511-940f9ed56a2b@nvidia.com>
Date: Tue, 12 Aug 2025 18:10:39 +0300
From: Mark Bloch <mbloch@...dia.com>
To: Parav Pandit <parav@...dia.com>, Håkon Bugge
 <haakon.bugge@...cle.com>, Jason Gunthorpe <jgg@...pe.ca>,
 Leon Romanovsky <leon@...nel.org>, Chiara Meiohas <cmeiohas@...dia.com>,
 Michael Guralnik <michaelgur@...dia.com>, Yuyu Li <liyuyu6@...wei.com>,
 Patrisious Haddad <phaddad@...dia.com>, Zhu Yanjun <yanjun.zhu@...ux.dev>,
 Yishai Hadas <yishaih@...dia.com>, "Dr. David Alan Gilbert"
 <linux@...blig.org>, Wang Liang <wangliang74@...wei.com>
Cc: "stable@...r.kernel.org" <stable@...r.kernel.org>,
 Junxian Huang <huangjunxian6@...ilicon.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-next 1/1] RDMA/core: Fix socket leak in
 rdma_dev_init_net



On 12/08/2025 16:49, Parav Pandit wrote:
> 
> 
>> From: Håkon Bugge <haakon.bugge@...cle.com>
>> Sent: 12 August 2025 07:08 PM
>>
>> If rdma_dev_init_net() has an early return because the supplied net is the
>> default init_net, we need to call rdma_nl_net_exit() before returning.
>>
> Not really.
> We still need to create the netlink socket so that rdma commands can be operational in init_net.
> 
> However, there is a bug in incorrectly cleaning up the init_net during ib_core driver unload flow.
> 
> I reviewed a fix internally from Mark Bloch for it.
> It should be posted anytime soon from Leon's queue.
> 
> Mark,
> Can you please comment on plan to post the fix to rdma-rc?

Leon is reviewing it now, once he’s finished, he’ll send it.

Mark

> 
>  
>> Fixes: 4e0f7b907072 ("RDMA/core: Implement compat device/sysfs tree in net
>> namespace")
>> Cc: stable@...r.kernel.org
>> Signed-off-by: Håkon Bugge <haakon.bugge@...cle.com>
>> ---
>>  drivers/infiniband/core/device.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
>> index 3145cb34a1d20..ec5642e70c5db 100644
>> --- a/drivers/infiniband/core/device.c
>> +++ b/drivers/infiniband/core/device.c
>> @@ -1203,8 +1203,10 @@ static __net_init int rdma_dev_init_net(struct net
>> *net)
>>  		return ret;
>>
>>  	/* No need to create any compat devices in default init_net. */
>> -	if (net_eq(net, &init_net))
>> +	if (net_eq(net, &init_net)) {
>> +		rdma_nl_net_exit(rnet);
>>  		return 0;
>> +	}
>>
>>  	ret = xa_alloc(&rdma_nets, &rnet->id, rnet, xa_limit_32b,
>> GFP_KERNEL);
>>  	if (ret) {
>> --
>> 2.43.5
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ