Re: [f2fs-dev] [PATCH] f2fs: use the mount idmap for the owner check in f2fs_xattr_advise_set()

Chao Yu via Linux-f2fs-devel <[email protected]> Mon, 3 Aug 2026 14:34:38 +0800
Newsgroups net.sourceforge.lists.linux-f2fs-devel,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <[email protected]>
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: [email protected]
> Signed-off-by: Zhan Xusheng <[email protected]>

Reviewed-by: Chao Yu <[email protected]>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel