Skip to content

net: tls: fix some issues with async encryption

Jakub Kicinski linux-kselftest netdev 1 version Applied

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 14 repliesApplied 7/7

Patches in v1 All 7 applied

#Subject and filesSizeRepliesApplied
1/7net: tls: factor out tls_*crypt_async_wait()net/tls/tls_sw.c+45 -512 repliesApplied
2/7tls: fix race between async notify and socket closeinclude/net/tls.h net/tls/tls_sw.c+10 -383 repliesApplied
3/7tls: fix race between tx work scheduling and socket closenet/tls/tls_sw.c+6 -102 repliesApplied
4/7net: tls: handle backlogging of crypto requestsnet/tls/tls_sw.c+22 -01 replyApplied
5/7net: tls: fix use-after-free with partial reads and async decryptnet/tls/tls_sw.c+3 -21 replyApplied
6/7selftests: tls: use exact comparison in recv_partialtools/testing/selftests/net/tls.c+4 -41 replyApplied
7/7net: tls: fix returned read length with async decryptnet/tls/tls_sw.c+0 -13 repliesApplied

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchSimon HormanEric DumazetSabrina Dubroca
1/7R-b R-b
2/7R-b R-b R-b
3/7R-b R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH net 0/7] net: tls: fix some issues with async encryption

Hi!

valis was reporting a race on socket close so I sat down to try to fix it. I used Sabrina's async crypto debug patch to test... and in the process run into some of the same issues, and created very similar fixes :( I didn't realize how many of those patches weren't applied. Once I found Sabrina's code [1] it turned out to be so similar in fact that I added her S-o-b's and Co-develop'eds in a semi-haphazard way.

With this series in place all expected tests pass with async crypto. Sabrina had a few more fixes, but I'll leave those to her, things are not crashing anymore.

[1] https://lore.kernel.org/netdev/[email protected]/

Jakub Kicinski (6):
net: tls: factor out tls_*crypt_async_wait()
tls: fix race between async notify and socket close
tls: fix race between tx work scheduling and socket close
net: tls: handle backlogging of crypto requests
selftests: tls: use exact comparison in recv_partial
net: tls: fix returned read length with async decrypt

Sabrina Dubroca (1):
net: tls: fix use-after-free with partial reads and async decrypt

 include/net/tls.h                 |   5 --
 net/tls/tls_sw.c                  | 135 ++++++++++++++----------------
 tools/testing/selftests/net/tls.c |   8 +-
 3 files changed, 66 insertions(+), 82 deletions(-)
Signature · 1 line
2.43.0