Skip to content

Subject: [PATCH 0/3] fuse: kill suid/sgid on fallocate, copy_file_range and passthrough writes with KILLPRIV_V2

Han-Wen Nienhuys fuse-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3fuse: kill suid/sgid on fallocate and copy_file_range with KILLPRIV_V2fs/fuse/dir.c fs/fuse/file.c fs/fuse/fuse_i.h+14 -40 replies
2/3fuse: bump protocol minor version to 48include/uapi/linux/fuse.h+5 -10 replies
3/3selftests/fuse: test FATTR_KILL_SUIDGID from file_remove_privs()tools/testing/selftests/filesystems/fuse/.gitignore tools/testing/selftests/filesystems/fuse/Makefile tools/testing/selftests/filesystems/fuse/killpriv_v2_test.c+362 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Subject: [PATCH 0/3] fuse: kill suid/sgid on fallocate, copy_file_range and passthrough writes with KILLPRIV_V2

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/[email protected]/
[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
Signature · 1 line
2.56.1