How The Tables Have Turned: An analysis of two new Linux vulnerabilities in nf_tables
Two flaws were found in the Linux kernel nf_tables component: insufficient validation of input arguments caused an out-of-bounds access that could lead to arbitrary code execution and local privilege escalation, and related insufficient stack variable initialisation could leak a wide variety of kernel data to userspace. The author wrote a working local privilege escalation exploit for the first issue.
Published on blog.dbouman.nl
Hey there! This post will be about two vulnerabilties I found in the nftables component of the netfilter subsystem in the Linux kernel.
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 the register index and length supplied in nf_tables expressions were not validated against the register array bounds, so an expression could read and write past the end of the register buffer.
Impact
On default configurations of the latest Ubuntu and RHEL an unprivileged local user could escalate to root, and the second bug could leak a large variety of kernel data to userspace.
What the attacker needed
Local unprivileged access to the machine; nf_tables module present and loaded
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 is the core of the operating system, and it has a firewall-like feature called nf_tables that lets programs set up packet-filtering rules. A mistake in how it checked the numbers supplied with those rules let a normal user reach memory outside the intended buffer, and a second mistake left old memory contents in a reply, leaking kernel data. A local user could use the first to become the administrator (root) of the machine.
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.