Linux EXT4 FS development
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: linux-ext4 <linux-ext4@vger.kernel.org>
Cc: Theodore Ts'o <tytso@mit.edu>, Neal Gompa <neal@gompa.dev>
Subject: [PATCHBOMB v6] e2fsprogs: containerize ext4 for safer operation
Date: Thu, 25 Jun 2026 12:33:02 -0700	[thread overview]
Message-ID: <20260625193302.GC6054@frogsfrogsfrogs> (raw)

Hi everyone,

This is the sole remaining part of the gigantic patchset to enable
mounting ext4 filesystems as a systemd-contained fuse server instead of
in the kernel.  The libfuse parts have now been merged upstream, which
means that fuse4fs can now run as a non-root user, with no privilege,
and no access to the network or hardware, etc.  The only connection to
the outside is an ephemeral AF_UNIX socket.  The mount helper program
the other end is a helper program that acquires resources and calls
fsmount().

Why would you want to do that?  Most filesystem drivers are seriously
vulnerable to metadata parsing attacks, as syzbot has shown repeatedly
over almost a decade of its existence.  Faulty code can lead to total
kernel compromise, and I think there's a very strong incentive to move
all that parsing out to userspace where we can containerize the fuse
server process.  Runtime filesystem metadata parsing is no longer a
privileged (== risky) operation.

The consequences of a crashed driver is a dead mount, instead of a
crashed or corrupt OS kernel.

Note that contained fuse filesystem servers are no faster than regular
fuse.  The containerization code only requires changes to libfuse and is
ready to go today.

e2fsprogs:
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/e2fsprogs.git/log/?h=fuse4fs-service-container_2026-06-25

Note that I threw in a couple more patchsets to improve the caching
behavior of libext2fs for better performance; and the ability to watch
for memory pressure complaints from the kernel so that we can drop our
own cache in response to memory pressure.

e2fsprogs:
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/e2fsprogs.git/log/?h=fuse4fs-memory-reclaim_2026-06-25

--Darrick

Unreviewed patches in this patchbomb:

[PATCHSET 1/4] libext2fs: fix some missed fsync calls
  [PATCH 1/3] libext2fs: always fsync the device when flushing the
  [PATCH 2/3] libext2fs: always fsync the device when closing the unix
  [PATCH 3/3] libext2fs: only fsync the unix fd if we wrote to the
[PATCHSET v6 2/4] fuse4fs: run servers as a contained service
  [PATCH 01/10] libext2fs: make it possible to extract the fd from an
  [PATCH 02/10] libext2fs: fix checking for valid fds in mmp.c
  [PATCH 03/10] unix_io: allow passing /dev/fd/XXX paths to the unixfd
  [PATCH 04/10] libext2fs: fix MMP code to work with unixfd IO manager
  [PATCH 05/10] libext2fs: bump libfuse API version to 3.19
  [PATCH 06/10] fuse4fs: hoist some code out of fuse4fs_main
  [PATCH 07/10] fuse4fs: enable safe service mode
  [PATCH 08/10] fuse4fs: set proc title when in fuse service mode
  [PATCH 09/10] fuse4fs: make MMP work correctly in safe service mode
  [PATCH 10/10] debian: update packaging for fuse4fs service
[PATCHSET v6 3/4] fuse2fs: improve block and inode caching
  [PATCH 1/6] libsupport: add caching IO manager
  [PATCH 2/6] iocache: add the actual buffer cache
  [PATCH 3/6] iocache: bump buffer mru priority every 50 accesses
  [PATCH 4/6] fuse2fs: enable caching IO manager
  [PATCH 5/6] fuse2fs: increase inode cache size
  [PATCH 6/6] libext2fs: improve caching for inodes
