Skip to content

[Backport] xapi_vm: Implement RBAC checking for keys in VM.other_config and VM.platform#7046

Merged
robhoes merged 3 commits intoxapi-project:26.1-lcmfrom
robhoes:26.1-lcm
Apr 29, 2026
Merged

[Backport] xapi_vm: Implement RBAC checking for keys in VM.other_config and VM.platform#7046
robhoes merged 3 commits intoxapi-project:26.1-lcmfrom
robhoes:26.1-lcm

Conversation

@robhoes
Copy link
Copy Markdown
Member

@robhoes robhoes commented Apr 29, 2026

Backport of #7039.

map_keys_roles parameter was RBAC checked for
{add_to,remove_from}_other_config, but set_other_config allowed
circumventing this check.

Since VM is the only object that has a key ("pci") in other_config
with the privilege level required for modification higher than that of the
other_config field generally, this meant that vm-admin could not modify the
"pci" key in other_config through add_to_other_config, but could circumvent the
check with set_other_config.

Implement a checker for VM.other_config setters based on Task's manual RBAC
checker (introduced in a3f2c6e)

This is part of XSA-489 / CVE-2026-23562

Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
(cherry picked from commit 2469636)
platform:hvm_serial and other_config:hvm_serial are both keys that allow host
filesystem write. Limit these to be modifiable only by pool-admin.

Implement set_platform with Helpers.set_map_with_rbac, like for
set_other_config.

This is part of XSA-489 / CVE-2026-42486

Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
(cherry picked from commit e3cf679)
The only difference in the schematest comes from changing the type of the
other_config and platform fields from RW to StaticRO, which is necessary to
provide custom implementations of setters.

With a modified schematest, the diff is:

    <     "qualifier": "RW",
    ---
    >     "qualifier": "StaticRO",

Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
(similar to commit 47d8a6f)
@robhoes robhoes changed the title 26.1 lcm [Backport] xapi_vm: Implement RBAC checking for keys in VM.other_config and VM.platform Apr 29, 2026
@robhoes robhoes requested review from last-genius and psafont April 29, 2026 09:54
@robhoes robhoes marked this pull request as ready for review April 29, 2026 09:54
@contificate
Copy link
Copy Markdown
Contributor

Thanks for doing this.

@robhoes robhoes added this pull request to the merge queue Apr 29, 2026
Merged via the queue into xapi-project:26.1-lcm with commit 53cf465 Apr 29, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants