Re: [PATCH net v4 0/3] mptcp token hash ordering and token 0 lookups
From: Hang Nan
Date: Mon Nov 16 2026 - 07:20:44 EST
Thanks for the prompt. Honest answer up front: none of the three patches
has a runtime trigger. All three are theoretical, and this is what I
should have put in the commit messages.
1/3 net: mptcp: take token lookup references with acquire ordering
Theoretical. There is no syzbot report, no KCSAN splat and no
reproducer. KCSAN cannot observe this class of defect at all:
Documentation/dev-tools/kcsan.rst is explicit that watchpoints are
only set up for plain accesses ("KCSAN never sets up a watchpoint on
marked accesses") and that "reordering of marked accesses is not
modeled", and the reordering in question involves a marked refcount
operation. On x86-64 there is nothing to observe anyway: both
variants compile to the same lock cmpxchg. The evidence is
instruction-level: on arm64 the CAS becomes CASA
(88a37c02 cas -> 88e17c43 casa), which I can attach if wanted. What
I did confirm is only reachability of the lookup path from the wire
(mptcp_parse_option() -> subflow_token_join_request() ->
mptcp_token_get_sock()), which is a static reading, not a runtime
demonstration of the reordering.
2/3 net: mptcp: reject token 0 in mptcp_token_get_sock()
Theoretical, and found by static analysis while addressing a review
comment on 1/3, not by fuzzing. The crash path I describe
(subflow_check_req() -> mptcp_pm_announced_has_ssk() walking
msk->pm.anno_list before mptcp_pm_data_init() has run) is argued from
code; I have not triggered it and have no stack trace or KASAN
report for it. What is verified is the input side: the token is
copied from the MP_JOIN option without validation, and 0 is never
assigned to a live connection, so a lookup for 0 relies entirely on
the two comparisons that cannot distinguish it.
3/3 net: mptcp: verify the token slot in mptcp_token_iter_next()
Theoretical as well. Both consumers (mptcp_diag and the userspace
path manager) are netlink paths that need privileges in the target
network namespace, so this is not a remote attack surface in the
first place.
For 2/3 I will add a KUnit case to net/mptcp/token_test.c
(mptcp_token_get_sock(&init_net, 0) must return NULL) in the next
revision, so at least the guard has a regression test. I am not
reposting only for this message; if reviewers want the above folded into
the cover letter, I will include it with the next respin.