{"schema_version":"1.9.0","id":"CVE-2024-26874","published":"2024-04-17T10:27:33.278Z","modified":"2026-08-12T03:51:17.593804549Z","related":["SUSE-SU-2024:1979-1","SUSE-SU-2024:1983-1","SUSE-SU-2024:2008-1","SUSE-SU-2024:2019-1","SUSE-SU-2024:2184-1","SUSE-SU-2024:2190-1"],"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:\n\ndrm/mediatek: Fix a null pointer crash in mtk_drm_crtc_finish_page_flip\n\nIt's possible that mtk_crtc->event is NULL in\nmtk_drm_crtc_finish_page_flip().\n\npending_needs_vblank value is set by mtk_crtc->event, but in\nmtk_drm_crtc_atomic_flush(), it's is not guarded by the same\nlock in mtk_drm_finish_page_flip(), thus a race condition happens.\n\nConsider the following case:\n\nCPU1                              CPU2\nstep 1:\nmtk_drm_crtc_atomic_begin()\nmtk_crtc->event is not null,\n                                  step 1:\n                                  mtk_drm_crtc_atomic_flush:\n                                  mtk_drm_crtc_update_config(\n                                      !!mtk_crtc->event)\nstep 2:\nmtk_crtc_ddp_irq ->\nmtk_drm_finish_page_flip:\nlock\nmtk_crtc->event set to null,\npending_needs_vblank set to false\nunlock\n                                  pending_needs_vblank set to true,\n\n                                  step 2:\n                                  mtk_crtc_ddp_irq ->\n                                  mtk_drm_finish_page_flip called again,\n                                  pending_needs_vblank is still true\n                                  //null pointer\n\nInstead of guarding the entire mtk_drm_crtc_atomic_flush(), it's more\nefficient to just check if mtk_crtc->event is null before use.","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/cve-osv-conversion/osv-output/CVE-2024-26874.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"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"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-26874.json"}}],"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/3fc88b246a2fc16014e374040fc15af1d3752535"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4688be96d20ffa49d2186523ee84f475f316fd49"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9acee29a38b4d4b70f1f583e5ef9a245db4db710"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9beec711a17245b853d64488fd5b739031612340"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a3dd12b64ae8373a41a216a0b621df224210860a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/accdac6b71d5a2b84040c3d2234f53a60edc398e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c958e86e9cc1b48cac004a6e245154dfba8e163b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d2bd30c710475b2e29288827d2c91f9e6e2b91d7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/dfde84cc6c589f2a9f820f12426d97365670b731"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26874.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-26874"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26874.json"}}