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 735B92D9EED for ; Tue, 30 Dec 2025 12:14:15 +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=1767096855; cv=none; b=iAk8xE3LpoS/aHHPlUeDY0WlQf+L7L/JbCsTeIVuogv4ncmZBQ3P/jVrnQcjjiRwQ41hPSGnI8yC39ECnwxGsXDezhipG2RKMeWxoxIRhkS58fykhH8MnZUKMWD1shrgZHwNM4fjsCrNexxypZHzVaUZIr7qFA/M9TpvVsk+FZY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767096855; c=relaxed/simple; bh=31M2i0nfwUCDQTkczpdy6fOu748yXHGDTwrV1TgXNQ8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MzDEib+CUVNvSUfPzY1pCu4iRLEc7/dqpwBW9uaF0MTO2gu6drLGXAOztIbL8WEBg7On/MnS/oeNRP9I7nrAwfd1eA9ERljYoBwYBwYtdpYBh98MLbO5+29lWdhtSfv16aPagfld4z1pPvRZmAKLT7BO8XTaHEn3LAjKO28CNws= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=civ1aijO; 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="civ1aijO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2385C4CEFB; Tue, 30 Dec 2025 12:14:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767096855; bh=31M2i0nfwUCDQTkczpdy6fOu748yXHGDTwrV1TgXNQ8=; h=From:To:Cc:Subject:Date:Reply-To:From; b=civ1aijO/TEO/HrYuMstSDVY2hnKnXZyknBYhh7/GuHRP4G8+5DmxEbh8nrKlAsm4 Lrp4iQ0LoDVav2hQ2BxESDQo8C9SwTM2fkcux2HIY6ZCRKdnvqJ4qSimuw55eOkI/U 5fIrXjN7lOzULXhNRVzwJ/IaafkRkXDCZKd40XPI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50844: drm/amdgpu: Fix type of second parameter in odn_edit_dpm_table() callback Date: Tue, 30 Dec 2025 13:13:30 +0100 Message-ID: <2025123020-CVE-2022-50844-64ab@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3815; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=S0rNkwobbWMJ5rJy+Qlq1SkopAXdK7Yi3mmjz/hHB+c=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBBx8YHl73MvD9wocCl/8uWCGg9nCnuG2X9SXjJcJV+ XFfw0v/d8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEijgZFnS8KOw6LLDN8nSI hPScia5eiYI17xkW3BSVKpy3Y+XfoxoCqwvLHtWeV7/vBwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: Fix type of second parameter in odn_edit_dpm_table() callback With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/gpu/drm/amd/amdgpu/../pm/swsmu/amdgpu_smu.c:3008:29: error: incompatible function pointer types initializing 'int (*)(void *, uint32_t, long *, uint32_t)' (aka 'int (*)(void *, unsigned int, long *, unsigned int)') with an expression of type 'int (void *, enum PP_OD_DPM_TABLE_COMMAND, long *, uint32_t)' (aka 'int (void *, enum PP_OD_DPM_TABLE_COMMAND, long *, unsigned int)') [-Werror,-Wincompatible-function-pointer-types-strict] .odn_edit_dpm_table = smu_od_edit_dpm_table, ^~~~~~~~~~~~~~~~~~~~~ 1 error generated. There are only two implementations of ->odn_edit_dpm_table() in 'struct amd_pm_funcs': smu_od_edit_dpm_table() and pp_odn_edit_dpm_table(). One has a second parameter type of 'enum PP_OD_DPM_TABLE_COMMAND' and the other uses 'u32'. Ultimately, smu_od_edit_dpm_table() calls ->od_edit_dpm_table() from 'struct pptable_funcs' and pp_odn_edit_dpm_table() calls ->odn_edit_dpm_table() from 'struct pp_hwmgr_func', which both have a second parameter type of 'enum PP_OD_DPM_TABLE_COMMAND'. Update the type parameter in both the prototype in 'struct amd_pm_funcs' and pp_odn_edit_dpm_table() to 'enum PP_OD_DPM_TABLE_COMMAND', which cleans up the warning. The Linux kernel CVE team has assigned CVE-2022-50844 to this issue. Affected and fixed versions =========================== Fixed in 5.10.163 with commit 9606bbc271ac86c266d1f4a0285dd69b3fda2d0f Fixed in 5.15.86 with commit f9084e9930db562bdcd47fa199a66fb45e16dab5 Fixed in 6.0.16 with commit 24cba9d865157c9e23128fbcf8b86f5da9570edd Fixed in 6.1.2 with commit 36217f676b55932a12d6732c95388150015fdee6 Fixed in 6.2 with commit e4d0ef752081e7aa6ffb7ccac11c499c732a2e05 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-2022-50844 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/include/kgd_pp_interface.h drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.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/9606bbc271ac86c266d1f4a0285dd69b3fda2d0f https://git.kernel.org/stable/c/f9084e9930db562bdcd47fa199a66fb45e16dab5 https://git.kernel.org/stable/c/24cba9d865157c9e23128fbcf8b86f5da9570edd https://git.kernel.org/stable/c/36217f676b55932a12d6732c95388150015fdee6 https://git.kernel.org/stable/c/e4d0ef752081e7aa6ffb7ccac11c499c732a2e05