Skip to content

sctp: Convert to use crypto lib, and upgrade cookie auth

Eric Biggers linux-crypto linux-sctp netdev stable 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 0 repliesApplied 5/5
  2. v23 patches 9 repliesSuperseded
  3. v12 patches 1 replySuperseded

Changes in v3 from the cover letter

- Added patch that fixes both MAC comparisons to be constant-time
- Added patch that stops accepting md5 and sha1 for cookie_hmac_alg

Patches in v3 All 5 applied

#Subject and filesSizeRepliesApplied
1/5selftests: net: Explicitly enable CONFIG_CRYPTO_SHA1 for IPsectools/testing/selftests/net/config tools/testing/selftests/net/netfilter/config+2 -00 repliesApplied
2/5sctp: Fix MAC comparison to be constant-timenet/sctp/sm_make_chunk.c net/sctp/sm_statefuns.c+4 -20 repliesApplied
3/5sctp: Use HMAC-SHA1 and HMAC-SHA256 library for chunk authenticationinclude/net/sctp/auth.h include/net/sctp/constants.h include/net/sctp/structs.h +6 more+48 -1770 repliesApplied
4/5sctp: Convert cookie authentication to use HMAC-SHA256Documentation/networking/ip-sysctl.rst include/net/netns/sctp.h include/net/sctp/constants.h +7 more+79 -1870 repliesApplied
5/5sctp: Stop accepting md5 and sha1 for net.sctp.cookie_hmac_algDocumentation/networking/ip-sysctl.rst net/sctp/sysctl.c+1 -60 repliesApplied

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchXin Long
1/5A-b
2/5
3/5A-b
4/5A-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net-next v3 0/5] sctp: Convert to use crypto lib, and upgrade cookie auth

This series converts SCTP chunk and cookie authentication to use the crypto library API instead of crypto_shash. This is much simpler (the diffstat should speak for itself), and also faster too. In addition, this series upgrades the cookie authentication to use HMAC-SHA256.

I've tested that kernels with this series applied can continue to communicate using SCTP with older ones, in either direction, using any choice of None, HMAC-SHA1, or HMAC-SHA256 chunk authentication.

Changed in v3:
- Added patch that fixes both MAC comparisons to be constant-time
- Added patch that stops accepting md5 and sha1 for cookie_hmac_alg

Changed in v2:
- Added patch which adds CONFIG_CRYPTO_SHA1 to some selftests configs

Eric Biggers (5):
selftests: net: Explicitly enable CONFIG_CRYPTO_SHA1 for IPsec
sctp: Fix MAC comparison to be constant-time
sctp: Use HMAC-SHA1 and HMAC-SHA256 library for chunk authentication
sctp: Convert cookie authentication to use HMAC-SHA256
sctp: Stop accepting md5 and sha1 for net.sctp.cookie_hmac_alg

 Documentation/networking/ip-sysctl.rst       |  10 +-
 include/net/netns/sctp.h                     |   4 +-
 include/net/sctp/auth.h                      |  17 +-
 include/net/sctp/constants.h                 |   9 +-
 include/net/sctp/structs.h                   |  35 +---
 net/sctp/Kconfig                             |  47 ++----
 net/sctp/auth.c                              | 166 ++++---------------
 net/sctp/chunk.c                             |   3 +-
 net/sctp/endpointola.c                       |  23 +--
 net/sctp/protocol.c                          |  11 +-
 net/sctp/sm_make_chunk.c                     |  60 +++----
 net/sctp/sm_statefuns.c                      |   5 +-
 net/sctp/socket.c                            |  41 +----
 net/sctp/sysctl.c                            |  49 +++---
 tools/testing/selftests/net/config           |   1 +
 tools/testing/selftests/net/netfilter/config |   1 +
 16 files changed, 122 insertions(+), 360 deletions(-)

base-commit: bab3ce404553de56242d7b09ad7ea5b70441ea41

Signature · 1 line
2.50.1