Граф коммитов

16906 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell d45df271ec Bug 1779792 - Part 2: Use an Endpoint to bind the initial actor in child processes, r=ipc-reviewers,necko-reviewers,media-playback-reviewers,mccr8,alwu
This type is also used in other places to start non-initial actors, and will
allow us to attach additional state more easily without needing to thread it
through every child process callsite manually.

Differential Revision: https://phabricator.services.mozilla.com/D153618
2022-08-10 14:55:22 +00:00
Jed Davis 6a37a2ab93 Bug 1778052 - Don't reset ignored signals when starting a sandboxed child process on Linux. r=gcp
We uninstall signal handlers in child processes after clone(), because
they probably won't do the right thing if invoked in that context.
However, the current code also resets signals which were ignored;
if that disposition was set by an outside program like `nohup`, the
expectation is that it should be inherited.  This patch omits those
signals when resetting handlers (similar to what `exec` does).

Differential Revision: https://phabricator.services.mozilla.com/D151336
2022-08-09 00:35:18 +00:00
ffxbld 832ff8bc53 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D153942
2022-08-08 12:57:52 +00:00
ffxbld 9ed83283ae No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D153744
2022-08-04 13:43:03 +00:00
Fabrice Desré c50cb528fc Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 16:39:41 +00:00
Andreea Pavel 3ccd75af8d Backed out changeset b9d2965591b9 (bug 1761040) for landing with wrong author CLOSED TREE DONTBUILD 2022-08-03 18:55:00 +03:00
Andreea Pavel fdb7cb2ecd Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 15:27:43 +00:00
Mark Banner 7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Dennis Jackson 7ac4427e01 Bug 1781075 - Add test cases for ECH connections with incorrect ALPN advertisements. r=necko-reviewers,kershaw
These tests set up an ECH server which will only negotiate http/1.1 in the TLS ALPN extension.
If the client doesn't send an ALPN offering at least http/1.1 the connection will fail with
SSL_ERROR_NEXT_PROTOCOL_NO_PROTOCOL.

Differential Revision: https://phabricator.services.mozilla.com/D153368
2022-08-02 19:59:22 +00:00
Andreea Pavel 89d63c91e6 Backed out changeset a907159a482f (bug 1761040) for causing build bustages on a CLOSED TREE 2022-08-02 04:59:08 +03:00
Fabrice Desré 0f4ac7ad97 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-02 00:49:41 +00:00
ffxbld 1d8c226620 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D153373
2022-08-01 16:51:54 +00:00
Nika Layzell c15823d075 Bug 1772006 - Part 5: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-07-30 00:12:48 +00:00
Nika Layzell 997047e2a4 Bug 1772006 - Part 4: Simplify and move the string comparison APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,dragana,barret
This patch moves EqualsIgnoreCase to ns[T]StringObsolete, and removes
the aCount argument, instead migrating callers to use `StringBeginsWith`
with a case-insensitive comparator.

In addition, nsTStringRepr::Compare was removed and replaced with either
calls to methods like `StringBeginsWith` or the global `Compare` method.

These changes required some modifications at call-sites but should make
the behaviour less surprising and more consistent.

Differential Revision: https://phabricator.services.mozilla.com/D148299
2022-07-30 00:12:48 +00:00
Dana Keeler 12ac90f435 Bug 1781466 - gather telemetry for PSM UI elements slated for removal r=djackson
Depends on D152942

Differential Revision: https://phabricator.services.mozilla.com/D152943
2022-07-28 20:04:31 +00:00
Dana Keeler 5a8efd3f8c Bug 1781466 - remove obsolete exception dialog telemetry r=djackson
Differential Revision: https://phabricator.services.mozilla.com/D152942
2022-07-28 20:04:31 +00:00
ffxbld f6e48e8f08 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D153075
2022-07-28 12:41:48 +00:00
Jed Davis 4552fc73a3 Bug 1779312 - Replace uses of strerror in Linux sandbox code. r=glandium
`strerror` is async signal unsafe, and we're using it in contexts where
that's a problem: in particular in the child process after `clone()`ing,
where it can deadlock if it takes locks the parents' other threads had
held (or cause other undefined behavior), but also in the SIGSYS handler
if it's nested inside an async signal.  It's also thread-unsafe.

This is mostly a mechanical replacement with the new `SANDBOX_LOG_ERRNO`
or `SANDBOX_LOG_WITH_ERROR`; two messages had the error string in the
middle and have been adjusted.

Differential Revision: https://phabricator.services.mozilla.com/D152099
2022-07-27 19:41:05 +00:00
Jed Davis 05621d57dc Bug 1779312 - Add macros for Linux sandbox logging with an error code. r=glandium
This adds two new logging macros, which are intended to be async signal
safe:

* `SANDBOX_LOG_ERRNO`, which appends the error similarly to `perror` but
   uses the error identifier (e.g., `EINVAL` instead of `Invalid argument`).
   Unlike `perror`, formatting directives are available as for `SANDBOX_LOG`.

* `SANDBOX_LOG_WITH_ERROR` is the same thing but the error number is the
  first argument instead of using `errno`; this is useful for newer POSIX
  APIs which return an error number.

This will be used in the next patch to replace the existing use of
`strerror`, which is not async signal safe (or thread-safe).

Differential Revision: https://phabricator.services.mozilla.com/D152098
2022-07-27 19:41:05 +00:00
Jed Davis fd918ffb96 Bug 1779312 - Rename `SANDBOX_LOG_ERROR` to just `SANDBOX_LOG`. r=glandium
Originally this was written for B2G and used the Android logging
facility, which (like syslog) includes a severity level.  However, all
current usage is on desktop where we just write to stderr, and there was
never much demand to add support for any log levels besides "error".

More importantly for the current situation, renaming the macro to
`SANDBOX_LOG` avoids confusion between `SANDBOX_LOG_ERROR` and
`SANDBOX_LOG_ERRNO` (or `SANDBOX_LOG_ERROR_ERRNO` or whatever).

Differential Revision: https://phabricator.services.mozilla.com/D152097
2022-07-27 19:41:04 +00:00
Jed Davis 4fb97a1c3d Bug 1779312 - Preliminary fixes to some misuses of SANDBOX_LOG_ERROR. r=glandium
Two minor things I noticed while converting the existing sandbox logging:

1. One call site was using %u, but that doesn't exist in this printf
   dialect, only %d; signedness is determined by the actual argument
   type via template magic.

2. POSIX functions that return an error number just return the number;
   there was one place that was negating it before use, as if it had
   come from the Linux syscall ABI.

Differential Revision: https://phabricator.services.mozilla.com/D152096
2022-07-27 19:41:04 +00:00
Tooru Fujisawa a032f53a63 Bug 1780543 - Part 5: Add mozilla/chrome-script environment. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D152430
2022-07-26 02:46:30 +00:00
Emilio Cobos Álvarez 42b7f1a58c Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana
This prevents copies and avoids the hack we have to avoid this, which
right now is using nsDependent{C,}String.

Non-virtual actors can still use `nsString` if they need to on the
receiving end.

Differential Revision: https://phabricator.services.mozilla.com/D152519
2022-07-25 20:19:48 +00:00
ffxbld 6506fc7cf1 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D152635
2022-07-25 13:16:50 +00:00
Alexandre Lissy 9c3474ae19 Bug 1775263 - Block cyinjct.dll from being injected in Utility r=haik,handyman
Differential Revision: https://phabricator.services.mozilla.com/D150595
2022-07-22 13:47:58 +00:00
Dana Keeler 30b914478f Bug 1779973 - treat failure to parse certificate validity as a time error r=djackson
Differential Revision: https://phabricator.services.mozilla.com/D152333
2022-07-21 23:51:01 +00:00
Dennis Jackson 3bde9bff24 Bug 1779398 - land NSS NSS_3_81_RTM UPGRADE_NSS_RELEASE, r=nss-reviewers,nkulatova DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D152398
2022-07-21 13:50:49 +00:00
Dennis Jackson 7a55bf9c23 Bug 1780014: Add specific telemetry for conservative and first-try handshakes. r=keeler.
This patch adds two new telemetry histograms which collect specific types
of TLS handshake seperately from existing handshakes.
 - The conservative histogram tracks handshakes used for essential connections (e.g. update checks)
 - The first-try histogram tracks all initial connection attempts. This allows us to identify issues that might otherwise be masked by our retry logic.

A single handshake may belong to more than one histogram. All handshakes belong to the root histogram.
As the histogram buckets are aligned, it is possible to derive new histograms from these stored results.
For example, as ECH GREASE is only used on first-try handshakes, the histogram from non-GREASE first-try
handshakes can be calculated by subtracting the entries in the GREASE histogram from the first-try histogram.

This patch also extends the existing handshake necko tests to verify that the telemetry is recorded correctly.
Telemetry checks don't run if networking is running on the socket process as the histograms are no longer
accessible.

Differential Revision: https://phabricator.services.mozilla.com/D150754
2022-07-21 11:02:32 +00:00
Dana Keeler 43dc5f66a3 Bug 1779848 - don't assert if mFd is null in nsNSSSocketInfo::ClientAuthCertificateSelected r=ckerschb
If nsNSSSocketInfo::mFd is nullptr, it means the connection has been closed.
This isn't an error, and ClientAuthCertificateSelected shouldn't assert if this
happens.

Differential Revision: https://phabricator.services.mozilla.com/D151962
2022-07-19 23:12:21 +00:00
Dana Keeler 270df11f4c Bug 1770269 - Enable EV Treatment for E-Tugra v3 Global root certificates r=rmf
Differential Revision: https://phabricator.services.mozilla.com/D151749
2022-07-19 22:16:34 +00:00
Dana Keeler 2985f72f3a Bug 1764397 - Enable EV Treatment for Digicert G5 root certificates r=rmf
Differential Revision: https://phabricator.services.mozilla.com/D151748
2022-07-19 22:16:33 +00:00
Anna Weine c37b09ca3b Bug 1779398 - land NSS 164849c15197 UPGRADE_NSS_RELEASE, r=nss-reviewers,djackson
2022-07-18  Kai Engert  <kaie@kuix.de>

	* lib/certhigh/certvfy.c:
	Bug 1777672 - Gracefully handle null nickname in
	CERT_GetCertNicknameWithValidity. r=rrelyea

	[164849c15197] [tip]

Differential Revision: https://phabricator.services.mozilla.com/D152169
2022-07-19 12:49:20 +00:00
ffxbld 5c3ca70147 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D152019
2022-07-18 13:01:12 +00:00
Haik Aftandilian a064a6ac2d Bug 1779816 - Don't specify entitlements that use the default setting of false r=mac-reviewers,bradwerth
Cleanup our entitlement files by removing entitlements that use the default setting of false.

production.entitlements.xml and developer.entitlements.xml are used today.

The browser and plugin-container entitlement lists will be used when we enable using different entitlements for parent and child processes.

Differential Revision: https://phabricator.services.mozilla.com/D151943
2022-07-15 19:30:47 +00:00
Andi-Bogdan Postelnicu bbf960e82c Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
Updated with rustfmt 1.4.38-stable (a8314ef 2022-06-27)
# ignore-this-changeset

Depends on D151908

Differential Revision: https://phabricator.services.mozilla.com/D151909
2022-07-15 09:37:22 +00:00
Kagami Sascha Rosylight bb679fa417 Bug 1769290 - Part 24: Apply mozilla-js-handle-rooted-typedef against layout,security,storage,tools r=andi
Differential Revision: https://phabricator.services.mozilla.com/D151791
2022-07-14 17:00:24 +00:00
ffxbld 643780ce3b No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D151817
2022-07-14 11:59:52 +00:00
Dennis Jackson 7246d5248d Bug 1779398 - land NSS cafb891ea6ce UPGRADE_NSS_RELEASE, r=nss-reviewers,bbeurdouche
Differential Revision: https://phabricator.services.mozilla.com/D151714
2022-07-13 17:29:07 +00:00
Tooru Fujisawa 54623364da Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Barret Rennie 305b4cd077 Bug 1772941 - Port osfile.jsm usage to IOUtils in toolkit/content/ r=florian,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D149303
2022-07-12 00:25:35 +00:00
Andreea Pavel 7738a75fdd Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa 8cd6ed7409 Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +00:00
ffxbld a57d022de1 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D151486
2022-07-11 13:12:23 +00:00
Tooru Fujisawa 52c95734e7 Bug 1667455 - Part 9: Stop importing Services.jsm from chrome-priv HTML code, single-line cases. r=kmag,necko-reviewers,geckoview-reviewers,extension-reviewers,m_kato,dragana
Differential Revision: https://phabricator.services.mozilla.com/D150898
2022-07-11 12:41:52 +00:00
Tooru Fujisawa 47c8f80432 Bug 1667455 - Part 6: Stop importing Services.jsm from chrome-priv JS code, non-top-level or multi-line cases. r=kmag,perftest-reviewers,AlexandruIonescu,sparky
Differential Revision: https://phabricator.services.mozilla.com/D150895
2022-07-11 12:41:51 +00:00
Tooru Fujisawa bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Tooru Fujisawa f3a8c52c53 Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D150893
2022-07-11 12:41:50 +00:00
ffxbld 7863aace6c No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D151241
2022-07-07 14:24:35 +00:00
Dana Keeler f957a0175b Bug 1749884 - remove expired client auth cert telemetry and add new permanent telemetry r=rmf
Differential Revision: https://phabricator.services.mozilla.com/D150819
2022-07-06 18:32:43 +00:00
Dana Keeler dc4ce8d406 Bug 1777366 - remove unused `source` and `cached` parameters from nsISiteSecurityService APIs r=rmf,necko-reviewers,kershaw
These parameters are no longer used and can be removed, along with the expired
telemetry HSTS_UPGRADE_SOURCE.

Differential Revision: https://phabricator.services.mozilla.com/D150786
2022-07-05 18:33:18 +00:00
Csoregi Natalia 7e2a20405f Backed out changeset 6c542cd8d622 for causing devtools compat issues. CLOSED TREE 2022-07-04 19:39:21 +03:00
ffxbld 8592d3250f No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D150961
2022-07-04 13:49:30 +00:00
Dana Keeler 46abba10d9 Bug 1774579 - certificate manager: update leftover loadCerts call from bug 1682412 r=rmf
In bug 1682412, loadCerts was removed from nsICertTree. At the time, the
certificate manager still had one use of it that should have been updated to
loadCertsFromCache. This patch makes that update.

Differential Revision: https://phabricator.services.mozilla.com/D150503
2022-06-30 15:41:25 +00:00
ffxbld d0985bd3cc No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D150742
2022-06-30 14:25:21 +00:00
Mark Banner 05e3f1ea83 Bug 1646183 - Extend ESLint rule reject-importGlobalProperties to also handle defineLazyGlobalGetters. r=arai,webdriver-reviewers,webcompat-reviewers,extension-reviewers,whimboo,twisniewski,kmag
Differential Revision: https://phabricator.services.mozilla.com/D150353
2022-06-29 22:37:57 +00:00
Dana Keeler a998171379 Bug 696976 - asynchronously handle client auth certificate requests from TLS servers r=necko-reviewers,ipc-reviewers,nika,kershaw,rmf
Differential Revision: https://phabricator.services.mozilla.com/D146367
2022-06-29 16:29:28 +00:00
Dana Keeler 695084d3a9 Bug 696976 - move TLS client auth certificate selection implementation to its own file r=necko-reviewers,kershaw,jschanck
Differential Revision: https://phabricator.services.mozilla.com/D146366
2022-06-29 16:29:28 +00:00
ffxbld 3ec2694a72 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D150368
2022-06-27 13:04:52 +00:00
Barret Rennie 6c348edd96 Bug 1776442 - Ensure NSS is initialized before instantiating nsCryptoHash r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D150256
2022-06-24 18:42:27 +00:00
John Schanck 208e054844 Bug 1773966 - land NSS NSS_3_80_RTM UPGRADE_NSS_RELEASE, r=bbeurdouche,nss-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D150161
2022-06-23 18:47:59 +00:00
ffxbld 042ea8b035 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D150103
2022-06-23 13:40:12 +00:00
Andi-Bogdan Postelnicu a933f9df8f Bug 1519636 - Reformat recent changes to the Google coding style. r=marco
Updated with clang-format version 14.0.5 (taskcluster-YlgDNB2QSm-6a2LDw3kj6A)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D150093
2022-06-23 09:27:12 +00:00
Jed Davis 6558ec1572 Bug 1771382 - Adjust the Linux RDD sandbox to handle the nvidia driver being loaded but not used. r=gcp
On multi-GPU systems, even though the GPU we're going to use for
accelerated video decoding is driven by Mesa, sometimes the nvidia
proprietary driver can be loaded and attempt to probe devices.  This
patch attempts to make the sandbox policy quietly return errors for
those syscalls, instead of treating them as unexpected (and crashing on
Nightly).

