ceph: fix potential use-after-free bug when trimming caps
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ceph: fix potential use-after-free bug when trimming caps
When trimming the caps and just after the 'session->s_cap_lock' is released in ceph_iterate_session_caps() the cap maybe removed by another thread, and when using the stale cap memory in the callbacks it will trigger use-after-free crash.
We need to check the existence of the cap just after the 'ci->i_ceph_lock' being acquired. And do nothing if it's already removed.
From the CVE record · Linux
The Linux kernel’s Ceph cap-trimming code can use a cap after another thread removes it. This race can cause a use-after-free crash; the input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with Ceph support should check their systems; affected versions are not specified.