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]
Date: Tue, 26 Mar 2024 08:18:43 +0000
From: "Antipov, Dmitriy" <Dmitriy.Antipov@...tline.com>
To: "gbayer@...ux.ibm.com" <gbayer@...ux.ibm.com>, "guwen@...ux.alibaba.com"
	<guwen@...ux.alibaba.com>, "wenjia@...ux.ibm.com" <wenjia@...ux.ibm.com>,
	"jaka@...ux.ibm.com" <jaka@...ux.ibm.com>
CC: "lvc-project@...uxtesting.org" <lvc-project@...uxtesting.org>, "Shvetsov,
 Alexander" <Alexander.Shvetsov@...tline.com>, "linux-s390@...r.kernel.org"
	<linux-s390@...r.kernel.org>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>
Subject: Re: [lvc-project] [PATCH] [RFC] net: smc: fix fasync leak in
 smc_release()

On Thu, 2024-03-07 at 13:21 +0300, Dmitry Antipov wrote:

> On Thu, 2024-03-07 at 10:57 +0100, Jan Karcher wrote:
> 
> > We think it might be an option to secure the path in this function with 
> > the smc->clcsock_release_lock.
> > 
> > ```
> > 	lock_sock(&smc->sk);
> > 	if (smc->use_fallback) {
> > 		if (!smc->clcsock) {
> > 			release_sock(&smc->sk);
> > 			return -EBADF;
> > 		}
> > +		mutex_lock(&smc->clcsock_release_lock);
> > 		answ = smc->clcsock->ops->ioctl(smc->clcsock, cmd, arg);
> > +		mutex_unlock(&smc->clcsock_release_lock);
> > 		release_sock(&smc->sk);
> > 		return answ;
> > 	}
> > ```
> > 
> > What do yo think about this?
> 
> You're trying to fix it on the wrong path. FIOASYNC is a generic rather
> than protocol-specific thing. So userspace 'ioctl(sock, FIOASYNC, [])'
> call is handled with:
> 
> -> sys_ioctl()
>   -> do_vfs_ioctl()
>     -> ioctl_fioasync()
>       -> filp->f_op->fasync() (which is sock_fasync() for all sockets)
> 
> rather than 'sock->ops->ioctl(...)'.

Any progress on this?

Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