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

16227 Коммитов

Автор SHA1 Сообщение Дата
Dana Keeler fe0468b14a Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-13 23:59:08 +00:00
Dana Keeler f573cb1470 Bug 1712837 - avoid unnecessarily clearing the TLS session cache at startup r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D130820
2021-12-13 23:59:08 +00:00
Nika Layzell 7b2e6d4996 Bug 1741665 - Align nsCString's public size_type better with other C++ APIs, r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D131422
2021-12-13 21:47:56 +00:00
Butkovits Atila 98359f243b Merge mozilla-central to autoland. CLOSED TREE 2021-12-13 23:48:15 +02:00
Ryan VanderMeulen 6207bc5c67 Backed out changeset 56ae8059453e (bug 1738984) to see if it fixes bug 1745043. a=me 2021-12-13 14:52:08 -05:00
ffxbld fd626fb02c No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D133624
2021-12-13 18:37:07 +00:00
elfarto 6f097098e0 Bug 1743014 - Handle unlink("") calls internally. r=jld
unlink("") will always return -ENOENT if passed to the kernel, so just
do the same thing here. We need this as empty paths can't be whitelisted.

Differential Revision: https://phabricator.services.mozilla.com/D132174
2021-12-13 18:02:47 +00:00
Dana Keeler d74d5e91d6 Bug 1712972 - only call IsCertBuiltInRoot on the socket thread during certificate verification r=jschanck
Based on a patch authored by R. Martinho Fernandes <bugs@rmf.io>.

Differential Revision: https://phabricator.services.mozilla.com/D116505
2021-12-10 21:14:23 +00:00
Cristian Tuns 9ad5101118 Backed out changeset 5396b58ddae7 (bug 1712837) for causing Android ARMv7 build bustages. a=backout 2021-12-10 09:35:39 -05:00
Cosmin Sabou f8225b521f Backed out changeset d53bfb002c23 (bug 1712837) for causing Android ARMv7 build bustages. a=backout 2021-12-10 14:50:12 +02:00
Dana Keeler c52192ebff Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-10 00:24:49 +00:00
Dana Keeler 654f5edc31 Bug 1712837 - avoid unnecessarily clearing the TLS session cache at startup r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D130820
2021-12-10 00:24:48 +00:00
ffxbld cd45866888 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D133356
2021-12-09 15:07:56 +00:00
Mike Hommey 8e411675ac Bug 1744877 - Remove --disable-xul. r=Gijs
Building with --disable-xul has been busted since _at least_ bug
1082579, for more than 7 years (I didn't try to track that down
further). It's time to recognize that the option serves no purpose.

Differential Revision: https://phabricator.services.mozilla.com/D133161
2021-12-08 21:37:11 +00:00
Valentin Gosu 2b555ca6ac Bug 1738984 - Prevent NSS initialization and channel creation during shutdown r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D133065
2021-12-07 22:52:20 +00:00
Andreea Pavel 041f6f706d Backed out 2 changesets (bug 1712837) for win build bustages on a CLOSED TREE
Backed out changeset e754af875d57 (bug 1712837)
Backed out changeset 020eaab241a8 (bug 1712837)
2021-12-07 02:21:09 +02:00
Dana Keeler 8d68ea1d86 Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-06 23:43:32 +00:00
Dana Keeler d2380075fb Bug 1712837 - avoid unnecessarily clearing the TLS session cache at startup r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D130820
2021-12-06 23:43:32 +00:00
ffxbld d6d157ed1e No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D132932
2021-12-06 21:21:07 +00:00
Randell Jesup 08f296ee63 Bug 1743895: Add names to all TaskQueues, remove no-name constructor r=nika,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D132638
2021-12-03 03:16:15 +00:00
Jed Davis 5c9a594910 Bug 1744126 - Allow `sigaltstack` in all sandboxed processes. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D132739
2021-12-03 00:33:22 +00:00
Dana Keeler df120d1954 Bug 1742205 - reorganize setting TLS handshake information r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D132413
2021-12-02 22:04:55 +00:00
Csoregi Natalia 59f022092c Backed out 2 changesets (bug 1712837) for causing RemoteProcessMonitor failures. CLOSED TREE
Backed out changeset e3ed61b61357 (bug 1712837)
Backed out changeset 19b9dfd60749 (bug 1712837)
2021-12-01 22:36:35 +02:00
Benjamin Beurdouche 2ee234be4b Bug 1738222 - land NSS NSS_3_73_RTM UPGRADE_NSS_RELEASE, r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D132621
2021-12-01 18:24:50 +00:00
Dana Keeler c02a76841b Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-01 18:10:34 +00:00
Dana Keeler 6d37a3da3d Bug 1712837 - avoid unnecessarily clearing the TLS session cache at startup r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D130820
2021-12-01 18:10:34 +00:00
Greg Tatum d642b72ac3 Bug 1715892 - Unify locale/DateTimeFormat to mozilla::intl::AppDateTimeFormat; r=platform-i18n-reviewers,dminor
I considered removing this class initially, but it's actually a pretty
useful abstraction over the DateTimeFormat interface when used
specifically with Gecko. It applies the OS preferences and provides some
caching behavior.

