Closed Bug 1713628 Opened 4 years ago Closed 4 years ago

Extensions are disabled automatically when the date changes

Categories

(Toolkit :: Add-ons Manager, enhancement, P5)

Firefox 87
enhancement

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox92 --- fixed

People

(Reporter: ubuntu-2020, Assigned: robwu)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0

Steps to reproduce:

Linux.
There are several extensions installed in the browser.
The extensions were installed when the internet was on.
Then we turn off the Internet.
Then we change the date in the operating system. For example, we indicate May 2020.
We launch the browser and work at the computer without the Internet.
After a while, we notice that the browser has disabled all extensions.
The browser apparently decided to do this due to the change in the date of the operating system.
And in order for the extensions to work again, you need to reconnect your computer to the Internet.
And this is very inconvenient.
Please make sure that when you change the date of the operating system, the browser does not disable the extensions.

The Bugbug bot thinks this bug should belong to the 'WebExtensions::Untriaged' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Product: Firefox → WebExtensions

There are multiple security features (not just extensions) that rely on a correctly synchronized clock.

It's not ideal that extensions are disabled when the date is slightly off.

Still, you should not choose a date that is significantly off, because you're probably going to encounter many other broken features.

Component: Untriaged → Add-ons Manager
Product: WebExtensions → Toolkit
See Also: → 1549018

Can you share the output of about:support so we can see which extension versions you're using?

Flags: needinfo?(ubuntu-2020)

It was: Kiwix 3.1.0 and SaveFromNet 9.55.

Flags: needinfo?(ubuntu-2020) → needinfo?(rob)
Severity: -- → N/A
Priority: -- → P5

(In reply to FireFox from comment #4)

It was: Kiwix 3.1.0 and SaveFromNet 9.55.

This extension was published on 13st of December, 2020.

When I try to install the extension (after starting Firefox with faketime '2020-05-01), the callback of the openSignedAppFile task is invoked with aRv being 0x805a3ffb (via the debugger of the Browser Toolbox).
After converting this XPCOM error code to a NSS error code (taking the 16 least significant bits, following the logic of GetXPCOMFromNSSError and nsError.h), it's -(0x805a3ffb & 0xFFFF) = -16379, which maps to MOZILLA_PKIX_ERROR_NOT_YET_VALID_CERTIFICATE (source).

The error code and the reproduction steps suggests that one of the certificates is not yet valid.
The root certificate is valid from 2015 until 2025, so that didn't cause the issue.

The leaf certificate, however, has a validity starting from the date of publishing (13 dec 2020) until ten years later (13 dec 2030).
The certificate was generated by the add-ons signing service, whose source code is in the Autograph repository:

In bug 1267318, code was added to ignore ERROR_EXPIRED_CERTIFICATE, i.e. certificates with a notAfter in the past, at https://searchfox.org/mozilla-central/rev/4163c8f09b03871e053a61f39de020fa09e02ea9/security/apps/AppSignatureVerification.cpp#638
I guess that this specific bug can be resolved by also ignoring certificates with a notBefore in the future, i.e. ERROR_NOT_YET_VALID_CERTIFICATE.

And indeed, after making that change I am able to install the extension.

Flags: needinfo?(rob)
Assignee: nobody → rob
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #9231038 - Attachment description: Bug 1713628 - Treat notBefore in the future as valid → Bug 1713628 - Treat notBefore in the future of signed XPI files as valid
Attachment #9231038 - Attachment description: Bug 1713628 - Treat notBefore in the future of signed XPI files as valid → Bug 1713628 - Treat notBefore in the future of signed XPI files as valid + tests
Pushed by rob@robwu.nl: https://hg.mozilla.org/integration/autoland/rev/04576e8bf14f Treat notBefore in the future of signed XPI files as valid + tests r=keeler
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
Regressions: 1720877
No longer regressions: 1720877
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: