|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen stable-4.22] sysctl/Flask: add preliminary check for XEN_SYSCTL_getdomaininfolist
commit 69a59f4389019edb62e926c928362249e4c54166
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Jul 20 16:37:30 2026 +0100
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Jul 28 13:06:53 2026 +0100
sysctl/Flask: add preliminary check for XEN_SYSCTL_getdomaininfolist
To shield the sysctl lock from abuse by unauthorized domains, follow what
5154fdda1124 ("domctl: protect locking for get_domain_state") did: Check
for permission to issue the operation against DOM_XEN in flask_sysctl().
The finer-grained xsm_getdomaininfo() later in the handling of the sub-op
remains unaltered.
In the in-tree policy respective permission therefore needs granting.
This is part of CVE-2026-62426 / XSA-499.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Acked-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
(cherry picked from commit 3179bf29311f9ed54b931bc95782b061afec5897)
---
tools/flask/policy/modules/xen.if | 1 +
xen/xsm/flask/hooks.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/flask/policy/modules/xen.if
b/tools/flask/policy/modules/xen.if
index ef7d8f438c..5e366986e2 100644
--- a/tools/flask/policy/modules/xen.if
+++ b/tools/flask/policy/modules/xen.if
@@ -150,6 +150,7 @@ define(`create_domain_build_label', `
# manage_domain(priv, target)
# Allow managing a running domain
define(`manage_domain', `
+ allow $1 domxen_t:domain getdomaininfo;
allow $1 $2:domain {
getdomaininfo
getvcpuinfo
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 57b2e1b287..4e5b75dfaf 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -878,7 +878,6 @@ static int cf_check flask_sysctl(const struct xen_sysctl
*op)
{
/* These have individual XSM hooks */
case XEN_SYSCTL_readconsole:
- case XEN_SYSCTL_getdomaininfolist:
case XEN_SYSCTL_page_offline_op:
#ifdef CONFIG_X86
case XEN_SYSCTL_cpu_hotplug:
@@ -925,6 +924,9 @@ static int cf_check flask_sysctl(const struct xen_sysctl
*op)
case XEN_SYSCTL_get_cpu_policy:
return domain_has_xen(current->domain, XEN__PHYSINFO);
+ case XEN_SYSCTL_getdomaininfolist:
+ return flask_getdomaininfo(dom_xen);
+
case XEN_SYSCTL_psr_cmt_op:
return avc_current_has_perm(SECINITSID_XEN, SECCLASS_XEN2,
XEN2__PSR_CMT_OP, NULL);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |