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

15680 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 9758d919eb Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-17 14:58:18 +00:00
ffxbld 377b7dd0c8 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D100015
2020-12-17 14:37:41 +00:00
Csoregi Natalia d8c9489b13 Backed out changeset 16d174e7c342 (bug 1583109) for bustage on nsReadableUtils.h. CLOSED TREE 2020-12-16 22:51:26 +02:00
Simon Giesecke 72babae175 Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-16 19:38:23 +00:00
smolnar 643005bb54 Backed out changeset b1c01a78a999 (bug 1676303) for perma failures in test_sanctions_symantec_apple_google.js CLOSED TREE 2020-12-16 22:04:49 +02:00
Simon Giesecke 9379d0240f Bug 1679987 - Use nsTokenizedRange where easily possible. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D98308
2020-12-16 19:10:34 +00:00
Moritz Birghan c5610a3897 Bug 1676303 - Remove 10 GeoTrust, thawte, and VeriSign root certs from TrustOverride-SymantecData.inc r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D97349
2020-12-16 15:07:06 +00:00
Kevin Jacobs d7a0965c77 Bug 1678208 - Remove expiring Delegated Credentials telemetry. r=keeler
This patch removes telemetry probes for TLS 1.3 Delegated Credentials. The
probes are expiring soon and we do not plan to run any more experiments that
would justify their renewal. There is no plan to enable this feature in beta or
release until the draft hits RFC stage.

Differential Revision: https://phabricator.services.mozilla.com/D99557
2020-12-15 21:16:22 +00:00
Bob Clary abb8b75cc4 Bug 1681104 - python3 - security/manager/tools/getCTKnownLogs.py - base64.decodestring -> base64.decodebytes. r=keeler
Depends on D98961

Differential Revision: https://phabricator.services.mozilla.com/D98962
2020-12-10 21:14:31 +00:00
ffxbld 978e531d38 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D99678
2020-12-14 14:31:26 +00:00
Kevin Jacobs b98935cc63 Bug 1677548 - land NSS NSS_3_60_RTM UPGRADE_NSS_RELEASE, r=bbeurdouche
2020-12-11  Kevin Jacobs  <kjacobs@mozilla.com>

	* lib/nss/nss.h, lib/softoken/softkver.h, lib/util/nssutil.h:
	Set version numbers to 3.60 final
	[2015cf6ca323] [NSS_3_60_RTM] <NSS_3_60_BRANCH>

2020-12-08  Kevin Jacobs  <kjacobs@mozilla.com>

	* .hgtags:
	Added tag NSS_3_60_BETA1 for changeset f84fb229842a
	[1fe6cb3c3874]

Differential Revision: https://phabricator.services.mozilla.com/D99488
2020-12-11 17:37:19 +00:00
R. Martinho Fernandes fe3a7bf2ef Bug 1680321 - Rewrite CertIsSelfSigned using pkix r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D99266
2020-12-11 13:00:46 +00:00
Dana Keeler be3c95a9e6 Bug 1680372 - replace Let's Encrypt intermediate certificates with ISRG Root X1 in the mozilla_services pinset r=kjacobs DONTBUILD
Now that we're actually using Let's Encrypt for Mozilla services, we should pin
to the root.

Differential Revision: https://phabricator.services.mozilla.com/D99293
2020-12-10 17:17:12 +00:00
ffxbld 32309a1973 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=jcristau
Differential Revision: https://phabricator.services.mozilla.com/D99354
2020-12-10 14:31:46 +00:00
R. Martinho Fernandes 62af5a59d9 Bug 1680320 - Use nsIX509Cert::GetSha256Fingerprint instead of GetCertFingerprintByOidTag r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D99107
2020-12-10 12:35:38 +00:00
Simon Giesecke 4cab6ac723 Bug 1677466 - Move ParamTraits specializations with extra dependencies out of IPCMessageUtils.h. r=mccr8
This moves parts of IPCMessageUtils.h to two new header files and adapts
the include directives as necessary. The new header files are:
- EnumSerializer.h, which defines the templates for enum serializers
- IPCMessageUtilsSpecializations.h, which defines template specializations
  of ParamTraits with extra dependencies (building upon both IPCMessageUtils.h
  and EnumSerializer.h)

This should minimize the dependencies pulled in by every consumer of
IPCMessageUtils.h

