Imagine situation where a security problem is found in setuid binary.
User upgrades his system to fix the problem, but if he has any ZFS snapshots for the file system which contains problematic binary, any user can mount the snapshot and execute vulnerable binary. Prevent this from happening by always mounting snapshots with setuid turned off. MFC after: 2 weeks
This commit is contained in:
parent
7c017a713e
commit
12b9f8e47d
@ -171,6 +171,11 @@ mount_snapshot(kthread_t *td, vnode_t **vpp, const char *fstype, char *fspath,
|
||||
* Snapshots are always read-only.
|
||||
*/
|
||||
mp->mnt_flag |= MNT_RDONLY;
|
||||
/*
|
||||
* We don't want snapshots to allow access to vulnerable setuid
|
||||
* programs, so we turn off setuid when mounting snapshots.
|
||||
*/
|
||||
mp->mnt_flag |= MNT_NOSUID;
|
||||
/*
|
||||
* We don't want snapshots to be visible in regular
|
||||
* mount(8) and df(1) output.
|
||||
|
Loading…
Reference in New Issue
Block a user