# CVE-2026-97549: xfs: fix under-reservation of blocks when repairing sf directories

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.21% (percentile 6, 2026-11-26)
- **Published:** 2026-09-25T10:21:42.852Z
- **Modified:** 2026-10-19T10:17:23.903Z

## Who should check

- Anyone running Linux \>= 629fdaf5f5b1b7f7107ed4de04e0991a99501ced, \< 996cce0c422b66a0e8b1a99505f896b0669ee5b6; \>= 629fdaf5f5b1b7f7107ed4de04e0991a99501ced, \< b8f46ca5cbd629ffb91489ad7f970b3837835b0a; \>= 629fdaf5f5b1b7f7107ed4de04e0991a99501ced, \< b950e84acd072ac648ace4fea53c0b1212da4b2c; \>= 629fdaf5f5b1b7f7107ed4de04e0991a99501ced, \< 4d3c07591534517c633945c8d8e6526f10e3fabc
- Anyone running Linux 6.10

## Description

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

xfs: fix under-reservation of blocks when repairing sf directories

Whilst running QA on XFS for-next as of 7.3-rc2 with MKFS\_OPTIONS="-n
size=8192", I observed the following (trimmed) dmesg splat:

 XFS: Assertion failed: args-\>total \>= dp-\>i\_nblocks - nblks, file: fs/xfs/libxfs/xfs\_da\_btree.c, line: 2387
 WARNING: fs/xfs/xfs\_message.c:104 at assfail+0x46/0x4a \[xfs\], CPU\#0: xfs\_scrub/1426511
 CPU: 0 UID: 0 PID: 1426511 Comm: xfs\_scrub Tainted: G        W           7.3.0-rc2-djwx \#rc2 PREEMPT(lazy)  6e418570b606a39783b0e7e7b30dc407b965f9e8
 Tainted: \[W\]=WARN
 RIP: 0010:assfail+0x46/0x4a \[xfs\]
 RSP: 0018:ffffc900010d7890 EFLAGS: 00010246
 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000ffffffd1
 RDX: 0000000000000000 RSI: 0000000000000021 RDI: ffffffffa059fd38
 RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000
 R10: 000000000000000a R11: 000000007fffffff R12: ffffc900010d7940
 R13: ffff888368d8f980 R14: ffffc900010d7a48 R15: ffffc900010d78d0
 FS:  00007f445c5ce680(0000) GS:ffff8884a97ea000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 00007f443803b9a8 CR3: 0000000107a4b000 CR4: 00000000003506f0
 Call Trace:
  \<TASK\>
  xfs\_da\_grow\_inode\_int+0x2e0/0x300 \[xfs 5de2257e14108c136f11317e6bbb8ac77efd392c\]
  xfs\_dir2\_grow\_inode+0x6e/0x150 \[xfs 5de2257e14108c136f11317e6bbb8ac77efd392c\]
  xfs\_dir2\_sf\_to\_block+0x149/0x870 \[xfs 5de2257e14108c136f11317e6bbb8ac77efd392c\]
  xrep\_dir\_swap\_prep+0xe2/0x110 \[xfs 5de2257e14108c136f11317e6bbb8ac77efd392c\]
  xrep\_dir\_swap+0xfb/0x2f0 \[xfs 5de2257e14108c136f11317e6bbb8ac77efd392c\]
  xrep\_dir\_rebuild\_tree+0x99/0x100 \[xfs 5de2257e14108c136f11317e6bbb8ac77efd392c\]
  xrep\_directory+0x83/0x1c0 \[xfs 5de2257e14108c136f11317e6bbb8ac77efd392c\]
  xrep\_attempt+0x4f/0x1e0 \[xfs 5de2257e14108c136f11317e6bbb8ac77efd392c\]
  xfs\_scrub\_metadata+0x393/0x5b0 \[xfs 5de2257e14108c136f11317e6bbb8ac77efd392c\]
  xfs\_ioc\_scrubv\_metadata+0x306/0x570 \[xfs 5de2257e14108c136f11317e6bbb8ac77efd392c\]
  xfs\_file\_ioctl+0xa4f/0x1150 \[xfs 5de2257e14108c136f11317e6bbb8ac77efd392c\]
  \_\_x64\_sys\_ioctl+0x76/0xc0
  do\_syscall\_64+0x7a/0x3b0
  entry\_SYSCALL\_64\_after\_hwframe+0x4b/0x53

This is a consequence of commit 0fe77e57588b98, which added the
following assertion to xfs\_da\_grow\_inode\_int:

 ASSERT(args-\>total \>= dp-\>i\_nblocks - nblks);

