{"id":"CVE-2024-27042","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:\n\ndrm/amdgpu: Fix potential out-of-bounds access in 'amdgpu_discovery_reg_base_init()'\n\nThe issue arises when the array 'adev-\u003evcn.vcn_config' is accessed\nbefore checking if the index 'adev-\u003evcn.num_vcn_inst' is within the\nbounds of the array.\n\nThe fix involves moving the bounds check before the array access. This\nensures that 'adev-\u003evcn.num_vcn_inst' is within the bounds of the array\nbefore it is used as an index.\n\nFixes the below:\ndrivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:1289 amdgpu_discovery_reg_base_init() error: testing array offset 'adev-\u003evcn.num_vcn_inst' after use.","modified":"2026-03-20T12:35:22.504885Z","published":"2024-05-01T12:54:07.719Z","related":["ALSA-2024:7000","ALSA-2024:7001","SUSE-SU-2024:1644-1","SUSE-SU-2024:2008-1","SUSE-SU-2024:2190-1","SUSE-SU-2025:20008-1","SUSE-SU-2025:20028-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/27xxx/CVE-2024-27042.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/8db10cee51e3e11a6658742465edc21986cf1e8d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8f3e68c6a3fff53c2240762a47a0045d89371775"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b33d4af102b9c1f7a83d3f0ad3cab7d2bab8f058"},{"type":"WEB","url":"https://git.kernel.org/stable/c/cdb637d339572398821204a1142d8d615668f1e9"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/27xxx/CVE-2024-27042.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27042"},{"type":"PACKAGE","url":"https://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/osv-test-cve-osv-conversion/osv-output/CVE-2024-27042.json"}}],"schema_version":"1.7.5"}