CVE-2026-31494
High · 7.8CVSS
7.8
EPSS
0.1%
Published
Apr 22, 2026
CISA due date
—
Cloudanix analysis
A local user on certain Linux systems can trigger a network-driver bug that may crash the device or potentially gain higher privileges.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Privilege Gain
- Component
- OS kernel
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
This is a local Linux kernel memory-corruption vulnerability in the macb/GEM Ethernet driver statistics path. The driver calculates the amount of memory needed for ethtool statistics using the number of active transmit/receive queues, but the statistics copy routine can write data as if the maximum queue count were active. On systems where the active queue count is lower than MACB_MAX_QUEUES, a local user able to trigger ethtool statistics collection for an affected interface can cause an out-of-bounds write in kernel vmalloc memory. The immediate observable result is typically a kernel warning, KASAN report, oops, or crash; depending on allocator layout and exploitability on a given build, the primitive may also create a path toward local privilege escalation or kernel memory corruption.
Why it matters to the business
Affected Linux systems using the macb/GEM Ethernet driver may be destabilized by a local user or compromised low-privilege account, potentially causing network disruption, host crashes, or escalation from an initial foothold to deeper control of the system. The vulnerability has a high CVSS score but currently has low EPSS, no known public exploit maturity, and is not listed in CISA KEV, so remediation should be prioritized for exposed multi-user systems, embedded Linux devices, appliances, and environments where untrusted users or workloads can execute local commands.
How an attack unfolds
An attacker first needs local code execution or shell access on a Linux system using the affected macb/GEM Ethernet driver. They identify an affected network interface backed by the macb driver and invoke the ethtool statistics path, commonly by requesting interface statistics. The kernel allocates a statistics buffer sized for the active queue count, but the vulnerable driver routine copies statistics for the maximum possible queue count. If the active queue count is lower than the maximum, the copy overruns the allocated vmalloc buffer and corrupts adjacent kernel memory. In many cases this will manifest as a kernel KASAN report, oops, or system crash. With additional kernel-specific exploitation work, the corrupted memory could potentially be shaped to alter kernel control data and gain elevated privileges, although no mature exploit is currently reported.
How to fix it
Upgrade to a Linux kernel or vendor kernel package that includes the upstream fix for the macb driver change described as "net: macb: use the current queue number for stats." Because no fixed package versions were provided, use the relevant Linux distribution, hardware vendor, appliance vendor, or kernel-stable advisory to identify the first fixed build for each maintained branch. Prioritize systems that load the macb module/driver and support local users, SSH access, container workloads, or operational users who can run diagnostic commands. If immediate patching is not possible, reduce exposure by limiting local shell access, restricting who can execute network diagnostic tooling, monitoring and controlling CAP_NET_ADMIN delegation, disabling unnecessary access to affected interfaces where operationally feasible, and applying vendor-recommended mitigations. Rebuilding or replacing the kernel module with the corrected driver logic is required to fully remediate the memory corruption.
How to confirm the fix worked
Confirm remediation by verifying the running kernel package or appliance firmware includes the macb driver fix, not merely that source packages are available. On source-based or custom kernels, inspect the macb ethtool statistics implementation and confirm gem_get_ethtool_stats() copies statistics based on the current active queue count rather than MACB_MAX_QUEUES. Confirm whether affected hardware is present by checking loaded drivers and interface driver information with tools such as ethtool -i. After patching, safely test ethtool statistics retrieval for macb-backed interfaces in a maintenance window and confirm there are no kernel oops, KASAN, or vmalloc out-of-bounds messages in dmesg, journalctl -k, or system kernel logs. For production fleets, validate through configuration management that all affected kernel packages or firmware images have been updated and that systems have rebooted into the fixed kernel.
Typical attack path
- Obtain local access to a Linux system, container host, appliance, or embedded device using the affected macb/GEM Ethernet driver.
- Enumerate network interfaces and confirm one is backed by the macb driver.
- Trigger the ethtool statistics ioctl path, for example by requesting interface statistics.
- Cause gem_get_ethtool_stats() to copy statistics for more queues than were used to size the destination buffer.
- Overwrite memory beyond the allocated vmalloc statistics buffer.
- Use the condition to crash the host or, if exploit development is successful for the target kernel build, attempt local privilege escalation through kernel memory corruption.
How to detect it
Look for evidence that the vulnerable ethtool statistics path was triggered before remediation. Useful sources include kernel logs from dmesg, journalctl -k, /var/log/kern.log, /var/log/messages, crash dumps, pstore/ramoops records on embedded devices, auditd logs, EDR process telemetry, and shell history where available. Search for KASAN or kernel oops records referencing gem_get_ethtool_stats, macb, dev_ethtool, vmalloc-out-of-bounds, or ethtool. In audit logs, look for execution of ethtool with statistics options against interfaces backed by the macb driver, especially repeated invocations or activity by unexpected users. Absence of KASAN output does not prove non-exploitation because most production kernels are not KASAN-instrumented; therefore also investigate unexplained host reboots, watchdog resets, kernel panics, or network-driver crashes on affected systems. If threat hunting on systems with command telemetry, correlate ethtool statistics collection with subsequent kernel instability, privilege changes, suspicious child processes, or new persistence artifacts.
- KASAN: vmalloc-out-of-bounds in gem_get_ethtool_stats
- gem_get_ethtool_stats+0x
- dev_ethtool+0x
- BUG: KASAN: vmalloc-out-of-bounds
- Write of size 760
- task ethtool
- [macb]
- macb
- ethtool -S
- SIOCETHTOOL
- vmalloc-out-of-bounds
- kasan_report
- __asan_memcpy
- sock_ioctl
- __arm64_sys_ioctl
What your security team should do
- Inventory Linux systems and embedded/appliance devices that use the macb/GEM Ethernet driver, especially ARM and SoC-based platforms.
- Prioritize patching multi-user systems, remotely administered appliances, container hosts, and systems where untrusted users or workloads may execute local commands.
- Track vendor advisories for the exact fixed kernel or firmware version and ensure systems reboot into the corrected kernel after installation.
- Temporarily restrict local access and administrative diagnostic capabilities such as ethtool usage where feasible until patching is complete.
- Review audit and shell telemetry for unusual or repeated ethtool statistics collection against macb-backed interfaces.
- Monitor kernel logs for KASAN, oops, vmalloc-out-of-bounds, and gem_get_ethtool_stats messages that may indicate attempted triggering or accidental exposure.
- Treat unexplained kernel crashes on affected devices as potentially security-relevant until logs and crash dumps are reviewed.
- For custom kernels, backport the upstream driver patch and perform regression testing for ethtool statistics on all macb-backed interfaces.
The record
In the Linux kernel, the following vulnerability has been resolved: net: macb: use the current queue number for stats There's a potential mismatch between the memory reserved for statistics and the amount of memory written. gem_get_sset_count() correctly computes the number of stats based on the active queues, whereas gem_get_ethtool_stats() indiscriminately copies data using the maximum number of queues, and in the case the number of active queues is less than MACB_MAX_QUEUES, this results in a OOB write as observed in the KASAN splat. ================================================================== BUG: KASAN: vmalloc-out-of-bounds in gem_get_ethtool_stats+0x54/0x78 [macb] Write of size 760 at addr ffff80008080b000 by task ethtool/1027 CPU: [...] Tainted: [E]=UNSIGNED_MODULE Hardware name: raspberrypi rpi/rpi, BIOS 2025.10 10/01/2025 Call trace: show_stack+0x20/0x38 (C) dump_stack_lvl+0x80/0xf8 print_report+0x384/0x5e0 kasan_report+0xa0/0xf0 kasan_check_range+0xe8/0x190 __asan_memcpy+0x54/0x98 gem_get_ethtool_stats+0x54/0x78 [macb 926c13f3af83b0c6fe64badb21ec87d5e93fcf65] dev_ethtool+0x1220/0x38c0 dev_ioctl+0x4ac/0xca8 sock_do_ioctl+0x170/0x1d8 sock_ioctl+0x484/0x5d8 __arm64_sys_ioctl+0x12c/0x1b8 invoke_syscall+0xd4/0x258 el0_svc_common.constprop.0+0xb4/0x240 do_el0_svc+0x48/0x68 el0_svc+0x40/0xf8 el0t_64_sync_handler+0xa0/0xe8 el0t_64_sync+0x1b0/0x1b8 The buggy address belongs to a 1-page vmalloc region starting at 0xffff80008080b000 allocated at dev_ethtool+0x11f0/0x38c0 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff00000a333000 pfn:0xa333 flags: 0x7fffc000000000(node=0|zone=0|lastcpupid=0x1ffff) raw: 007fffc000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff00000a333000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff80008080b080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff80008080b100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff80008080b180: 00 00 00 00 00 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ^ ffff80008080b200: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffff80008080b280: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ================================================================== Fix it by making sure the copied size only considers the active number of queues.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-78402 Stack-based buffer overflow and out-of-bounds write vulnerability in Thales Sentinel Keys… CWE-787
- CVE-2026-119777 A flaw was found in GStreamer's gst-plugins-bad H.266/VVC parser. CWE-787
- CVE-2026-104065 Scribus before 1.6.7 contains an out-of-bounds write vulnerability in the importdrw… CWE-787
- CVE-2026-104067 Scribus before 1.6.7 contains an out-of-bounds memory access vulnerability in the… CWE-787
- CVE-2026-104066 Scribus before 1.6.7 contains a heap buffer overflow vulnerability in the Mac PICT image… CWE-787
- CVE-2026-104061 Scribus before 1.6.7 contains a heap out-of-bounds write vulnerability in the… CWE-787
- CVE-2026-104062 Scribus before 1.6.7 contains a heap buffer overflow vulnerability in the PICT image… CWE-787
- CVE-2026-61627 libass is a portable subtitle renderer for the `ASS`/SSA (Advanced Substation… CWE-787