What We Know About Cross-Signing for Down-Level Windows Versions As of Today (2 March 2021)

OK, let’s see if I can help clear SOME things up – Though I’m not going to be able to clear up nearly as much as I had hoped earlier.

I got our eToken today, and it seems OSR’s new code signing cert is issued by Digicert, not Entrust. My bad. But, I’m not sure that’d help anything no matter what.

I’m going to post this here, then I’m going to clean it up and make it into a blog post and try to get the word out across the industry. Comments/thoughts appreciated.

Before I even start, let me acknowledge that this is an unholy mess.

This is what I know as of this afternoon.

The problem:

  • This discussion is about driver signing on down-level versions of Windows, such as Windows 7, Windows 8, and Windows 8.1 – This discussion has nothing at all to do with driver signing for Windows 10.
  • To enable a driver to be installed on down-level versions of Windows, the driver package needs to be signed either by a Microsoft certificate or using a third-party kernel-mode code signing certificate that has been cross-signed by the CA. Both certificates need to be valid when the driver is signed.
  • This discussion results from MSFT’s policy to discontinue support for cross-signing drivers to enable them to be installed on down-level version of Windows. This isn’t an arbitrary decision, but rather is driven by technical issues around the way the existing certs work.
  • According to the MSFT Trusted Root Program (TRP) policy, after 1 July 2021CAs cannot issue kernel-mode code signing certificates. Certificates in violation of Microsoft TRP policies are subject to revocation.
  • Despite repeated pleas to provide an alternate way to sign drivers, as of today (2 March 2021) the only way MSFT says that you’ll be able to install drivers on down-level versions of Windows is to make your drivers pass the WHQL tests.
  • Here’s where the Community gets screwed: It is technically impossible for many drivers to pass the WHQL tests (consider, for example, drivers that load/run on certain embedded systems that can’t work as clients for the HCKs).

Cross-Signing Certs Valid After 1 July 2021?

  • Folks in the community have noticed that new cross-signing certificates have been issued, with expiration dates that run BEYOND 1 July 2021.
  • There are exactly 5 such certificates that I can find as of today (2 March 2021). They are from “Entrust Root Certification Authority – G2”, “AddTrust External CA Root”, “GoDaddy Class 2 Certification Authority”, “Starfield Class 2 Certification Authority”, and “UTN-USERFirst-Object”
  • It seems logical that if you had a kernel-mode code signing cert that chains up to one of these specific CAs, you could continue to use it along with one of the cross-certs above to sign kernel-mode drivers until either your code signing cert expires or the cross-cert expires, whichever comes first.
  • The catch: I can’t find a way to purchase a relevant code-signing cert from any of these CAs (AddTrust and UTN-USERFirst-Object are both part of Sectigo now). If you can, let us know!

A Work-Around:

  • Remember: The goal here is to be able to install drivers on down-level versions of Windows, without having to pass WHQL.
  • One solution that we know works on Windows 7: Attestation Sign your driver package and binary for Windows 10. The resulting driver package will install on Windows 7 (with KB4474419, which enabled SHA-256 signing installed). Note that this works as long as you DO NOT sign the driver binary with your own signature before you submit it to MSFT for Attestation Signing.
  • Attestation Signing your driver package for Windows 10 will also allow non-PnP drivers drivers to be installed on Windows 8.1(including right-click install using an INF) – This does not, however, work for PnP drivers.

That’s what I know as of this afternoon, and I sincerely hope it’s helpful.

I am in (almost) daily communication with MSFT on this issue. I’ve been told that we should see something more from them, in terms of a policy clarification or something soon. Yes… we’ve heard that before.

Peter

As an additional argument against the whole “just go and do WHQL” claim, you could add that drivers distributed under GPL are legally forbidden from being WHQL signed. So even if you manage to pass all the tests, it does not mean you can get the signature.

Peter wrote:

This isn’t an arbitrary decision, but rather is driven by technical issues around the way the existing certs work.

Do we have any info from MSFT on what these technical issues are? If they relate to enabling malware, I understand that details must be omitted, but it would still be nice to have some general info.

What law prohibits GPL drivers fro, being WHQL signed?

Mark Roddy

@Mark_Roddy said:
What law prohibits GPL drivers fro, being WHQL signed?

It’s not a law, it’s Microsoft’s policy. The agreements you have to sign and then comply with; they define what you are allowed to send for submission.

The agreements you have to sign and then comply with; they define what you are allowed to send for submission.

@CaptainFlint
Can you give us a citation, please? I been doing this (drivers for Windows) for a while now, and I’ve never heard that before. I’m not saying you’re wrong… I’m just saying I’m really, really, surprised.

Do we have any info from MSFT on what these technical issues are?

@Francis_Litterio
Ugh. The info I have was given to me under NDA. So, while it’s not very interesting, it’s also not something I can share. I apologize for that.

I only mentioned it to make the point that MSFT isn’t discontinuing support for cross-signing arbitrarily, for absolutely NO reason. And they’re not doing it purely to push people off Win 7 or to purely to promote driver devs using WHQL (though, I’m sure those two things definitely influence the overall decision as well).

