public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] libfuse: run fuse servers as a contained service
@ 2026-04-09 22:24 Darrick J. Wong
  2026-04-10 12:24 ` Bernd Schubert
  0 siblings, 1 reply; 15+ messages in thread
From: Darrick J. Wong @ 2026-04-09 22:24 UTC (permalink / raw)
  To: bschubert, djwong; +Cc: bernd, joannelkoong, linux-fsdevel, miklos, neal

Hi Bernd,

Please pull this branch with changes for libfuse.

As usual, I did a test-merge with the main upstream branch as of a few
minutes ago, and didn't see any conflicts.  Please let me know if you
encounter any problems.

--D

The following changes since commit 3bb9cd99b3688df1bb7536de158ed9e532b277fb:

Add the codechecker/cppcheck github action (2026-04-07 10:08:49 +0200)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/djwong/libfuse.git tags/fuse-service-container_2026-04-09

for you to fetch changes up to 0db39a8f8844ff88496ed36da417554cb4f3751d:

nullfs: support fuse systemd service mode (2026-04-09 12:31:08 -0700)

----------------------------------------------------------------
libfuse: run fuse servers as a contained service [v4 1/9]

This patchset defines the necessary communication protocols and library
code so that users can mount fuse servers that run in unprivileged
systemd service containers.  That in turn allows unprivileged untrusted
mounts, because the worst that can happen is that a malicious image
crashes the fuse server and the mount dies, instead of corrupting the
kernel's memory.

v4: fix a large number of security problems that only matter when the
mount helper is being run as a setuid program; fix protocol
byteswapping problems; add CLOEXEC to all files being traded
back and forth; add an umount command; and strengthen mount socket
protocol checks.
v3: refactor the sample code to reduce duplication; fix all the
checkpatch complaints; examples actually build standalone;
fuservicemount handles utab now; cleaned up meson feature detection;
handle MS_ flags that don't translate to MOUNT_ATTR_*
v2: cleaned up error code handling and logging; add some example fuse
service; fuservicemount3 can now be a setuid program to allow
unprivileged userspace to fire up a contained filesystem driver.
This could be opening Pandora's box...
v1: detach from fuse-iomap series

With a bit of luck, this should all go splendidly.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>

----------------------------------------------------------------
Bernd Schubert (1):
Refactor mount code / move common functions to mount_util.c

Darrick J. Wong (12):
mount_service: add systemd/inetd socket service mounting helper
mount_service: create high level fuse helpers
mount_service: use the new mount api for the mount service
mount_service: update mtab after a successful mount
util: hoist the fuse.conf parsing and setuid mode enforcement code
util: fix checkpatch complaints in fuser_conf.[ch]
mount_service: enable unprivileged users in the same manner as fusermount
mount.fuse3: integrate systemd service startup
mount_service: allow installation as a setuid program
example/service_ll: create a sample systemd service fuse server
example/service: create a sample systemd service for a high-level fuse server
nullfs: support fuse systemd service mode

example/single_file.h                            |  184 +++
include/fuse.h                                   |   34 +
include/fuse_service.h                           |  243 +++
include/fuse_service_priv.h                      |  134 ++
lib/fuse_i.h                                     |    3 +
lib/mount_common_i.h                             |   22 +
lib/mount_util.h                                 |    8 +
lib/util.h                                       |   35 +
util/fuser_conf.h                                |   53 +
util/mount_service.h                             |   47 +
.github/workflows/install-ubuntu-dependencies.sh |   12 +-
README.md                                        |    3 +
doc/fuservicemount3.8                            |   32 +
doc/meson.build                                  |    3 +
example/meson.build                              |   26 +
example/null.c                                   |   51 +-
example/null.socket.in                           |   15 +
example/null@.service                            |  102 ++
example/service_hl.c                             |  237 +++
example/service_hl.socket.in                     |   15 +
example/service_hl@.service                      |  102 ++
example/service_ll.c                             |  309 ++++
example/service_ll.socket.in                     |   15 +
example/service_ll@.service                      |  102 ++
example/single_file.c                            |  856 ++++++++++
include/meson.build                              |    4 +
lib/fuse_service.c                               | 1114 +++++++++++++
lib/fuse_service_stub.c                          |  106 ++
lib/fuse_versionscript                           |   18 +
lib/helper.c                                     |  176 +-
lib/meson.build                                  |   17 +-
lib/mount.c                                      |   72 +-
lib/mount_util.c                                 |    9 +
meson.build                                      |   53 +-
meson_options.txt                                |    9 +
test/ci-build.sh                                 |    7 +
util/fuser_conf.c                                |  369 +++++
util/fusermount.c                                |  329 +---
util/fuservicemount.c                            |   66 +
util/install_helper.sh                           |    6 +
util/meson.build                                 |   24 +-
util/mount.fuse.c                                |  135 +-
util/mount_service.c                             | 1866 ++++++++++++++++++++++
43 files changed, 6650 insertions(+), 373 deletions(-)
create mode 100644 example/single_file.h
create mode 100644 include/fuse_service.h
create mode 100644 include/fuse_service_priv.h
create mode 100644 lib/mount_common_i.h
create mode 100644 util/fuser_conf.h
create mode 100644 util/mount_service.h
create mode 100644 doc/fuservicemount3.8
create mode 100644 example/null.socket.in
create mode 100644 example/null@.service
create mode 100644 example/service_hl.c
create mode 100644 example/service_hl.socket.in
create mode 100644 example/service_hl@.service
create mode 100644 example/service_ll.c
create mode 100644 example/service_ll.socket.in
create mode 100644 example/service_ll@.service
create mode 100644 example/single_file.c
create mode 100644 lib/fuse_service.c
create mode 100644 lib/fuse_service_stub.c
create mode 100644 util/fuser_conf.c
create mode 100644 util/fuservicemount.c
create mode 100644 util/mount_service.c


^ permalink raw reply	[flat|nested] 15+ messages in thread
* [GIT PULL] libfuse: run fuse servers as a contained service
@ 2026-03-04  0:11 Darrick J. Wong
  2026-03-04 13:36 ` Bernd Schubert
  0 siblings, 1 reply; 15+ messages in thread
