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: <20070206175152.39d767dd.akpm@linux-foundation.org>
Date:	Tue, 6 Feb 2007 17:51:52 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	NeilBrown <neilb@...e.de>
Cc:	stable@...nel.org, nfs@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] knfsd: Fix a race in closing NFSd connections.

On Wed, 7 Feb 2007 11:10:26 +1100
NeilBrown <neilb@...e.de> wrote:

> If you lose this race, it can iput a socket inode twice and you
> get a BUG in fs/inode.c
> 
> When I added the option for user-space to close a socket,
> I added some cruft to svc_delete_socket so that I could call
> that function when closing a socket per user-space request.
> 
> This was the wrong thing to do.  I should have just set SK_CLOSE
> and let normal mechanisms do the work.
> 
> Not only wrong, but buggy.  The locking is all wrong and it openned
> up a race where-by a socket could be closed twice.
> 
> So this patch:
>   Introduces svc_close_socket which sets SK_CLOSE then either leave
>   the close up to a thread, or calls svc_delete_socket if it can
>   get SK_BUSY.
> 
>   Adds a bias to sk_busy which is removed when SK_DEAD is set,
>   This avoid races around shutting down the socket.
> 
>   Changes several 'spin_lock' to 'spin_lock_bh' where the _bh 
>   was missing.
> 

This patch assumes the presence of
knfsd-sunrpc-allow-creating-an-rpc-service-without-registering-with-portmapper.patch which
obviously isn't appropriate for -stable.

Please confirm that the patch which I merged is still OK, thanks.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