[Devel] [PATCH hci-8.2 v3 1/2] ve: trust every host task of a pseudosuper VE until it execs
Mirian Shilakadze
mirian.shilakadze at virtuozzo.com
Fri Nov 20 18:49:12 MSK 2026
On 11/20/26 7:04 PM, Pavel Tikhomirov wrote:
> So if argument is VE0 we say yes we have privileges, no matter who we
> are, even for VEX task.
That is older than this patch: ve0 has is_pseudosuper set, so the
ve->is_pseudosuper checks always passed for ve0 whoever the caller was.
The VSTOR-151265 series only kept that when it moved the checks to the
caller's mark, with the ve_is_super(ve) shortcut.
> If somehow get access to host root cgroup and it's ve is VE0 we have it
> allowing us operation.
>
> If we somehow see host process from CT this also allows operation on it
> (ptrace?).
I went through the callers, a container task gets nothing from it today:
- most of them pass get_exec_env() and test ve_is_super() on it first,
so ve0 never gets there
- ve.features, ve.failcount, ve.pid_max and ve.aio_max_nr are
CFTYPE_NOT_ON_ROOT, ve0 has no such files
- ptrace never reaches the VD_VE_SETUP_TASK case for a ve0 target,
ve_vps_dumpable() reports it as VD_PTRACE_COREDUMP
- the only place it is reachable is ve_try_reserve_mount() for a mount
in a ve0-owned mount namespace, and ve0 has no mount limit to skip
Still, it is easy to make it depend on the caller: when the argument is
ve0, return ve_is_super(get_exec_env()). That changes nothing now but
removes the trap for future callers. I can send it as a separate patch.
--
Best regards, Mirian Shilakadze
Linux C Virtualization Developer, Virtuozzo.
More information about the Devel
mailing list