CVE-2022-48989: fscache: Fix oops due to race with cookie_lru and use_cookie
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
Event History
Frequently Asked Questions
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.
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.
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.
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.
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.