{"id":"CVE-2025-68214","aliases":["CVE-2025-68214"],"related":[],"kind":"vulnerability","state":"published","title":"timers: Fix NULL function pointer race in timer_shutdown_sync()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ntimers: Fix NULL function pointer race in timer_shutdown_sync()\n\nThere is a race condition between timer_shutdown_sync() and timer\nexpiration that can lead to hitting a WARN_ON in expire_timers().\n\nThe issue occurs when timer_shutdown_sync() clears the timer function\nto NULL while the timer is still running on another CPU. The race\nscenario looks like this:\n\nCPU0\t\t\t\t\tCPU1\n\t\t\t\t\t<SOFTIRQ>\n\t\t\t\t\tlock_timer_base()\n\t\t\t\t\texpire_timers()\n\t\t\t\t\tbase->running_timer = timer;\n\t\t\t\t\tunlock_timer_base()\n\t\t\t\t\t[call_timer_fn enter]\n\t\t\t\t\tmod_timer()\n\t\t\t\t\t...\ntimer_shutdown_sync()\nlock_timer_base()\n// For now, will not detach the timer but only clear its function to NULL\nif (base->running_timer != timer)\n\tret = detach_if_pending(timer, base, true);\nif (shutdown)\n\ttimer->function = NULL;\nunlock_timer_base()\n\t\t\t\t\t[call_timer_fn exit]\n\t\t\t\t\tlock_timer_base()\n\t\t\t\t\tbase->running_timer = NULL;\n\t\t\t\t\tunlock_timer_base()\n\t\t\t\t\t...\n\t\t\t\t\t// Now timer is pending while its function set to NULL.\n\t\t\t\t\t// next timer trigger\n\t\t\t\t\t<SOFTIRQ>\n\t\t\t\t\texpire_timers()\n\t\t\t\t\tWARN_ON_ONCE(!fn) // hit\n\t\t\t\t\t...\nlock_timer_base()\n// Now timer will detach\nif (base->running_timer != timer)\n\tret = detach_if_pending(timer, base, true);\nif (shutdown)\n\ttimer->function = NULL;\nunlock_timer_base()\n\nThe problem is that timer_shutdown_sync() clears the timer function\nregardless of whether the timer is currently running. This can leave a\npending timer with a NULL function pointer, which triggers the\nWARN_ON_ONCE(!fn) check in expire_timers().\n\nFix this by only clearing the timer function when actually detaching the\ntimer. If the timer is running, leave the function pointer intact, which is\nsafe because the timer will be properly detached when it finishes running.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ntimers: Fix NULL function pointer race in timer_shutdown_sync()\n\nThere is a race condition between timer_shutdown_sync() and timer\nexpiration that can lead to hitting a WARN_ON in expire_timers().\n\nThe issue occurs when timer_shutdown_sync() clears the timer function\nto NULL while the timer is still running on another CPU. The race\nscenario looks like this:\n\nCPU0\t\t\t\t\tCPU1\n\t\t\t\t\t<SOFTIRQ>\n\t\t\t\t\tlock_timer_base()\n\t\t\t\t\texpire_timers()\n\t\t\t\t\tbase->running_timer = timer;\n\t\t\t\t\tunlock_timer_base()\n\t\t\t\t\t[call_timer_fn enter]\n\t\t\t\t\tmod_timer()\n\t\t\t\t\t...\ntimer_shutdown_sync()\nlock_timer_base()\n// For now, will not detach the timer but only clear its function to NULL\nif (base->running_timer != timer)\n\tret = detach_if_pending(timer, base, true);\nif (shutdown)\n\ttimer->function = NULL;\nunlock_timer_base()\n\t\t\t\t\t[call_timer_fn exit]\n\t\t\t\t\tlock_timer_base()\n\t\t\t\t\tbase->running_timer = NULL;\n\t\t\t\t\tunlock_timer_base()\n\t\t\t\t\t...\n\t\t\t\t\t// Now timer is pending while its function set to NULL.\n\t\t\t\t\t// next timer trigger\n\t\t\t\t\t<SOFTIRQ>\n\t\t\t\t\texpire_timers()\n\t\t\t\t\tWARN_ON_ONCE(!fn) // hit\n\t\t\t\t\t...\nlock_timer_base()\n// Now timer will detach\nif (base->running_timer != timer)\n\tret = detach_if_pending(timer, base, true);\nif (shutdown)\n\ttimer->function = NULL;\nunlock_timer_base()\n\nThe problem is that timer_shutdown_sync() clears the timer function\nregardless of whether the timer is currently running. This can leave a\npending timer with a NULL function pointer, which triggers the\nWARN_ON_ONCE(!fn) check in expire_timers().\n\nFix this by only clearing the timer function when actually detaching the\ntimer. If the timer is running, leave the function pointer intact, which is\nsafe because the timer will be properly detached when it finishes running.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ntemporizadores: Corrige la condición de carrera del puntero de función NULL en timer_shutdown_sync()\n\nExiste una condición de carrera entre timer_shutdown_sync() y la expiración del temporizador que puede llevar a activar un WARN_ON en expire_timers().\n\nEl problema ocurre cuando timer_shutdown_sync() borra la función del temporizador a NULL mientras el temporizador todavía se está ejecutando en otra CPU. El escenario de la condición de carrera es el siguiente:\n\nCPU0\t\t\t\t\tCPU1\n\t\t\t\t\t<SOFTIRQ>\n\t\t\t\t\tlock_timer_base()\n\t\t\t\t\texpire_timers()\n\t\t\t\t\tbase -> running_timer = timer;\n\t\t\t\t\tunlock_timer_base()\n\t\t\t\t\t[call_timer_fn enter]\n\t\t\t\t\tmod_timer()\n\t\t\t\t\t...\ntimer_shutdown_sync()\nlock_timer_base()\n// Por ahora, no desvinculará el temporizador, sino que solo borrará su función a NULL\nif (base -> running_timer != timer)\n\tret = detach_if_pending(timer, base, true);\nif (shutdown)\n\ttimer -> function = NULL;\nunlock_timer_base()\n\t\t\t\t\t[call_timer_fn exit]\n\t\t\t\t\tlock_timer_base()\n\t\t\t\t\tbase -> running_timer = NULL;\n\t\t\t\t\tunlock_timer_base()\n\t\t\t\t\t...\n\t\t\t\t\t// Ahora el temporizador está pendiente mientras su función está establecida en NULL.\n\t\t\t\t\t// siguiente activación del temporizador\n\t\t\t\t\t<SOFTIRQ>\n\t\t\t\t\texpire_timers()\n\t\t\t\t\tWARN_ON_ONCE(!fn) // activado\n\t\t\t\t\t...\nlock_timer_base()\n// Ahora el temporizador se desvinculará\nif (base -> running_timer != timer)\n\tret = detach_if_pending(timer, base, true);\nif (shutdown)\n\ttimer -> function = NULL;\nunlock_timer_base()\n\nEl problema es que timer_shutdown_sync() borra la función del temporizador independientemente de si el temporizador se está ejecutando actualmente. Esto puede dejar un temporizador pendiente con un puntero de función NULL, lo que activa la comprobación WARN_ON_ONCE(!fn) en expire_timers().\n\nSolucione esto borrando la función del temporizador solo cuando se desvincula realmente el temporizador. Si el temporizador se está ejecutando, deje el puntero de función intacto, lo cual es seguro porque el temporizador se desvinculará correctamente cuando termine de ejecutarse.","source":"nvd"}],"published":"2025-12-16T13:57:09.728Z","modified":"2026-11-05T22:17:36.573Z","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-362"],"affected":[{"ranges":[{"type":"git","introduced":"debbcf812d735003c96c5e5968a3cfa4e1fbd1af","fixed":"ba43ac025c4318241f8edf94f31d2eebab86991b","status":"affected"},{"type":"git","introduced":"334c33aa487be406a149c8b87c38c8399d2dba8d","fixed":"1a975716cc8977f461e45e28e3e5977d46ad7a6a","status":"affected"},{"type":"git","introduced":"0cc04e80458a822300b93f82ed861a513edde194","fixed":"6665fbd7730b26d770c232b20d1b907e6a67a914","status":"affected"},{"type":"git","introduced":"0cc04e80458a822300b93f82ed861a513edde194","fixed":"176725f4848376530a0f0da9023f956afcc33585","status":"affected"},{"type":"git","introduced":"0cc04e80458a822300b93f82ed861a513edde194","fixed":"a01efa7a780c42ac5170a949bd95c9786ffcc60a","status":"affected"},{"type":"git","introduced":"0cc04e80458a822300b93f82ed861a513edde194","fixed":"20739af07383e6eb1ec59dcd70b72ebfa9ac362c","status":"affected"},{"type":"semver","introduced":"6.1.158","fixed":"6.1.159","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.2","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.2","status":"unaffected"},{"type":"semver","introduced":"6.1.159","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.118","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.60","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.17.10","lastAffected":"6.17.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.18","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":"6.2","fixed":"6.6.118"},{"status":"affected","introduced":"6.7","fixed":"6.12.60"},{"status":"affected","introduced":"6.13","fixed":"6.17.10"},{"status":"affected","version":"6.1.158"},{"status":"affected","version":"6.18"},{"status":"affected","version":"6.18"},{"status":"affected","version":"6.18"},{"status":"affected","version":"6.18"},{"status":"affected","version":"6.18"},{"status":"affected","version":"6.18"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/ba43ac025c4318241f8edf94f31d2eebab86991b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1a975716cc8977f461e45e28e3e5977d46ad7a6a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6665fbd7730b26d770c232b20d1b907e6a67a914","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/176725f4848376530a0f0da9023f956afcc33585","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a01efa7a780c42ac5170a949bd95c9786ffcc60a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/20739af07383e6eb1ec59dcd70b72ebfa9ac362c","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T21:13:54.279Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-68214","url":"https://www.cve.org/CVERecord?id=CVE-2025-68214","licence":"CVE Terms of Use","modified":"2026-11-05T21:23:07.984Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-68214","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68214","licence":"Public domain","modified":"2026-11-05T22:17:36.573Z"}],"updatedAt":"2026-11-25T22:59:09.497Z","epss":{"score":0.00138,"percentile":0.0337,"date":"2026-12-01T12:00:22.000Z"}}