[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/36] tpm: Make sure the locality received from bac
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 11/36] tpm: Make sure the locality received from backend is valid |
Date: |
Tue, 23 Jul 2019 12:00:39 -0500 |
From: Stefan Berger <address@hidden>
Make sure that the locality passed from the backend to
tpm_tis_request_completed() is valid.
Signed-off-by: Stefan Berger <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
(cherry picked from commit a639f96111eadb3b8e3021fd3f27e2948ad1c640)
Signed-off-by: Michael Roth <address@hidden>
---
hw/tpm/tpm_tis.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index 9a795ce96c..1554026788 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -295,6 +295,8 @@ static void tpm_tis_request_completed(TPMIf *ti, int ret)
uint8_t locty = s->cmd.locty;
uint8_t l;
+ assert(TPM_TIS_IS_VALID_LOCTY(locty));
+
if (s->cmd.selftest_done) {
for (l = 0; l < TPM_TIS_NUM_LOCALITIES; l++) {
s->loc[l].sts |= TPM_TIS_STS_SELFTEST_DONE;
--
2.17.1
- [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29, Michael Roth, 2019/07/23
- [Qemu-devel] [PATCH 09/36] exec.c: Don't reallocate IOMMUNotifiers that are in use, Michael Roth, 2019/07/23
- [Qemu-devel] [PATCH 12/36] block: Fix invalidate_cache error path for parent activation, Michael Roth, 2019/07/23
- [Qemu-devel] [PATCH 11/36] tpm: Make sure the locality received from backend is valid,
Michael Roth <=
- [Qemu-devel] [PATCH 13/36] hw/rdma: another clang compilation fix, Michael Roth, 2019/07/23
- [Qemu-devel] [PATCH 10/36] tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid, Michael Roth, 2019/07/23
- [Qemu-devel] [PATCH 17/36] i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model, Michael Roth, 2019/07/23
- [Qemu-devel] [PATCH 18/36] i386: remove the 'INTEL_PT' CPUID bit from named CPU models, Michael Roth, 2019/07/23
- [Qemu-devel] [PATCH 15/36] tpm_tis: fix loop that cancels any seizure by a lower locality, Michael Roth, 2019/07/23
- [Qemu-devel] [PATCH 16/36] vfio-ap: flag as compatible with balloon, Michael Roth, 2019/07/23
- [Qemu-devel] [PATCH 20/36] qga-win: include glib when building VSS DLL, Michael Roth, 2019/07/23
- [Qemu-devel] [PATCH 19/36] json: Fix % handling when not interpolating, Michael Roth, 2019/07/23
- [Qemu-devel] [PATCH 21/36] configure: improve usbfs check, Michael Roth, 2019/07/23
- [Qemu-devel] [PATCH 27/36] qcow2: Avoid COW during metadata preallocation, Michael Roth, 2019/07/23