OESA-2025-1597 (CVE-2022-49647)
Vulnerability from osv_openeuler – Published: 2025-06-06 11:08 – Updated: 2026-08-06 11:08 – Source websiteThe Linux Kernel, the operating system core itself.
Security Fix(es):
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:
-
cgroup_migrate_add_src() is called on B for the leader.
-
cgroup_migrate_add_src() is called on A for the other threads.
-
cgroup_migrate_prepare_dst() is called. It scans the src list.
-
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.
-
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.
-
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.(CVE-2022-49647)
In the Linux kernel, the following vulnerability has been resolved:
fs/jfs: Prevent integer overflow in AG size calculation
The JFS filesystem calculates allocation group (AG) size using 1 << l2agsize in dbExtendFS(). When l2agsize exceeds 31 (possible with >2TB aggregates on 32-bit systems), this 32-bit shift operation causes undefined behavior and improper AG sizing.
On 32-bit architectures: - Left-shifting 1 by 32+ bits results in 0 due to integer overflow - This creates invalid AG sizes (0 or garbage values) in sbi->bmap->db_agsize - Subsequent block allocations would reference invalid AG structures - Could lead to: - Filesystem corruption during extend operations - Kernel crashes due to invalid memory accesses - Security vulnerabilities via malformed on-disk structures
Fix by casting to s64 before shifting: bmp->db_agsize = (s64)1 << l2agsize;
This ensures 64-bit arithmetic even on 32-bit architectures. The cast matches the data type of db_agsize (s64) and follows similar patterns in JFS block calculation code.
Found by Linux Verification Center (linuxtesting.org) with SVACE.(CVE-2025-37858)
| URL | Type | |
|---|---|---|
{
"affected": [
{
"ecosystem_specific": {
"aarch64": [
"kernel-5.10.0-266.0.0.168.oe2203sp3.aarch64.rpm",
"kernel-debuginfo-5.10.0-266.0.0.168.oe2203sp3.aarch64.rpm",
"kernel-debugsource-5.10.0-266.0.0.168.oe2203sp3.aarch64.rpm",
"kernel-devel-5.10.0-266.0.0.168.oe2203sp3.aarch64.rpm",
"kernel-headers-5.10.0-266.0.0.168.oe2203sp3.aarch64.rpm",
"kernel-source-5.10.0-266.0.0.168.oe2203sp3.aarch64.rpm",
"kernel-tools-5.10.0-266.0.0.168.oe2203sp3.aarch64.rpm",
"kernel-tools-debuginfo-5.10.0-266.0.0.168.oe2203sp3.aarch64.rpm",
"kernel-tools-devel-5.10.0-266.0.0.168.oe2203sp3.aarch64.rpm",
"perf-5.10.0-266.0.0.168.oe2203sp3.aarch64.rpm",
"perf-debuginfo-5.10.0-266.0.0.168.oe2203sp3.aarch64.rpm",
"python3-perf-5.10.0-266.0.0.168.oe2203sp3.aarch64.rpm",
"python3-perf-debuginfo-5.10.0-266.0.0.168.oe2203sp3.aarch64.rpm"
],
"src": [
"kernel-5.10.0-266.0.0.168.oe2203sp3.src.rpm"
],
"x86_64": [
"kernel-5.10.0-266.0.0.168.oe2203sp3.x86_64.rpm",
"kernel-debuginfo-5.10.0-266.0.0.168.oe2203sp3.x86_64.rpm",
"kernel-debugsource-5.10.0-266.0.0.168.oe2203sp3.x86_64.rpm",
"kernel-devel-5.10.0-266.0.0.168.oe2203sp3.x86_64.rpm",
"kernel-headers-5.10.0-266.0.0.168.oe2203sp3.x86_64.rpm",
"kernel-source-5.10.0-266.0.0.168.oe2203sp3.x86_64.rpm",
"kernel-tools-5.10.0-266.0.0.168.oe2203sp3.x86_64.rpm",
"kernel-tools-debuginfo-5.10.0-266.0.0.168.oe2203sp3.x86_64.rpm",
"kernel-tools-devel-5.10.0-266.0.0.168.oe2203sp3.x86_64.rpm",
"perf-5.10.0-266.0.0.168.oe2203sp3.x86_64.rpm",
"perf-debuginfo-5.10.0-266.0.0.168.oe2203sp3.x86_64.rpm",
"python3-perf-5.10.0-266.0.0.168.oe2203sp3.x86_64.rpm",
"python3-perf-debuginfo-5.10.0-266.0.0.168.oe2203sp3.x86_64.rpm"
]
},
"package": {
"ecosystem": "openEuler:22.03-LTS-SP3",
"name": "kernel",
"purl": "pkg:rpm/openEuler/kernel\u0026distro=openEuler-22.03-LTS-SP3"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.10.0-266.0.0.168.oe2203sp3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"severity": "High"
},
"details": "The Linux Kernel, the operating system core itself.\r\n\r\nSecurity Fix(es):\n\nIn the Linux kernel, the following vulnerability has been resolved:\n\ncgroup: Use separate src/dst nodes when preloading css_sets for migration\n\nEach cset (css_set) is pinned by its tasks. When we\u0026apos;re moving tasks around\nacross csets for a migration, we need to hold the source and destination\ncsets to ensure that they don\u0026apos;t go away while we\u0026apos;re moving tasks about. This\nis done by linking cset-\u0026gt;mg_preload_node on either the\nmgctx-\u0026gt;preloaded_src_csets or mgctx-\u0026gt;preloaded_dst_csets list. Using the\nsame cset-\u0026gt;mg_preload_node for both the src and dst lists was deemed okay as\na cset can\u0026apos;t be both the source and destination at the same time.\n\nUnfortunately, this overloading becomes problematic when multiple tasks are\ninvolved in a migration and some of them are identity noop migrations while\nothers are actually moving across cgroups. For example, this can happen with\nthe following sequence on cgroup1:\n\n #1\u0026gt; mkdir -p /sys/fs/cgroup/misc/a/b\n #2\u0026gt; echo $$ \u0026gt; /sys/fs/cgroup/misc/a/cgroup.procs\n #3\u0026gt; RUN_A_COMMAND_WHICH_CREATES_MULTIPLE_THREADS \u0026amp;\n #4\u0026gt; PID=$!\n #5\u0026gt; echo $PID \u0026gt; /sys/fs/cgroup/misc/a/b/tasks\n #6\u0026gt; echo $PID \u0026gt; /sys/fs/cgroup/misc/a/cgroup.procs\n\nthe process including the group leader back into a. In this final migration,\nnon-leader threads would be doing identity migration while the group leader\nis doing an actual one.\n\nAfter #3, let\u0026apos;s say the whole process was in cset A, and that after #4, the\nleader moves to cset B. Then, during #6, the following happens:\n\n 1. cgroup_migrate_add_src() is called on B for the leader.\n\n 2. cgroup_migrate_add_src() is called on A for the other threads.\n\n 3. cgroup_migrate_prepare_dst() is called. It scans the src list.\n\n 4. It notices that B wants to migrate to A, so it tries to A to the dst\n list but realizes that its -\u0026gt;mg_preload_node is already busy.\n\n 5. and then it notices A wants to migrate to A as it\u0026apos;s an identity\n migration, it culls it by list_del_init()\u0026apos;ing its -\u0026gt;mg_preload_node and\n putting references accordingly.\n\n 6. The rest of migration takes place with B on the src list but nothing on\n the dst list.\n\nThis means that A isn\u0026apos;t held while migration is in progress. If all tasks\nleave A before the migration finishes and the incoming task pins it, the\ncset will be destroyed leading to use-after-free.\n\nThis is caused by overloading cset-\u0026gt;mg_preload_node for both src and dst\npreload lists. We wanted to exclude the cset from the src list but ended up\ninadvertently excluding it from the dst list too.\n\nThis patch fixes the issue by separating out cset-\u0026gt;mg_preload_node into\n-\u0026gt;mg_src_preload_node and -\u0026gt;mg_dst_preload_node, so that the src and dst\npreloadings don\u0026apos;t interfere with each other.(CVE-2022-49647)\n\nIn the Linux kernel, the following vulnerability has been resolved:\n\nfs/jfs: Prevent integer overflow in AG size calculation\n\nThe JFS filesystem calculates allocation group (AG) size using 1 \u0026lt;\u0026lt;\nl2agsize in dbExtendFS(). When l2agsize exceeds 31 (possible with \u0026gt;2TB\naggregates on 32-bit systems), this 32-bit shift operation causes undefined\nbehavior and improper AG sizing.\n\nOn 32-bit architectures:\n- Left-shifting 1 by 32+ bits results in 0 due to integer overflow\n- This creates invalid AG sizes (0 or garbage values) in\nsbi-\u0026gt;bmap-\u0026gt;db_agsize\n- Subsequent block allocations would reference invalid AG structures\n- Could lead to:\n - Filesystem corruption during extend operations\n - Kernel crashes due to invalid memory accesses\n - Security vulnerabilities via malformed on-disk structures\n\nFix by casting to s64 before shifting:\nbmp-\u0026gt;db_agsize = (s64)1 \u0026lt;\u0026lt; l2agsize;\n\nThis ensures 64-bit arithmetic even on 32-bit architectures. The cast\nmatches the data type of db_agsize (s64) and follows similar patterns in\nJFS block calculation code.\n\nFound by Linux Verification Center (linuxtesting.org) with SVACE.(CVE-2025-37858)",
"id": "OESA-2025-1597",
"modified": "2026-08-06T11:08:41Z",
"published": "2025-06-06T11:08:41Z",
"references": [
{
"type": "ADVISORY",
"url": "https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2025-1597"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-49647"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-37858"
}
],
"schema_version": "1.7.2",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "kernel security update",
"upstream": [
"CVE-2022-49647",
"CVE-2025-37858"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.