Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2024-39291

HIGH 7.8EPSS 21%

drm/amdgpu: Fix buffer size in gfx_v9_4_3_init_ cp_compute_microcode() and rlc_microcode()

Mitigation

  • No fix listed yet: follow the vendor advisory.

Who should check

  • Anyone running Linux >= 86301129698be52f8398f92ea8564168f6bfcae1, < 19bd9537b6bc1c882df25206c15917214d8e9460; >= 86301129698be52f8398f92ea8564168f6bfcae1, < f1b6a016dfa45cedc080d36fa5d6f22237d80e8b; >= 86301129698be52f8398f92ea8564168f6bfcae1, < acce6479e30f73ab0872e93a75aed1fb791d04ec
  • Anyone running Linux 6.5

Vulnerability facts

Affected
Linux >= 86301129698be52f8398f92ea8564168f6bfcae1, < 19bd9537b6bc1c882df25206c15917214d8e9460; >= 86301129698be52f8398f92ea8564168f6bfcae1, < f1b6a016dfa45cedc080d36fa5d6f22237d80e8b; >= 86301129698be52f8398f92ea8564168f6bfcae1, < acce6479e30f73ab0872e93a75aed1fb791d04ec; Linux 6.5
Fixed in
Linux 19bd9537b6bc1c882df25206c15917214d8e9460
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
7.8 (v3.1, NVD)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 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
EPSS
0.35% chance of exploitation in 30 days (percentile 21, 2026-11-26)
CWE
CWE-120
Published
Modified

Description

In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: Fix buffer size in gfx_v9_4_3_init_ cp_compute_microcode() and rlc_microcode() The function gfx_v9_4_3_init_microcode in gfx_v9_4_3.c was generating about potential truncation of output when using the snprintf function. The issue was due to the size of the buffer 'ucode_prefix' being too small to accommodate the maximum possible length of the string being written into it. The string being written is "amdgpu/%s_mec.bin" or "amdgpu/%s_rlc.bin", where %s is replaced by the value of 'chip_name'. The length of this string without the %s is 16 characters. The warning message indicated that 'chip_name' could be up to 29 characters long, resulting in a total of 45 characters, which exceeds the buffer size of 30 characters. To resolve this issue, the size of the 'ucode_prefix' buffer has been reduced from 30 to 15. This ensures that the maximum possible length of the string being written into the buffer will not exceed its size, thus preventing potential buffer overflow and truncation issues. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c: In function ‘gfx_v9_4_3_early_init’: drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c:379:52: warning: ‘%s’ directive output may be truncated writing up to 29 bytes into a region of size 23 [-Wformat-truncation=] 379 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin", chip_name); | ^~ ...... 439 | r = gfx_v9_4_3_init_rlc_microcode(adev, ucode_prefix); | ~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c:379:9: note: ‘snprintf’ output between 16 and 45 bytes into a destination of size 30 379 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin", chip_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c:413:52: warning: ‘%s’ directive output may be truncated writing up to 29 bytes into a region of size 23 [-Wformat-truncation=] 413 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mec.bin", chip_name); | ^~ ...... 443 | r = gfx_v9_4_3_init_cp_compute_microcode(adev, ucode_prefix); | ~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c:413:9: note: ‘snprintf’ output between 16 and 45 bytes into a destination of size 30 413 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mec.bin", chip_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Affected and fixed versions

Package / productAffectedFixedSource
Linux>= 86301129698be52f8398f92ea8564168f6bfcae1, < 19bd9537b6bc1c882df25206c15917214d8e9460; >= 86301129698be52f8398f92ea8564168f6bfcae1, < f1b6a016dfa45cedc080d36fa5d6f22237d80e8b; >= 86301129698be52f8398f92ea8564168f6bfcae1, < acce6479e30f73ab0872e93a75aed1fb791d04ec—cvelist
Linux6.5—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

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

Details: https://flawdb.com/CVE-2024-39291.md
Affected: Linux >= 86301129698be52f8398f92ea8564168f6bfcae1, < 19bd9537b6bc1c882df25206c15917214d8e9460; >= 86301129698be52f8398f92ea8564168f6bfcae1, < f1b6a016dfa45cedc080d36fa5d6f22237d80e8b; >= 86301129698be52f8398f92ea8564168f6bfcae1, < acce6479e30f73ab0872e93a75aed1fb791d04ec; Linux 6.5
Fixed in: Linux 19bd9537b6bc1c882df25206c15917214d8e9460

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.

References

FAQ

Is CVE-2024-39291 being exploited?

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

How serious is CVE-2024-39291?

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

Which versions are affected by CVE-2024-39291?

Linux >= 86301129698be52f8398f92ea8564168f6bfcae1, < 19bd9537b6bc1c882df25206c15917214d8e9460; >= 86301129698be52f8398f92ea8564168f6bfcae1, < f1b6a016dfa45cedc080d36fa5d6f22237d80e8b; >= 86301129698be52f8398f92ea8564168f6bfcae1, < acce6479e30f73ab0872e93a75aed1fb791d04ec; Linux 6.5.

Is there a fix for CVE-2024-39291?

Yes. Fixed in Linux 19bd9537b6bc1c882df25206c15917214d8e9460. No fix listed yet: follow the vendor advisory.

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

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.

Sponsors