I don’t know why they haven’t made the reason widely known, but the PM who “owns” the decision to discontinue support for cross-signing apparently has some reason, as he has not made it widely public.

Peter

@“Peter_Viscarola_(OSR)” said:
Can you give us a citation, please? I been doing this (drivers for Windows) for a while now, and I’ve never heard that before. I’m not saying you’re wrong… I’m just saying I’m really, really, surprised.

it’s governed by the section 7.g of the Windows Compatibility Program and Driver Quality Attestment Testing Agreement:

(g) Drivers and BIOSes are not, and when delivered to Microsoft will not be, in whole or in part, governed by an Excluded License. An “Excluded License” is any license that requires, as a condition of use, modification and/or distribution of software subject to the Excluded License, that such software and/or other software combined and/or distributed with such software be (i) disclosed or distributed in source code form; (ii) licensed for the purpose of making derivative works; or (iii) redistributable at no charge.

When I first heard about such restriction, I went googling, and among others found the following discussion about this matter:
https://libusb-win32-devel.narkive.com/0CaoKh07/whql-testing-agreement-and-gplv3-conflicts
It contains also information from a user who contacted Microsoft directly, and their legal department confirmed that GPL is indeed not accepted. Even though the thread starts with GPLv3, the same is applicable to GPLv2 (which is also confirmed by a quote from Microsoft).

@“Peter_Viscarola_(OSR)” said:

  • The catch: I can’t find a way to purchase a relevant code-signing cert from any of these CAs (AddTrust and UTN-USERFirst-Object are both part of Sectigo now). If you can, let us know!

Hi Peter

Purchasing from Entrust is only possible from the following link :

https://www.entrust.com/digital-security/certificate-solutions/products/digital-signing/code-signing-certificates

Which then redirects you to filling up a form so they can contact you. I guess you can specify the specific CA in the request form.

Sectigo is also the following :

https://sectigo.com/ssl-certificates-tls/code-signing

But i couldn’t find anything for code signing in GoDaddy or Starfield, i guess the best way is to contact them.

We contacted Entrust and as you know got a vague answer, but we suggest other folks to also contact Entrust and the other 4 companies so maybe we can get a clear answer.

@“Peter_Viscarola_(OSR)” said:

  • One solution that we know works on Windows 7: Attestation Sign your driver package and binary for Windows 10. The resulting driver package will install on Windows 7 (with KB4474419, which enabled SHA-256 signing installed). Note that this works as long as you DO NOT sign the driver binary with your own signature before you submit it to MSFT for Attestation Signing.

Well now, there’s something I’ll want to go test. What I recall is that the attestation signing process generated a .CAT containing only the platform IDs selected during submission, which are all Windows 10 variants. And that attested installation set was rejected as a signed driver during installation on the Windows 7 platform or any other platforms, because there was effectively “no .CAT file” (valid for those platforms).

But indeed we are signing the binaries prior to attested submission, specifically because our intention is to run on both Windows 10 and pre-Windows 10. Once the dual-signed binaries are received back from Microsoft, we are able to generate a second .INF and .CAT, and sign that .CAT ourselves. In order to have a working “pre-Windows 10” .INF to install with on such platforms, while using the Microsoft-generated .CAT for installing Windows 10 platforms. i.e. Same binaries, two different .INFs and .CATs.

If Microsoft is now including a Windows 7-compatible platform ID in the .CAT created for attested signing – if you didn’t sign the driver binaries ahead of time – indeed that opens up an additional useful option. An option that Microsoft could withdraw at any moment, of course, but how many aspects of this aren’t exactly like that anyway.

If Microsoft is now including a Windows 7-compatible platform ID in the .CAT created for attested signing

There’s no chance that’s happening, so I don’t know how it works. I only know that it does work, and this has been verified and repro’ed by multiple folks.

I suspect the CAT isn’t used on Win7, however, because on Win7 I can edit the INF file on the target install system, and the driver still installs without error.

Ugly, huh?

Peter

Purchasing from Entrust is only possible from the following link

I have an enquiry in to Entrust as of this morning to purchase one of their certs. I’ll post back what I hear.

Peter

@“Peter_Viscarola_(OSR)” said:
I suspect the CAT isn’t used on Win7, however, because on Win7 I can edit the INF file on the target install system, and the driver still installs without error.

That certainly would seem unusual, since neither actual WHQL signed packages nor cross-signed packages have worked that way on Windows 7 platform previously. Meaning you do get the angry red “installation set has been tampered with” warning when modifying the .INF away from the content it was signed with, which confirms both the .CAT and the contained hash for the .INF file were being verified.

I modified our signing process to no longer pre-sign the binaries with our company code signing certificate, such that only the Attested signing signatures would be present on the binaries. For what it’s worth, neither the “.CAT isn’t used on Win7” assertion, nor the “Attested package installs without error if you didn’t pre-sign the binaries” assertion held true in testing here.

