CVE-2024-46858: mptcp: pm: Fix uaf in __timer_delete_sync
In the Linux kernel, the following vulnerability has been resolved:
mptcp: pm: Fix uaf in timerdeletesync
There are two paths to access mptcppmdeladdtimer, result in a race condition:
CPU1 CPU2 ==== ==== netrxaction napipoll netlinksendmsg napipoll netlinkunicast processbacklog netlinkunicastkernel netifreceiveskb genlrcv netifreceiveskbonecore netlinkrcvskb NFHOOK genlrcvmsg iplocaldeliverfinish genlfamilyrcvmsg ipprotocoldeliverrcu genlfamilyrcvmsgdoit tcpv4rcv mptcppmnlflushaddrsdoit tcpv4dorcv mptcpnlremoveaddrslist tcprcvestablished mptcppmremoveaddrsandsubflows tcpdataqueue removeannolistbysaddr mptcpincomingoptions mptcppmdeladdtimer mptcppmdeladdtimer kfree(entry)
In removeannolistbysaddr(running on CPU2), after leaving the critical zone protected by "pm.lock", the entry will be released, which leads to the occurrence of uaf in the mptcppmdeladdtimer(running on CPU1).
Keeping a reference to addtimer inside the lock, and calling skstoptimersync() with this reference, instead of "entry->addtimer".
Move listdel(&entry->list) to mptcppmdeladdtimer and inside the pm lock, do not directly access any members of the entry outside the pm lock, which can avoid similar "entry->x" uaf.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1
Event History
Frequently Asked Questions
What is the severity of CVE-2024-46858?
CVE-2024-46858 has a medium severity rating due to its potential for causing a use-after-free condition leading to denial of service.
How do I fix CVE-2024-46858?
To remediate CVE-2024-46858, upgrade to a patched version of the Linux Kernel such as 6.1.123-1 or later.
Which versions of the Linux Kernel are affected by CVE-2024-46858?
CVE-2024-46858 affects Linux Kernel versions from 5.10 to 6.11-rc7, excluding certain patched releases.
What components are involved in CVE-2024-46858?
CVE-2024-46858 involves the multipath TCP (MPTCP) implementation in the Linux Kernel.
Is CVE-2024-46858 a local or remote vulnerability?
CVE-2024-46858 is primarily a local vulnerability that may be exploited in specific environments under certain conditions.