# CVE-2024-26644: btrfs: don't abort filesystem when attempting to snapshot deleted subvolume

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-26)
- **CWE:** CWE-908
- **Published:** 2024-03-26T15:17:17.614Z
- **Modified:** 2026-06-17T07:17:59.353Z

## Who should check

- Anyone running Linux \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< c06941564027bdbc01d2df7f41e333c11cb0482d; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< 2bdf872bcfe629a6202ffd6641615a8ed00e8464; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< 0877497dc97834728e1b528ddf1e1c484292c29c; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< 6e6bca99e8d88d989a7cde4c064abea552d5219b; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< ec794a7528199e1be6d47bec03f4755aa75df256; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< d8680b722f0ff6d7a01ddacc1844e0d52354d6ff; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< 7081929ab2572920e94d70be3d332e5c9f97095a
- Anyone running Linux 2.6.35

## Description

In the Linux kernel, the following vulnerability has been resolved:

btrfs: don't abort filesystem when attempting to snapshot deleted subvolume

If the source file descriptor to the snapshot ioctl refers to a deleted
subvolume, we get the following abort:

  BTRFS: Transaction aborted (error -2)
  WARNING: CPU: 0 PID: 833 at fs/btrfs/transaction.c:1875 create\_pending\_snapshot+0x1040/0x1190 \[btrfs\]
  Modules linked in: pata\_acpi btrfs ata\_piix libata scsi\_mod virtio\_net blake2b\_generic xor net\_failover virtio\_rng failover scsi\_common rng\_core raid6\_pq libcrc32c
  CPU: 0 PID: 833 Comm: t\_snapshot\_dele Not tainted 6.7.0-rc6 \#2
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-1.fc39 04/01/2014
  RIP: 0010:create\_pending\_snapshot+0x1040/0x1190 \[btrfs\]
  RSP: 0018:ffffa09c01337af8 EFLAGS: 00010282
  RAX: 0000000000000000 RBX: ffff9982053e7c78 RCX: 0000000000000027
  RDX: ffff99827dc20848 RSI: 0000000000000001 RDI: ffff99827dc20840
  RBP: ffffa09c01337c00 R08: 0000000000000000 R09: ffffa09c01337998
  R10: 0000000000000003 R11: ffffffffb96da248 R12: fffffffffffffffe
  R13: ffff99820535bb28 R14: ffff99820b7bd000 R15: ffff99820381ea80
  FS:  00007fe20aadabc0(0000) GS:ffff99827dc00000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 0000559a120b502f CR3: 00000000055b6000 CR4: 00000000000006f0
  Call Trace:
   \<TASK\>
   ? create\_pending\_snapshot+0x1040/0x1190 \[btrfs\]
   ? \_\_warn+0x81/0x130
   ? create\_pending\_snapshot+0x1040/0x1190 \[btrfs\]
   ? report\_bug+0x171/0x1a0
   ? handle\_bug+0x3a/0x70
   ? exc\_invalid\_op+0x17/0x70
   ? asm\_exc\_invalid\_op+0x1a/0x20
   ? create\_pending\_snapshot+0x1040/0x1190 \[btrfs\]
   ? create\_pending\_snapshot+0x1040/0x1190 \[btrfs\]
   create\_pending\_snapshots+0x92/0xc0 \[btrfs\]
   btrfs\_commit\_transaction+0x66b/0xf40 \[btrfs\]
   btrfs\_mksubvol+0x301/0x4d0 \[btrfs\]
   btrfs\_mksnapshot+0x80/0xb0 \[btrfs\]
   \_\_btrfs\_ioctl\_snap\_create+0x1c2/0x1d0 \[btrfs\]
   btrfs\_ioctl\_snap\_create\_v2+0xc4/0x150 \[btrfs\]
   btrfs\_ioctl+0x8a6/0x2650 \[btrfs\]
   ? kmem\_cache\_free+0x22/0x340
   ? do\_sys\_openat2+0x97/0xe0
   \_\_x64\_sys\_ioctl+0x97/0xd0
   do\_syscall\_64+0x46/0xf0
   entry\_SYSCALL\_64\_after\_hwframe+0x6e/0x76
  RIP: 0033:0x7fe20abe83af
  RSP: 002b:00007ffe6eff1360 EFLAGS: 00000246 ORIG\_RAX: 0000000000000010
  RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fe20abe83af
  RDX: 00007ffe6eff23c0 RSI: 0000000050009417 RDI: 0000000000000003
  RBP: 0000000000000003 R08: 0000000000000000 R09: 00007fe20ad16cd0
  R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
  R13: 00007ffe6eff13c0 R14: 00007fe20ad45000 R15: 0000559a120b6d58
   \</TASK\>
  ---\[ end trace 0000000000000000 \]---
  BTRFS: error (device vdc: state A) in create\_pending\_snapshot:1875: errno=-2 No such entry
  BTRFS info (device vdc: state EA): forced readonly
  BTRFS warning (device vdc: state EA): Skipping commit of aborted transaction.
  BTRFS: error (device vdc: state EA) in cleanup\_transaction:2055: errno=-2 No such entry

