fs: afs: revert mmap_prepare() change
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 |
|
|
6.18.277.0.47.1In the Linux kernel, the following vulnerability has been resolved:
fs: afs: revert mmap_prepare() change
Partially reverts commit 9d5403b1036c ("fs: convert most other generic_file_*mmap() users to .mmap_prepare()").
This is because the .mmap invocation establishes a refcount, but .mmap_prepare is called at a point where a merge or an allocation failure might happen after the call, which would leak the refcount increment.
Functionality is being added to permit the use of .mmap_prepare in this case, but in the interim, we need to fix this.
From the CVE record · Linux
The Linux kernel’s AFS mmap handling can leak a refcount increment if a mapping merge or allocation failure occurs after .mmap_prepare() is called. The input does not specify how an attacker could trigger this or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with the affected AFS mmap_prepare() change should check their versions; no affected version range is provided.