CVE-2026-23240: tls: Fix race condition in tls_sw_cancel_work_tx()
In the Linux kernel, the following vulnerability has been resolved:
tls: Fix race condition in tlsswcancelworktx()
This issue was discovered during a code audit.
After canceldelayedworksync() is called from tlsskprotoclose(), txworkhandler() can still be scheduled from paths such as the Delayed ACK handler or ksoftirqd. As a result, the txworkhandler() worker may dereference a freed TLS object.
The following is a simple race scenario:
cpu0 cpu1
tlsskprotoclose() tlsswcancelworktx() tlswritespace() tlsswwritespace() if (!testandsetbit(BITTXSCHEDULED, &txctx->txbitmask)) setbit(BITTXSCHEDULED, &ctx->txbitmask); canceldelayedworksync(&ctx->txwork.work); scheduledelayedwork(&txctx->txwork.work, 0);
To prevent this race condition, canceldelayedworksync() is replaced with disabledelayedworksync().
Other sources
In tlsswcancelworktx of tlssw.c, there is a possible use after free due to a race condition. This could lead to local escalation of privilege with no additional execution privileges needed. User interaction is not needed for exploitation.
— OSV
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.75 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.16 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.19.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.107-1Fixed in 6.12.117-1Fixed in 7.3.4-1Fixed in 7.3.5-1 - Upgrade
Upgrade
android/:linux_kernel:to a version that resolves this vulnerability.Fixed in :2026-11-05 - Upgrade
Upgrade
ubuntu/linux-nvidia-tegrato a version that resolves this vulnerability.Fixed in 6.8.0-1035.38 - Compensating control
In tls_sw_cancel_work_tx(), replace cancel_delayed_work_sync() with disable_delayed_work_sync() to prevent tx_work from being rescheduled during cancellation.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-23240?
CVE-2026-23240 has been classified as a moderate severity vulnerability.
How do I fix CVE-2026-23240?
To fix CVE-2026-23240, you should update to the latest patched version of the Linux kernel.
What are the consequences of not addressing CVE-2026-23240?
Failure to address CVE-2026-23240 may lead to potential denial of service conditions due to the race condition.
Which versions of the Linux kernel are affected by CVE-2026-23240?
CVE-2026-23240 affects multiple versions of the Linux kernel that include the vulnerable code.
How was CVE-2026-23240 discovered?
CVE-2026-23240 was discovered during a routine code audit of the Linux kernel.