linux/fs/overlayfs
Christian Brauner 87c9e88ac4 ovl: pass original credentials, not mounter credentials during create
When creating new files the security layer expects the original
credentials to be passed.  When cleaning up the code this was accidently
changed to pass the mounter's credentials by relying on current->cred
which is already overriden at this point.  Pass the original credentials
directly.

Reported-by: Ondrej Mosnacek <omosnace@redhat.com>
Reported-by: Paul Moore <paul@paul-moore.com>
Fixes: e566bff963 ("ovl: port ovl_create_or_link() to new ovl_override_creator_creds")
Link: https://lore.kernel.org/CAFqZXNvL1ciLXMhHrnoyBmQu1PAApH41LkSWEhrcvzAAbFij8Q@mail.gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Tested-by: Ondrej Mosnacek <omosnace@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-12-05 16:16:20 -08:00
..
Kconfig fs: prepare for stackable filesystems backing file helpers 2023-12-23 16:35:08 +02:00
Makefile ovl: Move xattr support to new xattrs.c file 2023-10-31 00:12:59 +02:00
copy_up.c vfs-6.19-rc1.directory.locking 2025-12-01 16:13:46 -08:00
dir.c ovl: pass original credentials, not mounter credentials during create 2025-12-05 16:16:20 -08:00
export.c VFS: rename lookup_one_len family to lookup_noperm and remove permission check 2025-04-08 11:24:36 +02:00
file.c ovl: port ovl_copyfile() to cred guard 2025-11-19 21:58:24 +01:00
inode.c vfs-6.19-rc1.ovl 2025-12-01 16:31:21 -08:00
namei.c ovl: port ovl_lower_positive() to cred guard 2025-11-19 21:58:25 +01:00
overlayfs.h vfs-6.19-rc1.ovl 2025-12-01 16:31:21 -08:00
ovl_entry.h ovl: Prepare for mounting case-insensitive enabled layers 2025-09-23 12:29:35 +02:00
params.c ovl: Prepare for mounting case-insensitive enabled layers 2025-09-23 12:29:35 +02:00
params.h ovl: Prepare for mounting case-insensitive enabled layers 2025-09-23 12:29:35 +02:00
readdir.c ovl: port ovl_check_empty_dir() to cred guard 2025-11-19 21:58:23 +01:00
super.c fuse update for 6.19 2025-12-05 15:25:13 -08:00
util.c vfs-6.19-rc1.ovl 2025-12-01 16:31:21 -08:00
xattrs.c ovl: port ovl_listxattr() to cred guard 2025-11-19 21:58:24 +01:00