Differential Revision: https://phabricator.services.mozilla.com/D131671
2021-12-01 17:41:37 +00:00
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +00:00
Marian-Vasile Laza 3bfa529b3e Backed out 6 changesets (bug 1715892, bug 1719735) for causing bc test failures. CLOSED TREE
Backed out changeset 196952bd8c9c (bug 1715892)
Backed out changeset 9105fe01c025 (bug 1715892)
Backed out changeset 4c15d1a24ccd (bug 1715892)
Backed out changeset 2c328b84285f (bug 1715892)
Backed out changeset 8fcdcdf44b62 (bug 1719735)
Backed out changeset c48f398e301f (bug 1719735)
2021-11-30 23:30:59 +02:00
Greg Tatum 9b5497020e Bug 1715892 - Unify locale/DateTimeFormat to mozilla::intl::AppDateTimeFormat; r=platform-i18n-reviewers,dminor
I considered removing this class initially, but it's actually a pretty
useful abstraction over the DateTimeFormat interface when used
specifically with Gecko. It applies the OS preferences and provides some
caching behavior.

Differential Revision: https://phabricator.services.mozilla.com/D131671
2021-11-30 19:05:58 +00:00
ffxbld aac1ce7369 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D132345
2021-11-29 15:03:20 +00:00
Deian Stefan 1ee9a841d8 Bug 1732201 - Sandbox woff2 in OTS using RLBox r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D126435
2021-11-27 23:30:49 +00:00
Cristian Tuns f0ef0360eb Backed out changeset d486edc7499b (bug 1732201) for causing web-platform-tests failures on header-totalsfntsize-001.xht CLOSED TREE 2021-11-27 07:32:22 -05:00
Deian Stefan 0a5e1f2075 Bug 1732201 - Sandbox woff2 in OTS using RLBox r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D126435
2021-11-27 04:41:21 +00:00
Nika Layzell acedd82927 Bug 1734739 - Part 3: Stop providing pids in places where it's not needed/used, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128220
2021-11-24 17:56:01 +00:00
Nika Layzell c8c4669312 Bug 1734739 - Part 2: Stop requiring the OtherPid to create Endpoint, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128219
2021-11-24 17:56:00 +00:00
Kershaw Chang 89050e7a2e Bug 1738664 - Add peerId to nsITransportSecurityInfo, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D130034
2021-11-23 11:59:47 +00:00
Jed Davis 23ba2c71df Bug 1698778 - Loosen the RDD sandbox policy to support VA-API (including Intel VCS2). r=gcp
Changes:

1. For the `intel` drivers [on newer hardware][VCS2], access to SysV IPC
   is granted.  There is a slight restriction: `semget` and `shmget` are
   restricted to the fixed `key_t` value used by the driver; however,
   the other calls take shm/sem identifiers, which are dynamically
   assigned and globally scoped, so an attacker could still access
   other resources.  This is considered a reasonable tradeoff for not
   needing to allow this (or, eventually, any GPU access) in the content
   process, which is much easier for malicious content to attack than
   RDD.

2. Access to devices in `/dev/dri` and the `DRM_IOCTL_*` ioctls (type `'d'`).

3. Read access to the parts of sysfs used by Mesa to do device detection;
   again, given the choice we'd rather allow this in RDD than content.

4. Read access to directories containing libraries, for plugin loading.

5. Allowing `kcmp` in the special case of comparing the process's
   own fds, for `amdgpu` (already allowed for content).

6. The `eventfd2` syscall, which we use in connection with dma-buf.

[VCS2]: https://github.com/intel/media-driver/blob/77b3b2a6c366/media_driver/linux/common/os/mos_os_specific.c#L1508-L1512

