CVE-2026-43050: atm: lec: fix use-after-free in sock_def_readable()
In the Linux kernel, the following vulnerability has been resolved:
atm: lec: fix use-after-free in sockdefreadable()
A race condition exists between lecatmclose() setting priv->lecd to NULL and concurrent access to priv->lecd in sendtolecd(), lechandlebridge(), and lecatmsend(). When the socket is freed via RCU while another thread is still using it, a use-after-free occurs in sockdefreadable() when accessing the socket's wait queue.
The root cause is that lecatmclose() clears priv->lecd without any synchronization, while callers dereference priv->lecd without any protection against concurrent teardown.
Fix this by converting priv->lecd to an RCU-protected pointer: - Mark priv->lecd as rcu in lec.h - Use rcuassignpointer() in lecatmclose() and lecdattach() for safe pointer assignment - Use rcuaccesspointer() for NULL checks that do not dereference the pointer in lecstartxmit(), lecpush(), sendtolecd() and lecdattach() - Use rcureadlock/rcudereference/rcureadunlock in sendtolecd(), lechandlebridge() and lecatmsend() to safely access lecd - Use rcuassignpointer() followed by synchronizercu() in lecatmclose() to ensure all readers have completed before proceeding. This is safe since lecatmclose() is called from vccrelease() which holds locksock(), a sleeping lock. - Remove the manual skreceivequeue drain from lecatmclose() since vccdestroysocket() already drains it after lecatmclose() returns.
v2: Switch from spinlock + sockhold/put approach to RCU to properly fix the race. The v1 spinlock approach had two issues pointed out by Eric Dumazet: 1. priv->lecd was still accessed directly after releasing the lock instead of using a local copy. 2. The spinlock did not prevent packets being queued after lecatmclose() drains skreceivequeue since timer and workqueue paths bypass netifstopqueue().
Note: Syzbot patch testing was attempted but the test VM terminated unexpectedly with "Connection to localhost closed by remote host", likely due to a QEMU AHCI emulation issue unrelated to this fix. Compile testing with "make W=1 net/atm/lec.o" passes cleanly.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1 - Configuration
Mark priv->lecd as __rcu in lec.h; use rcu_assign_pointer() for assignments in lec_atm_close() and lecd_attach(); use rcu_access_pointer() for non-dereferencing NULL checks in lec_start_xmit(), lec_push(), send_to_lecd(), and lecd_attach(); use rcu_read_lock(), rcu_dereference(), and rcu_read_unlock() when accessing lecd in send_to_lecd(), lec_handle_bridge(), and lec_atm_send(); in lec_atm_close(), use rcu_assign_pointer() followed by synchronize_rcu() before proceeding.
Linux kernel ATM LEC priv->lecd = RCU-protected pointer (__rcu) - Configuration
Remove the manual sk_receive_queue drain from lec_atm_close(), since vcc_destroy_socket() drains it after lec_atm_close() returns.
Linux kernel ATM LEC manual sk_receive_queue drain in lec_atm_close() = removed
Event History
Frequently Asked Questions
What is the severity of CVE-2026-43050?
CVE-2026-43050 is classified as a medium severity vulnerability due to its potential to cause a use-after-free condition.
How do I fix CVE-2026-43050?
To fix CVE-2026-43050, update the Linux kernel to the latest version where the vulnerability has been patched.
What systems are affected by CVE-2026-43050?
CVE-2026-43050 affects the Linux kernel, specifically those using the ATM LEC protocol.
What does CVE-2026-43050 exploit involve?
CVE-2026-43050 involves a race condition that can lead to a use-after-free vulnerability in the sock_def_readable function.
Has CVE-2026-43050 been resolved?
Yes, CVE-2026-43050 has been resolved in newer versions of the Linux kernel.