[PATCH mptcp-net 0/4] mptcp: fix duplicate subflow creation

Paolo Abeni posted 4 patches 3 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/cover.1707144963.git.pabeni@redhat.com
There is a newer version of this series
include/net/tcp.h      |  2 +-
net/mptcp/diag.c       |  6 +++++-
net/mptcp/pm_netlink.c | 43 ++++++++++++++++++++++--------------------
net/mptcp/protocol.c   |  2 +-
net/mptcp/protocol.h   | 15 ++++++++++++---
net/mptcp/subflow.c    | 15 ++++++++-------
net/tls/tls_main.c     |  2 +-
7 files changed, 51 insertions(+), 34 deletions(-)
[PATCH mptcp-net 0/4] mptcp: fix duplicate subflow creation
Posted by Paolo Abeni 3 months, 1 week ago
As reported by Mat, the in kernel PM can, in some edge scenarios,
unexpectedly create multiple subflows with the same local and remote
address.

The real fix is implemented by patch 4/4 with some more accurate check
at subflow creation time.

Patches 1-3 are roughly optional pre-requisities, added to avoid
introducing more data-races with the actual fix. Patch 1/4 is a bit
debatable, as it changes the existing ULP API, but I could not find a
better solution and there is some similar prior art:
commit 0df48c26d841 ("tcp: add tcpi_bytes_acked to tcp_info")

Paolo Abeni (4):
  mptcp: fix lockless access in subflow ULP diag
  mptcp: fix data races on local_id
  mptcp: fix data races on remote_id
  mptcp: fix duplicate subflow creation

 include/net/tcp.h      |  2 +-
 net/mptcp/diag.c       |  6 +++++-
 net/mptcp/pm_netlink.c | 43 ++++++++++++++++++++++--------------------
 net/mptcp/protocol.c   |  2 +-
 net/mptcp/protocol.h   | 15 ++++++++++++---
 net/mptcp/subflow.c    | 15 ++++++++-------
 net/tls/tls_main.c     |  2 +-
 7 files changed, 51 insertions(+), 34 deletions(-)

-- 
2.43.0