This happens because create\_pending\_snapshot() initializes the new root
item as a copy of the source root item. This includes the refs field,
which is 0 for a deleted subvolume. The call to btrfs\_insert\_root()
therefore inserts a root with refs == 0. btrfs\_get\_new\_fs\_root() then
finds the root and returns -ENOENT if refs == 0, which causes
create\_pending\_snapshot() to abort.

Fix it by checking the source root's refs before attempting the
snapshot, but after locking subvol\_sem to avoid racing with deletion.

## Affected and fixed versions

- Linux: \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< c06941564027bdbc01d2df7f41e333c11cb0482d; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< 2bdf872bcfe629a6202ffd6641615a8ed00e8464; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< 0877497dc97834728e1b528ddf1e1c484292c29c; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< 6e6bca99e8d88d989a7cde4c064abea552d5219b; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< ec794a7528199e1be6d47bec03f4755aa75df256; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< d8680b722f0ff6d7a01ddacc1844e0d52354d6ff; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< 7081929ab2572920e94d70be3d332e5c9f97095a (cvelist)
- Linux: 2.6.35 (cvelist)

## Mitigation

- Upgrade Linux to 7081929ab2572920e94d70be3d332e5c9f97095a or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-26644. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-26644.md
Affected: Linux >= d68fc57b7e3245cfacf2e3b47acfed1946a11786, < c06941564027bdbc01d2df7f41e333c11cb0482d; >= d68fc57b7e3245cfacf2e3b47acfed1946a11786, < 2bdf872bcfe629a6202ffd6641615a8ed00e8464; >= d68fc57b7e3245cfacf2e3b47acfed1946a11786, < 0877497dc97834728e1b528ddf1e1c484292c29c; >= d68fc57b7e3245cfacf2e3b…
Fixed in: Linux 2bdf872bcfe629a6202ffd6641615a8ed00e8464, Linux 0877497dc97834728e1b528ddf1e1c484292c29c, Linux 6e6bca99e8d88d989a7cde4c064abea552d5219b, Linux 7081929ab2572920e94d70be3d332e5c9f97095a

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-26644 being exploited?

There is no confirmed exploitation: CVE-2024-26644 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-26644?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-26644?

Linux \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< c06941564027bdbc01d2df7f41e333c11cb0482d; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< 2bdf872bcfe629a6202ffd6641615a8ed00e8464; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< 0877497dc97834728e1b528ddf1e1c484292c29c; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< 6e6bca99e8d88d989a7cde4c064abea552d5219b; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< ec794a7528199e1be6d47bec03f4755aa75df256; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< d8680b722f0ff6d7a01ddacc1844e0d52354d6ff; \>= d68fc57b7e3245cfacf2e3b47acfed1946a11786, \< 7081929ab2572920e94d70be3d332e5c9f97095a; Linux 2.6.35.

### Is there a fix for CVE-2024-26644?

Yes. Fixed in Linux 2bdf872bcfe629a6202ffd6641615a8ed00e8464, Linux 0877497dc97834728e1b528ddf1e1c484292c29c, Linux 6e6bca99e8d88d989a7cde4c064abea552d5219b, Linux 7081929ab2572920e94d70be3d332e5c9f97095a. Upgrade Linux to 7081929ab2572920e94d70be3d332e5c9f97095a or later.

### How do I check if I'm affected by CVE-2024-26644?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/2bdf872bcfe629a6202ffd6641615a8ed00e8464>
- patch: <https://git.kernel.org/stable/c/0877497dc97834728e1b528ddf1e1c484292c29c>
- patch: <https://git.kernel.org/stable/c/6e6bca99e8d88d989a7cde4c064abea552d5219b>
- patch: <https://git.kernel.org/stable/c/ec794a7528199e1be6d47bec03f4755aa75df256>
- patch: <https://git.kernel.org/stable/c/d8680b722f0ff6d7a01ddacc1844e0d52354d6ff>
- patch: <https://git.kernel.org/stable/c/7081929ab2572920e94d70be3d332e5c9f97095a>
- other: <https://git.kernel.org/stable/c/c06941564027bdbc01d2df7f41e333c11cb0482d>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-26644>

HTML: <https://flawdb.com/CVE-2024-26644> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-26644>
