{"id":"CVE-2024-26874","aliases":["CVE-2024-26874"],"related":[],"kind":"vulnerability","state":"published","title":"drm/mediatek: Fix a null pointer crash in mtk_drm_crtc_finish_page_flip","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: drm/mediatek: corrige un fallo del puntero nulo en mtk_drm_crtc_finish_page_flip Es posible que mtk_crtc-&gt;event sea NULL en mtk_drm_crtc_finish_page_flip(). El valor pendiente_needs_vblank lo establece mtk_crtc-&gt;event, pero en mtk_drm_crtc_atomic_flush(), no está protegido por el mismo bloqueo en mtk_drm_finish_page_flip(), por lo que ocurre una condición de carrera. Considere el siguiente caso: CPU1 CPU2 paso 1: mtk_drm_crtc_atomic_begin() mtk_crtc-&gt;event is not null, paso 1: mtk_drm_crtc_atomic_flush: mtk_drm_crtc_update_config( !!mtk_crtc-&gt;event) paso 2: mtk_crtc_ddp_irq -&gt; mtk_drm_finish _page_flip: bloquear mtk_crtc-&gt;evento establecido en nulo, pendiente_needs_vblank configurado en falso desbloqueo pendiente_needs_vblank configurado en verdadero, paso 2: mtk_crtc_ddp_irq -&gt; mtk_drm_finish_page_flip llamado nuevamente, pendiente_needs_vblank sigue siendo verdadero //puntero nulo En lugar de proteger todo el mtk_drm_crtc_atomic_flush(), es más eficiente simplemente verificar si mtk_crtc-&gt;even t es nulo antes de su uso.","source":"nvd"}],"published":"2024-04-17T10:27:33.278Z","modified":"2026-06-17T07:18:34.007Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","score":4.7,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","score":4.7,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"119f5173628aa7a0c3cf9db83460d40709e8241d","fixed":"accdac6b71d5a2b84040c3d2234f53a60edc398e","status":"affected"},{"type":"git","introduced":"119f5173628aa7a0c3cf9db83460d40709e8241d","fixed":"dfde84cc6c589f2a9f820f12426d97365670b731","status":"affected"},{"type":"git","introduced":"119f5173628aa7a0c3cf9db83460d40709e8241d","fixed":"4688be96d20ffa49d2186523ee84f475f316fd49","status":"affected"},{"type":"git","introduced":"119f5173628aa7a0c3cf9db83460d40709e8241d","fixed":"9beec711a17245b853d64488fd5b739031612340","status":"affected"},{"type":"git","introduced":"119f5173628aa7a0c3cf9db83460d40709e8241d","fixed":"d2bd30c710475b2e29288827d2c91f9e6e2b91d7","status":"affected"},{"type":"git","introduced":"119f5173628aa7a0c3cf9db83460d40709e8241d","fixed":"a3dd12b64ae8373a41a216a0b621df224210860a","status":"affected"},{"type":"git","introduced":"119f5173628aa7a0c3cf9db83460d40709e8241d","fixed":"9acee29a38b4d4b70f1f583e5ef9a245db4db710","status":"affected"},{"type":"git","introduced":"119f5173628aa7a0c3cf9db83460d40709e8241d","fixed":"3fc88b246a2fc16014e374040fc15af1d3752535","status":"affected"},{"type":"git","introduced":"119f5173628aa7a0c3cf9db83460d40709e8241d","fixed":"c958e86e9cc1b48cac004a6e245154dfba8e163b","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.7","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.7","status":"unaffected"},{"type":"semver","introduced":"4.19.311","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.273","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.214","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.153","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.83","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.23","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.7.11","lastAffected":"6.7.*","status":"unaffected"},{"type":"semver","introduced":"6.8.2","lastAffected":"6.8.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.9","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.7","fixed":"4.19.311"},{"status":"affected","introduced":"4.20","fixed":"5.4.273"},{"status":"affected","introduced":"5.5","fixed":"5.10.214"},{"status":"affected","introduced":"5.11","fixed":"5.15.153"},{"status":"affected","introduced":"5.16","fixed":"6.1.83"},{"status":"affected","introduced":"6.2","fixed":"6.6.23"},{"status":"affected","introduced":"6.7","fixed":"6.7.11"},{"status":"affected","introduced":"6.8","fixed":"6.8.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/accdac6b71d5a2b84040c3d2234f53a60edc398e","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/dfde84cc6c589f2a9f820f12426d97365670b731","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4688be96d20ffa49d2186523ee84f475f316fd49","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9beec711a17245b853d64488fd5b739031612340","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d2bd30c710475b2e29288827d2c91f9e6e2b91d7","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a3dd12b64ae8373a41a216a0b621df224210860a","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9acee29a38b4d4b70f1f583e5ef9a245db4db710","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3fc88b246a2fc16014e374040fc15af1d3752535","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c958e86e9cc1b48cac004a6e245154dfba8e163b","tags":["mailing-list","patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["mailing-list","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html","tags":["mailing-list","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-04-23T14:01:58.775Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-26874","url":"https://www.cve.org/CVERecord?id=CVE-2024-26874","licence":"CVE Terms of Use","modified":"2026-05-11T20:05:48.588Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-26874","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-26874","licence":"Public domain","modified":"2026-06-17T07:18:34.007Z"}],"updatedAt":"2026-11-25T22:58:39.371Z","epss":{"score":0.00238,"percentile":0.15841,"date":"2026-12-01T12:00:22.000Z"}}