Differential Revision: https://phabricator.services.mozilla.com/D149652
2022-06-23 00:00:54 +00:00
Joel Maher 5b2dd6dd56 Bug 1769154 - Run some xpcshell tests with a conditioned profile. r=aryx,extension-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D149937
2022-06-22 16:47:06 +00:00
Bogdan Szekely e43c058bda Backed out changeset 7b707ff8a7d1 (bug 1769154) for causing xpcshell failures on test_system_upgrades.js 2022-06-22 17:17:10 +03:00
Joel Maher 0f3990e1cb Bug 1769154 - Run some xpcshell tests with a conditioned profile. r=aryx,extension-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D149937
2022-06-22 13:03:46 +00:00
serge-sans-paille b122b6d13d Bug 1774865 - extra cleanup mozglue, security, intl and netwerk includes r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D149670
2022-06-22 09:51:52 +00:00
Barret Rennie 1a02416780 Bug 1773182 - Add NS_NewCryptoHash helper r=xpcom-reviewers,kmag,nika
Differential Revision: https://phabricator.services.mozilla.com/D148965
2022-06-20 13:57:29 +00:00
ffxbld 9d2837b25e No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D149736
2022-06-20 12:16:01 +00:00
Mike Hommey df77ed0752 Bug 1774501 - Update to env_logger 0.9 in various in-tree crates. r=nbp,keeler,xpcom-reviewers,rhunt,nika
Differential Revision: https://phabricator.services.mozilla.com/D149453
2022-06-16 20:44:03 +00:00
Chris Martin 190ac22f48 Bug 1770098 - Disable Win32k Lockdown with incompatible mitigations r=handyman,Gankra
Differential Revision: https://phabricator.services.mozilla.com/D148962
2022-06-16 14:05:00 +00:00
ffxbld 5d65102622 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D149507
2022-06-16 12:12:32 +00:00
Tooru Fujisawa 5e0731b2a4 Bug 1608282 - Part 4: Remove Cu.defineLazyGlobalGetters from JSM. r=webdriver-reviewers,extension-reviewers,jdescottes,kmag
Depends on D149196

Differential Revision: https://phabricator.services.mozilla.com/D149197
2022-06-16 00:19:54 +00:00
Butkovits Atila 8218713aac Backed out 4 changesets (bug 1608282) for causing hazard failures. CLOSED TREE
Backed out changeset 32aebc8be201 (bug 1608282)
Backed out changeset 37c970364269 (bug 1608282)
Backed out changeset ced8d82cc2d2 (bug 1608282)
Backed out changeset e26e480c7dd6 (bug 1608282)
2022-06-16 03:10:02 +03:00
Jed Davis c807158580 Bug 1770905 - Allow GeckoMediaPlugin processes on Linux to be profiled if memfd_create is available. r=gcp,mstange,media-playback-reviewers,padenot
There are two parts to this patch; both affect only Linux:

1. The GMP sandbox policy is adjusted to allow certain syscalls used in
   shared memory creation (ftruncate and fallocate).  However, the file
   broker is not used; the process still has no access to files in /dev/shm.

2. The profiler is not initialized for GMP processes unless memfd_create
   is available (so the process can create shared memory to send
   profiling data back, without filesystem access), or the GMP sandbox
   is disabled (either at runtime or build time).

As of this patch, profiling GMP processes on Linux should succeed on
distros with kernel >=3.17 (Oct. 2014), but native stack frames won't
have symbols (and may be incorrectly unwound, not that it matters much
without symbols); see the bug for more info.  Pseudo-stack frames and
markers should work, however.

