CVE-2024-26792
published high CVSS 3.1 · 7.8btrfs: fix double free of anonymous device after snapshot creation failure
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux66b317a2fc45b2ef66527ee3f8fa08fb5beab88d to < c34adc20b91a8e55e048b18d63f4f4ae003ecf8f · 833775656d447c545133a744a0ed1e189ce61430 to < eb3441093aad251418921246fc3b224fd1575701 · 5a172344bfdabb46458e03708735d7b1a918c468 to < c8ab7521665bd0f8bc4a900244d1d5a7095cc3b9 · e03ee2fe873eb68c1f9ba5112fee70303ebf9dfb to < e2b54eaf28df0c978626c9736b94f003b523b451 · 3f5d47eb163bceb1b9e613c9003bae5fefc0046f · e31546b0f34af21738c4ceac47d662c00ee6382f · 5.10.210 to < 5.11 · 5.15.149 to < 5.16 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.1.79 to < 6.1.81 · 6.6.18 to < 6.6.21 · 6.7.6 to < 6.7.9 · Other versions: unaffected | Affected | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected; No Fix Planned | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2024-603 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2024-784 | Fixed | Not stated | Amazon Linux assessment |
| SUSE / openSUSE | SLE-15-SP4 | cluster-md-kmp-defaultaarch64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | cluster-md-kmp-defaultppc64le | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | cluster-md-kmp-defaults390x | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
Show 97 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | SLE-15-SP4 | cluster-md-kmp-defaultx86_64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | dlm-kmp-defaultaarch64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | dlm-kmp-defaultppc64le | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | dlm-kmp-defaults390x | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | dlm-kmp-defaultx86_64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | gfs2-kmp-defaultaarch64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | gfs2-kmp-defaultppc64le | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | gfs2-kmp-defaults390x | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | gfs2-kmp-defaultx86_64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-64kbaarch64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-64kb-develaarch64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-defaultaarch64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-defaultppc64le | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-defaults390x | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-defaultx86_64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-default-baseaarch64 | Advisory build | 5.14.21-150400.24.119.1.150400.24.56.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-default-baseppc64le | Advisory build | 5.14.21-150400.24.119.1.150400.24.56.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-default-basex86_64 | Advisory build | 5.14.21-150400.24.119.1.150400.24.56.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-default-develaarch64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-default-develppc64le | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-default-devels390x | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-default-develx86_64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-default-livepatchppc64le | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-default-livepatchs390x | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-default-livepatchx86_64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-default-livepatch-develppc64le | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-default-livepatch-devels390x | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-default-livepatch-develx86_64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-develnoarch | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-docsnoarch | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-livepatch-5_14_21-150400_24_119-defaultppc64le | Advisory build | 1-150400.9.3.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-livepatch-5_14_21-150400_24_119-defaults390x | Advisory build | 1-150400.9.3.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-livepatch-5_14_21-150400_24_119-defaultx86_64 | Advisory build | 1-150400.9.3.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-macrosnoarch | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-obs-buildaarch64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-obs-buildppc64le | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-obs-builds390x | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-obs-buildx86_64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-sourcenoarch | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-symsaarch64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-symsppc64le | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-symss390x | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-symsx86_64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | kernel-zfcpdumps390x | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | ocfs2-kmp-defaultaarch64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | ocfs2-kmp-defaultppc64le | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | ocfs2-kmp-defaults390x | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | ocfs2-kmp-defaultx86_64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | reiserfs-kmp-defaultaarch64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | reiserfs-kmp-defaultppc64le | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | reiserfs-kmp-defaults390x | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP4 | reiserfs-kmp-defaultx86_64 | Advisory build | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE / openSUSE | SLE-15-SP5 | cluster-md-kmp-defaultaarch64 | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | cluster-md-kmp-defaultppc64le | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | cluster-md-kmp-defaults390x | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | cluster-md-kmp-defaultx86_64 | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | cluster-md-kmp-rtx86_64 | Advisory build | 5.14.21-150500.13.52.1 | SUSE-SU-2024:1663-1 |
| SUSE / openSUSE | SLE-15-SP5 | dlm-kmp-defaultaarch64 | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | dlm-kmp-defaultppc64le | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | dlm-kmp-defaults390x | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | dlm-kmp-defaultx86_64 | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | dlm-kmp-rtx86_64 | Advisory build | 5.14.21-150500.13.52.1 | SUSE-SU-2024:1663-1 |
| SUSE / openSUSE | SLE-15-SP5 | gfs2-kmp-defaultaarch64 | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | gfs2-kmp-defaultppc64le | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | gfs2-kmp-defaults390x | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | gfs2-kmp-defaultx86_64 | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | gfs2-kmp-rtx86_64 | Advisory build | 5.14.21-150500.13.52.1 | SUSE-SU-2024:1663-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-64kbaarch64 | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-64kb-develaarch64 | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-azureaarch64 | Advisory build | 5.14.21-150500.33.51.1 | SUSE-SU-2024:1644-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-azurex86_64 | Advisory build | 5.14.21-150500.33.51.1 | SUSE-SU-2024:1644-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-azure-develaarch64 | Advisory build | 5.14.21-150500.33.51.1 | SUSE-SU-2024:1644-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-azure-develx86_64 | Advisory build | 5.14.21-150500.33.51.1 | SUSE-SU-2024:1644-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-defaultaarch64 | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-defaultppc64le | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-defaults390x | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-defaultx86_64 | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-default-baseaarch64 | Advisory build | 5.14.21-150500.55.62.2.150500.6.27.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-default-baseppc64le | Advisory build | 5.14.21-150500.55.62.2.150500.6.27.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-default-basex86_64 | Advisory build | 5.14.21-150500.55.62.2.150500.6.27.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-default-develaarch64 | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-default-develppc64le | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-default-devels390x | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-default-develx86_64 | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-default-extrax86_64 | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-default-livepatchppc64le | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-default-livepatchs390x | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-default-livepatchx86_64 | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-default-livepatch-develppc64le | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-default-livepatch-devels390x | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-default-livepatch-develx86_64 | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-develnoarch | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-devel-azurenoarch | Advisory build | 5.14.21-150500.33.51.1 | SUSE-SU-2024:1644-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-devel-rtnoarch | Advisory build | 5.14.21-150500.13.52.1 | SUSE-SU-2024:1663-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-docsnoarch | Advisory build | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-livepatch-5_14_21-150500_13_52-rtx86_64 | Advisory build | 1-150500.11.5.1 | SUSE-SU-2024:1663-1 |
| SUSE / openSUSE | SLE-15-SP5 | kernel-livepatch-5_14_21-150500_55_62-defaultppc64le | Advisory build | 1-150500.11.3.2 | SUSE-SU-2024:1659-1 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix double free of anonymous device after snapshot creation failure When creating a snapshot we may do a double free of an anonymous device in case there's an error committing the transaction. The second free may result in freeing an anonymous device number that was allocated by some other subsystem in the kernel or another btrfs filesystem. The steps that lead to this: 1) At ioctl.c:create_snapshot() we allocate an anonymous device number and assign it to pending_snapshot->anon_dev; 2) Then we call btrfs_commit_transaction() and end up at transaction.c:create_pending_snapshot(); 3) There we call btrfs_get_new_fs_root() and pass it the anonymous device number stored in pending_snapshot->anon_dev; 4) btrfs_get_new_fs_root() frees that anonymous device number because btrfs_lookup_fs_root() returned a root - someone else did a lookup of the new root already, which could some task doing backref walking; 5) After that some error happens in the transaction commit path, and at ioctl.c:create_snapshot() we jump to the 'fail' label, and after that we free again the same anonymous device number, which in the meanwhile may have been reallocated somewhere else, because pending_snapshot->anon_dev still has the same value as in step 1. Recently syzbot ran into this and reported the following trace: ------------[ cut here ]------------ ida_free called for id=51 which is not allocated. WARNING: CPU: 1 PID: 31038 at lib/idr.c:525 ida_free+0x370/0x420 lib/idr.c:525 Modules linked in: CPU: 1 PID: 31038 Comm: syz-executor.2 Not tainted 6.8.0-rc4-syzkaller-00410-gc02197fc9076 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 RIP: 0010:ida_free+0x370/0x420 lib/idr.c:525 Code: 10 42 80 3c 28 (...) RSP: 0018:ffffc90015a67300 EFLAGS: 00010246 RAX: be5130472f5dd000 RBX: 0000000000000033 RCX: 0000000000040000 RDX: ffffc90009a7a000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: ffffc90015a673f0 R08: ffffffff81577992 R09: 1ffff92002b4cdb4 R10: dffffc0000000000 R11: fffff52002b4cdb5 R12: 0000000000000246 R13: dffffc0000000000 R14: ffffffff8e256b80 R15: 0000000000000246 FS: 00007fca3f4b46c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f167a17b978 CR3: 000000001ed26000 CR4: 0000000000350ef0 Call Trace: <TASK> btrfs_get_root_ref+0xa48/0xaf0 fs/btrfs/disk-io.c:1346 create_pending_snapshot+0xff2/0x2bc0 fs/btrfs/transaction.c:1837 create_pending_snapshots+0x195/0x1d0 fs/btrfs/transaction.c:1931 btrfs_commit_transaction+0xf1c/0x3740 fs/btrfs/transaction.c:2404 create_snapshot+0x507/0x880 fs/btrfs/ioctl.c:848 btrfs_mksubvol+0x5d0/0x750 fs/btrfs/ioctl.c:998 btrfs_mksnapshot+0xb5/0xf0 fs/btrfs/ioctl.c:1044 __btrfs_ioctl_snap_create+0x387/0x4b0 fs/btrfs/ioctl.c:1306 btrfs_ioctl_snap_create_v2+0x1ca/0x400 fs/btrfs/ioctl.c:1393 btrfs_ioctl+0xa74/0xd40 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0xfe/0x170 fs/ioctl.c:857 do_syscall_64+0xfb/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7fca3e67dda9 Code: 28 00 00 00 (...) RSP: 002b:00007fca3f4b40c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fca3e7abf80 RCX: 00007fca3e67dda9 RDX: 00000000200005c0 RSI: 0000000050009417 RDI: 0000000000000003 RBP: 00007fca3e6ca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fca3e7abf80 R15: 00007fff6bf95658 </TASK> Where we get an explicit message where we attempt to free an anonymous device number that is not currently allocated. It happens in a different code path from the example below, at btrfs_get_root_ref(), so this change may not fix the case triggered by sy ---truncated---
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The vulnerability is reached only through the `BTRFS_IOC_SNAP_CREATE`/`SNAP_CREATE_V2` ioctl issued on a directory of a locally mounted btrfs filesystem. No network protocol handler touches this path. AC:L - The attacker drives both sides of the race — a concurrent write/backref-walking thread that causes `btrfs_lookup_fs_root()` to return the newly inserted root, and the post-`get_new_fs_root` error (attacker-arranged ENOSPC, EDQUOT from a userspace-supplied `qgroup_inherit`, or orphan-cleanup/dentry-lookup failure) that reaches the second `free_anon_bdev()`. The ioctl can be retried in a tight loop at no cost until the window is hit. PR:L - Btrfs subvolume creation is deliberately unrestricted, and snapshotting only requires `inode_owner_or_capable()` on a source subvolume the attacker created themselves plus write+exec permission on a directory they own — no capability, and CAP_FOWNER/CAP_SYS_ADMIN are never consulted on this path. UI:N - Exploitation is entirely self-contained in the attacker's own ioctl loop plus their own background threads; no victim action, mount, or file access is needed. S:U - The corrupted resource is the kernel's global `unnamed_dev_ida` allocator state, managed within the same kernel security authority as the vulnerable btrfs code; no hypervisor, IOMMU, or sandbox boundary is crossed. C:H - The second free releases a `dev_t` still owned by an unrelated superblock (tmpfs, NFS, overlayfs, fuse, another btrfs subvolume), so `get_anon_bdev()` later hands the identical number to a second live filesystem; the resulting collapse of the `(st_dev, st_ino)` identity invariant lets nfsd fsid/filehandle resolution, overlayfs origin lookup, fanotify FIDs, and backup tooling be pointed at a different filesystem's contents, disclosing data the unprivileged attacker cannot otherwise read. I:H - The same device-number aliasing lets writes, restores, and filehandle-based server-side operations land on the wrong filesystem, and the double free itself corrupts the global anonymous-device ID allocator state that every anon-superblock filesystem in the kernel depends on for correct identity. A:H - When the number has not been reallocated, `ida_free()` hits the `WARN` at lib/idr.c:525 ("ida_free called for id=%d which is not allocated"), which is a kernel panic on the many hardened, cloud, and Android configurations that set `panic_on_warn`; the mangled ID-allocator state can also strand or misdirect later mounts, and the concurrently zeroed `root->anon_dev` permanently leaks device numbers from the bounded 1..2^20 minor space.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 66b317a2fc45b2ef66527ee3f8fa08fb5beab88d to < c34adc20b91a8e55e048b18d63f4f4ae003ecf8f (affected · git)833775656d447c545133a744a0ed1e189ce61430 to < eb3441093aad251418921246fc3b224fd1575701 (affected · git)5a172344bfdabb46458e03708735d7b1a918c468 to < c8ab7521665bd0f8bc4a900244d1d5a7095cc3b9 (affected · git)e03ee2fe873eb68c1f9ba5112fee70303ebf9dfb to < e2b54eaf28df0c978626c9736b94f003b523b451 (affected · git)3f5d47eb163bceb1b9e613c9003bae5fefc0046f (affected · git)e31546b0f34af21738c4ceac47d662c00ee6382f (affected · git)5.10.210 to < 5.11 (affected · semver)5.15.149 to < 5.16 (affected · semver)Default: unaffected | Linux · cna |
| Linux | Linux | 6.1.79 to < 6.1.81 (affected · semver)6.6.18 to < 6.6.21 (affected · semver)6.7.6 to < 6.7.9 (affected · semver)Default: unaffected | Linux · cna |
Weaknesses
0No weakness assertions.
References
4Provider assertions
3Linux · cna
btrfs: fix double free of anonymous device after snapshot creation failure
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- a01a8b220c39eae077630068fc622ed48fb2e4e3542e2ecd2378b76036fc9b10
- Ingested
- 23 Sep 2026, 08:20:34 UTC
- Source record
- Official CVE record