CVE-2022-49655: fscache: Fix invalidation/lookup race
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, fscacheinvalidate() will be asked to invalidate the file - however, if the cookie is in the LOOKINGUP state (or the CREATING state), then request to invalidate doesn't get recorded for fscachecookiestatemachine() to do something with.
Fix this by making fscacheinvalidate() set a flag if it sees the cookie is in the LOOKINGUP state to indicate that we need to go to invalidation. Note that this requires a count on the naccesses counter for the state machine, which that will release when it's done.
fscachecookiestatemachine() 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.18.14-1
Event History
Frequently Asked Questions
What is the severity of CVE-2022-49655?
CVE-2022-49655 is classified as a medium severity vulnerability in the Linux kernel.
How does CVE-2022-49655 impact Linux systems?
CVE-2022-49655 can cause a race condition when an NFS file is closed while being invalidated, potentially leading to unexpected behavior.
How do I fix CVE-2022-49655?
To fix CVE-2022-49655, update to the latest version of the Linux kernel where the vulnerability has been addressed.
Which versions of the Linux kernel are affected by CVE-2022-49655?
CVE-2022-49655 affects various versions of the Linux kernel prior to the fix being applied in subsequent releases.
What are the symptoms of exploitation of CVE-2022-49655?
Symptoms of exploitation of CVE-2022-49655 may include instability or unexpected behavior when using NFS file operations.