]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mptcp: use MPTCP_RST_EMPTCP for ACK HMAC validation failure
authorShardul Bankar <shardul.b@mpiricsoftware.com>
Fri, 1 May 2026 19:35:35 +0000 (21:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 May 2026 13:31:17 +0000 (15:31 +0200)
commit a6da02d4c00fdda2417e42ad2b762a9209e6cc49 upstream.

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>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260501-net-mptcp-misc-fixes-7-1-rc3-v1-2-b70118df778e@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mptcp/subflow.c

index 1ade4f9f143e757b3cb2988e25e85e8c5e181ce5..84566553ac442035a162893e31ced3668140c81e 100644 (file)
@@ -908,7 +908,7 @@ create_child:
 
                        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;
                        }