# CVE-2024-56613: sched/numa: fix memory leak due to the overwritten vma-\>numab\_state

> 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, CNA) `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.29% (percentile 15, 2026-11-28)
- **CWE:** CWE-401
- **Published:** 2024-12-27T14:51:18.068Z
- **Modified:** 2026-06-17T08:12:33.003Z

## Who should check

- Anyone running Linux \>= ef6a22b70f6d90449a5c797b8968a682824e2011, \< 8f149bcc4d91ac92b32ff4949b291e6ed883dc42; \>= ef6a22b70f6d90449a5c797b8968a682824e2011, \< a71ddd5b87cda687efa28e049e85e923689bcef9; \>= ef6a22b70f6d90449a5c797b8968a682824e2011, \< 5f1b64e9a9b7ee9cfd32c6b2fab796e29bfed075
- Anyone running Linux 6.4

## Description

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

sched/numa: fix memory leak due to the overwritten vma-\>numab\_state

\[Problem Description\]
When running the hackbench program of LTP, the following memory leak is
reported by kmemleak.

  \# /opt/ltp/testcases/bin/hackbench 20 thread 1000
  Running with 20\*40 (== 800) tasks.

  \# dmesg \| grep kmemleak
  ...
  kmemleak: 480 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
  kmemleak: 665 new suspected memory leaks (see /sys/kernel/debug/kmemleak)

  \# cat /sys/kernel/debug/kmemleak
  unreferenced object 0xffff888cd8ca2c40 (size 64):
    comm "hackbench", pid 17142, jiffies 4299780315
    hex dump (first 32 bytes):
      ac 74 49 00 01 00 00 00 4c 84 49 00 01 00 00 00  .tI.....L.I.....
      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    backtrace (crc bff18fd4):
      \[\<ffffffff81419a89\>\] \_\_kmalloc\_cache\_noprof+0x2f9/0x3f0
      \[\<ffffffff8113f715\>\] task\_numa\_work+0x725/0xa00
      \[\<ffffffff8110f878\>\] task\_work\_run+0x58/0x90
      \[\<ffffffff81ddd9f8\>\] syscall\_exit\_to\_user\_mode+0x1c8/0x1e0
      \[\<ffffffff81dd78d5\>\] do\_syscall\_64+0x85/0x150
      \[\<ffffffff81e0012b\>\] entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e
  ...

This issue can be consistently reproduced on three different servers:
  \* a 448-core server
  \* a 256-core server
  \* a 192-core server

\[Root Cause\]
Since multiple threads are created by the hackbench program (along with
the command argument 'thread'), a shared vma might be accessed by two or
more cores simultaneously. When two or more cores observe that
vma-\>numab\_state is NULL at the same time, vma-\>numab\_state will be
overwritten.

Although current code ensures that only one thread scans the VMAs in a
single 'numa\_scan\_period', there might be a chance for another thread
to enter in the next 'numa\_scan\_period' while we have not gotten till
numab\_state allocation \[1\].

Note that the command \`/opt/ltp/testcases/bin/hackbench 50 process 1000\`
cannot the reproduce the issue. It is verified with 200+ test runs.

\[Solution\]
Use the cmpxchg atomic operation to ensure that only one thread executes
the vma-\>numab\_state assignment.

\[1\] https://lore.kernel.org/lkml/1794be3c-358c-4cdc-a43d-a1f841d91ef7@amd.com/

## Affected and fixed versions

- Linux: \>= ef6a22b70f6d90449a5c797b8968a682824e2011, \< 8f149bcc4d91ac92b32ff4949b291e6ed883dc42; \>= ef6a22b70f6d90449a5c797b8968a682824e2011, \< a71ddd5b87cda687efa28e049e85e923689bcef9; \>= ef6a22b70f6d90449a5c797b8968a682824e2011, \< 5f1b64e9a9b7ee9cfd32c6b2fab796e29bfed075 (cvelist)
- Linux: 6.4 (cvelist)

## Mitigation

- Upgrade Linux to 5f1b64e9a9b7ee9cfd32c6b2fab796e29bfed075 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-56613.md
Affected: Linux >= ef6a22b70f6d90449a5c797b8968a682824e2011, < 8f149bcc4d91ac92b32ff4949b291e6ed883dc42; >= ef6a22b70f6d90449a5c797b8968a682824e2011, < a71ddd5b87cda687efa28e049e85e923689bcef9; >= ef6a22b70f6d90449a5c797b8968a682824e2011, < 5f1b64e9a9b7ee9cfd32c6b2fab796e29bfed075; Linux 6.4
Fixed in: Linux 8f149bcc4d91ac92b32ff4949b291e6ed883dc42, Linux 5f1b64e9a9b7ee9cfd32c6b2fab796e29bfed075

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

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

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

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

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

Linux \>= ef6a22b70f6d90449a5c797b8968a682824e2011, \< 8f149bcc4d91ac92b32ff4949b291e6ed883dc42; \>= ef6a22b70f6d90449a5c797b8968a682824e2011, \< a71ddd5b87cda687efa28e049e85e923689bcef9; \>= ef6a22b70f6d90449a5c797b8968a682824e2011, \< 5f1b64e9a9b7ee9cfd32c6b2fab796e29bfed075; Linux 6.4.

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

Yes. Fixed in Linux 8f149bcc4d91ac92b32ff4949b291e6ed883dc42, Linux 5f1b64e9a9b7ee9cfd32c6b2fab796e29bfed075. Upgrade Linux to 5f1b64e9a9b7ee9cfd32c6b2fab796e29bfed075 or later.

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

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/8f149bcc4d91ac92b32ff4949b291e6ed883dc42>
- patch: <https://git.kernel.org/stable/c/a71ddd5b87cda687efa28e049e85e923689bcef9>
- patch: <https://git.kernel.org/stable/c/5f1b64e9a9b7ee9cfd32c6b2fab796e29bfed075>

## 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-56613>

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