netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/5] tls: fix some issues with async encryption
@ 2023-09-06 17:08 Sabrina Dubroca
  2023-09-06 17:08 ` [PATCH net 1/5] net: tls: handle -EBUSY on async encrypt/decrypt requests Sabrina Dubroca
                   ` (4 more replies)
  0 siblings, 5 replies; 25+ messages in thread
From: Sabrina Dubroca @ 2023-09-06 17:08 UTC (permalink / raw)
  To: netdev
  Cc: Sabrina Dubroca, Dave Watson, Jakub Kicinski, Vakul Garg,
	Boris Pismenny, John Fastabend

I've been playing with a few hacks in the crypto code (forcing async
crypto for every request, smaller cryptd queue), and that has revealed
some bugs while running the selftests.

With this setup and those patches applied, the bad_in_large_read test
case still fails. With all-async crypto, we don't know which record
threw the EBADMSG, so we can't keep the first couple of records that
were decrypted correctly. We have to throw away the whole batch.

Liu Jian has also found a bug with async crypto and wrapping record
numbers:
https://lore.kernel.org/netdev/20230906065237.2180187-1-liujian56@huawei.com/
It will get fixed separately and I'll submit a selftest for this case.

Sabrina Dubroca (5):
  net: tls: handle -EBUSY on async encrypt/decrypt requests
  tls: fix use-after-free with partial reads and async decrypt
  tls: fix returned read length with async !zc decrypt
  tls: fix race condition in async decryption of corrupted records
  tls: don't decrypt the next record if it's of a different type

 net/tls/tls_sw.c | 45 +++++++++++++++++++++++++++++++++++----------
 1 file changed, 35 insertions(+), 10 deletions(-)

-- 
2.40.1


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

end of thread, other threads:[~2023-09-14  9:45 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-06 17:08 [PATCH net 0/5] tls: fix some issues with async encryption Sabrina Dubroca
2023-09-06 17:08 ` [PATCH net 1/5] net: tls: handle -EBUSY on async encrypt/decrypt requests Sabrina Dubroca
2023-09-07  1:50   ` Jakub Kicinski
2023-09-07 15:11   ` Simon Horman
2023-09-08  6:10   ` Herbert Xu
2023-09-08 15:55     ` Sabrina Dubroca
2023-09-08 21:26       ` Jakub Kicinski
2023-09-09  0:53         ` Herbert Xu
2023-09-12  4:43       ` Herbert Xu
2023-09-12 15:37         ` Sabrina Dubroca
2023-09-14  9:00           ` Herbert Xu
2023-09-06 17:08 ` [PATCH net 2/5] tls: fix use-after-free with partial reads and async decrypt Sabrina Dubroca
2023-09-07  2:05   ` Jakub Kicinski
2023-09-07 13:56     ` Sabrina Dubroca
2023-09-06 17:08 ` [PATCH net 3/5] tls: fix returned read length with async !zc decrypt Sabrina Dubroca
2023-09-06 17:08 ` [PATCH net 4/5] tls: fix race condition in async decryption of corrupted records Sabrina Dubroca
2023-09-06 17:08 ` [PATCH net 5/5] tls: don't decrypt the next record if it's of a different type Sabrina Dubroca
2023-09-07  3:47   ` Jakub Kicinski
2023-09-07 12:21     ` Sabrina Dubroca
2023-09-07 17:08       ` Jakub Kicinski
2023-09-08  6:06       ` Herbert Xu
2023-09-08 15:38         ` Sabrina Dubroca
2023-09-12  4:38           ` Herbert Xu
2023-09-13 13:25             ` Sabrina Dubroca
2023-09-14  9:45               ` Herbert Xu

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