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: <a1739c36a59617ebd01a7d3fe8f5a9f8ada771e5.camel@hammerspace.com>
Date: Sun, 21 Apr 2024 22:32:57 +0000
From: Trond Myklebust <trondmy@...merspace.com>
To: "usiegl00@...il.com" <usiegl00@...il.com>, "neilb@...e.de"
	<neilb@...e.de>, "davem@...emloft.net" <davem@...emloft.net>,
	"Dai.Ngo@...cle.com" <Dai.Ngo@...cle.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "edumazet@...gle.com" <edumazet@...gle.com>,
	"chuck.lever@...cle.com" <chuck.lever@...cle.com>, "jlayton@...nel.org"
	<jlayton@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
	"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>, "anna@...nel.org"
	<anna@...nel.org>, "tom@...pey.com" <tom@...pey.com>, "bpf@...r.kernel.org"
	<bpf@...r.kernel.org>, "kuba@...nel.org" <kuba@...nel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>, "kolga@...app.com"
	<kolga@...app.com>
Subject: Re: [PATCH] xprtsock: Fix a loop in xs_tcp_setup_socket()

On Sat, 2024-04-20 at 19:48 +0900, Lex Siegel wrote:
> [You don't often get email from usiegl00@...il.com. Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> When using a bpf on kernel_connect(), the call can return -EPERM.
> This causes xs_tcp_setup_socket() to loop forever, filling up the
> syslog and causing the kernel to freeze up.
> 
> Signed-off-by: Lex Siegel <usiegl00@...il.com>
> ---
>  net/sunrpc/xprtsock.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
> index bb9b747d58a1..47b254806a08 100644
> --- a/net/sunrpc/xprtsock.c
> +++ b/net/sunrpc/xprtsock.c
> @@ -2446,6 +2446,8 @@ static void xs_tcp_setup_socket(struct
> work_struct *work)
>                 /* Happens, for instance, if the user specified a
> link
>                  * local IPv6 address without a scope-id.
>                  */
> +       case -EPERM:
> +               /* Happens, for instance, if a bpf is preventing the
> connect */
>         case -ECONNREFUSED:
>         case -ECONNRESET:
>         case -ENETDOWN:
> --
> 2.39.3
> 

This looks as if it will have some rather subtle interactions if the
RPC_TASK_SOFTCONN flag is set. Have you tested this kind of scenario?

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@...merspace.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