Differential Revision: https://phabricator.services.mozilla.com/D94459
2020-12-10 11:09:21 +00:00
Dana Keeler dfc8179fe9 Bug 1677851 - simplify DataStorage background task handling r=kjacobs,bbeurdouche
This patch removes the hand-rolled shared background thread in favor of
individual background synchronous event targets. Also, the timer configuration
was moved to the main thread. It now dispatches events to the background task
queue, which makes it easier to reason about.

Differential Revision: https://phabricator.services.mozilla.com/D98977
2020-12-10 00:14:06 +00:00
Dana Keeler 2592af36e6 Bug 1678206 - update some CRLite/intermediate preloading telemetry r=bbeurdouche data-review=chutten
This patch extends the lifetimes of the following telemetry probes to Firefox 92:
  CRLITE_RESULT
  INTERMEDIATE_PRELOADING_ERRORS
  INTERMEDIATE_PRELOADING_UPDATE_TIME_MS
  security.intermediate_preloading_num_preloaded
  security.intermediate_preloading_num_pending

This patch removes the following telemetry probes:
  CRLITE_FASTER_THAN_OCSP_MS
  OCSP_FASTER_THAN_CRLITE_MS

Differential Revision: https://phabricator.services.mozilla.com/D98988
2020-12-09 23:11:41 +00:00
Kevin Jacobs f9f2383ae3 Bug 1677548 - land NSS NSS_3_60_BETA1 UPGRADE_NSS_RELEASE, r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D99258
2020-12-09 18:36:43 +00:00
Benjamin Beurdouche 279c2a451a Bug 1513645 - Remove Pref to Disable Symantec Distrust. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D91894
2020-12-09 17:45:11 +00:00
Victor Porof 781260432a Bug 1681492 - Update rkv to 0.16.1, r=janerik
Depends on D99210

Differential Revision: https://phabricator.services.mozilla.com/D99211
2020-12-09 12:19:52 +00:00
Razvan Maries ae5330c64c Backed out changeset 2ac5258d1da1 (bug 1676303) for perma failures on test_sanctions_symantec_apple_google.js. CLOSED TREE 2020-12-08 21:57:19 +02:00
Razvan Maries d9cdb92cd6 Backed out changeset c7314bcf7d7b (bug 1672120) for multiple bc failures. CLOSED TREE 2020-12-08 20:31:56 +02:00
Moritz Birghan 9c3afcc70e Bug 1672120 - Access of TransportSecurityInfo fields should hold mutex r=keeler,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D97632
2020-12-08 15:22:08 +00:00
Moritz Birghan 5fe6a3f180 Bug 1676303 - Remove 10 GeoTrust, thawte, and VeriSign root certs from TrustOverride-SymantecData.inc r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D97349
2020-12-08 15:21:30 +00:00
Jed Davis 145e038874 Bug 1678174 - Add remaining time64 syscalls to the Linux sandboxes. r=gcp
32-bit Linux architectures have gained new versions of every system
call handling time values, to allow a transition to 64-bit time_t that
will continue to work after the year 2038; newer versions of glibc will
attempt them and fall back to the 32-bit path (without caching the
failure, so at best we take the overhead of handling SIGSYS).

This patch allows time64 syscalls in the same cases where we allow their
time32 versions, including the restrictions on clockid_t to prevent
interacting with other processes or threads of other processes.  (I've
confirmed that the argument types match otherwise, so it's safe to reuse
the same policies.)

Differential Revision: https://phabricator.services.mozilla.com/D98693
2020-12-08 01:02:18 +00:00
Kevin Jacobs 254f0c7699 Bug 1677548 - land NSS f84fb229842a UPGRADE_NSS_RELEASE, r=bbeurdouche
2020-12-04  Kevin Jacobs  <kjacobs@mozilla.com>

	* gtests/pk11_gtest/pk11_aeskeywrappad_unittest.cc,
	lib/pk11wrap/pk11obj.c:
	Bug 1680400 - Fix memory leak in PK11_UnwrapPrivKey. r=bbeurdouche

	[f84fb229842a] [tip]

2020-12-03  yogesh  <yoyogesh01@gmail.com>

	* cmd/tstclnt/tstclnt.c:
	Bug 1570539 - Removed -X alt-server-hello option from tstclnt
	r=kjacobs

	[ef9198eb2895]

2020-12-03  J.C. Jones  <jjones@mozilla.com>

	* lib/util/pkcs11t.h:
	Bug 1675523 - CKR_PUBLIC_KEY_INVALID has an incorrect value
	r=bbeurdouche

	PKCS#11 v2.40:
	https://www.cryptsoft.com/pkcs11doc/STANDARD/include/v240/pkcs11t.h
	line 1150

	jdk8u: https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/eb7f437285a1
	/src/share/native/sun/security/pkcs11/wrapper/pkcs11t.h#l1155

	[f9bcf45ca3bf]

