mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Don't allow to umount the namespace root mount
Linux does the same thing. Reported-by: syzbot+6c79385c930c929d1d9e@syzkaller.appspotmail.com PiperOrigin-RevId: 356854562
This commit is contained in:
@@ -309,6 +309,11 @@ func (vfs *VirtualFilesystem) UmountAt(ctx context.Context, creds *auth.Credenti
|
||||
vfs.mountMu.Unlock()
|
||||
return syserror.EINVAL
|
||||
}
|
||||
|
||||
if vd.mount == vd.mount.ns.root {
|
||||
vfs.mountMu.Unlock()
|
||||
return syserror.EINVAL
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(gvisor.dev/issue/1035): Linux special-cases umount of the caller's
|
||||
|
||||
Reference in New Issue
Block a user