[PATCHSET v6 4/4] fuse4fs: reclaim buffer cache under memory pressure
  [PATCH 1/4] libsupport: add pressure stall monitor
  [PATCH 2/4] fuse2fs: only reclaim buffer cache when there is memory
  [PATCH 3/4] fuse4fs: enable memory pressure monitoring with service
  [PATCH 4/4] fuse2fs: flush dirty metadata periodically

             reply	other threads:[~2026-06-25 19:33 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-25 19:33 Darrick J. Wong [this message]
2026-06-25 19:35 ` [PATCHSET 1/4] libext2fs: fix some missed fsync calls Darrick J. Wong
2026-06-25 19:36   ` [PATCH 1/3] libext2fs: always fsync the device when flushing the cache Darrick J. Wong
2026-06-25 19:36   ` [PATCH 2/3] libext2fs: always fsync the device when closing the unix IO manager Darrick J. Wong
2026-06-25 19:36   ` [PATCH 3/3] libext2fs: only fsync the unix fd if we wrote to the device Darrick J. Wong
2026-06-25 19:35 ` [PATCHSET v6 2/4] fuse4fs: run servers as a contained service Darrick J. Wong
2026-06-25 19:37   ` [PATCH 01/10] libext2fs: make it possible to extract the fd from an IO manager Darrick J. Wong
2026-06-25 19:37   ` [PATCH 02/10] libext2fs: fix checking for valid fds in mmp.c Darrick J. Wong
2026-06-25 19:37   ` [PATCH 03/10] unix_io: allow passing /dev/fd/XXX paths to the unixfd IO manager Darrick J. Wong
2026-06-25 19:37   ` [PATCH 04/10] libext2fs: fix MMP code to work with " Darrick J. Wong
2026-06-25 19:38   ` [PATCH 05/10] libext2fs: bump libfuse API version to 3.19 Darrick J. Wong
2026-06-25 19:38   ` [PATCH 06/10] fuse4fs: hoist some code out of fuse4fs_main Darrick J. Wong
2026-06-25 19:38   ` [PATCH 07/10] fuse4fs: enable safe service mode Darrick J. Wong
2026-06-25 19:38   ` [PATCH 08/10] fuse4fs: set proc title when in fuse " Darrick J. Wong
2026-06-25 19:39   ` [PATCH 09/10] fuse4fs: make MMP work correctly in safe " Darrick J. Wong
2026-06-25 19:39   ` [PATCH 10/10] debian: update packaging for fuse4fs service Darrick J. Wong
2026-06-25 19:35 ` [PATCHSET v6 3/4] fuse2fs: improve block and inode caching Darrick J. Wong
2026-06-25 19:39   ` [PATCH 1/6] libsupport: add caching IO manager Darrick J. Wong
2026-06-25 19:39   ` [PATCH 2/6] iocache: add the actual buffer cache Darrick J. Wong
2026-06-25 19:40   ` [PATCH 3/6] iocache: bump buffer mru priority every 50 accesses Darrick J. Wong
2026-06-25 19:40   ` [PATCH 4/6] fuse2fs: enable caching IO manager Darrick J. Wong
2026-06-25 19:40   ` [PATCH 5/6] fuse2fs: increase inode cache size Darrick J. Wong
2026-06-25 19:40   ` [PATCH 6/6] libext2fs: improve caching for inodes Darrick J. Wong
2026-06-25 19:35 ` [PATCHSET v6 4/4] fuse4fs: reclaim buffer cache under memory pressure Darrick J. Wong
2026-06-25 19:41   ` [PATCH 1/4] libsupport: add pressure stall monitor Darrick J. Wong
2026-06-25 19:41   ` [PATCH 2/4] fuse2fs: only reclaim buffer cache when there is memory pressure Darrick J. Wong
2026-06-25 19:41   ` [PATCH 3/4] fuse4fs: enable memory pressure monitoring with service containers Darrick J. Wong
2026-06-25 19:41   ` [PATCH 4/4] fuse2fs: flush dirty metadata periodically Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260625193302.GC6054@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=neal@gompa.dev \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox