netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/5] tls: fixes for record type handling with PEEK
@ 2024-02-15 16:17 Sabrina Dubroca
  2024-02-15 16:17 ` [PATCH net 1/5] tls: break out of main loop when PEEK gets a non-data record Sabrina Dubroca
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Sabrina Dubroca @ 2024-02-15 16:17 UTC (permalink / raw)
  To: netdev
  Cc: Sabrina Dubroca, Boris Pismenny, John Fastabend, Jakub Kicinski,
	David S. Miller, Eric Dumazet, Paolo Abeni, Shuah Khan,
	Vakul Garg, linux-kselftest

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(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-02-21 22:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-15 16:17 [PATCH net 0/5] tls: fixes for record type handling with PEEK Sabrina Dubroca
2024-02-15 16:17 ` [PATCH net 1/5] tls: break out of main loop when PEEK gets a non-data record Sabrina Dubroca
2024-02-15 16:17 ` [PATCH net 2/5] tls: stop recv() if initial process_rx_list gave us non-DATA Sabrina Dubroca
2024-02-15 16:17 ` [PATCH net 3/5] tls: don't skip over different type records from the rx_list Sabrina Dubroca
2024-02-19 20:07   ` Jakub Kicinski
2024-02-19 23:10     ` Sabrina Dubroca
2024-02-21  1:50       ` Jakub Kicinski
2024-02-21 13:59         ` Sabrina Dubroca
2024-02-21 18:33           ` Jakub Kicinski
2024-02-21 18:42             ` Sabrina Dubroca
2024-02-15 16:17 ` [PATCH net 4/5] selftests: tls: add test for merging of same-type control messages Sabrina Dubroca
2024-02-15 16:17 ` [PATCH net 5/5] selftests: tls: add test for peeking past a record of a different type Sabrina Dubroca
2024-02-21 22:30 ` [PATCH net 0/5] tls: fixes for record type handling with PEEK patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).