← Lab /Security & privacy

Local privilege escalation to root via nftables use-after-free bug

A use-after-free bug in the nftables subsystem enables an unprivileged user to gain root on Debian and Ubuntu systems.

Security & privacy Exodus Intelligence 8 Jun 2026 Disclosure Real-world evidence

Published as “Off By !: Exploiting a Use-after-Free in the Linux Kernel”

Why it matters

The bug allows attackers to gain root on common Linux distributions, highlighting the need for careful handling of generation masks in nftables.

Summary

The researchers discovered a use-after-free vulnerability in the nftables verdict-map handling that lets a chain be deleted while still referenced, leading to a dangling pointer. They built an exploit that triggers the bug, leaks kernel and heap addresses, and hijacks control flow with a ROP chain to obtain root on Debian Bookworm, Debian Trixie, Ubuntu 22.04 LTS, and Ubuntu 24.04 LTS. The exploit works reliably on idle systems (>99% success) but drops to about 80% under heavy load.

What they found 2

  1. A use-after-free vulnerability exists in nftables when a verdict map with a catchall element is deleted and an abort process fails to reactivate it.

    “Thus, deleting the chain results in a use-after-free vulnerability.”

  2. The vulnerability can be exploited to achieve local privilege escalation from an unprivileged user to root on several Linux distributions.

    “perform a local privilege escalation from an unprivileged user to root on Debian Bookworm, Debian Trixie, Ubuntu 22.04 LTS, and Ubuntu 24.04 LTS.”

Caveats 5

  • When running the Apache benchmark of the Phoronix Test Suite, the exploit’s stability dropped to 80%.
  • Ubuntu 24.04 restricts unprivileged users from creating namespaces, requiring a bypass (e.g., using aa-exec).
  • Stability is >99% on an idle system but only ~80% under heavy load.
  • Exploitation may fail if the seq_operations start pointer contains a null byte, preventing kernel base leak.
  • Ubuntu 24.04 requires namespace creation bypass.

What’s new here 4

  • Identified a use-after-free bug in nftables verdict-map deactivation/activation logic.
  • Demonstrated full local privilege escalation chain leaking kernel base, heap, and executing a ROP payload.
  • Provided a stable exploit for multiple recent Debian and Ubuntu releases.
  • Reported CVE-2026-23111 and upstream patches.

In the news