CVE-2026-139744: cgroup: Make the offline drain interruptible
In the Linux kernel, the following vulnerability has been resolved:
cgroup: Make the offline drain interruptible
cgroupsubtreecontrolwrite() and cgrouptypewrite() drain dying csses from the subtree before re-applying control, so that a controller being re-enabled gets a fresh css instead of adopting one that is still dying. The drain waits for offlinecss() in TASKUNINTERRUPTIBLE.
Since 1dffd95575eb ("cgroup: Defer killcssfinish() in cgroupapplycontroldisable()"), a disabled css offlines only after every task that still pins it has finished exiting. The root cause of the hang is an indefinite wait in a place where indefinite waits should not happen: a task past exitsignals() can block in its exit path for as long as, say, a FUSE daemon takes to answer a flush, and nothing can interrupt it because preparesignal() drops every signal for an exiting group. The drain then escalated that into an uninterruptible wait for the writer, which sits in D state for as long as the exiting task does. That is the hang syzbot reports as "task hung in cgroupsubtreecontrolwrite".
Make the drain interruptible. Nothing has been modified when it runs, so the write restarts or fails with EINTR without side effects. cgroup1 mount and remount drain the same way and become interruptible too. cgroupdestroyroot() drains from a workqueue where no signal is ever pending and keeps waiting as before.
This only stops the escalation. The write still waits for the exiting tasks, and the indefinite wait in the exit path remains a separate problem.
Affected Software
Event History
Frequently Asked Questions
Which systems are most likely to encounter this hang?
Systems that change cgroup subtree controller settings or cgroup type while a CSS is being offlined are exposed. The problematic condition occurs when an exiting task still pins the disabled CSS and its exit is delayed, for example while waiting for a FUSE daemon to complete a flush.
How can I recognize that this issue is occurring?
A process writing cgroup control settings can become stuck in uninterruptible D state. The reported symptom is a hung task in cgroup_subtree_control_write.
What changes after the fix?
The drain of dying CSS objects becomes interruptible rather than waiting indefinitely. Because no changes have been made when the drain runs, the cgroup control write can be restarted or fail instead of leaving the writer blocked indefinitely.