CVE-2023-53867
Description
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A use-after-free flaw in the Linux kernel's Ceph filesystem, where a trimmed cap can be freed and reused by another thread, leading to crash or privilege escalation.
A use-after-free vulnerability exists in the Linux kernel's Ceph filesystem implementation, specifically in the ceph_iterate_session_caps() function. When trimming caps, the code releases the session->s_cap_lock mutex to allow other threads to proceed. However, during the window after the lock is released and before the code re-acquires ci->i_ceph_lock, a concurrent thread may remove the cap (e.g., by unmounting or another trimming operation). The callbacks then use the stale cap memory, leading to a use-after-free condition [1].
The attack surface is local; a user with the ability to mount a Ceph filesystem and trigger cap trimming operations can exploit the race condition. No special privileges on the Ceph cluster are required beyond normal filesystem access, but the attacker must be able to trigger the race window by manipulating cap management, typically through file operations or memory pressure [1].
An attacker successfully exploiting this bug can cause a kernel crash (denial of service) or potentially escalate privileges, as use-after-free in kernel memory may be leveraged for arbitrary code execution. The corruption occurs in kernel slab caches, which may allow overwriting sensitive structures [1].
The issue is fixed in the Linux kernel by a commit (stable tree) that adds a check for the cap's existence after acquiring ci->i_ceph_lock in the loop, ensuring that stale caps are skipped. Users should apply the kernel update to their distributions. There is no workaround short of avoiding Ceph mounts or limiting concurrent cap-trimming operations [1].
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
42b2515b8095c448875a73e16ae6e935618d9aaf67de78807Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4News mentions
0No linked articles in our index yet.