CVE-2022-48989: fscache: Fix oops due to race with cookie_lru and use_cookie

Published Oct 21, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

fscache: Fix oops due to race with cookielru and usecookie

If a cookie expires from the LRU and the LRUDISCARD flag is set, but the state machine has not run yet, it's possible another thread can call fscacheusecookie and begin to use it.

When the cookieworker finally runs, it will see the LRUDISCARD flag set, transition the cookie->state to LRUDISCARDING, which will then withdraw the cookie. Once the cookie is withdrawn the object is removed the below oops will occur because the object associated with the cookie is now NULL.

Fix the oops by clearing the LRUDISCARD bit if another thread uses the cookie before the cookieworker runs.

BUG: kernel NULL pointer dereference, address: 0000000000000008 ... CPU: 31 PID: 44773 Comm: kworker/u130:1 Tainted: G E 6.0.0-5.dneg.x8664 #1 Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Workqueue: eventsunbound netfsrreqwritetocachework [netfs] RIP: 0010:cachefilespreparewrite+0x28/0x90 [cachefiles] ... Call Trace: netfsrreqwritetocachework+0x11c/0x320 [netfs] processonework+0x217/0x3e0 workerthread+0x4a/0x3b0 kthread+0xd6/0x100

Other sources

In the Linux kernel, the following vulnerability has been resolved:

fscache: Fix oops due to race with cookielru and usecookie

If a cookie expires from the LRU and the LRUDISCARD flag is set, but the state machine has not run yet, it's possible another thread can call fscacheusecookie and begin to use it.

When the cookieworker finally runs, it will see the LRUDISCARD flag set, transition the cookie->state to LRUDISCARDING, which will then withdraw the cookie. Once the cookie is withdrawn the object is removed the below oops will occur because the object associated with the cookie is now NULL.

Fix the oops by clearing the LRUDISCARD bit if another thread uses the cookie before the cookieworker runs.

BUG: kernel NULL pointer dereference, address: 0000000000000008 ... CPU: 31 PID: 44773 Comm: kworker/u130:1 Tainted: G E 6.0.0-5.dneg.x8664 #1 Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Workqueue: eventsunbound netfsrreqwritetocachework [netfs] RIP: 0010:cachefilespreparewrite+0x28/0x90 [cachefiles] ... Call Trace: netfsrreqwritetocachework+0x11c/0x320 [netfs] processonework+0x217/0x3e0 workerthread+0x4a/0x3b0 kthread+0xd6/0x100

NVD

Affected Software

9 affected components
Linux Linux kernel>=5.17<6.0.13
Linux Linux kernel=6.1-rc1
Linux Linux kernel=6.1-rc2
Linux Linux kernel=6.1-rc3
Linux Linux kernel=6.1-rc4
Linux Linux kernel=6.1-rc5
Linux Linux kernel=6.1-rc6
Linux Linux kernel=6.1-rc7
Linux Linux kernel=6.1-rc8

Event History

Oct 21, 2024
CVE Published
via MITRE·08:06 PM
Data Sourced
via MITRE·08:06 PM
DescriptionSeverity
Data Sourced
via NVD·08:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via Red Hat·09:04 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2022-48989?

CVE-2022-48989 has been assigned a low severity rating due to its specific conditions for exploitation.

2

How do I fix CVE-2022-48989?

To mitigate CVE-2022-48989, update your Linux kernel to version 6.0.13 or later, or to 6.1-rc1 or later.

3

What versions of the Linux kernel are affected by CVE-2022-48989?

CVE-2022-48989 affects Linux kernel versions from 5.17 up to 6.0.13 and several 6.1 release candidates.

4

What component of the Linux kernel does CVE-2022-48989 pertain to?

CVE-2022-48989 pertains specifically to the fscache component of the Linux kernel.

5

Is CVE-2022-48989 a local or remote vulnerability?

CVE-2022-48989 is considered a local vulnerability, as it requires access to the affected system to exploit.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203