Share via

bug of the "bootloaderfw.efi" (the new version installed with Windows 11)

Anonymous
2021-07-10T19:51:37+00:00

Split from this thread.

I can confim after looking at TPM events posted in the eventviewer, that Windwos 11 does not comply to TPM specifications.

Notably it repeatedly attempts to use a "TPM2_Import" (code=342=0x342) command to import a new cryptographically hierarchy, but that command gets returned an error code RC_VALUE+4 (code=1220=0x4C4).

According to TCG specs about the "TPM2_Import" primitive API, this RC error code means that:

nonempty inSymSeed and its numeric value is greater than the modulus of the key referenced by inSymSeed, or
inSymSeed is larger than the size of the digest produced by the name algorithm of the symmetric key referenced by inSymSeed .

Effectively, Windows selects the incorrect profile and attempts to use the TPM1.2 profile using the 1st bank of PCRs (using SHA1), instead of the second bank (SHA256).

The first PCRs bank (legacy SHA1 for TPM1.2, which may be used with TPM2 as well but is not recommended) is NOT provisioned by the UEFI BIOS which has correctly provisioned the 2nd PCRs bank (SHA2, the one that even windows 11 recommends). This of course does not work because the hash for the SHA256 hierarchy that Windows attempts to extend by this import (in PCR[7] at UEFI preboot, and PCR[11] later inside the OS) has an incorrect size (the SHA256 hash *requires* more bytes than SHA1) for the selected profile.

Then it attemps to fallback using SHA1, but this fails as well because the legacy SHA1 bank has not been provisioned on the TPM by the UEFI BIOS (the 16 PCR registers for the UEFI firmware in that bank are cleared, the 7 next registers are filled with 0xFF, meaning uninitiliazed, and the last 24th register is clear).

I don't know why Microsoft does not select the correct profile after looking at the TPM capabilities. This looks like an incorrect use of the TPM API with TPM_Initialize. Resetting or clearing the TPM will have no effect.

Microsoft seems to (incorrectly) assume that *all* banks of the TPM should be provisioned by the UEFI BIOS, but this is not a requirement in the TCG: an UEFI BIOS can (and even should) provision only the TPM banks that it needs for a given profile.

Microsoft does not seem to support multiple profiles for different OSes or applications on the same machine, and does not support the presence of multiple TPMs as well!

This is a bug of Windows 11 that did not exist in Windows 10. Microsoft has incorrectly simplified its implementation in Windows 11: it does not correctly look at the TPM capabilities, and just assumes that a discrete TPM will behave exactly like the weak fTPM implementations implemented by Intel in PTT (when using the fTPM inside the CPU), where Intel provisions both banks (SHA1 and SHA256).

It's not up to Microsoft to provision the 16 first registers in any PCR bank or to decide which one should be used: now there are new TPM specificaitons allowing several dozens of independant PCR banks (even if TPM1.2 only allowed one, and used a reduced set of algorithms, and only SHA1).

As well Microsoft still only supports the legacy FIFO/TIS interface, instead of the newer CRB interface (which allows selecting and using multiple banks at the same time for different purposes, and asynchronouly from each other, with huge performance gains in applications, something not possible with the legacy FIFO/TIS interface, where a default profile must be selected first to select the correct bank): Windows 11 does not use this CRB interface, and does not select the bank during initialization wit hthe legacy FIFO/TIS1.2 interface, so the first bank is used by default: it is SHA1 and not necessarily provisioned, and Windows does not have any fallback to use another compatible bank using the correct profile).

Microsoft should reread the TCG specs and not affirm things about security in Windows 11 that are demonstratedly wrong !

The following event spammed every second while Windows 11 is running is symptomatic:

<Event xmlns="**http://schemas.microsoft.com/win/2004/08/events/event**">

<System> <Provider Name="TPM" Guid="{1b6b0772-251b-4d42-917d-faca166bc059}" /><EventID>17</EventID><Version>0</Version><Level>4</Level><Task>0</Task><Opcode>0</Opcode><Keywords>0x8000000000000000</Keywords><TimeCreated SystemTime="2021-07-10T16:43:21.1503882Z" /><EventRecordID>17130</EventRecordID><Correlation /><Execution ProcessID="4" ThreadID="396" /><Channel>System</Channel><Computer>JUPITER</Computer><Security UserID="S-1-5-18" /></System>

<EventData> <Data Name="locationCode">0x1e0003b6</Data><Data Name="TpmCommandOrdinal">342</Data><Data Name="TpmResponseCode">1220</Data></EventData> </Event> (The interesting part is the "TmpCommandOrdinal" given here as a decimal value (342=0x156) and the response code.)

