Description
In the Linux kernel, the following vulnerability has been resolved:
btrfs: do not start relocation until in progress drops are done
We hit a bug with a recovering relocation on mount for one of our file
systems in production. I reproduced this locally by injecting errors
into snapshot delete with balance running at the same time. This
presented as an error while looking up an extent item
WARNING: CPU: 5 PID: 1501 at fs/btrfs/extent-tree.c:866 lookup_inline_extent_backref+0x647/0x680
CPU: 5 PID: 1501 Comm: btrfs-balance Not tainted 5.16.0-rc8+ #8
RIP: 0010:lookup_inline_extent_backref+0x647/0x680
RSP: 0018:ffffae0a023ab960 EFLAGS: 00010202
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 000000000000000c RDI: 0000000000000000
RBP: ffff943fd2a39b60 R08: 0000000000000000 R09: 0000000000000001
R10: 0001434088152de0 R11: 0000000000000000 R12: 0000000001d05000
R13: ffff943fd2a39b60 R14: ffff943fdb96f2a0 R15: ffff9442fc923000
FS: 0000000000000000(0000) GS:ffff944e9eb40000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1157b1fca8 CR3: 000000010f092000 CR4: 0000000000350ee0
Call Trace:
<TASK>
insert_inline_extent_backref+0x46/0xd0
__btrfs_inc_extent_ref.isra.0+0x5f/0x200
? btrfs_merge_delayed_refs+0x164/0x190
__btrfs_run_delayed_refs+0x561/0xfa0
? btrfs_search_slot+0x7b4/0xb30
? btrfs_update_root+0x1a9/0x2c0
btrfs_run_delayed_refs+0x73/0x1f0
? btrfs_update_root+0x1a9/0x2c0
btrfs_commit_transaction+0x50/0xa50
? btrfs_update_reloc_root+0x122/0x220
prepare_to_merge+0x29f/0x320
relocate_block_group+0x2b8/0x550
btrfs_relocate_block_group+0x1a6/0x350
btrfs_relocate_chunk+0x27/0xe0
btrfs_balance+0x777/0xe60
balance_kthread+0x35/0x50
? btrfs_balance+0xe60/0xe60
kthread+0x16b/0x190
? set_kthread_struct+0x40/0x40
ret_from_fork+0x22/0x30
</TASK>
Normally snapshot deletion and relocation are excluded from running at
the same time by the fs_info->cleaner_mutex. However if we had a
pending balance waiting to get the ->cleaner_mutex, and a snapshot
deletion was running, and then the box crashed, we would come up in a
state where we have a half deleted snapshot.
Again, in the normal case the snapshot deletion needs to complete before
relocation can start, but in this case relocation could very well start
before the snapshot deletion completes, as we simply add the root to the
dead roots list and wait for the next time the cleaner runs to clean up
the snapshot.
Fix this by setting a bit on the fs_info if we have any DEAD_ROOT's that
had a pending drop_progress key. If they do then we know we were in the
middle of the drop operation and set a flag on the fs_info. Then
balance can wait until this flag is cleared to start up again.
If there are DEAD_ROOT's that don't have a drop_progress set then we're
safe to start balance right away as we'll be properly protected by the
cleaner_mutex.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 3.10 | 5.15.27 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 5.16.14-1 | — |
| Debian 13 | linux | 5.16.14-1 | — |
| Debian 12 | linux | 5.16.14-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | linux-raspi-realtime | No fix yet | — |
| Ubuntu 22.04 LTS | linux-riscv +31 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-gke +27 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-intel-iotg-5.15 | 5.15.0-1008.11~20.04.1 | — |
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
Show 10 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro FIPS 20.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS 18.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS 16.04 LTS | linux-fips | No fix yet | — |
| Ubuntu Pro FIPS-updates 20.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS-updates 16.04 LTS | linux-fips | No fix yet | — |
| Ubuntu Pro 20.04 LTS | linux +10 | No fix yet | — |
| Ubuntu Pro 18.04 LTS | linux +12 | No fix yet | — |
| Ubuntu Pro 16.04 LTS | linux +7 | No fix yet | — |
| Ubuntu Pro 14.04 LTS | linux +3 | No fix yet | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP5 | kernel-64kb +6 | 5.14.21-150500.55.83.1 | SUSE-SU-2024:3569-1 |
| SLES 15 SP5 | kernel-azure +2 | 5.14.21-150500.33.69.1 | SUSE-SU-2024:3587-1 |
| SLES 15 SP5 | kernel-default-base | 5.14.21-150500.55.83.1.150500.6.37.1 | SUSE-SU-2024:3569-1 |
| SLES 15 SP3 | kernel-64kb +7 | 5.3.18-150300.59.174.1 | SUSE-SU-2024:3249-1 |
| SLES 15 SP3 | kernel-default-base | 5.3.18-150300.59.174.1.150300.18.103.1 | SUSE-SU-2024:3249-1 |
| SLES 15 SP2 | kernel-default-base | 5.3.18-150200.24.203.1.150200.9.105.1 | SUSE-SU-2024:3499-1 |
| SLES 15 SP2 | kernel-docs +5 | 5.3.18-150200.24.203.1 | SUSE-SU-2024:3499-1 |
Show 12 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP3 | kernel-default-base | 5.3.18-150300.59.174.1.150300.18.103.1 | SUSE-SU-2024:3249-1 |
| SLES for SAP 15 SP3 | kernel-docs +5 | 5.3.18-150300.59.174.1 | SUSE-SU-2024:3249-1 |
| SLES for SAP 15 SP2 | kernel-default-base | 5.3.18-150200.24.203.1.150200.9.105.1 | SUSE-SU-2024:3499-1 |
| SLES for SAP 15 SP2 | kernel-docs +5 | 5.3.18-150200.24.203.1 | SUSE-SU-2024:3499-1 |
| SLE Micro 5.5 | kernel-default | 5.14.21-150500.55.83.1 | SUSE-SU-2024:3569-1 |
| SLE Micro 5.5 | kernel-default-base | 5.14.21-150500.55.83.1.150500.6.37.1 | SUSE-SU-2024:3569-1 |
| SLE Micro 5.5 | kernel-rt +1 | 5.14.21-150500.13.73.1 | SUSE-SU-2024:3592-1 |
| SLE Micro 5.2 | kernel-default | 5.3.18-150300.59.174.1 | SUSE-SU-2024:3249-1 |
| SLE Micro 5.2 | kernel-default-base | 5.3.18-150300.59.174.1.150300.18.103.1 | SUSE-SU-2024:3249-1 |
| SLE Micro 5.2 | kernel-rt +1 | 5.3.18-150300.181.2 | SUSE-SU-2024:3225-1 |
| SLE Micro 5.1 | kernel-default | 5.3.18-150300.59.174.1 | SUSE-SU-2024:3249-1 |
| SLE Micro 5.1 | kernel-default-base | 5.3.18-150300.59.174.1.150300.18.103.1 | SUSE-SU-2024:3249-1 |
| SLE Micro 5.1 | kernel-rt +1 | 5.3.18-150300.181.2 | SUSE-SU-2024:3225-1 |
| SLE Live Patching 15 SP5 | kernel-default | 5.14.21-150500.55.83.1 | SUSE-SU-2024:3569-1 |
| SLE Live Patching 15 SP5 | kernel-livepatch-SLE15-SP5_Update_20 +1 | 1-150500.11.3.1 | SUSE-SU-2024:3592-1, SUSE-SU-2024:3569-1 |
| SLE Live Patching 15 SP3 | kernel-default | 5.3.18-150300.59.174.1 | SUSE-SU-2024:3249-1 |
| SLE Live Patching 15 SP3 | kernel-livepatch-SLE15-SP3_Update_48 | 1-150300.7.3.1 | SUSE-SU-2024:3249-1 |
| SLE Live Patching 15 SP2 | kernel-default | 5.3.18-150200.24.203.1 | SUSE-SU-2024:3499-1 |
| SLE Live Patching 15 SP2 | kernel-livepatch-SLE15-SP2_Update_52 | 1-150200.5.3.1 | SUSE-SU-2024:3499-1 |
| SLE HPC 15 SP3 | kernel-64kb +6 | 5.3.18-150300.59.174.1 | SUSE-SU-2024:3249-1 |
| SLE HPC 15 SP3 | kernel-default-base | 5.3.18-150300.59.174.1.150300.18.103.1 | SUSE-SU-2024:3249-1 |
| SLE HPC 15 SP2 | kernel-default-base | 5.3.18-150200.24.203.1.150200.9.105.1 | SUSE-SU-2024:3499-1 |
| SLE HPC 15 SP2 | kernel-docs +5 | 5.3.18-150200.24.203.1 | SUSE-SU-2024:3499-1 |
| SUSE Real Time Module 15 SP5 | kernel-rt +3 | 5.14.21-150500.13.73.1 | SUSE-SU-2024:3592-1 |
| SUSE Enterprise Storage 7.1 | kernel-64kb +6 | 5.3.18-150300.59.174.1 | SUSE-SU-2024:3249-1 |
| SUSE Enterprise Storage 7.1 | kernel-default-base | 5.3.18-150300.59.174.1.150300.18.103.1 | SUSE-SU-2024:3249-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 15.5 | kernel-azure +2 | 5.14.21-150500.33.69.1 | SUSE-SU-2024:3587-1 |
| openSUSE Leap 15.5 | kernel-rt +3 | 5.14.21-150500.13.73.1 | SUSE-SU-2024:3592-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap Micro 5.5 | kernel-default | 5.14.21-150500.55.83.1 | SUSE-SU-2024:3569-1 |
| openSUSE Leap Micro 5.5 | kernel-default-base | 5.14.21-150500.55.83.1.150500.6.37.1 | SUSE-SU-2024:3569-1 |
| openSUSE Leap Micro 5.5 | kernel-rt | 5.14.21-150500.13.73.1 | SUSE-SU-2024:3592-1 |
Advisories 7
- SUSE-SU-2024:3249-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:3225-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:3499-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:3592-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:3587-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:3569-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2024-1898 Linux Kernel: Mehrere Schwachstellen ermöglichen Denial of Service BSI CERT-Bund (WID) · Aug 6, 2025