CVE-2024-55641: xfs: unlock inodes when erroring out of xfs_trans_alloc_dir
In the Linux kernel, the following vulnerability has been resolved:
xfs: unlock inodes when erroring out of xfstransallocdir
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 "xfsimaptobp+0x61/0xe0 [xfs]" at daddr 0x491520 len 32 error 5 XFS (dm-0): metadata I/O error in "xfsbtreereadbufblock+0xba/0x160 [xfs]" at daddr 0x3445608 len 8 error 5 XFS (dm-0): metadata I/O error in "xfsimaptobp+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 xfstransreadbufmap+0x1ea/0x4b0 [xfs] (fs/xfs/xfstransbuf.c:311). Shutting down filesystem. XFS (dm-0): Please unmount the filesystem and rectify the problem(s) XFS (dm-0): Internal error dqp->qino.reserved < dqp->qino.count at line 869 of file fs/xfs/xfstransdquot.c. Caller xfstransdqresv+0x236/0x440 [xfs] XFS (dm-0): Corruption detected. Unmount and run xfsrepair 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.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-55641?
CVE-2024-55641 is considered a moderate risk vulnerability affecting the Linux kernel.
How do I fix CVE-2024-55641?
To fix CVE-2024-55641, update the Linux kernel to the latest version that includes the security patch.
What systems are affected by CVE-2024-55641?
CVE-2024-55641 affects systems running the vulnerable versions of the Linux kernel utilizing the XFS filesystem.
What type of issue is identified in CVE-2024-55641?
CVE-2024-55641 is related to a metadata I/O error occurring in the XFS filesystem during directory allocation.
Is there any workaround for CVE-2024-55641?
There are currently no known workarounds for CVE-2024-55641; upgrading the kernel is the recommended action.