CVE-2024-27042

Source
https://cve.org/CVERecord?id=CVE-2024-27042
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-27042.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-27042
Downstream
Related
Published
2024-05-01T12:54:07.719Z
Modified
2026-03-14T12:27:44.248643Z
Summary
drm/amdgpu: Fix potential out-of-bounds access in 'amdgpu_discovery_reg_base_init()'
Details

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

drm/amdgpu: Fix potential out-of-bounds access in 'amdgpudiscoveryregbaseinit()'

The issue arises when the array 'adev->vcn.vcnconfig' is accessed before checking if the index 'adev->vcn.numvcn_inst' is within the bounds of the array.

The fix involves moving the bounds check before the array access. This ensures that 'adev->vcn.numvcninst' is within the bounds of the array before it is used as an index.

Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpudiscovery.c:1289 amdgpudiscoveryregbaseinit() error: testing array offset 'adev->vcn.numvcn_inst' after use.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/27xxx/CVE-2024-27042.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
a0ccc717c4ab3ef572f023fdceffb4b6df496a0d
Fixed
8f3e68c6a3fff53c2240762a47a0045d89371775
Fixed
b33d4af102b9c1f7a83d3f0ad3cab7d2bab8f058
Fixed
8db10cee51e3e11a6658742465edc21986cf1e8d
Fixed
cdb637d339572398821204a1142d8d615668f1e9

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-27042.json"