CVE-2024-36971

Severity CVSS v4.0:
Pending analysis
Type:
CWE-416 Use After Free
Publication date:
10/06/2024
Last modified:
27/01/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> net: fix __dst_negative_advice() race<br /> <br /> __dst_negative_advice() does not enforce proper RCU rules when<br /> sk-&gt;dst_cache must be cleared, leading to possible UAF.<br /> <br /> RCU rules are that we must first clear sk-&gt;sk_dst_cache,<br /> then call dst_release(old_dst).<br /> <br /> Note that sk_dst_reset(sk) is implementing this protocol correctly,<br /> while __dst_negative_advice() uses the wrong order.<br /> <br /> Given that ip6_negative_advice() has special logic<br /> against RTF_CACHE, this means each of the three -&gt;negative_advice()<br /> existing methods must perform the sk_dst_reset() themselves.<br /> <br /> Note the check against NULL dst is centralized in<br /> __dst_negative_advice(), there is no need to duplicate<br /> it in various callbacks.<br /> <br /> Many thanks to Clement Lecigne for tracking this issue.<br /> <br /> This old bug became visible after the blamed commit, using UDP sockets.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.6 (including) 4.19.316 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.20 (including) 5.4.278 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5 (including) 5.10.219 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.161 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 6.1.94 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.2 (including) 6.6.34 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7 (including) 6.9.4 (excluding)