mount_service: add systemd socket service mounting helper

Create a mount helper program that can start a fuse server that runs as
a socket-based systemd service, and a new libfuse module to wrap all the
details of communicating between the mount helper and the containerized
fuse server.

This enables untrusted ext4 mounts via systemd service containers, which
avoids the problem of malicious filesystems compromising the integrity
of the running kernel through memory corruption.

In theory this could also be supported via inetd and clones, though the
author hasn't found one that supports AF_UNIX sockets.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
This commit is contained in:
Darrick J. Wong
2026-04-20 09:49:40 -07:00
committed by Bernd Schubert
parent 0d7e725415
commit 5d8b9a39a1
19 changed files with 3393 additions and 3 deletions
+9
View File
@@ -27,3 +27,12 @@ option('enable-usdt', type : 'boolean', value : false,
option('enable-io-uring', type: 'boolean', value: true,
description: 'Enable fuse-over-io-uring support')
option('service-socket-dir', type : 'string', value : '',
description: 'Where to install fuse server sockets (if empty, /run/filesystems)')
option('service-socket-perms', type : 'string', value : '',
description: 'Default fuse server socket permissions (if empty, 0220)')
option('systemd-system-unit-dir', type : 'string', value : '',
description: 'Where to install systemd unit files (if empty, query pkg-config(1))')