forked from pool/MozillaFirefox
84ebf9d464
* MFSA 2012-57/CVE-2012-1970 Miscellaneous memory safety hazards * MFSA 2012-58/CVE-2012-1972/CVE-2012-1973/CVE-2012-1974/CVE-2012-1975 CVE-2012-1976/CVE-2012-3956/CVE-2012-3957/CVE-2012-3958/CVE-2012-3959 CVE-2012-3960/CVE-2012-3961/CVE-2012-3962/CVE-2012-3963/CVE-2012-3964 Use-after-free issues found using Address Sanitizer * MFSA 2012-59/CVE-2012-1956 (bmo#756719) Location object can be shadowed using Object.defineProperty * MFSA 2012-60/CVE-2012-3965 (bmo#769108) Escalation of privilege through about:newtab * MFSA 2012-61/CVE-2012-3966 (bmo#775794, bmo#775793) Memory corruption with bitmap format images with negative height * MFSA 2012-62/CVE-2012-3967/CVE-2012-3968 WebGL use-after-free and memory corruption * MFSA 2012-63/CVE-2012-3969/CVE-2012-3970 SVG buffer overflow and use-after-free issues * MFSA 2012-64/CVE-2012-3971 Graphite 2 memory corruption * MFSA 2012-65/CVE-2012-3972 (bmo#746855) Out-of-bounds read in format-number in XSLT * MFSA 2012-66/CVE-2012-3973 (bmo#757128) HTTPMonitor extension allows for remote debugging without explicit activation * MFSA 2012-68/CVE-2012-3975 (bmo#770684) DOMParser loads linked resources in extensions when parsing text/html * MFSA 2012-69/CVE-2012-3976 (bmo#768568) Incorrect site SSL certificate data display * MFSA 2012-70/CVE-2012-3978 (bmo#770429) OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=291
169 lines
5.7 KiB
Diff
169 lines
5.7 KiB
Diff
From: Hans Petter Jansson <hpj@copyleft.no>
|
|
Wolfgang Rosenauer <wr@rosenauer.org>
|
|
Subject: use libnsssharedhelper if available at compile time
|
|
(can be disabled by exporting MOZ_XRE_NO_NSSHELPER=1)
|
|
References:
|
|
|
|
diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in
|
|
--- a/config/autoconf.mk.in
|
|
+++ b/config/autoconf.mk.in
|
|
@@ -573,16 +573,20 @@ MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNO
|
|
|
|
MOZ_ALSA_LIBS = @MOZ_ALSA_LIBS@
|
|
MOZ_ALSA_CFLAGS = @MOZ_ALSA_CFLAGS@
|
|
|
|
GLIB_CFLAGS = @GLIB_CFLAGS@
|
|
GLIB_LIBS = @GLIB_LIBS@
|
|
GLIB_GMODULE_LIBS = @GLIB_GMODULE_LIBS@
|
|
|
|
+MOZ_ENABLE_NSSHELPER = @MOZ_ENABLE_NSSHELPER@
|
|
+NSSHELPER_CFLAGS = @NSSHELPER_CFLAGS@
|
|
+NSSHELPER_LIBS = @NSSHELPER_LIBS@
|
|
+
|
|
MOZ_NATIVE_MAKEDEPEND = @SYSTEM_MAKEDEPEND@
|
|
|
|
export CL_INCLUDES_PREFIX = @CL_INCLUDES_PREFIX@
|
|
|
|
MOZ_AUTO_DEPS = @MOZ_AUTO_DEPS@
|
|
COMPILER_DEPEND = @COMPILER_DEPEND@
|
|
MDDEPDIR := @MDDEPDIR@
|
|
CC_WRAPPER = @CC_WRAPPER@
|
|
diff --git a/configure.in b/configure.in
|
|
--- a/configure.in
|
|
+++ b/configure.in
|
|
@@ -8270,16 +8270,31 @@ AC_SUBST(QCMS_LIBS)
|
|
|
|
dnl ========================================================
|
|
dnl HarfBuzz
|
|
dnl ========================================================
|
|
MOZ_HARFBUZZ_LIBS='$(DEPTH)/gfx/harfbuzz/src/$(LIB_PREFIX)mozharfbuzz.$(LIB_SUFFIX)'
|
|
AC_SUBST(MOZ_HARFBUZZ_LIBS)
|
|
|
|
dnl ========================================================
|
|
+dnl Check for nss-shared-helper
|
|
+dnl ========================================================
|
|
+
|
|
+ PKG_CHECK_MODULES(NSSHELPER, nss-shared-helper,
|
|
+ [MOZ_ENABLE_NSSHELPER=1],
|
|
+ [MOZ_ENABLE_NSSHELPER=])
|
|
+
|
|
+if test "$MOZ_ENABLE_NSSHELPER"; then
|
|
+ AC_DEFINE(MOZ_ENABLE_NSSHELPER)
|
|
+fi
|
|
+AC_SUBST(MOZ_ENABLE_NSSHELPER)
|
|
+AC_SUBST(NSSHELPER_CFLAGS)
|
|
+AC_SUBST(NSSHELPER_LIBS)
|
|
+
|
|
+dnl ========================================================
|
|
dnl SIL Graphite
|
|
dnl ========================================================
|
|
if test "$MOZ_GRAPHITE"; then
|
|
MOZ_GRAPHITE_LIBS='$(DEPTH)/gfx/graphite2/src/$(LIB_PREFIX)mozgraphite2.$(LIB_SUFFIX)'
|
|
AC_DEFINE(MOZ_GRAPHITE)
|
|
else
|
|
MOZ_GRAPHITE_LIBS=
|
|
fi
|
|
diff --git a/security/manager/ssl/src/Makefile.in b/security/manager/ssl/src/Makefile.in
|
|
--- a/security/manager/ssl/src/Makefile.in
|
|
+++ b/security/manager/ssl/src/Makefile.in
|
|
@@ -86,12 +86,14 @@ EXTRA_DEPS = $(NSS_DEP_LIBS)
|
|
DEFINES += \
|
|
-DNSS_ENABLE_ECC \
|
|
-DDLL_PREFIX=\"$(DLL_PREFIX)\" \
|
|
-DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \
|
|
$(NULL)
|
|
|
|
# Use local includes because they are inserted before INCLUDES
|
|
# so that Mozilla's nss.h is used, not glibc's
|
|
-LOCAL_INCLUDES += $(NSS_CFLAGS)
|
|
+LOCAL_INCLUDES += $(NSS_CFLAGS) $(NSSHELPER_CFLAGS)
|
|
+
|
|
+EXTRA_DSO_LDOPTS += $(NSSHELPER_LIBS)
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp
|
|
--- a/security/manager/ssl/src/nsNSSComponent.cpp
|
|
+++ b/security/manager/ssl/src/nsNSSComponent.cpp
|
|
@@ -1,14 +1,21 @@
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
+#ifdef MOZ_ENABLE_NSSHELPER
|
|
+#pragma GCC visibility push(default)
|
|
+#include <nss-shared-helper.h>
|
|
+#pragma GCC visibility pop
|
|
+#include "prenv.h"
|
|
+#endif
|
|
+
|
|
#include "nsNSSComponent.h"
|
|
#include "nsNSSCallbacks.h"
|
|
#include "nsNSSIOLayer.h"
|
|
#include "nsCertVerificationThread.h"
|
|
|
|
#include "nsNetUtil.h"
|
|
#include "nsAppDirectoryServiceDefs.h"
|
|
#include "nsDirectoryService.h"
|
|
@@ -1738,18 +1745,34 @@ nsNSSComponent::InitializeNSS(bool showW
|
|
ConfigureInternalPKCS11Token();
|
|
|
|
// The NSS_INIT_NOROOTINIT flag turns off the loading of the root certs
|
|
// module by NSS_Initialize because we will load it in InstallLoadableRoots
|
|
// later. It also allows us to work around a bug in the system NSS in
|
|
// Ubuntu 8.04, which loads any nonexistent "<configdir>/libnssckbi.so" as
|
|
// "/usr/lib/nss/libnssckbi.so".
|
|
PRUint32 init_flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE;
|
|
- SECStatus init_rv = ::NSS_Initialize(profileStr.get(), "", "",
|
|
- SECMOD_DB, init_flags);
|
|
+ SECStatus init_rv = SECFailure;
|
|
+#ifdef MOZ_ENABLE_NSSHELPER
|
|
+ if (PR_GetEnv("MOZ_XRE_NO_NSSHELPER")) {
|
|
+ init_rv = ::NSS_Initialize(profileStr.get(), "", "",
|
|
+ SECMOD_DB, init_flags);
|
|
+ } else {
|
|
+ init_rv = ::nsshelp_open_db ("Firefox", profileStr.get(), init_flags);
|
|
+
|
|
+ if (init_rv != SECSuccess) {
|
|
+ PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS using nsshelp_open_db in %s\n", profileStr.get()));
|
|
+ init_rv = ::NSS_Initialize(profileStr.get(), "", "",
|
|
+ SECMOD_DB, init_flags);
|
|
+ }
|
|
+ }
|
|
+#else
|
|
+ init_rv = ::NSS_Initialize(profileStr.get(), "", "",
|
|
+ SECMOD_DB, init_flags);
|
|
+#endif
|
|
|
|
if (init_rv != SECSuccess) {
|
|
PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS r/w in %s\n", profileStr.get()));
|
|
|
|
if (supress_warning_preference) {
|
|
which_nss_problem = problem_none;
|
|
}
|
|
else {
|
|
diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in
|
|
--- a/toolkit/library/Makefile.in
|
|
+++ b/toolkit/library/Makefile.in
|
|
@@ -446,17 +446,17 @@ EXTRA_DSO_LDOPTS += -INCREMENTAL:NO
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS)
|
|
|
|
DEFINES += -DIMPL_XREAPI
|
|
|
|
-EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB)
|
|
+EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB) $(NSSHELPER_LIBS)
|
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
|
CXXFLAGS += $(TK_CFLAGS)
|
|
OS_LIBS += \
|
|
-framework SystemConfiguration \
|
|
-framework QuickTime \
|
|
-framework IOKit \
|
|
-F/System/Library/PrivateFrameworks -framework CoreUI \
|