Vulnerability · Published Jul 29, 2024 · Assigned by Linux
CVE-2024-42073mlxsw: spectrum_buffers: Fix memory corruptions on Spectrum-4 systems
Medium 5.5
In plain English
A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 13% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: mlxsw: spectrum_buffers: Fix memory corruptions on Spectrum-4 systems The following two shared buffer operations make use of the Shared Buffer Status Register (SBSR): # devlink sb occupancy snapshot pci/0000:01:00.0 # devlink sb occupancy clearmax pci/0000:01:00.0 The register has two masks of 256 bits to denote on which ingress / egress ports the register should operate on. Spectrum-4 has more than 256 ports, so the register was extended by cited commit with a new 'port_page' field. However, when filling the register's payload, the driver specifies the ports as absolute numbers and not relative to the first port of the port page, resulting in memory corruptions [1]. Fix by specifying the ports relative to the first port of the port page. [1] BUG: KASAN: slab-use-after-free in mlxsw_sp_sb_occ_snapshot+0xb6d/0xbc0 Read of size 1 at addr ffff8881068cb00f by task devlink/1566 [...] Call Trace: <TASK> dump_stack_lvl+0xc6/0x120 print_report+0xce/0x670 kasan_report+0xd7/0x110 mlxsw_sp_sb_occ_snapshot+0xb6d/0xbc0 mlxsw_devlink_sb_occ_snapshot+0x75/0xb0 devlink_nl_sb_occ_snapshot_doit+0x1f9/0x2a0 genl_family_rcv_msg_doit+0x20c/0x300 genl_rcv_msg+0x567/0x800 netlink_rcv_skb+0x170/0x450 genl_rcv+0x2d/0x40 netlink_unicast+0x547/0x830 netlink_sendmsg+0x8d4/0xdb0 __sys_sendto+0x49b/0x510 __x64_sys_sendto+0xe5/0x1c0 do_syscall_64+0xc1/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f [...] Allocated by task 1: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 __kasan_kmalloc+0x8f/0xa0 copy_verifier_state+0xbc2/0xfb0 do_check_common+0x2c51/0xc7e0 bpf_check+0x5107/0x9960 bpf_prog_load+0xf0e/0x2690 __sys_bpf+0x1a61/0x49d0 __x64_sys_bpf+0x7d/0xc0 do_syscall_64+0xc1/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 1: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x60 poison_slab_object+0x109/0x170 __kasan_slab_free+0x14/0x30 kfree+0xca/0x2b0 free_verifier_state+0xce/0x270 do_check_common+0x4828/0xc7e0 bpf_check+0x5107/0x9960 bpf_prog_load+0xf0e/0x2690 __sys_bpf+0x1a61/0x49d0 __x64_sys_bpf+0x7d/0xc0 do_syscall_64+0xc1/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.98-1 | DEBIAN-CVE-2024-42073 |
| Debian:13 | linux | 6.9.8-1 | DEBIAN-CVE-2024-42073 |
| Debian:14 | linux | 6.9.8-1 | DEBIAN-CVE-2024-42073 |
| Ubuntu:24.04:LTS | linux | 6.8.0-48.48 | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1018.20 | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1018.19~22.04.1 | UBUNTU-CVE-2024-42073 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1017.20 | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1017.20~22.04.1 | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1017.19 | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1017.19~22.04.1 | UBUNTU-CVE-2024-42073 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1013.17 | UBUNTU-CVE-2024-42073 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1002.4 | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-48.48~22.04.1 | UBUNTU-CVE-2024-42073 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1015.15 | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-48.48.3 | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-48.48.3~22.04.1 | UBUNTU-CVE-2024-42073 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1017.19 | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1017.19~22.04.1 | UBUNTU-CVE-2024-42073 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1017.19.1 | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1016.16 | UBUNTU-CVE-2024-42073 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1015.16 | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1015.15~22.04.1 | UBUNTU-CVE-2024-42073 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1014.16 | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-48.48.1 | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-48.48.1~22.04.2 | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-42073 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-42073 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | f8538aec88b46642553a9ba9efa0952f5958dbed – before bfa86a96912faa0b6142a918db88cc0c738a769ef8538aec88b46642553a9ba9efa0952f5958dbed – before 942901e0fc74ad4b7992ef7ca9336e68d5fd6d36f8538aec88b46642553a9ba9efa0952f5958dbed – before bf8781ede7bd9a37c0fcabca78976e61300b5a1af8538aec88b46642553a9ba9efa0952f5958dbed – before c28947de2bed40217cf256c5d0d16880054fcf13 |
| Linux | Linux | 5.17 |
References
- https://git.kernel.org/stable/c/bfa86a96912faa0b6142a918db88cc0c738a769e
- https://git.kernel.org/stable/c/942901e0fc74ad4b7992ef7ca9336e68d5fd6d36
- https://git.kernel.org/stable/c/bf8781ede7bd9a37c0fcabca78976e61300b5a1a
- https://git.kernel.org/stable/c/c28947de2bed40217cf256c5d0d16880054fcf13
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html