Differential Revision: https://phabricator.services.mozilla.com/D148470
2022-06-15 20:55:24 +00:00
Jed Davis c4d1df3cf7 Bug 1770905 - Quietly reject `readlink` in the Linux GeckoMediaPlugin sandbox. r=gcp
The profiler may try to readlink `/proc/self/exe` to determine the
executable name; currently, its attempt to get information about loaded
objects is broken for other reasons, so this isn't helpful.  Thus, this
patch has it fail with `EINVAL` (meaning "not a symbolic link) instead of
being treated as unexpected.

(In the future, if we need to, we could simulate that syscall by
recording the target of `/proc/self/exe` before sandboxing, and
recognizing that specific case in a trap function.)

Differential Revision: https://phabricator.services.mozilla.com/D148469
2022-06-15 20:55:23 +00:00
Tooru Fujisawa 8b8d6b141a Bug 1608282 - Part 4: Remove Cu.defineLazyGlobalGetters from JSM. r=webdriver-reviewers,extension-reviewers,jdescottes,kmag
Depends on D149196

Differential Revision: https://phabricator.services.mozilla.com/D149197
2022-06-15 20:34:35 +00:00
Dana Keeler aa7979464f Bug 1769150 - try all known EV policy OIDs found in a certificate when verifying for EV r=jschanck
Before this patch, the certificate verifier would only attempt to build a
trusted path to a root with the first recognized EV OID in the end-entity
certificate. Thus, if an end-entity certificate had more than one EV OID, it
could fail to verify as EV if an intermediate or root had the "wrong" EV OID.
This patch addresses this shortcoming by trying to build a path with each
recognized EV OID in the end-entity certificate until it finds one that works.

Differential Revision: https://phabricator.services.mozilla.com/D149319
2022-06-15 18:20:13 +00:00
Dana Keeler f0803728d4 Bug 1772976 - make non-private certificate error overrides available in private contexts r=jschanck
Certificate error overrides made in non-private contexts should be availble in
private contexts as well (but not vice-versa).

Differential Revision: https://phabricator.services.mozilla.com/D149296
2022-06-15 18:02:36 +00:00
Barret Rennie 3f5dc34b19 Bug 1774204 - Add SHA-384 and SHA-512 support to Digest r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D149281
2022-06-14 20:08:45 +00:00
Dennis Jackson 549b3f9615 Bug 1773966 - land NSS tip UPGRADE_NSS_RELEASE, r=nss-reviewers,nkulatova
Differential Revision: https://phabricator.services.mozilla.com/D149276
2022-06-14 15:47:17 +00:00
Dennis Jackson a22ec26448 Bug 1771479 - Fix ECH GREASE Telemetry. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D149212
2022-06-14 09:59:37 +00:00
Dana Keeler c9fe82eb09 Bug 1773370 - PSM changes for macOS SDK update r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D148850
2022-06-13 20:29:48 +00:00
ffxbld d7e147a70e No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D149134
2022-06-13 14:06:30 +00:00
Dennis Jackson 9f93e47cfa Bug 1771479 - Add histograms for SSL_HANDSHAKE_RESULT and SSL_TIME_UNTIL_READY for connections using ECH. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D147498
2022-06-13 11:29:41 +00:00
Dennis Jackson 1c8c0c17ed oBug 1770907 - Disable ECH GREASE when retrying connections. r=dragana,keeler,necko-reviewers
Add a preference for whether to remove ECH GREASE extensions when retrying a connection. This repurposes the  flag which was previously present but not actually functional.

Differential Revision: https://phabricator.services.mozilla.com/D147191
2022-06-13 11:29:41 +00:00
Dennis Jackson 8948a1a9a2 Bug 1767974 - Add preferences for ECH GREASE Mode. r=keeler,dragana
Differential Revision: https://phabricator.services.mozilla.com/D145608
2022-06-13 11:29:41 +00:00
criss c6b2c5db61 Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE
Backed out changeset f17c7565707b (bug 1772006)
Backed out changeset c725fe1f5882 (bug 1772006)
Backed out changeset d19663161261 (bug 1772006)
Backed out changeset b6611ab002d9 (bug 1772006)
Backed out changeset 790f42b64af9 (bug 1772006)
Backed out changeset 79a734b4e4d9 (bug 1772006)
Backed out changeset 42730aae16ea (bug 1772006)
Backed out changeset b2542aef3054 (bug 1772006)
Backed out changeset 962bfea4a309 (bug 1772006)
2022-06-11 01:13:42 +03:00
Nika Layzell b3c13bf114 Bug 1772006 - Part 6: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-06-10 21:12:08 +00:00
Tooru Fujisawa ca262b23ce Bug 1773174 - Part 1: Use .jsm extension for JSMs in toolkit/components/certviewer/. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D148596
2022-06-10 19:21:05 +00:00
Jed Davis 09be260cd3 Bug 1772142 - Fix the RDD sandbox to deal with Snap moving some config files. r=gcp
In the Snap environment, some system config files aren't in their usual
places, but rather in a subtree rooted at `$SNAP/gnome-platform`,
which seems to also be `$SNAP_DESKTOP_RUNTIME`.  This includes some
subdirectories of `/usr/share` that we need for EGL to work.

This could probably also have been fixed in the Snap packaging, given
that [Mozilla's][] and [Ubuntu's][] specs both put `/usr/share/libdrm`
back into its normal location, but for now it's easiest to adjust
the sandbox, given that (I think?) anything under `$SNAP` is public
information so we lose nothing by allowing read access.  (See also bug
1732580.)

[Mozilla's]: https://searchfox.org/mozilla-central/rev/973000acec0cbf7211e0fad89ca00c352aeb8384/taskcluster/docker/firefox-snap/firefox.snapcraft.yaml.in#50-52
[Ubuntu's]: https://git.launchpad.net/~mozilla-snaps/firefox-snap/+git/firefox-snap/tree/snapcraft.yaml?id=a24fb4a3f92d190299e4126ecc4132087c2aed3d#n85

Differential Revision: https://phabricator.services.mozilla.com/D148925
2022-06-10 19:03:55 +00:00
John Schanck 0c18bdf797 Bug 1773371 - Enforce CRLite revoked status when OCSP confirmation fails. r=keeler
This changes the behavior of CRLite when configured in `ConfirmRevocations`
mode (the default mode on nightly and early beta). Under the new definition,
ConfirmRevocations mode fails closed when OCSP fails open. In particular, a
certificate will be marked as "Revoked" in the following scenarios:
  - CRLite returns "Revoked" and the certificate does not list an OCSP URL,
  - CRLite returns "Revoked" and the OCSP responder is unreachable,
  - CRLite returns "Revoked" and the OCSP responder returns an error.

Differential Revision: https://phabricator.services.mozilla.com/D148686
2022-06-10 16:31:39 +00:00
Iulian Moraru 4cd2cbcfa4 Backed out 3 changesets (bug 1767974, bug 1771479) for causing xpcshell failures on test_httpssvc_retry_with_ech.js. CLOSED TREE
Backed out changeset 9bcda147affa (bug 1771479)
Backed out changeset 4455b5bf1282
Backed out changeset f973baf1403a (bug 1767974)
2022-06-10 16:58:28 +03:00
Dennis Jackson 65e3bc3f2a Bug 1771479 - Add histograms for SSL_HANDSHAKE_RESULT and SSL_TIME_UNTIL_READY for connections using ECH. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D147498
2022-06-10 11:10:28 +00:00
Dennis Jackson 55801f5de7 oBug 1770907 - Disable ECH GREASE when retrying connections. r=dragana,keeler,necko-reviewers
Add a preference for whether to remove ECH GREASE extensions when retrying a connection. This repurposes the  flag which was previously present but not actually functional.

Differential Revision: https://phabricator.services.mozilla.com/D147191
2022-06-10 11:10:27 +00:00
Dennis Jackson bb920d016d Bug 1767974 - Add preferences for ECH GREASE Mode. r=keeler,dragana
Differential Revision: https://phabricator.services.mozilla.com/D145608
2022-06-10 11:10:27 +00:00
Sylvestre Ledru b848a697dc Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio,extension-reviewers,willdurand
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D148376
2022-06-10 09:21:45 +00:00
ffxbld b7aed3fa69 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D148769
2022-06-09 12:00:37 +00:00
Alexandre Lissy b1026facbf Bug 1772053 - Enable dynamic code disable mitigations only on Windows 10 1703+ r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D148502
2022-06-07 16:26:44 +00:00
Sylvestre Ledru 42f6811d95 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,media-playback-reviewers,necko-reviewers,padenot,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D148375
2022-06-07 12:32:55 +00:00
Haik Aftandilian 94ba599969 Bug 1562756 - Code Injection in Firefox macOS desktop r=spohl
Drop the com.apple.security.cs.allow-dyld-environment-variables entitlement to disallow use of dyld environment variables in signed production builds.

Leave the entitlement in for signed developer builds.

Firefox gtests depend on the use of DYLD_LIBRARY_PATH. However, testing infrastructure does not run gtests on signed builds and therefore gtests are not impacted by this change. gtests could be run on signed developer builds in the future which will still allow dyld environment variables after this change.

browser.production.entitlements.xml and plugin-container.production.entitlements.xml are not used, but being kept up to date.

Differential Revision: https://phabricator.services.mozilla.com/D148324
2022-06-06 16:42:02 +00:00
Dennis Jackson e43e8f1bee Bug 1771523 - Add telemetry probe for app signature verification outcomes. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D147530
2022-06-06 13:08:01 +00:00
ffxbld 6e462c9969 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D148384
2022-06-06 13:05:41 +00:00
Dana Keeler 658b880816 Bug 1769669 - require specifying the trusted root in content signature verifier r=jschanck,leplatrem,robwu,barret
Before this patch, the content signature verifier
(nsIContentSignatureVerifier/ContentSignatureVerifier) would identify the root
it trusted based on the value of a preference. This patch changes the
implementation to require a specified hard-coded root to trust as with add-on
signature verification.

Depends on D146644

Differential Revision: https://phabricator.services.mozilla.com/D146645
2022-06-03 23:26:28 +00:00
Dana Keeler 872a9fafe8 Bug 1769669 - move app signature verification to security/manager/ssl/ r=jschanck
Before this patch, the app signature verification code lived in security/apps/.
The majority of the rest of PSM is in security/manager/ssl/ and there's little
reason to have that extra directory for the app signature verification
implementation alone.

Differential Revision: https://phabricator.services.mozilla.com/D146644
2022-06-03 23:26:28 +00:00
ffxbld 0dddb4f86b No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D148111
2022-06-02 12:07:31 +00:00
Dana Keeler 9e12ff8e96 Bug 1770869 - remove nsISSLSocketControl.clientCert r=jschanck,necko-reviewers,kershaw
This field isn't used any longer and removing it will make future changes
eaiser.

Differential Revision: https://phabricator.services.mozilla.com/D147227
2022-06-01 23:20:58 +00:00
Dana Keeler 82c73ec75d Bug 1770869 - remove nsILocalCertService and implementation r=necko-reviewers,jschanck,pbz,kershaw
nsILocalCertService was used in FlyWeb, which was removed in Firefox 59 in bug
1374574.

Depends on D147121

Differential Revision: https://phabricator.services.mozilla.com/D147122
2022-06-01 23:20:58 +00:00
Butkovits Atila 2b78c018fd Backed out 3 changesets (bug 1770869) for causing xpcshell failures at test_tls_server.js. CLOSED TREE
Backed out changeset 5c95392b800d (bug 1770869)
Backed out changeset 149d04a209b6 (bug 1770869)
Backed out changeset 5a138d047be1 (bug 1770869)
2022-06-02 00:18:26 +03:00
Dana Keeler 39015f9d16 Bug 1770869 - remove nsISSLSocketControl.clientCert r=jschanck,necko-reviewers,kershaw
This field isn't used any longer and removing it will make future changes
eaiser.

Differential Revision: https://phabricator.services.mozilla.com/D147227
2022-06-01 20:00:57 +00:00
Dana Keeler 0f6879c125 Bug 1770869 - remove nsILocalCertService and implementation r=necko-reviewers,jschanck,pbz,kershaw
nsILocalCertService was used in FlyWeb, which was removed in Firefox 59 in bug
1374574.

Depends on D147121

Differential Revision: https://phabricator.services.mozilla.com/D147122
2022-06-01 20:00:57 +00:00
Tooru Fujisawa 425605e054 Bug 1772106 - Use plain object for lazy getter in security/manager/ssl/. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D147889
2022-06-01 17:27:12 +00:00
Dana Keeler 3945602079 Bug 1766687 - remove support for SHA1 signatures in all certificates (including imported roots) r=jschanck
Previously [0], support for SHA1 signatures in certificates was disabled by
default, except for certificates issued by imported roots. Chrome had a similar
policy, but this was removed in 71 [1]. Telemetry [2] indicates that some users
do still encounter SHA1 signatures at a fraction of the rate of overall
certificate errors, so forbidding all SHA1 signatures should have minimal
compatibility impact.

[0] https://bugzilla.mozilla.org/show_bug.cgi?id=1302140
[1] https://chromeenterprise.google/policies/#EnableSha1ForLocalAnchors
[2] https://mzl.la/3kg5J4j

Differential Revision: https://phabricator.services.mozilla.com/D144870
2022-06-01 17:01:56 +00:00
Jed Davis b1826e7b68 Bug 1770523 - Return to not allowing X11 access in the RDD process. r=gcp
The patch for bug 1769499 lets the RDD process create a headless EGL
context using GBM, which needs access only to the GPU device files, not
the display server.  This means that the X11 access recently added in
bug 1769182 can be turned back off.

Differential Revision: https://phabricator.services.mozilla.com/D147792
2022-06-01 16:42:53 +00:00
Noemi Erli aca984c8a8 Backed out changeset 8ef044a6a1fe (bug 1766687) for causing bustage in NSSCertDBTrustDomain.cpp 2022-06-01 02:35:17 +03:00
Dana Keeler 527bfba679 Bug 1766687 - remove support for SHA1 signatures in all certificates (including imported roots) r=jschanck
Previously [0], support for SHA1 signatures in certificates was disabled by
default, except for certificates issued by imported roots. Chrome had a similar
policy, but this was removed in 71 [1]. Telemetry [2] indicates that some users
do still encounter SHA1 signatures at a fraction of the rate of overall
certificate errors, so forbidding all SHA1 signatures should have minimal
compatibility impact.

[0] https://bugzilla.mozilla.org/show_bug.cgi?id=1302140
[1] https://chromeenterprise.google/policies/#EnableSha1ForLocalAnchors
[2] https://mzl.la/3kg5J4j

Differential Revision: https://phabricator.services.mozilla.com/D144870
2022-05-31 20:24:33 +00:00
Mike Hommey 4d1c26ec5d Bug 1770894 - Update cert_storage to base64 0.13. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D147254
2022-05-30 21:37:35 +00:00
ffxbld cc2bc83283 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D147641
2022-05-30 12:51:23 +00:00
Dennis Jackson a6eafd8ee6 Bug 1767934 - land NSS NSS_3_79_RTM UPGRADE_NSS_RELEASE, r=nss-reviewers,jschanck DONTBUILD
2022-05-26  Dennis Jackson  <djackson@mozilla.com>

	* lib/nss/nss.h, lib/softoken/softkver.h, lib/util/nssutil.h:
	Set version numbers to 3.79 final
	[3463596523be] [NSS_3_79_RTM] <NSS_3_79_BRANCH>

2022-05-20  Dennis Jackson  <djackson@mozilla.com>

	* .hgtags:
	Added tag NSS_3_79_BETA2 for changeset 82f9862369bd
	[5498a0531d73] <NSS_3_79_BRANCH>

Differential Revision: https://phabricator.services.mozilla.com/D147412
2022-05-27 20:28:25 +00:00
ffxbld 2d77e262c4 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D147417
2022-05-26 12:05:17 +00:00
John Schanck 9fee1bf9c5 Bug 1769627 - switch to SECMOD_LockedModuleHasRemovableSlots. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D147095
2022-05-23 20:49:51 +00:00
Iulian Moraru ecc26bffac Backed out changeset 93af3b1d56ef (bug 1769627) for causing build bustages on xul.dll. CLOSED TREE 2022-05-23 21:09:40 +03:00
John Schanck 7a3c36ef2f Bug 1769627 - switch to SECMOD_LockedModuleHasRemovableSlots. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D147095
2022-05-23 17:50:39 +00:00
Mathieu Leplatre caf000e948 Bug 1702759 - Remove bucket name preference r=robwu
This introduces a breaking change: the buckets cannot be changed via preferences anymore.

Before landing this patch, we should have a released a new version of the Remote Settings DevTools that is compatible with this new API.

Differential Revision: https://phabricator.services.mozilla.com/D145455
2022-05-23 16:24:57 +00:00
Mathieu Leplatre c66b8b3bfc Bug 1702759 - Remove custom last check preference r=gbeckley
The ability to customize this preference name has very little value. We introduced this feature when we refactored our ad-hoc Kinto clients into a single RemoteSetting client.

Renaming this preference means that the DevTools will display an empty field until settings are resynced.

Differential Revision: https://phabricator.services.mozilla.com/D145454
2022-05-23 16:24:57 +00:00
Mathieu Leplatre f07763259c Bug 1702759 - Remove collection and signer preferences r=gbeckley
These preferences were cargo culted from our initial prototypes, and users should not be able to change them

Differential Revision: https://phabricator.services.mozilla.com/D145453
2022-05-23 16:24:56 +00:00
ffxbld 478176c97b No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D147079
2022-05-23 11:43:45 +00:00
Alexandre Lissy 0d2e553991 Bug 1770703 - Duplicated ioctl() case when building with MOZ_ASAN r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D147057
2022-05-23 09:51:28 +00:00
Bob Owen 45b8231a42 Bug 1769845 p2: Back out changeset 6afde8456771. r=handyman
This transferred sandbox mitigations directly into child process memory, which
may have caused issues with some security software.

Depends on D146930

Differential Revision: https://phabricator.services.mozilla.com/D146931
2022-05-23 07:53:41 +00:00
Bob Owen b48aea26d9 Bug 1769845 p1: Use command line to pass whether win32k is locked down in policy. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D146930
2022-05-23 07:53:41 +00:00
Alexandre Lissy 74b64ad41e Bug 1769616 - Error(ENOSYS) for set_mempolicy() on Content and Utility AudioDecoder r=jld
Differential Revision: https://phabricator.services.mozilla.com/D146833
2022-05-21 00:01:28 +00:00
Dennis Jackson 25a557ba16 Bug 1767934 - land NSS NSS_3_79_BETA2 UPGRADE_NSS_RELEASE, r=nss-reviewers,jschanck
Differential Revision: https://phabricator.services.mozilla.com/D146927
2022-05-20 23:12:52 +00:00
Anna Weine f5864cbd70 Bug 1767934 - land NSS 2efccbd85918 UPGRADE_NSS_RELEASE, r=nss-reviewers,djackson
2022-05-19  John M. Schanck  <jschanck@mozilla.com>

	* lib/ckfw/wrap.c:
	Bug 1766978 - improve error handling after
	nssCKFWInstance_CreateObjectHandle. r=djackson

	[2efccbd85918] [tip]

2022-03-18  Robert Relyea  <rrelyea@redhat.com>

	* cmd/pk12util/pk12util.c, lib/pkcs12/p12local.c,
	tests/common/init.sh, tests/tools/tools.sh:
	Bug 1757075 NSS does not properly import or export pkcs12 files with
	large passwords and pkcs5v2 encoding.

	Don't use NULL when encoding UTF8 with pkcs5v2. Fix a bug here when
	converting from UCS2 to UTF8 we would add a double NULL when adding
	a NULL.

	[0f4664512bd0]

2022-05-17  Dennis Jackson  <djackson@mozilla.com>

	* nspr.patch:
	Remove nspr.patch mistakenly committed in e3ac914bc684
	[99e32fcca1c7]

2022-05-17  Leander Schwarz  <lschwarz@mozilla.com>

	* gtests/ssl_gtest/ssl_record_unittest.cc,
	gtests/ssl_gtest/ssl_v2_client_hello_unittest.cc, lib/ssl/ssl3con.c,
	lib/ssl/ssl3gthr.c, lib/ssl/tls13con.c:
	Bug 1764788 - Correct invalid record inner and outter content type
	alerts. r=djackson

	Added test cases for alerts during and pre handshake as well as TLS
	1.3 only after handshake (application data) cases due to unsupported
	de- and encryption of lower TLS version records in gtest.

	Adjusted some test cases that expect failed connections to the
	updated alerts.

	[7f4b0af3a526]

	* gtests/ssl_gtest/ssl_version_unittest.cc, lib/ssl/ssl3con.c:
	Bug 1765753 - TLS 1.3 Server: Send protocol_version alert on
	unsupported ClientHello.legacy_version. r=djackson

	[bc7bfba47e0a]

	* gtests/ssl_gtest/ssl_extension_unittest.cc, lib/ssl/ssl3exthandle.c:
	Bug 1765753 - Added RFC8422 compliant TLS <= 1.2
	undefined/compressed ECPointFormat extension alerts. r=djackson

	[d06a8831ec84]

2022-05-16  John M. Schanck  <jschanck@mozilla.com>

	* gtests/util_gtest/manifest.mn, gtests/util_gtest/util_gtest.gyp,
	gtests/util_gtest/util_secasn1d_unittest.cc, lib/util/secasn1d.c:
	Bug 1387919 - Fix secasn1d parsing of indefinite SEQUENCE inside
	indefinite GROUP. r=keeler,nss-reviewers,djackson

	In an iteration over elements of an indefinite-length encoded GROUP
	(sec_asn1d_next_in_group), the child of the current state is
	responsible for parsing the GROUP's end-of-contents octets---a call
	to sec_asn1d_parse_end_of_contents(state->child) sets the
	endofcontents flag for state->child and a later call to
	sec_asn1d_next_in_group checks state->child->endofcontents and
	terminates the iteration.

	In an iteration over elements of an indefinite-length encoded
	SEQUENCE (sec_asn1d_next_in_sequence), on the other hand, the
	current state, not its child, handles the end-of-contents octets.

	Prior to this commit, an error would occur when state pointed to an
	indefinite-length encoded GROUP and state->child pointed to an
	indefinite-length encoded SEQUENCE. In this case, state->child would
	be passed to sec_asn1d_parse_end_of_contents to parse the SEQUENCE's
	end-of-contents octets. This would set the endofcontents flag for
	state->child, and this would be misinterpreted as an end-of-
	iteration signal for the surrounding GROUP.

	[1811eec24997]

	* automation/abi-check/expected-report-libnss3.so.txt,
	lib/nss/nss.def, lib/pk11wrap/pk11list.c, lib/pk11wrap/pk11util.c,
	lib/pk11wrap/secmod.h, lib/util/nssrwlk.h:
	Bug 1753315 - Add SECMOD_LockedModuleHasRemovableSlots. r=rrelyea

	[499ae15c18ad]

2022-05-13  Kai Engert  <kaie@kuix.de>

	* automation/abi-check/expected-report-libnspr4.so.txt,
	cmd/selfserv/selfserv.c, cmd/tstclnt/tstclnt.c, nspr.patch:
	Bug 1769295 - selfserv and tstclnt should use
	PR_GetPrefLoopbackAddrInfo. r=rrelyea

	[e3ac914bc684]

2022-05-11  John M. Schanck  <jschanck@mozilla.com>

	* lib/softoken/legacydb/lginit.c:
	Bug 1454072 - Use of uninitialized pointer in lg_init after alloc
	fail. r=nss-reviewers,nkulatova

	[927d47dcc509]

2022-05-06  John M. Schanck  <jschanck@mozilla.com>

	* automation/clang-format/Dockerfile:
	Bug 1766907 - Update mercurial in clang-format docker image. r=mt

	[83a89ed9f527]

Differential Revision: https://phabricator.services.mozilla.com/D146888
2022-05-20 09:24:42 +00:00
Alexandre Lissy cd689b44aa Bug 1769033 - Add OpenBSD sandboxing support r=gaston
Differential Revision: https://phabricator.services.mozilla.com/D146568
2022-05-20 08:25:04 +00:00
Jed Davis 73a294a2b8 Bug 1769182 - Allow the RDD process to use EGL under X11 on Linux. r=gcp
This patch mostly turns on the features set up by the earlier patches:
allow connecting to the X server and reading various related things
(.Xauthority, GPU device info in sysfs, etc.).  It also turns off Mesa's
shader cache in the RDD process; that shouldn't be needed here, and
disabling it lets us avoid dealing with a few things in the sandbox
policy that we'd rather not (e.g., `getpwuid`).

Differential Revision: https://phabricator.services.mozilla.com/D146275
2022-05-19 17:02:33 +00:00
Jed Davis 6798385a35 Bug 1769182 - Factor out the X11/Mesa-related parts of Linux sandbox file policies. r=gcp
This patch moves a lot of text but the idea is relatively simple and
no functional change is intended: factor out the parts of the content
sandbox policy needed to create and use an EGL context under X11.
(The `AddDriPaths` function already has some of the dependencies in a
conveniently separated form, but there are others.)

Differential Revision: https://phabricator.services.mozilla.com/D146274
2022-05-19 17:02:32 +00:00
Jed Davis c4f9ff3229 Bug 1769182 - Allow send/recv and sendto/recvfrom in the common Linux sandbox policy. r=gcp
These syscalls (at least send/recv) are used by X11 client libraries, and
allowing them doesn't really change anything about security or attack
surface, because they're strict subsets of sendmsg/recvmsg which we
already allow everywhere for use by IPC.  So, this patch allows them in
all process types instead of only content.

Differential Revision: https://phabricator.services.mozilla.com/D146273
2022-05-19 17:02:32 +00:00
Jed Davis cf0f678eb8 Bug 1769182 - Factor out connect() brokering in the Linux sandbox policies. r=gcp
We're going to want to let the RDD process make a (brokered) connection
to a local X server, but the seccomp-bpf plumbing for that mostly lives
in the content process sandbox policy.  This moves it into the common
policy, and subclasses can opt in.

Differential Revision: https://phabricator.services.mozilla.com/D146272
2022-05-19 17:02:31 +00:00
Jed Davis 034ed27337 Bug 1769182 - Refactor seccomp-bpf sandbox policy constructors. r=gcp
The arguments to the SandboxPolicyCommon contructor will get more
complicated as more optional features are added (e.g., the one added in
the next patch), and they're basically just mapped to boolean member
variables, so this patch lets the subclasses set them directly, to keep
things simpler and more readable.

Differential Revision: https://phabricator.services.mozilla.com/D146271
2022-05-19 17:02:31 +00:00
ffxbld 1677fb63f8 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D146796
2022-05-19 11:57:24 +00:00
Alexandre Lissy 4684b3ea07 Bug 1769992 - Enable Win32K Lockdown for Windows10 Fall Creators+ r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D146716
2022-05-18 15:57:10 +00:00
Alexandre Lissy f74882d83e Bug 1769748 - Disable dynamic code mitigation on MinGW64 builds r=bobowen
Depends on D146639

Differential Revision: https://phabricator.services.mozilla.com/D146640
2022-05-18 14:16:57 +00:00
Andrew McCreight fa8bfd1245 Bug 1514936, part 2 - Drop the outer arguments from static components. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D146457
2022-05-17 20:24:19 +00:00
Andrew McCreight c8c5c819df Bug 1514936, part 1 - Remove the outer argument to nsIFactory::createInstance. r=xpcom-reviewers,preferences-reviewers,nika,Gijs
This patch won't actually build, because a few bits of code are used
for both nsIFactory::createInstance and static components, and static
components are not fixed until the next patch.

The first place is nsLoadGroupConstructor, which uses an nsIFactory
macro to create a static component constructor. (This could be worked
around by expanding the macro to the state before this patch.)

The other issue is that nsAppShellConstructor is used in an nsIFactory
on OSX, but as a static component on all other platforms. This could
be worked around by wrapping nsAppShellConstructor in an adaptor that
passes in the extra null argument to nsAppShellConstructor.

Differential Revision: https://phabricator.services.mozilla.com/D146456
2022-05-17 20:24:19 +00:00
ffxbld 9a53228116 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D146422
2022-05-16 13:40:00 +00:00
Iulian Moraru cf3fad08ff Backed out 5 changesets (bug 1769182) for causing mochitest failures on browser_sandbox_test.js. CLOSED TREE
Backed out changeset f5b71a28f28b (bug 1769182)
Backed out changeset 7a64faec004f (bug 1769182)
Backed out changeset c7833370362a (bug 1769182)
Backed out changeset b91adae9bb59 (bug 1769182)
Backed out changeset cf7bb9b7414d (bug 1769182)
2022-05-14 05:20:37 +03:00
Jed Davis accee09e1b Bug 1769182 - Allow the RDD process to use EGL under X11 on Linux. r=gcp
This patch mostly turns on the features set up by the earlier patches:
allow connecting to the X server and reading various related things
(.Xauthority, GPU device info in sysfs, etc.).  It also turns off Mesa's
shader cache in the RDD process; that shouldn't be needed here, and
disabling it lets us avoid dealing with a few things in the sandbox
policy that we'd rather not (e.g., `getpwuid`).

Differential Revision: https://phabricator.services.mozilla.com/D146275
2022-05-14 00:42:56 +00:00
Jed Davis 79e1be12f4 Bug 1769182 - Factor out the X11/Mesa-related parts of Linux sandbox file policies. r=gcp
This patch moves a lot of text but the idea is relatively simple and
no functional change is intended: factor out the parts of the content
sandbox policy needed to create and use an EGL context under X11.
(The `AddDriPaths` function already has some of the dependencies in a
conveniently separated form, but there are others.)

Differential Revision: https://phabricator.services.mozilla.com/D146274
2022-05-14 00:42:56 +00:00
Jed Davis c92c41aa71 Bug 1769182 - Allow send/recv and sendto/recvfrom in the common Linux sandbox policy. r=gcp
These syscalls (at least send/recv) are used by X11 client libraries, and
allowing them doesn't really change anything about security or attack
surface, because they're strict subsets of sendmsg/recvmsg which we
already allow everywhere for use by IPC.  So, this patch allows them in
all process types instead of only content.

Differential Revision: https://phabricator.services.mozilla.com/D146273
2022-05-14 00:42:56 +00:00
Jed Davis 9e9f783fb4 Bug 1769182 - Factor out connect() brokering in the Linux sandbox policies. r=gcp
We're going to want to let the RDD process make a (brokered) connection
to a local X server, but the seccomp-bpf plumbing for that mostly lives
in the content process sandbox policy.  This moves it into the common
policy, and subclasses can opt in.

Differential Revision: https://phabricator.services.mozilla.com/D146272
2022-05-14 00:42:55 +00:00
Jed Davis 5b1c92943d Bug 1769182 - Refactor seccomp-bpf sandbox policy constructors. r=gcp
The arguments to the SandboxPolicyCommon contructor will get more
complicated as more optional features are added (e.g., the one added in
the next patch), and they're basically just mapped to boolean member
variables, so this patch lets the subclasses set them directly, to keep
things simpler and more readable.

Differential Revision: https://phabricator.services.mozilla.com/D146271
2022-05-14 00:42:55 +00:00
John Schanck ff77229600 Bug 1768710 - Replace CRLite test filter. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D146117
2022-05-13 13:39:32 +00:00
John Schanck e76a11f1cf Bug 1768710 - Upgrade rust-cascade to 1.4.0 and sha2 to 0.10.2. r=keeler,webdriver-reviewers,whimboo,glandium
This also upgrades the headers crate to 0.3.7. Webdriver depends on warp 0.2,
which depends on headers 0.3. But headers < 0.3.7 depends on sha-1 < 0.10. We
need sha-1 and sha2 at the same minor version to avoid duplicate block-buffer,
generic-array, and digest crates.

Differential Revision: https://phabricator.services.mozilla.com/D146010
2022-05-13 13:39:31 +00:00
Alexandre Lissy 86b699e35f Bug 1768665 - Extend linux sandbox Utility for PGO on try with PR_GET_PDEATHSIG r=jld
Differential Revision: https://phabricator.services.mozilla.com/D146200
2022-05-13 08:10:38 +00:00
Nika Layzell b8bbcfbc33 Bug 1769124 - Require Recv methods to return IPCResult, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D146243
2022-05-13 02:20:23 +00:00
Dana Keeler fb67326470 Bug 1768047 - introduce HMAC C++ helper and remove nsICryptoHMAC r=jschanck,necko-reviewers,kershaw,padenot
This patch removes the redundant nsICryptoHMAC interface and implementation,
updates front-end code to use WebCrypto, and changes back-end code to use the
helper class HMAC introduced by this patch.

This also removes the last uses of nsIKeyObject and nsIKeyObjectFactory, and
thus those interfaces and implementations as well.

Differential Revision: https://phabricator.services.mozilla.com/D145656
2022-05-12 22:24:29 +00:00
Randell Jesup 46292cae55 Bug 1207753 - security/manager thread-safety annotations r=keeler,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D131879
2022-05-12 21:16:11 +00:00
Dana Keeler 036e660199 Bug 1769058 - handle PinsListTimestamp entry in Chrome's static pinning list r=jschanck DONTBUILD
Chrome's transport_security_state_static.pins (used by Gecko to glean static
pinning information) recently added a timestamp to note its creation time.
This patch updates genHPKPStaticPins.js to handle the timestamp's presence by
ignoring it.
This also removes the obsolete security/manager/tools/genHPKPStaticPins.js.
The canonical version of that file is
taskcluster/docker/periodic-updates/scripts/genHPKPStaticPins.js.

Differential Revision: https://phabricator.services.mozilla.com/D146226
2022-05-12 18:48:17 +00:00
Dana Keeler 58a4c6bd73 Bug 1767099 - convert some security PKI preferences to static prefs r=jschanck
Using static preferences in PSM will eventually allow NSS to be initialized on
a background thread instead of blocking the main thread.

Depends on D145152

Differential Revision: https://phabricator.services.mozilla.com/D145390
2022-05-11 22:36:16 +00:00
Dana Keeler 4b1cb737b4 Bug 1767099 - convert some TLS security prefs to static prefs r=jschanck
Using static preferences in PSM will eventually allow NSS to be initialized on
a background thread instead of blocking the main thread.

Depends on D145151

Differential Revision: https://phabricator.services.mozilla.com/D145152
2022-05-11 22:36:15 +00:00
Dana Keeler 78783f1ae0 Bug 1767099 - convert some certificate-related security prefs to static prefs r=jschanck
Using static preferences in PSM will eventually allow NSS to be initialized on
a background thread instead of blocking the main thread.

Depends on D145150

Differential Revision: https://phabricator.services.mozilla.com/D145151
2022-05-11 22:36:15 +00:00
Dana Keeler 16aec8aa2f Bug 1767099 - convert security OCSP prefs to static prefs r=jschanck
Using static preferences in PSM will eventually allow NSS to be initialized on
a background thread instead of blocking the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D145150
2022-05-11 22:36:14 +00:00
Bob Owen f2a9df286a Bug 1768014 p2: Default to policy win32k lockdown status if in process check fails. r=gcp,cmartin
Depends on D145872

Differential Revision: https://phabricator.services.mozilla.com/D145873
2022-05-10 06:07:17 +00:00
Bob Owen f606488912 Bug 1768014 p1: Transfer mitigations to sandboxed child process. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D145872
2022-05-10 06:07:16 +00:00
ffxbld 8717524b50 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D145877
2022-05-09 13:47:59 +00:00
Dana Keeler 6df4b335aa Bug 1767489 - disable sha-1 signatures in certificates by default r=jschanck
Bug 1766687 will remove support for sha-1 signatures in certificates entirely.
This patch will disable sha-1 via the preference and ride the trains first, to
allow time for any organizations that somehow still use certificates with sha-1
signatures to re-sign them.

Differential Revision: https://phabricator.services.mozilla.com/D145359
2022-05-06 21:07:44 +00:00
Chris Peterson 8c5719edb5 Bug 1767947 - Fix macOS build error on aarch64. r=mac-reviewers,tnikkel
To fix this build error:

ERROR -  /builds/worker/fetches/clang/lib/clang/14.0.1/include/xmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"

Wrap #include "emmintrin.h" with (the relevant subset of) the same #ifdefs nsRect.h uses here:

https://searchfox.org/mozilla-central/rev/bf243bc817f97b0bb74af710bd9d874370468e8b/gfx/src/nsRect.h#19-26

Differential Revision: https://phabricator.services.mozilla.com/D145685
2022-05-06 03:29:52 +00:00
ffxbld a5485957a7 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D145585
2022-05-05 12:58:54 +00:00
Anna Weine 42196a472a Bug 1767934 - land NSS 85bf9240f3e1 UPGRADE_NSS_RELEASE, r=nss-reviewers,djackson
Differential Revision: https://phabricator.services.mozilla.com/D145546
2022-05-05 10:56:32 +00:00
Chris Peterson 51164d0dcf Bug 1767881 - Fix non-unified build error in security/sandbox/common. r=haik
#including ApplicationServices.h within `namespace ApplicationServices` indirectly causes emmintrin.h to also be #included in namespace ApplicationServices in non-unified builds.

In file included from security/sandbox/common/test/SandboxTestingChild.cpp:12:
In file included from objdir-x86_64-apple-darwin21.4.0-clang-mozbuild/dist/include/mozilla/ipc/UtilityProcessChild.h:10:
In file included from objdir-x86_64-apple-darwin21.4.0-clang-mozbuild/dist/include/mozilla/ipc/UtilityAudioDecoderParent.h:9:
In file included from objdir-x86_64-apple-darwin21.4.0-clang-mozbuild/ipc/ipdl/_ipdlheaders/mozilla/PRemoteDecoderManagerParent.h:23:
In file included from objdir-x86_64-apple-darwin21.4.0-clang-mozbuild/dist/include/PlatformDecoderModule.h:23:
In file included from objdir-x86_64-apple-darwin21.4.0-clang-mozbuild/dist/include/mozilla/layers/KnowsCompositor.h:10:
In file included from objdir-x86_64-apple-darwin21.4.0-clang-mozbuild/dist/include/mozilla/layers/LayersTypes.h:14:
In file included from objdir-x86_64-apple-darwin21.4.0-clang-mozbuild/dist/include/Units.h:19:
objdir-x86_64-apple-darwin21.4.0-clang-mozbuild/dist/include/nsRect.h:294:26: error: unknown type name '__m128i'; did you mean 'ApplicationServices::__m128i'?
static MOZ_ALWAYS_INLINE __m128i floor_ps2epi32(__m128 x) {
                         ^~~~~~~
                         ApplicationServices::__m128i
/Users/chris/.mozbuild/clang/lib/clang/14.0.1/include/emmintrin.h:20:19: note: 'ApplicationServices::__m128i' declared here
typedef long long __m128i __attribute__((__vector_size__(16), __aligned__(16)));

Differential Revision: https://phabricator.services.mozilla.com/D145516
2022-05-05 04:00:58 +00:00
Mike Hommey 2d6c8fdbc6 Bug 1766561 - Adjust UTF-16 string formatting. r=nika
With MOZ_FORMAT_PRINTF annotations, the compiler expects a wchar_t*, and
it won't automatically consider char16ptr_t to be compatible with that.

While handling strings, there's one case of formatting that doesn't need
to use %S at all.

Differential Revision: https://phabricator.services.mozilla.com/D144919
2022-05-03 20:49:09 +00:00
Mike Hommey 90c1d1fba0 Bug 1766561 - Add missing z modifier for size_t formatting. r=gfx-reviewers,necko-reviewers,keeler,rkraesig,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144918
2022-05-03 20:49:09 +00:00
Mike Hommey 12df1ed1b6 Bug 1766561 - Use %lu for Windows Error types (DWORD). r=rkraesig,xpcom-reviewers,application-update-reviewers,mhowell,bobowen,necko-reviewers,keeler,media-playback-reviewers,bytesized,barret,alwu,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144914
2022-05-03 20:49:07 +00:00
Nika Layzell 052cba0853 Bug 1738106 - Part 3: Switch to TaskQueue::Create, r=xpcom-reviewers,necko-reviewers,media-playback-reviewers,dragana,alwu,barret
In future parts, TaskQueue will require extra initialization to be performed
which cannot happen in a constructor, as it takes references to the TaskQueue
object itself, which will require the introduction of a helper method. This
patch switches all callers of the TaskQueue constructor to use the new method.

Differential Revision: https://phabricator.services.mozilla.com/D142604
2022-05-02 20:37:34 +00:00
ffxbld dc7cdcb8e8 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D145224
2022-05-02 12:27:06 +00:00
Henrik Skupin 78f7bbce86 Bug 1719505 - [remote] Unify Remote Agent's running state with Marionette. r=webdriver-reviewers,mossop,smaug,keeler,jdescottes
Both components are related to WebDriver and should expose the
same flag for their running state.

Differential Revision: https://phabricator.services.mozilla.com/D144982
2022-04-29 17:38:14 +00:00
Butkovits Atila fc54f60211 Backed out 6 changesets (bug 1719505) for causing failures at browser_Troubleshoot.js. CLOSED TREE
Backed out changeset 915b5331f6b2 (bug 1719505)
Backed out changeset 8df69b3445e5 (bug 1719505)
Backed out changeset 674fe8523cf6 (bug 1719505)
Backed out changeset f40c2fe6872d (bug 1719505)
Backed out changeset 3e3df2a6b1e3 (bug 1719505)
Backed out changeset 621024810236 (bug 1719505)
2022-04-29 17:32:32 +03:00
Henrik Skupin 8a69201f2e Bug 1719505 - [remote] Unify Remote Agent's running state with Marionette. r=webdriver-reviewers,mossop,smaug,keeler,jdescottes
Both components are related to WebDriver and should expose the
same flag for their running state.

Differential Revision: https://phabricator.services.mozilla.com/D144982
2022-04-29 11:55:43 +00:00
Mike Hommey 028ad1b883 Bug 1766377 - Fix remaining sign-compare warnings in Windows builds. r=rkraesig,gsvelto,media-playback-reviewers,gfx-reviewers,bryce,sotaro
browser/components/shell/WindowsUserChoice.cpp(233,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int j = 0; j < DWORDS_PER_BLOCK; ++j) {
                    ~ ^ ~~~~~~~~~~~~~~~~
browser/components/shell/WindowsUserChoice.cpp(388,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(exts); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1225,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(shortcutCSIDLs); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1492,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(folders); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~
dom/media/platforms/wmf/MFTDecoder.cpp(85,23): error: comparison of integers of different signs: 'int' and 'UINT32' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 1; i < actsNum; i++) {
                    ~ ^ ~~~~~~~
gfx/2d/Factory.cpp(1276,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int y = 0; y < height; y++) {
                  ~ ^ ~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1096,36): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
        swapDesc.BufferDesc.Height == mSize.height) ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1095,35): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
  if (((swapDesc.BufferDesc.Width == mSize.width &&
        ~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1278,30): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
          currentDesc.Height != mSize.height ||
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1277,29): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
      if (currentDesc.Width != mSize.width ||
          ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/ipc/ContentCompositorBridgeParent.cpp(248,19): error: comparison of integers of different signs: 'const uint32_t' (aka 'const unsigned int') and 'int32_t' (aka 'int') [-Werror,-Wsign-compare]
  if (sequenceNum == status.sequenceNumber() && !dm->HasDeviceReset()) {
      ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(129,21): error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare]
    if (resultColor != 0xffffff00) {
        ~~~~~~~~~~~ ^  ~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(154,23): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
    for (int i = 0; i < PR_ARRAY_SIZE(checkModules); i += 1) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(409,14): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'UINT' (aka 'unsigned int') [-Werror,-Wsign-compare]
  if (vendor != desc.VendorId) {
      ~~~~~~ ^  ~~~~~~~~~~~~~
gfx/thebes/gfxDWriteFontList.cpp(1248,39): error: comparison of integers of different signs: 'unsigned int' and 'int' [-Werror,-Wsign-compare]
        addFamily(names[index], index != sysLocIndex);
                                ~~~~~ ^  ~~~~~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(121,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < aLength; ++i) {
                  ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(132,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(138,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(319,26): error: comparison of integers of different signs: 'std::basic_string<char>::size_type' (aka 'unsigned long long') and 'int' [-Werror,-Wsign-compare]
    while (line.length() > whitespace &&
           ~~~~~~~~~~~~~ ^ ~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1003,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 1; i < noPlaceholderSpans.length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1708,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < dataLen / (2 * sizeof(double)); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
security/sandbox/chromium-shim/sandbox/win/permissionsService.cpp(40,16): error: comparison of integers of different signs: 'int' and 'const std::basic_string<wchar_t>::size_type' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
  if (slashIdx != std::wstring::npos) {
      ~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~
toolkit/components/aboutthirdparty/tests/gtest/TestAboutThirdParty.cpp(107,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kDirectoriesUnsorted); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/breakpad-client/windows/crash_generation/crash_generation_server.cc(957,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int i = 0; i < kExceptionAppMemoryRegions; i++) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(373,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(671,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(controls) / sizeof(controls[0]); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(1048,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/mozapps/defaultagent/SetDefaultBrowser.cpp(248,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < mozilla::ArrayLength(associations); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/system/windowsproxy/ProxyUtils.cpp(27,36): error: comparison of integers of different signs: 'const int' and 'nsTArray_base::size_type' (aka 'unsigned long long') [-Werror,-Wsign-compare]
                             if (i < addr.Length()) {
                                 ~ ^ ~~~~~~~~~~~~~
toolkit/xre/dllservices/mozglue/interceptor/Arm64.h(178,28): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
  if (signbits && signbits != 0xFE000000) {
                  ~~~~~~~~ ^  ~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned int, int>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(35,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned int, int, nullptr>' requested here
    EXPECT_EQ(mCounters.Count(), N);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(210,28): note: in instantiation of function template specialization 'ModuleLoadCounter::Remains<1>' requested here
    EXPECT_TRUE(waitForOne.Remains({kTestModules[0]}, {0}));
                           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(139,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(151,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(164,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const int' and 'const unsigned long long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned long long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(138,3): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<int, unsigned long long, nullptr>' requested here
  EXPECT_EQ(len, ArrayLength(kExpectedArgsW));
  ^
widget/windows/TSFTextStore.cpp(3455,28): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
          range.mEndOffset == end - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
widget/windows/TSFTextStore.cpp(3454,30): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
      if (range.mStartOffset == start - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xpfe/appshell/AppWindow.cpp(1900,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < toolbarSprings->Length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144695
2022-04-29 09:14:12 +00:00
Norisz Fay 6e06e2da92 Backed out 4 changesets (bug 1766377) for causing mochitest failures on HyperTextAccessible.cpp CLOSED TREE
Backed out changeset 6335511477a4 (bug 1766377)
Backed out changeset e8108d6fab9f (bug 1766377)
Backed out changeset 80d16d55c490 (bug 1766377)
Backed out changeset 1a6583d6e52e (bug 1766377)
2022-04-29 07:35:11 +03:00
Mike Hommey 9cd056be1e Bug 1766377 - Fix remaining sign-compare warnings in Windows builds. r=rkraesig,gsvelto,media-playback-reviewers,gfx-reviewers,bryce,sotaro
browser/components/shell/WindowsUserChoice.cpp(233,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int j = 0; j < DWORDS_PER_BLOCK; ++j) {
                    ~ ^ ~~~~~~~~~~~~~~~~
browser/components/shell/WindowsUserChoice.cpp(388,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(exts); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1225,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(shortcutCSIDLs); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1492,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(folders); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~
dom/media/platforms/wmf/MFTDecoder.cpp(85,23): error: comparison of integers of different signs: 'int' and 'UINT32' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 1; i < actsNum; i++) {
                    ~ ^ ~~~~~~~
gfx/2d/Factory.cpp(1276,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int y = 0; y < height; y++) {
                  ~ ^ ~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1096,36): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
        swapDesc.BufferDesc.Height == mSize.height) ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1095,35): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
  if (((swapDesc.BufferDesc.Width == mSize.width &&
        ~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1278,30): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
          currentDesc.Height != mSize.height ||
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1277,29): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
      if (currentDesc.Width != mSize.width ||
          ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/ipc/ContentCompositorBridgeParent.cpp(248,19): error: comparison of integers of different signs: 'const uint32_t' (aka 'const unsigned int') and 'int32_t' (aka 'int') [-Werror,-Wsign-compare]
  if (sequenceNum == status.sequenceNumber() && !dm->HasDeviceReset()) {
      ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(129,21): error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare]
    if (resultColor != 0xffffff00) {
        ~~~~~~~~~~~ ^  ~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(154,23): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
    for (int i = 0; i < PR_ARRAY_SIZE(checkModules); i += 1) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(409,14): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'UINT' (aka 'unsigned int') [-Werror,-Wsign-compare]
  if (vendor != desc.VendorId) {
      ~~~~~~ ^  ~~~~~~~~~~~~~
gfx/thebes/gfxDWriteFontList.cpp(1248,39): error: comparison of integers of different signs: 'unsigned int' and 'int' [-Werror,-Wsign-compare]
        addFamily(names[index], index != sysLocIndex);
                                ~~~~~ ^  ~~~~~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(121,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < aLength; ++i) {
                  ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(132,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(138,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(319,26): error: comparison of integers of different signs: 'std::basic_string<char>::size_type' (aka 'unsigned long long') and 'int' [-Werror,-Wsign-compare]
    while (line.length() > whitespace &&
           ~~~~~~~~~~~~~ ^ ~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1003,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 1; i < noPlaceholderSpans.length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1708,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < dataLen / (2 * sizeof(double)); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
security/sandbox/chromium-shim/sandbox/win/permissionsService.cpp(40,16): error: comparison of integers of different signs: 'int' and 'const std::basic_string<wchar_t>::size_type' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
  if (slashIdx != std::wstring::npos) {
      ~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~
toolkit/components/aboutthirdparty/tests/gtest/TestAboutThirdParty.cpp(107,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kDirectoriesUnsorted); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/breakpad-client/windows/crash_generation/crash_generation_server.cc(957,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int i = 0; i < kExceptionAppMemoryRegions; i++) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(373,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(671,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(controls) / sizeof(controls[0]); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(1048,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/mozapps/defaultagent/SetDefaultBrowser.cpp(248,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < mozilla::ArrayLength(associations); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/system/windowsproxy/ProxyUtils.cpp(27,36): error: comparison of integers of different signs: 'const int' and 'nsTArray_base::size_type' (aka 'unsigned long long') [-Werror,-Wsign-compare]
                             if (i < addr.Length()) {
                                 ~ ^ ~~~~~~~~~~~~~
toolkit/xre/dllservices/mozglue/interceptor/Arm64.h(178,28): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
  if (signbits && signbits != 0xFE000000) {
                  ~~~~~~~~ ^  ~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned int, int>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(35,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned int, int, nullptr>' requested here
    EXPECT_EQ(mCounters.Count(), N);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(210,28): note: in instantiation of function template specialization 'ModuleLoadCounter::Remains<1>' requested here
    EXPECT_TRUE(waitForOne.Remains({kTestModules[0]}, {0}));
                           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(139,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(151,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(164,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const int' and 'const unsigned long long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned long long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(138,3): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<int, unsigned long long, nullptr>' requested here
  EXPECT_EQ(len, ArrayLength(kExpectedArgsW));
  ^
widget/windows/TSFTextStore.cpp(3455,28): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
          range.mEndOffset == end - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
widget/windows/TSFTextStore.cpp(3454,30): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
      if (range.mStartOffset == start - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xpfe/appshell/AppWindow.cpp(1900,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < toolbarSprings->Length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144695
2022-04-29 00:43:32 +00:00
John Schanck 6028a138e9 Bug 1691122 - Remove subject common name fallback support in CertVerifier. r=keeler,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D143808
2022-04-28 19:48:06 +00:00
ffxbld 984056514e No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D144938
2022-04-28 14:40:34 +00:00
Dennis Jackson 03ad368b81 Bug 1764153 - land NSS NSS_3_78_RTM UPGRADE_NSS_RELEASE, r=nss-reviewers,bbeurdouche DONTBUILD
2022-04-28  Dennis Jackson  <djackson@mozilla.com>

	* lib/nss/nss.h, lib/softoken/softkver.h, lib/util/nssutil.h:
	Set version numbers to 3.78 final
	[30fe50c80e23] [NSS_3_78_RTM] <NSS_3_78_BRANCH>

	* doc/rst/releases/index.rst, doc/rst/releases/nss_3_78.rst:
	Release notes for NSS 3.78
	[6a5a0d7b1dba] <NSS_3_78_BRANCH>

2022-04-21  Dennis Jackson  <djackson@mozilla.com>

	* .hgtags:
	Added tag NSS_3_78_BETA1 for changeset 144c87accae8
	[c7950a356651] <NSS_3_78_BRANCH>

Differential Revision: https://phabricator.services.mozilla.com/D144934
2022-04-28 12:08:46 +00:00
Butkovits Atila 94e2a597f6 Backed out changeset 0599b2a0913a (bug 1691122) for causing failures at test_peerConnection_basicAudioNATRelayTLS.html. CLOSED TREE 2022-04-28 03:58:05 +03:00
John Schanck ea5479a8d7 Bug 1691122 - Remove subject common name fallback support in CertVerifier. r=keeler,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D143808
2022-04-27 20:57:31 +00:00
Bob Owen 09a4cd7a93 Bug 1760340: Re-allow forward slashes in windows sandbox file system policy rules. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D144849
2022-04-27 19:27:28 +00:00
John Schanck 86bd5cb77a Bug 1765012 - expire CRLite filters after 10 days. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D144619
2022-04-27 17:15:06 +00:00
Alexandre Lissy c49495fe2e Bug 1765372 - Enable Arbitrary Code Guard for Utility processes r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D144607
2022-04-27 14:05:42 +00:00
Mike Hommey 3da3b13f2a Bug 1766359 - Fix unreachable-code-return warnings in Windows builds. r=emilio,mhowell,nika,rkraesig
dom/system/PathUtils.cpp(77,10): error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
  return false;
         ^~~~~
ipc/chromium/src/chrome/common/ipc_channel_win.cc(479,10): error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
  return true;
         ^~~~
mozglue/misc/PreXULSkeletonUI.cpp(1263,10): error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
  return 0;
         ^
mozglue/tests/TestPEExportSection.cpp(348,12): error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
    return 0;
           ^
security/manager/ssl/OSReauthenticator.cpp(428,10): error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
  return NS_OK;
         ^~~~~
toolkit/components/maintenanceservice/maintenanceservice.cpp(214,10): error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
  return 0;
         ^
widget/windows/WindowsUIUtils.cpp(383,10): error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
  return false;
         ^~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144661
2022-04-26 21:44:54 +00:00
Dana Keeler 241a870439 Bug 1727144 - osclientcerts: "item not found" is not an error r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D144490
2022-04-26 16:16:40 +00:00
ffxbld 328d4f7be2 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D144553
2022-04-25 20:51:16 +00:00
Dennis Jackson 93b3689c90 Bug 1764153 - land NSS NSS_3_78_BETA1 UPGRADE_NSS_RELEASE, r=nss-reviewers,bbeurdouche
Differential Revision: https://phabricator.services.mozilla.com/D144282
2022-04-22 12:42:27 +00:00
Jed Davis 272d93bb18 Bug 1759196 - Fix the Linux sandbox's handling of 32-bit arguments on 64-bit platforms. r=gcp,bobowen
Background: When 32-bit types are passed in registers on x86-64 (and
probably other platforms?), the function call ABI does not specify the
contents of the upper half, and the Linux kernel syscall ABI appears to
have the same behavior.

In practice, the upper half is usually zero (or maybe sign-extended from
the lower half), because 64-bit operations aren't cheaper than 32-bit,
and 32-bit operations zero-extend their outputs; therefore, this case
usually doesn't happen in the first place, and any kind of spill or
register move will zero the upper half.  However, arbitrary values are
possible, and a case like this has occurred with the Firefox profiler
using `clock_gettime`.  (This paragraph is applicable to x86-64 and
ARM64; other 64-bit architecutures may behave differently.)

But the Chromium seccomp-bpf compiler, when testing the value of a 32-bit
argument on a 64-bit platform, requires that the value be zero-extended
or sign-extended, and (incorrectly, as far as I can tell) considers
anything else an ABI violation.

With this patch, when that case is detected, we use the `SIGSYS` handler
to zero-extend the problematic argument and re-issue the syscall.

(It would also be possible to just ignore the upper half, and that would
be faster, but that could lead to subtle security holes if the type
used in `bpf_dsl` is incorrect and the kernel really does treat it as
64-bit.)

Differential Revision: https://phabricator.services.mozilla.com/D143964
2022-04-22 02:00:51 +00:00
Norisz Fay 2accd3d077 Backed out changeset f177a4875b01 (bug 1759196) for causing build bustages on Unified_cpp_sandbox_common0.o CLOSED TREE 2022-04-22 00:29:44 +03:00
Jed Davis f8d698d203 Bug 1759196 - Fix the Linux sandbox's handling of 32-bit arguments on 64-bit platforms. r=gcp,bobowen
Background: When 32-bit types are passed in registers on x86-64 (and
probably other platforms?), the function call ABI does not specify the
contents of the upper half, and the Linux kernel syscall ABI appears to
have the same behavior.

In practice, the upper half is usually zero (or maybe sign-extended from
the lower half), because 64-bit operations aren't cheaper than 32-bit,
and 32-bit operations zero-extend their outputs; therefore, this case
usually doesn't happen in the first place, and any kind of spill or
register move will zero the upper half.  However, arbitrary values are
possible, and a case like this has occurred with the Firefox profiler
using `clock_gettime`.  (This paragraph is applicable to x86-64 and
ARM64; other 64-bit architecutures may behave differently.)

But the Chromium seccomp-bpf compiler, when testing the value of a 32-bit
argument on a 64-bit platform, requires that the value be zero-extended
or sign-extended, and (incorrectly, as far as I can tell) considers
anything else an ABI violation.

With this patch, when that case is detected, we use the `SIGSYS` handler
to zero-extend the problematic argument and re-issue the syscall.

(It would also be possible to just ignore the upper half, and that would
be faster, but that could lead to subtle security holes if the type
used in `bpf_dsl` is incorrect and the kernel really does treat it as
64-bit.)

Differential Revision: https://phabricator.services.mozilla.com/D143964
2022-04-21 21:09:52 +00:00
ffxbld 5b92babb0a No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D144275
2022-04-21 11:42:29 +00:00
Dana Keeler abdfd94799 Bug 1763524 - handle the builtin roots module better when scanning for client certificates r=jschanck
Scanning for client certificates involves looking through each slot in each
PKCS#11 module. There may be many certificates that don't have corresponding
private keys in the NSS softoken, so it's more efficient to search for private
keys and then find any matching certificates. This reasoning also applies to
the NSS builtin roots module, which is the change this patch makes.

Differential Revision: https://phabricator.services.mozilla.com/D143859
2022-04-20 17:59:01 +00:00
Mathieu Leplatre e5519cc11b Bug 1634127 - Download attachments in IndexedDB by default r=necko-reviewers,robwu,dragana
This patch changes the default behaviour of `download()`.

- Previous file-based behaviour was moved to `downloadToDisk()` and `deleteFromDisk()`. Existing consumers were migrated to avoid behaviour change.
- `download()` has now `{useCache: true}` by default, option was dropped, and `deleteCached()` is now `deleteDownloaded()`

Differential Revision: https://phabricator.services.mozilla.com/D141980
2022-04-20 13:07:50 +00:00
Alexandre Lissy 6c9eea0512 Bug 1765371 - Enable CET for all Utility processes r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D144031
2022-04-20 08:21:26 +00:00
ffxbld 4d04e703d2 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D143907
2022-04-18 12:07:42 +00:00
Jed Davis 4c7e799c68 Bug 1762540 - Crash normally, instead of killing the calling thread, for certain sandbox errors. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D143722
2022-04-16 02:36:00 +00:00
Dana Keeler eaac8b0637 Bug 1724747 - run cargo fmt and cargo clippy on rsclientcerts/osclientcerts r=jschanck
Depends on D143778

Differential Revision: https://phabricator.services.mozilla.com/D143779
2022-04-15 18:35:01 +00:00
Dana Keeler be8bd265c2 Bug 1724747 - add files so rsclientcerts rust tests pass r=jschanck
Depends on D143777

Differential Revision: https://phabricator.services.mozilla.com/D143778
2022-04-15 18:35:00 +00:00
Dana Keeler 6cfd1da232 Bug 1724747 - osclientcerts: avoid rental crate r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D143777
2022-04-15 18:35:00 +00:00
Dana Keeler 334c8697f7 Bug 1758652 - avoid creating CERTCertificates in IsCertBuiltInRoot, rework saving intermediates r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D143647
2022-04-14 20:52:07 +00:00
ffxbld af69886f69 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D143703
2022-04-14 12:46:50 +00:00
Nika Layzell 4fccdde58f Bug 1761511 - Part 5: Fix gtest deprecation warnings, r=ahal
The TEST_CASE_P macros are deprecated in newer versions of gtest.

Differential Revision: https://phabricator.services.mozilla.com/D142612
2022-04-14 02:09:22 +00:00
Dana Keeler 3955a99378 Bug 1764424 - update HSTS and pinning preloading source URLs r=jschanck DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D143544
2022-04-12 21:43:04 +00:00
Marian-Vasile Laza 4d42714957 Backed out changeset c43b947f03b0 (bug 1634127) for causing newtab failures. CLOSED TREE 2022-04-12 05:29:27 -07:00
Mathieu Leplatre 1dec4a6bda Bug 1634127 - Download attachments in IndexedDB by default r=necko-reviewers,robwu,dragana
This patch changes the default behaviour of `download()`.

- Previous file-based behaviour was moved to `downloadToDisk()` and `deleteFromDisk()`. Existing consumers were migrated to avoid behaviour change.
- `download()` has now `{useCache: true}` by default, option was dropped, and `deleteCached()` is now `deleteDownloaded()`

Differential Revision: https://phabricator.services.mozilla.com/D141980
2022-04-12 10:50:47 +00:00
ffxbld c7e2f47014 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D143360
2022-04-11 11:54:25 +00:00
ffxbld ed0b2fca21 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D143149
2022-04-07 13:20:44 +00:00
Alexandre Lissy e21d4968c8 Bug 1755316 - Add Utility AudioDecoder Sandbox test r=jld,haik
Differential Revision: https://phabricator.services.mozilla.com/D141471
2022-04-07 10:04:52 +00:00
Alexandre Lissy 57f891080f Bug 1755316 - Perform audio decoding on PUtilityAudioDecoder r=alwu,nika,jld,bobowen,haik
Differential Revision: https://phabricator.services.mozilla.com/D139593
2022-04-07 10:04:51 +00:00
Jim Blandy 281f40ed71 Bug 1763308: Remove pre-Rust-1.59 code from ipcclientcerts moz.build. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D143009
2022-04-07 00:34:01 +00:00
Cosmin Sabou 97d21fa167 Backed out 5 changesets (bug 1761511) for causing build bustages. CLOSED TREE
Backed out changeset 687de8c00013 (bug 1761511)
Backed out changeset 88e6cf5c70e5 (bug 1761511)
Backed out changeset 4c40758f54f1 (bug 1761511)
Backed out changeset 8a18abcccda4 (bug 1761511)
Backed out changeset 1afb1f32a6a4 (bug 1761511)
2022-04-07 00:13:00 +03:00
Nika Layzell f1c3a8f87c Bug 1761511 - Part 5: Fix gtest deprecation warnings, r=ahal
The TEST_CASE_P macros are deprecated in newer versions of gtest.

Differential Revision: https://phabricator.services.mozilla.com/D142612
2022-04-06 20:45:08 +00:00
Dana Keeler 6502ebf4b6 Bug 1608307 - remove redundant flags parameters from nsISiteSecurityService r=jschanck,necko-reviewers,kershaw
Before this patch, nsISiteSecurityService APIs took "flags" parameters that
differentiated private contexts from not private contexts. However, these
parameters were redundant with respect to origin attributes, which led to some
confusion for consumers of these APIs. This patch removes these parameters in
favor of using origin attributes.

Differential Revision: https://phabricator.services.mozilla.com/D142901
2022-04-06 17:37:23 +00:00
Kagami Sascha Rosylight 14f4e64763 Bug 1635428 - Part 2: Allow access to MOZ_DEVELOPER_REPO_DIR on dev builds r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D112286
2022-04-06 15:59:33 +00:00
Akihiko Odaki 96f94f32bf Bug 1761203 - Add all files in DRI device directories r=jld
Intel Media Driver 2021Q4 Release - 22.1.1 depends on the
following files in the PCI device directory: driver, irq,
and resource according to:
https://github.com/intel/media-driver/blob/intel-media-22.1.1/cmrtlib/linux/hardware/drm_device.h#L548-L654

Listing such files needed by libaries is too fragile againt
variations so add all files in the PCI device directory.

Differential Revision: https://phabricator.services.mozilla.com/D142054
2022-04-06 01:31:50 +00:00
Jan Rio Krause 057785b6d5 Bug 1519200 - Remove `NS_ERROR_FILE_TARGET_DOES_NOT_EXIST` in favor of `NS_ERROR_FILE_NOT_FOUND`. r=xpcom-reviewers,nika,dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D77575
2022-04-05 15:17:03 +00:00
ffxbld 60c112e758 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D142811
2022-04-04 18:15:12 +00:00
John Schanck dfbc83b435 Bug 1758579 - land NSS NSS_3_77_RTM UPGRADE_NSS_RELEASE, r=djackson
Differential Revision: https://phabricator.services.mozilla.com/D142584
2022-04-01 15:44:27 +00:00
Kagami Sascha Rosylight 1e83450022 Bug 1635428 - Part 1: Move mozilla::IsDevelopmentBuild to Omnijar.h r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D142569
2022-03-31 23:36:25 +00:00
criss ea772f6e4b Backed out changeset 3cef8943e0c6 (bug 1635428) for causing build bustages on nsMacUtilsImpl.cpp. CLOSED TREE 2022-04-01 01:39:33 +03:00
Kagami Sascha Rosylight 7913ea573c Bug 1635428 - Part 1: Move mozilla::IsDevelopmentBuild to Omnijar.h r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D142569
2022-03-31 22:05:55 +00:00
ffxbld 285c54810e No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D142541
2022-03-31 15:06:24 +00:00
Gijs Kruitbosch 8e67201171 Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 16:16:42 +00:00
Norisz Fay acdd6851cd Backed out 2 changesets (bug 1753696) for causing multiple dt and bc failures CLOSED TREE
Backed out changeset 67fd9edfbcea (bug 1753696)
Backed out changeset a9d957ea887b (bug 1753696)
2022-03-30 12:17:55 +03:00
Gijs Kruitbosch 27039e2946 Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 08:18:51 +00:00
Dana Keeler 6181be75f7 Bug 1735386 - clean up some error handling in cert_storage creation r=jschanck
Depends on D142369

Differential Revision: https://phabricator.services.mozilla.com/D142370
2022-03-30 01:35:27 +00:00
Dana Keeler e2267a307d Bug 1735386 - adjust revocation checking for EV certificate intermediates to match Baseline Requirements r=jschanck
The Baseline Requirements no longer require an OCSP URI for EV certificate
intermediates. Since OneCRL covers intermediates anyways, OCSP checking for
intermediates can be skipped entirely.

Differential Revision: https://phabricator.services.mozilla.com/D142369
2022-03-30 01:35:26 +00:00
Martin Weinelt eb4ecb38cc Bug 1761692 - Add NixOS driver directory to allowed paths for RDD sandbox r=gerard-majax
Differential Revision: https://phabricator.services.mozilla.com/D142268
2022-03-29 12:32:14 +00:00
ffxbld 24f567753c No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D142198
2022-03-28 13:03:48 +00:00
Alexandre Lissy 3d8f9e85b0 Bug 1753424 - Support running multiple UtilityProcess r=nika
Differential Revision: https://phabricator.services.mozilla.com/D139817
2022-03-26 19:46:43 +00:00
Alexandre Lissy caad540f29 Bug 1753424 - Update SandboxTest code with sandboxingKind r=jld
Differential Revision: https://phabricator.services.mozilla.com/D140744
2022-03-26 19:46:43 +00:00
Cristian Tuns b217ab7e55 Backed out 6 changesets (bug 1753424) for causing build bustages CLOSED TREE
Backed out changeset 930136daf858 (bug 1753424)
Backed out changeset d62c1e5d1881 (bug 1753424)
Backed out changeset 911060d2bd8e (bug 1753424)
Backed out changeset cce723862a92 (bug 1753424)
Backed out changeset 97b3fd69185b (bug 1753424)
Backed out changeset 4748652694c7 (bug 1753424)
2022-03-26 14:49:47 -04:00
Alexandre Lissy 94b46a0084 Bug 1753424 - Support running multiple UtilityProcess r=nika
Differential Revision: https://phabricator.services.mozilla.com/D139817
2022-03-26 09:53:47 +00:00
Alexandre Lissy 4885ddade7 Bug 1753424 - Update SandboxTest code with sandboxingKind r=jld
Differential Revision: https://phabricator.services.mozilla.com/D140744
2022-03-26 09:53:46 +00:00
Butkovits Atila 68679c8f29 Backed out 5 changesets (bug 1753424) for causing bustages. CLOSED TREE
Backed out changeset e2b40064eb59 (bug 1753424)
Backed out changeset 0892c1d3c379 (bug 1753424)
Backed out changeset 4df499ef4647 (bug 1753424)
Backed out changeset f27fbfb9e8f1 (bug 1753424)
Backed out changeset 0f244f2eb2de (bug 1753424)
2022-03-26 16:39:16 +02:00
Alexandre Lissy baebfcdc76 Bug 1753424 - Support running multiple UtilityProcess r=nika
Differential Revision: https://phabricator.services.mozilla.com/D139817
2022-03-26 09:53:47 +00:00
Alexandre Lissy 90da4746ad Bug 1753424 - Update SandboxTest code with sandboxingKind r=jld
Differential Revision: https://phabricator.services.mozilla.com/D140744
2022-03-26 09:53:46 +00:00
Akihiko Odaki c6987011f0 Bug 1756088 - Expose DRI configuration file in sandbox r=jld
Differential Revision: https://phabricator.services.mozilla.com/D139096
2022-03-26 02:58:31 +00:00
Masatoshi Kimura d96d03d487 Bug 1761438 - Stop using 8.3 names in PSM. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D142051
2022-03-26 00:52:07 +00:00
John Schanck 09350fa150 Bug 1754896 - Enable EV Treatment for D-TRUST EV Root CA 1 2020. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D142141
2022-03-25 21:26:17 +00:00
Akihiko Odaki c169a6d4a8 Bug 1760977 - Do not copy nsCString in SandboxBrokerPolicyFactory.cpp r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D141947
2022-03-24 10:12:35 +00:00
Dana Keeler 7cd23429ff Bug 1088140 - support RSA-PSS signatures on certificates in the certificate verifier r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D141780
2022-03-24 21:34:21 +00:00
John Schanck caf282f02b Bug 1758579 - land NSS NSS_3_77_BETA1 UPGRADE_NSS_RELEASE, r=keeler
2022-03-24  John M. Schanck  <jschanck@mozilla.com>

	* lib/ckfw/builtins/certdata.txt:
	Bug 1754890 - Add two D-TRUST 2020 root certificates.
	r=KathleenWilson

	[f63fb86db692] [NSS_3_77_BETA1]

	* lib/ckfw/builtins/certdata.txt:
	Bug 1751298 - Add Telia Root CA v2 root certificate.
	r=KathleenWilson

	[1fcbbd7e4f5f]

	* lib/ckfw/builtins/certdata.txt:
	Bug 1751305 - Remove expired explicitly distrusted certificates from
	certdata.txt. r=KathleenWilson

	[b722e523d662]

2022-03-23  Dana Keeler  <dkeeler@mozilla.com>

	* gtests/mozpkix_gtest/pkixcheck_CheckSignatureAlgorithm_tests.cpp,
	gtests/mozpkix_gtest/pkixder_pki_types_tests.cpp,
	gtests/mozpkix_gtest/pkixgtest.h,
	gtests/mozpkix_gtest/pkixnss_tests.cpp,
	lib/mozpkix/include/pkix/pkixder.h,
	lib/mozpkix/include/pkix/pkixnss.h,
	lib/mozpkix/include/pkix/pkixtypes.h, lib/mozpkix/lib/pkixc.cpp,
	lib/mozpkix/lib/pkixcheck.cpp, lib/mozpkix/lib/pkixder.cpp,
	lib/mozpkix/lib/pkixnss.cpp, lib/mozpkix/lib/pkixverify.cpp,
	lib/mozpkix/test-lib/pkixtestnss.cpp:
	Bug 1005084 - support specific RSA-PSS parameters in mozilla::pkix
	r=jschanck

	This patch adds support to mozilla::pkix for certificates signed
	with RSA-PSS using one of the following parameters permitted by the
	CA/Browser Forum Baseline Requirements 1.8.1:

	* SHA-256, MGF-1 with SHA-256, and a salt length of 32 bytes
	* SHA-384, MGF-1 with SHA-384, and a salt length of 48 bytes
	* SHA-512, MGF-1 with SHA-512, and a salt length of 64 bytes

	[853b64626b19]

2022-03-23  John M. Schanck  <jschanck@mozilla.com>

	* lib/util/secasn1d.c:
	Bug 1753535 - Remove obsolete stateEnd check in
	SEC_ASN1DecoderUpdate. r=rrelyea

	The `stateEnd->parent != state` check was added in Bug 95458 to
	avoid a crash in `sec_asn1d_free_child`. The diagnosis in Bug 95458
	is incorrect---the crash was actually due to a `PORT_Assert(0)` that
	was meant to highlight a memory leak when `SEC_ASN1DecoderStart` was
	called with `their_pool==NULL`. The offending assertion was removed
	in Bug 95311, which makes the `stateEnd` check obsolete. In Bug
	1753535 it was observed that the `stateEnd` check could read from a
	poisoned region of an arena when the decoder was used in a streaming
	mode. This read-after-poison could lead to an arena memory leak,
	although this is mitigated by the fact that the read-after-poison is
	on an error-handling path where the caller typically frees the
	entire arena.

	[800111fa3bf8]

	* lib/dev/dev.h, lib/dev/devslot.c, lib/dev/devt.h,
	lib/dev/devtoken.c, lib/pk11wrap/dev3hack.c:
	Bug 1756271 - Remove token member from NSSSlot struct. r=rrelyea

	[55052f78244c]

	* cmd/mpitests/mpi-test.c, lib/freebl/Makefile, lib/freebl/dh.c,
	lib/freebl/freebl_base.gypi, lib/freebl/manifest.mn,
	lib/freebl/mpi/mpprime.c, lib/freebl/mpi/mpprime.h,
	lib/freebl/pqg.c, lib/freebl/rsa.c, lib/freebl/secmpi.c,
	lib/freebl/secmpi.h:
	Bug 1602379 - Provide secure variants of mpp_pprime and
	mpp_make_prime. r=mt

	[b83ad33acd67]

2022-03-22  John M. Schanck  <jschanck@mozilla.com>

	* cmd/mpitests/mpi-test.c, lib/freebl/Makefile, lib/freebl/dh.c,
	lib/freebl/freebl_base.gypi, lib/freebl/manifest.mn,
	lib/freebl/mpi/mpprime.c, lib/freebl/mpi/mpprime.h,
	lib/freebl/pqg.c, lib/freebl/rsa.c, lib/freebl/secmpi.c,
	lib/freebl/secmpi.h:
	Backed out changeset 6c1092f5203f

	Caused Windows gyp build failures for cmd/mpitests
	[ffa1e4ce758a]

2022-03-22  Masatoshi Kimura  <VYV03354@nifty.ne.jp>

	* gtests/pk11_gtest/pk11_module_unittest.cc, lib/pk11wrap/pk11load.c:
	Bug 1757279 - Support UTF-8 library path in the module spec string.
	r=nss-reviewers,jschanck

	[31bce2dae97b]

	* gtests/base_gtest/Makefile, gtests/base_gtest/base_gtest.gyp,
	gtests/base_gtest/manifest.mn, gtests/base_gtest/utf8_unittest.cc,
	gtests/manifest.mn, lib/base/utf8.c, nss.gyp,
	tests/gtests/gtests.sh:
	Bug 1396616 - Update nssUTF8_Length to RFC 3629 and fix buffer
	overrun. r=nss-reviewers,jschanck

	[2f2c85648edb]

2022-03-22  John M. Schanck  <jschanck@mozilla.com>

	* cmd/mpitests/mpi-test.c, lib/freebl/Makefile, lib/freebl/dh.c,
	lib/freebl/freebl_base.gypi, lib/freebl/manifest.mn,
	lib/freebl/mpi/mpprime.c, lib/freebl/mpi/mpprime.h,
	lib/freebl/pqg.c, lib/freebl/rsa.c, lib/freebl/secmpi.c,
	lib/freebl/secmpi.h:
	Bug 1602379 - Provide secure variants of mpp_pprime and
	mpp_make_prime. r=mt

	[6c1092f5203f]

2022-03-22  Dennis Jackson  <djackson@mozilla.com>

	* automation/taskcluster/docker-builds/Dockerfile,
	automation/taskcluster/graph/src/extend.js:
	Bug 1760827 - Add a CI Target for gcc-11. r=nss-reviewers,nkulatova

	[d4a3bb7731b0]

	* automation/taskcluster/graph/src/extend.js:
	Bug 1760828 - Change to makefiles for gcc-4.8. r=nss-reviewers,mt

	[191e838399a6]

2022-03-22  J08nY  <johny@neuromancer.sk>

	* automation/taskcluster/graph/src/extend.js,
	gtests/google_test/VERSION, gtests/google_test/gtest/CMakeLists.txt,
	gtests/google_test/gtest/CONTRIBUTORS,
	gtests/google_test/gtest/README.md,
	gtests/google_test/gtest/cmake/gtest.pc.in,
	gtests/google_test/gtest/cmake/gtest_main.pc.in,
	gtests/google_test/gtest/cmake/internal_utils.cmake,
	gtests/google_test/gtest/docs/Pkgconfig.md,
	gtests/google_test/gtest/docs/README.md,
	gtests/google_test/gtest/docs/advanced.md,
	gtests/google_test/gtest/docs/faq.md,
	gtests/google_test/gtest/docs/primer.md,
	gtests/google_test/gtest/docs/pump_manual.md,
	gtests/google_test/gtest/docs/samples.md,
	gtests/google_test/gtest/include/gtest/gtest-death-test.h,
	gtests/google_test/gtest/include/gtest/gtest-matchers.h,
	gtests/google_test/gtest/include/gtest/gtest-message.h,
	gtests/google_test/gtest/include/gtest/gtest-param-test.h,
	gtests/google_test/gtest/include/gtest/gtest-printers.h,
	gtests/google_test/gtest/include/gtest/gtest-spi.h,
	gtests/google_test/gtest/include/gtest/gtest-test-part.h,
	gtests/google_test/gtest/include/gtest/gtest-typed-test.h,
	gtests/google_test/gtest/include/gtest/gtest.h,
	gtests/google_test/gtest/include/gtest/gtest_pred_impl.h,
	gtests/google_test/gtest/include/gtest/gtest_prod.h,
	gtests/google_test/gtest/include/gtest/internal/custom/gtest-port.h,
	gtests/google_test/gtest/include/gtest/internal/custom/gtest-
	printers.h,
	gtests/google_test/gtest/include/gtest/internal/custom/gtest.h,
	gtests/google_test/gtest/include/gtest/internal/gtest-death-test-
	internal.h, gtests/google_test/gtest/include/gtest/internal/gtest-
	filepath.h, gtests/google_test/gtest/include/gtest/internal/gtest-
	internal.h, gtests/google_test/gtest/include/gtest/internal/gtest-
	param-util.h, gtests/google_test/gtest/include/gtest/internal/gtest-
	port-arch.h, gtests/google_test/gtest/include/gtest/internal/gtest-
	port.h, gtests/google_test/gtest/include/gtest/internal/gtest-
	string.h, gtests/google_test/gtest/include/gtest/internal/gtest-
	type-util.h, gtests/google_test/gtest/include/gtest/internal/gtest-
	type-util.h.pump, gtests/google_test/gtest/samples/prime_tables.h,
	gtests/google_test/gtest/samples/sample1.cc,
	gtests/google_test/gtest/samples/sample1.h,
	gtests/google_test/gtest/samples/sample10_unittest.cc,
	gtests/google_test/gtest/samples/sample2.cc,
	gtests/google_test/gtest/samples/sample2.h,
	gtests/google_test/gtest/samples/sample2_unittest.cc,
	gtests/google_test/gtest/samples/sample3-inl.h,
	gtests/google_test/gtest/samples/sample3_unittest.cc,
	gtests/google_test/gtest/samples/sample4.h,
	gtests/google_test/gtest/samples/sample5_unittest.cc,
	gtests/google_test/gtest/samples/sample6_unittest.cc,
	gtests/google_test/gtest/samples/sample7_unittest.cc,
	gtests/google_test/gtest/samples/sample8_unittest.cc,
	gtests/google_test/gtest/samples/sample9_unittest.cc,
	gtests/google_test/gtest/scripts/README.md,
	gtests/google_test/gtest/scripts/gen_gtest_pred_impl.py,
	gtests/google_test/gtest/scripts/pump.py,
	gtests/google_test/gtest/scripts/release_docs.py,
	gtests/google_test/gtest/scripts/run_with_path.py,
	gtests/google_test/gtest/scripts/upload.py,
	gtests/google_test/gtest/src/gtest-death-test.cc,
	gtests/google_test/gtest/src/gtest-filepath.cc,
	gtests/google_test/gtest/src/gtest-internal-inl.h,
	gtests/google_test/gtest/src/gtest-matchers.cc,
	gtests/google_test/gtest/src/gtest-port.cc,
	gtests/google_test/gtest/src/gtest-printers.cc,
	gtests/google_test/gtest/src/gtest-test-part.cc,
	gtests/google_test/gtest/src/gtest-typed-test.cc,
	gtests/google_test/gtest/src/gtest.cc,
	gtests/google_test/gtest/src/gtest_main.cc,
	gtests/google_test/gtest/test/BUILD.bazel,
	gtests/google_test/gtest/test/googletest-catch-exceptions-test_.cc,
	gtests/google_test/gtest/test/googletest-death-test-test.cc,
	gtests/google_test/gtest/test/googletest-death-test_ex_test.cc,
	gtests/google_test/gtest/test/googletest-env-var-test.py,
	gtests/google_test/gtest/test/googletest-env-var-test_.cc,
	gtests/google_test/gtest/test/googletest-failfast-unittest.py,
	gtests/google_test/gtest/test/googletest-failfast-unittest_.cc,
	gtests/google_test/gtest/test/googletest-filepath-test.cc,
	gtests/google_test/gtest/test/googletest-filter-unittest_.cc,
	gtests/google_test/gtest/test/googletest-global-environment-
	unittest.py, gtests/google_test/gtest/test/googletest-global-
	environment-unittest_.cc, gtests/google_test/gtest/test/googletest-
	json-output-unittest.py, gtests/google_test/gtest/test/googletest-
	list-tests-unittest_.cc, gtests/google_test/gtest/test/googletest-
	listener-test.cc, gtests/google_test/gtest/test/googletest-message-
	test.cc, gtests/google_test/gtest/test/googletest-options-test.cc,
	gtests/google_test/gtest/test/googletest-output-test-golden-lin.txt,
	gtests/google_test/gtest/test/googletest-output-test.py,
	gtests/google_test/gtest/test/googletest-output-test_.cc,
	gtests/google_test/gtest/test/googletest-param-test-invalid-
	name1-test_.cc, gtests/google_test/gtest/test/googletest-param-test-
	invalid-name2-test_.cc, gtests/google_test/gtest/test/googletest-
	param-test-test.cc, gtests/google_test/gtest/test/googletest-param-
	test-test.h, gtests/google_test/gtest/test/googletest-param-
	test2-test.cc, gtests/google_test/gtest/test/googletest-port-
	test.cc, gtests/google_test/gtest/test/googletest-printers-test.cc,
	gtests/google_test/gtest/test/googletest-setuptestsuite-test.py,
	gtests/google_test/gtest/test/googletest-setuptestsuite-test_.cc,
	gtests/google_test/gtest/test/googletest-shuffle-test_.cc,
	gtests/google_test/gtest/test/googletest-test-part-test.cc,
	gtests/google_test/gtest/test/googletest-test2_test.cc,
	gtests/google_test/gtest/test/googletest-throw-on-failure-test_.cc,
	gtests/google_test/gtest/test/gtest-typed-test2_test.cc,
	gtests/google_test/gtest/test/gtest-typed-test_test.cc,
	gtests/google_test/gtest/test/gtest-typed-test_test.h,
	gtests/google_test/gtest/test/gtest-unittest-api_test.cc,
	gtests/google_test/gtest/test/gtest_assert_by_exception_test.cc,
	gtests/google_test/gtest/test/gtest_environment_test.cc,
	gtests/google_test/gtest/test/gtest_help_test.py,
	gtests/google_test/gtest/test/gtest_list_output_unittest.py,
	gtests/google_test/gtest/test/gtest_list_output_unittest_.cc,
	gtests/google_test/gtest/test/gtest_pred_impl_unittest.cc,
	gtests/google_test/gtest/test/gtest_premature_exit_test.cc,
	gtests/google_test/gtest/test/gtest_repeat_test.cc,
	gtests/google_test/gtest/test/gtest_skip_check_output_test.py,
	gtests/google_test/gtest/test/gtest_skip_test.cc,
	gtests/google_test/gtest/test/gtest_stress_test.cc,
	gtests/google_test/gtest/test/gtest_test_utils.py,
	gtests/google_test/gtest/test/gtest_throw_on_failure_ex_test.cc,
	gtests/google_test/gtest/test/gtest_unittest.cc,
	gtests/google_test/gtest/test/gtest_xml_outfiles_test.py,
	gtests/google_test/gtest/test/gtest_xml_output_unittest.py,
	gtests/google_test/gtest/test/gtest_xml_output_unittest_.cc,
	gtests/google_test/gtest/test/gtest_xml_test_utils.py,
	gtests/google_test/gtest/test/production.h,
	gtests/google_test/update.sh,
	gtests/ssl_gtest/ssl_agent_unittest.cc:
	Bug 1741688 - Update googletest to 1.11.0 r=nss-reviewers,mt

	[88249e154a23]

2022-03-22  Dennis Jackson  <djackson@mozilla.com>

	* gtests/ssl_gtest/tls_ech_unittest.cc, lib/ssl/ssl3con.c,
	lib/ssl/sslexp.h, lib/ssl/sslimpl.h, lib/ssl/sslsock.c,
	lib/ssl/tls13ech.c, lib/ssl/tls13ech.h:
	Bug 1759525 - Add SetTls13GreaseEchSize to experimental API. r=mt

	[c2f93669b92c]

2022-03-22  Leander Schwarz  <lschwarz@mozilla.com>

	* gtests/ssl_gtest/ssl_version_unittest.cc,
	gtests/ssl_gtest/tls_filter.cc, gtests/ssl_gtest/tls_filter.h,
	lib/ssl/tls13con.c:
	Bug 1755264 - TLS 1.3 Illegal legacy_version handling/alerts.
	r=djackson

	[7d931c59d09f]

2022-03-22  Dennis Jackson  <djackson@mozilla.com>

	* lib/ssl/tls13ech.c:
	Bug 1755904 - Fix calculation of ECH HRR Transcript. r=mt

	[33c530e653b3]

2022-03-22  Zi Lin  <lziest@chromium.org>

	* coreconf/Linux.mk:
	Bug 1758741 - Allow ld path to be set as environment variable. r=mt

	Submitted on behalf of Zi Lin, the author of the patch.

	[d9368381598f]

2022-03-22  Dennis Jackson  <djackson@mozilla.com>

	* gtests/ssl_gtest/tls_connect.cc:
	Bug 1760653 - Ensure we don't read uninitialized memory in ssl
	gtests. r=mt,nss-reviewers

	[9a7b3c7f4e70]

	* cpputil/databuffer.h:
	Bug 1758478 - Fix DataBuffer Move Assignment. r=mt

	[f12fd43d69c7]

2022-03-18  Robert Relyea  <rrelyea@redhat.com>

	* automation/abi-check/expected-report-libnss3.so.txt, automation/abi-
	check/expected-report-libssl3.so.txt,
	gtests/ssl_gtest/ssl_auth_unittest.cc, lib/certdb/cert.h,
	lib/certdb/certdb.c, lib/nss/nss.def, lib/pk11wrap/pk11obj.c,
	lib/pk11wrap/pk11pub.h, lib/ssl/authcert.c, lib/ssl/ssl.def,
	lib/ssl/ssl.h, lib/ssl/ssl3con.c, lib/ssl/sslimpl.h,
	lib/ssl/sslsock.c, lib/ssl/tls13con.c, lib/ssl/tls13subcerts.c,
	mach, tests/ssl/ssl.sh, tests/ssl/sslauth.txt:
	Bug 1552254 internal_error alert on Certificate Request with
	sha1+ecdsa in TLS 1.3

	We need to be able to select Client certificates based on the
	schemes sent to us from the server. Rather than changing the
	callback function, this patch adds those schemes to the ssl socket
	info as suggested by Dana. In addition, two helpful functions have
	been added to aid User applications in properly selecting the
	Certificate: PRBool SSL_CertIsUsable(PRFileDesc *fd, CERTCertificate
	*cert) - returns true if the given cert matches the schemes of the
	server, the schemes configured on the socket, capability of the
	token the private key resides on, and the current policy. For future
	SSL protocol, additional restrictions may be parsed.
	SSL_FilterCertListBySocket(PRFileDesc *fd, CERTCertList *certlist) -
	removes the certs from the cert list that doesn't pass the
	SSL_CertIsUsable() call.

	In addition the built in cert selection function
	(NSS_GetClientAuthData) uses the above functions to filter the list.
	In order to support the NSS_GetClientAuthData three new functions
	have been added: SECStatus
	CERT_FilterCertListByNickname(CERTCertList *certList, char
	*nickname, void *pwarg) -- removes the certs that don't match the
	'nickname'. SECStatus CERT_FilterCertListByCertList(CERTCertlist
	*certList, const CERTCertlist *filterList ) -- removes all the certs
	on the first cert list that isn't on the second. PRBool
	CERT_IsInList(CERTCertificate *, const CERTCertList *certList) --
	returns true if cert is on certList.

	In addition
	 * PK11_FindObjectForCert() is exported so the token the cert lives on
	can be accessed.
	 * the ssle ssl_PickClientSignatureScheme() function (along with
	several supporing functions) have been modified so it can be used by
	SSL_CertIsUsable()

	[be6a97823bfe]

Differential Revision: https://phabricator.services.mozilla.com/D141995
2022-03-24 21:34:20 +00:00
Noemi Erli 6ff7bd4003 Backed out changeset 624ac865ee72 (bug 1760977) for causing browser-chrome failures CLOSED TREE 2022-03-24 17:36:25 +02:00
Akihiko Odaki 6218042835 Bug 1760977 - Do not copy nsCString in SandboxBrokerPolicyFactory.cpp r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D141947
2022-03-24 14:43:03 +00:00
ffxbld f222aa0e79 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D141952
2022-03-24 12:55:16 +00:00
Mitchell Hentges 14386d0c7e Bug 1717104: Activate virtualenv before running command r=perftest-reviewers,ahal,AlexandruIonescu
All commands declaring a virtualenv will have them activated before the
command executes. Removes all now-redundant manual activations of
declared virtualenvs.

Commands that don't declare a virtualenv will still implicitly be
associated with the "common" virtualenv, but unlike explicit
virtualenv declarations it'll have to be activated manually, just
like it was before this patch.

To smooth the migration with existing usages, virtualenv activation
behaviour was changed slightly: if attempting to activate a new
virtualenv, but the source venv is already command venv, then raise an
exception. (In the future, we should improve testability of
virtualenv scaffolding logic so that tests can be added for this
sort of thing.) This did cause some issues with some tests, which
will be solved more cleanly with bug 1724273. In the meantime,
minimal modifications were made to failing tests to keep them green:
* `test_command_line.py` was activating the `common` virtualenv so
  that it could install `mozproxy`, and use its CLI. Instead, I
  modified the test to use `mozproxy` using the "module" interface
  (`python -m mozproxy ...`). At that point, `MozbuildObject` was
  unnecessary and usages were replaced with simpler variants.
* `test_vendor.py` needed its explicit `activate_virtualenv()` call
  patched out. It still needs to use a virtualenv's Python
  executable, but due to `sys.executable` now being kept up-to-date
  as of bug 1717051, it could be used directly.

Differential Revision: https://phabricator.services.mozilla.com/D122892
2022-03-23 14:50:45 +00:00
Akihiko Odaki d333790384 Bug 1756087 - Amend sandbox policy for libdrm r=jld
Before this change, it was assumed that	readlink operation might be
performed on /sys if the driver is AMD. However, the operation would
always be performed by Mesa via libdrm if the device is PCI. In fact,
blocking the operation breaks virtio_gpu.

The readlink operation is part of invoking
realpath("/sys/dev/char/<PCI>/device/subsystem") so the read only
permissions for the file and the ancestor directories are added.

The permissions for the resolved real directory and its files are
already set, but the directory path is modified in libdrm when the
device is virtio_gpu. The path modification is also ported to the
sandbox policy.

Differential Revision: https://phabricator.services.mozilla.com/D139095
2022-03-23 02:27:36 +00:00
ffxbld 2c8ee764d5 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D141587
2022-03-22 21:16:41 +00:00
Randell Jesup 08b1e68cb1 Bug 1207753 - security/certverifier thread-safety annotations r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D131878
2022-03-21 20:06:01 +00:00
Butkovits Atila d07fe98979 Backed out changeset d656b8bf9cd2 for causing Xpcshell failures. CLOSED TREE 2022-03-21 19:35:39 +02:00
ffxbld 3ad2043646 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D141587
2022-03-21 13:45:03 +00:00
Dana Keeler 17cf83dc9c Bug 1757138 - atomically write DataStorage data and kick off a write when backgrounded r=agi,jschanck
DataStorage writes should be atomic to avoid losing data if writing is
interrupted. Additionally, on mobile, if the app is backgrounded, it is more
likely to be killed, so an asynchronous write should be kicked off to hopefully
avoid losing data.

Differential Revision: https://phabricator.services.mozilla.com/D140788
2022-03-17 17:51:16 +00:00
ffxbld 91ea4f78c1 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D141339
2022-03-17 16:33:07 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
criss b61bbd064d Merge autoland to mozilla-central. a=merge 2022-03-16 11:49:56 +02:00
Haik Aftandilian e08fe4e5c5 Bug 1759408 - [macOS] Add sandboxing tests to more process types r=gerard-majax
Add the WindowServer test and process launch tests to each Mac child process type.

Differential Revision: https://phabricator.services.mozilla.com/D140941
2022-03-16 04:36:54 +00:00
ffxbld 39212588cc No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D140957
2022-03-15 16:18:49 +00:00
Cosmin Sabou 74d7d4ed0c Backed out changeset 49a22cd6d6ee (bug 1759408) for causing build bustages on SandboxTestingChildTests.h. CLOSED TREE 2022-03-15 08:09:09 +02:00
Haik Aftandilian 5500a5a34a Bug 1759408 - [macOS] Add sandboxing tests to more process types r=gerard-majax
Add the WindowServer test and process launch tests to each Mac child process type.

Differential Revision: https://phabricator.services.mozilla.com/D140941
2022-03-15 05:47:18 +00:00
ffxbld 9cbbc57fb9 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D140905
2022-03-12 02:15:24 +00:00
Mark Banner 8bb4667fae Bug 1758474 - Implement an ESLint rule to disallow passing {} as the target parameter for ChromeUtils.import. r=Gijs,mossop,perftest-reviewers,preferences-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D140517
2022-03-11 16:41:29 +00:00
Dana Keeler 3f93068a72 Bug 1756061 - PSM changes corresponding to mozilla::pkix signature verification changes in bug 1755092 r=jschanck
Bug 1755092 changed how mozilla::pkix verifies signatures. This patch makes the
corresponding changes in PSM.

Depends on D140597

Differential Revision: https://phabricator.services.mozilla.com/D139202
2022-03-10 23:21:00 +00:00
John Schanck 5075ae5d88 Bug 1758579 - land NSS be8a62f85be7 UPGRADE_NSS_RELEASE, r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D140597
2022-03-10 23:20:59 +00:00
ffxbld 65a682de7f No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D140720
2022-03-10 14:28:10 +00:00
smolnar e89faa903f Backed out changeset 5018856d8fee (bug 1758474) for causing node eslint failure. CLOSED TREE 2022-03-10 11:58:45 +02:00
Mark Banner fe937b78bd Bug 1758474 - Implement an ESLint rule to disallow passing {} as the target parameter for ChromeUtils.import. r=Gijs,mossop,perftest-reviewers,preferences-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D140517
2022-03-10 09:25:28 +00:00
Dana Keeler 23c938c2f3 Bug 1615974 - avoid memmapping CRLite filters in cert_storage r=jschanck,robwu
Differential Revision: https://phabricator.services.mozilla.com/D140266
2022-03-09 22:46:15 +00:00
Julien Wajsberg 5aed3f508f Bug 1756791 - Allow the getcpu syscall in the sandbox r=gcp
Recently bug 1753305 introduced the use of the getcpu syscall to add
this information to a profiler marker, but didn't allow this syscall
from the sandbox. In most situations this syscall doesn't happen because
of the VDSO mechanism. However in the cases where VDSO isn't used such
as running under rr, the sandbox crashes the process when starting the
profiler.

Thanks :padenot, :lissyx, :jcristau for all the help.

Differential Revision: https://phabricator.services.mozilla.com/D139712
2022-03-09 10:15:14 +00:00
Gerald Squelart 5802980a6e Bug 1757596 - #include "mozilla/ProfilerThreadSleep.h" instead of GeckoProfiler.h where possible - r=florian
And in one case, #include "mozilla/ProfilerThreadState.h" where only `AUTO_PROFILER_THREAD_WAKE` is used.

Depends on D140172

Differential Revision: https://phabricator.services.mozilla.com/D140173
2022-03-08 10:32:44 +00:00
ffxbld db387700ea No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D140491
2022-03-07 12:48:38 +00:00
Nika Layzell 05dc5e0d76 Bug 1754037 - Part 3c: Automatically update all ParamTraits implementations, r=ipc-reviewers,media-playback-reviewers,bryce,mccr8
Automatically generated rewrites of all ParamTraits and IPDLParamTraits
implementations in-tree to use IPC::Message{Reader,Writer}.

Differential Revision: https://phabricator.services.mozilla.com/D140004
2022-03-04 15:39:41 +00:00
Nika Layzell 5f06238318 Bug 1754037 - Part 3a: Manual changes to new ParamTraits API, r=ipc-reviewers,mccr8
This change does not build without the automatically rewritten changes from
part 3c, as every IPC::ParamTraits and IPDLParamTraits implementation needs to
be updated at once, but these are the manual changes which are required and not
handled by the automatic script.

Differential Revision: https://phabricator.services.mozilla.com/D140001
2022-03-04 15:39:40 +00:00
ffxbld 2d09a94c14 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D140176
2022-03-03 14:10:26 +00:00
Dennis Jackson b5111d6214 Bug 1753980 - land NSS NSS_3_76_RTM UPGRADE_NSS_RELEASE, r=bbeurdouche DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D140180
2022-03-03 11:51:30 +00:00
John Schanck 47c887153f Bug 1750787 - get CRLite enrollment list from cert-revocations. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D139728
2022-03-02 18:19:25 +00:00
Jed Davis 9082363e4e Bug 1129492 - Remove X11 access from the Linux content process sandbox. r=gcp,jgilbert
Background: The X11 protocol has a very permissive security model;
clients have essentially full access to the windows of other clients,
and to global resources like input devices.  Previously, our sandbox
policy for content processes needed to allow access to the X server;
this limited its effectiveness against a dedicated attacker.

This patch turns on the `security.sandbox.content.headless` pref added
in bug 1640345, which removes the sandbox policy rules that allowed
making new X11 connections, as well as opening the Xauthority file,
reading hardware info needed by Mesa, etc.  It also runs content
processes in headless mode (whence the name) so they won't connect to a
display server at startup.

This also removes access to the Wayland compositor: the sandbox policy
never allowed that (as of when socket connections became default-deny),
but now content processes won't connect to it at startup.  Wayland is
more capability-oriented so this is less significant for security, but at
a minimum it removes unnecessary attack surface.

Note that if the `webgl.out-of-process` pref is turned off, WebGL
will break unless `security.sandbox.content.headless` is also turned
off.  (Similarly, `widget.non-native-theme.enabled` is needed to render
scrollbars and form controls in content.)  As a result, this patch
adjusts the job definitions used by CI to test in-process WebGL so that
that they will continue to work.

Differential Revision: https://phabricator.services.mozilla.com/D138613
2022-03-01 20:36:18 +00:00
ffxbld afffec69b7 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D139826
2022-02-28 13:13:10 +00:00
Dennis Jackson 1eca8a6827 Bug 1753980 - land NSS NSS_3_76_BETA1 UPGRADE_NSS_RELEASE, r=jschanck
2022-02-24  John M. Schanck  <jschanck@mozilla.com>

	* lib/pki/trustdomain.c:
	Bug 1755555 - Hold tokensLock through nssToken_GetSlot calls in
	nssTrustDomain_GetActiveSlots. r=rrelyea

	[a36477f0ee50] [NSS_3_76_BETA1]

2022-02-23  John M. Schanck  <jschanck@mozilla.com>

	* lib/certdb/crl.c, lib/certdb/stanpcertdb.c, lib/dev/devtoken.c,
	lib/dev/devutil.c, lib/pk11wrap/pk11auth.c, lib/pk11wrap/pk11cert.c,
	lib/pk11wrap/pk11nobj.c, lib/pk11wrap/pk11slot.c,
	lib/pk11wrap/pk11util.c, lib/pk11wrap/secmodti.h,
	lib/pki/pki3hack.c, lib/pki/trustdomain.c:
	Bug 1370866 - Check return value of PK11Slot_GetNSSToken. r=djackson

	[d7e8c2df6bca]

Differential Revision: https://phabricator.services.mozilla.com/D139588
2022-02-24 18:15:43 +00:00
ffxbld 88111eadd6 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D139581
2022-02-24 13:59:41 +00:00
ffxbld a78cf21c03 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update a=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D139273
2022-02-22 15:05:34 +00:00
Jens Stutte 8dc1e5affa Bug 1750635: Substitute AppShutdown:IsShuttingDown with equivalent AppShutdown::IsInOrBeyond. r=florian,xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D139143
2022-02-18 19:35:13 +00:00
Tom Ritter cfbe02ff6e Bug 1750859: If not all decoders are remoted, you're disqualified from win32k r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D139043
2022-02-17 18:59:17 +00:00
Sergey Galich 2924bdb35f Bug 1653486 - Replace all non-user-facing references to "master" password. r=dimi,tgiles,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D138113
2022-02-17 17:29:57 +00:00
ffxbld fd59e8d9be No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D139007
2022-02-17 13:37:52 +00:00
Dana Keeler f05d29b7f8 Bug 1754217 - remove brittle time format APIs from nsIX509CertValidity r=jschanck
nsIX509CertValidity had a handful of APIs that would return formatted time
values. Some of these APIs were unused, and the rest were prone to error due to
platform differences. This patch simplifies this interface by removing those
APIs and having callers perform their own formatting using the remaining APIs
that return PRTime values.

Differential Revision: https://phabricator.services.mozilla.com/D138363
2022-02-15 22:55:02 +00:00
Dennis Jackson ac3025042a Bug 1753980 - land NSS 4a8880ef UPGRADE_NSS_RELEASE, r=bbeurdouche
```
2022-02-14  Martin Thomson  <mt@lowentropy.net>

	* gtests/common/testvectors/rsa_pss_2048_sha1_mgf1_20-vectors.h,
	gtests/common/testvectors/rsa_pss_2048_sha256_mgf1_0-vectors.h,
	gtests/common/testvectors/rsa_pss_2048_sha256_mgf1_32-vectors.h,
	gtests/common/testvectors/rsa_pss_3072_sha256_mgf1_32-vectors.h,
	gtests/common/testvectors/rsa_pss_4096_sha256_mgf1_32-vectors.h,
	gtests/common/testvectors/rsa_pss_4096_sha512_mgf1_32-vectors.h,
	gtests/common/testvectors/rsa_pss_misc-vectors.h,
	gtests/common/wycheproof/genTestVectors.py, gtests/common/wycheproof
	/source_vectors/rsa_pss_2048_sha1_mgf1_20_test.json, gtests/common/w
	ycheproof/source_vectors/rsa_pss_2048_sha256_mgf1_0_test.json, gtest
	s/common/wycheproof/source_vectors/rsa_pss_2048_sha256_mgf1_32_test.
	json, gtests/common/wycheproof/source_vectors/rsa_pss_3072_sha256_mg
	f1_32_test.json, gtests/common/wycheproof/source_vectors/rsa_pss_409
	6_sha256_mgf1_32_test.json, gtests/common/wycheproof/source_vectors/
	rsa_pss_4096_sha512_mgf1_32_test.json,
	gtests/common/wycheproof/source_vectors/rsa_pss_misc_test.json,
	gtests/pk11_gtest/json.h, gtests/pk11_gtest/pk11_hpke_unittest.cc,
	gtests/pk11_gtest/pk11_rsapss_unittest.cc:
	Bug 1747957 - Use Wycheproof JSON for RSASSA-PSS, r=nss-
	reviewers,bbeurdouche

	[4a8880ef1adc] [tip]

2022-02-10  Leander Schwarz  <lschwarz@mozilla.com>

	* gtests/ssl_gtest/ssl_extension_unittest.cc,
	gtests/ssl_gtest/tls_ech_unittest.cc, lib/ssl/ssl3ext.c:
	Bug 1751157 - Throw illegal_parameter alert for illegal extensions
	in handshake message. r=djackson

	[8fd5ca0cf897]

2022-02-09  John M. Schanck  <jschanck@mozilla.com>

	* automation/release/nss-release-helper.py:
	Bug 1753505 - Avoid truncating files in nss-release-helper.py.
	r=bbeurdouche

	[7876a7255030]

2022-02-08  John M. Schanck  <jschanck@mozilla.com>

	* lib/ckfw/builtins/certdata.txt:
	Bug 1679803 - Add SHA256 fingerprint comments to old certdata.txt
	entries. r=nss-reviewers,bbeurdouche

	The new SHA256 hashes were calculated using the script below, which
	reads certificates out of the builtin token and re-processing them
	with the current version of addbuiltin. One of the "Autoridad de
	Certificacion Firmaprofesional CIF A62634068" certificates had to be
	handled manually because of Bug 456858.

	``` #!/bin/bash

	NSS_LIB=<path to dist/Debug/lib>

	WORK=/tmp/nssdb/ LIST=${WORK}/list.txt OUT=${WORK}/certdata.txt

	rm -rf ${WORK} mkdir -p ${WORK} modutil -force -dbdir "sql:${WORK}"
	-create modutil -force -dbdir "sql:${WORK}" -add "nssckbi" -libfile
	"${NSS_LIB}/libnssckbi.so"

	certutil -d "sql:${WORK}" -L -h "Builtin Object Token" | grep
	Builtin > ${LIST} sed -i 's/\s*\(C\?,C\?,C\?\)\s*$/;\1/' ${LIST}

	while IFS=";" read -r name trust do certutil -d "sql:${WORK}" -L -n
	"${name}" -r 1> "${WORK}/${name}.der" addbuiltin -t "${trust}" -n
	"${name/Builtin Object Token:/}" -i "${WORK}/${name}.der" done <
	${LIST} >> ${OUT} ```

	[7a34cf74b659]
```

Differential Revision: https://phabricator.services.mozilla.com/D138799
2022-02-15 18:04:14 +00:00
Haik Aftandilian e1863039f6 Bug 1707739 - Re-enable browser_content_sandbox_fs.js r=spohl
Change browser_content_sandbox_fs.js to not assume the font registry directory or the 'font' file have been created by the system. If the directory and or file are not present, skip the readability test instead of failing.

Differential Revision: https://phabricator.services.mozilla.com/D138622
2022-02-15 16:13:55 +00:00
John Schanck 2654fbb629 Bug 1753071 - Add a "confirm revocations" mode to CRLite. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D137553
2022-02-14 18:55:21 +00:00
ffxbld 79d6ccf336 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D138643
2022-02-14 17:57:46 +00:00