{"id":"DEBIAN-CVE-2022-49647","details":"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-\u003emg_preload_node on either the mgctx-\u003epreloaded_src_csets or mgctx-\u003epreloaded_dst_csets list. Using the same cset-\u003emg_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\u003e mkdir -p /sys/fs/cgroup/misc/a/b  #2\u003e echo $$ \u003e /sys/fs/cgroup/misc/a/cgroup.procs  #3\u003e RUN_A_COMMAND_WHICH_CREATES_MULTIPLE_THREADS &  #4\u003e PID=$!  #5\u003e echo $PID \u003e /sys/fs/cgroup/misc/a/b/tasks  #6\u003e echo $PID \u003e /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 -\u003emg_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 -\u003emg_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-\u003emg_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-\u003emg_preload_node into -\u003emg_src_preload_node and -\u003emg_dst_preload_node, so that the src and dst preloadings don't interfere with each other.","modified":"2026-09-01T16:05:32.933857144Z","published":"2025-02-26T07:01:39.863Z","upstream":["CVE-2022-49647"],"references":[{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2022-49647"}],"affected":[{"package":{"name":"linux","ecosystem":"Debian:12","purl":"pkg:deb/debian/linux?arch=source&distro=bookworm"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.18.14-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2022-49647.json"}},{"package":{"name":"linux","ecosystem":"Debian:13","purl":"pkg:deb/debian/linux?arch=source&distro=trixie"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.18.14-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2022-49647.json"}},{"package":{"name":"linux","ecosystem":"Debian:14","purl":"pkg:deb/debian/linux?arch=source&distro=forky"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.18.14-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2022-49647.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}