{"id":"CVE-2025-39994","aliases":["CVE-2025-39994"],"related":[],"kind":"vulnerability","state":"published","title":"media: tuner: xc5000: Fix use-after-free in xc5000_release","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: tuner: xc5000: Fix use-after-free in xc5000_release\n\nThe original code uses cancel_delayed_work() in xc5000_release(), which\ndoes not guarantee that the delayed work item timer_sleep has fully\ncompleted if it was already running. This leads to use-after-free scenarios\nwhere xc5000_release() may free the xc5000_priv while timer_sleep is still\nactive and attempts to dereference the xc5000_priv.\n\nA typical race condition is illustrated below:\n\nCPU 0 (release thread)                 | CPU 1 (delayed work callback)\nxc5000_release()                       | xc5000_do_timer_sleep()\n  cancel_delayed_work()                |\n  hybrid_tuner_release_state(priv)     |\n    kfree(priv)                        |\n                                       |   priv = container_of() // UAF\n\nReplace cancel_delayed_work() with cancel_delayed_work_sync() to ensure\nthat the timer_sleep is properly canceled before the xc5000_priv memory\nis deallocated.\n\nA deadlock concern was considered: xc5000_release() is called in a process\ncontext and is not holding any locks that the timer_sleep work item might\nalso need. Therefore, the use of the _sync() variant is safe here.\n\nThis bug was initially identified through static analysis.\n\n[hverkuil: fix typo in Subject: tunner -> tuner]","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: tuner: xc5000: Fix use-after-free in xc5000_release\n\nThe original code uses cancel_delayed_work() in xc5000_release(), which\ndoes not guarantee that the delayed work item timer_sleep has fully\ncompleted if it was already running. This leads to use-after-free scenarios\nwhere xc5000_release() may free the xc5000_priv while timer_sleep is still\nactive and attempts to dereference the xc5000_priv.\n\nA typical race condition is illustrated below:\n\nCPU 0 (release thread)                 | CPU 1 (delayed work callback)\nxc5000_release()                       | xc5000_do_timer_sleep()\n  cancel_delayed_work()                |\n  hybrid_tuner_release_state(priv)     |\n    kfree(priv)                        |\n                                       |   priv = container_of() // UAF\n\nReplace cancel_delayed_work() with cancel_delayed_work_sync() to ensure\nthat the timer_sleep is properly canceled before the xc5000_priv memory\nis deallocated.\n\nA deadlock concern was considered: xc5000_release() is called in a process\ncontext and is not holding any locks that the timer_sleep work item might\nalso need. Therefore, the use of the _sync() variant is safe here.\n\nThis bug was initially identified through static analysis.\n\n[hverkuil: fix typo in Subject: tunner -> tuner]","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nmedia: tuner: xc5000: Corrige uso después de liberación en xc5000_release\n\nEl código original utiliza cancel_delayed_work() en xc5000_release(), lo que no garantiza que el elemento de trabajo retrasado timer_sleep haya completado totalmente si ya estaba en ejecución. Esto lleva a escenarios de uso después de liberación donde xc5000_release() puede liberar el xc5000_priv mientras timer_sleep todavía está activo e intenta desreferenciar el xc5000_priv.\n\nUna condición de carrera típica se ilustra a continuación:\n\nCPU 0 (hilo de liberación)                 | CPU 1 (callback de trabajo retrasado)\nxc5000_release()                       | xc5000_do_timer_sleep()\n  cancel_delayed_work()                |\n  hybrid_tuner_release_state(priv)     |\n    kfree(priv)                        |\n                                       |   priv = container_of() // UAF\n\nReemplace cancel_delayed_work() con cancel_delayed_work_sync() para asegurar que el timer_sleep sea cancelado correctamente antes de que la memoria de xc5000_priv sea desasignada.\n\nSe consideró una preocupación por interbloqueo: xc5000_release() es llamado en un contexto de proceso y no está reteniendo ningún bloqueo que el elemento de trabajo timer_sleep también pudiera necesitar. Por lo tanto, el uso de la variante _sync() es seguro aquí.\n\nEste error fue inicialmente identificado mediante análisis estático.\n\n[hverkuil: corrige error tipográfico en Asunto: tunner -> tuner]","source":"nvd"}],"published":"2025-10-15T07:58:19.503Z","modified":"2026-10-19T21:10:00.160Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","score":7.3,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","score":7.3,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"f7a27ff1fb77e114d1059a5eb2ed1cffdc508ce8","fixed":"bc4ffd962ce16a154c44c68853b9d93f5b6fc4b8","status":"affected"},{"type":"git","introduced":"f7a27ff1fb77e114d1059a5eb2ed1cffdc508ce8","fixed":"e2f5eaafc0306a76fb1cb760aae804b065b8a341","status":"affected"},{"type":"git","introduced":"f7a27ff1fb77e114d1059a5eb2ed1cffdc508ce8","fixed":"3f876cd47ed8bca1e28d68435845949f51f90703","status":"affected"},{"type":"git","introduced":"f7a27ff1fb77e114d1059a5eb2ed1cffdc508ce8","fixed":"df0303b4839520b84d9367c2fad65b13650a4d42","status":"affected"},{"type":"git","introduced":"f7a27ff1fb77e114d1059a5eb2ed1cffdc508ce8","fixed":"71ed8b81a4906cb785966910f39cf7f5ad60a69e","status":"affected"},{"type":"git","introduced":"f7a27ff1fb77e114d1059a5eb2ed1cffdc508ce8","fixed":"effb1c19583bca7022fa641a70766de45c6d41ac","status":"affected"},{"type":"git","introduced":"f7a27ff1fb77e114d1059a5eb2ed1cffdc508ce8","fixed":"9a00de20ed8ba90888479749b87bc1532cded4ce","status":"affected"},{"type":"git","introduced":"f7a27ff1fb77e114d1059a5eb2ed1cffdc508ce8","fixed":"4266f012806fc18e46da4a04d130df59a4946f93","status":"affected"},{"type":"git","introduced":"f7a27ff1fb77e114d1059a5eb2ed1cffdc508ce8","fixed":"40b7a19f321e65789612ebaca966472055dab48c","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.16","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.16","status":"unaffected"},{"type":"semver","introduced":"5.4.301","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.246","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.195","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.156","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.111","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.51","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.16.11","lastAffected":"6.16.*","status":"unaffected"},{"type":"semver","introduced":"6.17.1","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"}],"references":[{"url":"https://git.kernel.org/stable/c/bc4ffd962ce16a154c44c68853b9d93f5b6fc4b8","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e2f5eaafc0306a76fb1cb760aae804b065b8a341","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3f876cd47ed8bca1e28d68435845949f51f90703","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/df0303b4839520b84d9367c2fad65b13650a4d42","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/71ed8b81a4906cb785966910f39cf7f5ad60a69e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/effb1c19583bca7022fa641a70766de45c6d41ac","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9a00de20ed8ba90888479749b87bc1532cded4ce","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4266f012806fc18e46da4a04d130df59a4946f93","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/40b7a19f321e65789612ebaca966472055dab48c","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-15T21:55:59.194Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-39994","url":"https://www.cve.org/CVERecord?id=CVE-2025-39994","licence":"CVE Terms of Use","modified":"2026-10-15T22:02:35.851Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-39994","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39994","licence":"Public domain","modified":"2026-10-19T21:10:00.160Z"}],"updatedAt":"2026-11-25T22:59:06.408Z","epss":{"score":0.00159,"percentile":0.05313,"date":"2026-12-01T12:00:22.000Z"}}