This also changes the way we populate the cached binary dir string, so that when
it is populated, it is done in SandboxBroker::Initialize.
Differential Revision: https://phabricator.services.mozilla.com/D205099
In this code there are conditions where we can't proceed, but simply
`MOZ_CRASH`ing isn't ideal, because the crash reporter doesn't work
here, and on non-debug builds the crash string isn't printed to the
terminal, so we get bug reports where we know that something crashed
somewhere but not much else.
Because we already have the `SANDBOX_LOG` macros (which are intended to
be async signal safe), this patch uses them to add some more logging.
This patch also makes sure that `WriteStringToFile` always sets errno to
something when returning failure, because that matters for some of this
new logging.
Differential Revision: https://phabricator.services.mozilla.com/D204574
addons-stage.crt is the DER-encoded version of the
cas-cur-root-2024-03-12.crt file from bug 1882192, generated with:
openssl x509 -inform PEM -in /tmp/cas-cur-root-2024-03-12.crt -outform DER -out security/manager/ssl/addons-stage.crt
The four zip files are from bug 1885457, and are the same file, but
signed with the new certificate.
Differential Revision: https://phabricator.services.mozilla.com/D204706
2024-03-15 Dennis Jackson <djackson@mozilla.com>
* doc/rst/releases/index.rst, doc/rst/releases/nss_3_99.rst:
Add release notes for 3.99
[3594a1841f43] [NSS_3_99_RTM] <NSS_3_99_BRANCH>
* lib/nss/nss.h, lib/softoken/softkver.h, lib/util/nssutil.h:
Set version numbers to 3.99 Final
[38cf2279b626] <NSS_3_99_BRANCH>
2024-03-14 Dennis Jackson <djackson@mozilla.com>
* .hgtags:
Added tag NSS_3_99_BETA3 for changeset eea89805bde9
[16c587b77059] <NSS_3_99_BRANCH>
Differential Revision: https://phabricator.services.mozilla.com/D204796
nsIX509CertDB.openSignedAppFileAsync supports PKCS#7 signatures with either
SHA-1 or SHA-256 as well as COSE signatures with SHA-256. To deprecate SHA-1,
it would be helpful to know which signatures the implementation actually
encountered and verified. This patch returns this information via the
nsIOpenSignedAppFileCallback.openSignedAppFileFinished callback.
In addition, this patch returns the verified certificate that created each
verified signature.
Differential Revision: https://phabricator.services.mozilla.com/D203304
This changes comes with several different refactorings all rolled into one,
unfotunately I couldn't find a way to pull them apart:
- First of all annotations now can either recorded (that is, we copy the value
and have the crash reporting code own the copy) or registered. Several
annotations are changed to use this functionality so that we don't need to
update them as their value change.
- The code in the exception handler is modified to read the annotations from
the mozannotation_client crate. This has the unfortunate side-effect that
we need three different bits of code to serialize them: one for annotations
read from a child process, one for reading annotations from the main process
outside of the exception handler and one for reading annotations from the
main process within the exception handler. As we move to fully
out-of-process crash reporting the last two methods will go away.
- The mozannotation_client crate now doesn't record annotation types anymore.
I realized as I was working on this that storing types at runtime has two
issues: the first one is that buggy code might change the type of an
annotation (that is record it under two different types at two different
moments), the second issue is that types might become corrupt during a
crash, so better enforce them at annotation-writing time. The end result is
that the mozannotation_* crates now only store byte buffers, track the
format the data is stored in (null-terminated string, fixed size buffer,
etc...) but not the type of data each annotation is supposed to contain.
- Which brings us to the next change: concrete types for annotations are now
enforced when they're written out. If an annotation doesn't match the
expected type it's skipped. Storing an annotation with the wrong type will
also trigger an assertion in debug builds.
Differential Revision: https://phabricator.services.mozilla.com/D195248