CVE-2023-54019
Unknown Unknown - Not Provided
Use-After-Free Vulnerability in Linux Kernel PSI Trigger Polling

Publication date: 2025-12-24

Last updated on: 2025-12-24

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: sched/psi: use kernfs polling functions for PSI trigger polling Destroying psi trigger in cgroup_file_release causes UAF issues when a cgroup is removed from under a polling process. This is happening because cgroup removal causes a call to cgroup_file_release while the actual file is still alive. Destroying the trigger at this point would also destroy its waitqueue head and if there is still a polling process on that file accessing the waitqueue, it will step on the freed pointer: do_select vfs_poll do_rmdir cgroup_rmdir kernfs_drain_open_files cgroup_file_release cgroup_pressure_release psi_trigger_destroy wake_up_pollfree(&t->event_wait) // vfs_poll is unblocked synchronize_rcu kfree(t) poll_freewait -> UAF access to the trigger's waitqueue head Patch [1] fixed this issue for epoll() case using wake_up_pollfree(), however the same issue exists for synchronous poll() case. The root cause of this issue is that the lifecycles of the psi trigger's waitqueue and of the file associated with the trigger are different. Fix this by using kernfs_generic_poll function when polling on cgroup-specific psi triggers. It internally uses kernfs_open_node->poll waitqueue head with its lifecycle tied to the file's lifecycle. This also renders the fix in [1] obsolete, so revert it. [1] commit c2dbe32d5db5 ("sched/psi: Fix use-after-free in ep_remove_wait_queue()")
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-12-24
Last Modified
2025-12-24
Generated
2026-05-07
AI Q&A
2025-12-25
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
linux linux_kernel *
linux kernel *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Powered Q&A
What immediate steps should I take to mitigate this vulnerability?

Apply the patch that fixes the use-after-free issue by using the kernfs_generic_poll function for polling on cgroup-specific psi triggers. This patch corrects the lifecycle management of the psi trigger's waitqueue and the associated file, preventing the use-after-free condition. Reverting the previous fix that addressed only the epoll() case is also part of the resolution.


Can you explain this vulnerability to me?

This vulnerability is a use-after-free (UAF) issue in the Linux kernel related to pressure stall information (PSI) triggers in cgroups. When a cgroup is removed while a polling process is still accessing a file associated with a PSI trigger, the trigger is destroyed prematurely, freeing memory that is still in use. This leads to the polling process accessing freed memory, causing undefined behavior or potential crashes. The root cause is the mismatch in lifecycle management between the PSI trigger's waitqueue and the file associated with it. The fix involves using kernfs_generic_poll to tie the waitqueue's lifecycle to the file's lifecycle, preventing premature destruction.


How can this vulnerability impact me? :

This vulnerability can lead to use-after-free memory access in the Linux kernel, which may cause system instability, crashes, or potential exploitation by attackers to execute arbitrary code or escalate privileges. Systems using cgroups with PSI triggers and polling processes are at risk if the vulnerability is not patched.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart