xfs: stop reclaim before pushing AIL during unmount
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 90c60e16401248a4900f3f9387f563d0178dcf34 · < 8147e304d7d32fd5c3e943babc296ce2873dc279| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
xfs: stop reclaim before pushing AIL during unmount
The unmount sequence in xfs_unmount_flush_inodes() pushed the AIL while background reclaim and inodegc are still running. This is broken independently of any use-after-free issues - background reclaim and inodegc should not be running while the AIL is being pushed during unmount, as inodegc can dirty and insert inodes into the AIL during the flush, and background reclaim can race to abort and free dirty inodes.
Reorder xfs_unmount_flush_inodes() to stop inodegc and cancel background reclaim before pushing the AIL. Stop inodegc before cancelling m_reclaim_work because the inodegc worker can re-queue m_reclaim_work via xfs_inodegc_set_reclaimable.
From the CVE record · Linux
During XFS unmount, the kernel can push the AIL while background reclaim and inode garbage collection are still running. Inode garbage collection can add dirty inodes during the flush, while reclaim can race to abort and free dirty inodes. The input does not specify how an attacker could trigger or exploit the race, or whether authentication or user interaction is required.
Engineers running Linux kernels with XFS should check their versions; affected versions are not specified in the input.