Differential Revision: https://phabricator.services.mozilla.com/D98946
2020-12-07 19:40:13 +00:00
Bogdan Tara ade4d82c59 Backed out changeset 98c3e6255c58 (bug 1597600) for browser_installssl.js failures CLOSED TREE 2020-12-07 21:01:50 +02:00
Kevin Jacobs ba7e0e45e6 Bug 1681071 - Update PreloadedHPKPins.json after root certificate removal. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D98934
2020-12-07 17:12:44 +00:00
R. Martinho Fernandes c99fe51d2d Bug 1597600 - make certificate overrides depend on origin attributes r=keeler,geckoview-reviewers,smaug,agi
Differential Revision: https://phabricator.services.mozilla.com/D91962
2020-12-07 17:10:52 +00:00
Dana Keeler 65d4fe692b Bug 1677516 - move base64-decoding operations of cert_storage off the main thread r=rmf,bbeurdouche
Telemetry indicated that setting various security state (in particular, CRLite
state) was causing main thread hangs due to base64 decoding. This patch
rearranges cert_storage slightly to do these decodings off the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D98691
2020-12-07 17:14:30 +00:00
Victor Porof d93f852725 Bug 1680230 - Part 1: Update rkv to 0.16.0, r=janerik
Differential Revision: https://phabricator.services.mozilla.com/D98594
2020-12-07 07:24:29 +00:00
Xidorn Quan 8799a09b16 Bug 1661961 - Upgrade cstr to 0.2.x. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D98839
2020-12-07 08:01:04 +00:00
Mihai Alexandru Michis d88071abc9 Backed out 5 changesets (bug 1654192, bug 1680230) for causing tsan bc failures in RWLock.
CLOSED TREE

