CVE-2024-27040

Source
https://cve.org/CVERecord?id=CVE-2024-27040
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-27040.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-27040
Downstream
Related
Published
2024-05-01T12:54:00.645Z
Modified
2026-05-15T11:53:26.700990084Z
Severity
  • 4.7 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
drm/amd/display: Add 'replay' NULL check in 'edp_set_replay_allow_active()'
Details

In the Linux kernel, the following vulnerability has been resolved:

drm/amd/display: Add 'replay' NULL check in 'edpsetreplayallowactive()'

In the first if statement, we're checking if 'replay' is NULL. But in the second if statement, we're not checking if 'replay' is NULL again before calling replay->funcs->replaysetpower_opt().

if (replay == NULL && force_static) return false;

...

if (link->replaysettings.replayfeatureenabled && replay->funcs->replaysetpoweropt) { replay->funcs->replaysetpoweropt(replay, *poweropts, panelinst); link->replaysettings.replaypoweroptactive = *poweropts; }

If 'replay' is NULL, this will cause a null pointer dereference.

Fixes the below found by smatch: drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/linkedppanelcontrol.c:895 edpsetreplayallow_active() error: we previously assumed 'replay' could be null (see line 887)

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/27xxx/CVE-2024-27040.json"
}
References

Affected packages

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.6.0
Fixed
6.6.23
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.7.11
Type
ECOSYSTEM
Events
Introduced
6.8.0
Fixed
6.8.2

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-27040.json"