CVE-2026-52942: Linux Kernel Netfilter MAC Header Buffer Over-Read Information Disclosure
A flaw in the Linux kernel's netfilter logging subsystem allows a local attacker to read memory beyond allocated buffer boundaries. When the kernel logs network packets, it attempts to dump the MAC (media access control) header without properly verifying that the header information has been set. An attacker with local access can craft and send specially crafted packets through AF_PACKET with QDISC bypass enabled, causing the logging function to read approximately 64 KB past the intended buffer and leak that kernel memory into the system log. This information disclosure could expose sensitive kernel data to unprivileged users.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.1 HIGH · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
- Weaknesses (CWE)
- CWE-125
- Affected products
- 8 configuration(s)
- Published / Modified
- 2026-06-24 / 2026-07-24
NVD description (verbatim)
In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_log: validate MAC header was set before dumping it The fallback path of dump_mac_header() guards the MAC header access only with "skb->mac_header != skb->network_header", without checking skb_mac_header_was_set(). When the MAC header is unset, mac_header is 0xffff, so the test passes and skb_mac_header(skb) returns skb->head + 0xffff, ~64 KiB past the buffer; the loop then reads dev->hard_header_len bytes out of bounds into the kernel log. This is reachable via the netdev logger: nf_log_unknown_packet() calls dump_mac_header() unconditionally, and an skb sent through AF_PACKET with PACKET_QDISC_BYPASS reaches the egress hook with mac_header still unset (__dev_queue_xmit(), which would reset it, is bypassed). Add the skb_mac_header_was_set() check the ARPHRD_ETHER path already uses, and replace the open-coded MAC header length test with skb_mac_header_len(). Only skbs with an unset MAC header are affected; valid ones are dumped as before. BUG: KASAN: slab-out-of-bounds in dump_mac_header (net/netfilter/nf_log_syslog.c:831) Read of size 1 at addr ffff88800ea49d3f by task exploit/148 Call Trace: kasan_report (mm/kasan/report.c:595) dump_mac_header (net/netfilter/nf_log_syslog.c:831) nf_log_netdev_packet (net/netfilter/nf_log_syslog.c:938 net/netfilter/nf_log_syslog.c:963) nf_log_packet (net/netfilter/nf_log.c:260) nft_log_eval (net/netfilter/nft_log.c:60) nft_do_chain (net/netfilter/nf_tables_core.c:285) nft_do_chain_netdev (net/netfilter/nft_chain_filter.c:307) nf_hook_slow (net/netfilter/core.c:619) nf_hook_direct_egress (net/packet/af_packet.c:257) packet_xmit (net/packet/af_packet.c:280) packet_sendmsg (net/packet/af_packet.c:3114) __sys_sendto (net/socket.c:2265)
8 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability resides in the nf_log_syslog.c dump_mac_header() function within netfilter's logging path. The fallback code path checks whether skb->mac_header differs from skb->network_header, but omits a critical validation: skb_mac_header_was_set(). When a MAC header is unset, the mac_header field contains 0xffff (all bits set), which misleads the inequality check into passing. The resulting call to skb_mac_header() returns a pointer into skb->head offset by 0xffff bytes—roughly 64 KiB past the buffer boundary. The loop then reads dev->hard_header_len bytes out of bounds. Reachability is via the netdev logger: nf_log_unknown_packet() invokes dump_mac_header() unconditionally, and an skb transmitted through AF_PACKET with PACKET_QDISC_BYPASS flag reaches the egress netfilter hook with mac_header still uninitialized (the normal __dev_queue_xmit() path that resets this field is bypassed). The fix adds the missing skb_mac_header_was_set() guard and replaces open-coded MAC header length logic with skb_mac_header_len(). The CWE classification is CWE-125: Out-of-bounds Read.
Business impact
Information disclosure from kernel memory can compromise system confidentiality. An unprivileged local attacker gains the ability to read sensitive kernel state—including cryptographic keys, authentication tokens, or other protected data—and redirect it to the system log where it may be accessible or logged to persistent storage. This weakens the security boundary between user and kernel space. On multi-tenant systems, it enables privilege escalation reconnaissance or lateral movement planning. Systems handling sensitive workloads (databases, key management, payment processing) or subject to strict data residency requirements face elevated risk.
Affected systems
All Linux kernel versions containing the vulnerable netfilter logging code are affected. The vulnerability affects distributions and kernels that enable netfilter and the nf_tables or legacy netfilter rules engine. Systems using AF_PACKET for packet crafting or monitoring (tcpdump, packet sniffers, custom networking tools) and systems with netfilter rules configured are at risk. Verify your kernel version and netfilter configuration status against the vendor advisory for specific patched releases.
Exploitability
Exploitation requires local access and unprivileged execution capability (no special privileges required at trigger time). The attack surface is AF_PACKET with PACKET_QDISC_BYPASS, which is accessible to local users. Triggering is straightforward: send a crafted packet using AF_PACKET while the netdev logger is active (via nftables or iptables logging rules). No special kernel configuration or race conditions are needed. The leaked data appears in kernel logs (dmesg, syslog), making it persistent and observable. Proof-of-concept code exists in public Linux kernel commit history. Exploitation is practical and repeatable for any local user.
Remediation
Apply a kernel update that includes the netfilter MAC header validation fix. The patch adds skb_mac_header_was_set() validation before dereferencing the MAC header pointer and replaces inline length checks with the skb_mac_header_len() helper function. Consult your Linux distribution's security advisory for patched kernel versions and installation instructions. If a patch is not yet available for your distribution, mitigating controls include: disabling AF_PACKET access via AppArmor, SELinux, or seccomp policies; disabling netfilter logging rules if not required; or restricting user access to packet manipulation tools. Permanent remediation requires a kernel upgrade.
Patch guidance
Contact your Linux distribution vendor for patched kernel versions (Red Hat, Ubuntu, Debian, SUSE, etc. each release on their own schedule). Kernel.org git history contains the upstream fix; verify the patch against the kernel version you are running. When patching, reboot is required for kernel updates. Test patches in non-production environments first, especially on systems with complex netfilter rule sets, to ensure no rule interaction issues. Coordinate patching with change windows for production systems.
Detection guidance
Monitor kernel logs (dmesg, journalctl, syslog) for KASAN messages or out-of-bounds read warnings referencing dump_mac_header or nf_log_syslog.c. Systems with KASAN compiled in will emit explicit BUG and slab-out-of-bounds alerts. Examine active netfilter rules (nft list ruleset, iptables -L) to identify logging rules that trigger nf_log_netdev_packet. Correlate system log timestamps with suspicious AF_PACKET activity. Network-based detection is difficult since the malicious packet format is standard; focus on local endpoint monitoring and log analysis. Check for unexpected kernel memory dumps in log files.
Why prioritize this
This vulnerability merits prompt prioritization due to its HIGH CVSS score (7.1), local exploitability with no privilege requirement, information disclosure impact, and practical attack surface via AF_PACKET. While local-only, many systems grant local access to containers, SSH users, or application servers. Kernel memory leaks undermine defense-in-depth and are difficult to detect post-exploitation. Systems with netfilter logging enabled are actively at risk.
Risk score, explained
CVSS 3.1 score of 7.1 (HIGH) reflects: local attack vector (AV:L), low attack complexity (AC:L), low privilege requirement (PR:L), no user interaction (UI:N), unchanged scope (S:U), high confidentiality impact (C:H) from kernel memory disclosure, no integrity impact (I:N), and high availability impact (A:H) due to potential kernel instability if out-of-bounds read corrupts adjacent structures. The availability impact acknowledges that reading 64 KiB past buffer boundaries could touch uninitialized or protected memory, risking kernel panic or undefined behavior. High severity is appropriate for local information disclosure combined with potential availability degradation.
Frequently asked questions
Do I need to rebuild my kernel to apply the patch?
Patched kernel packages from your distribution can be installed via standard package management (apt, yum, zypper, etc.) without manual compilation. Only rebuild if you maintain a custom kernel tree. Most users should wait for their distribution's official patched kernel release.
What is AF_PACKET and PACKET_QDISC_BYPASS? Do I need them?
AF_PACKET is a raw socket interface allowing userspace programs to send and receive packets at the link layer. PACKET_QDISC_BYPASS is a socket option that bypasses the normal kernel queuing discipline during transmission. Tools like tcpdump and network diagnostic utilities use AF_PACKET. Most standard applications do not require it; review which local users or containers need packet-crafting capabilities and restrict accordingly.
How do I know if netfilter logging is enabled on my system?
Run 'nft list ruleset' (for nftables) or 'iptables -L' (for legacy iptables) and look for rules with 'log' targets. If logging rules exist and reference 'netdev' protocol family, the netdev logger is active and this vulnerability is reachable.
Can this be exploited remotely?
No. The vulnerability requires local code execution to send packets via AF_PACKET. Remote attackers cannot trigger it. However, local users, containers, or compromised applications with local access can exploit it.
This analysis is based on publicly available vulnerability data and the upstream kernel fix. Patch availability, affected versions, and timing vary by distribution; consult your vendor's security advisory for definitive guidance. No exploit code is provided in this document. CVSS scoring reflects the vulnerability's inherent risk; actual impact depends on system configuration, access controls, and deployment context. This information is provided for informational purposes to aid security decision-making and should not substitute for professional security assessment or vendor guidance. Source: NVD (public-domain), retrieved 2026-07-30. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-10889HIGHCritical ANGLE Sandbox Escape in Google Chrome – Patch to 149.0.7827.53
- CVE-2026-10927HIGHChrome Sandbox Escape via Dawn Out-of-Bounds Read
- CVE-2026-10941HIGHSkia Out-of-Bounds Memory Vulnerability in Chrome – Urgent Patch Required
- CVE-2026-11015HIGHCritical Chrome WebGPU Out-of-Bounds Read Vulnerability
- CVE-2026-11077HIGHChrome Dawn Graphics Vulnerability – Sandbox Escape Risk
- CVE-2026-11091HIGHCritical Chrome Memory Corruption Vulnerability in Dawn Graphics Engine
- CVE-2026-11111HIGHChrome Out-of-Bounds Read in ANGLE Graphics Engine — Patch Guidance
- CVE-2026-11191HIGHOut-of-Bounds Memory Access in Chrome ANGLE Library