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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 6.5 | 6.6.33 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 6.9.7-1 | — |
| Debian 13 | linux | 6.9.7-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | linux | 6.8.0-44.44 | USN-6999-1 |
| Ubuntu 24.04 LTS | linux-aws | 6.8.0-1015.16 | USN-6999-1 |
| Ubuntu 24.04 LTS | linux-gcp +1 | 6.8.0-1014.16 | USN-7004-1, USN-6999-1 |
| Ubuntu 24.04 LTS | linux-gke | 6.8.0-1010.13 | USN-6999-1 |
| Ubuntu 24.04 LTS | linux-ibm +2 | 6.8.0-1012.12 | USN-6999-1 |
| Ubuntu 24.04 LTS | linux-nvidia | 6.8.0-1013.14 | USN-7005-1 |
| Ubuntu 24.04 LTS | linux-nvidia-lowlatency | 6.8.0-1013.14.1 | USN-7005-1 |
| Ubuntu 24.04 LTS | linux-raspi | 6.8.0-1011.12 | USN-6999-2 |
| Ubuntu 24.04 LTS | linux-riscv +1 | 6.8.0-44.44.1 | USN-6999-1 |
| Ubuntu 22.04 LTS | linux-aws-6.8 | 6.8.0-1015.16~22.04.1 | — |
| Ubuntu 22.04 LTS | linux-gcp-6.8 +1 | 6.8.0-1014.16~22.04.1 | — |
| Ubuntu 22.04 LTS | linux-hwe-6.8 | 6.8.0-45.45~22.04.1 | USN-7029-1 |
| Ubuntu 22.04 LTS | linux-nvidia-6.8 | 6.8.0-1013.14~22.04.1 | USN-7005-2 |
| Ubuntu 22.04 LTS | linux-oracle-6.8 | 6.8.0-1012.12~22.04.1 | — |
| Ubuntu 22.04 LTS | linux-riscv +32 | No fix yet | — |
| Ubuntu 22.04 LTS | linux-riscv-6.8 +1 | 6.8.0-44.44.1~22.04.1 | USN-7008-1 |
| Ubuntu 20.04 LTS | linux-gke +26 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp +13 | No fix yet | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro Realtime 24.04 LTS | linux-raspi-realtime | 6.8.0-2010.10 | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime | 6.8.1-1008.8 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9 | bpftool | 7.4.0-503.11.1.el9_5 | RHSA-2024:9315 |
| RHEL 9 | rv +67 | 5.14.0-503.11.1.el9_5 | RHSA-2024:9315 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP6 | kernel-64kb | 6.4.0-150600.23.14.1 | SUSE-SU-2024:2571-1 |
| SLES 15 SP6 | kernel-azure +1 | 6.4.0-150600.8.8.2 | SUSE-SU-2024:2896-1 |
| SLES 15 SP6 | kernel-default-base | 6.4.0-150600.23.14.2.150600.12.4.3 | SUSE-SU-2024:2571-1 |
| SLES 15 SP6 | kernel-docs +5 | 6.4.0-150600.23.14.2 | SUSE-SU-2024:2571-1 |
| SLES 15 SP6 | kernel-syms-azure | 6.4.0-150600.8.8.1 | SUSE-SU-2024:2896-1 |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLE Micro 6.0 | kernel-default-base | 6.4.0-17.1.1.51 | SUSE-SU-2025:20008-1 |
| SLE Micro 6.0 | kernel-rt +1 | 6.4.0-9.1 | SUSE-SU-2025:20028-1 |
| SLE Micro 6.0 | kernel-source +2 | 6.4.0-18.1 | SUSE-SU-2025:20008-1 |
| SLE Live Patching 15 SP6 | kernel-default | 6.4.0-150600.23.14.2 | SUSE-SU-2024:2571-1 |
| SLE Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_1 | 1-150600.1.5.1 | SUSE-SU-2024:2973-1 |
| SLE Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_2 | 1-150600.13.3.2 | SUSE-SU-2024:2571-1 |
| SUSE Real Time Module 15 SP6 | kernel-rt +3 | 6.4.0-150600.10.5.1 | SUSE-SU-2024:2973-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 15.6 | dtb-aarch64 +1 | 6.4.0-150600.23.14.1 | SUSE-SU-2024:2571-1 |
| openSUSE Leap 15.6 | kernel-azure +1 | 6.4.0-150600.8.8.2 | SUSE-SU-2024:2896-1 |
| openSUSE Leap 15.6 | kernel-default-base | 6.4.0-150600.23.14.2.150600.12.4.3 | SUSE-SU-2024:2571-1 |
| openSUSE Leap 15.6 | kernel-docs +8 | 6.4.0-150600.23.14.2 | SUSE-SU-2024:2571-1 |
| openSUSE Leap 15.6 | kernel-rt +3 | 6.4.0-150600.10.5.1 | SUSE-SU-2024:2973-1 |
| openSUSE Leap 15.6 | kernel-syms-azure | 6.4.0-150600.8.8.1 | SUSE-SU-2024:2896-1 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | kernel | 6.6.35.1-4 | — |
| Azure Linux 2 (CBL-Mariner) | kernel | 5.15.160.1-1 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | bpftool | 7.4.0-503.11.1.el9_5 | ELSA-2024-9315 |
| Oracle Linux 9 | rv +28 | 5.14.0-503.11.1.el9_5 | ELSA-2024-9315 |
Advisories 15
- RHSA-2024:9315 Red Hat Security Advisory: kernel security update Red Hat Security Advisories (RHSA) · Nov 13, 2026
- USN-6999-1 linux, linux-aws, linux-gcp, linux-gke, linux-ibm, linux-lowlatency, linux-oem-6.8, linux-oracle vulnerabilities Ubuntu Security Notices (USN) · Oct 26, 2026
- USN-7029-1 linux-hwe-6.8 Ubuntu Security Notices (USN) · Oct 26, 2026
- USN-7005-1 linux-nvidia, linux-nvidia-lowlatency vulnerabilities Ubuntu Security Notices (USN) · Oct 26, 2026
- USN-7004-1 linux-azure vulnerabilities Ubuntu Security Notices (USN) · Oct 26, 2026
- USN-7005-2 linux-nvidia-6.8 vulnerabilities Ubuntu Security Notices (USN) · Oct 26, 2026
- USN-7008-1 linux-lowlatency-hwe-6.8 vulnerabilities Ubuntu Security Notices (USN) · Oct 26, 2026
- USN-6999-2 linux-raspi vulnerabilities Ubuntu Security Notices (USN) · Oct 26, 2026
- SUSE-SU-2025:20008-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:20028-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- WID-SEC-2024-1443 Linux Kernel: Mehrere Schwachstellen ermöglichen nicht spezifizierten Angriff BSI CERT-Bund (WID) · Feb 15, 2026
- SUSE-SU-2024:2973-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2896-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2571-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · May 2, 2025
- ELSA-2024-9315 Moderate: kernel security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Nov 14, 2024