by jzl · 7y ago · 0 comments
Windows and macOS both have a signing infrastructure for apps. The rules of that infrastructure dictate only that apps must have been signed by a valid certificate at the time they were signed. That way old app downloads don't need to be periodically re-signed just to account for expiring certificates. I can download a 5-year-old version of 7zip or whatever and it runs just fine because it was signed with something valid to the timestamp in the signature. The process of distributing desktop apps would be utterly insane if this were not the case.
Not following this model for browser plugins seems unnecessarily cumbersome. Is it really worth requiring all browser plugins to be signed by a currently valid certificate? Is there a document or blog post where this is argued to be more appropriate?
I get that it arguably leads to more stringent security, but I'm not convinced by the delta improvement of that model over the desktop model, given the additional downsides. And the "let everything expire after a few years and resign it" process should not be used as a substitution for revocation. After all, if it were determined retroactively that a malware extension was signed does it really help everyone that it can't be loaded in a year or two, given the damage it could cause right now?
[0] https://bugzilla.mozilla.org/show_bug.cgi?id=1545836
[1] https://tools.ietf.org/html/rfc8152#section-4.5
[2] https://searchfox.org/mozilla-central/rev/b9da45f63cb5672449...
Code signing is a well understood problem with a well known solution, but the blog post discusses everything except the well known solution.
Right now you have a problem caused directly by lack of time stamping, and the article doesn’t even acknowledge that.
That’s not inspiring confidence. I’m genuinely still not sure if they have understood what the actual problem is and how to solve it properly.
They might:
> We’ll be running a formal post-mortem next week and will publish the list of changes we intend to make
The lessons noted down here are just some thoughts by the author of this blog post:
> but in the meantime here are my initial thoughts about what we need to do.
I thought the mention of "ticking time bombs" showed someone is thinking about this properly because end users get the same experience if e.g. a timer gets treated as negative in 2038 or the browser depends on the century field being 20 as they do if an X.509 certificate expires. If you are sure you handled all certs, but you blow up because your GPS epoch wrapped then you still screwed up.
The post did say that they'll "be looking more generally at our add-on security architecture to make sure that it’s enforcing the right security properties at the least risk of breakage". I hope they'll be looking at that point here; if they want to support explicit revocation, there may be other ways to do it which aren't quite so prone to invocation by accident (e.g., publishing a revocation list signed by certs valid at the time of revocation).
I’m not saying they shouldn’t, but it is a significant piece of complexity.
Mozilla already requires uploading even your private extensions to a Mozilla server to be signed for internal or external deployment.
Nope. Actually all CAs that offer code signing certificates are required to provide timestamping service compatible with RFC 3161. These timestamping servers are usually free to use, see for example https://knowledge.digicert.com/generalinformation/INFO4231.h...
Though the way things stand, all CAs have no problem timestamping sigs made with certs that are from other CAs, so perhaps even no explicit agreement is required.
I really don't understand why Mozilla designed their system like they did. Code signing is well known and probably even done for the Windows installer of Firefox, why did they just not duplicate the model? Checking expiration vs current time makes absolutely no sense for code signing, esp. at runtime (it could kind-of sort-of make a little bit of sense at install time, but I'm not really convinced, and maybe it is even not really possible to distinguish between the two with an effective boundary)
Are we worried that someone will steal an old/expired cert and have control over a user's clock?
Without some other verification mechanism, you can't tell the difference between this and an actual signature signed when the key WAS valid
The whole point of a trusted timestamp is that such signature cannot be made for a fraudulent date, otherwise it would be utterly pointless.
This scenario and threat model does not exist if timestamping is correctly implemented.
Let's say you compromise by letting old signatures stay valid, but only for a year. And you rotate the intermediate cert every 90 days.
This system is more secure than the old one, because you only have to worry about key leaks for 15 months, instead of years.
But at the same time, it's impossible to have this giant wave of everything failing at once. Instead the best case is nobody can sign extensions for a couple days, and the worst case is extensions that updated exactly a year ago start to fail in real time.
Or at least more useful than the 'when all you have is a hammer' style applications of blockchains.
As always Blockchains are a good solution only for a tiny group of problems.
Flowchart here: http://philippe.ameline.net/images/ShouldYouUseBlckchn.jpg
Firefox has to deal with malware injecting extensions outside the normal browser process, so I'm not surprised they would default to having periodic re-checks.
Considering Mozilla's certificate failure, Apple's cert failure, and the number of websites I encounter that have forgotten to renew their certificates, it seems like a broken system. Or a really effective form of DRM, I'm not sure which.
You could just as well have certificates that never expire and just start signing with a new one if you feel like it.
Note the Mozilla ‘solution’ has the same problem: their root now authorized a new certificate with the old public key. If the original expectation was that the private key would be safe for a certain number of years (which is why you have expiry dates in the first place) the unsafe private key is now valid again. This defeats the purpose of expiry.
It could just as well been signed today with a fake date.
The traditional option (used by things like Java and ActiveX since the early 2000s) is Trusted Timestamping [1], where a trusted third party provides a signature (such as via RFC 3161 Time Stamp Protocol). AFAIK every certificate authority that sells code-signing certificates also provides a free timestamping server. If you trust a CA to issue code-signing certificates, the theory is you'd trust them to timestamp too.If you don't like having the trusted third party, you can also publish the hash in some write-once medium, such as on the blockchain, in certificate transparency logs, or in the small ads of a reputable newspaper.
This trusted timestamping relies on the same signing things with public and private keys process so it just adds a step, it doesn’t solve the problem. The timestamping key needs to expire as well and then it can’t be trusted anymore.
Admittedly, CAs are held to higher standards than most certificate users in terms of keeping keys in hardware security modules and suchlike. So perhaps it's not 100% unjustified that they get longer validity periods.
With this, the time when code-signed application is executed doesn't matter at all, fake date or not.
In other words you check everytime you use it basically. That is how stolen Microsoft cert stopped.
All old app are checked for validity. It is not as you implied.