# CVE-2024-55641: xfs: unlock inodes when erroring out of xfs_trans_alloc_dir

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 7% of CVEs (2026-12-02)
- Published: 2025-01-11T12:29:56.052Z
- Modified: 2026-06-17T08:11:20.537Z
- Assigned by: Linux

## Description

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

xfs: unlock inodes when erroring out of xfs_trans_alloc_dir

Debugging a filesystem patch with generic/475 caused the system to hang
after observing the following sequences in dmesg:

 XFS (dm-0): metadata I/O error in "xfs_imap_to_bp+0x61/0xe0 [xfs]" at daddr 0x491520 len 32 error 5
 XFS (dm-0): metadata I/O error in "xfs_btree_read_buf_block+0xba/0x160 [xfs]" at daddr 0x3445608 len 8 error 5
 XFS (dm-0): metadata I/O error in "xfs_imap_to_bp+0x61/0xe0 [xfs]" at daddr 0x138e1c0 len 32 error 5
 XFS (dm-0): log I/O error -5
 XFS (dm-0): Metadata I/O Error (0x1) detected at xfs_trans_read_buf_map+0x1ea/0x4b0 [xfs] (fs/xfs/xfs_trans_buf.c:311).  Shutting down filesystem.
 XFS (dm-0): Please unmount the filesystem and rectify the problem(s)
 XFS (dm-0): Internal error dqp->q_ino.reserved < dqp->q_ino.count at line 869 of file fs/xfs/xfs_trans_dquot.c.  Caller xfs_trans_dqresv+0x236/0x440 [xfs]
 XFS (dm-0): Corruption detected. Unmount and run xfs_repair
 XFS (dm-0): Unmounting Filesystem be6bcbcc-9921-4deb-8d16-7cc94e335fa7

The system is stuck in unmount trying to lock a couple of inodes so that
they can be purged.  The dquot corruption notice above is a clue to what
happened -- a link() call tried to set up a transaction to link a child
into a directory.  Quota reservation for the transaction failed after IO
errors shut down the filesystem, but then we forgot to unlock the inodes
on our way out.  Fix that.

(As written by CVE List.)

## Affected

- Linux Linux: from bd5562111d58392298a3c3b93caad71dff681b4b before 6aefe5d97ae57b1343dc60d8bb6a4ed070e5bcea; from bd5562111d58392298a3c3b93caad71dff681b4b before 53b001a21c9dff73b64e8c909c41991f01d5d00f; 6.10 (not affected: before 6.10; from 6.12.6 up to 6.12.*; from 6.13 up to *)
- linux linux_kernel: from 6.10 before 6.12.6; 6.13

## References

- <https://git.kernel.org/stable/c/6aefe5d97ae57b1343dc60d8bb6a4ed070e5bcea> (patch)
- <https://git.kernel.org/stable/c/53b001a21c9dff73b64e8c909c41991f01d5d00f> (patch)

## Sources

- CVE List: [CVE-2024-55641](https://www.cve.org/CVERecord?id=CVE-2024-55641), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-55641](https://nvd.nist.gov/vuln/detail/CVE-2024-55641), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-55641 · Whole record: https://cve.day/CVE-2024-55641.json · Rebuilt by cve.day 2026-11-25T22:58:50.928Z
