aboutsummaryrefslogtreecommitdiff
path: root/net/mptcp/protocol.h
diff options
context:
space:
mode:
authorGravatar Paolo Abeni <pabeni@redhat.com> 2021-04-15 16:44:52 -0700
committerGravatar David S. Miller <davem@davemloft.net> 2021-04-16 15:23:09 -0700
commitd9e4c129181004ec94b315b0c9db5eeb09da75e6 (patch)
treec320ac93029103307b2951e0101583ff5c8ba535 /net/mptcp/protocol.h
parentmptcp: move sockopt function into a new file (diff)
downloadlinux-d9e4c129181004ec94b315b0c9db5eeb09da75e6.tar.gz
linux-d9e4c129181004ec94b315b0c9db5eeb09da75e6.tar.bz2
linux-d9e4c129181004ec94b315b0c9db5eeb09da75e6.zip
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/protocol.h')
0 files changed, 0 insertions, 0 deletions