CVE-2022-49655 fscache: Fix invalidation/lookup race
A race condition in the Linux kernel fscache subsystem can lead to local file corruption when NFS files are modified and read concurrently.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-49655?
CVE-2022-49655 is a medium-severity vulnerability in Linux kernel, published on 26 Feb 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
fscache: Fix invalidation/lookup race
If an NFS file is opened for writing and closed, fscache_invalidate() will be asked to invalidate the file - however, if the cookie is in the LOOKING_UP state (or the CREATING state), then request to invalidate doesn't get recorded for fscache_cookie_state_machine() to do something with.
Fix this by making __fscache_invalidate() set a flag if it sees the cookie is in the LOOKING_UP state to indicate that we need to go to invalidation. Note that this requires a count on the n_accesses counter for the state machine, which that will release when it's done.
fscache_cookie_state_machine() then shifts to the INVALIDATING state if it sees the flag.
Without this, an nfs file can get corrupted if it gets modified locally and then read locally as the cache contents may not get updated.
Weakness: CWE-362
Which versions are affected by CVE-2022-49655?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2022-49655?
Apply the vendor's patch.
Is CVE-2022-49655 being exploited?
There is no known exploitation of CVE-2022-49655 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2022-49655, GHSA-7cpf-6xr3-fp62, UBUNTU-CVE-2022-49655.