CVE-2022-50844

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
30/12/2025
Last modified:
02/01/2026

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> drm/amdgpu: Fix type of second parameter in odn_edit_dpm_table() callback<br /> <br /> With clang&amp;#39;s kernel control flow integrity (kCFI, CONFIG_CFI_CLANG),<br /> indirect call targets are validated against the expected function<br /> pointer prototype to make sure the call target is valid to help mitigate<br /> ROP attacks. If they are not identical, there is a failure at run time,<br /> which manifests as either a kernel panic or thread getting killed. A<br /> proposed warning in clang aims to catch these at compile time, which<br /> reveals:<br /> <br /> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/amdgpu_smu.c:3008:29: error: incompatible function pointer types initializing &amp;#39;int (*)(void *, uint32_t, long *, uint32_t)&amp;#39; (aka &amp;#39;int (*)(void *, unsigned int, long *, unsigned int)&amp;#39;) with an expression of type &amp;#39;int (void *, enum PP_OD_DPM_TABLE_COMMAND, long *, uint32_t)&amp;#39; (aka &amp;#39;int (void *, enum PP_OD_DPM_TABLE_COMMAND, long *, unsigned int)&amp;#39;) [-Werror,-Wincompatible-function-pointer-types-strict]<br /> .odn_edit_dpm_table = smu_od_edit_dpm_table,<br /> ^~~~~~~~~~~~~~~~~~~~~<br /> 1 error generated.<br /> <br /> There are only two implementations of -&gt;odn_edit_dpm_table() in &amp;#39;struct<br /> amd_pm_funcs&amp;#39;: smu_od_edit_dpm_table() and pp_odn_edit_dpm_table(). One<br /> has a second parameter type of &amp;#39;enum PP_OD_DPM_TABLE_COMMAND&amp;#39; and the<br /> other uses &amp;#39;u32&amp;#39;. Ultimately, smu_od_edit_dpm_table() calls<br /> -&gt;od_edit_dpm_table() from &amp;#39;struct pptable_funcs&amp;#39; and<br /> pp_odn_edit_dpm_table() calls -&gt;odn_edit_dpm_table() from &amp;#39;struct<br /> pp_hwmgr_func&amp;#39;, which both have a second parameter type of &amp;#39;enum<br /> PP_OD_DPM_TABLE_COMMAND&amp;#39;.<br /> <br /> Update the type parameter in both the prototype in &amp;#39;struct amd_pm_funcs&amp;#39;<br /> and pp_odn_edit_dpm_table() to &amp;#39;enum PP_OD_DPM_TABLE_COMMAND&amp;#39;, which<br /> cleans up the warning.

Impact