From: Mirian Shilakadze <mirian.shilakadze@virtuozzo.com>
To: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>,
Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2 v3 1/2] ve: trust every host task of a pseudosuper VE until it execs
Date: Fri, 20 Nov 2026 19:49:12 +0400 [thread overview]
Message-ID: <c82f5d07-fc57-46b0-b716-a13b1f16e633@virtuozzo.com> (raw)
In-Reply-To: <179518704230.1830672.6160419212142476220.b4-review@b4>
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.
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-20 15:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 14:25 [Devel] [PATCH hci-8.2 v3 0/2] ve: Container start on the 26.3 kernel with libvzctl before 10.0.144 Konstantin Khorenko
2026-11-20 14:25 ` [Devel] [PATCH hci-8.2 v3 1/2] ve: trust every host task of a pseudosuper VE until it execs Konstantin Khorenko
2026-11-20 15:04 ` Pavel Tikhomirov
2026-11-20 15:49 ` Mirian Shilakadze [this message]
2026-11-23 8:56 ` Pavel Tikhomirov
2026-11-20 14:25 ` [Devel] [PATCH hci-8.2 v3 2/2] selftests/ve: check a host task entering a pseudosuper VE reaches its init Konstantin Khorenko
2026-11-20 14:39 ` Pavel Tikhomirov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c82f5d07-fc57-46b0-b716-a13b1f16e633@virtuozzo.com \
--to=mirian.shilakadze@virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.com \
--cc=ptikhomirov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox