CVE-2026-52915: Linux Kernel Netfilter IPv6 Hop-by-Hop Array Out-of-Bounds Vulnerability
A flaw in the Linux kernel's IPv6 hop-by-hop header filtering allows a local attacker with standard user privileges to trigger an out-of-bounds array access. The vulnerability exists because the kernel accepts oversized option lists in netfilter rules without validating that they fit within the fixed 16-element array used to store them. An attacker can craft a malicious firewall rule to cause the kernel to read or write beyond array boundaries, potentially enabling privilege escalation or denial of service.
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-129
- Affected products
- 10 configuration(s)
- Published / Modified
- 2026-06-24 / 2026-07-08
NVD description (verbatim)
In the Linux kernel, the following vulnerability has been resolved: netfilter: ip6t_hbh: reject oversized option lists struct ip6t_opts stores at most IP6T_OPTS_OPTSNR option descriptors, but hbh_mt6_check() does not reject larger optsnr values supplied from userspace. Validate optsnr in the rule setup path so only match data that fits the fixed-size opts array can be installed. This follows the existing xtables pattern of rejecting invalid user-provided counts in checkentry() and keeps the packet matching path unchanged. `struct ip6t_opts` has a fixed `opts[IP6T_OPTS_OPTSNR]` array, where `IP6T_OPTS_OPTSNR` is 16, then off-by-one array access is possible: [ 137.924693][ T8692] UBSAN: array-index-out-of-bounds in ../net/ipv6/netfilter/ip6t_hbh.c:110:29 [ 137.926167][ T8692] index 16 is out of range for type '__u16 [16]'
8 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability resides in the netfilter ip6t_hbh module, specifically in the `hbh_mt6_check()` function which validates IPv6 hop-by-hop header matching rules. The `struct ip6t_opts` data structure contains a fixed-size array `opts[IP6T_OPTS_OPTSNR]` with 16 slots for option descriptors. The vulnerability occurs because user-supplied `optsnr` values (option count) are not validated during rule setup, allowing counts exceeding 16 to be installed. This leads to an array index out-of-bounds condition when the packet matching path attempts to access the `opts` array using an invalid index. The issue is classified as CWE-129 (Improper Validation of Array Index) and can be exploited through direct manipulation of netfilter rule configuration by unprivileged local users.
Business impact
Organizations relying on Linux-based systems for network security, including firewalls, load balancers, and cloud infrastructure, face a localized privilege escalation risk. An unprivileged user on an affected system can destabilize the kernel or gain elevated capabilities, potentially compromising the confidentiality and integrity of system operations. In containerized or multi-tenant environments, this becomes particularly concerning as it provides a path for lateral movement and container escape. The impact extends to any deployment where local user access is possible—development systems, shared hosting, and environments with guest accounts.
Affected systems
All Linux kernel versions containing the unfixed ip6t_hbh netfilter module are affected. Distributions include all mainstream kernels (RHEL, Ubuntu, Debian, SUSE, Fedora, and others) until patched. The vulnerability requires the netfilter IPv6 extensions module to be loaded and netfilter rules involving hop-by-hop headers to be configured; however, even passive loading of the vulnerable code path during rule validation is sufficient for exploitation. Verify your kernel version and ensure it includes the fix resolving the optsnr validation in hbh_mt6_check().
Exploitability
Exploitation is straightforward and requires only local user access (no authentication required beyond a standard unprivileged account). An attacker uses standard netfilter tools (iptables or ip6tables) to craft a hop-by-hop matching rule with an artificially inflated option count, triggering the out-of-bounds condition immediately during rule installation. The CVSS vector reflects local attack surface (AV:L) and low attack complexity (AC:L), but the requirement for local access and user privilege (PR:L) prevents remote exploitation. No special network conditions or social engineering are needed; the attack is deterministic and repeatable. The lack of KEV status indicates this is not yet widely exploited in the wild, but the simplicity of the trigger makes it a candidate for rapid weaponization.
Remediation
The fix involves adding explicit validation of the `optsnr` field in the `hbh_mt6_check()` function to reject any rule with an option count exceeding `IP6T_OPTS_OPTSNR` (16). This validation mirrors existing xtables security patterns used elsewhere in the netfilter codebase. The corrected code path verifies user-supplied counts during rule setup (checkentry phase) rather than during packet matching, keeping runtime performance unaffected. Patched kernel versions will include this check and prevent installation of malformed rules.
Patch guidance
Verify and apply the latest stable kernel update from your distribution as soon as it becomes available. For RHEL/CentOS, Ubuntu, Debian, and other major distributions, monitor security advisory channels for kernel updates addressing CVE-2026-52915. If you maintain a custom kernel build, backport the netfilter ip6t_hbh validation fix from upstream Linux. Test patches in a non-production environment first to ensure netfilter rule compatibility. Restart affected services or reboot systems after kernel installation to load the corrected module. If immediate patching is not possible, consider disabling IPv6 hop-by-hop header filtering rules or restricting local user access on systems where this capability is not required.
Detection guidance
Monitor system logs for UBSAN (Undefined Behavior Sanitizer) warnings originating from ip6t_hbh.c, particularly array-index-out-of-bounds messages referencing index 16 or higher on the opts array. If kernel debugging is enabled, watch for kernel panic or oops messages tied to netfilter during firewall rule installation. Use kernel audit rules to log all netfilter rule changes (iptables -A or ip6tables -A commands) and correlate them with system instability or permission escalation attempts. Deploy intrusion detection signatures that flag attempts to load oversized hop-by-hop option configurations in netfilter rules. Check running iptables/ip6tables rule sets for any suspiciously large option counts in hop-by-hop match rules (use `iptables -L -n` or `ip6tables -L -n` and inspect rule details).
Why prioritize this
This vulnerability combines moderate attack accessibility (requires local user access), deterministic exploitability, and significant potential impact (privilege escalation and kernel crash). The HIGH CVSS score (7.1) reflects the severity in environments where local user access is common or expected, such as development systems, shared servers, multi-tenant cloud instances, or container hosts. Although not yet tracked in the KEV catalog, the simplicity of the exploit trigger and the presence of array-out-of-bounds conditions historically predicts rapid adoption by threat actors. Prioritize patching for systems exposed to untrusted local users.
Risk score, explained
The CVSS 3.1 score of 7.1 (HIGH) is justified by: (1) local attack vector (AV:L) reflecting the need for prior system access; (2) low attack complexity (AC:L) because no special conditions or user interaction are needed; (3) low privilege requirement (PR:L) allowing standard unprivileged users to trigger the flaw; (4) high confidentiality impact (C:H) from potential out-of-bounds read access; (5) high availability impact (A:H) from kernel crashes or resource exhaustion; and (6) unchanged integrity scope (S:U, I:N) because the primary risk is reading or crashing, not writing to protected memory in this specific configuration. The score appropriately elevates the issue above MEDIUM because the local privilege escalation path and kernel stability impact pose significant risk to multi-user and containerized deployments.
Frequently asked questions
Does this vulnerability require netfilter rules to be already configured on the system?
No. The vulnerability is triggered during the rule setup phase (checkentry) when an attacker installs a malicious rule using standard tools like ip6tables. The rule does not need to be active or actively processing traffic; the out-of-bounds condition occurs during validation. Systems with netfilter IPv6 modules loaded are vulnerable even if no hop-by-hop rules currently exist.
Can this be exploited remotely, or only locally?
Only locally. The attack requires direct execution of netfilter rule configuration commands on the system itself, which means the attacker needs an unprivileged user account or shell access. Remote attackers cannot exploit this without first gaining local access to the target system.
What is the practical impact of the out-of-bounds array access?
The out-of-bounds access can read kernel memory beyond the 16-element opts array, potentially leaking sensitive data, or cause a kernel panic/crash via UBSAN detection or invalid memory dereference. In some kernel configurations, this could provide a foundation for privilege escalation by disclosing kernel addresses or overwriting adjacent kernel structures.
If we don't use IPv6 hop-by-hop filtering rules, are we still vulnerable?
If the netfilter IPv6 modules are not loaded, you are not vulnerable at runtime. However, the vulnerability exists in the kernel code itself. To be completely safe, apply the kernel patch regardless. If you are certain IPv6 HBH filtering is not used, disabling or unloading the ip6t_hbh module can mitigate exposure until patching is possible.
This analysis is based on the CVE description and CVSS scoring data provided. Actual affected kernel versions, patch release versions, and distribution-specific timelines should be verified against official vendor advisories from your Linux distribution (RedHat, Canonical, Debian, SUSE, etc.). SEC.co does not provide exploit code or detailed weaponization guidance. Organizations should test patches in non-production environments before enterprise deployment. The absence of a KEV designation does not indicate absence of real-world exploitation; prioritize patching based on your environment's risk profile and local user exposure. Source: NVD (public-domain), retrieved 2026-07-30. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-46122HIGHLinux b43 Wireless Driver Out-of-Bounds Read Memory Disclosure
- CVE-2026-46163HIGHLinux b43legacy Out-of-Bounds Read in Wireless RX Path
- CVE-2026-52969HIGHLinux KVM Integer Overflow and Guest-to-Host Escape Vulnerability
- CVE-2026-24181HIGHNVIDIA DALI Index Validation Vulnerability
- CVE-2026-32682MEDIUMNGINX Gateway Fabric Control Plane DoS via GRPCRoute
- CVE-2026-45359MEDIUMImageMagick Heap Buffer Over-Read in Connected Components
- CVE-2026-45624MEDIUMImageMagick Out-of-Bounds Read in Polynomial Distortion
- CVE-2026-0270HIGHCortex XSOAR Path Traversal on Linux — Exploit Requirements & Patching Guide