From: Darrick J. Wong @ 2026-03-04  0:11 UTC (permalink / raw)
  To: bschubert, djwong; +Cc: bernd, joannelkoong, linux-fsdevel, miklos, neal

Hi Bernd,

Please pull this branch with changes for libfuse.

As usual, I did a test-merge with the main upstream branch as of a few
minutes ago, and didn't see any conflicts.  Please let me know if you
encounter any problems.

--D

The following changes since commit 73db1b26a4c759ecf6cfce495d8be85d5e5085f4:

fix: add assert to prevent NULL pointer dereference in try_get_path (2026-03-03 15:39:48 +0100)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/djwong/libfuse.git tags/fuse-service-container-3.19_2026-03-03

for you to fetch changes up to d686733ac24a50e957cfd1117cc3315cce510bf3:

example/service_ll: create a sample systemd service fuse server (2026-03-03 15:41:58 -0800)

----------------------------------------------------------------
libfuse: run fuse servers as a contained service [v8]

This patchset defines the necessary communication protocols and library
code so that users can mount fuse servers that run in unprivileged
systemd service containers.  That in turn allows unprivileged untrusted
mounts, because the worst that can happen is that a malicious image
crashes the fuse server and the mount dies, instead of corrupting the
kernel.

Bernd indicated that he might be interested in looking at the fuse
system service containment patches sooner than later, so I've separated
them from the iomap stuff and here we are.  With this patchset, we can
at least shift fuse servers to contained systemd services, albeit
without any of the performance improvements of iomap.

With a bit of luck, this should all go splendidly.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>

----------------------------------------------------------------
Darrick J. Wong (3):
libfuse: add systemd/inetd socket service mounting helper
libfuse: integrate fuse services into mount.fuse3
example/service_ll: create a sample systemd service fuse server

include/fuse_service.h       |  180 +++++++
include/fuse_service_priv.h  |  118 +++++
lib/fuse_i.h                 |    5 +
util/mount_service.h         |   41 ++
doc/fuservicemount3.8        |   32 ++
doc/meson.build              |    3 +
example/meson.build          |    7 +
example/service_ll.c         |  823 ++++++++++++++++++++++++++++++++
example/service_ll.socket.in |   16 +
example/service_ll@.service  |   99 ++++
include/meson.build          |    4 +
lib/fuse_service.c           |  859 ++++++++++++++++++++++++++++++++++
lib/fuse_service_stub.c      |   91 ++++
lib/fuse_versionscript       |   15 +
lib/helper.c                 |   53 +++
lib/meson.build              |   14 +-
lib/mount.c                  |   57 ++-
meson.build                  |   37 ++
meson_options.txt            |    6 +
util/fuservicemount.c        |   66 +++
util/meson.build             |   13 +-
util/mount.fuse.c            |   58 ++-
util/mount_service.c         | 1056 ++++++++++++++++++++++++++++++++++++++++++
23 files changed, 3617 insertions(+), 36 deletions(-)
create mode 100644 include/fuse_service.h
create mode 100644 include/fuse_service_priv.h
create mode 100644 util/mount_service.h
create mode 100644 doc/fuservicemount3.8
create mode 100644 example/service_ll.c
create mode 100644 example/service_ll.socket.in
create mode 100644 example/service_ll@.service
create mode 100644 lib/fuse_service.c
create mode 100644 lib/fuse_service_stub.c
create mode 100644 util/fuservicemount.c
create mode 100644 util/mount_service.c


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

end of thread, other threads:[~2026-04-10 22:12 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-09 22:24 [GIT PULL] libfuse: run fuse servers as a contained service Darrick J. Wong
2026-04-10 12:24 ` Bernd Schubert
2026-04-10 15:56   ` Darrick J. Wong
2026-04-10 18:30     ` Bernd Schubert
2026-04-10 22:12       ` Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2026-03-04  0:11 Darrick J. Wong
2026-03-04 13:36 ` Bernd Schubert
2026-03-04 17:06   ` Darrick J. Wong
2026-03-04 18:06     ` Darrick J. Wong
2026-03-04 19:29       ` Bernd Schubert
2026-03-04 21:08         ` Darrick J. Wong
2026-03-04 23:23   ` Darrick J. Wong
2026-03-09  2:27     ` Darrick J. Wong
2026-03-09 17:34       ` Bernd Schubert
2026-03-09 18:35         ` Darrick J. Wong

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