HIGH Introduced in 6.15
fbnic RingSize Corruption
CVE-2026-98585
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: eth: fbnic: Avoid rounding zero ring sizes roundup_pow_of_two() is undefined for zero. ethtool permits a zero ring size to reach the driver, where the minimum-size check should reject it. Leave zero unchanged while rounding nonzero ring sizes. The minimum-size check then rejects zero deterministically without changing the established behavior for other values.
02KernelScan AI Analysis
Risk summary
A local attacker with CAP_NET_ADMIN (obtainable in a user namespace) can trigger undefined behavior in the fbnic Ethernet driver by setting a ring size to zero via ethtool. This can lead to kernel memory corruption, privilege escalation, or denial of service. The vulnerability affects systems using the Facebook NIC (fbnic) driver.
Vulnerability analysis
The fbnic driver's ethtool interface allows a zero value for ring sizes to be passed from userspace. The driver then calls roundup_pow_of_two() on this value, which has undefined behavior for zero input — on some architectures it returns a very large power of two, bypassing the intended minimum-size check and causing the driver to attempt allocating excessively large ring buffers. This undefined behavior can result in memory corruption, allocation failures, or kernel crashes. The fix introduces a helper that preserves zero unchanged so the existing minimum-size validation rejects it cleanly. The bug is reachable by any local user who can create a user namespace (granting CAP_NET_ADMIN) and issue an ethtool -G command, making it exploitable from containers and unprivileged accounts.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.18 | 6.15 | 6.18.55 | 92c9f2ea634d |
| 7.2 | 6.15 | 7.2.9 | 491aa3167ae0 |
| mainline | 6.15 | 7.3 | 0160953d8eec |