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

15812 Коммитов

Автор SHA1 Сообщение Дата
Jed Davis 8262eb0e29 Bug 1690921 - Detect socket syscalls only once per process when building Linux sandbox policies. r=gcp
The function to detect whether the kernel has separate syscalls for
socket operations (rather than only `socketcall`) had a comment that
it's called only once, which is no longer true.  So, this seems like a
good time to add a cache (but not on newer archs like `x86_64` where the
answer is constant).

This patch also removes the ifdefs on `__NR_socket`, because all archs
have it now, and our local headers will define it even if the build
host's headers don't.

Differential Revision: https://phabricator.services.mozilla.com/D105853
2021-03-12 21:12:11 +00:00
Jed Davis 2d6db34852 Bug 1690921 - Limit IPC `sendmsg` gather list sizes based on socket buffer capacity. r=mccr8,gcp
When setting up calls to `sendmsg` for IPC on Unix systems, we generate
`iovec`s for the entire message or until the `IOV_MAX` limit is reached,
whichever comes first.  However, messages can be very large (up to 256
MiB currently), while the OS socket buffer is relatively small (8KiB on
macOS and FreeBSD, ~200KiB on Linux).

This patch detects the socket buffer size with the `SO_SNDBUF` socket
option and cuts off the `iovec` array after it's reached; it also adjusts
the Linux sandbox policy to allow reading that value in all processes.

On my test machines this increases throughput on large messages by about
2.5x on macOS (from ~0.3 to ~0.7 GB/s), but on Linux the improvement is
only about 5% (most of the running time is spent elsewhere).

Differential Revision: https://phabricator.services.mozilla.com/D105852
2021-03-12 21:12:10 +00:00
Simon Giesecke 7d2448b7d5 Bug 1641178 - Add NSSCipherStrategy. r=dom-workers-and-storage-reviewers,jcj,janv
Differential Revision: https://phabricator.services.mozilla.com/D73290
2021-03-12 09:31:57 +00:00
Emilio Cobos Álvarez d2b2c7b5e6 Bug 1697847 - Update crossbeam-utils in the tree. r=firefox-build-system-reviewers,mhentges,sheehan
We're already vendoring 0.8 so no reason not to do this. We're still
held back by an ancient tokio version, which I filed bug 1697845 for.

There are no breaking changes that affect any of our internal consumers.

Differential Revision: https://phabricator.services.mozilla.com/D108046
2021-03-11 18:15:44 +00:00
ffxbld 7a166f31cf No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D108027
2021-03-11 15:02:46 +00:00
Jan Alexander Steffens (heftig) 4920407bb3 Bug 1696845 - Use dlsym for gdk_*_display_get_type. r=stransky
Using `dlsym` for `gdk_wayland_display_get_type` is a cleaner solution
to bug 1696319, allowing running with a GTK that lacks the Wayland
backend.

Also adds a symmetric implementation for `gdk_x11_display_get_type`,
which should help running without X11.

Differential Revision: https://phabricator.services.mozilla.com/D107406
2021-03-11 14:32:53 +00:00
Benjamin Beurdouche f8d14645f7 Bug 1694020 - land NSS 61e70233f80e UPGRADE_NSS_RELEASE, r=beurdouche
2021-03-10  Benjamin Beurdouche  <bbeurdouche@mozilla.com>

	* cmd/bltest/blapitest.c, lib/freebl/blapi.h,
	lib/freebl/chacha20poly1305-ppc.c, lib/freebl/chacha20poly1305.c,
	lib/freebl/loader.c:
	Bug 1613235 - Clang-format for: POWER ChaCha20 stream cipher vector
	acceleration r=beurdouche

	Depends on D107221

	[61e70233f80e] [tip]

2021-03-10  aoeu  <aoeuh@yandex.ru>

	* cmd/bltest/blapitest.c, lib/freebl/blapi.h, lib/freebl/blapit.h,
	lib/freebl/chacha20poly1305.c, lib/freebl/chacha20poly1305.h,
	lib/freebl/ldvector.c, lib/freebl/loader.c, lib/freebl/loader.h:
	Bug 1613235 - Add POWER ChaCha20 stream cipher vector acceleration.
	r=bbeurdouche

	Depends on D107220

	[4f7ba08bd991]

	* lib/freebl/Makefile, lib/freebl/chacha20-ppc64le.S,
	lib/freebl/chacha20poly1305-ppc.c, lib/freebl/chacha20poly1305.c,
	lib/freebl/freebl.gyp, lib/freebl/freebl_base.gypi:
	Bug 1613235 - Add POWER ChaCha20 stream cipher vector acceleration.
	r=bbeurdouche

	[764124fddaa2]

