Skip to content

tls: fixes for record type handling with PEEK

Sabrina Dubroca 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 Latest5 patches 6 repliesApplied 5/5

Patches in v1 All 5 applied

#Subject and filesSizeRepliesApplied
1/5tls: break out of main loop when PEEK gets a non-data recordnet/tls/tls_sw.c+2 -00 repliesApplied
2/5tls: stop recv() if initial process_rx_list gave us non-DATAnet/tls/tls_sw.c+1 -10 repliesApplied
3/5tls: don't skip over different type records from the rx_listnet/tls/tls_sw.c+14 -86 repliesApplied
4/5selftests: tls: add test for merging of same-type control messagestools/testing/selftests/net/tls.c+26 -00 repliesApplied
5/5selftests: tls: add test for peeking past a record of a different typetools/testing/selftests/net/tls.c+19 -00 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net 0/5] tls: fixes for record type handling with PEEK

There are multiple bugs in tls_sw_recvmsg's handling of record types when MSG_PEEK flag is used, which can lead to incorrectly merging two records:
- consecutive non-DATA records shouldn't be merged, even if they're the same type (partly handled by the test at the end of the main loop)
- records of the same type (even DATA) shouldn't be merged if one record of a different type comes in between

Sabrina Dubroca (5):
tls: break out of main loop when PEEK gets a non-data record
tls: stop recv() if initial process_rx_list gave us non-DATA
tls: don't skip over different type records from the rx_list
selftests: tls: add test for merging of same-type control messages
selftests: tls: add test for peeking past a record of a different type

 net/tls/tls_sw.c                  | 24 +++++++++++------
 tools/testing/selftests/net/tls.c | 45 +++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+), 8 deletions(-)
Signature · 1 line
2.43.0