Fixing unprivileged mount -o remount,ro
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 5 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 5 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [REVIEW][0/5] Fixing unprivileged mount -o remount,ro
This patchset addresses a nasty bug where
"unshare --user --mount mount --bind -o remount,ro /path" would allow a following "mount --bind -o remount,rw" to succeed even when /path started out read-only in the initial mount namespace.
The fixes are quite simple and since they are user namespace specific I plan on carrying them in my user namespace tree and ultimately pushing them to Linus.
If anyone has any concerns about the code before I do that please speak up so the issues can be addressed.
Eric W. Biederman (5):
mnt: Only change user settable mount flags in remount
mnt: Move the test for MNT_LOCK_READONLY from change_mount_flags into do_remount
mnt: Correct permission checks in do_remount
mnt: Change the default remount atime from relatime to the existing value
mnt: Add tests for unprivileged remount cases that have found to be faulty
fs/namespace.c | 59 ++++- include/linux/mount.h | 9 +- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/mount/Makefile | 17 ++ .../selftests/mount/unprivileged-remount-test.c | 242 +++++++++++++++++++++ 5 files changed, 320 insertions(+), 8 deletions(-)
Eric