Repository navigation
Commit 8a3e214
selinux: fix regression introduced by move_mount(2) syscall
commit 98aa003 upstream.
commit 2db154b ("vfs: syscall: Add move_mount(2) to move mounts around")
introduced a new move_mount(2) system call and a corresponding new LSM
security_move_mount hook but did not implement this hook for any existing
LSM. This creates a regression for SELinux with respect to consistent
checking of mounts; the existing selinux_mount hook checks mounton
permission to the mount point path. Provide a SELinux hook
implementation for move_mount that applies this same check for
consistency. In the future we may wish to add a new move_mount
filesystem permission and check as well, but this addresses
the immediate regression.
Fixes: 2db154b ("vfs: syscall: Add move_mount(2) to move mounts around")
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Reviewed-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent f08a5e6 commit 8a3e214
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2762 | 2762 | | |
2763 | 2763 | | |
2764 | 2764 | | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
2765 | 2773 | | |
2766 | 2774 | | |
2767 | 2775 | | |
| |||
6904 | 6912 | | |
6905 | 6913 | | |
6906 | 6914 | | |
| 6915 | + | |
| 6916 | + | |
6907 | 6917 | | |
6908 | 6918 | | |
6909 | 6919 | | |
| |||
0 commit comments