Closed cpaasch closed 1 year ago
@cpaasch: could you please additionally share the c-repro (possibly as attachment) or test the tentative fix in the following comment?
should be fixed with:
diff --git a/net/mptcp/sockopt.c b/net/mptcp/sockopt.c
index 5fa417a6f4c5..c34a6f41e2eb 100644
--- a/net/mptcp/sockopt.c
+++ b/net/mptcp/sockopt.c
@@ -1490,9 +1490,17 @@ int mptcp_set_rcvlowat(struct sock *sk, int val)
return 0;
space = __tcp_space_from_win(mptcp_sk(sk)->scaling_ratio, val);
- if (space > sk->sk_rcvbuf) {
- WRITE_ONCE(sk->sk_rcvbuf, space);
+ if (space <= sk->sk_rcvbuf)
+ return 0;
+
+ WRITE_ONCE(sk->sk_rcvbuf, space);
+ mptcp_for_each_subflow(msk, subflow) {
+ struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
+ bool slow;
+
+ slow = lock_sock_fast(ssk);
tcp_sk(sk)->window_clamp = val;
+ unlock_sock_fast(ssk, slow);
}
return 0;
even simpler:
diff --git a/net/mptcp/sockopt.c b/net/mptcp/sockopt.c
index 5fa417a6f4c5..e41010a4de7f 100644
--- a/net/mptcp/sockopt.c
+++ b/net/mptcp/sockopt.c
@@ -1490,9 +1490,7 @@ int mptcp_set_rcvlowat(struct sock *sk, int val)
return 0;
space = __tcp_space_from_win(mptcp_sk(sk)->scaling_ratio, val);
- if (space > sk->sk_rcvbuf) {
+ if (space > sk->sk_rcvbuf)
WRITE_ONCE(sk->sk_rcvbuf, space);
- tcp_sk(sk)->window_clamp = val;
- }
return 0;
}
Yes, this works @pabeni
Fixed by Paolo's patches:
New patches for t/upstream:
Tests are now in progress:
https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20231003T165758
Cheers, Matt
syzkaller-id: 5ac39dd915154ec01f83fad890fa594c89a5e207
HEAD: 6a1b099dc979
Crash:
Kconfig: Kconfig_k7_clean.txt
Reproducer:
C-reproducer available.