CVE-2024-26874

Source
https://cve.org/CVERecord?id=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
2026-03-20T12:35:16.777910Z
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
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26874.json",
    "cna_assigner": "Linux"
}
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

Database specific

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