Your expectation regarding the OS attribute list in the .CAT was correct, and by selecting all non-ARM64 platforms during attested signing, the .CAT we received only contains the Windows 10 platforms. Which was the same as what we receive when we do pre-sign the binaries:

_v100,_v100_X64,_v100_RS1,_v100_X64_RS1,_v100_RS2,_v100_X64_RS2,_v100_RS3,_v100_X64_RS3,_v100_RS4,_v100_X64_RS4,_v100_RS5,_v100_X64_RS5,_v100_19H1,_v100_X64_19H1,_v100_Vb,_v100_X64_Vb

But on a Windows 7 Professional x64 machine up to date with SHA-2 support, with this Microsoft Attestation-only signed package I get the “Windows can’t verify the publisher of this driver software” as the interactive angry red publisher verification message. The setupapi.dev.log confirms during _VERIFY_FILE_SIGNATURE that its attempt to verify the .INF file is what failed:

Verifying file against specific (valid) catalog failed! (0xe0000244)
“Error 0xe0000244: This software was tested for compliance with Windows Logon requirements on a different version of Windows, and may not be compatible with this version” as the reason the publisher verification failure was presented.

I’m not a hardware driver, though. This is for a NetClient-class component being installed through INetCfg/NetSetup. So maybe that’s enough to explain the split in the observations. But “signing of driver package for hardware drivers is ignored” still seems like a highly unusual proposition to accept. Maybe knowing what setupapi.dev.log revealed during these multiple successful verifications of the behavior might work toward explaining it, too.

Windows 7 does not actually require a CAT file. That didn’t start until Windows 8.

@Tim_Roberts said:
Windows 7 does not actually require a CAT file. That didn’t start until Windows 8.

This list knows better than I do, so I’ll assume for now this is also a “when installing hardware drivers” scenario that I don’t get to experience with my component. What I can say is that during my component’s .INF-based driver installation on Windows 7 x64, the setupapi.dev.log is clearly citing both the .INF file being executed and the .CAT file it’s using in it’s attempt to verify the signed status of this .INF. And this verification fails when the .CAT file is not valid for the Windows 7 platform.

That certainly sounds like a good and fortunate scenario for hardware drivers though, if the same doesn’t apply to hardware drivers. Allowing them to employ Attested signing to work around the inability to cross-sign, and then rely on the absence of .CAT-based verification when that same valid-for-Windows-10 .INF is invoked on Windows 7 platform.

Just got notified of this lovely little addition to the page on cross-signing:

Will I be able to continue signing drivers if my certificate chains to a cross-cert that expires after 2021?
No, using any code signing certificate to sign a kernel-mode driver without a WHQL signature after July 1st, 2021 is a violation of Microsoft Trusted Root Program (TRP) policy. Certificates in violation of Microsoft TRP policies will be revoked.

So, yeah… there’s that.

Peter

@Alan_Adams

on a Windows 7 Professional x64 machine up to date with SHA-2 support, with this Microsoft Attestation-only signed package I get the “Windows can’t verify the publisher of this driver software” as the interactive angry red publisher verification message.

Yes… you get the angry red pop-up. BUT… in our case, the driver installed successfully, even after that.

Looking at setupapi.dev.log, we see:

sig:                          Verifying file against specific (valid) catalog failed! (0xe0000244)

! sig: Error 0xe0000244: The software was tested for compliance with Windows Logo requirements on a different version of Windows, and may not be compatible with this version.
sig: {_VERIFY_FILE_SIGNATURE exit(0xe0000244)} 14:44:36.474
!!! sto: An unexpected error occurred while validating driver package. Assuming that driver package is unsigned. Catalog = Nothing_KMDF.cat, Error = 0xE0000244
! sto: Driver package is considered unsigned, but user wants to install driver package anyway.

Now… on Windows 8.1, trying to install the same PnP driver, the process fails with the usual error:

Peter

@CaptainFlint

Because you are in the process of getting an Entrust cert, I wanted to be sure you saw the post above about MSFT threatening to revoke the cert of anybody who cross-signs after 1 July 2020.

Peter

@“Peter_Viscarola_(OSR)” said:
Because you are in the process of getting an Entrust cert, I wanted to be sure you saw the post above about MSFT threatening to revoke the cert of anybody who cross-signs after 1 July 2020.

Yes, thank you for your concern, I appreciate it! I have already noticed that remark earlier, and it is indeed highly unsettling. But we need a new EV certificate in any case; our current one is close to expiring. It doesn’t matter if we get the new certificate from Entrust or any other CA, as long as MS recognizes it for the Dashboard company account. Therefore, we are continuing the process of purchasing. If we’re unable to also use the certificate for cross-signing, like we did before — well, there’s nothing we can do about it…

In that case, I’d go with the cheapest supported EV cert, whixh should be
ANY?

it is indeed highly unsettling

That is nicely said. Yes, exactly.

If we’re unable to also use the certificate for cross-signing, like we did before — well, there’s nothing we can do about it…

Sad, but true.

Well… MSFT new policy saved OSR US$1K (the cost of a 3-year Entrust OV code signing cert). So, that’s something I guess.

Peter