|
Bugzilla – Full Text Bug Listing |
| Summary: | TPM event log is empty | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Tumbleweed | Reporter: | Alberto Planas Dominguez <aplanas> |
| Component: | Kernel | Assignee: | Gary Ching-Pang Lin <glin> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | meissner |
| Version: | Current | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Alberto Planas Dominguez
2021-05-10 14:56:11 UTC
I can reproduce the bug with an older Tumbleweed with kernel 5.10.7. Meanwhile, I also found an patch for tpm2-tools: https://github.com/tpm2-software/tpm2-tools/commit/10b8344d320830af346557bfde9ffb8a918bbbd8 Will try the patch first. (In reply to Gary Ching-Pang Lin from comment #1) > I can reproduce the bug with an older Tumbleweed with kernel 5.10.7. > > Meanwhile, I also found an patch for tpm2-tools: > https://github.com/tpm2-software/tpm2-tools/commit/ > 10b8344d320830af346557bfde9ffb8a918bbbd8 > > Will try the patch first. The patch is included in tpm2-tools 5.0 already in tw. But I think that the issue is different. This patch is about that the kernel report (correctly) a size 0 for the event log, but the workaround is a matter or cp it to a different place. This will create a file with size and content. Also you can cat the event log to see the same content. The reported bug is that the event log is indeed empty. So the cp or cat do not shows any information. Also thanks for checking this!! (In reply to Alberto Planas Dominguez from comment #2) > (In reply to Gary Ching-Pang Lin from comment #1) > > I can reproduce the bug with an older Tumbleweed with kernel 5.10.7. > > > > Meanwhile, I also found an patch for tpm2-tools: > > https://github.com/tpm2-software/tpm2-tools/commit/ > > 10b8344d320830af346557bfde9ffb8a918bbbd8 > > > > Will try the patch first. > > The patch is included in tpm2-tools 5.0 already in tw. But I think that the > issue is different. This patch is about that the kernel report (correctly) a > size 0 for the event log, but the workaround is a matter or cp it to a > different place. This will create a file with size and content. Also you can > cat the event log to see the same content. > Ya, I just found that the fix is already merged. > The reported bug is that the event log is indeed empty. So the cp or cat do > not shows any information. > Indeed, it somehow became empty. It seems to me that kernel successfully detected TPM from ACPI or EFI, or binary_bios_measurements won't be created. However, it got nothing in the end. Have to dig more. > Also thanks for checking this!! Hmmm, the edk2 upstream actually discussed the issue weeks ago: https://www.mail-archive.com/devel@edk2.groups.io/msg30443.html The fix was identified: https://www.mail-archive.com/devel@edk2.groups.io/msg30605.html https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3dcd15665aca80197333500a4be3900948afccc1 I checked the stable tree for linux 5.12.y and the fix wasn't picked into 5.12.2, so it currently only exists in the unreleased 5.13 tree. (In reply to Gary Ching-Pang Lin from comment #4) > Hmmm, the edk2 upstream actually discussed the issue weeks ago: > https://www.mail-archive.com/devel@edk2.groups.io/msg30443.html > > The fix was identified: > https://www.mail-archive.com/devel@edk2.groups.io/msg30605.html > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/ > ?id=3dcd15665aca80197333500a4be3900948afccc1 > > I checked the stable tree for linux 5.12.y and the fix wasn't picked into > 5.12.2, so it currently only exists in the unreleased 5.13 tree. Good catch. Seems that kernel:HEAD[1] is using 5.12. Do makes sense to backport the patch, or is better to wait? [1] https://build.opensuse.org/package/show/Kernel:HEAD/kernel-default (In reply to Alberto Planas Dominguez from comment #5) > (In reply to Gary Ching-Pang Lin from comment #4) > > Hmmm, the edk2 upstream actually discussed the issue weeks ago: > > https://www.mail-archive.com/devel@edk2.groups.io/msg30443.html > > > > The fix was identified: > > https://www.mail-archive.com/devel@edk2.groups.io/msg30605.html > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/ > > ?id=3dcd15665aca80197333500a4be3900948afccc1 > > > > I checked the stable tree for linux 5.12.y and the fix wasn't picked into > > 5.12.2, so it currently only exists in the unreleased 5.13 tree. > > Good catch. Seems that kernel:HEAD[1] is using 5.12. Do makes sense to > backport the patch, or is better to wait? > > [1] https://build.opensuse.org/package/show/Kernel:HEAD/kernel-default We usually don't proactively backport patches to kernel:HEAD or kernel:stable unless it's urgent security fixes. The stable ML is CC'ed in the kernel fix. If you can wait, I believe it'd be in the stable tree soon. (In reply to Gary Ching-Pang Lin from comment #6) > We usually don't proactively backport patches to kernel:HEAD or > kernel:stable unless it's urgent security fixes. The stable ML is CC'ed in > the kernel fix. If you can wait, I believe it'd be in the stable tree soon. Sure, this can wait. I will try to confirm that the patch indeed resolves the issue. Thanks! I got some bugs that need to backport fixes into the kernel master so I'll take this fix along with other fixes. (In reply to Gary Ching-Pang Lin from comment #8) > I got some bugs that need to backport fixes into the kernel master so I'll > take this fix along with other fixes. During the backporting, I found that the target patch is already merged into 5.12.3. Let's wait for 5.12.3. (In reply to Gary Ching-Pang Lin from comment #9) > During the backporting, I found that the target patch is already merged into > 5.12.3. Let's wait for 5.12.3. This is good news! Updated and now the event log provides information:
dhcp172:~ # tpm2_eventlog /sys/kernel/security/tpm0/binary_bios_measurements
---
events:
- EventNum: 0
PCRIndex: 0
EventType: EV_NO_ACTION
Digest: "0000000000000000000000000000000000000000"
EventSize: 37
...
Thanks!!
|