Thread (8 messages) 8 messages, 2 authors, 7d ago

Re: [PATCH 1/2] fuse: allow FUSE_SYNCFS for privileged userspace servers

From: Miklos Szeredi <miklos@szeredi.hu>
Date: 2026-06-17 08:22:37
Also in: fuse-devel, linux-fsdevel, linux-kselftest, lkml

On Tue, 16 Jun 2026 at 17:20, Jimmy Zuber [off-list ref] wrote:
+/*
+ * A server can stall syncfs()/sync(), so only honor FUSE_HAS_SYNCFS for
+ * mounts owned by the initial user namespace, i.e. set up with host
+ * privilege (like virtiofs and fuseblk).
+ */
+static bool fuse_syncfs_enable(struct fuse_conn *fc, u64 flags)
+{
+       return (flags & FUSE_HAS_SYNCFS) && fc->user_ns == &init_user_ns;
+}
Sounds really easy to trick: start the server in the initial user ns,
then clone the mounter with a new user/mount namespace.   The
init_user_ns test will pass happily, since the server is running in
the initial namespace.

Thanks,
Miklos
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help