CVE-2026-99940: gve: fix out-of-bounds read in gve_get_flow_rule_entry()
In the Linux kernel, the following vulnerability has been resolved:
gve: fix out-of-bounds read in gvegetflowruleentry()
gvegetflowruleentry() checks the requested location against the first and last cached rules, but rulescachenum can be 0 while rulescachesynced is true: GVEFLOWRULEQUERYRULES returns the rules from the requested location onwards, so a request past the last installed rule - or any request when no rules are installed - returns zero rules, which the driver accepts and marks as synced.
The next query evaluates rulescache[cachenum - 1] with cachenum == 0. The zero-initialised cache does not trip the earlier comparison, cachenum - 1 wraps to 0xFFFFFFFF in u32, and the read faults about 352 GiB past the cache. ETHTOOLGRXCLSRULE needs no capability, so an unprivileged user can trigger it:
BUG: unable to handle page fault for address: ff240996c4c64fa8 #PF: supervisor read access in kernel mode RIP: gvegetflowruleentry+0xd4/0x110 [gve]
Treat an empty cache as a cache miss and re-query.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the gve driver, treat an empty rules cache as a cache miss and re-query from the requested location.