xfs: save ailp before dropping the AIL lock in push callbacks
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 90c60e16401248a4900f3f9387f563d0178dcf34 · < 50f5f056807b7bed74f4f307f2ca0ed92f3e556d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
xfs: save ailp before dropping the AIL lock in push callbacks
In xfs_inode_item_push() and xfs_qm_dquot_logitem_push(), the AIL lock is dropped to perform buffer IO. Once the cluster buffer no longer protects the log item from reclaim, the log item may be freed by background reclaim or the dquot shrinker. The subsequent spin_lock() call dereferences lip->li_ailp, which is a use-after-free.
Fix this by saving the ailp pointer in a local variable while the AIL lock is held and the log item is guaranteed to be valid.
From the CVE record · Linux
XFS push callbacks can dereference a freed log item after dropping the AIL lock for buffer I/O if background reclaim or the dquot shrinker frees it. This creates a use-after-free condition; the input does not specify how an attacker could trigger it or whether access or user interaction is required.
Operators running the Linux kernel should check whether their kernel includes the XFS fix; affected versions are not specified.