{"id":"CVE-2024-26672","published":"2024-04-02T06:49:14Z","modified":"2026-05-11T20:01:57Z","title":"drm/amdgpu: Fix variable 'mca_funcs' dereferenced before NULL check in 'amdgpu_mca_smu_get_mca_entry()'","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: Fix variable 'mca_funcs' dereferenced before NULL check in 'amdgpu_mca_smu_get_mca_entry()'\n\nFixes the below:\n\ndrivers/gpu/drm/amd/amdgpu/amdgpu_mca.c:377 amdgpu_mca_smu_get_mca_entry() warn: variable dereferenced before check 'mca_funcs' (see line 368)\n\n357 int amdgpu_mca_smu_get_mca_entry(struct amdgpu_device *adev,\n\t\t\t\t     enum amdgpu_mca_error_type type,\n358                                  int idx, struct mca_bank_entry *entry)\n359 {\n360         const struct amdgpu_mca_smu_funcs *mca_funcs =\n\t\t\t\t\t\tadev->mca.mca_funcs;\n361         int count;\n362\n363         switch (type) {\n364         case AMDGPU_MCA_ERROR_TYPE_UE:\n365                 count = mca_funcs->max_ue_count;\n\nmca_funcs is dereferenced here.\n\n366                 break;\n367         case AMDGPU_MCA_ERROR_TYPE_CE:\n368                 count = mca_funcs->max_ce_count;\n\nmca_funcs is dereferenced here.\n\n369                 break;\n370         default:\n371                 return -EINVAL;\n372         }\n373\n374         if (idx >= count)\n375                 return -EINVAL;\n376\n377         if (mca_funcs && mca_funcs->mca_get_mca_entry)\n\t        ^^^^^^^^^\n\nChecked too late!","provenance":"source","from":"CVE.org"},"cvss":{"score":7.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00217,"percentile":0.12432,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/7b5d58c07024516c0e81b95e98f37710cf402c53","tags":[]},{"url":"https://git.kernel.org/stable/c/4f32504a2f85a7b40fe149436881381f48e9c0c0","tags":[]}],"priority":{"score":7.5,"factors":[{"name":"EPSS percentile","points":2.49},{"name":"CVSS severity","points":4.97}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= d38ceaf99ed015f2a0b9af3499791bd3a3daae21, < 7b5d58c07024516c0e81b95e98f37710cf402c53",">= d38ceaf99ed015f2a0b9af3499791bd3a3daae21, < 4f32504a2f85a7b40fe149436881381f48e9c0c0"]},{"vendor":"Linux","product":"Linux","versions":["4.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-04-02T15:55:06.193007Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-23934","exploited":false,"provenance":"source"}}