CVE-2026-31494
JSON

7.8high

net: macb: use the current queue number for stats

Severity
7.8high CVSS:3.1 by Linux
Exploit likelihood
0.14% (higher than 3% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

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

Product or packageVersionsReported by
Linux Linuxfrom 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd before 9738be665544281aa624842812c2fbfed6f88226, from 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd before 240c5302eed83e34e98db18f6795ee5f40814024, from 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd before 9596759a84e1dbf2670518d85e969208960041f9, from 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd before 95246341945163ad9a250a87ca5bd1c1252777ae, from 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd before 9d74d10e4e26672e139a8bcf8bf95957bf2d160f, from 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd before 7ff87da099210856cbfe2f2f7f52ddfa57af4f0c, from 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd before e182fe273cdf5a8931592228196ef514ffac392b, from 512286bbd4b7d5b15d26ba8078c8bfd1fc1129bd before 72d96e4e24bbefdcfbc68bdb9341a05d8f5cb6e5 and 1 more
Not affected: before 4.16, from 5.10.253 up to 5.10.*, from 5.15.203 up to 5.15.*, from 6.1.168 up to 6.1.*, from 6.6.131 up to 6.6.*, from 6.12.80 up to 6.12.*
CVE List
linux linux_kernelfrom 4.16.1 before 5.10.253, from 5.11 before 5.15.203, from 5.16 before 6.1.168, from 6.2 before 6.6.131, from 6.7 before 6.12.80, from 6.13 before 6.18.21, from 6.19 before 6.19.11, 4.16 and 1 moreNVD

Classification

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: net: macb: usar el número de cola actual para las estadísticas Existe un desajuste potencial entre la memoria reservada para estadísticas y la cantidad de memoria escrita. gem_get_sset_count() calcula correctamente el número de estadísticas basándose en las colas activas, mientras que gem_get_ethtool_stats() copia datos indiscriminadamente usando el número máximo de colas, y en el caso de que el número de colas activas sea menor que MACB_MAX_QUEUES, esto resulta en una escritura OOB como se observó en el splat de KASAN. ================================================================== ERROR: KASAN: vmalloc-fuera-de-límites en gem_get_ethtool_stats+0x54/0x78 [macb] Escritura de tamaño 760 en la dirección ffff80008080b000 por la tarea ethtool/1027 CPU: [...] Tainted: [E]=UNSIGNED_MODULE Nombre del hardware: raspberrypi rpi/rpi, BIOS 2025.10 10/01/2025 Rastro de llamada: 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+0x 1220/0x 38c0 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 La dirección errónea pertenece a una región vmalloc de 1 página que comienza en 0x ffff80008080b000 asignada en dev_ethtool+0x 11f0/0x 38c0 La dirección errónea pertenece a la página física: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x ffff00000a333000 pfn:0x a333 flags: 0x 7fffc000000000(node=0|zone=0|lastcpupid=0x 1ffff) raw: 007fffc000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff00000a333000 0000000000000000 00000001ffffffff 0000000000000000 página volcada porque: kasan: acceso incorrecto detectado Estado de la memoria alrededor de la dirección errónea: 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 ================================================================== Solucionarlo asegurándose de que el tamaño copiado solo considere el número activo de colas.

References

https://git.kernel.org/stable/c/9738be665544281aa624842812c2fbfed6f88226patch
https://git.kernel.org/stable/c/240c5302eed83e34e98db18f6795ee5f40814024patch
https://git.kernel.org/stable/c/9596759a84e1dbf2670518d85e969208960041f9patch
https://git.kernel.org/stable/c/95246341945163ad9a250a87ca5bd1c1252777aepatch
https://git.kernel.org/stable/c/9d74d10e4e26672e139a8bcf8bf95957bf2d160fpatch
https://git.kernel.org/stable/c/7ff87da099210856cbfe2f2f7f52ddfa57af4f0cpatch
https://git.kernel.org/stable/c/e182fe273cdf5a8931592228196ef514ffac392bpatch
https://git.kernel.org/stable/c/72d96e4e24bbefdcfbc68bdb9341a05d8f5cb6e5patch
https://cert-portal.siemens.com/productcert/html/ssa-082556.html
https://cert-portal.siemens.com/productcert/html/ssa-019113.html
https://cert-portal.siemens.com/productcert/html/ssa-457936.html

Sources

SourceRecordLicence
CVE ListCVE-2026-31494 changed 2026-11-10CVE Terms of Use
NVDCVE-2026-31494 changed 2026-11-11Public domain