Skip to content

tls: fix plaintext sk_msg ring over-fill

chanyoung linux-kselftest netdev stable 2 versions – 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 · linked by author and title

  1. v2 Latest2 patches 0 repliesApplied 2/2
  2. v12 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- fix the copy path so a full record is never left unpushed, rather than making tls_sw_sendmsg_splice() tolerate a full ring (Sabrina)
- selftest: drop the comments, one splice instead of four, reuse a single pipe, compare the whole blob, sweep 16..44 fragments
v1: https://lore.kernel.org/netdev/[email protected]/

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2tls: don't leave a full plaintext sk_msg ring unpushednet/tls/tls_sw.c+14 -00 repliesApplied
2/2selftests: tls: add a test for splicing onto a full plaintext recordtools/testing/selftests/net/tls.c+37 -00 repliesApplied

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH net v2 0/2] tls: fix plaintext sk_msg ring over-fill

An unprivileged user can oops the kernel by splicing into a kTLS socket whose open record already has a full plaintext sk_msg ring. Reproduced on net (53658c6f3682) with a stock config, no KASAN.

Patch 2 oopses an unpatched kernel and passes with patch 1 applied.

v2:
- fix the copy path so a full record is never left unpushed, rather than making tls_sw_sendmsg_splice() tolerate a full ring (Sabrina)
- selftest: drop the comments, one splice instead of four, reuse a single pipe, compare the whole blob, sweep 16..44 fragments
v1: https://lore.kernel.org/netdev/[email protected]/

chanyoung (2):
tls: don't leave a full plaintext sk_msg ring unpushed
selftests: tls: add a test for splicing onto a full plaintext record

 net/tls/tls_sw.c                  | 14 ++++++++++++
 tools/testing/selftests/net/tls.c | 37 +++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)
Signature · 1 line
2.43.0