From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA7B3383AA for ; Tue, 2 Apr 2024 06:49:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712040581; cv=none; b=caKqrYdn+YdYh4pWAecQZb9ACZqEaG/RPR4YMDhuVLweFHIzLNPEupPLQJwHgZdimd6GsaytR79RQLuPDWco4Esdye2RS1nqIlIoUhscLH8HEMIPLKp3nlq0BjK63tJEL7K3agVE+nuMhUHe3wHwMsIKZHV2SKCyHCJSNsO9xFs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712040581; c=relaxed/simple; bh=47rut0NIdOgkGw/qRGnDknoKGh0d1o680H4dOPG6a8Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OfV55MQmzDy6ED5+tULameJeng59Qe7nFd7TSYKJNR3Y3FzfWrl+rgLLDVpOA0uYQuHBfpjPsuSEmC5Tx+og6p7SHooRw5+2GZv4u1LuvTdg+3NUZEls6RtzApC8ncFjeo3KrOxPLmInaKJMDzX89dy+XLljr92QhycGpFmV4bQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ex3IzWfe; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Ex3IzWfe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA566C43394; Tue, 2 Apr 2024 06:49:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712040581; bh=47rut0NIdOgkGw/qRGnDknoKGh0d1o680H4dOPG6a8Q=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Ex3IzWfe1EsfwXzJQ1Dkd5g88EQQl+DNTo6YlUyW2m142P3h43f3g16qwEUXezn/b ZBDtATZP2CrfwZ9obiEu6yXZbaEfvarw7jUC9lIGoo1b6SUgQsVC+qMYWgG0R+krsn rqJC3PiH18Kqipy41vD2joeG1noyTLeZwcCZwEfw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26672: drm/amdgpu: Fix variable 'mca_funcs' dereferenced before NULL check in 'amdgpu_mca_smu_get_mca_entry()' Date: Tue, 2 Apr 2024 08:49:24 +0200 Message-ID: <2024040219-CVE-2024-26672-e96e@gregkh> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2686; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=47rut0NIdOgkGw/qRGnDknoKGh0d1o680H4dOPG6a8Q=; b=owGbwMvMwCRo6H6F97bub03G02pJDGncq/IncMlMcXbfJ/vajfHCS/07Zxn/mdUGFLdk1l8Mb 1hQ3mvTEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPJOsaw4Fh1wLxs35nnpEUX eB+a+mL9svC/EgzzPbgbRF8WBPtqm8TenB9x/frL47Y8AA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: Fix variable 'mca_funcs' dereferenced before NULL check in 'amdgpu_mca_smu_get_mca_entry()' Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c:377 amdgpu_mca_smu_get_mca_entry() warn: variable dereferenced before check 'mca_funcs' (see line 368) 357 int amdgpu_mca_smu_get_mca_entry(struct amdgpu_device *adev, enum amdgpu_mca_error_type type, 358 int idx, struct mca_bank_entry *entry) 359 { 360 const struct amdgpu_mca_smu_funcs *mca_funcs = adev->mca.mca_funcs; 361 int count; 362 363 switch (type) { 364 case AMDGPU_MCA_ERROR_TYPE_UE: 365 count = mca_funcs->max_ue_count; mca_funcs is dereferenced here. 366 break; 367 case AMDGPU_MCA_ERROR_TYPE_CE: 368 count = mca_funcs->max_ce_count; mca_funcs is dereferenced here. 369 break; 370 default: 371 return -EINVAL; 372 } 373 374 if (idx >= count) 375 return -EINVAL; 376 377 if (mca_funcs && mca_funcs->mca_get_mca_entry) ^^^^^^^^^ Checked too late! The Linux kernel CVE team has assigned CVE-2024-26672 to this issue. Affected and fixed versions =========================== Fixed in 6.7.4 with commit 7b5d58c07024 Fixed in 6.8 with commit 4f32504a2f85 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2024-26672 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/7b5d58c07024516c0e81b95e98f37710cf402c53 https://git.kernel.org/stable/c/4f32504a2f85a7b40fe149436881381f48e9c0c0