mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 10:33:27 +00:00
bbeed681a5
commit db181ce011e3c033328608299cd6fac06ea50130 upstream. Kenton Varda <kenton@sandstorm.io> discovered that by remounting a read-only bind mount read-only in a user namespace the MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user to the remount a read-only mount read-write. Upon review of the code in remount it was discovered that the code allowed nosuid, noexec, and nodev to be cleared. It was also discovered that the code was allowing the per mount atime flags to be changed. The first naive patch to fix these issues contained the flaw that using default atime settings when remounting a filesystem could be disallowed. To avoid this problems in the future add tests to ensure unprivileged remounts are succeeding and failing at the appropriate times. Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
breakpoints | ||
cpu-hotplug | ||
efivarfs | ||
ipc | ||
kcmp | ||
memory-hotplug | ||
mount | ||
mqueue | ||
net | ||
ptrace | ||
vm | ||
Makefile | ||
README.txt |
Linux Kernel Selftests The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel. Running the selftests ===================== To build the tests: $ make -C tools/testing/selftests To run the tests: $ make -C tools/testing/selftests run_tests - note that some tests will require root privileges. To run only tests targetted for a single subsystem: $ make -C tools/testing/selftests TARGETS=cpu-hotplug run_tests See the top-level tools/testing/selftests/Makefile for the list of all possible targets. Contributing new tests ====================== In general, the rules for for selftests are * Do as much as you can if you're not root; * Don't take too long; * Don't break the build on any architecture, and * Don't cause the top-level "make run_tests" to fail if your feature is unconfigured.