drm/msm/mdp5: Return error code in mdp5_pipe_release when deadlock is detected
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7907a0d77cb461f58045763c205a5830be72e97c · < 33dc5aac46e0fad8f5eb193e5906ed0eb6b66ceb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/msm/mdp5: Return error code in mdp5_pipe_release when deadlock is detected
mdp5_get_global_state runs the risk of hitting a -EDEADLK when acquiring the modeset lock, but currently mdp5_pipe_release doesn't check for if an error is returned. Because of this, there is a possibility of mdp5_pipe_release hitting a NULL dereference error.
To avoid this, let's have mdp5_pipe_release check if mdp5_get_global_state returns an error and propogate that error.
Changes since v1: - Separated declaration and initialization of *new_state to avoid compiler warning - Fixed some spelling mistakes in commit message
Changes since v2: - Return 0 in case where hwpipe is NULL as this is considered normal behavior - Added 2nd patch in series to fix a similar NULL dereference issue in mdp5_mixer_release
Patchwork: https://patchwork.freedesktop.org/patch/485179/
From the CVE record · Linux
In the Linux kernel, mdp5_pipe_release can dereference NULL if mdp5_get_global_state returns -EDEADLK while acquiring the modeset lock. An attacker who can trigger this condition could cause a crash; the input does not specify whether network or local access, authentication, or user interaction is required.
Engineers running the Linux kernel should check whether their kernel includes the affected drm/msm/mdp5 code; affected versions are not specified.