You can see yourself that the 1st PCR bank (SHA1) is selected but not provisioned and not suitable for SHA1, and that the attempt to use use for storing SHA256 hashes will fail (not compatible with the selected bank), by using "tpmtool.exe" or "tpmdiagnostics.exe" from an adminsitrator command line (where I have partly snipped the non-empty) hashes:

C:\WINDOWS\system32>TpmDiagnostics printpcrs

PCR bank: SHA1

PCR[00]: 0000000000000000000000000000000000000000

PCR[01]: 0000000000000000000000000000000000000000

PCR[02]: 0000000000000000000000000000000000000000

PCR[03]: 0000000000000000000000000000000000000000

PCR[04]: 0000000000000000000000000000000000000000

PCR[05]: 0000000000000000000000000000000000000000

PCR[06]: 0000000000000000000000000000000000000000

PCR[07]: 0000000000000000000000000000000000000000

PCR[08]: 0000000000000000000000000000000000000000

PCR[09]: 0000000000000000000000000000000000000000

PCR[10]: 0000000000000000000000000000000000000000

PCR[11]: 0000000000000000000000000000000000000000

PCR[12]: 2af205(snip)a32df

PCR[13]: 3f54c1(snip)826ee

PCR[14]: 0c2aa(snip)9bad3

PCR[15]: 0000000000000000000000000000000000000000

PCR[16]: 0000000000000000000000000000000000000000

PCR[17]: ffffffffffffffffffffffffffffffffffffffff

PCR[18]: ffffffffffffffffffffffffffffffffffffffff

PCR[19]: ffffffffffffffffffffffffffffffffffffffff

PCR[20]: ffffffffffffffffffffffffffffffffffffffff

PCR[21]: ffffffffffffffffffffffffffffffffffffffff

PCR[22]: ffffffffffffffffffffffffffffffffffffffff

PCR[23]: 0000000000000000000000000000000000000000

PCR bank: SHA256

PCR[00]: 7cbaaaa(snip)c38704b8

PCR[01]: 3d458cf(snip)f198e7969

PCR[02]: 3d458cf(snip)f198e7969

PCR[03]: 3d458cf(snip)f198e7969

PCR[04]: 18879d(snip)941184c1c

PCR[05]: 59f3cbd(snip)178fc289a

PCR[06]: 3d458cf(snip)f198e7969

PCR[07]: 625d66(snip)f733c8f4ff9

PCR[08]: 0000000000000000000000000000000000000000000000000000000000000000

PCR[09]: 0000000000000000000000000000000000000000000000000000000000000000

PCR[10]: 0000000000000000000000000000000000000000000000000000000000000000

PCR[11]: 0fe6e(snip)cdf310f980

PCR[12]: 0000000000000000000000000000000000000000000000000000000000000000

PCR[13]: 0000000000000000000000000000000000000000000000000000000000000000

PCR[14]: 0000000000000000000000000000000000000000000000000000000000000000

PCR[15]: 0000000000000000000000000000000000000000000000000000000000000000

PCR[16]: 0000000000000000000000000000000000000000000000000000000000000000

PCR[17]: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

PCR[18]: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

PCR[19]: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

PCR[20]: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

PCR[21]: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

PCR[22]: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

PCR[23]: 0000000000000000000000000000000000000000000000000000000000000000

PCR bank in use: SHA1

This is clearly a bug of the "bootloaderfw.efi" (the new version installed with Windows 11) reproduced as well in the post-boot UEFI loader and the new kernel after boot.

As you can see the PCR[0] to PCR[7]and PCR[11] were correctly provisioned by the UEFI BIOS in the SHA26 bank; Windows 11 does not use it and instead attempts to use the SHA1 bank only (even if it does not "support" it) to set PCR[12] to PCR[14] (not used by the UEFI BIOS even in secure mode), for use in Hyper-V running in legacy mode (based on the storage only, like with TPM1.2 with a single bank)

I still don't know if Windows 11 supports the CRB (strongly recommended) interface of the TPM2 chip, I think it uses only the FIFO/TIS interface (with poor performance) and only in synchronous mode (TPM2 has an asynchronous mode, best fitted for use with multiple banks and multiple profiles by many concurrent applications). This means that Windows 11 is far inferior to other OSes, including Windows 8/10, Windows Server 2012/2019, and all current Linux kernels.

