7.8 High
CVSS3
Attack Vector
LOCAL
Attack Complexity
LOW
Privileges Required
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
7.7 High
AI Score
Confidence
High
0.0004 Low
EPSS
Percentile
5.1%
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);
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OS | Version | Architecture | Package | Version | Filename |
---|---|---|---|---|---|
ubuntu | 18.04 | noarch | linux | <Β any | UNKNOWN |
ubuntu | 20.04 | noarch | linux | <Β any | UNKNOWN |
ubuntu | 22.04 | noarch | linux | <Β any | UNKNOWN |
ubuntu | 23.10 | noarch | linux | <Β any | UNKNOWN |
ubuntu | 24.04 | noarch | linux | <Β any | UNKNOWN |
ubuntu | 14.04 | noarch | linux | <Β any | UNKNOWN |
ubuntu | 16.04 | noarch | linux | <Β any | UNKNOWN |
ubuntu | 18.04 | noarch | linux-aws | <Β any | UNKNOWN |
ubuntu | 20.04 | noarch | linux-aws | <Β any | UNKNOWN |
ubuntu | 22.04 | noarch | linux-aws | <Β any | UNKNOWN |
git.kernel.org/linus/acce6479e30f73ab0872e93a75aed1fb791d04ec (6.10-rc1)
git.kernel.org/stable/c/19bd9537b6bc1c882df25206c15917214d8e9460
git.kernel.org/stable/c/acce6479e30f73ab0872e93a75aed1fb791d04ec
git.kernel.org/stable/c/f1b6a016dfa45cedc080d36fa5d6f22237d80e8b
launchpad.net/bugs/cve/CVE-2024-39291
nvd.nist.gov/vuln/detail/CVE-2024-39291
security-tracker.debian.org/tracker/CVE-2024-39291
www.cve.org/CVERecord?id=CVE-2024-39291
7.8 High
CVSS3
Attack Vector
LOCAL
Attack Complexity
LOW
Privileges Required
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
7.7 High
AI Score
Confidence
High
0.0004 Low
EPSS
Percentile
5.1%