Archive-only list for patches
 help / color / mirror / Atom feed
* [PATCH 0/4] vfs: if RESOLVE_NO_XDEV passed to openat2, don't *trigger* automounts
@ 2025-08-17 17:15 Askar Safin
  2025-08-17 17:15 ` [PATCH 1/4] vfs: fs/namei.c: move cross-device check to traverse_mounts Askar Safin
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Askar Safin @ 2025-08-17 17:15 UTC (permalink / raw)
  To: Alexander Viro, Christian Brauner, Jan Kara, cyphar, Ian Kent
  Cc: linux-fsdevel, David Howells, autofs mailing list, patches

openat2 had a bug: if we pass RESOLVE_NO_XDEV, then openat2
doesn't traverse through automounts, but may still trigger them.
See this link for full bug report with reproducer:
https://lore.kernel.org/linux-fsdevel/20250817075252.4137628-1-safinaskar@zohomail.com/

This patchset fixes the bug.

RESOLVE_NO_XDEV logic hopefully becomes more clear:
now we immediately fail when we cross mountpoints.

I think this patchset should get to -fixes and stable trees.

I split everything to very small commits to make
everything as bisectable as possible.

Minimal testing was performed. I tested that my original
reproducer doesn't reproduce anymore. And I did boot-test
with localmodconfig in qemu

I'm not very attached to this patchset. I. e. I will not be offended
if someone else will submit different fix for this bug.

Askar Safin (4):
  vfs: fs/namei.c: move cross-device check to traverse_mounts
  vfs: fs/namei.c: remove LOOKUP_NO_XDEV check from handle_mounts
  vfs: fs/namei.c: move cross-device check to __traverse_mounts
  vfs: fs/namei.c: if RESOLVE_NO_XDEV passed to openat2, don't *trigger*
    automounts

 fs/namei.c | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

-- 
2.47.2


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-08-25 17:48 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-17 17:15 [PATCH 0/4] vfs: if RESOLVE_NO_XDEV passed to openat2, don't *trigger* automounts Askar Safin
2025-08-17 17:15 ` [PATCH 1/4] vfs: fs/namei.c: move cross-device check to traverse_mounts Askar Safin
2025-08-17 17:15 ` [PATCH 2/4] vfs: fs/namei.c: remove LOOKUP_NO_XDEV check from handle_mounts Askar Safin
2025-08-17 18:00   ` Al Viro
2025-08-17 17:15 ` [PATCH 3/4] vfs: fs/namei.c: move cross-device check to __traverse_mounts Askar Safin
2025-08-17 17:15 ` [PATCH 4/4] vfs: fs/namei.c: if RESOLVE_NO_XDEV passed to openat2, don't *trigger* automounts Askar Safin
2025-08-17 17:53   ` Al Viro
2025-08-17 17:54     ` Al Viro
2025-08-18  5:17   ` Aleksa Sarai
2025-08-18  7:15     ` Aleksa Sarai
2025-08-25 17:48       ` Askar Safin
2025-08-18  5:31 ` [PATCH 0/4] vfs: " Aleksa Sarai
2025-08-19  8:21   ` Christian Brauner
2025-08-25 12:46     ` Askar Safin
2025-08-25 13:14       ` Christian Brauner
2025-08-19  8:24 ` Christian Brauner
2025-08-20 18:04   ` Askar Safin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox