# CVE-2024-50221: drm/amd/pm: Vangogh: Fix kernel memory out of bounds write

> 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, CNA) `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 17, 2026-11-26)
- **CWE:** CWE-787
- **Published:** 2024-11-09T10:14:32.390Z
- **Modified:** 2026-08-05T11:42:35.779Z

## Who should check

- Anyone running Linux \>= 41cec40bc9baba83d36a0718ea94bfe63189274a, \< f111de0f010308949254ee1cc45df8e6b8e1d7d4; \>= 41cec40bc9baba83d36a0718ea94bfe63189274a, \< f8fd9f0d57af4f8f48b383ec28287af85b47cb9f; \>= 41cec40bc9baba83d36a0718ea94bfe63189274a, \< 4aa923a6e6406b43566ef6ac35a3d9a3197fa3e8
- Anyone running Linux 6.6

## Description

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

drm/amd/pm: Vangogh: Fix kernel memory out of bounds write

KASAN reports that the GPU metrics table allocated in
vangogh\_tables\_init() is not large enough for the memset done in
smu\_cmn\_init\_soft\_gpu\_metrics(). Condensed report follows:

\[   33.861314\] BUG: KASAN: slab-out-of-bounds in smu\_cmn\_init\_soft\_gpu\_metrics+0x73/0x200 \[amdgpu\]
\[   33.861799\] Write of size 168 at addr ffff888129f59500 by task mangoapp/1067
...
\[   33.861808\] CPU: 6 UID: 1000 PID: 1067 Comm: mangoapp Tainted: G        W          6.12.0-rc4 \#356 1a56f59a8b5182eeaf67eb7cb8b13594dd23b544
\[   33.861816\] Tainted: \[W\]=WARN
\[   33.861818\] Hardware name: Valve Galileo/Galileo, BIOS F7G0107 12/01/2023
\[   33.861822\] Call Trace:
\[   33.861826\]  \<TASK\>
\[   33.861829\]  dump\_stack\_lvl+0x66/0x90
\[   33.861838\]  print\_report+0xce/0x620
\[   33.861853\]  kasan\_report+0xda/0x110
\[   33.862794\]  kasan\_check\_range+0xfd/0x1a0
\[   33.862799\]  \_\_asan\_memset+0x23/0x40
\[   33.862803\]  smu\_cmn\_init\_soft\_gpu\_metrics+0x73/0x200 \[amdgpu 13b1bc364ec578808f676eba412c20eaab792779\]
\[   33.863306\]  vangogh\_get\_gpu\_metrics\_v2\_4+0x123/0xad0 \[amdgpu 13b1bc364ec578808f676eba412c20eaab792779\]
\[   33.864257\]  vangogh\_common\_get\_gpu\_metrics+0xb0c/0xbc0 \[amdgpu 13b1bc364ec578808f676eba412c20eaab792779\]
\[   33.865682\]  amdgpu\_dpm\_get\_gpu\_metrics+0xcc/0x110 \[amdgpu 13b1bc364ec578808f676eba412c20eaab792779\]
\[   33.866160\]  amdgpu\_get\_gpu\_metrics+0x154/0x2d0 \[amdgpu 13b1bc364ec578808f676eba412c20eaab792779\]
\[   33.867135\]  dev\_attr\_show+0x43/0xc0
\[   33.867147\]  sysfs\_kf\_seq\_show+0x1f1/0x3b0
\[   33.867155\]  seq\_read\_iter+0x3f8/0x1140
\[   33.867173\]  vfs\_read+0x76c/0xc50
\[   33.867198\]  ksys\_read+0xfb/0x1d0
\[   33.867214\]  do\_syscall\_64+0x90/0x160
...
\[   33.867353\] Allocated by task 378 on cpu 7 at 22.794876s:
\[   33.867358\]  kasan\_save\_stack+0x33/0x50
\[   33.867364\]  kasan\_save\_track+0x17/0x60
\[   33.867367\]  \_\_kasan\_kmalloc+0x87/0x90
\[   33.867371\]  vangogh\_init\_smc\_tables+0x3f9/0x840 \[amdgpu\]
\[   33.867835\]  smu\_sw\_init+0xa32/0x1850 \[amdgpu\]
\[   33.868299\]  amdgpu\_device\_init+0x467b/0x8d90 \[amdgpu\]
\[   33.868733\]  amdgpu\_driver\_load\_kms+0x19/0xf0 \[amdgpu\]
\[   33.869167\]  amdgpu\_pci\_probe+0x2d6/0xcd0 \[amdgpu\]
\[   33.869608\]  local\_pci\_probe+0xda/0x180
\[   33.869614\]  pci\_device\_probe+0x43f/0x6b0

Empirically we can confirm that the former allocates 152 bytes for the
table, while the latter memsets the 168 large block.

Root cause appears that when GPU metrics tables for v2\_4 parts were added
it was not considered to enlarge the table to fit.

The fix in this patch is rather "brute force" and perhaps later should be
done in a smarter way, by extracting and consolidating the part version to
size logic to a common helper, instead of brute forcing the largest
possible allocation. Nevertheless, for now this works and fixes the out of
bounds write.

v2:
 \* Drop impossible v3\_0 case. (Mario)

(cherry picked from commit 0880f58f9609f0200483a49429af0f050d281703)

## Affected and fixed versions

- Linux: \>= 41cec40bc9baba83d36a0718ea94bfe63189274a, \< f111de0f010308949254ee1cc45df8e6b8e1d7d4; \>= 41cec40bc9baba83d36a0718ea94bfe63189274a, \< f8fd9f0d57af4f8f48b383ec28287af85b47cb9f; \>= 41cec40bc9baba83d36a0718ea94bfe63189274a, \< 4aa923a6e6406b43566ef6ac35a3d9a3197fa3e8 (cvelist)
- Linux: 6.6 (cvelist)

## Mitigation

- Upgrade Linux to 4aa923a6e6406b43566ef6ac35a3d9a3197fa3e8 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-50221. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-50221.md
Affected: Linux >= 41cec40bc9baba83d36a0718ea94bfe63189274a, < f111de0f010308949254ee1cc45df8e6b8e1d7d4; >= 41cec40bc9baba83d36a0718ea94bfe63189274a, < f8fd9f0d57af4f8f48b383ec28287af85b47cb9f; >= 41cec40bc9baba83d36a0718ea94bfe63189274a, < 4aa923a6e6406b43566ef6ac35a3d9a3197fa3e8; Linux 6.6
Fixed in: Linux 4aa923a6e6406b43566ef6ac35a3d9a3197fa3e8

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

There is no confirmed exploitation: CVE-2024-50221 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-50221?

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

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

Linux \>= 41cec40bc9baba83d36a0718ea94bfe63189274a, \< f111de0f010308949254ee1cc45df8e6b8e1d7d4; \>= 41cec40bc9baba83d36a0718ea94bfe63189274a, \< f8fd9f0d57af4f8f48b383ec28287af85b47cb9f; \>= 41cec40bc9baba83d36a0718ea94bfe63189274a, \< 4aa923a6e6406b43566ef6ac35a3d9a3197fa3e8; Linux 6.6.

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

Yes. Fixed in Linux 4aa923a6e6406b43566ef6ac35a3d9a3197fa3e8. Upgrade Linux to 4aa923a6e6406b43566ef6ac35a3d9a3197fa3e8 or later.

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

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/f8fd9f0d57af4f8f48b383ec28287af85b47cb9f>
- patch: <https://git.kernel.org/stable/c/4aa923a6e6406b43566ef6ac35a3d9a3197fa3e8>
- other: <https://git.kernel.org/stable/c/f111de0f010308949254ee1cc45df8e6b8e1d7d4>

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

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