# CVE-2024-42073: mlxsw: spectrum\_buffers: Fix memory corruptions on Spectrum-4 systems

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.30% (percentile 15, 2026-11-28)
- **CWE:** CWE-416
- **Published:** 2024-07-29T15:52:36.416Z
- **Modified:** 2026-06-17T07:48:45.120Z

## Who should check

- Anyone running Linux \>= f8538aec88b46642553a9ba9efa0952f5958dbed, \< bfa86a96912faa0b6142a918db88cc0c738a769e; \>= f8538aec88b46642553a9ba9efa0952f5958dbed, \< 942901e0fc74ad4b7992ef7ca9336e68d5fd6d36; \>= f8538aec88b46642553a9ba9efa0952f5958dbed, \< bf8781ede7bd9a37c0fcabca78976e61300b5a1a; \>= f8538aec88b46642553a9ba9efa0952f5958dbed, \< c28947de2bed40217cf256c5d0d16880054fcf13
- Anyone running Linux 5.17

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

- Linux: \>= f8538aec88b46642553a9ba9efa0952f5958dbed, \< bfa86a96912faa0b6142a918db88cc0c738a769e; \>= f8538aec88b46642553a9ba9efa0952f5958dbed, \< 942901e0fc74ad4b7992ef7ca9336e68d5fd6d36; \>= f8538aec88b46642553a9ba9efa0952f5958dbed, \< bf8781ede7bd9a37c0fcabca78976e61300b5a1a; \>= f8538aec88b46642553a9ba9efa0952f5958dbed, \< c28947de2bed40217cf256c5d0d16880054fcf13 (cvelist)
- Linux: 5.17 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-42073.md
Affected: Linux >= f8538aec88b46642553a9ba9efa0952f5958dbed, < bfa86a96912faa0b6142a918db88cc0c738a769e; >= f8538aec88b46642553a9ba9efa0952f5958dbed, < 942901e0fc74ad4b7992ef7ca9336e68d5fd6d36; >= f8538aec88b46642553a9ba9efa0952f5958dbed, < bf8781ede7bd9a37c0fcabca78976e61300b5a1a; >= f8538aec88b46642553a9ba…
Fixed in: Linux 942901e0fc74ad4b7992ef7ca9336e68d5fd6d36

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-2024-42073 being exploited?

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

### How serious is CVE-2024-42073?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-42073?

Linux \>= f8538aec88b46642553a9ba9efa0952f5958dbed, \< bfa86a96912faa0b6142a918db88cc0c738a769e; \>= f8538aec88b46642553a9ba9efa0952f5958dbed, \< 942901e0fc74ad4b7992ef7ca9336e68d5fd6d36; \>= f8538aec88b46642553a9ba9efa0952f5958dbed, \< bf8781ede7bd9a37c0fcabca78976e61300b5a1a; \>= f8538aec88b46642553a9ba9efa0952f5958dbed, \< c28947de2bed40217cf256c5d0d16880054fcf13; Linux 5.17.

### Is there a fix for CVE-2024-42073?

Yes. Fixed in Linux 942901e0fc74ad4b7992ef7ca9336e68d5fd6d36. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-42073?

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/bfa86a96912faa0b6142a918db88cc0c738a769e>
- patch: <https://git.kernel.org/stable/c/942901e0fc74ad4b7992ef7ca9336e68d5fd6d36>
- patch: <https://git.kernel.org/stable/c/bf8781ede7bd9a37c0fcabca78976e61300b5a1a>
- patch: <https://git.kernel.org/stable/c/c28947de2bed40217cf256c5d0d16880054fcf13>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.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-2024-42073>

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