Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-98095 Overview
CVE-2026-98095 is a Linux kernel vulnerability in the af_packet subsystem. The flaw resides in tpacket_parse_header(), which incorrectly casts a user-provided tpacket_hdr.tp_len field from u32 to int. When the length exceeds INT_MAX, the signed comparison against size_max passes and a negative value propagates up to sock_sendmsg_nosec(), triggering a kernel BUG(). The issue was discovered through syzbot fuzzing and reproduced by writing to an AF_PACKET socket with tp_len set to 0xfffffdef, which casts to -EIOCBQUEUED (-529). The resulting kernel panic produces a denial-of-service condition on affected systems.
Critical Impact
A local unprivileged user with the ability to open an AF_PACKET socket can crash the kernel by submitting a crafted tpacket_hdr with a tp_len value greater than INT_MAX.
Affected Products
- Linux kernel versions containing the affected tpacket_parse_header() implementation in net/packet/af_packet.c
- Distributions shipping unpatched upstream kernels prior to the fix commits referenced below
- Systems where unprivileged processes can create AF_PACKET sockets (default on many Linux distributions)
Discovery Timeline
- 2026-09-25 - CVE-2026-98095 published to the National Vulnerability Database
- 2026-09-30 - Last updated in NVD database
Technical Details for CVE-2026-98095
Vulnerability Analysis
The vulnerability is a numeric truncation and sign-conversion flaw in the Linux kernel packet socket layer. In tpacket_parse_header(), the function assigns the user-controlled unsigned 32-bit field tpacket_hdr.tp_len into a local variable typed as int. Any value above 0x7FFFFFFF becomes a negative integer when interpreted as signed.
The subsequent length validation if (unlikely(tp_len > size_max)) evaluates the two operands with signed semantics, so negative values appear smaller than size_max and bypass the bounds check. The negative length is then returned up the call stack to sock_sendmsg_nosec() in net/socket.c, which treats non-positive return values from send paths as invalid and triggers a BUG() at line 803, producing a kernel oops and halting the calling context.
Root Cause
The root cause is an improper type conversion between unsigned user input and a signed kernel integer. The fix, applied across multiple stable kernel branches, redefines the local tp_len variable as u32 to match the on-wire type and preserve unsigned comparison semantics in tpacket_parse_header().
Attack Vector
An attacker with local access and the capability to create an AF_PACKET socket (which may require CAP_NET_RAW depending on configuration) opens a packet socket in TPACKET mode, maps the ring buffer, writes a crafted header with tp_len = 0xfffffdef, and issues a write() syscall against the socket file descriptor. The crafted header traverses tpacket_parse_header(), bypasses the size check due to the signed cast, and reaches sock_sendmsg_nosec() where the BUG() assertion fires. The result is a kernel panic affecting system availability. The vulnerability does not provide a direct path to code execution or information disclosure based on the reported crash signature.
The public reproducer from syzbot demonstrates the flaw by writing a single byte to an AF_PACKET socket after planting the malformed tp_len value in the shared ring buffer. See the referenced Kernel Git Commit for the patch implementation.
Detection Methods for CVE-2026-98095
Indicators of Compromise
- Kernel oops entries containing kernel BUG at net/socket.c:803 with RIP: sock_sendmsg_nosec
- Call traces that include tpacket_parse_header, packet_snd, sock_write_iter, and vfs_write frames
- Unexpected system crashes or kernel panics on hosts that expose AF_PACKET to unprivileged workloads
Detection Strategies
- Monitor /var/log/kern.log, dmesg, and journald for BUG() entries referencing sock_sendmsg_nosec or tpacket_parse_header
- Audit process creation and syscall telemetry for processes invoking socket(AF_PACKET, SOCK_RAW, ...) followed by setsockopt(PACKET_TX_RING) and write() sequences from untrusted users
- Correlate repeated host crashes with recent container or workload deployments that use raw packet sockets
Monitoring Recommendations
- Collect kernel crash dumps with kdump or pstore to retain evidence of exploitation attempts after reboot
- Alert on uses of CAP_NET_RAW by non-system accounts and on new unprivileged processes creating AF_PACKET sockets
- Track kernel package versions across the fleet and alert when hosts drift from a patched baseline
How to Mitigate CVE-2026-98095
Immediate Actions Required
- Apply the upstream Linux kernel fix that redefines tp_len as u32 in tpacket_parse_header() and reboot affected hosts
- Inventory systems that grant CAP_NET_RAW or run containers with --cap-add=NET_RAW and prioritize them for patching
- Restrict creation of AF_PACKET sockets to trusted service accounts where feasible
Patch Information
The fix is distributed across the following stable kernel commits. Deploy the kernel update from your distribution that incorporates one of these commits:
- Kernel Git Commit 72abe77e
- Kernel Git Commit 73e594c1
- Kernel Git Commit 9d714076
- Kernel Git Commit c6b3db72
Workarounds
- Drop CAP_NET_RAW from unprivileged user namespaces and container runtimes to prevent AF_PACKET socket creation by untrusted code
- Set sysctl kernel.unprivileged_userns_clone=0 on distributions where this toggle exists to reduce user-namespace exposure that grants CAP_NET_RAW
- Use seccomp profiles or SELinux/AppArmor policies to block the socket() syscall with AF_PACKET for workloads that do not require raw packet access
# Block AF_PACKET socket creation for a container workload via Docker
docker run --cap-drop=NET_RAW --security-opt seccomp=/etc/docker/seccomp-no-afpacket.json <image>
# Verify running kernel version after patching
uname -r
# Check for the fix in the running kernel source (if available)
grep -n "u32 tp_len" /usr/src/linux/net/packet/af_packet.c
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

