mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiubo Li via B4 Relay <devnull+xiubo.li.clyso.com@kernel.org>
To: Ilya Dryomov <idryomov@gmail.com>,
	Alex Markuze <amarkuze@redhat.com>,
	 Viacheslav Dubeyko <slava@dubeyko.com>
Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Xiubo Li <xiubo.li@clyso.com>
Subject: [PATCH 0/2] ceph: fix UAF bugs in cap flushing and MDS session handling
Date: Tue, 14 Jul 2026 16:13:42 +0800	[thread overview]
Message-ID: <20260714-ceph-uaf-fixes-v1-0-5c7603c181d5@clyso.com> (raw)

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 <xiubo.li@clyso.com>
---
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 <xiubo.li@clyso.com>



             reply	other threads:[~2026-07-14  8:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14  8:13 Xiubo Li via B4 Relay [this message]
2026-07-14  8:13 ` [PATCH 1/2] ceph: fix UAF in __kick_flushing_caps() on cf entry freed during unlock Xiubo Li via B4 Relay
2026-07-16 17:41   ` Viacheslav Dubeyko
2026-07-14  8:13 ` [PATCH 2/2] ceph: fix UAF in check_new_map() on session " Xiubo Li via B4 Relay
2026-07-16 17:43   ` Viacheslav Dubeyko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260714-ceph-uaf-fixes-v1-0-5c7603c181d5@clyso.com \
    --to=devnull+xiubo.li.clyso.com@kernel.org \
    --cc=amarkuze@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=slava@dubeyko.com \
    --cc=xiubo.li@clyso.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®