Backed out changeset 804ccdf33ae8 (bug 1680230)
Backed out changeset 2ced955ab891 (bug 1680230)
Backed out changeset b09ca0548784 (bug 1654192)
Backed out changeset a92f0deb07b2 (bug 1654192)
Backed out changeset 26abc175808e (bug 1654192)
2020-12-07 09:21:15 +02:00
Victor Porof f1a0384f67 Bug 1680230 - Part 1: Update rkv to 0.16.0, r=janerik
Differential Revision: https://phabricator.services.mozilla.com/D98594
2020-12-04 20:26:41 +00:00
Kevin Jacobs c27baf9ddb Bug 1678079 - Add PSM support and xpcshell tests for ECH. r=keeler,kershaw
This patch enables PSM and Firefox to use TLS 1.3 Encrypted Client Hello (draft -08). Specifically:
  - Compile NSS with NSS_ENABLE_DRAFT_HPKE=1
  - Add ECH "public_name" handling in SSLServerCertVerification.cpp (see: https://tools.ietf.org/html/draft-ietf-tls-esni-08#section-6.3.2)
  - Adds `mIsAcceptedEch` to TransportSecurityInfo, and xpcshell tests for ECH use cases
  - Adds EncryptedClientHelloServer to facilitate the xpcshell tests
  - Un-ifdef Set/GetEchConfigs code in nsNSSIOLayer.cpp. Also reverted the Base64 encoding and decoding, as the data returned from DNS is already decoded (wire-format).

Differential Revision: https://phabricator.services.mozilla.com/D92651
2020-12-04 15:26:17 +00:00
Andreea Pavel e68c428ea1 Bug 1585916 - disable test_session_resumption.js on win10 ccov qr r=keeler DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D98704
2020-12-04 01:55:40 +00:00
Razvan Maries ae4e418a02 Backed out changeset e7c03faf2880 (bug 1678079) for perma failures on test_encrypted_client_hello.js. CLOSED TREE 2020-12-04 03:46:54 +02:00
Kevin Jacobs 9fa97f5e74 Bug 1678079 - Add PSM support and xpcshell tests for ECH. r=keeler,kershaw
This patch enables PSM and Firefox to use TLS 1.3 Encrypted Client Hello (draft -08). Specifically:
  - Compile NSS with NSS_ENABLE_DRAFT_HPKE=1
  - Add ECH "public_name" handling in SSLServerCertVerification.cpp (see: https://tools.ietf.org/html/draft-ietf-tls-esni-08#section-6.3.2)
  - Adds `mIsAcceptedEch` to TransportSecurityInfo, and xpcshell tests for ECH use cases
  - Adds EncryptedClientHelloServer to facilitate the xpcshell tests
  - Un-ifdef Set/GetEchConfigs code in nsNSSIOLayer.cpp. Also reverted the Base64 encoding and decoding, as the data returned from DNS is already decoded (wire-format).

Differential Revision: https://phabricator.services.mozilla.com/D92651
2020-12-03 21:58:24 +00:00
ffxbld d944eb1cea No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update
Differential Revision: https://phabricator.services.mozilla.com/D98601
2020-12-03 14:24:29 +00:00
Kevin Jacobs 5ed34cfb5e Bug 1680154 - Update sanctioned intermediate cert test after root certificate removal. r=keeler
This patch updates test_sanctions_symantec_apple_google.js to test a chain through an allow-listed Apple intermediate certificate chaining to a Symantec root certificate that is present in NSS.

Differential Revision: https://phabricator.services.mozilla.com/D98511
2020-12-02 20:46:13 +00:00
Kevin Jacobs 77e5fe6fc4 Bug 1680154 - Update test_cert_isBuiltInRoot_reload with root certificate that exists. r=keeler
This patch changes a test referencing //VeriSign Class 3 Public Primary Certification Authority - G4//, which was removed in bug 1670769, with a similar VeriSign root CA that still exists and meets the same requirements for the test.

Differential Revision: https://phabricator.services.mozilla.com/D98510
2020-12-02 18:10:46 +00:00
Kevin Jacobs 5e63427a1b Bug 1677548 - land NSS f8c49b334e51 UPGRADE_NSS_RELEASE, r=bbeurdouche
2020-12-01  Kevin Jacobs  <kjacobs@mozilla.com>

	* lib/ckfw/builtins/nssckbi.h:
	Bug 1678189 - December 2020 batch of root changes,
	NSS_BUILTINS_LIBRARY_VERSION 2.46. r=bbeurdouche

	[f8c49b334e51] [tip]

	* lib/ckfw/builtins/certdata.txt:
	Bug 1678166 - Add NAVER Global Root Certification Authority root
	cert to NSS. r=bbeurdouche,KathleenWilson

	[b9742b439a81]

2020-12-01  Benjamin Beurdouche  <benjamin.beurdouche@inria.fr>

	* lib/ckfw/builtins/certdata.txt:
	Bug 1670769 - Remove 10 GeoTrust, thawte, and VeriSign root certs
	from NSS. r=kjacobs,KathleenWilson

	[4c69d6d0cf21]

2020-12-01  Kevin Jacobs  <kjacobs@mozilla.com>

	* lib/ssl/ssl3exthandle.c:
	Bug 1674819 - Fix undefined shift when fuzzing r=bbeurdouche

	In fuzzer mode, session tickets are serialized without any
	encryption or integrity protection. This leads to a post-deserialize
	UBSAN error when shifting by a fuzzed (large) authType value. A real
	NSS server will not produce these values.

	[a51fae403328]

2020-11-30  Benjamin Beurdouche  <benjamin.beurdouche@inria.fr>

	* build.sh, coreconf/config.gypi, lib/ckfw/builtins/testlib/builtins-
	testlib.gyp, lib/ckfw/builtins/testlib/nssckbi-testlib.def, nss.gyp:
	Bug 1678384 - Add a build flag to allow building nssckbi-testlib in
	m-c r=kjacobs

	[22bf7c680b60]

2020-12-01  Kevin Jacobs  <kjacobs@mozilla.com>

	* lib/dev/devslot.c:
	Bug 1679290 - Don't hold slot lock when taking session lock
	r=bbeurdouche

	[[ https://hg.mozilla.org/projects/nss/rev/0ed11a5835ac1556ff978362c
	d61069d48f4c5db | 0ed11a5835ac1556ff978362cd61069d48f4c5db ]] fixed
	a number of race conditions related to NSSSlot member accesses.
	Unfortunately the locking order that was imposed by that patch has
	been found to cause problems for at least one PKCS11 module,
	libnsspem.

	This patch drops nested locking in favor of unlocking/re-locking.
	While this isn't perfect, the original problem in bug 1663661 was
	that `slot->token` could become NULL, which we can easily check
	after reacquiring.

	[19585ccc7a1f]

2020-11-25  Makoto Kato  <m_kato@ga2.so-net.ne.jp>

	* lib/freebl/blinit.c:
	Bug 1678990 - Use __ARM_FEATURE_CRYPTO for feature detection.
	r=bbeurdouche

	Actually, we have CPU feature detection for Linux and FreeBSD on
	aarch64 platform. But others don't.

	macOS doesn't has any CPU feature detection for ARM Crypto
	Extension, but toolchain default is turned on. So we should respect
	__ARM_FEATURE_CRYPTO.

	[f1e48fbead3d]

2020-11-19  Lauri Kasanen  <cand@gmx.com>

	* lib/freebl/Makefile:
	Bug 1642174 - Resolve sha512-p8.o: ABI version 2 is not compatible
	with ABI version 1 output. r=jcj Don't try to build the SHA-2
	accelerated asm on old-ABI ppc.

	Currently make only, I don't have enough gyp-fu to do that side.
	However, the reporters of 1642174 and 1635625 both used make, not
	gyp.

	Signed-off-by: Lauri Kasanen <cand@gmx.com>
	[d806f7992b10]

Differential Revision: https://phabricator.services.mozilla.com/D98509
2020-12-03 10:20:29 +00:00
Dana Keeler 2e7189e847 Bug 1678762 - crlite: be more efficient about processing new stashes r=kjacobs
Before this patch, when RemoteSecuritySettings would download multiple new
stashes, it would add the first one to cert_storage, which would reconstruct
the in-memory representation of all of the issuer/serial hashmaps/sets
(including preexisting ones), and then RemoteSecuritySettings would add the
second one, and cert_storage would reconstruct the entire in-memory
representation of the issuer/serial hashmaps/sets again, and so on, re-doing
all of the work each time. This is essentially O(n^2) work. This patch improves
both RemoteSecuritySettings and cert_storage to minimize this work, reducing it
to O(n).

Differential Revision: https://phabricator.services.mozilla.com/D97829
2020-12-02 17:04:59 +00:00
Emilio Cobos Álvarez 8fa401f652 Bug 1680166 - GCC is smarter than clang, so ignore the warning properly.
CLOSED TREE

MANUAL PUSH: Base toolchain build bustage.
2020-12-02 14:31:39 +01:00
Emilio Cobos Álvarez d97661003b Bug 1680166 - Return EFAULT when given a null path to stat* calls in the sandbox filter. r=gcp
It's a common way to check the existence of system calls. Glibc may fall
back to fstatat when statx is called, passing down the null path.

Since we handle fstatat, let's return -EFAULT the same way the real
fstatat syscall would do.

This is needed for the sandbox not to constantly crash due to this statx
call in rustc:

09c9c9f7da/library/std/src/sys/unix/fs.rs (L119-L123)

Differential Revision: https://phabricator.services.mozilla.com/D98414
2020-12-02 11:05:16 +00:00
Valentin Gosu c5f0e366db Bug 1677501 - Add nsIX509CertDB.asyncHasThirdPartyRoots and use it in DoHHeuristics.jsm r=keeler,Gijs,nhnt11
This allows us to avoid calling any NSSCertificateDB methods on the main
thread or allocating memory for xpconnect wrappers of cert objects.

Differential Revision: https://phabricator.services.mozilla.com/D97970
2020-12-01 14:42:36 +00:00
Jean-Yves Avenard 53f8a78ca2 Bug 1679356 - P1. Make the VP9 HW decoder work on Apple Silicon. r=haik
We relax the sandbox to allow querying the IOAVDHEVCDecodeCapabilities property

Differential Revision: https://phabricator.services.mozilla.com/D97983
2020-11-27 21:26:11 +00:00
ffxbld e95b7c5103 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D98193
2020-11-30 14:30:15 +00:00
Sylvestre Ledru 5079cc5b3f Bug 1588710 - Do not fail on stack protector on some asm chromium & breakpad sandboxing code r=mhentges
caused:
[task 2020-11-05T10:14:26.012Z] 10:14:26     INFO -  In file included from Unified_cpp_sandbox_linux2.cpp:137:
[task 2020-11-05T10:14:26.012Z] 10:14:26    ERROR -  /builds/worker/checkouts/gecko/security/sandbox/chromium/sandbox/linux/seccomp-bpf/syscall.cc:369:3: error: Unable to protect inline asm that clobbers stack pointer against stack clash [-Werror,-Wstack-protector]
[task 2020-11-05T10:14:26.012Z] 10:14:26     INFO -    asm volatile(
[task 2020-11-05T10:14:26.013Z] 10:14:26     INFO -    ^
[task 2020-11-05T10:14:26.013Z] 10:14:26     INFO -  1 error generated.

Differential Revision: https://phabricator.services.mozilla.com/D97567
2020-11-27 10:14:01 +00:00