[PATCH 0/2] ceph: fix UAF bugs in cap flushing and MDS session handling
Xiubo Li via B4 Relay <[email protected]> Tue, 14 Jul 2026 16:13:42 +0800
| Newsgroups | org.kernel.vger.ceph-devel,org.kernel.feeds.b4-sent,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
These two patches fix use-after-free bugs: Patch 1 fixes __kick_flushing_caps(), which drops i_ceph_lock during list_for_each_entry() iteration. A concurrent handle_cap_flush_ack() can free the current cf entry, making the loop's next-pointer advance read freed memory. Patch 2 fixes check_new_map(), where three code paths drop mdsc->mutex and access the session pointer without taking a reference, opening a window for another thread to unregister and free the session. Signed-off-by: Xiubo Li <[email protected]> --- Xiubo Li (2): ceph: fix UAF in __kick_flushing_caps() on cf entry freed during unlock ceph: fix UAF in check_new_map() on session freed during unlock fs/ceph/caps.c | 11 +++++++++-- fs/ceph/mds_client.c | 6 ++++++ 2 files changed, 15 insertions(+), 2 deletions(-) --- base-commit: fc67edb66b3c9924c4e0bb366a92b32ea13c526a change-id: 20260714-ceph-uaf-fixes-bedfe0f2b159 Best regards, -- Xiubo Li <[email protected]>