The TPM2.0 protection in Windows 11 is an illusory protection. It just does not work at all for now and cannot be a "requirement" as announced ! Windows 11 is still based on a basic code implementation that only targets single TPM1.2 profiles (even if it uses the TPM2 API nothing was added to select the correct profile). All the rest has been silently dropped from Windows and so it only works with low-end tablets and notebooks (the same target as Windows 10 in S Mode... knowing Windows 11 wants to drop the "S Mode") with the lowest costs (without any real discrete TPM chip): just what Chinese manufacturers wanted. It is not made for serious desktops or servers.

But this code works when booting Windows 11 as a guest OS in a VM like vmWare (or even Hyper-V in Windows 11 !) because the hypervisor will typically implement a virtual fTPM with a single PCR bank for each hosted VM and in a single profile). This does not work on real hardware for the new version of Hyper-V running on bare metal where it can only use TPM1.2 with the basic profile for SHA1 and only endorsement of the storage hierarchy!

Visibly this limited vision of TPM2 is wrong, it is not what the TCG documented and prepared since years !

Windows Insider program | Windows Insider preview | Security, privacy, and accounts

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. Anonymous
    2021-07-11T04:08:23+00:00

    And it is also notable that the Windows 11 installer erased completely the contents of the ESP (FAT32) partition containing the UEFI boot loader for Windows!

    It notably erased other UEFI tools that were installed there (e.g. for alternate bootloaders of other OSes or for other tools).

    Thanks I had a backup of these tools, and was able to restore them.

    This is another severe bug of the Windows 11 installer which should have just only replaced the content of \EFI\BOOT\Microsoft for the new OS loader, and added some new BCD entries (needed for the UEFI BIOS) pointing to that content, keeping the other BCD entries intact and pointing to the correct and preserved location in the ESP partition.

    As well the Windows 11 installer has erased completely the content of the Recovery (NTFS) partition, which contained other diagnostic or maintenance tools, usable directly on demand on the console, when booting with the WinPE safe mode: these tools stored on separate directories and not in the "\Recovery" folder should have been preserved: there was ample enough space for these small tools, as the Windows recovery code does not use the full space in that partition, and always leaves about 50MB to 150MB of free space: this extra storage space is configurable according to the Windows documentation, just like the minimum size for the ESP partition).

    So the Windows 11 installer does not like at all concurrent OSes and concurrent diagnostic tools. It takes ALL the place for itself. If these two partitions are not large enough, it's quite simple to detect this before the installation, and adjust them (possibly by resizing the main C:\ partition at boot time before restarting the installer after boot). This Windows 11 installer (used by Windows Update from Windows 10 for the upgrade) is then clearly unsafe as well (only targetting small notebooks or tablets with very limited storage capacities and hosting a single installed OS)...

    As well, on the first installation of Windows 11, drives that were encrypted with Bitlocker encrypted in Windows 10 were not readable at all (because windows 11 could no longer recognize the TPM2 chip): I had to restore from a backup, then decrypt the drives in Windows 10 completely before attempting the upgrade. And after the upgrade, even if TPM2 "seems" to to activated, Bitlocker fails to encrypt any drive (for the same reson: failure to use the TPM2 chip with the correct profile on the correct PCR bank using SHA256)

    Something that I will attempt now is to use replace the Windows 11 version of the two UEFI bootloader files by the version found in Windows Server 2019, or the latest version for Windows 10 Pro (from the Dev channel). May be this will work... or not at all ! It's likely that if this works, the secure boot will detect something and I will need to reconfirm the hardware attestation and recreate a PIN.

    For this test, I need to prepare first a bootable USB flash drive, to be able restore these two files in the ESP partition if this does not work.

    But according to my attempts os investigation, Windows 11 will nver be ready before its new architecture is ported into the next version of Windows Server (probably not before 2022 for its insider version, and at least one additional year for commercial release in 2023 or 2024: we will be very near the announced end of support for Windows 10 in 2025, which is too much premature).

    All new calendar plans announced by Microsoft for Windows 11 are just not realistic (and that's why so many users are in FURY now across the world, on many internet sites and social networks, and all wellknown and influencal technical bloggers and youtubers!). The 24 June announcement for Windows 11 is catastrophic:

    Lot of people now seriously think about abandonning Windows completely and going to MacOS, Linux or Android (Chromebooks). This is already true for servers (almost all based now on Linux, including at Microsoft for its Azure cloud, and all cloud providers). Windows will loose its largest market share...

    Was this answer helpful?

    4 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2021-07-11T02:40:41+00:00

    I've notified them multiple times.

    And the diagnostic data collected by the feedback hub is insufficient.

    We were instructed to use the new "TpmDiagnostics.exe" tool provided in the recent update, but its data are not collected.

    We were also instructed to use this forum because :

    • the Feedback hub is not always accessible to everyone and won't start (or frequently crashes) on various installation of Windows 10/11.
    • it is too limited to collect long diagnostics data
    • it is just made for providing a few snapshots for non complex issues (e.g. rendering problems, incorrect translations, usability design problems, and comments about the current quest for the general look and feel of the UI), not internal technical problems in the kernel or the bootloader or drivers problems.

    Diagnosing and solving these compatiblity issues (and very internal bugs of windows itself) is not really possible in the Feedback Hub (which is visibly not read at all by kernel and drivers developers at Microsoft, but mostly by people working on the UI and sometimes by the commercial teams (to get opinions and reactions and orient some choices where there's no one-for-all solution and several alternatives are possible and were subbmitted to Insiders flights for A/B testing or evaluation).

    The problem here is that Microsofot is still not clear nad has brought LOT of confusion with the Windows 11 compatiblity checks and in its inconsistant documentation, which contradicts the 24 June announcement. Lot of eople see now that their machine won't upgrade or won't be supported in Windows 11 (and the only solution proposed is to erase everything and resinstall Window 10, which will have a short support time in 4 years, whereas Windows 10 is here since nearly 10 years, it has considerably evolved, including with a rather good support of TPM2 with parallel development in Windows Server 2019: this TPM2 support that was criticically damaged in Windows 11 and no longer works because of unsafe simplifications and unchecked assumptions that prove to be wrong for lot of systems).

    Microsoft can say what they want, MOST PCs will NOT upgrade correctly to Windows 11 (including the most recent ones, and high-end Microsoft Surface 2). And this also means that the next version of Windows Server (2022?) will not run as well with these assumptions.

    The Windows 11 version in Dev channel is for now a severe failure, and Windows 11 will certainly not be ready for commercial release or general upgrades at fall, as announced, simply because this critical part of Windows 11 (compatiblity check) is simply undocumented, not tested at all, and should have not been announced as a strong requirement.

    As a result, all the security services that depend now on TPM2 won't start. And this means that Windows 11 is MUCH LESS secure than Windows 10. The current implemetnation is also easily attackable: Windows 11 wants a TPM2 but acts as if this was a basic TPM1.2 protecting only the storage hierarchy and using partial measuments. All the new requirements (for VBS, HVCI) don't work. Security is clearly not implemented, this is just a desire by Microsoft but this part is still not implemented (and the existing minimal support in Windows 10 and Windows Server has been dropped completely, with lot of false assumptions based on initial tests on a limited set of small notebooks or tablets based on SOME new ranges of CPUs but not having any TPM chip, and excluding various new CPUs at well featured in the best and most costly new notebooks).

    Only MDAG works (but its just requires the protection storage hierarchy which is the only one provided by TPM1.2... and even MDAG has bugs now and does not work at boot time: it must be enabled manually after each boot and logon)

    So the Windows 11 test in the Dev Channel is very restrictive: it is absolutely not reaching the announced market, just a niche. All the rest are not tested (and now are not even allowed to test it: The Insider Dev channel has now been severely closed on June 24 with the announcement, anod no others are allowed to come using it; if we reinstall Windows 10, we'll no logner be able to test again Windows 11, so the Windows 11 evaluation has a flight of testers which is decreasing very fast, and Windows 11 will then be less and less tested, where in fact it requires many more tests).

    Was this answer helpful?

    4 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2021-07-11T07:55:43+00:00

    This thread is linked into the Feedback hub for reference.

    And Sorry, but don't tell to move constantly from one location to another: the Feebback hub instructs us to go here, here I was told to submit to the feedback bub (not accessible to everyone when it does not work or when in crashes instantly in Windows), and now you ask us to go to TechNet (which is not meant for support and does not support windows Insider testers, but developers of apps and drivers for Windows or deployment solutions...).

    Once again, Microsoft is inconsistant in its support services.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2021-07-11T15:35:09+00:00

    please use the feedback hub (winkey+F) to bring it to the attention of the development team.

    they will then be sent the diagnostic data as well.

    Many of the dedicated Insiders already file Feedback Hub feedback as well as offer help and suggestions here. Am convinced that the overwhelming number of responses in Community are due to this being a major rollout and the 'conditions' are having a big impact on what will happen tomorrow in Windows. This is a good thing and will help shape a much better version of Windows. It is amazing to see so many 'volunteers' doing the 'deep' work that will help make it better. Microsoft is helped greatly by this examination by Insiders.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  5. Anonymous
    2021-07-10T19:53:11+00:00

    please use the feedback hub (winkey+F) to bring it to the attention of the development team.

    they will then be sent the diagnostic data as well.

    Was this answer helpful?

    0 comments No comments