Bug 2035888
Summary: | Managedsave-edit should forbid modify some tpm configs such as pcrbank | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Yanqiu Zhang <yanqzhan> |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
libvirt sub component: | General | QA Contact: | Yanqiu Zhang <yanqzhan> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | unspecified | ||
Priority: | unspecified | CC: | dyuan, fjin, jdenemar, jsuchane, marcandre.lureau, mprivozn, qcheng, virt-maint, xuzhang, yanqzhan |
Version: | 9.0 | Keywords: | Triaged, Upstream |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-8.0.0-0rc1.1.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-05-17 12:45:52 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | 8.0.0 |
Embargoed: |
Description
Yanqiu Zhang
2021-12-28 10:59:48 UTC
I believe the same issue exists on migration, e.g. when an additional XML is provided during migration that changes <active_pcr_banks/>. The fix should be simple - we are lacking ABI stability check. Patch posted upstream: https://listman.redhat.com/archives/libvir-list/2022-January/msg00052.html Merged upstream as: commit 1ce27fa7761248ab9d8e142eb957432527280df0 Author: Michal Prívozník <mprivozn> AuthorDate: Tue Jan 4 09:26:08 2022 +0100 Commit: Michal Prívozník <mprivozn> CommitDate: Tue Jan 4 09:42:01 2022 +0100 conf: Extend TPM ABI stability check for <active_pcr_banks/> Changing <active_pcr_banks/> means changing the guest ABI and as such must be prevented on both restoring from a file or migration. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2035888 Signed-off-by: Michal Privoznik <mprivozn> Reviewed-by: Peter Krempa <pkrempa> v7.10.0-397-g1ce27fa776 Verify on: libvirt-8.0.0-1.el9.x86_64 qemu-kvm-6.2.0-3.el9.x86_64 Scenarios: 1.From no pcrbank to has. From: <tpm model='tpm-crb'> <backend type='emulator' version='2.0'> <encryption secret='e7442270-f813-4e48-a57b-5a5ff9d67ace'/> </backend> <alias name='tpm0'/> </tpm> To: <tpm model='tpm-crb'> <backend type='emulator' version='2.0'> <encryption secret='e7442270-f813-4e48-a57b-5a5ff9d67ace'/> <active_pcr_banks> <sha512/> </active_pcr_banks> </backend> </tpm> 2.Change pcrbank value From: <active_pcr_banks> <sha385/> </active_pcr_banks> To: <active_pcr_banks> <sha256/> </active_pcr_banks> 3.From has to none <tpm model='tpm-crb'> <backend type='emulator' version='2.0'> <encryption secret='e7442270-f813-4e48-a57b-5a5ff9d67ace'/> <active_pcr_banks> <sha384/> </active_pcr_banks> </backend> </tpm> To: <tpm model='tpm-crb'> <backend type='emulator' version='2.0'> <encryption secret='e7442270-f813-4e48-a57b-5a5ff9d67ace'/> </backend> </tpm> 4. Unsupported value Steps: 1.Managedsave/Save-edit # virsh managedsave-edit myuefi error: unsupported configuration: Target active PCR banks doesn't match source Failed. Try again? [y,n,f,?]: # virsh save-image-edit /var/lib/libvirt/qemu/save/myuefi.save error: unsupported configuration: Target active PCR banks doesn't match source Failed. Try again? [y,n,f,?]: # virsh managedsave-edit myuefi error: unsupported configuration: Unsupported PCR banks 'sha224' Failed. Try again? [y,n,f,?]: # virsh save-image-edit /var/lib/libvirt/qemu/save/myuefi.save error: unsupported configuration: Unsupported PCR banks 'sha224' Failed. Try again? [y,n,f,?]: 2. Managedsave/Save-define # virsh managedsave-dumpxml myuefi > myuefisave.xml # vim myuefisave.xml # virsh managedsave-define myuefi myuefisave.xml error: Failed to update myuefi XML configuration error: unsupported configuration: Target active PCR banks doesn't match source # virsh save-image-define /var/lib/libvirt/qemu/save/myuefi.save myuefisave.xml error: Failed to update /var/lib/libvirt/qemu/save/myuefi.save error: unsupported configuration: Target active PCR banks doesn't match source # virsh managedsave-define myuefi save.xml error: Failed to update myuefi XML configuration error: unsupported configuration: Unsupported PCR banks 'sha224' # virsh save-image-define /var/lib/libvirt/qemu/save/myuefi.save save.xml error: Failed to update /var/lib/libvirt/qemu/save/myuefi.save error: unsupported configuration: Unsupported PCR banks 'sha224' 3. Migrate with --xml: # virsh migrate myuefi --live qemu+ssh://hostb/system --verbose --xml myuefimig.xml error: unsupported configuration: Target active PCR banks doesn't match source # virsh migrate myuefi --live qemu+ssh://hostb/system --verbose --xml mig.xml-invalidpcr error: unsupported configuration: Unsupported PCR banks 'sha224' Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (new packages: libvirt), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:2390 |