{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2025-22115 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"CVE-2025-22115 is a high-severity vulnerability in Linux kernel, published on 16 Apr 2025. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-22115 and fix it if it is affected.\n\nWhat it is: CVE-2025-22115 is a high-severity vulnerability in Linux kernel, published on 16 Apr 2025. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2025-22115 in the wild and no public exploit code.\n\nAffected product: Linux kernel. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-22115/ (Markdown: https://insights.sbomify.com/CVE-2025-22115/index.md)","id":"CVE-2025-22115","markdown":"https://insights.sbomify.com/CVE-2025-22115/index.md","name":"CVE-2025-22115","record":{"aliases":["AZL-62693","BELL-CVE-2025-22115","DEBIAN-CVE-2025-22115","GHSA-h52v-87c4-f7qg","ROOT-OS-DEBIAN-12-CVE-2025-22115","ROOT-OS-UBUNTU-2404-CVE-2025-22115","SUSE-SU-2025:02439-1","SUSE-SU-2025:02514-1","SUSE-SU-2025:20521-1","SUSE-SU-2025:20524-1","SUSE-SU-2025:20529-1","SUSE-SU-2025:20543-1","SUSE-SU-2025:20547-1","SUSE-SU-2025:20548-1","UBUNTU-CVE-2025-22115"],"analysis":{"component_type":"kernel","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Linux kernel btrfs","requires_auth":"low_privilege","summary":"A race condition in the Linux kernel's btrfs filesystem can cause a use-after-free warning and potential system instability.","user_interaction":"not_required","vuln_class":"race_condition"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Linux","cpe":[{"product":"linux_kernel","vendor":"linux"}],"cvss":{"score":7.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-362","name":"Concurrent Execution using Shared Resource with Improper Synchronization"}],"description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix block group refcount race in btrfs_create_pending_block_groups()\n\nBlock group creation is done in two phases, which results in a slightly\nunintuitive property: a block group can be allocated/deallocated from\nafter btrfs_make_block_group() adds it to the space_info with\nbtrfs_add_bg_to_space_info(), but before creation is completely completed\nin btrfs_create_pending_block_groups(). As a result, it is possible for a\nblock group to go unused and have 'btrfs_mark_bg_unused' called on it\nconcurrently with 'btrfs_create_pending_block_groups'. This causes a\nnumber of issues, which were fixed with the block group flag\n'BLOCK_GROUP_FLAG_NEW'.\n\nHowever, this fix is not quite complete. Since it does not use the\nunused_bg_lock, it is possible for the following race to occur:\n\nbtrfs_create_pending_block_groups            btrfs_mark_bg_unused\n                                           if list_empty // false\n        list_del_init\n        clear_bit\n                                           else if (test_bit) // true\n                                                list_move_tail\n\nAnd we get into the exact same broken ref count and invalid new_bgs\nstate for transaction cleanup that BLOCK_GROUP_FLAG_NEW was designed to\nprevent.\n\nThe broken refcount aspect will result in a warning like:\n\n  [1272.943527] refcount_t: underflow; use-after-free.\n  [1272.943967] WARNING: CPU: 1 PID: 61 at lib/refcount.c:28 refcount_warn_saturate+0xba/0x110\n  [1272.944731] Modules linked in: btrfs virtio_net xor zstd_compress raid6_pq null_blk [last unloaded: btrfs]\n  [1272.945550] CPU: 1 UID: 0 PID: 61 Comm: kworker/u32:1 Kdump: loaded Tainted: G        W          6.14.0-rc5+ #108\n  [1272.946368] Tainted: [W]=WARN\n  [1272.946585] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014\n  [1272.947273] Workqueue: btrfs_discard btrfs_discard_workfn [btrfs]\n  [1272.947788] RIP: 0010:refcount_warn_saturate+0xba/0x110\n  [1272.949532] RSP: 0018:ffffbf1200247df0 EFLAGS: 00010282\n  [1272.949901] RAX: 0000000000000000 RBX: ffffa14b00e3f800 RCX: 0000000000000000\n  [1272.950437] RDX: 0000000000000000 RSI: ffffbf1200247c78 RDI: 00000000ffffdfff\n  [1272.950986] RBP: ffffa14b00dc2860 R08: 00000000ffffdfff R09: ffffffff90526268\n  [1272.951512] R10: ffffffff904762c0 R11: 0000000063666572 R12: ffffa14b00dc28c0\n  [1272.952024] R13: 0000000000000000 R14: ffffa14b00dc2868 R15: 000001285dcd12c0\n  [1272.952850] FS:  0000000000000000(0000) GS:ffffa14d33c40000(0000) knlGS:0000000000000000\n  [1272.953458] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n  [1272.953931] CR2: 00007f838cbda000 CR3: 000000010104e000 CR4: 00000000000006f0\n  [1272.954474] Call Trace:\n  [1272.954655]  \u003cTASK\u003e\n  [1272.954812]  ? refcount_warn_saturate+0xba/0x110\n  [1272.955173]  ? __warn.cold+0x93/0xd7\n  [1272.955487]  ? refcount_warn_saturate+0xba/0x110\n  [1272.955816]  ? report_bug+0xe7/0x120\n  [1272.956103]  ? handle_bug+0x53/0x90\n  [1272.956424]  ? exc_invalid_op+0x13/0x60\n  [1272.956700]  ? asm_exc_invalid_op+0x16/0x20\n  [1272.957011]  ? refcount_warn_saturate+0xba/0x110\n  [1272.957399]  btrfs_discard_cancel_work.cold+0x26/0x2b [btrfs]\n  [1272.957853]  btrfs_put_block_group.cold+0x5d/0x8e [btrfs]\n  [1272.958289]  btrfs_discard_workfn+0x194/0x380 [btrfs]\n  [1272.958729]  process_one_work+0x130/0x290\n  [1272.959026]  worker_thread+0x2ea/0x420\n  [1272.959335]  ? __pfx_worker_thread+0x10/0x10\n  [1272.959644]  kthread+0xd7/0x1c0\n  [1272.959872]  ? __pfx_kthread+0x10/0x10\n  [1272.960172]  ret_from_fork+0x30/0x50\n  [1272.960474]  ? __pfx_kthread+0x10/0x10\n  [1272.960745]  ret_from_fork_asm+0x1a/0x30\n  [1272.961035]  \u003c/TASK\u003e\n  [1272.961238] ---[ end trace 0000000000000000 ]---\n\nThough we have seen them in the async discard workfn as well. It is\nmost likely to happen after a relocation finishes which cancels discard,\ntears down the block group, etc.\n\nFix this fully by taking the lock arou\n---truncated---","ecosystems":["SUSE:Linux Enterprise Live Patching 15 SP6","SUSE:Linux Micro 6.0","SUSE:Linux Micro 6.1"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"btrfs: fix block group refcount race in btrfs_create_pending_block_groups()","id":"CVE-2025-22115","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"linux:linux_kernel","products":["linux:linux_kernel"],"type":"race_condition","year":"2025"},"n_packages":8,"n_references":4,"next":{"headline":"idpf: check error for register_netdev() on init","id":"CVE-2025-22116"},"packages":[{"ecosystem":"SUSE:Linux Enterprise Live Patching 15 SP6","fixed":["2-150600.2.1"],"introduced":["0"],"last_affected":[],"package":"kernel-livepatch-SLE15-SP6-RT_Update_10","purl":"pkg:rpm/suse/kernel-livepatch-SLE15-SP6-RT_Update_10\u0026distro=SUSE%20Linux%20Enterprise%20Live%20Patching%2015%20SP6","source":"SUSE-SU-2025:02439-1"},{"ecosystem":"SUSE:Linux Enterprise Live Patching 15 SP6","fixed":["2-150600.2.1"],"introduced":["0"],"last_affected":[],"package":"kernel-livepatch-SLE15-SP6_Update_10","purl":"pkg:rpm/suse/kernel-livepatch-SLE15-SP6_Update_10\u0026distro=SUSE%20Linux%20Enterprise%20Live%20Patching%2015%20SP6","source":"SUSE-SU-2025:02514-1"},{"ecosystem":"SUSE:Linux Micro 6.0","fixed":["2-3.1"],"introduced":["0"],"last_affected":[],"package":"kernel-livepatch-MICRO-6-0-RT_Update_6","purl":"pkg:rpm/suse/kernel-livepatch-MICRO-6-0-RT_Update_6\u0026distro=SUSE%20Linux%20Micro%206.0","source":"SUSE-SU-2025:20524-1"},{"ecosystem":"SUSE:Linux Micro 6.0","fixed":["2-1.3"],"introduced":["0"],"last_affected":[],"package":"kernel-livepatch-MICRO-6-0-RT_Update_7","purl":"pkg:rpm/suse/kernel-livepatch-MICRO-6-0-RT_Update_7\u0026distro=SUSE%20Linux%20Micro%206.0","source":"SUSE-SU-2025:20521-1"},{"ecosystem":"SUSE:Linux Micro 6.0","fixed":["2-3.1"],"introduced":["0"],"last_affected":[],"package":"kernel-livepatch-MICRO-6-0_Update_6","purl":"pkg:rpm/suse/kernel-livepatch-MICRO-6-0_Update_6\u0026distro=SUSE%20Linux%20Micro%206.0","source":"SUSE-SU-2025:20529-1"},{"ecosystem":"SUSE:Linux Micro 6.1","fixed":["2-3.1"],"introduced":["0"],"last_affected":[],"package":"kernel-livepatch-MICRO-6-0-RT_Update_6","purl":"pkg:rpm/suse/kernel-livepatch-MICRO-6-0-RT_Update_6\u0026distro=SUSE%20Linux%20Micro%206.1","source":"SUSE-SU-2025:20548-1"},{"ecosystem":"SUSE:Linux Micro 6.1","fixed":["2-1.3"],"introduced":["0"],"last_affected":[],"package":"kernel-livepatch-MICRO-6-0-RT_Update_7","purl":"pkg:rpm/suse/kernel-livepatch-MICRO-6-0-RT_Update_7\u0026distro=SUSE%20Linux%20Micro%206.1","source":"SUSE-SU-2025:20547-1"},{"ecosystem":"SUSE:Linux Micro 6.1","fixed":["2-3.1"],"introduced":["0"],"last_affected":[],"package":"kernel-livepatch-MICRO-6-0_Update_6","purl":"pkg:rpm/suse/kernel-livepatch-MICRO-6-0_Update_6\u0026distro=SUSE%20Linux%20Micro%206.1","source":"SUSE-SU-2025:20543-1"}],"prev":{"headline":"btrfs: don't clobber ret in btrfs_validate_super()","id":"CVE-2025-22114"},"products":["Linux"],"published":"2025-04-16","related":[{"cvss_score":8.8,"headline":"Linux Kernel Out-of-Bounds Write","id":"CVE-2026-53266","kev_date_added":"2026-09-18","published":"2026-06-25"},{"cvss_score":8.8,"headline":"Linux Kernel Improper Input Validation","id":"CVE-2013-6282","kev_date_added":"2022-09-15","published":"2013-11-19"},{"cvss_score":8.4,"headline":"Linux Kernel Heap-Based Buffer Overflow","id":"CVE-2022-0185","kev_date_added":"2024-08-21","published":"2022-02-11"},{"cvss_score":8.4,"headline":"Linux Kernel Privilege Escalation","id":"CVE-2013-2094","kev_date_added":"2022-09-15","published":"2013-05-14"},{"cvss_score":7.8,"headline":"Linux Kernel Unspecified","id":"CVE-2026-53362","kev_date_added":"2026-08-27","published":"2026-07-04"},{"cvss_score":7.8,"headline":"Linux Kernel Missing Initialization of a Variable","id":"CVE-2026-46300","kev_date_added":"2026-10-28","published":"2026-05-23"},{"cvss_score":7.8,"headline":"Linux Kernel Race Condition","id":"CVE-2025-39964","kev_date_added":"2026-09-18","published":"2025-10-13"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2026-10-21","vendors":["Linux"]},"summary":"A race condition in the Linux kernel's btrfs filesystem can cause a use-after-free warning and potential system instability.","url":"https://insights.sbomify.com/CVE-2025-22115/"}