NFS/localio: prevent direct reclaim recursion into NFS via nfs_writepages
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
NFS/localio: prevent direct reclaim recursion into NFS via nfs_writepages
LOCALIO is an NFS loopback mount optimization that avoids using the network for READ, WRITE and COMMIT if the NFS client and server are determined to be on the same system. But because LOCALIO is still fundamentally "just NFS loopback mount" it is susceptible to recursion deadlock via direct reclaim, e.g.: NFS LOCALIO down to XFS and then back into NFS via nfs_writepages.
Fix LOCALIO's potential for direct reclaim deadlock by ensuring that all its page cache allocations are done from GFP_NOFS context.
Thanks to Ben Coddington for pointing out commit ad22c7a043c2 ("xfs: prevent stack overflows from page cache allocation").
From the CVE record · Linux
The Linux kernel's NFS LOCALIO optimization can deadlock when direct reclaim recurses back into NFS through nfs_writepages. This can occur on an NFS loopback mount when the client and server are on the same system; the input does not establish an attacker path, authentication requirement, or user interaction.
Engineers running Linux kernels with NFS LOCALIO should check their versions against the vendor advisory; affected versions are not specified.