CVE-2024-27040
Severity CVSS v4.0:
Pending analysis
Type:
CWE-476
NULL Pointer Dereference
Publication date:
01/05/2024
Last modified:
08/04/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
drm/amd/display: Add &#39;replay&#39; NULL check in &#39;edp_set_replay_allow_active()&#39;<br />
<br />
In the first if statement, we&#39;re checking if &#39;replay&#39; is NULL. But in<br />
the second if statement, we&#39;re not checking if &#39;replay&#39; is NULL again<br />
before calling replay->funcs->replay_set_power_opt().<br />
<br />
if (replay == NULL && force_static)<br />
return false;<br />
<br />
...<br />
<br />
if (link->replay_settings.replay_feature_enabled &&<br />
replay->funcs->replay_set_power_opt) {<br />
replay->funcs->replay_set_power_opt(replay, *power_opts, panel_inst);<br />
link->replay_settings.replay_power_opt_active = *power_opts;<br />
}<br />
<br />
If &#39;replay&#39; is NULL, this will cause a null pointer dereference.<br />
<br />
Fixes the below found by smatch:<br />
drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_edp_panel_control.c:895 edp_set_replay_allow_active() error: we previously assumed &#39;replay&#39; could be null (see line 887)
Impact
Base Score 3.x
4.70
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.6 (including) | 6.6.23 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.7.11 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.8 (including) | 6.8.2 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/d0e94f4807ff0df66cf447d6b4bbb8ac830e99c3
- https://git.kernel.org/stable/c/e7cadd5d3a8ffe334d0229ba9eda4290138d56e7
- https://git.kernel.org/stable/c/f610c46771ef1047e46d61807aa7c69cd29e63d8
- https://git.kernel.org/stable/c/f6aed043ee5d75b3d1bfc452b1a9584b63c8f76b
- https://git.kernel.org/stable/c/d0e94f4807ff0df66cf447d6b4bbb8ac830e99c3
- https://git.kernel.org/stable/c/e7cadd5d3a8ffe334d0229ba9eda4290138d56e7
- https://git.kernel.org/stable/c/f610c46771ef1047e46d61807aa7c69cd29e63d8
- https://git.kernel.org/stable/c/f6aed043ee5d75b3d1bfc452b1a9584b63c8f76b



