mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net 00/14] mptcp: pm: fix IDs not being reusable
@ 2024-08-19 19:45 Matthieu Baerts (NGI0)
  2024-08-19 19:45 ` [PATCH net 01/14] mptcp: pm: re-using ID of unused removed ADD_ADDR Matthieu Baerts (NGI0)
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Matthieu Baerts (NGI0) @ 2024-08-19 19:45 UTC (permalink / raw)
  To: mptcp, Mat Martineau, Geliang Tang, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Shuah Khan
  Cc: netdev, linux-kernel, linux-kselftest, Matthieu Baerts (NGI0), stable

Here are more fixes for the MPTCP in-kernel path-manager. In this
series, the fixes are around the endpoint IDs not being reusable for
on-going connections when re-creating endpoints with previously used IDs.

- Patch 1 fixes this case for endpoints being used to send ADD_ADDR.
  Patch 2 validates this fix. The issue is present since v5.10.

- Patch 3 fixes this case for endpoints being used to establish new
  subflows. Patch 4 validates this fix. The issue is present since v5.10.

- Patch 5 fixes this case when all endpoints are flushed. Patch 6
  validates this fix. The issue is present since v5.13.

- Patch 7 removes a helper that is confusing, and introduced in v5.10.
  It helps simplifying the next patches.

- Patch 8 makes sure a 'subflow' counter is only decremented when
  removing a 'subflow' endpoint. Can be backported up to v5.13.

- Patch 9 is similar, but for a 'signal' counter. Can be backported up
  to v5.10.

- Patch 10 checks the last max accepted ADD_ADDR limit before accepting
  new ADD_ADDR. For v5.10 as well.

- Patch 11 removes a wrong restriction for the userspace PM, added
  during a refactoring in v6.5.

- Patch 12 makes sure the fullmesh mode sets the ID 0 when a new subflow
  using the source address of the initial subflow is created. Patch 13
  covers this case. This issue is present since v5.15.

- Patch 14 avoid possible UaF when selecting an address from the
  endpoints list.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Matthieu Baerts (NGI0) (14):
      mptcp: pm: re-using ID of unused removed ADD_ADDR
      selftests: mptcp: join: check re-using ID of unused ADD_ADDR
      mptcp: pm: re-using ID of unused removed subflows
      selftests: mptcp: join: check re-using ID of closed subflow
      mptcp: pm: re-using ID of unused flushed subflows
      selftests: mptcp: join: test for flush/re-add endpoints
      mptcp: pm: remove mptcp_pm_remove_subflow()
      mptcp: pm: only mark 'subflow' endp as available
      mptcp: pm: only decrement add_addr_accepted for MPJ req
      mptcp: pm: check add_addr_accept_max before accepting new ADD_ADDR
      mptcp: pm: only in-kernel cannot have entries with ID 0
      mptcp: pm: fullmesh: select the right ID later
      selftests: mptcp: join: validate fullmesh endp on 1st sf
      mptcp: pm: avoid possible UaF when selecting endp

 net/mptcp/pm.c                                  |  13 ---
 net/mptcp/pm_netlink.c                          | 142 ++++++++++++++++--------
 net/mptcp/protocol.h                            |   3 -
 tools/testing/selftests/net/mptcp/mptcp_join.sh |  76 +++++++++++--
 4 files changed, 160 insertions(+), 74 deletions(-)
---
base-commit: 565d121b69980637f040eb4d84289869cdaabedf
change-id: 20240819-net-mptcp-pm-reusing-id-eb08827b7be6

Best regards,
-- 
Matthieu Baerts (NGI0) <matttbe@kernel.org>


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-08-21  1:30 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-19 19:45 [PATCH net 00/14] mptcp: pm: fix IDs not being reusable Matthieu Baerts (NGI0)
2024-08-19 19:45 ` [PATCH net 01/14] mptcp: pm: re-using ID of unused removed ADD_ADDR Matthieu Baerts (NGI0)
2024-08-19 19:45 ` [PATCH net 02/14] selftests: mptcp: join: check re-using ID of unused ADD_ADDR Matthieu Baerts (NGI0)
2024-08-19 19:45 ` [PATCH net 03/14] mptcp: pm: re-using ID of unused removed subflows Matthieu Baerts (NGI0)
2024-08-19 19:45 ` [PATCH net 04/14] selftests: mptcp: join: check re-using ID of closed subflow Matthieu Baerts (NGI0)
2024-08-19 19:45 ` [PATCH net 05/14] mptcp: pm: re-using ID of unused flushed subflows Matthieu Baerts (NGI0)
2024-08-19 19:45 ` [PATCH net 06/14] selftests: mptcp: join: test for flush/re-add endpoints Matthieu Baerts (NGI0)
2024-08-19 19:45 ` [PATCH net 07/14] mptcp: pm: remove mptcp_pm_remove_subflow() Matthieu Baerts (NGI0)
2024-08-19 19:45 ` [PATCH net 08/14] mptcp: pm: only mark 'subflow' endp as available Matthieu Baerts (NGI0)
2024-08-19 19:45 ` [PATCH net 09/14] mptcp: pm: only decrement add_addr_accepted for MPJ req Matthieu Baerts (NGI0)
2024-08-19 19:45 ` [PATCH net 10/14] mptcp: pm: check add_addr_accept_max before accepting new ADD_ADDR Matthieu Baerts (NGI0)
2024-08-19 19:45 ` [PATCH net 11/14] mptcp: pm: only in-kernel cannot have entries with ID 0 Matthieu Baerts (NGI0)
2024-08-19 19:45 ` [PATCH net 12/14] mptcp: pm: fullmesh: select the right ID later Matthieu Baerts (NGI0)
2024-08-19 19:45 ` [PATCH net 13/14] selftests: mptcp: join: validate fullmesh endp on 1st sf Matthieu Baerts (NGI0)
2024-08-19 19:45 ` [PATCH net 14/14] mptcp: pm: avoid possible UaF when selecting endp Matthieu Baerts (NGI0)
2024-08-21  1:30 ` [PATCH net 00/14] mptcp: pm: fix IDs not being reusable patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®