Skip to content

Commit 8031b58

Browse files
Paolo Abenikuba-moo
authored andcommitted
mptcp: ensure snd_una is properly initialized on connect
This is strictly related to commit fb7a0d3 ("mptcp: ensure snd_nxt is properly initialized on connect"). It turns out that syzkaller can trigger the retransmit after fallback and before processing any other incoming packet - so that snd_una is still left uninitialized. Address the issue explicitly initializing snd_una together with snd_nxt and write_seq. Suggested-by: Mat Martineau <martineau@kernel.org> Fixes: 8fd7380 ("mptcp: fallback in case of simultaneous connect") Cc: stable@vger.kernel.org Reported-by: Christoph Paasch <cpaasch@apple.com> Closes: multipath-tcp/mptcp_net-next#485 Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://lore.kernel.org/r/20240607-upstream-net-20240607-misc-fixes-v1-1-1ab9ddfa3d00@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 44180fe commit 8031b58

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

net/mptcp/protocol.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3740,6 +3740,7 @@ static int mptcp_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
37403740

37413741
WRITE_ONCE(msk->write_seq, subflow->idsn);
37423742
WRITE_ONCE(msk->snd_nxt, subflow->idsn);
3743+
WRITE_ONCE(msk->snd_una, subflow->idsn);
37433744
if (likely(!__mptcp_check_fallback(msk)))
37443745
MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPCAPABLEACTIVE);
37453746

0 commit comments

Comments
 (0)