In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: fix NULL checks for adev->dm.dc in amdgpudmfini()
Since 'adev->dm.dc' in amdgpudmfini() might turn out to be NULL before the call to dcenabledmub_notifications(), check beforehand to ensure there will not be a possible NULL-ptr-deref there.
Also, since commit 1e88eb1b2c25 ("drm/amd/display: Drop CONFIGDRMAMDDCHDCP") there are two separate checks for NULL in 'adev->dm.dc' before dcdeinitcallbacks() and dcdmubsrv_destroy(). Clean up by combining them all under one 'if'.
Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE.
[
{
"id": "CVE-2024-27041-12f4124e",
"target": {
"function": "amdgpu_dm_fini",
"file": "drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c"
},
"digest": {
"length": 2117.0,
"function_hash": "325260333657704817303350737487305860801"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2a3cfb9a24a28da9cc13d2c525a76548865e182c",
"signature_type": "Function"
},
{
"id": "CVE-2024-27041-2aacea78",
"target": {
"file": "drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c"
},
"digest": {
"line_hashes": [
"253306377228785317201741430400349718719",
"244035775861787364360766342519372553138",
"92227694113106304840309798259673355774",
"266535364442538255534931127826590315499",
"142927587882935910892053931440000809523",
"267644886376965320705582120150004585230",
"159381240767019745872898500894997942957",
"170042385031794975728537227504306813531",
"71791350409166925135594851364482082847",
"201239699430663653521906656788999916325",
"279527112930576130651611943021558137545",
"150438655657348215389691868720879828041"
],
"threshold": 0.9
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ca2eb375db76fd50f31afdd67d6ca4f833254957",
"signature_type": "Line"
},
{
"id": "CVE-2024-27041-369f5daf",
"target": {
"function": "amdgpu_dm_fini",
"file": "drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c"
},
"digest": {
"length": 2117.0,
"function_hash": "325260333657704817303350737487305860801"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ca2eb375db76fd50f31afdd67d6ca4f833254957",
"signature_type": "Function"
},
{
"id": "CVE-2024-27041-4b5c2e9a",
"target": {
"function": "amdgpu_dm_fini",
"file": "drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c"
},
"digest": {
"length": 2137.0,
"function_hash": "296818637938111736544966053683672257279"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1c62697e4086de988b31124fb8c79c244ea05f2b",
"signature_type": "Function"
},
{
"id": "CVE-2024-27041-6765b3b6",
"target": {
"file": "drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c"
},
"digest": {
"line_hashes": [
"253306377228785317201741430400349718719",
"244035775861787364360766342519372553138",
"92227694113106304840309798259673355774",
"266535364442538255534931127826590315499",
"142927587882935910892053931440000809523",
"267644886376965320705582120150004585230",
"159381240767019745872898500894997942957",
"170042385031794975728537227504306813531",
"71791350409166925135594851364482082847",
"201239699430663653521906656788999916325",
"279527112930576130651611943021558137545",
"150438655657348215389691868720879828041"
],
"threshold": 0.9
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2a3cfb9a24a28da9cc13d2c525a76548865e182c",
"signature_type": "Line"
},
{
"id": "CVE-2024-27041-7983975d",
"target": {
"file": "drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c"
},
"digest": {
"line_hashes": [
"253306377228785317201741430400349718719",
"244035775861787364360766342519372553138",
"92227694113106304840309798259673355774",
"266535364442538255534931127826590315499",
"142927587882935910892053931440000809523",
"267644886376965320705582120150004585230",
"159381240767019745872898500894997942957",
"170042385031794975728537227504306813531",
"71791350409166925135594851364482082847",
"201239699430663653521906656788999916325",
"279527112930576130651611943021558137545",
"150438655657348215389691868720879828041"
],
"threshold": 0.9
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e040f1fbe9abae91b12b074cfc3bbb5367b79811",
"signature_type": "Line"
},
{
"id": "CVE-2024-27041-da7b76f1",
"target": {
"file": "drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c"
},
"digest": {
"line_hashes": [
"253306377228785317201741430400349718719",
"244035775861787364360766342519372553138",
"92227694113106304840309798259673355774",
"266535364442538255534931127826590315499",
"142927587882935910892053931440000809523",
"267644886376965320705582120150004585230",
"159381240767019745872898500894997942957",
"170042385031794975728537227504306813531",
"71791350409166925135594851364482082847",
"201239699430663653521906656788999916325",
"279527112930576130651611943021558137545",
"150438655657348215389691868720879828041"
],
"threshold": 0.9
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1c62697e4086de988b31124fb8c79c244ea05f2b",
"signature_type": "Line"
},
{
"id": "CVE-2024-27041-ff87015f",
"target": {
"function": "amdgpu_dm_fini",
"file": "drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c"
},
"digest": {
"length": 2117.0,
"function_hash": "325260333657704817303350737487305860801"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e040f1fbe9abae91b12b074cfc3bbb5367b79811",
"signature_type": "Function"
}
]