xfs: avoid dereferencing log items after push callbacks
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 90c60e16401248a4900f3f9387f563d0178dcf34 · < 79ef34ec0554ec04bdbafafbc9836423734e1bd6| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
xfs: avoid dereferencing log items after push callbacks
After xfsaild_push_item() calls iop_push(), the log item may have been freed if the AIL lock was dropped during the push. Background inode reclaim or the dquot shrinker can free the log item while the AIL lock is not held, and the tracepoints in the switch statement dereference the log item after iop_push() returns.
Fix this by capturing the log item type, flags, and LSN before calling xfsaild_push_item(), and introducing a new xfs_ail_push_class trace event class that takes these pre-captured values and the ailp pointer instead of the log item pointer.
From the CVE record · Linux
In the Linux kernel's XFS code, a push callback can leave a log item freed before a tracepoint dereferences it. Background inode reclaim or the dquot shrinker can free the item while the AIL lock is not held. The input does not specify an attacker path, authentication requirement, or user interaction.
Engineers running Linux kernels with XFS should check their systems; affected versions are not specified.