summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorArthur Mongodin <amongodin@randorisec.fr>2025-03-14 21:11:31 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-03-28 22:03:33 +0100
commit2fa52cd829c194c86f3c324d2a49018393bf70d1 (patch)
treef41b31e9a2bebfefdaf4d643a4c2225fcb462aa1 /.clang-format
parent86368616a9ce51f6b41efa251b6e066893851d67 (diff)
downloadlinux-2fa52cd829c194c86f3c324d2a49018393bf70d1.tar.gz
linux-2fa52cd829c194c86f3c324d2a49018393bf70d1.tar.bz2
linux-2fa52cd829c194c86f3c324d2a49018393bf70d1.zip
mptcp: Fix data stream corruption in the address announcement
commit 2c1f97a52cb827a5f2768e67a9dddffae1ed47ab upstream. Because of the size restriction in the TCP options space, the MPTCP ADD_ADDR option is exclusive and cannot be sent with other MPTCP ones. For this reason, in the linked mptcp_out_options structure, group of fields linked to different options are part of the same union. There is a case where the mptcp_pm_add_addr_signal() function can modify opts->addr, but not ended up sending an ADD_ADDR. Later on, back in mptcp_established_options, other options will be sent, but with unexpected data written in other fields due to the union, e.g. in opts->ext_copy. This could lead to a data stream corruption in the next packet. Using an intermediate variable, prevents from corrupting previously established DSS option. The assignment of the ADD_ADDR option parameters is now done once we are sure this ADD_ADDR option can be set in the packet, e.g. after having dropped other suboptions. Fixes: 1bff1e43a30e ("mptcp: optimize out option generation") Cc: stable@vger.kernel.org Suggested-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Arthur Mongodin <amongodin@randorisec.fr> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> [ Matt: the commit message has been updated: long lines splits and some clarifications. ] Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250314-net-mptcp-fix-data-stream-corr-sockopt-v1-1-122dbb249db3@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions