mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Zhan Xusheng <zhanxusheng1024@gmail.com>,
	Jaegeuk Kim <jaegeuk@kernel.org>
Cc: chao@kernel.org, Christian Brauner <brauner@kernel.org>,
	Pedro Falcato <pfalcato@suse.de>, Jan Kara <jack@suse.cz>,
	linux-f2fs-devel@lists.sourceforge.net, stable@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Zhan Xusheng <zhanxusheng@xiaomi.com>
Subject: Re: [PATCH] f2fs: use the mount idmap for the owner check in f2fs_xattr_advise_set()
Date: Mon, 3 Aug 2026 14:34:38 +0800	[thread overview]
Message-ID: <2405e513-c1be-4281-8ab8-bb1ed48bbf14@kernel.org> (raw)
In-Reply-To: <20260716025908.608098-1-zhanxusheng@xiaomi.com>

On 7/16/26 10:59, Zhan Xusheng wrote:
> f2fs_xattr_advise_set() calls inode_owner_or_capable() with &nop_mnt_idmap
> before allowing the "system.advise" xattr to be set, instead of the idmap
> that the VFS passes to the ->set() handler.
> 
> f2fs supports idmapped mounts, so on such a mount this checks the caller's
> fsuid against the unmapped on-disk owner rather than the mapped owner: the
> actual owner can be wrongly denied with -EPERM and an unrelated caller
> wrongly allowed.  Pass the handler's idmap instead.
> 
> Fixes: 01beba7957a2 ("fs: port inode_owner_or_capable() to mnt_idmap")
> Cc: stable@vger.kernel.org
> Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

  reply	other threads:[~2026-08-03  6:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16  2:59 Zhan Xusheng
2026-08-03  6:34 ` Chao Yu [this message]
2026-08-05 21:20 ` [f2fs-dev] " patchwork-bot+f2fs
2026-07-29  4:16 Rochan Avlur
2026-07-30 10:23 ` Christian Brauner
2026-08-03  8:40 ` Chao Yu
2026-08-03 13:43   ` Rochan Avlur

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=2405e513-c1be-4281-8ab8-bb1ed48bbf14@kernel.org \
    --to=chao@kernel.org \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pfalcato@suse.de \
    --cc=stable@vger.kernel.org \
    --cc=zhanxusheng1024@gmail.com \
    --cc=zhanxusheng@xiaomi.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®