]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: use untruncated hash in ADD_ADDR HMAC
authorTodd Malsbary <todd.malsbary@linux.intel.com>
Fri, 22 May 2020 02:10:49 +0000 (19:10 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 May 2020 21:21:24 +0000 (14:21 -0700)
commitd99eefc49693bed4e36713f6965590f2b16e0285
tree85bd706c6bdb3bc09e76fd86271b955dd0b08743
parent3def847c4817ab101a42bdf50d0fb80746045772
mptcp: use untruncated hash in ADD_ADDR HMAC

There is some ambiguity in the RFC as to whether the ADD_ADDR HMAC is
the rightmost 64 bits of the entire hash or of the leftmost 160 bits
of the hash.  The intention, as clarified with the author of the RFC,
is the entire hash.

This change returns the entire hash from
mptcp_crypto_hmac_sha (instead of only the first 160 bits), and moves
any truncation/selection operation on the hash to the caller.

Fixes: 642d26e23ad2 ("mptcp: use rightmost 64 bits in ADD_ADDR HMAC")
Reviewed-by: Christoph Paasch <cpaasch@apple.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Todd Malsbary <todd.malsbary@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/crypto.c
net/mptcp/options.c
net/mptcp/protocol.h
net/mptcp/subflow.c