Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAEM - sudo anti-evil-maid-seal failing from dom0 console because setting LABEL is failing #3296
Comments
adrelanos
referenced this issue
Nov 9, 2017
Closed
AEM - sudo anti-evil-maid-seal sanity test failing on functional TPM #3297
andrewdavidwong
added
bug
C: other
labels
Nov 9, 2017
andrewdavidwong
added this to the Release 3.2 updates milestone
Nov 9, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phagara
Nov 9, 2017
The -seal script is supposed to be started automatically by the systemd service upon each (even unsuccessful) AEM boot, not manually as you did there (presumably right after running the -install script and without rebooting).
That particular line is trying to derive the filesystem label of the AEM media you booted from -- in this case, there was none and thus it failed. By adding || true at the end and not supplying a positional argument with the desired label suffix to the -seal script, only $LABEL_PREFIX ("aem") got assigned to $LABEL. Coincidentally, as your AEM media did not have a custom suffix, your hack "worked".
TL;DR: reboot after running anti-evil-maid-install and let the system perform sealing (and do not remove the sanity check in #3297 but try to get your measured boot to really work -- make sure you have Intel TXT enabled in bios, suitable SINIT module for your platform downloaded, check txt-stat in dom0, etc... you can find more debugging tips by searching the qubes-users mailing list).
phagara
commented
Nov 9, 2017
|
The That particular line is trying to derive the filesystem label of the AEM media you booted from -- in this case, there was none and thus it failed. By adding TL;DR: reboot after running |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
adrelanos
Nov 9, 2017
Member
TL;DR: reboot after running anti-evil-maid-install and let the system perform sealing
I see.
The -seal script is supposed to be started automatically by the systemd service upon each (even unsuccessful) AEM boot, not manually as you did there (presumably right after running the -install script and without rebooting).
I had rebooted several times. I hacked it because debugging by rebooting is an incredible time intense process (due to another bug of USBVM shutdown / killing taking a very long time). Rebooting to try again is very ineffective time wise to debug.
Therefore I was looking for a faster way to debug it - by running it from the running system.
Wishlist solutions:
- preferred: Do you think you can make the script idempotent, making it possible to run it any time (or after the first reboot) from the running system?
- better error message
I see.
I had rebooted several times. I hacked it because debugging by rebooting is an incredible time intense process (due to another bug of USBVM shutdown / killing taking a very long time). Rebooting to try again is very ineffective time wise to debug. Therefore I was looking for a faster way to debug it - by running it from the running system. Wishlist solutions:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phagara
Nov 9, 2017
The problem is, -seal script must see the PCR registers set to the same values as during your future AEM boots, so that it has a known state to seal the secret(s) against. This implies either pre-computing the PCR values and sealing to that or rebooting using the desired tboot/Xen/kernel binaries and configs to have the registers set.
Other than that, it already is as idempotent as possible (the generated sealed secrets will always be different due to encryption nonces, but sealed to the same PCR values and you can re-run it as many times as you want).
phagara
commented
Nov 9, 2017
|
The problem is, Other than that, it already is as idempotent as possible (the generated sealed secrets will always be different due to encryption nonces, but sealed to the same PCR values and you can re-run it as many times as you want). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phagara
Nov 9, 2017
As for the "better error message" variant, we could easily direct the user to pass the AEM media suffix as a positional argument to the -seal script if $SUFFIX_CACHE does not exist (as would be the case with non-AEM boot) and no positional arg was passed.
phagara
commented
Nov 9, 2017
|
As for the "better error message" variant, we could easily direct the user to pass the AEM media suffix as a positional argument to the |
adrelanos commentedNov 9, 2017
•
edited
Edited 1 time
-
adrelanos
edited Nov 9, 2017 (most recent)
Qubes OS version:
R3.2
Affected TemplateVMs:
dom0
Steps to reproduce the behavior:
Expected behavior:
No such error or a better error message explaining what is wrong i.e. possible user mistake or hardware bug.
Actual behavior:
Error.
General notes:
https://github.com/QubesOS/qubes-antievilmaid/blob/8d8a941f5647b0082a20b4245859986d3ca45c12/anti-evil-maid/sbin/anti-evil-maid-seal#L23
Does not work for me.
Modified to:
Now it's working.
Working meaning, after adding this hack, and another hack #3297,
sudo anti-evil-maid-sealshowed no more error and I could view my secret at the next reboot. I don't know if this hack was sane or if that hack together with #3297 actually invalidated the protections by AEM.