Skip to content

Commit db1e363

Browse files
shardulsdk-mpiricgregkh
authored andcommitted
mptcp: use MPTCP_RST_EMPTCP for ACK HMAC validation failure
commit a6da02d 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: 443041d ("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>
1 parent 2c5ae8a commit db1e363

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/mptcp/subflow.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk,
908908

909909
if (!subflow_hmac_valid(subflow_req, &mp_opt)) {
910910
SUBFLOW_REQ_INC_STATS(req, MPTCP_MIB_JOINACKMAC);
911-
subflow_add_reset_reason(skb, MPTCP_RST_EPROHIBIT);
911+
subflow_add_reset_reason(skb, MPTCP_RST_EMPTCP);
912912
goto dispose_child;
913913
}
914914

0 commit comments

Comments
 (0)