btrfs: fix block group refcount race in btrfs_create_pending_block_groups()
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix block group refcount race in btrfs_create_pending_block_groups() Block group creation is done in two phases, which results in a slightly unintuitive property: a block group can be allocated/deallocated from after btrfs_make_block_group() adds it to the space_info with btrfs_add_bg_to_space_info(), but before creation is completely completed in btrfs_create_pending_block_groups(). As a result, it is possible for a block group to go unused and have 'btrfs_mark_bg_unused' called on it concurrently with 'btrfs_create_pending_block_groups'. This causes a number of issues, which were fixed with the block group flag 'BLOCK_GROUP_FLAG_NEW'. However, this fix is not quite complete. Since it does not use the unused_bg_lock, it is possible for the following race to occur: btrfs_create_pending_block_groups btrfs_mark_bg_unused if list_empty // false list_del_init clear_bit else if (test_bit) // true list_move_tail And we get into the exact same broken ref count and invalid new_bgs state for transaction cleanup that BLOCK_GROUP_FLAG_NEW was designed to prevent. The broken refcount aspect will result in a warning like: [1272.943527] refcount_t: underflow; use-after-free. [1272.943967] WARNING: CPU: 1 PID: 61 at lib/refcount.c:28 refcount_warn_saturate+0xba/0x110 [1272.944731] Modules linked in: btrfs virtio_net xor zstd_compress raid6_pq null_blk [last unloaded: btrfs] [1272.945550] CPU: 1 UID: 0 PID: 61 Comm: kworker/u32:1 Kdump: loaded Tainted: G W 6.14.0-rc5+ #108 [1272.946368] Tainted: [W]=WARN [1272.946585] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014 [1272.947273] Workqueue: btrfs_discard btrfs_discard_workfn [btrfs] [1272.947788] RIP: 0010:refcount_warn_saturate+0xba/0x110 [1272.949532] RSP: 0018:ffffbf1200247df0 EFLAGS: 00010282 [1272.949901] RAX: 0000000000000000 RBX: ffffa14b00e3f800 RCX: 0000000000000000 [1272.950437] RDX: 0000000000000000 RSI: ffffbf1200247c78 RDI: 00000000ffffdfff [1272.950986] RBP: ffffa14b00dc2860 R08: 00000000ffffdfff R09: ffffffff90526268 [1272.951512] R10: ffffffff904762c0 R11: 0000000063666572 R12: ffffa14b00dc28c0 [1272.952024] R13: 0000000000000000 R14: ffffa14b00dc2868 R15: 000001285dcd12c0 [1272.952850] FS: 0000000000000000(0000) GS:ffffa14d33c40000(0000) knlGS:0000000000000000 [1272.953458] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [1272.953931] CR2: 00007f838cbda000 CR3: 000000010104e000 CR4: 00000000000006f0 [1272.954474] Call Trace: [1272.954655] <TASK> [1272.954812] ? refcount_warn_saturate+0xba/0x110 [1272.955173] ? __warn.cold+0x93/0xd7 [1272.955487] ? refcount_warn_saturate+0xba/0x110 [1272.955816] ? report_bug+0xe7/0x120 [1272.956103] ? handle_bug+0x53/0x90 [1272.956424] ? exc_invalid_op+0x13/0x60 [1272.956700] ? asm_exc_invalid_op+0x16/0x20 [1272.957011] ? refcount_warn_saturate+0xba/0x110 [1272.957399] btrfs_discard_cancel_work.cold+0x26/0x2b [btrfs] [1272.957853] btrfs_put_block_group.cold+0x5d/0x8e [btrfs] [1272.958289] btrfs_discard_workfn+0x194/0x380 [btrfs] [1272.958729] process_one_work+0x130/0x290 [1272.959026] worker_thread+0x2ea/0x420 [1272.959335] ? __pfx_worker_thread+0x10/0x10 [1272.959644] kthread+0xd7/0x1c0 [1272.959872] ? __pfx_kthread+0x10/0x10 [1272.960172] ret_from_fork+0x30/0x50 [1272.960474] ? __pfx_kthread+0x10/0x10 [1272.960745] ret_from_fork_asm+0x1a/0x30 [1272.961035] </TASK> [1272.961238] ---[ end trace 0000000000000000 ]--- Though we have seen them in the async discard workfn as well. It is most likely to happen after a relocation finishes which cancels discard, tears down the block group, etc. Fix this fully by taking the lock arou ---truncated---
- BDU:2026-04366
- DSA-5975-1
- SUSE-SU-2025:02385-1
- SUSE-SU-2025:02387-1
- SUSE-SU-2025:02388-1
- SUSE-SU-2025:02389-1
- SUSE-SU-2025:02390-1
- SUSE-SU-2025:02405-1
- SUSE-SU-2025:02411-1
- SUSE-SU-2025:02412-1
- SUSE-SU-2025:02413-1
- SUSE-SU-2025:02420-1
- SUSE-SU-2025:02421-1
- SUSE-SU-2025:02433-1
- SUSE-SU-2025:02439-1
- SUSE-SU-2025:02440-1
- SUSE-SU-2025:02442-1
- SUSE-SU-2025:02449-1
- SUSE-SU-2025:02514-1
- SUSE-SU-2025:20517-1
- Yayın
- 16 Nis 2025
- Güncelleme
- 5 Ağu 2026
- EPSS
- %0,1 · 3. yüzdelik
- CWE
- CWE-362
Takip etmek için giriş yap · Takip ettiğin kayıt KEV’e girer, istismarı çıkar ya da güncellenirse bildirim alırsın.
Rapor araçları
Aksiyon skoru
18
İzleyin
Şimdilik düşük öncelik.
- CVSS
- 18 / 40 · 4.7 / 10
- CISA KEV
- 0 / 30 · Listede değil
- EPSS
- 0 / 30 · %0,1
CNA ile NVD puanı
- NVD
- 4,7
- CNA · Linux
- 7,8
- 3,1 puan fark
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Kaydı açan otoritenin puanı ile NVD’nin bağımsız puanı. İki puan arasındaki fark ciddiyetin tartışmalı olduğunu gösterir.
Etkilenen sistemler
| Üretici | Ürün | CPE |
|---|---|---|
| linux | linux kernel | cpe:2.3:o:linux:linux_kernel |
Etkilenen sürümler
NVD sürüm aralıkları (katalogdaki ürünler için). Stack’ine sürümle eklersen eşleşme bunlarla yapılır.
- linux linux kernel6.1.47 ve sonrası · 6.2 öncesi
- linux linux kernel6.4.12 ve sonrası · 6.5 öncesi
- linux linux kernel6.5.1 ve sonrası · 6.12.40 öncesi
- linux linux kernel6.13 ve sonrası · 6.14.2 öncesi
- linux linux kernel6.5
Üreticinin bildirdiği sürümler
Kaydı açan otorite (Linux) tarafından bildirilen etkilenen sürüm aralıkları. NVD'nin CPE analizinden bağımsızdır ve genellikle ondan önce gelir.
Linux Linux
- 6297644db23f77c02ae7961cc542d162629ae2c4, 7569c4294ba6ff9f194635b14876198f8a687c4a, 6.5etkilenir
- 0657b20c5a76c938612f8409735a8830d257866e ve sonrası · ee56da95f8962b86fec4ef93f866e64c8d025a58 öncesietkilenir · git
- 0657b20c5a76c938612f8409735a8830d257866e ve sonrası · 9d383a6fc59271aaaf07a33b23b2eac5b9268b7a öncesietkilenir · git
- 0657b20c5a76c938612f8409735a8830d257866e ve sonrası · 2d8e5168d48a91e7a802d3003e72afb4304bebfa öncesietkilenir · git
- 6.1.47 ve sonrası · 6.2 öncesietkilenir · semver
- 6.4.12 ve sonrası · 6.5 öncesietkilenir · semver
- 6.5 öncesietkilenmez · semver
- 6.12.40 ve sonrası · 6.12.* dahil öncesietkilenmez · semver
- 6.14.2 ve sonrası · 6.14.* dahil öncesietkilenmez · semver
- 6.15 ve sonrasıetkilenmez · original_commit_for_fix
Paket düzeyi etkilenme
OSV ve GitHub Advisory verisi: ekosistem, paket ve aralık. SBOM eşleşmesi bu tabloyu kullanır.
| Ekosistem | Paket | Etkilenen aralık | Düzeltme |
|---|---|---|---|
| Debian:12 | linux | tüm sürümler | — |
| Debian:13 | linux | 6.12.41-1 öncesi | 6.12.41-1 |
| Debian:14 | linux | 6.16.3-1 öncesi | 6.16.3-1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_0 | 19-150600.4.49.1 öncesi | 19-150600.4.49.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_10 | 2-150600.2.1 öncesi | 2-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_4 | 13-150600.2.1 öncesi | 13-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_6 | 8-150600.2.1 öncesi | 8-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_7 | 8-150600.2.1 öncesi | 8-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_9 | 3-150600.2.1 öncesi | 3-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_0 | 18-150600.3.1 öncesi | 18-150600.3.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_1 | 17-150600.2.1 öncesi | 17-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_10 | 2-150600.2.1 öncesi | 2-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_2 | 13-150600.2.1 öncesi | 13-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_3 | 13-150600.2.1 öncesi | 13-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_4 | 12-150600.2.1 öncesi | 12-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_5 | 11-150600.2.1 öncesi | 11-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_6 | 8-150600.2.1 öncesi | 8-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_7 | 8-150600.2.1 öncesi | 8-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_8 | 3-150600.2.1 öncesi | 3-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_9 | 3-150600.2.1 öncesi | 3-150600.2.1 |
| SUSE:Linux Micro 6.0 | kernel-livepatch-MICRO-6-0_Update_2 | 8-1.1 öncesi | 8-1.1 |
| SUSE:Linux Micro 6.0 | kernel-livepatch-MICRO-6-0_Update_3 | 8-1.2 öncesi | 8-1.2 |
| SUSE:Linux Micro 6.0 | kernel-livepatch-MICRO-6-0_Update_4 | 6-1.2 öncesi | 6-1.2 |
| SUSE:Linux Micro 6.0 | kernel-livepatch-MICRO-6-0_Update_5 | 4-1.2 öncesi | 4-1.2 |
+7
Aynı üründe
linux: tüm kayıtlarAynı birincil ürünün en yüksek skorlu diğer kayıtları.
- CVE-2022-0847A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe KEV89Hemen
- CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV85Hemen
- CVE-2016-5195Race condition in mm/gup.c in the Linux kernel 2.x through 4.x before 4.8.3 allows local users to gain privileges by leveraging incorrect haKEV83Hemen
- CVE-2019-13272In the Linux kernel before 5.1.17, ptrace_link in kernel/ptrace.c mishandles the recording of the credentials of a process that wants to creKEV77Bu hafta
- CVE-2013-6282The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the v6k and v7 ARM platforms do not validate certain addKEV77Bu hafta
- CVE-2013-2094The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9 uses an incorrect integer data type, which allows loKEV77Bu hafta
Düzeltme
Hangi sürüme geçmeli
Üretici, paket deposu ve Microsoft kayıtlarından derlenen düzeltme sürümleri. Yükseltmeden önce üreticinin notunu doğrulayın.
| Ürün / paket | Düzeltilmiş sürüm | Kaynak |
|---|---|---|
| Linux Linux | 2d8e5168d48a91e7a802d3003e72afb4304bebfa | Üretici (CNA) |
| Linux Linux | 6.2 | Üretici (CNA) |
| Linux Linux | 6.5 | Üretici (CNA) |
| Linux Linux | 9d383a6fc59271aaaf07a33b23b2eac5b9268b7a | Üretici (CNA) |
| Linux Linux | ee56da95f8962b86fec4ef93f866e64c8d025a58 | Üretici (CNA) |
| debian:linux | 6.12.41-1 · Debian:13 | Paket deposu (OSV) |
| suse:kernel-livepatch-SLE15-SP6_Update_6 | 8-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Paket deposu (OSV) |
| suse:kernel-livepatch-SLE15-SP6_Update_7 | 8-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Paket deposu (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_0 | 18-150600.3.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Paket deposu (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_1 | 17-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Paket deposu (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_2 | 13-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Paket deposu (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_3 | 13-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Paket deposu (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_4 | 12-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Paket deposu (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_5 | 11-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Paket deposu (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_6 | 8-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Paket deposu (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_7 | 8-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Paket deposu (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_8 | 3-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Paket deposu (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_9 | 3-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Paket deposu (OSV) |
İstismar durumu
Bilinen kamuya açık istismar yok
Şu an kamuya açık bir istismar görülmedi. Bu, güvende olduğunuz anlamına gelmez; yalnızca eşiğin biraz daha yüksek olduğunu gösterir.
Araştırma bağlamı
Pentester ve araştırmacı için: saldırı profili, puan anlaşmazlığı, zaman çizelgesi, yama commit’leri, kredi, varyant ve zincir adayları, bug bounty kapsamı. Hepsi mevcut veriden türetilir; istismar kodu içermez.
Zaman çizelgesi
Yayından bugüne: kavram kanıtı, Metasploit modülü, CISA KEV ve düzeltme kaydı. Tarihler kaynakların bildirdiği tarihlerdir.
Yayın dışında tarihli olay yok.
FIRST EPSS günlük puanı; yalnızca 0,01 ve üstü değişimler kaydedilir (adım grafiği).
Yama ve commit bağlantıları
Referanslardaki commit, PR ve diff adresleri. Patch-diff ve varyant avı için başlangıç noktası; istismar değil, düzeltmedir.
Referanslarda commit ya da PR bağlantısı yok.
Kredi
Tüm araştırmacılarCNA kaydında adı geçen bulan, bildiren ve analistler. Ada tıkla, aynı araştırmacının diğer kayıtlarını gör.
CNA kaydında kredi yok.
Varyant adayları
Aynı üründe aynı zafiyet sınıfı, 18 ay içinde. Yama kök nedeni kapatmadıysa kardeş hata burada olur.
Gece hesaplanan ilişki yok.
Zincir adayları
Aynı üründe kimlik doğrulama atlatma ile yetki isteyen bir açık kısa aralıkla yayımlanmış: birlikte kimlik doğrulamasız bir yola dönüşebilir.
—
Bug bounty kapsamı
Bilinen herkese açık program yok.
Kaynak: bounty-targets-data (HackerOne, Bugcrowd, Intigriti, YesWeHack herkese açık listeleri).
Teknik detay
Saldırı koşulları
- Sisteme yerel erişimi olan biri tetikleyebilir.
- Düşük yetkili bir hesap yeterli.
- Kullanıcının bir şey yapması gerekmez.
- Zamanlama ya da yapılandırma gibi özel koşullar gerekir.
Başarılı olursa
- Gizlilik
- yok
- Bütünlük
- yok
- Erişilebilirlik
- yüksek · hizmet durdurulabilir
- Saldırı vektörü
- Yerel
- Karmaşıklık
- Yüksek
- Gereken yetki
- Düşük
- Kullanıcı etkileşimi
- Gerekmez
- Kapsam
- Değişmez
- Gizlilik etkisi
- Yok
- Bütünlük etkisi
- Yok
- Erişilebilirlik etkisi
- Yüksek
Zayıflık sınıfı (CWE)
CWE-362 · Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')CVSS vektörü
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
nvd-primary
Saldırı bağlamı
Bu zafiyet sınıfının (CWE) MITRE CAPEC saldırı desenleri ve ATT&CK teknikleri. Tespit kuralı ve tehdit avı için başlangıç noktası.
Saldırı desenleri (CAPEC)
ATT&CK teknikleri
—
Noroxi analizi
Bu kayıt için henüz Noroxi analizi yok
385 binden fazla zafiyetin tamamına elle analiz yazmıyoruz; bu dürüst olmazdı. Öne çıkan ve sahada etkisi olan zafiyetler için mekanizma, tespit ve kapatma adımlarını ekibimiz yazıyor.
Bu ürünü kullanıyoruz, yardım isteyinDeğişiklik günlüğü
- Düzeltme✗ → ✓
Takip ettiğiniz kayıtlarda bu değişiklikler bildirim olarak da gelir. →
Referanslar
- git.kernel.org/stable/c/2d8e5168d48a91e7a802d3003e72afb4304bebfa
- git.kernel.org/stable/c/9d383a6fc59271aaaf07a33b23b2eac5b9268b7a
- git.kernel.org/stable/c/ee56da95f8962b86fec4ef93f866e64c8d025a58
Üretici bildirimleri ve resmî kayıtlar. İstismar/PoC bağlantıları bilinçli olarak dışarıda bırakıldı.