tpm2: correctly fill orderly NV space data areas in RAM
This CL fixes filling the handle and size fields in the orderly NV
data areas in RAM. Before the change, only the last byte was filled
for those fields.
The CL also adds code for deleting improperly created data areas if
they were created befoe fixing the issue. And improves robustness by
handling the situations when NV space data areas in RAM are corrupted
or not found even though the handle record exists in flash.
BUG=b:211564769
TEST=1) see BUG (comment #6)
2) verified that counters created with pre-CL cr50 untangled after
updating to cr50 with this CL
Change-Id: Ie0e4f64d1c15fce3d70c5c4e108b654970f0ec80
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/tpm2/+/3371562
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Tested-by: Andrey Pronin <apronin@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>
Commit-Queue: Andrey Pronin <apronin@chromium.org>
1 file changed