[Devel] [PATCH hci-8.2 v2 00/15] ms: backport additional TFO and CALIPSO fixes
Eva Kurchatova
eva.kurchatova at virtuozzo.com
Tue Dec 1 15:10:15 MSK 2026
Patchset for tasks:
https://virtuozzo.atlassian.net/browse/VSTOR-157577
https://virtuozzo.atlassian.net/browse/VSTOR-158161
https://virtuozzo.atlassian.net/browse/VSTOR-158162
https://virtuozzo.atlassian.net/browse/VSTOR-158163
https://virtuozzo.atlassian.net/browse/VSTOR-158164
All patches are cherry-picks of 6.12.y, except 7, 8 and 12, which are
mainline only. Patch 3 is the 6.12.y prerequisite of 4, patch 14 is a
prerequisite to 15, and patch 8 has a rebase note for context conflict.
Patch 12 is the selftest to 11, and requires patch 2.
This fixes:
- BPF sock_ops callbacks on a child socket being force-closed (1).
- Sleeping under RCU when bpf_sock_destroy() closes a listener (2).
- bpf_sock_destroy() reading past TIME_WAIT and request sockets
(Patch 11, selftest added in 12).
- CALIPSO: broken BIG TCP packets when a router labels them (3, 4),
label cache never hit (5), packets dropped once the label is
removed (6).
- Fast Open listener: NULL dereference on restart (7), request leak
when listen() fails (8).
- Deferred Fast Open connect reporting sequence as send queue (13).
- CIPSO: options corrupted when the label is removed (14), options
changed in place under lockless readers (15).
- NetLabel: IPv6 add errors ignored (9), short masks accepted (10).
Tested in QEMU with KASAN and DEBUG_ATOMIC_SLEEP, with and without the
patches: the bugs fixed by 2, 4-6, 9-11, 13 and 14 reproduce without
them and are gone when applied, labelling with Smack for CIPSO and with
an MLS policy in permissive mode for CALIPSO. Request migration, Fast
Open, SYN cookies and the TIME_WAIT purge pass with lockdep and
PROVE_RCU. The races fixed by 7, 8 and 15 no longer reproduce, and
patch 1 has no test of its own.
Changes in v2:
- Patches 9-15 are new (VSTOR-158161 to VSTOR-158164).
- Rebased on rh10-6.12.0-211.75.1.26.6.vz10, patches 1-8 unchanged.
- Reviewed-by: Sashiko on patches 1-8.
Link to v1: http://lore.virtuozzo.com/kernel/20261130184822.2743885-1-eva.kurchatova@virtuozzo.com/T/#t
Alice Mikityanska (1):
ms/net/ipv6: Introduce payload_len helpers
Chenguang Zhao (2):
ms/netlabel: fix IPv6 unlabeled address add error handling
ms/netlabel: validate unlabeled address and mask attribute lengths
Eric Dumazet (1):
ms/tcp: purge Fast Open RST queue when listen() fails
Hyunwoo Kim (1):
ms/tcp: fix NULL pointer dereference when restarting a Fast Open
listener
Jann Horn (1):
ms/cipso: stop modifying live ip_options_rcu
Jiayuan Chen (3):
ms/tcp: Skip cond_resched() in inet_csk_listen_stop() under BPF
context
ms/bpf: Fix out-of-bounds read of sk_protocol in bpf_sock_destroy()
ms/selftests/bpf: Test bpf_sock_destroy() on TIME_WAIT and listener
socks
Joas Antonio dos Santos (3):
ms/calipso: keep BIG TCP payload_len in calipso_skbuff_setattr()
ms/calipso: hash the cache key, not the option start, in
calipso_cache_add()
ms/calipso: update payload_len when removing the CALIPSO option
Qihang (1):
ms/cipso: fix optlen corruption in cipso_v4_delopt()
Qingfang Deng (1):
ms/tcp: initialize send sequence numbers before deferring TFO
Sechang Lim (1):
ms/tcp: clear sock_ops cb flags before force-closing a child socket
include/linux/ipv6.h | 22 ++++
include/net/cipso_ipv4.h | 11 +-
include/net/inet_connection_sock.h | 8 +-
include/net/ipv6.h | 2 -
include/net/netfilter/nf_tables_ipv6.h | 4 +-
include/net/netlabel.h | 11 +-
include/net/tcp.h | 9 ++
net/bridge/br_netfilter_ipv6.c | 2 +-
net/bridge/netfilter/nf_conntrack_bridge.c | 4 +-
net/core/filter.c | 13 +-
net/ipv4/cipso_ipv4.c | 25 +++-
net/ipv4/inet_connection_sock.c | 49 +++++--
net/ipv4/tcp_fastopen.c | 2 +
net/ipv6/calipso.c | 12 +-
net/ipv6/ip6_input.c | 2 +-
net/ipv6/ip6_offload.c | 7 +-
net/ipv6/output_core.c | 7 +-
net/netfilter/ipvs/ip_vs_xmit.c | 2 +-
net/netfilter/nf_conntrack_ovs.c | 2 +-
net/netfilter/nf_log_syslog.c | 2 +-
net/netlabel/netlabel_kapi.c | 24 ++--
net/netlabel/netlabel_unlabeled.c | 32 ++---
net/sched/sch_cake.c | 2 +-
security/selinux/netlabel.c | 5 +-
security/smack/smack_lsm.c | 14 +-
.../selftests/bpf/prog_tests/sock_destroy.c | 121 ++++++++++++++++++
.../selftests/bpf/progs/sock_destroy_prog.c | 30 +++++
27 files changed, 316 insertions(+), 108 deletions(-)
--
2.56.1
More information about the Devel
mailing list