fuse: re-lock request before replacing page cache folio
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ce534fb052928ce556639d7ecf01cbf4e01321e1 · < 0223f452532d9cd8a5e87c45de828fd93c99bd25| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
fuse: re-lock request before replacing page cache folio
fuse_try_move_folio() unlocks the request on entry but does not re-lock it on the success path. This means fuse_chan_abort() can end the request and free the fuse_io_args (eg fuse_readpages_end()) while the subsequent copy chain logic after fuse_try_move_folio() accesses the fuse_io_args, leading to use-after-free issues.
Fix this by calling lock_request() before replace_page_cache_folio(). This ensures the request is locked on the success path which will prevent the fuse_io_args from being freed while the later copying logic runs, and also ensures that the ap->folios[i]->mapping is never null since ap->folios[i] will always point to the newfolio after replace_page_cache_folio().
From the CVE record · Linux
The Linux kernel’s FUSE code can leave a request unlocked when replacing a page-cache folio. If the request is aborted while later copy logic accesses its arguments, a use-after-free can occur. The input does not specify attacker access, authentication requirements, or user interaction.
Engineers running Linux kernels with FUSE support should check their kernel version; affected versions were not provided.