In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: fix NULL checks for adev->dm.dc in amdgpu_dm_fini()
Since ‘adev->dm.dc’ in amdgpu_dm_fini() might turn out to be NULL
before the call to dc_enable_dmub_notifications(), check
beforehand to ensure there will not be a possible NULL-ptr-deref
there.
Also, since commit 1e88eb1b2c25 (“drm/amd/display: Drop
CONFIG_DRM_AMD_DC_HDCP”) there are two separate checks for NULL in
‘adev->dm.dc’ before dc_deinit_callbacks() and dc_dmub_srv_destroy().
Clean up by combining them all under one ‘if’.
Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.
[
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "81927e2808be",
"lessThan": "e040f1fbe9ab",
"versionType": "git"
},
{
"status": "affected",
"version": "81927e2808be",
"lessThan": "ca2eb375db76",
"versionType": "git"
},
{
"status": "affected",
"version": "81927e2808be",
"lessThan": "1c62697e4086",
"versionType": "git"
},
{
"status": "affected",
"version": "81927e2808be",
"lessThan": "2a3cfb9a24a2",
"versionType": "git"
}
],
"programFiles": [
"drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "5.14"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "5.14",
"versionType": "custom"
},
{
"status": "unaffected",
"version": "6.6.23",
"versionType": "custom",
"lessThanOrEqual": "6.6.*"
},
{
"status": "unaffected",
"version": "6.7.11",
"versionType": "custom",
"lessThanOrEqual": "6.7.*"
},
{
"status": "unaffected",
"version": "6.8.2",
"versionType": "custom",
"lessThanOrEqual": "6.8.*"
},
{
"status": "unaffected",
"version": "6.9",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c"
],
"defaultStatus": "affected"
}
]