Skip to content

Fall back to defused fusermount3 when no setuid fusermount is found - #151

Open
probonopd wants to merge 1 commit into
mainfrom
find-defused-fusermount
Open

probonopd wants to merge 1 commit into
mainfrom
find-defused-fusermount

Conversation

@probonopd

Copy link
Copy Markdown
Member

Fixes #150

Distributions running with NoNewPrivs replace the setuid fusermount3 with defused, which works without the setuid bit. The runtime skipped it because it only accepted setuid root fusermount binaries, so AppImages could not be mounted on such systems.

As suggested in #150 (comment), the PATH is first searched for setuid root fusermount binaries exactly as before. Only if none is found, a second pass looks for a non-setuid executable fusermount whose --version output identifies it as defused (fusermount3 version: <ver> (defused)), and uses that one. Other non-setuid fusermount binaries are still rejected, and FUSERMOUNT_PROG continues to override the search.

Tested the search functions in isolation with mock binaries: a plain non-setuid fusermount3 is skipped while a defused one is picked, a setuid root binary is preferred over defused even when it comes later in PATH, and non-executable entries are ignored. Not tested against a real defused installation.

…sermount3

Distributions that run with NoNewPrivs replace the setuid fusermount3 with defused, which works without the setuid bit. AppImages failed to mount there because the runtime only accepted setuid root fusermount binaries. Now, if no setuid root fusermount is found on the PATH, the runtime falls back to a non-setuid fusermount that identifies itself as defused in its --version output, so AppImages work on such systems while setuid binaries are still preferred and arbitrary non-setuid binaries are still rejected.
@probonopd
probonopd force-pushed the find-defused-fusermount branch from d69f79d to cc17f97 Compare September 19, 2026 20:58
@github-actions

Copy link
Copy Markdown

Build for testing:
artifacts i686
artifacts armhf
artifacts aarch64
artifacts x86_64
Use at your own risk.

@Skyb0rg007

Skyb0rg007 commented Sep 19, 2026

Copy link
Copy Markdown

Distributions running with NoNewPrivs replace the setuid fusermount3 with defused,

Haha, I like @thkukuk's enthusiasm, but defused is a pre-alpha project; as far as I know no distribution is using it.

I wouldn't be surprised if another, different, non-setuid implementation of fusermount3 replaces defused, so I don't think that hard-coding the word (defused) makes sense. If you want to avoid selecting a non-setuid libfuse fusermount3, perhaps I can add a flag to defused's fusermount3 like --works-without-setuid: with libfuse, fusermount3 --works-without-setuid results in an unrecognized option error, while any setuid-less implementation could have that option return 0 (even future non-defused implementations).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fusermount3 get's skipped if not setuid, which breaks new fuse implementations

2 participants