diff options
author | Paolo Abeni <pabeni@redhat.com> | 2021-04-15 16:44:52 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-16 15:23:09 -0700 |
commit | d9e4c129181004ec94b315b0c9db5eeb09da75e6 (patch) | |
tree | c320ac93029103307b2951e0101583ff5c8ba535 /net/mptcp/mib.c | |
parent | 0abdde82b163600dcafb80da6e155dbf60c331bc (diff) |
mptcp: only admit explicitly supported sockopt
Unrolling mcast state at msk dismantel time is bug prone, as
syzkaller reported:
======================================================
WARNING: possible circular locking dependency detected
5.11.0-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor905/8822 is trying to acquire lock:
ffffffff8d678fe8 (rtnl_mutex){+.+.}-{3:3}, at: ipv6_sock_mc_close+0xd7/0x110 net/ipv6/mcast.c:323
but task is already holding lock:
ffff888024390120 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1600 [inline]
ffff888024390120 (sk_lock-AF_INET6){+.+.}-{0:0}, at: mptcp6_release+0x57/0x130 net/mptcp/protocol.c:3507
which lock already depends on the new lock.
Instead we can simply forbid any mcast-related setsockopt.
Let's do the same with all other non supported sockopts.
Fixes: 717e79c867ca5 ("mptcp: Add setsockopt()/getsockopt() socket operations")
Co-developed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/mib.c')
0 files changed, 0 insertions, 0 deletions