Linux kernel deadlock in XFS superblock sync
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f7664b31975bd893190708e76b2c424328f0c49b · < e5456dec79c71c8ef8f9f9adb77d320f113b34db| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
xfs: don't hold buffer locks across sync transaction commit in xfs_sync_sb_buf
xfs_sync_sb_buf() holds sb/rtsb buffer locks across a synchronous xfs_trans_commit(), which flushes the CIL push workqueue internally. If shutdown occurs during the CIL push, xfs_buf_item_unpin() needs to lock these buffers to fail them, causing a deadlock:
setlabel: holds buf lock -> flush_workqueue(xfs-cil) CIL push worker: xfs_buf_item_unpin -> xfs_buf_lock(same buf)
Remove the xfs_trans_bhold() calls so that commit releases the buffer locks normally. After the sync commit, re-acquire the buffers via mp->m_sb_bp / mp->m_rtsb_bp for the on-disk writeback.
From the CVE record · Linux
The Linux kernel's XFS superblock sync path can deadlock if shutdown occurs during a CIL push while a synchronous transaction commit holds buffer locks. The input does not specify an attacker-triggered path, required access, or user interaction.
Engineers running Linux systems that use XFS should check their kernel packages; affected versions are not specified.