]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mptcp: fix ADD_ADDR HMAC in case port is specified
authorDavide Caratti <dcaratti@redhat.com>
Mon, 15 Mar 2021 10:41:16 +0000 (11:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:30:20 +0000 (14:30 +0200)
commit8b1174a49d1e4ed0341360e0bcef2a4f8b7a3d60
treeb1f1ef2428923ab7a7e28bb56b0af102fb29bb9c
parent191d215957883d560073cebe6f3d487be89ff8a4
mptcp: fix ADD_ADDR HMAC in case port is specified

[ Upstream commit 13832ae2755395b2585500c85b64f5109a44227e ]

Currently, Linux computes the HMAC contained in ADD_ADDR sub-option using
the Address Id and the IP Address, and hardcodes a destination port equal
to zero. This is not ok for ADD_ADDR with port: ensure to account for the
endpoint port when computing the HMAC, in compliance with RFC8684 ยง3.4.1.

Fixes: 22fb85ffaefb ("mptcp: add port support for ADD_ADDR suboption writing")
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Acked-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mptcp/options.c