Skip to content

Fixes for TLS and ULP

Geliang Tang mptcp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5tls: add clone callback to prevent NULL crash casenet/tls/tls_main.c+10 -00 replies
2/5tls: init mixed SW/TOE proto to prevent NULL callnet/tls/tls_main.c+6 -00 replies
3/5tls: fix concurrency in TOE device list iterationsnet/tls/tls_toe.c+53 -100 replies
4/5tcp: add socket lock to TCP_ULP getsockopt safelynet/ipv4/tcp.c+29 -150 replies
5/5tcp: fix ULP diag race by RCU read locks properlynet/ipv4/tcp_diag.c net/ipv4/tcp_ulp.c+16 -130 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH mptcp-next 0/5] Fixes for TLS and ULP

From: Geliang Tang <[email protected]>

This series fixes several pre-existing issues in the TLS/TOE and TCP ULP layers, found during MPTCP KTLS development.

Patches summary:

tls: add clone callback - prevent NULL pointer crash when listening socket carries TLS ULP.

tls: init mixed SW/TOE proto - avoid NULL function pointers on TOE fallback.

tls: fix concurrency in TOE device list iteration - safe two-pass snapshot to eliminate list poisoning crash.

tcp: add socket lock to TCP_ULP getsockopt - fix use-after-free in getsockopt(TCP_ULP).

tcp: fix ULP diag race by RCU - protect diag reads with RCU, paired with release barrier.

All fixes are independent of MPTCP and can be merged separately.

Geliang Tang (5):
tls: add clone callback to prevent NULL crash case
tls: init mixed SW/TOE proto to prevent NULL call
tls: fix concurrency in TOE device list iterations
tcp: add socket lock to TCP_ULP getsockopt safely
tcp: fix ULP diag race by RCU read locks properly

 net/ipv4/tcp.c      | 44 ++++++++++++++++++++-----------
 net/ipv4/tcp_diag.c | 15 ++++++-----
 net/ipv4/tcp_ulp.c  | 14 +++++-----
 net/tls/tls_main.c  | 16 ++++++++++++
 net/tls/tls_toe.c   | 63 ++++++++++++++++++++++++++++++++++++++-------
 5 files changed, 114 insertions(+), 38 deletions(-)
Signature · 1 line
2.53.0