]> www.infradead.org Git - users/dwmw2/linux.git/commit
Merge patch series "ovl: add override_creds mount option"
authorChristian Brauner <brauner@kernel.org>
Wed, 19 Feb 2025 10:12:29 +0000 (11:12 +0100)
committerChristian Brauner <brauner@kernel.org>
Wed, 19 Feb 2025 13:32:12 +0000 (14:32 +0100)
commit9c27e5cc39bb7848051c42500207aa3a7f63558c
tree566876ff4c47e603c2592214c6c5ab50170541f4
parent2014c95afecee3e76ca4a56956a936e23283f05b
parenta1579f6bf657d3906de47819e8fd773e2452de0f
Merge patch series "ovl: add override_creds mount option"

Christian Brauner <brauner@kernel.org> says:

Currently overlayfs uses the mounter's credentials for it's
override_creds() calls. That provides a consistent permission model.

This patches allows a caller to instruct overlayfs to use its
credentials instead. The caller must be located in the same user
namespace hierarchy as the user namespace the overlayfs instance will be
mounted in. This provides a consistent and simple security model.

With this it is possible to e.g., mount an overlayfs instance where the
mounter must have CAP_SYS_ADMIN but the credentials used for
override_creds() have dropped CAP_SYS_ADMIN. It also allows the usage of
custom fs{g,u}id different from the callers and other tweaks.

* patches from https://lore.kernel.org/r/20250219-work-overlayfs-v3-0-46af55e4ceda@kernel.org:
  selftests/ovl: add third selftest for "override_creds"
  selftests/ovl: add second selftest for "override_creds"
  selftests/filesystems: add utils.{c,h}
  selftests/ovl: add first selftest for "override_creds"
  ovl: allow to specify override credentials

Link: https://lore.kernel.org/r/20250219-work-overlayfs-v3-0-46af55e4ceda@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>