mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Markuze <amarkuze@redhat.com>
To: Max Kellermann <max.kellermann@ionos.com>
Cc: Xiubo Li <xiubli@kernel.org>, Ilya Dryomov <idryomov@gmail.com>,
	ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/9] ceph: fix mdsmap and osdmap use-after-free in unlocked readers
Date: Sun, 22 Nov 2026 19:52:25 +0000	[thread overview]
Message-ID: <20261122195226.1328644-1-amarkuze@redhat.com> (raw)
In-Reply-To: <20261111161830.1336485-1-max.kellermann@ionos.com>

Hi Max,

There's a separate xattr-limit window in patch 3. The map handler installs
the new map but updates max_xattr_size only after check_new_map(), which
can drop mdsc->mutex and wait for a reconnect. During that interval,
__ceph_setxattr() still uses the previous limit.

For example, if the limit is lowered while another MDS is reconnecting,
a client with XATTR_EXCL on a file can accept a value that fits the old
limit but exceeds the new one. An MDS using the new limit can then discard
the oversized dirty xattr on cap flush, even though setxattr() returned
success.

Could the new limit be published before check_new_map() drops the mutex?
Also, __build_xattrs() can drop i_ceph_lock; could the second size check
reload the limit instead of reusing the value sampled before that call?

Thanks,
Alex


      parent reply	other threads:[~2026-11-22 19:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 16:18 Max Kellermann
2026-11-11 16:18 ` [PATCH 1/9] ceph: fix mdsmap use-after-free in ceph_statfs() Max Kellermann
2026-11-11 16:18 ` [PATCH 2/9] ceph: fix mdsmap use-after-free in debugfs mdsmap_show() Max Kellermann
2026-11-11 16:18 ` [PATCH 3/9] ceph: fix mdsmap use-after-free in __ceph_setxattr() Max Kellermann
2026-11-11 16:18 ` [PATCH 4/9] ceph: fix mdsmap use-after-free in send_renew_caps() and renewed_caps() Max Kellermann
2026-11-11 16:18 ` [PATCH 5/9] ceph: fix mdsmap use-after-free in mds_peer_reset() Max Kellermann
2026-11-11 16:18 ` [PATCH 6/9] ceph: fix mdsmap use-after-free in ceph_get_tree() error path Max Kellermann
2026-11-11 16:18 ` [PATCH 7/9] ceph: fix osdmap use-after-free in ceph_sync_setxattr() Max Kellermann
2026-11-11 16:18 ` [PATCH 8/9] libceph: fix osdmap use-after-free in ceph_wait_for_latest_osdmap() Max Kellermann
2026-11-11 16:18 ` [PATCH 9/9] rbd: fix osdmap use-after-free in pool lookups Max Kellermann
2026-11-12 14:48 ` [PATCH 0/9] ceph: fix mdsmap and osdmap use-after-free in unlocked readers Xiubo Li
2026-11-22 19:52 ` Alex Markuze [this message]

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=20261122195226.1328644-1-amarkuze@redhat.com \
    --to=amarkuze@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=max.kellermann@ionos.com \
    --cc=xiubli@kernel.org \
    /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®