{"id":"CVE-2026-64251","published":"2026-07-24T15:31:17Z","modified":"2026-08-17T04:52:02Z","title":"pwrseq: core: fix use-after-free in pwrseq_debugfs_seq_next()","vendor":"Linux","product":"Linux","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0017,"percentile":0.06386,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/ba0b9f04c7a5f9887b8ce672eaf049502c0548ec","tags":[]},{"url":"https://git.kernel.org/stable/c/e91df6d273445c03f5aa302bfe147eda33d45794","tags":[]},{"url":"https://git.kernel.org/stable/c/73569a44fca2992f0ca4a4c0104069741b9873a0","tags":[]},{"url":"https://git.kernel.org/stable/c/257595adf9dac15ae1edd9d07753fbc576a7583d","tags":[]}],"priority":{"score":6.7,"factors":[{"name":"EPSS percentile","points":1.28},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 249ebf3f65f8530beb2cbfb91bff1d83ba88d23c, < ba0b9f04c7a5f9887b8ce672eaf049502c0548ec",">= 249ebf3f65f8530beb2cbfb91bff1d83ba88d23c, < e91df6d273445c03f5aa302bfe147eda33d45794",">= 249ebf3f65f8530beb2cbfb91bff1d83ba88d23c, < 73569a44fca2992f0ca4a4c0104069741b9873a0",">= 249ebf3f65f8530beb2cbfb91bff1d83ba88d23c, < 257595adf9dac15ae1edd9d07753fbc576a7583d"]},{"vendor":"Linux","product":"Linux","versions":["6.11"]}],"euvd":{"id":"EUVD-2026-48660","exploited":false,"provenance":"source"}}