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: <CANn89iJzjq9w-Z8GJaY1=KDLku00aweoZTB4_XHzHe=Cp7xy6w@mail.gmail.com>
Date: Tue, 31 Dec 2024 13:44:48 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: "David S . Miller" <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org, 
	Simon Horman <horms@...nel.org>, eric.dumazet@...il.com, 
	syzbot+b3e02953598f447d4d2a@...kaller.appspotmail.com, 
	Martin KaFai Lau <kafai@...com>
Subject: Re: [PATCH net] net: restrict SO_REUSEPORT to TCP, UDP and SCTP sockets

On Tue, Dec 31, 2024 at 1:07 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Mon, 30 Dec 2024 19:34:30 +0000 Eric Dumazet wrote:
> > After blamed commit, crypto sockets could accidentally be destroyed
> > from RCU callback, as spotted by zyzbot [1].
> >
> > Trying to acquire a mutex in RCU callback is not allowed.
> >
> > Restrict SO_REUSEPORT socket option to TCP, UDP and SCTP sockets.
>
> Looks like fcnal_test.sh and reuseport_addr_any.sh are failing
> after this patch, we need to adjust their respective binaries.
> I'll hide this patch from patchwork, even tho it's probably right..

It seems we should support raw sockets, they already use SOCK_RCU_FREE anyway.

Although sk_reuseport_attach_bpf() has the following checks :

if ((sk->sk_type != SOCK_STREAM &&
     sk->sk_type != SOCK_DGRAM) ||
    (sk->sk_protocol != IPPROTO_UDP &&
     sk->sk_protocol != IPPROTO_TCP) ||
    (sk->sk_family != AF_INET &&
     sk->sk_family != AF_INET6)) {
err = -ENOTSUPP;
goto err_prog_put;
}


(BTW SCTP is not supported there, although SCTP got reuseport support
in linux-6.0)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