CVE-2024-36971 Android Kernel Remote Code Execution
A race condition in the Linux kernel network stack allows attackers to trigger a use-after-free, potentially leading to code execution or privilege escalation.
- Exploited in the wild
- Since 7 Aug 2024
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-36971?
CVE-2024-36971 is a high-severity use after free vulnerability in Debian Debian Linux, published on 10 Jun 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
net: fix __dst_negative_advice() race
__dst_negative_advice() does not enforce proper RCU rules when sk->dst_cache must be cleared, leading to possible UAF.
RCU rules are that we must first clear sk->sk_dst_cache, then call dst_release(old_dst).
Note that sk_dst_reset(sk) is implementing this protocol correctly, while __dst_negative_advice() uses the wrong order.
Given that ip6_negative_advice() has special logic against RTF_CACHE, this means each of the three ->negative_advice() existing methods must perform the sk_dst_reset() themselves.
Note the check against NULL dst is centralized in __dst_negative_advice(), there is no need to duplicate it in various callbacks.
Many thanks to Clement Lecigne for tracking this issue.
This old bug became visible after the blamed commit, using UDP sockets.
Weakness: CWE-416
Which versions are affected by CVE-2024-36971?
It affects 2 products.
Linux distribution packages (39)
kpatch-patch-5_14_0-427_13_1 Red Hat:enterprise_linux:9::baseos | All versions | 0:1-2.el9_4 |
kpatch-patch-5_14_0-427_13_1-debuginfo Red Hat:enterprise_linux:9::baseos | All versions | 0:1-2.el9_4 |
kpatch-patch-5_14_0-427_13_1-debugsource Red Hat:enterprise_linux:9::baseos | All versions | 0:1-2.el9_4 |
bpftool Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
bpftool-debuginfo Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-abi-whitelists Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-core Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-debug Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-debug-core Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-debug-debuginfo Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-debug-devel Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-debug-modules Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-debug-modules-extra Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-debuginfo Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-debuginfo-common-x86_64 Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-devel Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-doc Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-modules Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-modules-extra Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-tools Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-tools-debuginfo Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kernel-tools-libs Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
perf Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
perf-debuginfo Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
python3-perf Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
python3-perf-debuginfo Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.138.1.el8_2 |
kpatch-patch-4_18_0-305_120_1 Red Hat:rhel_e4s:8.4::baseos | All versions | 0:1-4.el8_4 |
kpatch-patch-4_18_0-305_120_1-debuginfo Red Hat:rhel_e4s:8.4::baseos | All versions | 0:1-4.el8_4 |
kpatch-patch-4_18_0-305_120_1-debugsource Red Hat:rhel_e4s:8.4::baseos | All versions | 0:1-4.el8_4 |
kpatch-patch-5_14_0-284_48_1 Red Hat:rhel_eus:9.2::baseos | All versions | 0:1-5.el9_2 |
kpatch-patch-5_14_0-284_48_1-debuginfo Red Hat:rhel_eus:9.2::baseos | All versions | 0:1-5.el9_2 |
kpatch-patch-5_14_0-284_48_1-debugsource Red Hat:rhel_eus:9.2::baseos | All versions | 0:1-5.el9_2 |
kpatch-patch-5_14_0-284_52_1 Red Hat:rhel_eus:9.2::baseos | All versions | 0:1-4.el9_2 |
kpatch-patch-5_14_0-284_52_1-debuginfo Red Hat:rhel_eus:9.2::baseos | All versions | 0:1-4.el9_2 |
kpatch-patch-5_14_0-284_52_1-debugsource Red Hat:rhel_eus:9.2::baseos | All versions | 0:1-4.el9_2 |
kernel-livepatch-SLE15-SP3_Update_40 SUSE:Linux Enterprise Live Patching 15 SP3 | All versions | 16-150300.2.1 |
kernel-livepatch-SLE15-SP3_Update_41 SUSE:Linux Enterprise Live Patching 15 SP3 | All versions | 15-150300.2.1 |
kernel-livepatch-SLE15-SP4_Update_22 SUSE:Linux Enterprise Live Patching 15 SP4 | All versions | 14-150400.2.1 |
Products include Debian Debian Linux, Linux kernel.
How do I fix CVE-2024-36971?
Apply the vendor's patch. US federal agencies must fix it by 28 Aug 2024.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2024-36971 being exploited?
Yes. Attackers have exploited CVE-2024-36971 in the wild since at least 7 Aug 2024.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as A-343727534, ASB-A-343727534, AZL-42615, AZL-42622, BELL-CVE-2024-36971, DEBIAN-CVE-2024-36971 and 8 more.