2021-03-10  Benjamin Beurdouche  <bbeurdouche@mozilla.com>

	* lib/freebl/ecl/ecp_secp384r1.c, lib/freebl/ecl/ecp_secp521r1.c:
	Bug 1697380 - Make a clang-format run on top of helpful
	contributions. r=beurdouche

	Depends on D106881

	[8a9174a78207]

	* lib/freebl/ecl/ecp_secp384r1.c:
	Bug 1683520 - ECCKiila P384, change syntax of nested structs
	initialization to prevent build isses with GCC 4.8. r=bbrumley

	Depends on D102389

	[150cbb169f1e]

2021-03-10  Billy Brumley  <bbrumley@gmail.com>

	* lib/freebl/ecl/ecp_secp384r1.c:
	Bug 1683520 - [lib/freebl/ecl] P-384: allow zero scalars in dual
	scalar multiplication r=bbeurdouche

	[76aca2d944ae]

2021-03-10  Benjamin Beurdouche  <bbeurdouche@mozilla.com>

	* lib/freebl/ecl/ecp_secp521r1.c:
	Bug 1683520 - ECCKiila P521, change syntax of nested structs
	initialization to prevent build isses with GCC 4.8. r=bbrumley

	Depends on D102406

	[5e7affa3ce43]

2021-03-10  Billy Brumley  <bbrumley@gmail.com>

	* lib/freebl/ecl/ecp_secp521r1.c:
	Bug 1683520 - [lib/freebl/ecl] P-521: allow zero scalars in dual
	scalar multiplication r=bbeurdouche

	[a8f4918cd546]

2021-03-08  Benjamin Beurdouche  <bbeurdouche@mozilla.com>

	* automation/taskcluster/scripts/run_hacl.sh,
	lib/freebl/verified/Hacl_Bignum25519_51.h,
	lib/freebl/verified/Hacl_Chacha20.c,
	lib/freebl/verified/Hacl_Chacha20.h,
	lib/freebl/verified/Hacl_Chacha20Poly1305_128.c,
	lib/freebl/verified/Hacl_Chacha20Poly1305_128.h,
	lib/freebl/verified/Hacl_Chacha20Poly1305_256.c,
	lib/freebl/verified/Hacl_Chacha20Poly1305_256.h,
	lib/freebl/verified/Hacl_Chacha20Poly1305_32.c,
	lib/freebl/verified/Hacl_Chacha20Poly1305_32.h,
	lib/freebl/verified/Hacl_Chacha20_Vec128.c,
	lib/freebl/verified/Hacl_Chacha20_Vec128.h,
	lib/freebl/verified/Hacl_Chacha20_Vec256.c,
	lib/freebl/verified/Hacl_Chacha20_Vec256.h,
	lib/freebl/verified/Hacl_Curve25519_51.c,
	lib/freebl/verified/Hacl_Curve25519_51.h,
	lib/freebl/verified/Hacl_Kremlib.h,
	lib/freebl/verified/Hacl_Poly1305_128.c,
	lib/freebl/verified/Hacl_Poly1305_128.h,
	lib/freebl/verified/Hacl_Poly1305_256.c,
	lib/freebl/verified/Hacl_Poly1305_256.h,
	lib/freebl/verified/Hacl_Poly1305_32.c,
	lib/freebl/verified/Hacl_Poly1305_32.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/target.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/types.h,
	lib/freebl/verified/kremlin/kremlib/dist/minimal/FStar_UInt128.h, li
	b/freebl/verified/kremlin/kremlib/dist/minimal/FStar_UInt128_Verifie
	d.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/FStar_UInt_8_1
	6_32_64.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/LowStar_
	Endianness.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/fstar
	_uint128_gcc64.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/f
	star_uint128_msvc.h, lib/freebl/verified/libintvector.h:
	Bug 1696800 - HACL* update March 2021 -
	c95ab70fcb2bc21025d8845281bc4bc8987ca683 r=beurdouche

	[3a85b452dbfa]

