lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221016170046.171936-1-work.viveris@nightmared.fr>
Date:   Sun, 16 Oct 2022 19:00:46 +0200
From:   Simon Thoby <work.viveris@...htmared.fr>
To:     Miklos Szeredi <miklos@...redi.hu>
Cc:     Simon Thoby <work.viveris@...htmared.fr>,
        CONZELMANN Francois <Francois.CONZELMANN@...eris.fr>,
        "Eric W . Biederman" <ebiederm@...ssion.com>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] fuse: enable unprivileged mounts for fuseblk

Commit 4ad769f3c346ec3d458e255548dec26ca5284cf6 ("fuse: Allow fully
unprivileged mounts") enabled mounting filesystems with the 'fuse' type for
any user with CAP_SYS_ADMIN inside their respective user namespace, but did
not do so for the 'fuseblk' filesystem type.

Some FUSE filesystems implementations - like ntfs-3g - prefer using
'fuseblk' over 'fuse', which imply unprivileged users could not use these
tools - in their "out-of-the-box" configuration, as these tools can always
be patched to use the 'fuse' filesystem type to circumvent the problem.

Enable unprivileged mounts for the 'fuseblk' type, thus uniformizing the
behavior of the two FUSE filesystem types.

Signed-off-by: Simon Thoby <work.viveris@...htmared.fr>
---
 fs/fuse/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 6b3beda16c1b..d17f87531dc8 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -1839,7 +1839,7 @@ static struct file_system_type fuseblk_fs_type = {
 	.init_fs_context = fuse_init_fs_context,
 	.parameters	= fuse_fs_parameters,
 	.kill_sb	= fuse_kill_sb_blk,
-	.fs_flags	= FS_REQUIRES_DEV | FS_HAS_SUBTYPE,
+	.fs_flags	= FS_REQUIRES_DEV | FS_HAS_SUBTYPE | FS_USERNS_MOUNT,
 };
 MODULE_ALIAS_FS("fuseblk");
 

base-commit: 472c7791cc2b48010af3ce61ce76edbaa26500d2
-- 
2.38.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