Differential Revision: https://phabricator.services.mozilla.com/D131680
2021-11-23 01:14:41 +00:00
Jed Davis 158787246c Bug 1698778 - Move several pieces of the seccomp-bpf policies into SandboxPolicyCommon. r=gcp
Minor functional changes:

1. `fcntl` `F_DUPFD_CLOEXEC` is now allowed everywhere instead of
   just content.  It's the obvious (and maybe only? and probably
   only portable) way for a library to `dup` and atomically set the
   close-on-exec flag, and appears harmless.

2. `ioctl`s used by the `isatty` function are denied with `ENOTTY` by
   default in all processes, instead of being treated as an invalid
   syscall, and this now applies to `TIOCGWINSZ` (used by musl) as well
   as `TCGETS` (used by glibc).  Nothing new is allowed here; it's just
   that this is treated as an expected denial.

3. Getting the real or effective user or group ID is allowed everywhere.
   Every process type except RDD previously did, and RDD soon will.  See
   also the new comment about why GMP may not always need it, but that
   it's not very meaningful to block.

Refactoring, no functional change intended:

1. The policy for the `kcmp` syscall as used by Mesa's `amdgpu` driver
   is now in a protected method of SandboxPolicyCommon, but is used only
   in the content process as previously.  A later patch will also apply
   it to the RDD process, so this avoids code duplication.

Differential Revision: https://phabricator.services.mozilla.com/D131679
2021-11-23 01:14:41 +00:00
Jed Davis ac85827e83 Bug 1698778 - Allow filtering SysV IPC call arguments. r=gcp
On 32-bit x86, Linux originally used a single system call, ipc(2), for
all SysV IPC.  This is similar to socketcall(2), but the arguments are
passed directly (shifted by one position) instead of indirected via
a pointer, so seccomp-bpf can filter them normally.  Also similar to
socketcall(2), individual syscalls were added later (in kernel 5.1,
vs. 4.3 for socket calls), so the policy needs to handle both of them,
adjusting argument offsets as needed.  This patch adds an argument to
`EvaluateIpcCall` to allow that.

Differential Revision: https://phabricator.services.mozilla.com/D131678
2021-11-23 01:14:40 +00:00
Sylvestre Ledru 70be2344fc Bug 1707591 - ride along - reformat the tree with black 21.10b0 r=ahal,webdriver-reviewers,perftest-reviewers,whimboo,gerard-majax,alexandru.irimovici
This changed with this:
https://github.com/psf/black/pull/1740

Depends on D130964

Differential Revision: https://phabricator.services.mozilla.com/D130965
2021-11-22 22:10:03 +00:00
dmeehan 76b501598c Bug 1741451 - Replace inBytes.size == 0 with inBytes.empty(). r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D131796
2021-11-22 18:38:27 +00:00
ffxbld 22362d9482 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D131775
2021-11-22 14:38:03 +00:00
Deian Stefan 86e82e1036 Bug 1688452 - Retrofit nsExpatDriver to use RLBoxed libexpat r=tjr,peterv,bholley,glandium
Differential Revision: https://phabricator.services.mozilla.com/D104658
2021-11-22 06:19:17 +00:00
Sandor Molnar 51a05715fe Backed out changeset 4294063f1606 (bug 1688452) for causing mochitest and wpt failures. CLOSED TREE 2021-11-20 13:00:27 +02:00
Deian Stefan fcd2e09518 Bug 1688452 - Retrofit nsExpatDriver to use RLBoxed libexpat r=tjr,peterv,bholley,glandium
Differential Revision: https://phabricator.services.mozilla.com/D104658
2021-11-19 21:28:53 +00:00
Alexandru Michis d4f3d0994e Backed out changeset 7893bbd002e0 (bug 1688452) for causing bustages in nsRLBoxExpatDriver.
CLOSED TREE
2021-11-19 15:54:31 +02:00
Deian Stefan 76c5d8907d Bug 1688452 - Retrofit nsExpatDriver to use RLBoxed libexpat r=tjr,peterv,bholley,glandium
Differential Revision: https://phabricator.services.mozilla.com/D104658
2021-11-19 06:08:36 +00:00
Benjamin Beurdouche 9d4b719a04 Bug 1738222 - land NSS 4b8ce9641338 UPGRADE_NSS_RELEASE, r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D131519
2021-11-18 18:55:20 +00:00
ffxbld a7ed70886d No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D131481
2021-11-18 13:33:04 +00:00