ceph: fix UAF bugs in cap flushing and MDS session handling
Get series with b4
b4 am [email protected] change-id 20260714-ceph-uaf-fixes-bedfe0f2b159Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ceph: fix UAF in __kick_flushing_caps() on cf entry freed during unlockfs/ | +9 | 1 reply | |
| 2/2 | ceph: fix UAF in check_new_map() on session freed during unlockfs/ | +6 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Viacheslav Dubeyko |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] ceph: fix UAF bugs in cap flushing and MDS session handling
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.
---
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,
Signature · 1 line
Xiubo Li <[email protected]>