Tracing this back to xrep\_dir\_swap\_prep, I noticed that the xfs\_da\_args
object that's passed to xfs\_dir2\_sf\_to\_block sets args-\>total to 1.
This is incorrect because mkfs set the directory block size to 8k and
the filesystem block size to 4k.  In other words, args-\>total should be
2 here, not 1.

Dave Chinner tripped over the same problem with the same branch through
a different channel -- his test setup set the fs block size to 1k, in
which case the directory block size is still set to 4k.  Here,
args-\>total should be 4.

Changing the assignment of args-\>total to sc-\>mp-\>m\_dir\_geo-\>fsbcount
makes the assertion go away, but that isn't a complete fix.  In
xrep\_tempexch\_estimate, we also incorrectly assume that a shortform
conversion requires 1 fsblock when it should be m\_dir\_geo-\>fsbcount.
Without that, we can under-reserve space in the transaction and cause a
filesystem shutdown.

Note that the xfs\_dabuf\_nfsb helper will compute the correct value for
directories and xattr, so we use that instead of open-coding the logic.
Also fix xrep\_xattr\_swap\_prep to assign args-\>total via xfs\_dabuf\_nfsb
to avoid one logic bomb if we ever support multi-fsblock attrs.

Tripped-by: 0fe77e57588b98 ("xfs: assert the reservation covers each da fork growth")

## Affected and fixed versions

- Linux: \>= 629fdaf5f5b1b7f7107ed4de04e0991a99501ced, \< 996cce0c422b66a0e8b1a99505f896b0669ee5b6; \>= 629fdaf5f5b1b7f7107ed4de04e0991a99501ced, \< b8f46ca5cbd629ffb91489ad7f970b3837835b0a; \>= 629fdaf5f5b1b7f7107ed4de04e0991a99501ced, \< b950e84acd072ac648ace4fea53c0b1212da4b2c; \>= 629fdaf5f5b1b7f7107ed4de04e0991a99501ced, \< 4d3c07591534517c633945c8d8e6526f10e3fabc (cvelist)
- Linux: 6.10 (cvelist)

## Mitigation

- Upgrade Linux to 4d3c07591534517c633945c8d8e6526f10e3fabc or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-97549.md
Affected: Linux >= 629fdaf5f5b1b7f7107ed4de04e0991a99501ced, < 996cce0c422b66a0e8b1a99505f896b0669ee5b6; >= 629fdaf5f5b1b7f7107ed4de04e0991a99501ced, < b8f46ca5cbd629ffb91489ad7f970b3837835b0a; >= 629fdaf5f5b1b7f7107ed4de04e0991a99501ced, < b950e84acd072ac648ace4fea53c0b1212da4b2c; >= 629fdaf5f5b1b7f7107ed4d…
Fixed in: Linux 996cce0c422b66a0e8b1a99505f896b0669ee5b6, Linux 4d3c07591534517c633945c8d8e6526f10e3fabc

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-2026-97549 being exploited?

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

### How serious is CVE-2026-97549?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-97549?

Linux \>= 629fdaf5f5b1b7f7107ed4de04e0991a99501ced, \< 996cce0c422b66a0e8b1a99505f896b0669ee5b6; \>= 629fdaf5f5b1b7f7107ed4de04e0991a99501ced, \< b8f46ca5cbd629ffb91489ad7f970b3837835b0a; \>= 629fdaf5f5b1b7f7107ed4de04e0991a99501ced, \< b950e84acd072ac648ace4fea53c0b1212da4b2c; \>= 629fdaf5f5b1b7f7107ed4de04e0991a99501ced, \< 4d3c07591534517c633945c8d8e6526f10e3fabc; Linux 6.10.

### Is there a fix for CVE-2026-97549?

Yes. Fixed in Linux 996cce0c422b66a0e8b1a99505f896b0669ee5b6, Linux 4d3c07591534517c633945c8d8e6526f10e3fabc. Upgrade Linux to 4d3c07591534517c633945c8d8e6526f10e3fabc or later.

### How do I check if I'm affected by CVE-2026-97549?

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

- other: <https://git.kernel.org/stable/c/996cce0c422b66a0e8b1a99505f896b0669ee5b6>
- other: <https://git.kernel.org/stable/c/b8f46ca5cbd629ffb91489ad7f970b3837835b0a>
- other: <https://git.kernel.org/stable/c/b950e84acd072ac648ace4fea53c0b1212da4b2c>
- other: <https://git.kernel.org/stable/c/4d3c07591534517c633945c8d8e6526f10e3fabc>

## 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-2026-97549>

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