Bug 2347645 (CVE-2022-49655) - CVE-2022-49655 kernel: fscache: Fix invalidation/lookup race
Summary: CVE-2022-49655 kernel: fscache: Fix invalidation/lookup race
Keywords:
Status: NEW
Alias: CVE-2022-49655
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-26 03:01 UTC by OSIDB Bzimport
Modified: 2025-04-23 08:50 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-02-26 03:01:34 UTC
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.

Comment 1 Mauro Matteo Cascella 2025-02-26 13:39:34 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022621-CVE-2022-49655-0370@gregkh/T

Comment 4 Avinash Hanwate 2025-02-28 04:13:43 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022621-CVE-2022-49655-0370@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.