Executive brief
A vulnerability in the Linux kernel's Transport Layer Security (TLS) implementation could allow a local attacker to crash the system. The issue is caused by a synchronization error during the initialization of secure network connections. While it does not allow for data theft, it can lead to a denial-of-service condition, impacting system availability and operations.
Technical details
A race condition exists in the Linux kernel's TLS implementation due to a missing write memory barrier in tls_init(). Specifically, in tls_ctx_create(), store-store reordering can occur between the initialization of ctx->sk_proto and the update of sk->sk_prot. If these operations are reordered, a concurrent call to tls_setsockopt or tls_getsockopt on another CPU may observe a NULL value for the protocol structure, resulting in a NULL pointer dereference. The fix involves moving the rcu_assign_pointer() call to after the context initialization to utilize its inherent release barrier semantics. This is a local attack vector requiring no special privileges beyond the ability to initiate TLS socket operations.
Affected products
- Linux Linux Kernel 5.7 to 5.10.218, 5.11 to 5.15.160, 5.16 to 6.1.92, 6.2 to 6.6.32, 6.7 to 6.9.3
Timeline
- 2024-06-21: disclosed
- 2024-06-21: advisory
- 2024-05-23: patched: Initial patch in mainline kernel
References
- https://git.kernel.org/stable/c/2c260a24cf1c4d30ea3646124f766ee46169280b
- https://git.kernel.org/stable/c/335c8f1566d8e44c384d16b450a18554896d4e8b
- https://git.kernel.org/stable/c/91e61dd7a0af660408e87372d8330ceb218be302
- https://git.kernel.org/stable/c/ab67c2fd3d070a21914d0c31319d3858ab4e199c
- https://git.kernel.org/stable/c/d72e126e9a36d3d33889829df8fc90100bb0e071
- https://git.kernel.org/stable/c/ef21007a7b581c7fe64d5a10c320880a033c837b
- https://cert-portal.siemens.com/productcert/html/ssa-265688.html