Skip to content

net: tls: net: tls: fix a few random bugs

Jakub Kicinski bpf netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 14 repliesIn review 2 of 4 applied
  2. v17 patches 7 repliesApplied 2/7

Changes in v2 from the cover letter

- patches 2 and 3 are new (Sashiko report)
- patch 4 is rewritten to remove the code instead of fixing it
- drop the selftests, they were a little too specific, more PoC triggers than selftests, and Sashiko kept nit picking
- old patches 1 and 2 were already applied
- old patch 3 is gone since it can't trigger today (I will send it to net-next)
v1: https://lore.kernel.org/[email protected]

Patches in v2 2 of 4 applied

#Subject and filesSizeRepliesApplied
1/4net: tls: fix off-by-one in sg_chain entry count for wrapped sk_msg ringnet/tls/tls_sw.c+2 -41 replyApplied
2/4net: tls: prevent chain-after-chain in plain text SGnet/tls/tls_sw.c+18 -64 repliesApplied
3/4net: tls: fix use-after-free in tls_sw_sendmsg_locked after bpf verdictnet/tls/tls_sw.c+0 -42 replies
4/4net: tls: remove bad rollback and UAF on ENOSPCnet/tls/tls_sw.c+2 -105 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchSabrina Dubroca
1/4R-b
2/4
3/4
4/4

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

Read the v2 thread

Cover letter [PATCH net v2 0/4] net: tls: net: tls: fix a few random bugs

Fix a few random bugs, from external reports and my local scan with various AI tools. Mostly corner cases in code which I don't think TLS maintainers would consider "battle tested".

v2:
- patches 2 and 3 are new (Sashiko report)
- patch 4 is rewritten to remove the code instead of fixing it
- drop the selftests, they were a little too specific, more PoC triggers than selftests, and Sashiko kept nit picking
- old patches 1 and 2 were already applied
- old patch 3 is gone since it can't trigger today (I will send it to net-next)
v1: https://lore.kernel.org/[email protected]

Jakub Kicinski (4):
net: tls: fix off-by-one in sg_chain entry count for wrapped sk_msg
ring
net: tls: prevent chain-after-chain in plain text SG
net: tls: fix use-after-free in tls_sw_sendmsg_locked after bpf
verdict
net: tls: remove bad rollback and UAF on ENOSPC

 net/tls/tls_sw.c | 44 +++++++++++++++++++++-----------------------
 1 file changed, 21 insertions(+), 23 deletions(-)
Signature · 1 line
2.54.0