# CVE-2026-31494: net: macb: use the current queue number for stats

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.19% (percentile 5, 2026-11-26)
- **CWE:** CWE-787
- **Published:** 2026-04-22T13:54:16.922Z
- **Modified:** 2026-11-11T23:10:00.263Z

## Who should check

- Anyone running Linux \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 9738be665544281aa624842812c2fbfed6f88226; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 240c5302eed83e34e98db18f6795ee5f40814024; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 9596759a84e1dbf2670518d85e969208960041f9; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 95246341945163ad9a250a87ca5bd1c1252777ae; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 9d74d10e4e26672e139a8bcf8bf95957bf2d160f; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 7ff87da099210856cbfe2f2f7f52ddfa57af4f0c; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< e182fe273cdf5a8931592228196ef514ffac392b; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 72d96e4e24bbefdcfbc68bdb9341a05d8f5cb6e5
- Anyone running Linux 4.16

## Description

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 and fixed versions

- Linux: \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 9738be665544281aa624842812c2fbfed6f88226; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 240c5302eed83e34e98db18f6795ee5f40814024; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 9596759a84e1dbf2670518d85e969208960041f9; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 95246341945163ad9a250a87ca5bd1c1252777ae; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 9d74d10e4e26672e139a8bcf8bf95957bf2d160f; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 7ff87da099210856cbfe2f2f7f52ddfa57af4f0c; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< e182fe273cdf5a8931592228196ef514ffac392b; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 72d96e4e24bbefdcfbc68bdb9341a05d8f5cb6e5 (cvelist)
- Linux: 4.16 (cvelist)

## Mitigation

- Upgrade Linux to 72d96e4e24bbefdcfbc68bdb9341a05d8f5cb6e5 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-31494. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31494.md
Affected: Linux >= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, < 9738be665544281aa624842812c2fbfed6f88226; >= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, < 240c5302eed83e34e98db18f6795ee5f40814024; >= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, < 9596759a84e1dbf2670518d85e969208960041f9; >= 512286bbd4b7d5b15d26ba8…
Fixed in: Linux 9738be665544281aa624842812c2fbfed6f88226, Linux 240c5302eed83e34e98db18f6795ee5f40814024, Linux 9596759a84e1dbf2670518d85e969208960041f9, Linux 95246341945163ad9a250a87ca5bd1c1252777ae, Linux 9d74d10e4e26672e139a8bcf8bf95957bf2d160f, Linux 7ff87da099210856cbfe2f2f7f52ddfa57af4f0c, Linux 72d96…

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-31494 being exploited?

There is no confirmed exploitation: CVE-2026-31494 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.19% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-31494?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-31494?

Linux \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 9738be665544281aa624842812c2fbfed6f88226; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 240c5302eed83e34e98db18f6795ee5f40814024; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 9596759a84e1dbf2670518d85e969208960041f9; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 95246341945163ad9a250a87ca5bd1c1252777ae; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 9d74d10e4e26672e139a8bcf8bf95957bf2d160f; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 7ff87da099210856cbfe2f2f7f52ddfa57af4f0c; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< e182fe273cdf5a8931592228196ef514ffac392b; \>= 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd, \< 72d96e4e24bbefdcfbc68bdb9341a05d8f5cb6e5; Linux 4.16.

### Is there a fix for CVE-2026-31494?

Yes. Fixed in Linux 9738be665544281aa624842812c2fbfed6f88226, Linux 240c5302eed83e34e98db18f6795ee5f40814024, Linux 9596759a84e1dbf2670518d85e969208960041f9, Linux 95246341945163ad9a250a87ca5bd1c1252777ae, Linux 9d74d10e4e26672e139a8bcf8bf95957bf2d160f, Linux 7ff87da099210856cbfe2f2f7f52ddfa57af4f0c, Linux 72d96e4e24bbefdcfbc68bdb9341a05d8f5cb6e5. Upgrade Linux to 72d96e4e24bbefdcfbc68bdb9341a05d8f5cb6e5 or later.

### How do I check if I'm affected by CVE-2026-31494?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/9738be665544281aa624842812c2fbfed6f88226>
- patch: <https://git.kernel.org/stable/c/240c5302eed83e34e98db18f6795ee5f40814024>
- patch: <https://git.kernel.org/stable/c/9596759a84e1dbf2670518d85e969208960041f9>
- patch: <https://git.kernel.org/stable/c/95246341945163ad9a250a87ca5bd1c1252777ae>
- patch: <https://git.kernel.org/stable/c/9d74d10e4e26672e139a8bcf8bf95957bf2d160f>
- patch: <https://git.kernel.org/stable/c/7ff87da099210856cbfe2f2f7f52ddfa57af4f0c>
- patch: <https://git.kernel.org/stable/c/e182fe273cdf5a8931592228196ef514ffac392b>
- patch: <https://git.kernel.org/stable/c/72d96e4e24bbefdcfbc68bdb9341a05d8f5cb6e5>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-457936.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-31494>

HTML: <https://flawdb.com/CVE-2026-31494> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-31494>
