root@rebel:~$ cd /news/threats/zero-day-linux-kernel_
[TIMESTAMP: 2024-01-15 00:00 UTC] [AUTHOR: Alex Mercer] [SEVERITY: CRITICAL]

Critical Zero-Day in Linux Kernel Exposes Millions of Servers

CRITICAL Vulnerabilities #linux#kernel#zero-day
Verified Analysis
READ_TIME: 2 min read

Overview

Security researchers at RedTeam Labs have disclosed a critical zero-day vulnerability affecting the Linux kernel’s netfilter subsystem. The flaw, tracked as CVE-2024-0001, enables local attackers to escalate privileges to root on vulnerable systems.

The vulnerability stems from a use-after-free condition in the nf_tables component, introduced in kernel version 5.14 and persisting through 6.6.

Technical Details

The bug resides in the nft_chain_lookup_byid() function, where an attacker can manipulate transaction state to dereference a freed memory object. Under specific race conditions, this leads to arbitrary kernel code execution.

/* Vulnerable code path in net/netfilter/nf_tables_api.c */
static struct nft_chain *nft_chain_lookup_byid(const struct net *net,
                                                const struct nft_table *table,
                                                const struct nlattr *nla)
{
    /* use-after-free possible here during transaction rollback */
    return list_entry(rcu_dereference(head->next), ...);
}

Affected Systems

Kernel VersionStatus
< 5.14Not affected
5.14 – 6.5Vulnerable
6.6Vulnerable
6.7+Patched

Mitigation

  1. Patch immediately — Update to kernel 6.7 or apply the backported patch for your distribution.
  2. Restrict unprivileged user namespaces — Reduces attack surface on Ubuntu/Debian:
    sysctl -w kernel.unprivileged_userns_clone=0
  3. Monitor for exploitation attempts using auditd rules targeting nf_tables syscalls.

Proof of Concept

A proof-of-concept exploit has been published by the discoverers after a 90-day coordinated disclosure period. Exploitation requires local access and works reliably on Ubuntu 22.04 LTS and Fedora 39.

References