CVE-2022-50844
Gravedad:
Pendiente de análisis
Tipo:
No Disponible / Otro tipo
Fecha de publicación:
30/12/2025
Última modificación:
02/01/2026
Descripción
*** Pendiente de traducción *** 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&#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 &#39;int (*)(void *, uint32_t, long *, uint32_t)&#39; (aka &#39;int (*)(void *, unsigned int, long *, unsigned int)&#39;) with an expression of type &#39;int (void *, enum PP_OD_DPM_TABLE_COMMAND, long *, uint32_t)&#39; (aka &#39;int (void *, enum PP_OD_DPM_TABLE_COMMAND, long *, unsigned int)&#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 ->odn_edit_dpm_table() in &#39;struct<br />
amd_pm_funcs&#39;: smu_od_edit_dpm_table() and pp_odn_edit_dpm_table(). One<br />
has a second parameter type of &#39;enum PP_OD_DPM_TABLE_COMMAND&#39; and the<br />
other uses &#39;u32&#39;. Ultimately, smu_od_edit_dpm_table() calls<br />
->od_edit_dpm_table() from &#39;struct pptable_funcs&#39; and<br />
pp_odn_edit_dpm_table() calls ->odn_edit_dpm_table() from &#39;struct<br />
pp_hwmgr_func&#39;, which both have a second parameter type of &#39;enum<br />
PP_OD_DPM_TABLE_COMMAND&#39;.<br />
<br />
Update the type parameter in both the prototype in &#39;struct amd_pm_funcs&#39;<br />
and pp_odn_edit_dpm_table() to &#39;enum PP_OD_DPM_TABLE_COMMAND&#39;, which<br />
cleans up the warning.



