# CVE-2026-46223: cgroup: Defer css percpu\_ref kill on rmdir until cgroup is depopulated

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.11% (percentile 0, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2026-05-28T09:40:40.791Z
- **Modified:** 2026-06-17T10:53:21.750Z

## Who should check

- Anyone running Linux \>= 1b164b876c36c3eb5561dd9b37702b04401b0166, \< 33fa2e6b1507a0a377a151a8826438bedad1d0b0; \>= 1b164b876c36c3eb5561dd9b37702b04401b0166, \< 93618edf753838a727dbff63c7c291dee22d656b; 78c72bce4a87819126211c0d24e18350010604fb; \>= 6.19.12, \< 6.20
- Anyone running Linux 7.0

## Description

In the Linux kernel, the following vulnerability has been resolved:

cgroup: Defer css percpu\_ref kill on rmdir until cgroup is depopulated

A chain of commits going back to v7.0 reworked rmdir to satisfy the
controller invariant that a subsystem's -\>css\_offline() must not run while
tasks are still doing kernel-side work in the cgroup.

\[1\] d245698d727a ("cgroup: Defer task cgroup unlink until after the task is done switching out")
\[2\] a72f73c4dd9b ("cgroup: Don't expose dead tasks in cgroup")
\[3\] 1b164b876c36 ("cgroup: Wait for dying tasks to leave on rmdir")
\[4\] 4c56a8ac6869 ("cgroup: Fix cgroup\_drain\_dying() testing the wrong condition")
\[5\] 13e786b64bd3 ("cgroup: Increment nr\_dying\_subsys\_\* from rmdir context")

\[1\] moved task cset unlink from do\_exit() to finish\_task\_switch() so a
task's cset link drops only after the task has fully stopped scheduling.
That made tasks past exit\_signals() linger on cset-\>tasks until their final
context switch, which led to a series of problems as what userspace expected
to see after rmdir diverged from what the kernel needs to wait for. \[2\]-\[5\]
tried to bridge that divergence: \[2\] filtered the exiting tasks from
cgroup.procs; \[3\] had rmdir(2) sleep in TASK\_UNINTERRUPTIBLE for them; \[4\]
fixed the wait's condition; \[5\] made nr\_dying\_subsys\_\* visible
synchronously.

The cgroup\_drain\_dying() wait in \[3\] turned out to be a dead end. When the
rmdir caller is also the reaper of a zombie that pins a pidns teardown (e.g.
host PID 1 systemd reaping orphan pids that were re-parented to it during
the same teardown), rmdir blocks in TASK\_UNINTERRUPTIBLE waiting for those
pids to free, the pids can't free because PID 1 is the reaper and it's stuck
in rmdir, and the system A-A deadlocks. No internal lock ordering breaks
this; the wait itself is the bug.

The css killing side that drove the original reorder, however, can be made
cleanly asynchronous: -\>css\_offline() is already async, run from
css\_killed\_work\_fn() driven by percpu\_ref\_kill\_and\_confirm(). The fix is to
make that chain start only after all tasks have left the cgroup. rmdir's
user-visible side then returns as soon as cgroup.procs and friends are
empty, while -\>css\_offline() still runs only after the cgroup is fully
drained.

Verified by the original reproducer (pidns teardown + zombie reaper, runs
under vng) which hangs vanilla and succeeds here, and by per-commit
deterministic repros for \[2\], \[3\], \[4\], \[5\] with a boot parameter that
widens the post-exit\_signals() window so each state is reliably reachable.
Some stress tests on top of that.

cgroup\_apply\_control\_disable() has the same shape of pre-existing race:
when a controller is disabled via subtree\_control, kill\_css() ran
synchronously while tasks past exit\_signals() could still be linked to
the cgroup's csets, and -\>css\_offline() could fire before they drained.
This patch preserves the existing synchronous behavior at that call site
(kill\_css\_sync() + kill\_css\_finish() back-to-back) and a follow-up patch
will defer kill\_css\_finish() there using a per-css trigger.

This seems like the right approach and I don't see problems with it. The
changes are somewhat invasive but not excessively so, so backporting to
-stable should be okay. If something does turn out to be wrong, the fallback
is to revert the entire chain (\[1\]-\[5\]) and rework in the development branch
instead.

v2: Pin cgrp across the deferred destroy work with explicit
    cgroup\_get()/cgroup\_put() around queue\_work() and the work\_fn. v1
    wasn't actually broken (ordered cgroup\_offline\_wq + queue\_work order
    in cgroup\_task\_dead() saved it) but the explicit ref removes the
    dependency on those non-obvious invariants. Also note the
    pre-existing cgroup\_apply\_control\_disable() race in the description;
    a follow-up will defer kill\_css\_finish() there.

## Affected and fixed versions

- Linux: \>= 1b164b876c36c3eb5561dd9b37702b04401b0166, \< 33fa2e6b1507a0a377a151a8826438bedad1d0b0; \>= 1b164b876c36c3eb5561dd9b37702b04401b0166, \< 93618edf753838a727dbff63c7c291dee22d656b; 78c72bce4a87819126211c0d24e18350010604fb; \>= 6.19.12, \< 6.20 (cvelist)
- Linux: 7.0 (cvelist)

## Mitigation

- Upgrade Linux to 6.20 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-46223. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-46223.md
Affected: Linux >= 1b164b876c36c3eb5561dd9b37702b04401b0166, < 33fa2e6b1507a0a377a151a8826438bedad1d0b0; >= 1b164b876c36c3eb5561dd9b37702b04401b0166, < 93618edf753838a727dbff63c7c291dee22d656b; 78c72bce4a87819126211c0d24e18350010604fb; >= 6.19.12, < 6.20; Linux 7.0
Fixed in: Linux 33fa2e6b1507a0a377a151a8826438bedad1d0b0, Linux 93618edf753838a727dbff63c7c291dee22d656b, Linux 6.20

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-46223 being exploited?

There is no confirmed exploitation: CVE-2026-46223 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.11% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-46223?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-46223?

Linux \>= 1b164b876c36c3eb5561dd9b37702b04401b0166, \< 33fa2e6b1507a0a377a151a8826438bedad1d0b0; \>= 1b164b876c36c3eb5561dd9b37702b04401b0166, \< 93618edf753838a727dbff63c7c291dee22d656b; 78c72bce4a87819126211c0d24e18350010604fb; \>= 6.19.12, \< 6.20; Linux 7.0.

### Is there a fix for CVE-2026-46223?

Yes. Fixed in Linux 33fa2e6b1507a0a377a151a8826438bedad1d0b0, Linux 93618edf753838a727dbff63c7c291dee22d656b, Linux 6.20. Upgrade Linux to 6.20 or later.

### How do I check if I'm affected by CVE-2026-46223?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/33fa2e6b1507a0a377a151a8826438bedad1d0b0>
- patch: <https://git.kernel.org/stable/c/93618edf753838a727dbff63c7c291dee22d656b>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-46223>

HTML: <https://flawdb.com/CVE-2026-46223> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-46223>
