diff options
| author | Tatsuyuki Ishi <[email protected]> | 2025-06-12 10:18:25 +0000 |
|---|---|---|
| committer | Gao Xiang <[email protected]> | 2025-06-18 05:40:48 +0000 |
| commit | 905eeb2b7c33adda23a966aeb811ab4cb9e62031 (patch) | |
| tree | fd8bc4ad96d71f3e9f9c06a766b7c84f09255fa4 /lib/crypto/mpi/mpi-cmp.c | |
| parent | Linux 6.16-rc1 (diff) | |
| download | kernel-905eeb2b7c33adda23a966aeb811ab4cb9e62031.tar.gz kernel-905eeb2b7c33adda23a966aeb811ab4cb9e62031.zip | |
erofs: impersonate the opener's credentials when accessing backing file
Previously, file operations on a file-backed mount used the current
process' credentials to access the backing FD. Attempting to do so on
Android lead to SELinux denials, as ACL rules on the backing file (e.g.
/system/apex/foo.apex) is restricted to a small set of process.
Arguably, this error is redundant and leaking implementation details, as
access to files on a mount is already ACL'ed by path.
Instead, override to use the opener's cred when accessing the backing
file. This makes the behavior similar to a loop-backed mount, which
uses kworker cred when accessing the backing file and does not cause
SELinux denials.
Signed-off-by: Tatsuyuki Ishi <[email protected]>
Reviewed-by: Gao Xiang <[email protected]>
Reviewed-by: Hongbo Li <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Gao Xiang <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions
