HIGH Introduced in 5.11
cls_flower TunnelOpt OOB Read
CVE-2026-99112
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
KernelScan AI7.2HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: net/sched: cls_flower: validate mask pointer after nla_next() fl_set_enc_opt() iterates the key's nested tunnel-option attributes with nla_for_each_attr() while advancing a single mask pointer via nla_next() at the bottom of each loop, so the mask cursor is driven by the number of key attributes rather than by the mask's own attributes. The nla_ok() added by commit c96adff956191 ("cls_flower: call nla_ok() before nla_next()") only validates the mask pointer that was just consumed; the pointer produced by nla_next() is used by the next iteration (fl_set_geneve_opt() and siblings) without any validation. The mask's nested attributes are validated with NL_VALIDATE_LIBERAL, which merely warns on trailing bytes that do not form a complete attribute. A mask carrying one valid attribute plus 1-3 residue bytes (or a non-aligned attribute length making msk_depth negative) therefore reaches the next iteration with msk_depth != 0, so neither the !msk_depth check in fl_set_enc_opt() nor the !depth check in the per-type helpers fires. nla_type() then reads past the mask payload and nla_parse_nested_deprecated() iterates with an nla_len taken from those bytes, reading well beyond the mask attribute (KASAN: slab-out-of-bounds read in __nla_validate_parse from fl_change()). Validate the advanced mask pointer as well: when the mask is not legitimately exhausted (msk_depth != 0) and the new pointer fails nla_ok(), reject the filter with -EINVAL. An exactly exhausted mask still skips the check, preserving exact-match behaviour for the remaining key attributes.
02KernelScan AI Analysis
Risk summary
A local attacker with CAP_NET_ADMIN (obtainable in a user namespace) can craft a malformed netlink message to configure a tc flower filter with tunnel options, triggering an out-of-bounds read in the kernel's netlink attribute parser. This can leak kernel heap memory and potentially crash the kernel, enabling privilege escalation or denial of service on any system where unprivileged users can create network namespaces and load tc flower filters.
Vulnerability analysis
The tunnel-option parser in the tc flower classifier advances a mask pointer based on the number of key attributes rather than the mask's own attributes. A malformed mask with one valid entry followed by leftover bytes (or a misaligned length) causes the pointer to land past the valid data with a non-zero remaining count. On the next iteration, the parser treats those leftover bytes as an attribute header and reads far beyond the mask buffer. The fix validates the advanced mask pointer whenever the mask is not genuinely exhausted, rejecting the malformed filter. A local attacker with CAP_NET_ADMIN — including an unprivileged user in a user namespace — can trigger this by creating or modifying a flower filter with tunnel options such as geneve or erspan via rtnetlink.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 5.10.11 | 5.10.273 | a9283d006eef |
| 5.15 | 5.11 | 5.15.224 | 497944d534ff |
| 6.1 | 5.11 | 6.1.191 | a55d84907337 |
| 6.12 | 5.11 | 6.12.115 | 35354bf67aa0 |
| 6.18 | 5.11 | 6.18.59 | 45e60747a9db |
| 6.6 | 5.11 | 6.6.161 | cff9bf34afde |
| 7.2 | 5.11 | 7.2.13 | bb187146c7e5 |
| mainline | 5.11 | 7.3 | fee10655709c |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Affected — no CIP fix yet (latest 6.12.114-cip34) |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.272-cip79) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.272-cip79-rt35) |