Differential Revision: https://phabricator.services.mozilla.com/D107995
2021-03-11 11:59:55 +00:00
Brindusan Cristian 208b2f5229 Backed out changeset 4f957141bf5f (bug 1689726) for GTest failures in psm_TrustOverrideTest.CheckCertDNIsInList. CLOSED TREE 2021-03-11 03:51:08 +02:00
Moritz Birghan 1b3fa7a521 Bug 1689726 - avoid using NSS types in TrustOverrideUtils.h r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D106888
2021-03-11 00:07:30 +00:00
Bryce Seager van Dyk c7fc3894ed Bug 1694450 - Return Error(ENOSYS) for unsupported madvise args in the GMP process. r=jld
Because Widevine may probe madvise using advice arguments we do not currently
support, including invalid arguments, this patch changes the handling of these
args so we will not crash in nightly.

Differential Revision: https://phabricator.services.mozilla.com/D106537
2021-03-10 20:58:44 +00:00
Dana Keeler 69dcaa6539 Bug 1694542 - cache intermediate certificates on the socket thread when it is idle r=mbirghan,rmf
Firefox sometimes caches intermediate certificates from verified connections in
case they are useful in the future. This operation involves modifying the NSS
cert database, and so should only be done on the socket thread (ideally when it
is idle).

Differential Revision: https://phabricator.services.mozilla.com/D106230
2021-03-10 17:09:03 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Simon Giesecke eefee48405 Bug 1693541 - Improve uses of nsBaseHashtable and descendants and avoid multiple subsequent lookups in security/sandbox/linux/broker. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D106116
2021-03-10 10:37:05 +00:00
Narcis Beleuzu 198358fc15 Backed out changeset a4f4f640eaa7 (bug 1696845) for bustages on pangofc-fontmap.h 2021-03-10 04:49:51 +02:00
Jan Alexander Steffens (heftig) 1261a74d17 Bug 1696845 - Use dlsym for gdk_*_display_get_type. r=stransky
Using `dlsym` for `gdk_wayland_display_get_type` is a cleaner solution
to bug 1696319, allowing running with a GTK that lacks the Wayland
backend.

Also adds a symmetric implementation for `gdk_x11_display_get_type`,
which should help running without X11.

Differential Revision: https://phabricator.services.mozilla.com/D107406
2021-03-09 22:55:47 +00:00
Bob Owen 0066fab260 Bug 1570460: Add fonts path and named pipe creation to windows content process sandbox policy. r=handyman
These are needed for USER_LOCKDOWN access token level and untrusted integrity.

