NFS: Fix a race when updating an existing write
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ bd37d6fce184836bd5e7cd90ce40116a4fadaf2a · < 202a3432d21ac060629a760fff3b0a39859da3ea| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
NFS: Fix a race when updating an existing write
After nfs_lock_and_join_requests() tests for whether the request is still attached to the mapping, nothing prevents a call to nfs_inode_remove_request() from succeeding until we actually lock the page group. The reason is that whoever called nfs_inode_remove_request() doesn't necessarily have a lock on the page group head.
So in order to avoid races, let's take the page group lock earlier in nfs_lock_and_join_requests(), and hold it across the removal of the request in nfs_inode_remove_request().
From the CVE record · Linux
The Linux kernel’s NFS code has a race when updating an existing write request: a request can be removed after an attachment check but before the page group is locked. The description does not specify what an attacker could do, whether access is local or over a network, or whether authentication or user interaction is required.
Engineers running the Linux kernel with NFS should check their installations; affected versions are not specified.