{"id":"CVE-2025-68214","summary":"timers: Fix NULL function pointer race in timer_shutdown_sync()","details":"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\u003cSOFTIRQ\u003e\n\t\t\t\t\tlock_timer_base()\n\t\t\t\t\texpire_timers()\n\t\t\t\t\tbase-\u003erunning_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-\u003erunning_timer != timer)\n\tret = detach_if_pending(timer, base, true);\nif (shutdown)\n\ttimer-\u003efunction = 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-\u003erunning_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\u003cSOFTIRQ\u003e\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-\u003erunning_timer != timer)\n\tret = detach_if_pending(timer, base, true);\nif (shutdown)\n\ttimer-\u003efunction = 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.","modified":"2026-03-13T04:02:49.328015Z","published":"2025-12-16T13:57:09.728Z","related":["MGASA-2026-0017","MGASA-2026-0018"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68214.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/176725f4848376530a0f0da9023f956afcc33585"},{"type":"WEB","url":"https://git.kernel.org/stable/c/1a975716cc8977f461e45e28e3e5977d46ad7a6a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/20739af07383e6eb1ec59dcd70b72ebfa9ac362c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6665fbd7730b26d770c232b20d1b907e6a67a914"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a01efa7a780c42ac5170a949bd95c9786ffcc60a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ba43ac025c4318241f8edf94f31d2eebab86991b"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68214.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68214"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"debbcf812d735003c96c5e5968a3cfa4e1fbd1af"},{"fixed":"ba43ac025c4318241f8edf94f31d2eebab86991b"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"334c33aa487be406a149c8b87c38c8399d2dba8d"},{"fixed":"1a975716cc8977f461e45e28e3e5977d46ad7a6a"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0cc04e80458a822300b93f82ed861a513edde194"},{"fixed":"6665fbd7730b26d770c232b20d1b907e6a67a914"},{"fixed":"176725f4848376530a0f0da9023f956afcc33585"},{"fixed":"a01efa7a780c42ac5170a949bd95c9786ffcc60a"},{"fixed":"20739af07383e6eb1ec59dcd70b72ebfa9ac362c"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68214.json"}}],"schema_version":"1.7.5"}