From: Bernd Schubert <bernd@bsbernd.com>
To: fuse-devel@lists.linux.dev
Cc: "Darrick J. Wong" <djwong@kernel.org>,
neal@gompa.dev, Bernd Schubert <bernd@bsbernd.com>
Subject: [PATCH v3 05/15] util: give fuservicemount3 an absolute build-tree runpath
Date: Wed, 30 Sep 2026 15:10:59 +0200 [thread overview]
Message-ID: <20260930-mount-service-bound-open-v3-5-e26c5e4eca4c@bsbernd.com> (raw)
In-Reply-To: <20260930-mount-service-bound-open-v3-0-e26c5e4eca4c@bsbernd.com>
The dynamic loader ignores $ORIGIN runpaths and LD_LIBRARY_PATH for a
setuid program. A build-tree fuservicemount3 made setuid, for example by
"run-tests.py --setuid-helpers", then failed with "libfuse3.so.4: cannot
open shared object file", or loaded the libfuse3.so.4 of the system.
meson removes build_rpath on install, so installed binaries do not change.
Assisted-by: LLM
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
---
util/meson.build | 2 ++
1 file changed, 2 insertions(+)
diff --git a/util/meson.build b/util/meson.build
index 28052a65536f..bc266776e153 100644
--- a/util/meson.build
+++ b/util/meson.build
@@ -22,6 +22,8 @@ if private_cfg.get('HAVE_SERVICEMOUNT', false)
link_with: [ libfuse ],
install: true,
install_dir: get_option('sbindir'),
+ # A setuid run ignores the $ORIGIN runpath meson sets
+ build_rpath: join_paths(meson.project_build_root(), 'lib'),
c_args: ['-DFUSE_USE_VERSION=319'] + mount_service_cflags)
endif
--
2.53.0
WARNING: multiple messages have this Message-ID (diff)
From: Bernd Schubert via B4 Relay <devnull+bernd.bsbernd.com@kernel.org>
To: fuse-devel@lists.linux.dev
Cc: "Darrick J. Wong" <djwong@kernel.org>,
neal@gompa.dev, Bernd Schubert <bernd@bsbernd.com>
Subject: [PATCH v3 05/15] util: give fuservicemount3 an absolute build-tree runpath
Date: Wed, 30 Sep 2026 15:10:59 +0200 [thread overview]
Message-ID: <20260930-mount-service-bound-open-v3-5-e26c5e4eca4c@bsbernd.com> (raw)
In-Reply-To: <20260930-mount-service-bound-open-v3-0-e26c5e4eca4c@bsbernd.com>
From: Bernd Schubert <bernd@bsbernd.com>
The dynamic loader ignores $ORIGIN runpaths and LD_LIBRARY_PATH for a
setuid program. A build-tree fuservicemount3 made setuid, for example by
"run-tests.py --setuid-helpers", then failed with "libfuse3.so.4: cannot
open shared object file", or loaded the libfuse3.so.4 of the system.
meson removes build_rpath on install, so installed binaries do not change.
Assisted-by: LLM
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
---
util/meson.build | 2 ++
1 file changed, 2 insertions(+)
diff --git a/util/meson.build b/util/meson.build
index 28052a65536f..bc266776e153 100644
--- a/util/meson.build
+++ b/util/meson.build
@@ -22,6 +22,8 @@ if private_cfg.get('HAVE_SERVICEMOUNT', false)
link_with: [ libfuse ],
install: true,
install_dir: get_option('sbindir'),
+ # A setuid run ignores the $ORIGIN runpath meson sets
+ build_rpath: join_paths(meson.project_build_root(), 'lib'),
c_args: ['-DFUSE_USE_VERSION=319'] + mount_service_cflags)
endif
--
2.53.0
next prev parent reply other threads:[~2026-09-30 13:10 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 13:10 [PATCH v3 00/15] libfuse: Add mount service safety checks and tests Bernd Schubert
2026-09-30 13:10 ` Bernd Schubert via B4 Relay
2026-09-30 13:10 ` [PATCH v3 01/15] mount_service: move the command line check into arg_in_cmdline() Bernd Schubert
2026-09-30 13:10 ` Bernd Schubert via B4 Relay
2026-09-30 13:10 ` [PATCH v3 02/15] mount_service: warn about paths not named on the command line Bernd Schubert
2026-09-30 13:10 ` Bernd Schubert via B4 Relay
2026-09-30 13:10 ` [PATCH v3 03/15] mount_service: refuse paths the user did not name Bernd Schubert
2026-09-30 13:10 ` Bernd Schubert via B4 Relay
2026-09-30 15:07 ` Darrick J. Wong
2026-09-30 13:10 ` [PATCH v3 04/15] mount_service: use openat to OPEN paths Bernd Schubert
2026-09-30 13:10 ` Bernd Schubert via B4 Relay
2026-09-30 13:10 ` Bernd Schubert [this message]
2026-09-30 13:10 ` [PATCH v3 05/15] util: give fuservicemount3 an absolute build-tree runpath Bernd Schubert via B4 Relay
2026-09-30 13:11 ` [PATCH v3 06/15] mount.fuse: free the options on the service mount return path Bernd Schubert
2026-09-30 13:11 ` Bernd Schubert via B4 Relay
2026-09-30 13:11 ` [PATCH v3 07/15] example/single_file: take no sector size from a regular backing file Bernd Schubert
2026-09-30 13:11 ` Bernd Schubert via B4 Relay
2026-09-30 13:11 ` [PATCH v3 08/15] test: check which files fuservicemount3 opens for the server Bernd Schubert
2026-09-30 13:11 ` Bernd Schubert via B4 Relay
2026-09-30 13:11 ` [PATCH v3 09/15] test: check what fuservicemount3 refuses Bernd Schubert
2026-09-30 13:11 ` Bernd Schubert via B4 Relay
2026-09-30 13:11 ` [PATCH v3 10/15] test: mount the service examples through fuservicemount3 Bernd Schubert
2026-09-30 13:11 ` Bernd Schubert via B4 Relay
2026-09-30 13:11 ` [PATCH v3 11/15] test: run mkfs.ext4 through the service examples Bernd Schubert
2026-09-30 13:11 ` Bernd Schubert via B4 Relay
2026-09-30 13:11 ` [PATCH v3 12/15] fuse_service: bound argc and arg len read from the args memfd Bernd Schubert
2026-09-30 13:11 ` Bernd Schubert via B4 Relay
2026-09-30 14:03 ` Bernd Schubert
2026-09-30 15:09 ` Darrick J. Wong
2026-09-30 13:11 ` [PATCH v3 13/15] build: move the default service socket directory to /run/fuse Bernd Schubert
2026-09-30 13:11 ` Bernd Schubert via B4 Relay
2026-09-30 15:09 ` Darrick J. Wong
2026-09-30 13:11 ` [PATCH v3 14/15] Improve documentation for fuse service mount Bernd Schubert
2026-09-30 13:11 ` Bernd Schubert via B4 Relay
2026-09-30 15:44 ` Darrick J. Wong
2026-09-30 13:11 ` [PATCH v3 15/15] move fuse_service_priv.h from include/ to lib/ Bernd Schubert
2026-09-30 13:11 ` Bernd Schubert via B4 Relay
2026-09-30 15:10 ` 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=20260930-mount-service-bound-open-v3-5-e26c5e4eca4c@bsbernd.com \
--to=bernd@bsbernd.com \
--cc=djwong@kernel.org \
--cc=fuse-devel@lists.linux.dev \
--cc=neal@gompa.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.