When HMAC validation fails on a received ACK + MP_JOIN in
subflow_syn_recv_sock(), the subflow is reset with reason
MPTCP_RST_EPROHIBIT ("Administratively prohibited"). This is
incorrect: HMAC validation failure is an MPTCP protocol-level
error, not an administrative policy denial.
The mirror site on the client, in subflow_finish_connect(), already
uses MPTCP_RST_EMPTCP ("MPTCP-specific error") for the same kind of
HMAC failure on the SYN/ACK + MP_JOIN. Use the same reason on the
server side for symmetry and accuracy.
Suggested-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Fixes: 443041deb5ef ("mptcp: fix NULL pointer in can_accept_new_subflow")
Cc: stable@vger.kernel.org
Signed-off-by: Shardul Bankar <shardul.b@mpiricsoftware.com>
---
net/mptcp/subflow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index e2cb9d23e4a0..afb174ed9c47 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -908,7 +908,7 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk,
if (!subflow_hmac_valid(subflow_req, &mp_opt)) {
SUBFLOW_REQ_INC_STATS(req, MPTCP_MIB_JOINACKMAC);
- subflow_add_reset_reason(skb, MPTCP_RST_EPROHIBIT);
+ subflow_add_reset_reason(skb, MPTCP_RST_EMPTCP);
goto dispose_child;
}
--
2.34.1
Hi Shardul,
On 28/04/2026 01:49, Shardul Bankar wrote:
> When HMAC validation fails on a received ACK + MP_JOIN in
> subflow_syn_recv_sock(), the subflow is reset with reason
> MPTCP_RST_EPROHIBIT ("Administratively prohibited"). This is
> incorrect: HMAC validation failure is an MPTCP protocol-level
> error, not an administrative policy denial.
>
> The mirror site on the client, in subflow_finish_connect(), already
> uses MPTCP_RST_EMPTCP ("MPTCP-specific error") for the same kind of
> HMAC failure on the SYN/ACK + MP_JOIN. Use the same reason on the
> server side for symmetry and accuracy.
Now in our tree:
New patches for t/upstream-net and t/upstream:
- 1f2cd6a4c385: mptcp: use MPTCP_RST_EMPTCP for ACK HMAC validation failure
- Results: 718fa635acef..90cb02b20cf2 (export-net)
- Results: 8e163e999320..f68dc562c883 (export)
Tests are now in progress:
- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/883745ff4a074154bb85f2be5a3aef39774f8e83/checks
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/6f26689671ac282704c85b27521e6b309771c544/checks
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
On Tue, 28 Apr 2026 05:19:34 +0530, Shardul Bankar <shardul.b@mpiricsoftware.com> wrote: > mptcp: use MPTCP_RST_EMPTCP for ACK HMAC validation failure Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> -- Matthieu Baerts (NGI0) <matttbe@kernel.org>
On Tue, 28 Apr 2026 05:19:34 +0530, Shardul Bankar <shardul.b@mpiricsoftware.com> wrote:
> When HMAC validation fails on a received ACK + MP_JOIN in
> subflow_syn_recv_sock(), the subflow is reset with reason
> MPTCP_RST_EPROHIBIT ("Administratively prohibited"). This is
> incorrect: HMAC validation failure is an MPTCP protocol-level
> error, not an administrative policy denial.
>
> The mirror site on the client, in subflow_finish_connect(), already
> uses MPTCP_RST_EMPTCP ("MPTCP-specific error") for the same kind of
> HMAC failure on the SYN/ACK + MP_JOIN. Use the same reason on the
> server side for symmetry and accuracy.
>
> Suggested-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> Fixes: 443041deb5ef ("mptcp: fix NULL pointer in can_accept_new_subflow")
> Cc: stable@vger.kernel.org
Small note: when you send patches only to the MPTCP ML, no need to Cc
the stable ML: this line will be added when patches will be sent to the
Netdev ML later.
The rest looks good to me, thank you for the patch!
--
Matthieu Baerts (NGI0) <matttbe@kernel.org>
Hi Shardul,
Thank you for your modifications, that's great!
Our CI did some validations and here is its report:
- KVM Validation: normal (except selftest_mptcp_join): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Success! ✅
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/25026426180
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/206390cd6818
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1086481
If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:
$ cd [kernel source code]
$ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
--pull always mptcp/mptcp-upstream-virtme-docker:latest \
auto-normal
For more details:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
© 2016 - 2026 Red Hat, Inc.