From: Han-Wen Nienhuys <hanwenn@gmail.com>
To: amir73il@gmail.com, miklos@szeredi.hu
Cc: fuse-devel@lists.linux.dev, linux-fsdevel@lists.linux.dev,
mmitar@gmail.com, bernd@bsbernd.com,
Han-Wen Nienhuys <hanwenn@gmail.com>
Subject: [PATCH 0/3] Subject: [PATCH 0/3] fuse: kill suid/sgid on fallocate, copy_file_range and passthrough writes with KILLPRIV_V2
Date: Sun, 22 Nov 2026 14:29:13 +0100 [thread overview]
Message-ID: <20261122132916.19066-1-hanwenn@gmail.com> (raw)
With FUSE_HANDLE_KILLPRIV_V2, an unprivileged fallocate(),
copy_file_range() or passthrough write leaves the suid/sgid bits set,
because the kernel never asks the server to clear them. Mitar reported
this in [1], and Bernd posted a fix in [2].
Patch 1 is Bernd's fix, rebased on the most recent pull of FUSE
fixes[3] in Linus' tree, otherwise unchanged.
Patch 2 bumps the FUSE protocol minor version to 48, so a server can
tell whether the kernel has the fix before it asks for
FUSE_HANDLE_KILLPRIV_V2.
Patch 3 adds a selftest. It runs a raw /dev/fuse server and checks
which kill requests reach it.
I messed up my email sending just now, leaving out the self-test patch, so trying it again.
[1] https://lore.kernel.org/fuse-devel/CAKLmikMhOYpGEw6uCqX_Bm0JPEg-4FhdJMNa9+tgtw3-Kf+eZg@mail.gmail.com/
[2] https://lore.kernel.org/fuse-devel/e75cf549-07a6-4095-bbf8-8caff7a3338b@bsbernd.com/
[3] https://lore.kernel.org/fuse-devel/179520930874.792202.7768867709024262369.pr-tracker-bot@kernel.org/
Bernd Schubert (1):
fuse: kill suid/sgid on fallocate and copy_file_range with KILLPRIV_V2
Han-Wen Nienhuys (2):
fuse: bump protocol minor version to 48
selftests/fuse: test FATTR_KILL_SUIDGID from file_remove_privs()
fs/fuse/dir.c | 13 +-
fs/fuse/file.c | 3 +-
fs/fuse/fuse_i.h | 2 +-
include/uapi/linux/fuse.h | 6 +-
.../selftests/filesystems/fuse/.gitignore | 1 +
.../selftests/filesystems/fuse/Makefile | 2 +
.../filesystems/fuse/killpriv_v2_test.c | 359 ++++++++++++++++++
7 files changed, 381 insertions(+), 5 deletions(-)
create mode 100644 tools/testing/selftests/filesystems/fuse/killpriv_v2_test.c
--
2.56.1
next reply other threads:[~2026-11-22 13:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 13:29 Han-Wen Nienhuys [this message]
2026-11-22 13:29 ` [PATCH 1/3] fuse: kill suid/sgid on fallocate and copy_file_range with KILLPRIV_V2 Han-Wen Nienhuys
2026-11-22 13:29 ` [PATCH 2/3] fuse: bump protocol minor version to 48 Han-Wen Nienhuys
2026-11-22 13:29 ` [PATCH 3/3] selftests/fuse: test FATTR_KILL_SUIDGID from file_remove_privs() Han-Wen Nienhuys
2026-11-23 8:13 ` [PATCH 0/3] Subject: [PATCH 0/3] fuse: kill suid/sgid on fallocate, copy_file_range and passthrough writes with KILLPRIV_V2 Mitar
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=20261122132916.19066-1-hanwenn@gmail.com \
--to=hanwenn@gmail.com \
--cc=amir73il@gmail.com \
--cc=bernd@bsbernd.com \
--cc=fuse-devel@lists.linux.dev \
--cc=linux-fsdevel@lists.linux.dev \
--cc=miklos@szeredi.hu \
--cc=mmitar@gmail.com \
/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.