Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tpm2_eventlog_yaml: fix parsing for MokListTrusted #3144

Merged
merged 3 commits into from
Oct 12, 2022

Conversation

THS-on
Copy link
Contributor

@THS-on THS-on commented Oct 8, 2022

Not all data in events of the EV_EFI_VARIABLE_AUTHORITY are
EFI_SIGNATURE_DATA. The entry for MokListTrusted is a boolean
encoded as an integer similar to SecureBoot variable.

Fixes #3050

@idesai
Copy link
Member

idesai commented Oct 10, 2022

@THS-on please can you add the eventlog binary to the integration test fixtures and update the test.

@codecov
Copy link

codecov bot commented Oct 10, 2022

Codecov Report

Merging #3144 (1061d53) into master (648b8ad) will decrease coverage by 0.05%.
The diff coverage is 69.50%.

❗ Current head 1061d53 differs from pull request most recent head 3674c75. Consider uploading reports for the commit 3674c75 to get more accurate results

@@            Coverage Diff             @@
##           master    #3144      +/-   ##
==========================================
- Coverage   76.68%   76.62%   -0.06%     
==========================================
  Files         172      172              
  Lines       23117    23216      +99     
==========================================
+ Hits        17727    17790      +63     
- Misses       5390     5426      +36     
Impacted Files Coverage Δ
lib/tpm2_eventlog_yaml.c 80.07% <66.66%> (-3.06%) ⬇️
lib/tpm2_eventlog.c 86.42% <76.92%> (-0.95%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@THS-on
Copy link
Contributor Author

THS-on commented Oct 10, 2022

@idesai done.

@kkaarreell I included your provided eventlog. I hope this is fine.

lib/tpm2_eventlog_yaml.c Outdated Show resolved Hide resolved
Not all data in events of the EV_EFI_VARIABLE_AUTHORITY are
EFI_SIGNATURE_DATA. The entry for MokListTrusted is a boolean
encoded as an integer similar to SecureBoot variable.

Fixes tpm2-software#3050

Signed-off-by: Thore Sommer <mail@thson.de>
Signed-off-by: Thore Sommer <mail@thson.de>
The used variables and their length are defined as the following:

 - Name: NAME_{VARIABLE_NAME}
 - Length: NAME_{VARIABLE_NAME}_LEN

Signed-off-by: Thore Sommer <mail@thson.de>
@idesai
Copy link
Member

idesai commented Oct 11, 2022

@JuergenReppSIT, it appears all the FAPI tests are failing with master tpm2-tss branch.

JuergenReppSIT added a commit to JuergenReppSIT/tpm2-tss that referenced this pull request Oct 11, 2022
Memory allocated by scandir when reading the fapi profile
was not freed.
Should fix the failures in:
tpm2-software/tpm2-tools#3144

Signed-off-by: Juergen Repp <juergen_repp@web.de>
@JuergenReppSIT
Copy link
Member

@JuergenReppSIT, it appears all the FAPI tests are failing with master tpm2-tss branch.

I have create a PR which should fix the problem: tpm2-software/tpm2-tss#2434

JuergenReppSIT added a commit to tpm2-software/tpm2-tss that referenced this pull request Oct 11, 2022
Memory allocated by scandir when reading the fapi profile
was not freed.
Should fix the failures in:
tpm2-software/tpm2-tools#3144

Signed-off-by: Juergen Repp <juergen_repp@web.de>
@idesai idesai merged commit 1499fe6 into tpm2-software:master Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tpm2_eventlog: error Cannot allocate memory when using --eventlog-version=2
3 participants