sysctl/Flask: add preliminary check for XEN_SYSCTL_getdomaininfolist

To shield the sysctl lock from abuse by unauthorized domains, follow what
5154fdda11 ("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@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
(cherry picked from commit 3179bf2931)
This commit is contained in:
Jan Beulich authored and Andrew Cooper committed 2026-07-28 13:10:03 +01:00
1 parent 6e39582767
commit ae8dbf96a3
2 files changed
+4 -1

No files matched your search

+1
View File
@@ -90,6 +90,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 getaffinity
getaddrsize pause unpause trigger shutdown destroy
setaffinity setdomainmaxmem getscheduler resume
+3 -1
View File
@@ -898,7 +898,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:
@@ -945,6 +944,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);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.