Differential Revision: https://phabricator.services.mozilla.com/D107464
2021-03-09 08:34:07 +00:00
Moritz Birghan ea7fdcc0e8 Bug 1683761 - Enable EV Treatment for AC RAIZ FNMT-RCM SERVIDORES SEGUROS root certificate. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D104701
2021-03-08 15:01:09 +00:00
ffxbld 082221c65a No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D107469
2021-03-08 14:53:46 +00:00
Benjamin Beurdouche 9bf82ef9c0 Bug 1693175 - Enable EV Treatment for GlobalSign E46 and R46 root certificates. r=mbirghan,keeler
Differential Revision: https://phabricator.services.mozilla.com/D106087
2021-03-08 07:43:56 +00:00
Benjamin Beurdouche 590564d9d4 Bug 1694020 - land NSS 38a91427d65fffd0d7f7d2b6d0bcee7dc8b77a37 UPGRADE_NSS_RELEASE, r=beurdouche
Differential Revision: https://phabricator.services.mozilla.com/D107084
2021-03-08 07:43:55 +00:00
Benjamin Beurdouche 0b601b7d20 Bug 1686856 - Remove GeoTrust PCA-G2 and VeriSign Universal root certs from TrustOverride-SymantecData.inc. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D105480
2021-03-08 07:43:55 +00:00
Benjamin Beurdouche f153ff93e4 Bug 1695332 - Update test_cert_isBuiltInRoot/isBuiltInRoot_reload.js r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D106719
2021-03-08 07:43:54 +00:00
ffxbld 53e685af65 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=jcristau
Differential Revision: https://phabricator.services.mozilla.com/D107218
2021-03-04 15:07:19 +00:00
Horst 9c2c4d3a52 Bug 1685883 - building with --disable-marionette fails with compile error r=keeler,whimboo,smaug
building firefox 84.0.2 from source (https://archive.mozilla.org/pub/firefox/releases/84.0.2/source/) fails when using `ac_add_options --disable-marionette` because of missing header

Differential Revision: https://phabricator.services.mozilla.com/D101390
2021-03-04 11:56:54 +00:00
Butkovits Atila 043c0bbe2d Backed out changeset 40a2cb2f242b (bug 1694020) on request from beurdouche, UPGRADE_NSS_RELEASE CLOSED TREE 2021-03-03 20:41:33 +02:00
Benjamin Beurdouche dd75eb4204 Bug 1694020 - land NSS 38a91427d65fffd0d7f7d2b6d0bcee7dc8b77a37 UPGRADE_NSS_RELEASE, r=beurdouche
Differential Revision: https://phabricator.services.mozilla.com/D107084
2021-03-03 17:24:10 +00:00
Sylvestre Ledru dd5945e932 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
Updated with rustfmt 1.4.18-stable (8157a3f 2020-07-15)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D106921
2021-03-02 15:35:36 +00:00
R. Martinho Fernandes 2b35c2ae19 Bug 1694464 - The osclientcert thread should have a name r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D106289
2021-03-02 11:42:38 +00:00
Valentin Gosu 0c7fa78a68 Bug 1681683 - Exclude OCSP channels from using TRR in mode3 r=necko-reviewers,kershaw
Otherwise the OCSP channel that tries to check the certificate for the DoH
server will also try to use TRR leading to DNS failures.

Differential Revision: https://phabricator.services.mozilla.com/D106884
2021-03-02 10:41:55 +00:00
ffxbld d9229f3d5b No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D106867
2021-03-02 04:01:34 +00:00
ffxbld bbc3cab1b3 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D106685
2021-02-27 00:22:47 +00:00
Simon Giesecke 2a40dba629 Bug 1693541 - Improve uses of nsBaseHashtable and descendants and avoid multiple subsequent lookups in security/manager/ssl/DataStorage.cpp. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D106102
2021-02-26 11:36:42 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Benjamin Beurdouche d787ba0177 Bug 1615687 - Certificate validation should respect CKA_NSS_EMAIL_DISTRUST_AFTER. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D84195
2021-02-25 19:17:01 +00:00
Dana Keeler 82d3c9c68c Bug 1690278 - osclientcerts: cache key handles to potentially avoid multiple pin prompts r=mbirghan
When osclientcerts obtains or uses an OS handle on a private key, the
underlying implementation may display some sort of authentication or pin
prompt. In some cases, caching this handle rather than obtaining it multiple
times can prevent multiple prompts. So, this is what this patch does.

Differential Revision: https://phabricator.services.mozilla.com/D106222
2021-02-25 19:07:22 +00:00
Butkovits Atila 22e752e996 Backed out changeset 8f7c25b71590 (bug 1641178) for causing GTest failures. CLOSED TREE 2021-02-24 18:14:23 +02:00
Simon Giesecke e09b49aa3d Bug 1641178 - Add NSSCipherStrategy. r=dom-workers-and-storage-reviewers,jcj,janv
Differential Revision: https://phabricator.services.mozilla.com/D73290
2021-02-24 13:18:24 +00:00
Benjamin Beurdouche 86775aa29e Bug 1692101 - Disable EV Treatment for Camerfirma's Chambers of Commerce Root - 2008 root certificate. r=mbirghan
Differential Revision: https://phabricator.services.mozilla.com/D106085
2021-02-23 15:12:58 +00:00
Bogdan Tara 3a7168e036 Backed out changeset 1d69ffd05b99 (bug 1683761) for failing assertion at ExtendedValidation CLOSED TREE
DONTBUILD
2021-02-23 11:43:03 +02:00
Moritz Birghan 2c3db5f78e Bug 1683761 - Enable EV Treatment for AC RAIZ FNMT-RCM SERVIDORES SEGUROS root certificate. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D104701
2021-02-23 09:09:56 +00:00
Haik Aftandilian 8a14bd779c Bug 1692220 - Add a test to ensure the com.apple.FontRegistry dir is readable from content processes r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D105822
2021-02-19 21:57:00 +00:00
Jonathan Kew 6a82712eab Bug 1692220 - Allow content-process read access to libFontRegistry caches. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D105801
2021-02-19 21:56:59 +00:00
Benjamin Beurdouche 76f4cfc3b7 Bug 1688685 - land NSS NSS_3_62_RTM UPGRADE_NSS_RELEASE, r=beurdouche
2021-02-19  Benjamin Beurdouche  <bbeurdouche@mozilla.com>

	* lib/nss/nss.h, lib/softoken/softkver.h, lib/util/nssutil.h:
	Set version numbers to 3.62 final
	[a8e045a9fff6] [NSS_3_62_RTM] <NSS_3_62_BRANCH>

2021-02-15  Benjamin Beurdouche  <bbeurdouche@mozilla.com>

	* .hgtags:
	Added tag NSS_3_62_BETA1 for changeset a5c857139b37
	[145c269c82d6] <NSS_3_62_BRANCH>

Differential Revision: https://phabricator.services.mozilla.com/D105739
2021-02-19 10:28:33 +00:00
Benjamin Beurdouche d3ac263f8c Backed out changeset 0b714d638157 (Bug 1692990) as it cause system nss build to fail. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D105737
2021-02-19 10:22:17 +00:00
ffxbld 782a30533f No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=jcristau
Differential Revision: https://phabricator.services.mozilla.com/D105627
2021-02-19 10:22:03 +00:00
Dragana Damjanovic f51b25f77b Bug 1511151 - Add a flag to allow client certs on CORS preflight connections r=necko-reviewers,keeler,valentin,kershaw
This is only used for CORS preflight requests. It is controlled by a pref.
Connections that server such request will be isolated from other anonymous connections.

Differential Revision: https://phabricator.services.mozilla.com/D96775
2021-02-18 18:58:17 +00:00
Alexis Beingessner ade0725530 Bug 1686616 - make GfxInfo use Components instead of Services. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D105522
2021-02-18 13:26:29 +00:00
Greg Tatum c9e1c0d512 Bug 1691751 - Fix Fluent linting whitespace issues; r=dminor,flod
Differential Revision: https://phabricator.services.mozilla.com/D105370
2021-02-17 21:02:49 +00:00
Benjamin Beurdouche 395f43422d Bug 1692990 - Changes to security/moz.build to allow building nssckbi-testlib in m-c. r=kjacobs
Differential Revision: https://phabricator.services.mozilla.com/D97630
2021-02-16 19:57:12 +00:00
Benjamin Beurdouche 6dfa84bd39 Bug 1688685 - land NSS NSS_3_62_BETA1 UPGRADE_NSS_RELEASE, r=mt
```
2021-02-05  Danh  <congdanhqx@gmail.com>

	* gtests/manifest.mn:
	Bug 1688374 - Fix parallel build NSS-3.61 with make. r=kjacobs

	[a5c857139b37] [NSS_3_62_BETA1]

2021-02-05  Robert Relyea  <rrelyea@redhat.com>

	* lib/libpkix/pkix/util/pkix_tools.c:
	Bug 1682044 pkix_Build_GatherCerts() + pkix_CacheCert_Add() can
	corrupt "cachedCertTable"

	Patch by Andrew Cagney Preliminary Review by Ryan Sleevie Tested
	against all.sh rrelyea. r=kjacobs

	(this bug is old)

	pkix_Build_GatherCerts() has two code paths for creating the list
	"certsFound":

	 pkix_CacheCert_Lookup() this sets "certsFound" to a new list
	"certsFound" and "cachedCertTable" share items but not the list

	 pkix_CacheCert_Add(pkix_pl_Pk11CertStore_CertQuery()) this sets
	"certsFound" to a new list; and then adds the list to
	"cachedCertTable" "certsFound" and "cachedCertTable" share a linked
	list

	Because the latter doesn't create a separate list, deleting list
	elements from "certsFound" can also delete list elements from within
	"cacheCertTable". And if this happens while pkix_CacheCert_Lookup()
	is trying to update the same element's reference, a core dump can
	result.

	In detail (note that reference counts may occasionally seem off by
	1, its because data is being captured before function local
	variables release their reference):

	pkix_Build_GatherCerts() calls pkix_pl_Pk11CertStore_CertQuery()
	(via a pointer) to sets "certsFound":

	 PKIX_CHECK(getCerts (certStore, state->certSel, state->verifyNode,
	&nbioContext, &certsFound, plContext), PKIX_GETCERTSFAILED);

	it then calls:

	 PKIX_CHECK(pkix_CacheCert_Add (certStore, certSelParams,
	certsFound, plContext), PKIX_CACHECERTADDFAILED);
	[dafda4eee75c]
```

Differential Revision: https://phabricator.services.mozilla.com/D105209
2021-02-16 10:39:36 +00:00