CVE-2024-26874

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-26874
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-26874.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-26874
Downstream
Related
Published
2024-04-17T10:27:33.278Z
Modified
2025-11-28T02:34:56.290350Z
Summary
drm/mediatek: Fix a null pointer crash in mtk_drm_crtc_finish_page_flip
Details

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

drm/mediatek: Fix a null pointer crash in mtkdrmcrtcfinishpage_flip

It's possible that mtkcrtc->event is NULL in mtkdrmcrtcfinishpageflip().

pendingneedsvblank value is set by mtkcrtc->event, but in mtkdrmcrtcatomicflush(), it's is not guarded by the same lock in mtkdrmfinishpage_flip(), thus a race condition happens.

Consider the following case:

CPU1 CPU2 step 1: mtkdrmcrtcatomicbegin() mtkcrtc->event is not null, step 1: mtkdrmcrtcatomicflush: mtkdrmcrtcupdateconfig( !!mtkcrtc->event) step 2: mtkcrtcddpirq -> mtkdrmfinishpageflip: lock mtkcrtc->event set to null, pendingneedsvblank set to false unlock pendingneedsvblank set to true,

                              step 2:
                              mtk_crtc_ddp_irq ->
                              mtk_drm_finish_page_flip called again,
                              pending_needs_vblank is still true
                              //null pointer

Instead of guarding the entire mtkdrmcrtcatomicflush(), it's more efficient to just check if mtk_crtc->event is null before use.

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

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
119f5173628aa7a0c3cf9db83460d40709e8241d
Fixed
accdac6b71d5a2b84040c3d2234f53a60edc398e
Fixed
dfde84cc6c589f2a9f820f12426d97365670b731
Fixed
4688be96d20ffa49d2186523ee84f475f316fd49
Fixed
9beec711a17245b853d64488fd5b739031612340
Fixed
d2bd30c710475b2e29288827d2c91f9e6e2b91d7
Fixed
a3dd12b64ae8373a41a216a0b621df224210860a
Fixed
9acee29a38b4d4b70f1f583e5ef9a245db4db710
Fixed
3fc88b246a2fc16014e374040fc15af1d3752535
Fixed
c958e86e9cc1b48cac004a6e245154dfba8e163b

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.7.0
Fixed
4.19.311
Type
ECOSYSTEM
Events
Introduced
4.20.0
Fixed
5.4.273
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.214
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.153
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.83
Type
ECOSYSTEM
Events
Introduced
6.2.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