df91e49477
Userspace can pass in arbitrary combinations of MS_* flags to mount().
If both MS_BIND and one of MS_SHARED/MS_PRIVATE/MS_SLAVE/MS_UNBINDABLE are
passed, device name which should be checked for MS_BIND was not checked because
MS_SHARED/MS_PRIVATE/MS_SLAVE/MS_UNBINDABLE had higher priority than MS_BIND.
If both one of MS_BIND/MS_MOVE and MS_REMOUNT are passed, device name which
should not be checked for MS_REMOUNT was checked because MS_BIND/MS_MOVE had
higher priority than MS_REMOUNT.
Fix these bugs by changing priority to MS_REMOUNT -> MS_BIND ->
MS_SHARED/MS_PRIVATE/MS_SLAVE/MS_UNBINDABLE -> MS_MOVE as with do_mount() does.
Also, unconditionally return -EINVAL if more than one of
MS_SHARED/MS_PRIVATE/MS_SLAVE/MS_UNBINDABLE is passed so that TOMOYO will not
generate inaccurate audit logs, for commit
|
||
---|---|---|
.. | ||
.gitignore | ||
audit.c | ||
common.c | ||
common.h | ||
condition.c | ||
domain.c | ||
environ.c | ||
file.c | ||
gc.c | ||
group.c | ||
Kconfig | ||
load_policy.c | ||
Makefile | ||
memory.c | ||
mount.c | ||
network.c | ||
realpath.c | ||
securityfs_if.c | ||
tomoyo.c | ||
util.c |