All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-next 0/3] mptcp: pm: guard the lockless MP_JOIN path against a NULL pm.ops
@ 2026-07-11  8:39 Shardul Bankar
  2026-07-11  8:39 ` [PATCH mptcp-next 1/3] Squash to "mptcp: pm: init and release mptcp_pm_ops" Shardul Bankar
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Shardul Bankar @ 2026-07-11  8:39 UTC (permalink / raw)
  To: mptcp, Geliang Tang
  Cc: Matthieu Baerts (NGI0), Mat Martineau, Paolo Abeni, Kalpan Jani,
	Janak Patel, shardulsb08, Shardul Bankar

The pluggable path-manager series converts mptcp_pm_get_local_id() and
mptcp_pm_is_backup() to dereference msk->pm.ops. Both are reached from
subflow_token_join_request() on an inbound MP_JOIN, in softirq and holding
only a reference to the target msk (from mptcp_token_get_sock()), without the
socket lock. A concurrent close()/disconnect() can clear pm.ops via
mptcp_pm_ops_release() in between, so the join path dereferences a NULL
pm.ops (a KASAN null-ptr-deref of ->get_priority in softirq).

Found by an MPTCP protocol-flow harness extending BRF (arXiv:2305.08782),
which drives inbound MP_JOINs against a connection under teardown.

Guard both readers with READ_ONCE() and bail out when pm.ops is NULL, paired
with WRITE_ONCE() in mptcp_pm_ops_release(). The affected commits are still in
the export tree, so this is three squash-to fixups, one per introducing commit.

Signed-off-by: Shardul Bankar <shardul.b@mpiricsoftware.com>
---
Shardul Bankar (3):
      Squash to "mptcp: pm: init and release mptcp_pm_ops"
      Squash to "mptcp: pm: add get_local_id() interface"
      Squash to "mptcp: pm: add get_priority() interface"

 net/mptcp/pm.c | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)
---
base-commit: e6ce9ffe5d02034a38e8bca7b78a7f58aff8caae
change-id: 20260711-mptcp_pm_ops_null_deref_join-a2f8e56832b4

Best regards,
--  
Shardul Bankar <shardul.b@mpiricsoftware.com>


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

end of thread, other threads:[~2026-07-11 10:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-11  8:39 [PATCH mptcp-next 0/3] mptcp: pm: guard the lockless MP_JOIN path against a NULL pm.ops Shardul Bankar
2026-07-11  8:39 ` [PATCH mptcp-next 1/3] Squash to "mptcp: pm: init and release mptcp_pm_ops" Shardul Bankar
2026-07-11  8:39 ` [PATCH mptcp-next 2/3] Squash to "mptcp: pm: add get_local_id() interface" Shardul Bankar
2026-07-11  8:39 ` [PATCH mptcp-next 3/3] Squash to "mptcp: pm: add get_priority() interface" Shardul Bankar
2026-07-11 10:10 ` [PATCH mptcp-next 0/3] mptcp: pm: guard the lockless MP_JOIN path against a NULL pm.ops MPTCP CI

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.