# CVE-2022-49647: cgroup: Use separate src/dst nodes when preloading css\_sets for migration

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.30% (percentile 15, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-02-26T02:23:51.561Z
- **Modified:** 2026-08-05T08:55:55.097Z

## Who should check

- Anyone running Linux \>= f817de98513d060023be4fa1d061b29a6515273e, \< 05f7658210d1d331e8dd4cb6e7bbbe3df5f5ac27; \>= f817de98513d060023be4fa1d061b29a6515273e, \< cec2bbdcc14fbaa6b95ee15a7c423b05d97038be; \>= f817de98513d060023be4fa1d061b29a6515273e, \< ad44e05f3e016bdcb1ad25af35ade5b5f41ccd68; \>= f817de98513d060023be4fa1d061b29a6515273e, \< 7657e3958535d101a24ab4400f9b8062b9107cc4; \>= f817de98513d060023be4fa1d061b29a6515273e, \< 54aee4e5ce8c21555286a6333e46c1713880cf93; \>= f817de98513d060023be4fa1d061b29a6515273e, \< 0e41774b564befa6d271e8d5086bf870d617a4e6; \>= f817de98513d060023be4fa1d061b29a6515273e, \< 07fd5b6cdf3cc30bfde8fe0f644771688be04447
- Anyone running Linux 3.16

## Description

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

cgroup: Use separate src/dst nodes when preloading css\_sets for migration

Each cset (css\_set) is pinned by its tasks. When we're moving tasks around
across csets for a migration, we need to hold the source and destination
csets to ensure that they don't go away while we're moving tasks about. This
is done by linking cset-\>mg\_preload\_node on either the
mgctx-\>preloaded\_src\_csets or mgctx-\>preloaded\_dst\_csets list. Using the
same cset-\>mg\_preload\_node for both the src and dst lists was deemed okay as
a cset can't be both the source and destination at the same time.

Unfortunately, this overloading becomes problematic when multiple tasks are
involved in a migration and some of them are identity noop migrations while
others are actually moving across cgroups. For example, this can happen with
the following sequence on cgroup1:

 \#1\> mkdir -p /sys/fs/cgroup/misc/a/b
 \#2\> echo $$ \> /sys/fs/cgroup/misc/a/cgroup.procs
 \#3\> RUN\_A\_COMMAND\_WHICH\_CREATES\_MULTIPLE\_THREADS &
 \#4\> PID=$!
 \#5\> echo $PID \> /sys/fs/cgroup/misc/a/b/tasks
 \#6\> echo $PID \> /sys/fs/cgroup/misc/a/cgroup.procs

the process including the group leader back into a. In this final migration,
non-leader threads would be doing identity migration while the group leader
is doing an actual one.

After \#3, let's say the whole process was in cset A, and that after \#4, the
leader moves to cset B. Then, during \#6, the following happens:

 1. cgroup\_migrate\_add\_src() is called on B for the leader.

 2. cgroup\_migrate\_add\_src() is called on A for the other threads.

 3. cgroup\_migrate\_prepare\_dst() is called. It scans the src list.

 4. It notices that B wants to migrate to A, so it tries to A to the dst
    list but realizes that its -\>mg\_preload\_node is already busy.

 5. and then it notices A wants to migrate to A as it's an identity
    migration, it culls it by list\_del\_init()'ing its -\>mg\_preload\_node and
    putting references accordingly.

 6. The rest of migration takes place with B on the src list but nothing on
    the dst list.

This means that A isn't held while migration is in progress. If all tasks
leave A before the migration finishes and the incoming task pins it, the
cset will be destroyed leading to use-after-free.

This is caused by overloading cset-\>mg\_preload\_node for both src and dst
preload lists. We wanted to exclude the cset from the src list but ended up
inadvertently excluding it from the dst list too.

This patch fixes the issue by separating out cset-\>mg\_preload\_node into
-\>mg\_src\_preload\_node and -\>mg\_dst\_preload\_node, so that the src and dst
preloadings don't interfere with each other.

## Affected and fixed versions

- Linux: \>= f817de98513d060023be4fa1d061b29a6515273e, \< 05f7658210d1d331e8dd4cb6e7bbbe3df5f5ac27; \>= f817de98513d060023be4fa1d061b29a6515273e, \< cec2bbdcc14fbaa6b95ee15a7c423b05d97038be; \>= f817de98513d060023be4fa1d061b29a6515273e, \< ad44e05f3e016bdcb1ad25af35ade5b5f41ccd68; \>= f817de98513d060023be4fa1d061b29a6515273e, \< 7657e3958535d101a24ab4400f9b8062b9107cc4; \>= f817de98513d060023be4fa1d061b29a6515273e, \< 54aee4e5ce8c21555286a6333e46c1713880cf93; \>= f817de98513d060023be4fa1d061b29a6515273e, \< 0e41774b564befa6d271e8d5086bf870d617a4e6; \>= f817de98513d060023be4fa1d061b29a6515273e, \< 07fd5b6cdf3cc30bfde8fe0f644771688be04447 (cvelist)
- Linux: 3.16 (cvelist)

## Mitigation

- Upgrade Linux to 07fd5b6cdf3cc30bfde8fe0f644771688be04447 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-49647.md
Affected: Linux >= f817de98513d060023be4fa1d061b29a6515273e, < 05f7658210d1d331e8dd4cb6e7bbbe3df5f5ac27; >= f817de98513d060023be4fa1d061b29a6515273e, < cec2bbdcc14fbaa6b95ee15a7c423b05d97038be; >= f817de98513d060023be4fa1d061b29a6515273e, < ad44e05f3e016bdcb1ad25af35ade5b5f41ccd68; >= f817de98513d060023be4fa…
Fixed in: Linux 05f7658210d1d331e8dd4cb6e7bbbe3df5f5ac27, Linux 7657e3958535d101a24ab4400f9b8062b9107cc4, Linux 54aee4e5ce8c21555286a6333e46c1713880cf93, Linux 0e41774b564befa6d271e8d5086bf870d617a4e6, Linux 07fd5b6cdf3cc30bfde8fe0f644771688be04447

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-2022-49647 being exploited?

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

### How serious is CVE-2022-49647?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-49647?

Linux \>= f817de98513d060023be4fa1d061b29a6515273e, \< 05f7658210d1d331e8dd4cb6e7bbbe3df5f5ac27; \>= f817de98513d060023be4fa1d061b29a6515273e, \< cec2bbdcc14fbaa6b95ee15a7c423b05d97038be; \>= f817de98513d060023be4fa1d061b29a6515273e, \< ad44e05f3e016bdcb1ad25af35ade5b5f41ccd68; \>= f817de98513d060023be4fa1d061b29a6515273e, \< 7657e3958535d101a24ab4400f9b8062b9107cc4; \>= f817de98513d060023be4fa1d061b29a6515273e, \< 54aee4e5ce8c21555286a6333e46c1713880cf93; \>= f817de98513d060023be4fa1d061b29a6515273e, \< 0e41774b564befa6d271e8d5086bf870d617a4e6; \>= f817de98513d060023be4fa1d061b29a6515273e, \< 07fd5b6cdf3cc30bfde8fe0f644771688be04447; Linux 3.16.

### Is there a fix for CVE-2022-49647?

Yes. Fixed in Linux 05f7658210d1d331e8dd4cb6e7bbbe3df5f5ac27, Linux 7657e3958535d101a24ab4400f9b8062b9107cc4, Linux 54aee4e5ce8c21555286a6333e46c1713880cf93, Linux 0e41774b564befa6d271e8d5086bf870d617a4e6, Linux 07fd5b6cdf3cc30bfde8fe0f644771688be04447. Upgrade Linux to 07fd5b6cdf3cc30bfde8fe0f644771688be04447 or later.

### How do I check if I'm affected by CVE-2022-49647?

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/05f7658210d1d331e8dd4cb6e7bbbe3df5f5ac27>
- patch: <https://git.kernel.org/stable/c/cec2bbdcc14fbaa6b95ee15a7c423b05d97038be>
- patch: <https://git.kernel.org/stable/c/ad44e05f3e016bdcb1ad25af35ade5b5f41ccd68>
- patch: <https://git.kernel.org/stable/c/7657e3958535d101a24ab4400f9b8062b9107cc4>
- patch: <https://git.kernel.org/stable/c/54aee4e5ce8c21555286a6333e46c1713880cf93>
- patch: <https://git.kernel.org/stable/c/0e41774b564befa6d271e8d5086bf870d617a4e6>
- patch: <https://git.kernel.org/stable/c/07fd5b6cdf3cc30bfde8fe0f644771688be04447>

## 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-2022-49647>

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