{"id":"CVE-2026-64251","aliases":["CVE-2026-64251"],"related":[],"kind":"vulnerability","state":"published","title":"pwrseq: core: fix use-after-free in pwrseq_debugfs_seq_next()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\npwrseq: core: fix use-after-free in pwrseq_debugfs_seq_next()\n\npwrseq_debugfs_seq_next() declares 'next' with __free(put_device),\nwhich causes put_device() to be called on the returned pointer when\nthe variable goes out of scope.  This results in a use-after-free\nsince the seq_file framework receives a pointer whose reference has\nalready been dropped.\n\nSimply removing __free(put_device) would fix the UAF but would leak\nthe reference acquired by bus_find_next_device(), as stop() only\ncalls up_read(&pwrseq_sem) and never releases the device reference.\n\nFix this by making the reference counting consistent across all\nseq_file callbacks, matching the standard pattern used by PCI and\nSCSI:\n\n- start(): use get_device() so it returns a referenced pointer.\n- next(): explicitly put_device(curr) to release the previous\n  device's reference (no NULL check needed - the seq_file framework\n  only calls next() while the previous return was non-NULL).\n- stop(): put_device(data) to release the last iterated device's\n  reference, with a NULL guard since stop() may be called with NULL\n  when start() returned NULL or next() reached end-of-sequence.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\npwrseq: core: fix use-after-free in pwrseq_debugfs_seq_next()\n\npwrseq_debugfs_seq_next() declares 'next' with __free(put_device),\nwhich causes put_device() to be called on the returned pointer when\nthe variable goes out of scope.  This results in a use-after-free\nsince the seq_file framework receives a pointer whose reference has\nalready been dropped.\n\nSimply removing __free(put_device) would fix the UAF but would leak\nthe reference acquired by bus_find_next_device(), as stop() only\ncalls up_read(&pwrseq_sem) and never releases the device reference.\n\nFix this by making the reference counting consistent across all\nseq_file callbacks, matching the standard pattern used by PCI and\nSCSI:\n\n- start(): use get_device() so it returns a referenced pointer.\n- next(): explicitly put_device(curr) to release the previous\n  device's reference (no NULL check needed - the seq_file framework\n  only calls next() while the previous return was non-NULL).\n- stop(): put_device(data) to release the last iterated device's\n  reference, with a NULL guard since stop() may be called with NULL\n  when start() returned NULL or next() reached end-of-sequence.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\npwrseq: core: corrección de uso después de liberación en pwrseq_debugfs_seq_next()\n\npwrseq_debugfs_seq_next() declara ’next’ con __free(put_device), lo que provoca que se llame a put_device() en el puntero devuelto cuando la variable sale de ámbito. Esto resulta en un uso después de liberación ya que el framework seq_file recibe un puntero cuya referencia ya ha sido liberada.\n\nSimplemente eliminar __free(put_device) corregiría el UAF pero fugaría la referencia adquirida por bus_find_next_device(), ya que stop() solo llama a up_read(&pwrseq_sem) y nunca libera la referencia del dispositivo.\n\nCorregir esto haciendo que el conteo de referencias sea consistente en todas las retrollamadas de seq_file, coincidiendo con el patrón estándar utilizado por PCI y SCSI:\n\n- start(): usar get_device() para que devuelva un puntero referenciado.\n- next(): llamar explícitamente a put_device(curr) para liberar la referencia del dispositivo anterior (no se necesita comprobación de NULL - el framework seq_file solo llama a next() mientras el retorno anterior no era NULL).\n- stop(): llamar a put_device(data) para liberar la referencia del último dispositivo iterado, con una protección contra NULL ya que stop() puede ser llamado con NULL cuando start() devolvió NULL o next() alcanzó el fin de secuencia.","source":"nvd"}],"published":"2026-07-24T15:31:17.601Z","modified":"2026-11-08T20:10:00.187Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"249ebf3f65f8530beb2cbfb91bff1d83ba88d23c","fixed":"ba0b9f04c7a5f9887b8ce672eaf049502c0548ec","status":"affected"},{"type":"git","introduced":"249ebf3f65f8530beb2cbfb91bff1d83ba88d23c","fixed":"e91df6d273445c03f5aa302bfe147eda33d45794","status":"affected"},{"type":"git","introduced":"249ebf3f65f8530beb2cbfb91bff1d83ba88d23c","fixed":"73569a44fca2992f0ca4a4c0104069741b9873a0","status":"affected"},{"type":"git","introduced":"249ebf3f65f8530beb2cbfb91bff1d83ba88d23c","fixed":"257595adf9dac15ae1edd9d07753fbc576a7583d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.11","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.11","status":"unaffected"},{"type":"semver","introduced":"6.12.95","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.38","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.1.3","lastAffected":"7.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.2","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.11","fixed":"6.12.95"},{"status":"affected","introduced":"6.13","fixed":"6.18.38"},{"status":"affected","introduced":"6.19","fixed":"7.1.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/ba0b9f04c7a5f9887b8ce672eaf049502c0548ec","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e91df6d273445c03f5aa302bfe147eda33d45794","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/73569a44fca2992f0ca4a4c0104069741b9873a0","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/257595adf9dac15ae1edd9d07753fbc576a7583d","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-64251","url":"https://www.cve.org/CVERecord?id=CVE-2026-64251","licence":"CVE Terms of Use","modified":"2026-08-17T04:52:02.919Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-64251","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64251","licence":"Public domain","modified":"2026-11-08T20:10:00.187Z"}],"updatedAt":"2026-11-25T22:59:30.019Z","epss":{"score":0.00117,"percentile":0.01816,"date":"2026-12-01T12:00:22.000Z"}}