Skip to content
Memory corruption Write-up Advanced

Linux kernel use-after-free in Netfilter, local privilege escalation

Netfilter nf_tables accepted an invalid batch request in which one operation implicitly deleted an anonymous set and a later operation acted on that same set, corrupting internal state. An unprivileged local user could abuse this to perform arbitrary reads and writes in kernel memory and escalate to root.

seclists.org

Published on seclists.org

The issue is about Netfilter nftables accepting some invalid updates to its configuration.

The author, on seclists.org

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely nf_tables failed to reject a batch request where a later operation referenced an anonymous set that an earlier operation in the same batch had implicitly deleted, so committing it corrupted internal state.

Impact

An unprivileged local user could escalate privileges and obtain a root shell; the text states the exploit was developed and reproduced against multiple kernel releases including 6.3.1.

What the attacker needed

Local unprivileged access to the machine

The fix

The fix was made available in the mainline kernel git repository.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

The Linux kernel's firewall component, Netfilter, lets programs change its rules in grouped batches that are meant to apply all-or-nothing. A flaw meant a batch could delete a set of rules and then still act on it, leaving the kernel confused about its own memory. A normal user on the machine could then use that confusion to read and write kernel memory and become the administrator (root).

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.