CVE-2026-52942: netfilter: nf_log: validate MAC header was set before dumping it

Published Jun 24, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

netfilter: nflog: validate MAC header was set before dumping it

The fallback path of dumpmacheader() guards the MAC header access only with "skb->macheader != skb->networkheader", without checking skbmacheaderwasset(). When the MAC header is unset, macheader is 0xffff, so the test passes and skbmacheader(skb) returns skb->head + 0xffff, ~64 KiB past the buffer; the loop then reads dev->hardheaderlen bytes out of bounds into the kernel log.

This is reachable via the netdev logger: nflogunknownpacket() calls dumpmacheader() unconditionally, and an skb sent through AFPACKET with PACKETQDISCBYPASS reaches the egress hook with macheader still unset (devqueuexmit(), which would reset it, is bypassed).

Add the skbmacheaderwasset() check the ARPHRDETHER path already uses, and replace the open-coded MAC header length test with skbmacheaderlen(). Only skbs with an unset MAC header are affected; valid ones are dumped as before.

BUG: KASAN: slab-out-of-bounds in dumpmacheader (net/netfilter/nflogsyslog.c:831) Read of size 1 at addr ffff88800ea49d3f by task exploit/148 Call Trace: kasanreport (mm/kasan/report.c:595) dumpmacheader (net/netfilter/nflogsyslog.c:831) nflognetdevpacket (net/netfilter/nflogsyslog.c:938 net/netfilter/nflogsyslog.c:963) nflogpacket (net/netfilter/nflog.c:260) nftlogeval (net/netfilter/nftlog.c:60) nftdochain (net/netfilter/nftablescore.c:285) nftdochainnetdev (net/netfilter/nftchainfilter.c:307) nfhookslow (net/netfilter/core.c:619) nfhookdirectegress (net/packet/afpacket.c:257) packetxmit (net/packet/afpacket.c:280) packetsendmsg (net/packet/afpacket.c:3114) syssendto (net/socket.c:2265)

Affected Software

15 affected componentsFixes available
Linux Linux kernel
Microsoft azl3 kernel 6.6.141.1-1<6.6.143.1-1
6.6.143.1-1
Linux Linux kernel>=2.6.36<5.15.210
Linux Linux kernel>=5.16<6.1.176
Linux Linux kernel>=6.2<6.6.143
Linux Linux kernel>=6.7<6.12.94
Linux Linux kernel>=6.13<6.18.36
Linux Linux kernel>=6.19<7.0.13
Linux Linux kernel=7.1-rc1
Linux Linux kernel=7.1-rc2
Linux Linux kernel=7.1-rc3
Linux Linux kernel=7.1-rc4
Linux Linux kernel=7.1-rc5
Linux Linux kernel=7.1-rc6
Linux Linux kernel=7.1-rc7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 6.6.143.1-1
  2. Configuration

    Update the Linux kernel/netfilter logging code so dump_mac_header() validates the skb MAC header state (e.g., only dump when skb_mac_header_was_set() is true) rather than unconditionally reading MAC header fields when the MAC header is unset.

    netfilter nf_log_syslog (Linux kernel) validate MAC header was set before dumping it in dump_mac_header() = enabled

Event History

Jun 24, 2026
CVE Published
via MITRE·07:14 AM
Data Sourced
via MITRE·07:14 AM
DescriptionSeverity
Data Sourced
via NVD·08:16 AM
RemedyDescriptionSeverityWeaknessAffected Software
Jun 27, 2026
Data Sourced
via Microsoft·08:10 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:10 AM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2026-52942?

CVE-2026-52942 has a risk score of 48, indicating a moderate vulnerability in the Linux kernel.

2

How do I fix CVE-2026-52942?

To address CVE-2026-52942, ensure you update to the patched version of the Linux kernel provided by your distribution.

3

What systems are affected by CVE-2026-52942?

CVE-2026-52942 affects the Linux kernel, specifically systems utilizing the netfilter component.

4

What aspects of the Linux kernel are impacted by CVE-2026-52942?

CVE-2026-52942 impacts the handling of MAC headers in netfilter's logging functionality.

5

Is CVE-2026-52942 a common vulnerability?

While not widely discussed, CVE-2026-52942 poses a significant risk and should be addressed promptly in affected systems.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203