diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2014-07-28 16:26:53 -0700 |
---|---|---|
committer | Andreas Blaesius <skate4life@gmx.de> | 2016-10-27 10:30:51 +0200 |
commit | a87c327668a67235a458f5c132661b44469585a8 (patch) | |
tree | 0566e2f5709b0c32b49013abf098443d15dc306d /fs/nfsd/nfs4idmap.c | |
parent | d99c71893b96b3387dd40baaaf6e84bd51934290 (diff) | |
download | kernel_samsung_espresso10-a87c327668a67235a458f5c132661b44469585a8.zip kernel_samsung_espresso10-a87c327668a67235a458f5c132661b44469585a8.tar.gz kernel_samsung_espresso10-a87c327668a67235a458f5c132661b44469585a8.tar.bz2 |
mnt: Only change user settable mount flags in remount
commit a6138db815df5ee542d848318e5dae681590fccd 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.
Correct this by replacing the mask of mount flags to preserve
with a mask of mount flags that may be changed, and preserve
all others. This ensures that any future bugs with this mask and
remount will fail in an easy to detect way where new mount flags
simply won't change.
Change-Id: I8ab8bda03a14b9b43e78f1dc6c818bbec048e986
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Francis Moreau <francis.moro@gmail.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
Diffstat (limited to 'fs/nfsd/nfs4idmap.c')
0 files changed, 0 insertions, 0 deletions