drm/amd/display: Fix dangling pointer in CRTC reset function
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e7b07ceef2a650e5ed8ca37997689e086c680daf · < 0aeed866cb938943908c3ba46422128e49d2d080| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: Fix dangling pointer in CRTC reset function
amdgpu_dm_crtc_reset_state() frees the old state before allocating a new one. If kzalloc() fails, the function returns without updating the state pointer, leaving a dangling pointer to already freed memory.
Fix this by allocating the new state first. On allocation failure, the old state remains untouched and the function safely returns.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
[adjust for movement around current amd-staging-drm-next]
From the CVE record · Linux
The Linux kernel's AMD display CRTC reset function can leave a pointer to freed state if a new state allocation fails. The input does not establish how an attacker could trigger this condition or whether access or user interaction is required.
Engineers running Linux kernels with the AMD display driver should check their versions; affected versions are not specified.