# CVE-2024-57917: topology: Keep the cpumask unchanged when printing cpumap

> 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, NVD) `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.32% (percentile 18, 2026-11-26)
- **Published:** 2025-01-19T11:52:37.866Z
- **Modified:** 2026-11-10T13:17:27.653Z

## Who should check

- Anyone running Linux \>= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, \< 1c7818e2746e747838a3de1687e89eac7b947f08; \>= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, \< ca47e933a900492d89dcf5db18a99c28bd4a742d; \>= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, \< b02cf1d27e460ab2b3e1c8c9ce472d562cad2e8d; \>= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, \< 360596e7fe319a5db1b5fb34a3952862ae53c924; \>= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, \< cbd399f78e23ad4492c174fc5e6b3676dba74a52
- Anyone running Linux 5.15

## Description

In the Linux kernel, the following vulnerability has been resolved:

topology: Keep the cpumask unchanged when printing cpumap

During fuzz testing, the following warning was discovered:

 different return values (15 and 11) from vsnprintf("%\*pbl
 ", ...)

 test:keyward is WARNING in kvasprintf
 WARNING: CPU: 55 PID: 1168477 at lib/kasprintf.c:30 kvasprintf+0x121/0x130
 Call Trace:
  kvasprintf+0x121/0x130
  kasprintf+0xa6/0xe0
  bitmap\_print\_to\_buf+0x89/0x100
  core\_siblings\_list\_read+0x7e/0xb0
  kernfs\_file\_read\_iter+0x15b/0x270
  new\_sync\_read+0x153/0x260
  vfs\_read+0x215/0x290
  ksys\_read+0xb9/0x160
  do\_syscall\_64+0x56/0x100
  entry\_SYSCALL\_64\_after\_hwframe+0x78/0xe2

The call trace shows that kvasprintf() reported this warning during the
printing of core\_siblings\_list. kvasprintf() has several steps:

 (1) First, calculate the length of the resulting formatted string.

 (2) Allocate a buffer based on the returned length.

 (3) Then, perform the actual string formatting.

 (4) Check whether the lengths of the formatted strings returned in
     steps (1) and (2) are consistent.

If the core\_cpumask is modified between steps (1) and (3), the lengths
obtained in these two steps may not match. Indeed our test includes cpu
hotplugging, which should modify core\_cpumask while printing.

To fix this issue, cache the cpumask into a temporary variable before
calling cpumap\_print\_{list, cpumask}\_to\_buf(), to keep it unchanged
during the printing process.

## Affected and fixed versions

- Linux: \>= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, \< 1c7818e2746e747838a3de1687e89eac7b947f08; \>= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, \< ca47e933a900492d89dcf5db18a99c28bd4a742d; \>= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, \< b02cf1d27e460ab2b3e1c8c9ce472d562cad2e8d; \>= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, \< 360596e7fe319a5db1b5fb34a3952862ae53c924; \>= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, \< cbd399f78e23ad4492c174fc5e6b3676dba74a52 (cvelist)
- Linux: 5.15 (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-57917. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-57917.md
Affected: Linux >= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, < 1c7818e2746e747838a3de1687e89eac7b947f08; >= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, < ca47e933a900492d89dcf5db18a99c28bd4a742d; >= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, < b02cf1d27e460ab2b3e1c8c9ce472d562cad2e8d; >= bb9ec13d156e85dfd6a8afd…
Fixed in: Linux 1c7818e2746e747838a3de1687e89eac7b947f08, Linux 360596e7fe319a5db1b5fb34a3952862ae53c924

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-57917 being exploited?

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

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

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

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

Linux \>= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, \< 1c7818e2746e747838a3de1687e89eac7b947f08; \>= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, \< ca47e933a900492d89dcf5db18a99c28bd4a742d; \>= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, \< b02cf1d27e460ab2b3e1c8c9ce472d562cad2e8d; \>= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, \< 360596e7fe319a5db1b5fb34a3952862ae53c924; \>= bb9ec13d156e85dfd6a8afd0bb61ccf5736ed257, \< cbd399f78e23ad4492c174fc5e6b3676dba74a52; Linux 5.15.

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

Yes. Fixed in Linux 1c7818e2746e747838a3de1687e89eac7b947f08, Linux 360596e7fe319a5db1b5fb34a3952862ae53c924. No fix listed yet: follow the vendor advisory.

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

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/1c7818e2746e747838a3de1687e89eac7b947f08>
- patch: <https://git.kernel.org/stable/c/ca47e933a900492d89dcf5db18a99c28bd4a742d>
- patch: <https://git.kernel.org/stable/c/b02cf1d27e460ab2b3e1c8c9ce472d562cad2e8d>
- patch: <https://git.kernel.org/stable/c/360596e7fe319a5db1b5fb34a3952862ae53c924>
- patch: <https://git.kernel.org/stable/c/cbd399f78e23ad4492c174fc5e6b3676dba74a52>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00001.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-2024-57917>

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