Skip to content

tls: fix data disappearing from under the TLS ULP (CVE-2025-38616)

Artem Dinaburg lkml stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tls: fix lockless read of strp->msg_ready in ->pollinclude/net/tls.h net/tls/tls.h net/tls/tls_strp.c+6 -50 replies
2/2tls: handle data disappearing from under the TLS ULPnet/tls/tls.h net/tls/tls_strp.c net/tls/tls_sw.c+11 -50 replies

Reviews trailers per patch

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

PatchEric Dumazet
1/2
2/2R-b

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

Read the v1 thread

Cover letter [PATCH 6.1.y 0/2] tls: fix data disappearing from under the TLS ULP (CVE-2025-38616)

Please queue these two commits for 6.1.y.

Patch 2/2 is the fix for CVE-2025-38616. It is already present in every other supported stable tree: 6.6.y since 6.6.103, 6.12.y since 6.12.43, and 6.18.y and 7.1.y inherit it from v6.17. 6.1.y is the only supported affected tree still missing it. The upstream commit carries no Cc: stable trailer, which is why 6.1.y was left behind.

Patch 1/2 is a prerequisite. In 6.1.y strp->msg_ready is still a bitfield, so the WRITE_ONCE() added by 2/2 does not compile there:

./include/asm-generic/rwonce.h:55:32: error: cannot take address of bit-field 'msg_ready'

Backporting 0844370f8945 first converts the field to a bool, which lets 2/2 apply and build unmodified. 0844370f8945 also fixes a real bug that 6.1.y still has on its own: a lockless read of msg_ready in ->poll. It is present in 6.6.y and later, so no newer stable tree regresses.

Both patches are verbatim upstream cherry-picks with no adaptation. Verified on v6.1.183: both apply with no conflict, and net/tls builds clean, including with CONFIG_DEBUG_NET=y.

CVE-2025-38616 was reproduced on a KASAN v6.1.182 build; the patched kernel survived 1,000 rounds of the reproducer.

Jakub Kicinski (1):
tls: handle data disappearing from under the TLS ULP

Sabrina Dubroca (1):
tls: fix lockless read of strp->msg_ready in ->poll

 include/net/tls.h  |  3 ++-
 net/tls/tls.h      |  4 ++--
 net/tls/tls_strp.c | 17 +++++++++++------
 net/tls/tls_sw.c   |  3 ++-
 4 files changed, 17 insertions(+), 10 deletions(-)
Signature · 1 line
2.43.0