Files
kernel_oneplus_sm8250/include/uapi/linux
Miklos Szeredi 79b2e7bda7 UPSTREAM: fuse: add FUSE_WRITE_KILL_PRIV
In the FOPEN_DIRECT_IO case the write path doesn't call file_remove_privs()
and that means setuid bit is not cleared if unpriviliged user writes to a
file with setuid bit set.

pjdfstest chmod test 12.t tests this and fails.

Fix this by adding a flag to the FUSE_WRITE message that requests clearing
privileges on the given file.  This needs

This better than just calling fuse_remove_privs(), because the attributes
may not be up to date, so in that case a write may miss clearing the
privileges.

Test case:

  $ passthrough_ll /mnt/pasthrough-mnt -o default_permissions,allow_other,cache=never
  $ mkdir /mnt/pasthrough-mnt/testdir
  $ cd /mnt/pasthrough-mnt/testdir
  $ prove -rv pjdfstests/tests/chmod/12.t

Reported-by: Vivek Goyal <vgoyal@redhat.com>
Change-Id: Ibbdc754c6c5c96f33dc87a8a906c6c58b68b414b
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Tested-by: Vivek Goyal <vgoyal@redhat.com>
2025-12-03 06:31:58 -05:00
..
2020-06-07 13:17:54 +02:00
2020-04-24 15:19:09 -07:00
2020-06-17 06:00:22 +05:30
2021-06-28 10:09:35 +05:30
2020-07-07 12:09:16 +05:30
2019-04-05 12:50:03 -07:00
2020-03-26 10:50:04 +05:30
2019-03-01 12:40:58 +05:30
2020-01-09 15:11:34 -08:00
2023-09-23 10:48:08 +02:00
2019-02-22 13:00:38 +02:00