KernelScan.io

HIGH Introduced in 6.7

netfilter Byteorder Overflow

CVE-2026-99285

CVSS 7.8 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

01

In the Linux kernel, the following vulnerability has been resolved: netfilter: nft_byteorder: remove multi-register support 64bit byteorder conversion is broken when several registers need to be converted because the source register array advances in steps for 4 bytes instead of 8: for (i = ... src64 = nft_reg_load64(&src[i]); ~~~~~ u32 *src nft_reg_store64(&dst64[i], Remove the multi-register support, it has other issues as well: Pablo points out that commit caf3ef7468f7 ("netfilter: nf_tables: prevent OOB access in nft_byteorder_eval") alters semantics: before the loop operated on registers, i.e. for ( ... ) dst32[i] = htons((u16)src32[i]) .. but after the patch it will operate on bytes, which makes this useless to convert e.g. concatenations, which store each compound in its own register. Multi-convert of u32 has one theoretical application: ct mark . meta mark . tcp dport @intervalset Because ct mark and meta mark are host byte order, use with intervals has to convert the byteorder for ct/meta mark value to network byte order (bigendian). nftables emits this: [ meta load mark => reg 1 ] [ byteorder reg 1 = hton(reg 1, 4, 4) ] [ ct load mark => reg 9 ] [ byteorder reg 9 = hton(reg 9, 4, 4) ] ... I.e. two separate calls. Theoretically it could be changed to do: [ meta load mark => reg 1 ] [ ct load mark => reg 9 ] [ byteorder reg 1 = htonl(reg 1, 4, 8) ] ... But then all it would take to change the set to meta mark . tcp dport . ct mark ... and we'd be back to two "byteorder" calls. IOW, support to convert a range of registers is both dysfunctional and dubious. Simplify this: remove the feature. Pablo Neira Ayuso points out that nftables before 1.1.0 can generate incorrect byteorder conversions, see 9fe58952c45a, "evaluate: skip byteorder conversion for selector smaller than 2 bytes" in nftables.git). Affected rulesets fail to load with this change and old userspace due to 'len != size' check.

02

Engine v0.10.0

Risk summary

A local attacker with CAP_NET_ADMIN (obtainable in a user namespace) can trigger an out-of-bounds write in the nftables byteorder expression handling, leading to kernel memory corruption, privilege escalation, or denial of service. The bug affects kernels 6.7 and later, and stable backports to 4.19+, 5.4+, 5.10+, 5.15+, 6.1+, 6.5+, 6.6+, 6.12+, 6.18+.

Affectednet/netfilter/nft_byteorder.c (netfilter nf_tables)

Vulnerability analysis

The nft_byteorder expression in nf_tables incorrectly handled multi-register 64-bit byteorder conversions. When converting multiple registers, the code advanced the destination pointer by 4-byte increments (u32 array indexing) but wrote 8 bytes per iteration, causing each write to overwrite the next register's data. This heap buffer overflow allows an attacker with CAP_NET_ADMIN — which unprivileged users can obtain inside a user namespace — to corrupt kernel memory by crafting an nftables rule that requests a multi-register byteorder conversion. The fix removes multi-register support entirely, restricting the expression to single-register conversions (size 2, 4, or 8 bytes) and rejecting rules where the length exceeds the size.

03

BranchIntroducedFixed inPatch commit
4.194.19.3074.203c5fb3a6c811
5.105.10.2105.11bb061d3de417
5.155.15.1405.16—
5.45.4.2695.5dc29c0478b85
6.16.1.646.2—
6.126.76.12.115—
6.186.76.18.59—
6.56.5.136.6—
6.66.6.36.7—
mainline6.77.1—

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Affected — no CIP fix yet (latest 6.12.114-cip34)
cip/6.1Affected — no CIP fix yet (latest 6.1.190-cip62)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.272-cip79)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.272-cip79-rt35)
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip136)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip136-rt50)