summaryrefslogtreecommitdiffstats
path: root/net/mptcp/sockopt.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-23 13:29:17 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-23 13:33:26 +0200
commit0d31ea587709216d88183fe4ca0c8aba5e0205b8 (patch)
treed53e955f7bf1511b3a5f70448285b32f0ffbaa0d /net/mptcp/sockopt.c
parentusb: dwc3: exynos: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions (diff)
parentLinux 6.9-rc5 (diff)
downloadlinux-0d31ea587709216d88183fe4ca0c8aba5e0205b8.tar.xz
linux-0d31ea587709216d88183fe4ca0c8aba5e0205b8.zip
Merge 6.9-rc5 into usb-next
We need the usb/thunderbolt fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/mptcp/sockopt.c')
-rw-r--r--net/mptcp/sockopt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mptcp/sockopt.c b/net/mptcp/sockopt.c
index dcd1c76d2a3b..73fdf423de44 100644
--- a/net/mptcp/sockopt.c
+++ b/net/mptcp/sockopt.c
@@ -1493,6 +1493,10 @@ int mptcp_set_rcvlowat(struct sock *sk, int val)
struct mptcp_subflow_context *subflow;
int space, cap;
+ /* bpf can land here with a wrong sk type */
+ if (sk->sk_protocol == IPPROTO_TCP)
+ return -EINVAL;
+
if (sk->sk_userlocks & SOCK_RCVBUF_LOCK)
cap = sk->sk_rcvbuf >> 1;
else