debian/0000755000000000000000000000000013433003751007165 5ustar debian/libnss3-1d.lintian-overrides0000644000000000000000000000024512234360534014430 0ustar # License says GPL 2 or subsequent, so pointing to the latest version is fine libnss3-1d: copyright-refers-to-versionless-license-file usr/share/common-licenses/GPL debian/libnss3-dbg.lintian-overrides0000644000000000000000000000024612234360534014661 0ustar # License says GPL 2 or subsequent, so pointing to the latest version is fine libnss3-dbg: copyright-refers-to-versionless-license-file usr/share/common-licenses/GPL debian/pkcs11.txt0000644000000000000000000000070112264616670011041 0ustar library=libnsssysinit.so name=NSS Internal PKCS #11 Module parameters=configdir='sql:/var/lib/nssdb' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription='' NSS=Flags=internal,moduleDBOnly,critical trustOrder=75 cipherOrder=100 slotParams=(1={slotFlags=[RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512] askpw=any timeout=30}) debian/rules0000755000000000000000000001365513021255530010254 0ustar #!/usr/bin/make -f include debian/make.mk $(call lazy,DEB_HOST_MULTIARCH,$$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)) $(call lazy,CFLAGS,$$(shell dpkg-buildflags --get CFLAGS)) $(call lazy,CPPFLAGS,$$(shell dpkg-buildflags --get CPPFLAGS)) $(call lazy,LDFLAGS,$$(shell dpkg-buildflags --get LDFLAGS)) ifneq (,$(filter -O3,$(CFLAGS))) CFLAGS := $(CFLAGS) -Wno-error=maybe-uninitialized endif PREPROCESS_FILES := $(wildcard debian/*.in) $(PREPROCESS_FILES:.in=): %: %.in sed 's,/@DEB_HOST_MULTIARCH@,$(DEB_HOST_MULTIARCH:%=/%),g;$(EXTRA_REPLACES)' $< > $@ UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: *\([0-9]*:\)\?\([^~]*\)\(~.*\)\?-.*$$/\2/ p') MOD_MAJOR_VERSION := $(word 1, $(subst ., ,$(UPSTREAM_VERSION))) MOD_MINOR_VERSION := $(word 2, $(subst ., ,$(UPSTREAM_VERSION))) MOD_PATCH_VERSION := $(or $(word 3, $(subst ., ,$(UPSTREAM_VERSION))),0) debian/nss.pc: EXTRA_REPLACES := s/@VERSION@/$(UPSTREAM_VERSION)/ debian/nss-config: EXTRA_REPLACES := s/@MOD_MAJOR_VERSION@/$(MOD_MAJOR_VERSION)/;s/@MOD_MINOR_VERSION@/$(MOD_MINOR_VERSION)/;s/@MOD_PATCH_VERSION@/$(MOD_PATCH_VERSION)/ debian/libnss3.lintian-overrides: EXTRA_REPLACES := s,/@DEB_HOST_MULTIARCH_WC@,$(DEB_HOST_MULTIARCH:%=/*),g ifneq (,$(filter 64 alpha amd64 ia64 s390x,$(shell dpkg-architecture -qDEB_HOST_ARCH_BITS 2> /dev/null || dpkg-architecture -qDEB_HOST_ARCH))) USE_64 := USE_64=1 else ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),x32) USE_64 := USE_X32=1 else USE_64 := endif # $(foreach foo,$(list),$(call cmd,some command $(foo))) expands to # some command first-elem # some command second-elem # etc. # This avoid using a long one liner with semi colons. define cmd $(1) endef CFLAGS += -Wall -pipe DISTDIR := $(CURDIR)/dist override_dh_auto_build: $(MAKE) -C nss \ all \ NSPR_INCLUDE_DIR=/usr/include/nspr \ NSPR_LIB_DIR=/usr/lib \ SOURCE_PREFIX=$(DISTDIR) \ SOURCE_MD_DIR=$(DISTDIR) \ DIST=$(DISTDIR) \ BUILD_OPT=1 \ NS_USE_GCC=1 \ OPTIMIZER="$(CFLAGS) $(CPPFLAGS)" \ LDFLAGS='$(LDFLAGS) $$(ARCHFLAG) $$(ZDEFS_FLAG)' \ DSO_LDOPTS='-shared $$(LDFLAGS)' \ NSS_USE_SYSTEM_SQLITE=1 \ NSS_ENABLE_ECC=1 \ CHECKLOC= \ $(USE_64) override_dh_auto_clean: -$(MAKE) -C nss \ clobber \ SOURCE_PREFIX=$(DISTDIR) \ SOURCE_MD_DIR=$(DISTDIR) \ DIST=$(DISTDIR) \ BUILD_OPT=1 \ $(USE_64) rm -rf $(DISTDIR) $(PREPROCESS_FILES:.in=) override_dh_auto_install: $(PREPROCESS_FILES:.in=) install -m 755 -d debian/libnss3/usr/lib/$(DEB_HOST_MULTIARCH)/nss debian/libnss3-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig install -m 644 -t debian/libnss3/usr/lib/$(DEB_HOST_MULTIARCH) \ $(DISTDIR)/lib/libnss3.so \ $(DISTDIR)/lib/libnssutil3.so \ $(DISTDIR)/lib/libsmime3.so \ $(DISTDIR)/lib/libssl3.so install -m 644 -t debian/libnss3/usr/lib/$(DEB_HOST_MULTIARCH)/nss \ $(DISTDIR)/lib/libfreebl3.so \ $(DISTDIR)/lib/libfreeblpriv3.so \ $(DISTDIR)/lib/libsoftokn3.so \ $(DISTDIR)/lib/libnssdbm3.so \ $(DISTDIR)/lib/libnsssysinit.so \ $(DISTDIR)/lib/libnssckbi.so install -m 644 -t debian/libnss3-dev/usr/include/nss \ $(DISTDIR)/public/nss/* install -m 644 -t debian/libnss3-dev/usr/lib/$(DEB_HOST_MULTIARCH) \ $(DISTDIR)/lib/libcrmf.a install -m 644 -t debian/libnss3-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig debian/nss.pc install -m 755 -t debian/libnss3-dev/usr/bin debian/nss-config install -m 755 -t debian/libnss3-tools/usr/bin \ $(foreach bin, \ certutil \ chktest \ cmsutil \ crlutil \ derdump \ httpserv \ modutil \ ocspclnt \ p7content \ p7env \ p7sign \ p7verify \ pk12util \ pk1sign \ pwdecrypt \ rsaperf \ selfserv \ shlibsign \ signtool \ signver \ ssltap \ strsclnt \ symkeyutil \ tstclnt \ vfychain \ vfyserv \ , $(DISTDIR)/bin/$(bin)) # these utilities are too generically-named, so we prefix them with nss- (see http://bugs.debian.org/701141) $(foreach bin, \ addbuiltin \ dbtest \ pp \ , $(call cmd,install -m 755 -T $(DISTDIR)/bin/$(bin) debian/libnss3-tools/usr/bin/nss-$(bin))) # Create the empty certificate databases, with empty passphrase mkdir -p debian/tmp echo "\n" > debian/tmp/password mkdir -p debian/libnss3-nssdb/var/lib/nssdb LD_LIBRARY_PATH=$(DISTDIR)/lib $(DISTDIR)/bin/certutil -N -d debian/libnss3-nssdb/var/lib/nssdb \ -f debian/tmp/password LD_LIBRARY_PATH=$(DISTDIR)/lib $(DISTDIR)/bin/certutil -N -d sql:debian/libnss3-nssdb/var/lib/nssdb \ -f debian/tmp/password -@ debian/tmp/password # Remove DBM certificate and key databases. rm debian/libnss3-nssdb/var/lib/nssdb/cert8.db debian/libnss3-nssdb/var/lib/nssdb/key3.db chmod 644 debian/libnss3-nssdb/var/lib/nssdb/* install -m 644 -t debian/libnss3-nssdb/var/lib/nssdb debian/pkcs11.txt override_dh_strip: dh_strip -a --dbg-package=libnss3-dbg $(foreach lib,libsoftokn3.so libfreebl3.so libfreeblpriv3.so libnssdbm3.so, \ LD_LIBRARY_PATH=debian/libnss3/usr/lib/$(DEB_HOST_MULTIARCH):debian/libnss3/usr/lib/$(DEB_HOST_MULTIARCH)/nss \ debian/libnss3-tools/usr/bin/shlibsign -v -i debian/libnss3/usr/lib/$(DEB_HOST_MULTIARCH)/nss/$(lib);) # Check FIPS mode correctly works mkdir -p debian/tmp LD_LIBRARY_PATH=debian/libnss3/usr/lib/$(DEB_HOST_MULTIARCH):debian/libnss3/usr/lib/$(DEB_HOST_MULTIARCH)/nss debian/libnss3-tools/usr/bin/modutil -create -dbdir debian/tmp < /dev/null LD_LIBRARY_PATH=debian/libnss3/usr/lib/$(DEB_HOST_MULTIARCH):debian/libnss3/usr/lib/$(DEB_HOST_MULTIARCH)/nss debian/libnss3-tools/usr/bin/modutil -fips true -dbdir debian/tmp < /dev/null override_dh_makeshlibs: /usr/share/debhelper/autoscripts/postinst-makeshlibs /usr/share/debhelper/autoscripts/postrm-makeshlibs dh_makeshlibs -a -- -c4 cat /usr/share/debhelper/autoscripts/postinst-makeshlibs > debian/libnss3.postinst.debhelper cat /usr/share/debhelper/autoscripts/postrm-makeshlibs > debian/libnss3.postrm.debhelper ifneq (,$(DEB_HOST_MULTIARCH)) override_dh_gencontrol: dh_gencontrol -- -Vmisc:Multi-Arch=same endif override_dh_builddeb: dh_builddeb -- -Zxz %: dh $@ debian/control0000644000000000000000000000754413100145551010576 0ustar Source: nss Section: libs Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Maintainers of Mozilla-related packages Uploaders: Mike Hommey Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1.1~), libnspr4-dev (>= 2:4.13.1), zlib1g-dev, libsqlite3-dev (>= 3.3.9) Standards-Version: 3.9.3.0 Homepage: http://www.mozilla.org/projects/security/pki/nss/ Vcs-Git: git://git.debian.org/git/pkg-mozilla/nss.git Vcs-Browser: http://git.debian.org/?p=pkg-mozilla/nss.git Package: libnss3 Architecture: any Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends}, libnss3-nssdb Conflicts: libnss3-1d (<< 2:3.13.4-2) Multi-Arch: ${misc:Multi-Arch} Description: Network Security Service libraries This is a set of libraries designed to support cross-platform development of security-enabled client and server applications. It can support SSLv2 and v4, TLS, PKCS #5, #7, #11, #12, S/MIME, X.509 v3 certificates and other security standards. Package: libnss3-1d Section: oldlibs Priority: extra Architecture: any Pre-Depends: ${misc:Pre-Depends} Depends: libnss3 (= ${binary:Version}), ${misc:Depends} Multi-Arch: ${misc:Multi-Arch} Description: Network Security Service libraries - transitional package This is a transitional package to ensure smooth transition of all packages to libnss3. Package: libnss3-nssdb Section: admin Architecture: all Pre-Depends: ${misc:Pre-Depends} Depends: libnss3 (= ${binary:Version}), ${misc:Depends} Multi-Arch: foreign Description: Network Security Security libraries - shared databases This package includes shared certificate and key databases. Package: libnss3-tools Section: admin Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Network Security Service tools This is a set of tools on top of the Network Security Service libraries. This package includes: * certutil: manages certificate and key databases (cert7.db and key3.db) * modutil: manages the database of PKCS11 modules (secmod.db) * pk12util: imports/exports keys and certificates between the cert/key databases and files in PKCS12 format. * shlibsign: creates .chk files for use in FIPS mode. * signtool: creates digitally-signed jar archives containing files and/or code. * ssltap: proxy requests for an SSL server and display the contents of the messages exchanged between the client and server. Homepage: http://www.mozilla.org/projects/security/pki/nss/tools/ Package: libnss3-dev Section: libdevel Architecture: any Depends: ${misc:Depends}, libnss3 (= ${binary:Version}), libnspr4-dev (>= 4.6.6-1) Multi-Arch: ${misc:Multi-Arch} Description: Development files for the Network Security Service libraries This is a set of libraries designed to support cross-platform development of security-enabled client and server applications. It can support SSLv2 and v4, TLS, PKCS #5, #7, #11, #12, S/MIME, X.509 v3 certificates and other security standards. . Install this package if you wish to develop your own programs using the Network Security Service Libraries. Package: libnss3-dbg Section: debug Priority: extra Architecture: any Depends: ${misc:Depends}, libnss3 (= ${binary:Version}) | libnss3-tools (= ${binary:Version}) Conflicts: libnss3 (<< ${binary:Version}), libnss3 (>> ${binary:Version}), libnss3-tools (<< ${binary:Version}), libnss3-tools (>> ${binary:Version}) Provides: libnss3-1d-dbg Multi-Arch: ${misc:Multi-Arch} Description: Debugging symbols for the Network Security Service libraries This is a set of libraries designed to support cross-platform development of security-enabled client and server applications. It can support SSLv2 and v4, TLS, PKCS #5, #7, #11, #12, S/MIME, X.509 v3 certificates and other security standards. . This package provides the debugging symbols for the library. debian/watch0000644000000000000000000000017612234360534010225 0ustar version=3 http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_(\d_[\d_]+)_RTM/src/nss-([\d\.]+)\.tar\.(?:bz2|gz) debian/libnss3.symbols0000644000000000000000000001013713100150335012146 0ustar libnss3.so libnss3 (>= 2:3.13.4-2~) | libnss3-1d #MINVER# |libnss3 #MINVER# *@NSS_3.10.2 3.12.0~1.9b1 *@NSS_3.10 3.12.0~1.9b1 *@NSS_3.11.1 3.12.0~1.9b1 *@NSS_3.11.2 3.12.0~1.9b1 *@NSS_3.11.7 3.12.0~1.9b1 *@NSS_3.11.9 3.12.0~beta2 *@NSS_3.11 3.12.0~1.9b1 *@NSS_3.12.1 3.12.1 *@NSS_3.12.3 3.12.3 *@NSS_3.12.4 3.12.4 *@NSS_3.12.5 3.12.5 *@NSS_3.12.6 3.12.6 *@NSS_3.12.7 3.12.7 *@NSS_3.12.9 3.12.9~beta2 *@NSS_3.12.10 3.12.10 *@NSS_3.12 3.12.0~1.9b1 *@NSS_3.13 3.13 *@NSS_3.13.2 3.13.2~beta1 *@NSS_3.14 2:3.14 1 *@NSS_3.14.1 2:3.14.1~beta2 1 *@NSS_3.14.3 2:3.14.3 1 *@NSS_3.15 2:3.15 1 *@NSS_3.15.4 2:3.15.4 1 *@NSS_3.16.1 2:3.16.1 1 *@NSS_3.16.2 2:3.16.2 1 *@NSS_3.18 2:3.18 1 *@NSS_3.19 2:3.19 1 *@NSS_3.19.1 2:3.19.1 1 *@NSS_3.2.1 3.12.0~1.9b1 *@NSS_3.21 2:3.21 1 *@NSS_3.22 2:3.22 1 *@NSS_3.2 3.12.0~1.9b1 *@NSS_3.3.1 3.12.0~1.9b1 *@NSS_3.3 3.12.0~1.9b1 *@NSS_3.4 3.12.0~1.9b1 *@NSS_3.5 3.12.0~1.9b1 *@NSS_3.6 3.12.0~1.9b1 *@NSS_3.7.1 3.12.0~1.9b1 *@NSS_3.7 3.12.0~1.9b1 *@NSS_3.8 3.12.0~1.9b1 *@NSS_3.9.2 3.12.0~1.9b1 *@NSS_3.9.3 3.12.0~1.9b1 *@NSS_3.9 3.12.0~1.9b1 CERT_EncodeSubjectKeyID@NSS_3.12 3.12.0~beta2 CERT_GetClassicOCSPDisabledPolicy@NSS_3.12 3.12.0~beta3 CERT_GetClassicOCSPEnabledHardFailurePolicy@NSS_3.12 3.12.0~beta3 CERT_GetClassicOCSPEnabledSoftFailurePolicy@NSS_3.12 3.12.0~beta3 CERT_GetPKIXVerifyNistRevocationPolicy@NSS_3.12 3.12.0~beta3 CERT_GetUsePKIXForValidation@NSS_3.12 3.12.0~beta3 CERT_GetValidDNSPatternsFromCert@NSS_3.12 3.12.0~beta2 CERT_NewTempCertificate@NSS_3.12 3.12.0~beta3 CERT_SetOCSPTimeout@NSS_3.12 3.12.0~beta2 CERT_SetUsePKIXForValidation@NSS_3.12 3.12.0~beta3 HASH_GetType@NSS_3.12 3.12.0~beta3 NSS_InitWithMerge@NSS_3.12 3.12.0~beta3 PK11_CreateGenericObject@NSS_3.12 3.12.0~beta2 PK11_CreateMergeLog@NSS_3.12 3.12.0~beta3 PK11_CreatePBEV2AlgorithmID@NSS_3.12 3.12.0~beta2 PK11_DestroyMergeLog@NSS_3.12 3.12.0~beta3 PK11_GetPBECryptoMechanism@NSS_3.12 3.12.0~beta2 PK11_IsRemovable@NSS_3.12 3.12.0~beta3 PK11_MergeTokens@NSS_3.12 3.12.0~beta3 PK11_WriteRawAttribute@NSS_3.12 3.12.0~beta2 SEC_PKCS5IsAlgorithmPBEAlgTag@NSS_3.12 3.12.0~beta2 libnssutil3.so libnss3 (>= 2:3.13.4-2~) | libnss3-1d #MINVER# |libnss3 #MINVER# *@NSSUTIL_3.12.3 3.12.3 *@NSSUTIL_3.12.5 3.12.5 *@NSSUTIL_3.12.7 3.12.7 *@NSSUTIL_3.12 3.12.0~beta2 *@NSSUTIL_3.13 3.13 *@NSSUTIL_3.14 2:3.14 1 *@NSSUTIL_3.15 2:3.15 1 *@NSSUTIL_3.17.1 2:3.17.1 1 *@NSSUTIL_3.21 2:3.21 1 *@NSSUTIL_3.24 2:3.24 1 libsmime3.so libnss3 (>= 2:3.13.4-2~) | libnss3-1d #MINVER# |libnss3 #MINVER# *@NSS_3.10 3.12.0~1.9b1 *@NSS_3.12.2 3.12.2 *@NSS_3.12.10 3.12.10 *@NSS_3.13 3.13 *@NSS_3.15 2:3.15 1 *@NSS_3.16 2:3.16 1 *@NSS_3.18 2:3.18 1 *@NSS_3.2.1 3.12.0~1.9b1 *@NSS_3.2 3.12.0~1.9b1 *@NSS_3.3 3.12.0~1.9b1 *@NSS_3.4.1 3.12.0~1.9b1 *@NSS_3.4 3.12.0~1.9b1 *@NSS_3.6 3.12.0~1.9b1 *@NSS_3.7.2 3.12.0~1.9b1 *@NSS_3.7 3.12.0~1.9b1 *@NSS_3.8 3.12.0~1.9b1 *@NSS_3.9.3 3.12.0~1.9b1 *@NSS_3.9 3.12.0~1.9b1 libssl3.so libnss3 (>= 2:3.13.4-2~) | libnss3-1d #MINVER# |libnss3 #MINVER# *@NSS_3.11.4 3.12.0~1.9b1 *@NSS_3.11.8 3.12.0~1.9b1 *@NSS_3.12.6 3.12.6 *@NSS_3.12.10 3.12.10 *@NSS_3.13 3.13 *@NSS_3.13.2 3.13.2 *@NSS_3.14 2:3.14 1 *@NSS_3.15 2:3.15 1 *@NSS_3.15.4 2:3.15.4 1 *@NSS_3.2.1 3.12.0~1.9b1 *@NSS_3.20 2:3.20 1 *@NSS_3.21 2:3.21 1 *@NSS_3.22 2:3.22 1 *@NSS_3.23 2:3.23 1 *@NSS_3.24 2:3.24 1 *@NSS_3.27 2:3.27 1 *@NSS_3.28 2:3.28 1 *@NSS_3.2 3.12.0~1.9b1 *@NSS_3.4 3.12.0~1.9b1 *@NSS_3.7.4 3.12.0~1.9b1 SSL_GetCipherSuiteInfo@NSS_3.4 2:3.24 SSL_GetChannelInfo@NSS_3.4 2:3.26 libfreebl3.so libnss3 (>= 2:3.13.4-2~) | libnss3-1d #MINVER# |libnss3 #MINVER# *@NSSprivate_3.11 3.12.0~1.9b1 *@NSSRAWHASH_3.12.3 3.12.3 libfreeblpriv3.so libnss3 #MINVER# *@NSSprivate_3.11 2:3.24 *@NSSprivate_3.16 2:3.24 libnssckbi.so libnss3 (>= 2:3.13.4-2~) | libnss3-1d #MINVER# |libnss3 #MINVER# *@NSS_3.1 3.12.0~1.9b1 libnssdbm3.so libnss3 (>= 2:3.13.4-2~) | libnss3-1d #MINVER# |libnss3 #MINVER# *@NSSDBM_3.12 3.12.0 libnsssysinit.so libnss3 #MINVER# NSS_ReturnModuleSpecData@Base 3.14.2 libsoftokn3.so libnss3 (>= 2:3.13.4-2~) | libnss3-1d #MINVER# |libnss3 #MINVER# *@NSS_3.4 3.12.0~1.9b1 debian/patches/0000755000000000000000000000000013433003606010613 5ustar debian/patches/80_security_tools.patch0000644000000000000000000000151012667671404015246 0ustar ## 80_security_tools.patch by Mike Hommey ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Enable building of some NSS tools. ## DP: Disable rpath. Index: nss/nss/cmd/platlibs.mk =================================================================== --- nss.orig/nss/cmd/platlibs.mk +++ nss/nss/cmd/platlibs.mk @@ -8,6 +8,7 @@ ifeq ($(BUILD_SUN_PKG), 1) # set RPATH-type linker instructions here so they can be used in the shared # version and in the mixed (static nss libs/shared NSPR libs) version. +ifdef ENABLE_RPATH ifeq ($(OS_ARCH), SunOS) ifeq ($(USE_64), 1) EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64' @@ -31,6 +32,7 @@ DBMLIB = $(NULL) else DBMLIB = $(DIST)/lib/$(LIB_PREFIX)dbm.$(LIB_SUFFIX) endif +endif ifdef USE_STATIC_LIBS debian/patches/85_security_load.patch0000644000000000000000000001445213100126712015017 0ustar ## 85_security_load.patch by Mike Hommey ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Load modules from $ORIGIN/nss. Index: nss-3.28.4/nss/cmd/shlibsign/shlibsign.c =================================================================== --- nss-3.28.4.orig/nss/cmd/shlibsign/shlibsign.c 2017-04-26 10:20:33.734775933 -0400 +++ nss-3.28.4/nss/cmd/shlibsign/shlibsign.c 2017-04-26 10:22:27.452563994 -0400 @@ -49,6 +49,9 @@ /* freebl headers */ #include "shsign.h" +/* nssutil headers */ +#include "secport.h" + #define NUM_ELEM(array) (sizeof(array) / sizeof(array[0])) CK_BBOOL true = CK_TRUE; CK_BBOOL false = CK_FALSE; @@ -706,7 +709,6 @@ { PLOptState *optstate; char *program_name; - char *libname = NULL; PRLibrary *lib = NULL; PRFileDesc *fd; PRStatus rv = PR_SUCCESS; @@ -864,22 +866,21 @@ return 1; } - /* Get the platform-dependent library name of the + /* Get the platform-dependent library of the * NSS cryptographic module. */ - libname = PR_GetLibraryName(NULL, "softokn3"); - assert(libname != NULL); - if (!libname) { - PR_fprintf(PR_STDERR, "getting softokn3 failed"); - goto cleanup; - } - lib = PR_LoadLibrary(libname); + lib = PORT_LoadLibraryFromOrigin( + SHLIB_PREFIX"nssutil"SHLIB_VERSION"."SHLIB_SUFFIX, + (PRFuncPtr) &PORT_Alloc, /* Use an arbitry unused function, as on some + * platforms, using PORT_LoadLibraryFromOrigin + * would only give a pointer in the PLT because + * of the function call. */ + SHLIB_PREFIX"softokn"SOFTOKEN_SHLIB_VERSION"."SHLIB_SUFFIX); assert(lib != NULL); if (!lib) { PR_fprintf(PR_STDERR, "loading softokn3 failed"); goto cleanup; } - PR_FreeLibraryName(libname); if (FIPSMODE) { /* FIPSMODE == FC_GetFunctionList */ Index: nss-3.28.4/nss/lib/pk11wrap/pk11load.c =================================================================== --- nss-3.28.4.orig/nss/lib/pk11wrap/pk11load.c 2017-04-26 10:20:33.734775933 -0400 +++ nss-3.28.4/nss/lib/pk11wrap/pk11load.c 2017-04-26 10:23:46.289798564 -0400 @@ -440,6 +440,13 @@ * unload the library if anything goes wrong from here on out... */ library = PR_LoadLibrary(mod->dllName); + if ((library == NULL) && + !rindex(mod->dllName, PR_GetDirectorySeparator())) { + library = PORT_LoadLibraryFromOrigin(my_shlib_name, + (PRFuncPtr) &softoken_LoadDSO, + mod->dllName); + } + mod->library = (void *)library; if (library == NULL) { Index: nss-3.28.4/nss/lib/util/secload.c =================================================================== --- nss-3.28.4.orig/nss/lib/util/secload.c 2017-04-26 10:20:33.734775933 -0400 +++ nss-3.28.4/nss/lib/util/secload.c 2017-04-26 10:24:26.974434391 -0400 @@ -65,14 +65,19 @@ { PRLibrary* dlh = NULL; char* fullName = NULL; - char* c; + const char* c; PRLibSpec libSpec; /* Remove the trailing filename from referencePath and add the new one */ c = strrchr(referencePath, PR_GetDirectorySeparator()); + if (!c) { /* referencePath doesn't contain a / means that dladdr gave us argv[0] + * and program was called from $PATH. Hack to get libs from /usr/lib */ + referencePath = "/usr/lib/"; + c = &referencePath[8]; /* last / */ + } if (c) { size_t referencePathSize = 1 + c - referencePath; - fullName = (char*)PORT_Alloc(strlen(name) + referencePathSize + 1); + fullName = (char*)PORT_Alloc(strlen(name) + referencePathSize + 5); if (fullName) { memcpy(fullName, referencePath, referencePathSize); strcpy(fullName + referencePathSize, name); @@ -82,6 +87,12 @@ #endif libSpec.type = PR_LibSpec_Pathname; libSpec.value.pathname = fullName; + if ((referencePathSize >= 4) && + (strncmp(fullName + referencePathSize - 4, "bin", 3) == 0)) { + memcpy(fullName + referencePathSize -4, "lib", 3); + } + strcpy(fullName + referencePathSize, "nss/"); + strcpy(fullName + referencePathSize + 4, name); dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL #ifdef PR_LD_ALT_SEARCH_PATH /* allow library's dependencies to be found in the same directory @@ -89,6 +100,10 @@ | PR_LD_ALT_SEARCH_PATH #endif ); + if (! dlh) { + strcpy(fullName + referencePathSize, name); + dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL); + } PORT_Free(fullName); } } Index: nss-3.28.4/nss/cmd/shlibsign/Makefile =================================================================== --- nss-3.28.4.orig/nss/cmd/shlibsign/Makefile 2017-04-26 10:20:33.734775933 -0400 +++ nss-3.28.4/nss/cmd/shlibsign/Makefile 2017-04-26 10:20:33.730775869 -0400 @@ -30,6 +30,7 @@ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \ + $(NSSUTIL_LIB_DIR)/$(IMPORT_LIB_PREFIX)nssutil3$(IMPORT_LIB_SUFFIX) \ $(NULL) else @@ -39,6 +40,8 @@ -lplc4 \ -lplds4 \ -lnspr4 \ + -L$(NSSUTIL_LIB_DIR) \ + -lnssutil3 \ $(NULL) endif Index: nss-3.28.4/nss/cmd/shlibsign/manifest.mn =================================================================== --- nss-3.28.4.orig/nss/cmd/shlibsign/manifest.mn 2017-04-26 10:20:33.734775933 -0400 +++ nss-3.28.4/nss/cmd/shlibsign/manifest.mn 2017-04-26 10:20:33.730775869 -0400 @@ -8,7 +8,13 @@ # MODULE public and private header directories are implicitly REQUIRED. MODULE = nss -DEFINES += -DSHLIB_SUFFIX=\"$(DLL_SUFFIX)\" -DSHLIB_PREFIX=\"$(DLL_PREFIX)\" +LIBRARY_VERSION = 3 +SOFTOKEN_LIBRARY_VERSION = 3 + +DEFINES += -DSHLIB_SUFFIX=\"$(DLL_SUFFIX)\" -DSHLIB_PREFIX=\"$(DLL_PREFIX)\" \ + -DSHLIB_VERSION=\"$(LIBRARY_VERSION)\" \ + -DSOFTOKEN_SHLIB_VERSION=\"$(SOFTOKEN_LIBRARY_VERSION)\" + CSRCS = \ shlibsign.c \ debian/patches/series0000644000000000000000000000042113433003606012025 0ustar 38_hurd.patch 38_kbsd.patch 80_security_tools.patch 85_security_load.patch CVE-2017-7502.patch CVE-2017-7805.patch CVE-2018-0495.patch CVE-2018-12384-1.patch CVE-2018-12384-2.patch CVE-2018-12404-1.patch CVE-2018-12404-3.patch CVE-2018-18508-1.patch CVE-2018-18508-2.patch debian/patches/CVE-2018-0495.patch0000644000000000000000000001651313404746503013256 0ustar Backport of: # HG changeset patch # User Franziskus Kiefer # Date 1527579529 -7200 # Node ID ca18ca4ba00d97ac9683d92d3a16d9832342ba75 # Parent db7f6facd8dfa0ec4f91612b62c563ecf3892063 Bug 1464971 - improve ecdsa and dsa, r=mt Differential Revision: https://phabricator.services.mozilla.com/D1441 Index: nss-3.28.4/nss/lib/freebl/dsa.c =================================================================== --- nss-3.28.4.orig/nss/lib/freebl/dsa.c 2018-12-14 09:16:21.558298874 -0500 +++ nss-3.28.4/nss/lib/freebl/dsa.c 2018-12-14 09:16:21.558298874 -0500 @@ -16,14 +16,11 @@ #include "blapi.h" #include "nssilock.h" #include "secitem.h" -#include "blapi.h" +#include "blapit.h" #include "mpi.h" #include "secmpi.h" #include "pqg.h" -/* XXX to be replaced by define in blapit.h */ -#define NSS_FREEBL_DSA_DEFAULT_CHUNKSIZE 2048 - /* * FIPS 186-2 requires result from random output to be reduced mod q when * generating random numbers for DSA. @@ -168,7 +165,7 @@ dsa_NewKeyExtended(const PQGParams *para return SECFailure; } /* Initialize an arena for the DSA key. */ - arena = PORT_NewArena(NSS_FREEBL_DSA_DEFAULT_CHUNKSIZE); + arena = PORT_NewArena(NSS_FREEBL_DEFAULT_CHUNKSIZE); if (!arena) { PORT_SetError(SEC_ERROR_NO_MEMORY); return SECFailure; @@ -213,8 +210,9 @@ cleanup: mp_clear(&g); mp_clear(&x); mp_clear(&y); - if (key) + if (key) { PORT_FreeArena(key->params.arena, PR_TRUE); + } if (err) { translate_mpi_error(err); return SECFailure; @@ -321,6 +319,7 @@ dsa_SignDigest(DSAPrivateKey *key, SECIt mp_int x, k; /* private key & pseudo-random integer */ mp_int r, s; /* tuple (r, s) is signature) */ mp_int t; /* holding tmp values */ + mp_int ar; /* holding blinding values */ mp_err err = MP_OKAY; SECStatus rv = SECSuccess; unsigned int dsa_subprime_len, dsa_signature_len, offset; @@ -364,6 +363,7 @@ dsa_SignDigest(DSAPrivateKey *key, SECIt MP_DIGITS(&r) = 0; MP_DIGITS(&s) = 0; MP_DIGITS(&t) = 0; + MP_DIGITS(&ar) = 0; CHECK_MPI_OK(mp_init(&p)); CHECK_MPI_OK(mp_init(&q)); CHECK_MPI_OK(mp_init(&g)); @@ -372,6 +372,7 @@ dsa_SignDigest(DSAPrivateKey *key, SECIt CHECK_MPI_OK(mp_init(&r)); CHECK_MPI_OK(mp_init(&s)); CHECK_MPI_OK(mp_init(&t)); + CHECK_MPI_OK(mp_init(&ar)); /* ** Convert stored PQG and private key into MPI integers. */ @@ -397,14 +398,28 @@ dsa_SignDigest(DSAPrivateKey *key, SECIt rv = SECFailure; goto cleanup; } - SECITEM_TO_MPINT(t2, &t); /* t <-$ Zq */ + SECITEM_TO_MPINT(t2, &t); /* t <-$ Zq */ + SECITEM_FreeItem(&t2, PR_FALSE); + if (DSA_NewRandom(NULL, &key->params.subPrime, &t2) != SECSuccess) { + PORT_SetError(SEC_ERROR_NEED_RANDOM); + rv = SECFailure; + goto cleanup; + } + SECITEM_TO_MPINT(t2, &ar); /* ar <-$ Zq */ + SECITEM_FreeItem(&t2, PR_FALSE); + + /* Using mp_invmod on k directly would leak bits from k. */ + CHECK_MPI_OK(mp_mul(&k, &ar, &k)); /* k = k * ar */ CHECK_MPI_OK(mp_mulmod(&k, &t, &q, &k)); /* k = k * t mod q */ CHECK_MPI_OK(mp_invmod(&k, &q, &k)); /* k = k**-1 mod q */ CHECK_MPI_OK(mp_mulmod(&k, &t, &q, &k)); /* k = k * t mod q */ SECITEM_TO_MPINT(localDigest, &s); /* s = HASH(M) */ - CHECK_MPI_OK(mp_mulmod(&x, &r, &q, &x)); /* x = x * r mod q */ - CHECK_MPI_OK(mp_addmod(&s, &x, &q, &s)); /* s = s + x mod q */ - CHECK_MPI_OK(mp_mulmod(&s, &k, &q, &s)); /* s = s * k mod q */ + /* To avoid leaking secret bits here the addition is blinded. */ + CHECK_MPI_OK(mp_mul(&x, &ar, &x)); /* x = x * ar */ + CHECK_MPI_OK(mp_mulmod(&x, &r, &q, &x)); /* x = x * r mod q */ + CHECK_MPI_OK(mp_mulmod(&s, &ar, &q, &t)); /* t = s * ar mod q */ + CHECK_MPI_OK(mp_add(&t, &x, &s)); /* s = t + x */ + CHECK_MPI_OK(mp_mulmod(&s, &k, &q, &s)); /* s = s * k mod q */ /* ** verify r != 0 and s != 0 ** mentioned as optional in FIPS 186-1. @@ -438,7 +453,7 @@ cleanup: mp_clear(&r); mp_clear(&s); mp_clear(&t); - SECITEM_FreeItem(&t2, PR_FALSE); + mp_clear(&ar); if (err) { translate_mpi_error(err); rv = SECFailure; Index: nss-3.28.4/nss/lib/freebl/ec.c =================================================================== --- nss-3.28.4.orig/nss/lib/freebl/ec.c 2018-12-14 09:16:21.558298874 -0500 +++ nss-3.28.4/nss/lib/freebl/ec.c 2018-12-14 09:16:41.818302456 -0500 @@ -671,6 +671,7 @@ ECDSA_SignDigestWithSeed(ECPrivateKey *k mp_int r, s; /* tuple (r, s) is the signature */ mp_int t; /* holding tmp values */ mp_int n; + mp_int ar; /* blinding value */ mp_err err = MP_OKAY; ECParams *ecParams = NULL; SECItem kGpoint = { siBuffer, NULL, 0 }; @@ -692,6 +693,7 @@ ECDSA_SignDigestWithSeed(ECPrivateKey *k MP_DIGITS(&s) = 0; MP_DIGITS(&n) = 0; MP_DIGITS(&t) = 0; + MP_DIGITS(&ar) = 0; /* Check args */ if (!key || !signature || !digest || !kb || (kblen < 0)) { @@ -718,6 +720,7 @@ ECDSA_SignDigestWithSeed(ECPrivateKey *k CHECK_MPI_OK(mp_init(&s)); CHECK_MPI_OK(mp_init(&n)); CHECK_MPI_OK(mp_init(&t)); + CHECK_MPI_OK(mp_init(&ar)); SECITEM_TO_MPINT(ecParams->order, &n); SECITEM_TO_MPINT(key->privateValue, &d); @@ -833,12 +836,25 @@ ECDSA_SignDigestWithSeed(ECPrivateKey *k goto cleanup; } CHECK_MPI_OK(mp_read_unsigned_octets(&t, t2, 2 * ecParams->order.len)); /* t <-$ Zn */ - CHECK_MPI_OK(mp_mulmod(&k, &t, &n, &k)); /* k = k * t mod n */ - CHECK_MPI_OK(mp_invmod(&k, &n, &k)); /* k = k**-1 mod n */ - CHECK_MPI_OK(mp_mulmod(&k, &t, &n, &k)); /* k = k * t mod n */ - CHECK_MPI_OK(mp_mulmod(&d, &r, &n, &d)); /* d = d * r mod n */ - CHECK_MPI_OK(mp_addmod(&s, &d, &n, &s)); /* s = s + d mod n */ - CHECK_MPI_OK(mp_mulmod(&s, &k, &n, &s)); /* s = s * k mod n */ + PORT_Memset(t2, 0, 2 * ecParams->order.len); + if (RNG_GenerateGlobalRandomBytes(t2, 2 * ecParams->order.len) != SECSuccess) { + PORT_SetError(SEC_ERROR_NEED_RANDOM); + rv = SECFailure; + goto cleanup; + } + CHECK_MPI_OK(mp_read_unsigned_octets(&ar, t2, 2 * ecParams->order.len)); /* ar <-$ Zn */ + + /* Using mp_invmod on k directly would leak bits from k. */ + CHECK_MPI_OK(mp_mul(&k, &ar, &k)); /* k = k * ar */ + CHECK_MPI_OK(mp_mulmod(&k, &t, &n, &k)); /* k = k * t mod n */ + CHECK_MPI_OK(mp_invmod(&k, &n, &k)); /* k = k**-1 mod n */ + CHECK_MPI_OK(mp_mulmod(&k, &t, &n, &k)); /* k = k * t mod n */ + /* To avoid leaking secret bits here the addition is blinded. */ + CHECK_MPI_OK(mp_mul(&d, &ar, &t)); /* t = d * ar */ + CHECK_MPI_OK(mp_mulmod(&t, &r, &n, &d)); /* d = t * r mod n */ + CHECK_MPI_OK(mp_mulmod(&s, &ar, &n, &t)); /* t = s * ar mod n */ + CHECK_MPI_OK(mp_add(&t, &d, &s)); /* s = t + d */ + CHECK_MPI_OK(mp_mulmod(&s, &k, &n, &s)); /* s = s * k mod n */ #if EC_DEBUG mp_todecimal(&s, mpstr); @@ -876,6 +892,7 @@ cleanup: mp_clear(&s); mp_clear(&n); mp_clear(&t); + mp_clear(&ar); if (t2) { PORT_Free(t2); debian/patches/38_hurd.patch0000644000000000000000000000353413100126735013115 0ustar ## 38_hurd.patch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Fix FTBFS on Hurd because of MAXPATHLEN Index: nss-3.28.4/nss/cmd/shlibsign/shlibsign.c =================================================================== --- nss-3.28.4.orig/nss/cmd/shlibsign/shlibsign.c 2017-04-26 10:25:31.299437941 -0400 +++ nss-3.28.4/nss/cmd/shlibsign/shlibsign.c 2017-04-26 10:25:31.295437879 -0400 @@ -725,7 +725,6 @@ #ifdef USES_LINKS int ret; struct stat stat_buf; - char link_buf[MAXPATHLEN + 1]; char *link_file = NULL; #endif @@ -1068,10 +1067,22 @@ } if (S_ISLNK(stat_buf.st_mode)) { char *dirpath, *dirend; - ret = readlink(input_file, link_buf, sizeof(link_buf) - 1); - if (ret < 0) { - perror(input_file); - goto cleanup; + char *link_buf = NULL; + size_t size = 64; + while (1) { + link_buf = realloc(link_buf, size); + if (!link_buf) { + perror(input_file); + goto cleanup; + } + ret = readlink(input_file, link_buf, size - 1); + if (ret < 0) { + perror(input_file); + goto cleanup; + } + if (ret < size - 1) + break; + size *= 2; } link_buf[ret] = 0; link_file = mkoutput(input_file); Index: nss-3.28.4/nss/lib/freebl/unix_rand.c =================================================================== --- nss-3.28.4.orig/nss/lib/freebl/unix_rand.c 2017-04-26 10:25:31.299437941 -0400 +++ nss-3.28.4/nss/lib/freebl/unix_rand.c 2017-04-26 10:25:31.295437879 -0400 @@ -1039,6 +1039,10 @@ #define _POSIX_PTHREAD_SEMANTICS #include +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif + PRBool ReadFileOK(char *dir, char *file) { debian/patches/CVE-2018-12404-3.patch0000644000000000000000000001636013404746532013471 0ustar Backport of: # HG changeset patch # User Martin Thomson # Date 1543594048 -3600 # Node ID f550aef6074c43642bdecb0ce21c511c3fbf81eb # Parent 2ac9939c87ccd681fab7bdbe20eaf092eb26e8ed Bug 1485864 - Constant time mp_to_fixlen_octets, r=franziskus Differential Revision: https://phabricator.services.mozilla.com/D11722 Index: nss-3.28.4/nss/gtests/freebl_gtest/mpi_unittest.cc =================================================================== --- nss-3.28.4.orig/nss/gtests/freebl_gtest/mpi_unittest.cc 2018-12-14 09:57:04.005108161 -0500 +++ nss-3.28.4/nss/gtests/freebl_gtest/mpi_unittest.cc 2018-12-14 09:58:52.373260110 -0500 @@ -20,7 +20,7 @@ #include "mpi.h" namespace nss_test { -void gettime(struct timespec *tp) { +void gettime(struct timespec* tp) { #ifdef __MACH__ clock_serv_t cclock; mach_timespec_t mts; @@ -51,6 +51,39 @@ class MPITest : public ::testing::Test { mp_read_radix(&b, b_string.c_str(), 16); EXPECT_EQ(result, mp_cmp(&a, &b)); } + + void dump(const std::string& prefix, const uint8_t* buf, size_t len) { + auto flags = std::cerr.flags(); + std::cerr << prefix << ": [" << std::dec << len << "] "; + for (size_t i = 0; i < len; ++i) { + std::cerr << std::hex << std::setw(2) << std::setfill('0') + << static_cast(buf[i]); + } + std::cerr << std::endl << std::resetiosflags(flags); + } + + void TestToFixedOctets(const std::vector& ref, size_t len) { + mp_int a; + ASSERT_EQ(MP_OKAY, mp_init(&a)); + ASSERT_EQ(MP_OKAY, mp_read_unsigned_octets(&a, ref.data(), ref.size())); + uint8_t buf[len]; + ASSERT_EQ(MP_OKAY, mp_to_fixlen_octets(&a, buf, len)); + size_t compare; + if (len > ref.size()) { + for (size_t i = 0; i < len - ref.size(); ++i) { + ASSERT_EQ(0U, buf[i]) << "index " << i << " should be zero"; + } + compare = ref.size(); + } else { + compare = len; + } + dump("value", ref.data(), ref.size()); + dump("output", buf, len); + ASSERT_EQ(0, memcmp(buf + len - compare, ref.data() + ref.size() - compare, + compare)) + << "comparing " << compare << " octets"; + mp_clear(&a); + } }; TEST_F(MPITest, MpiCmp01Test) { TestCmp("0", "1", -1); } @@ -115,4 +148,45 @@ TEST_F(MPITest, MpiCmpConstTest) { printf("time c: %u\n", time_c / runs); } +TEST_F(MPITest, MpiFixlenOctetsZero) { + std::vector zero = {0}; + TestToFixedOctets(zero, 1); + TestToFixedOctets(zero, 2); + TestToFixedOctets(zero, sizeof(mp_digit)); + TestToFixedOctets(zero, sizeof(mp_digit) + 1); +} + +TEST_F(MPITest, MpiFixlenOctetsVarlen) { + std::vector packed; + for (size_t i = 0; i < sizeof(mp_digit) * 2; ++i) { + packed.push_back(0xa4); // Any non-zero value will do. + TestToFixedOctets(packed, packed.size()); + TestToFixedOctets(packed, packed.size() + 1); + TestToFixedOctets(packed, packed.size() + sizeof(mp_digit)); + } +} + +TEST_F(MPITest, MpiFixlenOctetsTooSmall) { + uint8_t buf[sizeof(mp_digit) * 3]; + std::vector ref; + for (size_t i = 0; i < sizeof(mp_digit) * 2; i++) { + ref.push_back(3); // Any non-zero value will do. + dump("ref", ref.data(), ref.size()); + + mp_int a; + ASSERT_EQ(MP_OKAY, mp_init(&a)); + ASSERT_EQ(MP_OKAY, mp_read_unsigned_octets(&a, ref.data(), ref.size())); +#ifdef DEBUG + // ARGCHK maps to assert() in a debug build. + EXPECT_DEATH(mp_to_fixlen_octets(&a, buf, ref.size() - 1), ""); +#else + EXPECT_EQ(MP_BADARG, mp_to_fixlen_octets(&a, buf, ref.size() - 1)); +#endif + ASSERT_EQ(MP_OKAY, mp_to_fixlen_octets(&a, buf, ref.size())); + ASSERT_EQ(0, memcmp(buf, ref.data(), ref.size())); + + mp_clear(&a); + } +} + } // nss_test Index: nss-3.28.4/nss/lib/freebl/mpi/mpi.c =================================================================== --- nss-3.28.4.orig/nss/lib/freebl/mpi/mpi.c 2018-12-14 09:57:04.005108161 -0500 +++ nss-3.28.4/nss/lib/freebl/mpi/mpi.c 2018-12-14 09:57:04.005108161 -0500 @@ -4799,38 +4799,61 @@ mp_to_signed_octets(const mp_int *mp, un /* }}} */ /* {{{ mp_to_fixlen_octets(mp, str) */ -/* output a buffer of big endian octets exactly as long as requested. */ +/* output a buffer of big endian octets exactly as long as requested. + constant time on the value of mp. */ mp_err mp_to_fixlen_octets(const mp_int *mp, unsigned char *str, mp_size length) { - int ix, pos = 0; + int ix, jx; unsigned int bytes; - ARGCHK(mp != NULL && str != NULL && !SIGN(mp), MP_BADARG); - - bytes = mp_unsigned_octet_size(mp); - ARGCHK(bytes <= length, MP_BADARG); + ARGCHK(mp != NULL, MP_BADARG); + ARGCHK(str != NULL, MP_BADARG); + ARGCHK(!SIGN(mp), MP_BADARG); + ARGCHK(length > 0, MP_BADARG); + + /* Constant time on the value of mp. Don't use mp_unsigned_octet_size. */ + bytes = USED(mp) * MP_DIGIT_SIZE; + + /* If the output is shorter than the native size of mp, then check that any + * bytes not written have zero values. This check isn't constant time on + * the assumption that timing-sensitive callers can guarantee that mp fits + * in the allocated space. */ + ix = USED(mp) - 1; + if (bytes > length) { + unsigned int zeros = bytes - length; + + while (zeros >= MP_DIGIT_SIZE) { + ARGCHK(DIGIT(mp, ix) == 0, MP_BADARG); + zeros -= MP_DIGIT_SIZE; + ix--; + } - /* place any needed leading zeros */ - for (; length > bytes; --length) { - *str++ = 0; + if (zeros > 0) { + mp_digit d = DIGIT(mp, ix); + mp_digit m = ~0ULL << ((MP_DIGIT_SIZE - zeros) * CHAR_BIT); + ARGCHK((d & m) == 0, MP_BADARG); + for (jx = MP_DIGIT_SIZE - zeros - 1; jx >= 0; jx--) { + *str++ = d >> (jx * CHAR_BIT); + } + ix--; + } + } else if (bytes < length) { + /* Place any needed leading zeros. */ + unsigned int zeros = length - bytes; + memset(str, 0, zeros); + str += zeros; } - /* Iterate over each digit... */ - for (ix = USED(mp) - 1; ix >= 0; ix--) { + /* Iterate over each whole digit... */ + for (; ix >= 0; ix--) { mp_digit d = DIGIT(mp, ix); - int jx; /* Unpack digit bytes, high order first */ - for (jx = sizeof(mp_digit) - 1; jx >= 0; jx--) { - unsigned char x = (unsigned char)(d >> (jx * CHAR_BIT)); - if (!pos && !x) /* suppress leading zeros */ - continue; - str[pos++] = x; + for (jx = MP_DIGIT_SIZE - 1; jx >= 0; jx--) { + *str++ = d >> (jx * CHAR_BIT); } } - if (!pos) - str[pos++] = 0; return MP_OKAY; } /* end mp_to_fixlen_octets() */ /* }}} */ Index: nss-3.28.4/nss/lib/freebl/mpi/mpi.h =================================================================== --- nss-3.28.4.orig/nss/lib/freebl/mpi/mpi.h 2018-12-14 09:57:04.005108161 -0500 +++ nss-3.28.4/nss/lib/freebl/mpi/mpi.h 2018-12-14 09:57:04.005108161 -0500 @@ -128,7 +128,8 @@ typedef int mp_sword; #define MP_WORD_MAX UINT_MAX #endif -#define MP_DIGIT_BIT (CHAR_BIT * sizeof(mp_digit)) +#define MP_DIGIT_SIZE sizeof(mp_digit) +#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE) #define MP_WORD_BIT (CHAR_BIT * sizeof(mp_word)) #define MP_RADIX (1 + (mp_word)MP_DIGIT_MAX) debian/patches/CVE-2018-12404-1.patch0000644000000000000000000001015113404746526013462 0ustar Backport of: # HG changeset patch # User Franziskus Kiefer # Date 1540551022 -7200 # Node ID 93b536c98e60fe27e4cbf859e746c0929905ec23 # Parent e00f455d90e5ed34038a1b74c2d53093ba19233f Bug 1485864 - improve RSA key exchange handling, r=mt Differential Revision: https://phabricator.services.mozilla.com//D9914 Index: nss-3.28.4/nss/lib/ssl/ssl3con.c =================================================================== --- nss-3.28.4.orig/nss/lib/ssl/ssl3con.c 2018-12-14 09:51:24.392633839 -0500 +++ nss-3.28.4/nss/lib/ssl/ssl3con.c 2018-12-14 09:52:53.468757903 -0500 @@ -9892,6 +9892,23 @@ ssl3_GenerateRSAPMS(sslSocket *ss, ssl3C return pms; } +static void +ssl3_CSwapPK11SymKey(PK11SymKey **x, PK11SymKey **y, PRBool c) +{ + uintptr_t mask = (uintptr_t)c; + unsigned int i; + for (i = 1; i < sizeof(uintptr_t) * 8; i <<= 1) { + mask |= mask << i; + } + uintptr_t x_ptr = (uintptr_t)*x; + uintptr_t y_ptr = (uintptr_t)*y; + uintptr_t tmp = (x_ptr ^ y_ptr) & mask; + x_ptr = x_ptr ^ tmp; + y_ptr = y_ptr ^ tmp; + *x = (PK11SymKey *)x_ptr; + *y = (PK11SymKey *)y_ptr; +} + /* Note: The Bleichenbacher attack on PKCS#1 necessitates that we NEVER * return any indication of failure of the Client Key Exchange message, * where that failure is caused by the content of the client's message. @@ -9912,9 +9929,9 @@ ssl3_HandleRSAClientKeyExchange(sslSocke { SECStatus rv; SECItem enc_pms; - PK11SymKey *tmpPms[2] = { NULL, NULL }; - PK11SlotInfo *slot; - int useFauxPms = 0; + PK11SymKey *pms = NULL; + PK11SymKey *fauxPms = NULL; + PK11SlotInfo *slot = NULL; PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss)); PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); @@ -9935,11 +9952,6 @@ ssl3_HandleRSAClientKeyExchange(sslSocke } } -#define currentPms tmpPms[!useFauxPms] -#define unusedPms tmpPms[useFauxPms] -#define realPms tmpPms[1] -#define fauxPms tmpPms[0] - /* * Get as close to algorithm 2 from RFC 5246; Section 7.4.7.1 * as we can within the constraints of the PKCS#11 interface. @@ -9994,40 +10006,33 @@ ssl3_HandleRSAClientKeyExchange(sslSocke * the unwrap. Rather, it is the mechanism with which the * unwrapped pms will be used. */ - realPms = PK11_PubUnwrapSymKey(serverKeyPair->privKey, &enc_pms, - CKM_SSL3_MASTER_KEY_DERIVE, CKA_DERIVE, 0); + pms = PK11_PubUnwrapSymKey(serverKeyPair->privKey, &enc_pms, + CKM_SSL3_MASTER_KEY_DERIVE, CKA_DERIVE, 0); /* Temporarily use the PMS if unwrapping the real PMS fails. */ - useFauxPms |= (realPms == NULL); + ssl3_CSwapPK11SymKey(&pms, &fauxPms, pms == NULL); /* Attempt to derive the MS from the PMS. This is the only way to * check the version field in the RSA PMS. If this fails, we * then use the faux PMS in place of the PMS. Note that this * operation should never fail if we are using the faux PMS * since it is correctly formatted. */ - rv = ssl3_ComputeMasterSecret(ss, currentPms, NULL); + rv = ssl3_ComputeMasterSecret(ss, pms, NULL); - /* If we succeeded, then select the true PMS and discard the - * FPMS. Else, select the FPMS and select the true PMS */ - useFauxPms |= (rv != SECSuccess); - - if (unusedPms) { - PK11_FreeSymKey(unusedPms); - } + /* If we succeeded, then select the true PMS, else select the FPMS. */ + ssl3_CSwapPK11SymKey(&pms, &fauxPms, (rv != SECSuccess) & (fauxPms != NULL)); /* This step will derive the MS from the PMS, among other things. */ - rv = ssl3_InitPendingCipherSpec(ss, currentPms); - PK11_FreeSymKey(currentPms); + rv = ssl3_InitPendingCipherSpec(ss, pms); + + /* Clear both PMS. */ + PK11_FreeSymKey(pms); + PK11_FreeSymKey(fauxPms); if (rv != SECSuccess) { (void)SSL3_SendAlert(ss, alert_fatal, handshake_failure); return SECFailure; /* error code set by ssl3_InitPendingCipherSpec */ } -#undef currentPms -#undef unusedPms -#undef realPms -#undef fauxPms - return SECSuccess; } debian/patches/CVE-2018-18508-1.patch0000644000000000000000000002262313433003602013463 0ustar Backport of: # HG changeset patch # User J.C. Jones # Date 1547271196 25200 # Node ID 08d1b0c1117f7a9a5382440864e243ece0d1a7a3 # Parent 5e70b72131ac28457b14cdc6100e8674409bbdd4 Bug 1507174 - Add additional null checks to other CMS functions r=mt Differential review: https://phabricator.services.mozilla.com//D16383 Index: nss-3.42/nss/lib/smime/cmscinfo.c =================================================================== --- nss-3.42.orig/nss/lib/smime/cmscinfo.c 2019-02-19 12:00:17.662903828 +0100 +++ nss-3.42/nss/lib/smime/cmscinfo.c 2019-02-19 12:00:17.662903828 +0100 @@ -51,6 +51,10 @@ NSS_CMSContentInfo_Destroy(NSSCMSContent { SECOidTag kind; + if (cinfo == NULL) { + return; + } + kind = NSS_CMSContentInfo_GetContentTypeTag(cinfo); switch (kind) { case SEC_OID_PKCS7_ENVELOPED_DATA: @@ -86,6 +90,11 @@ NSSCMSContentInfo * NSS_CMSContentInfo_GetChildContentInfo(NSSCMSContentInfo *cinfo) { NSSCMSContentInfo *ccinfo = NULL; + + if (cinfo == NULL) { + return NULL; + } + SECOidTag tag = NSS_CMSContentInfo_GetContentTypeTag(cinfo); switch (tag) { case SEC_OID_PKCS7_SIGNED_DATA: @@ -127,6 +136,9 @@ SECStatus NSS_CMSContentInfo_SetDontStream(NSSCMSContentInfo *cinfo, PRBool dontStream) { SECStatus rv; + if (cinfo == NULL) { + return SECFailure; + } rv = NSS_CMSContentInfo_Private_Init(cinfo); if (rv != SECSuccess) { @@ -145,15 +157,20 @@ NSS_CMSContentInfo_SetContent(NSSCMSMess SECOidTag type, void *ptr) { SECStatus rv; + if (cinfo == NULL || cmsg == NULL) { + return SECFailure; + } cinfo->contentTypeTag = SECOID_FindOIDByTag(type); - if (cinfo->contentTypeTag == NULL) + if (cinfo->contentTypeTag == NULL) { return SECFailure; + } /* do not copy the oid, just create a reference */ rv = SECITEM_CopyItem(cmsg->poolp, &(cinfo->contentType), &(cinfo->contentTypeTag->oid)); - if (rv != SECSuccess) + if (rv != SECSuccess) { return SECFailure; + } cinfo->content.pointer = ptr; @@ -185,8 +202,9 @@ SECStatus NSS_CMSContentInfo_SetContent_Data(NSSCMSMessage *cmsg, NSSCMSContentInfo *cinfo, SECItem *data, PRBool detached) { - if (NSS_CMSContentInfo_SetContent(cmsg, cinfo, SEC_OID_PKCS7_DATA, (void *)data) != SECSuccess) + if (NSS_CMSContentInfo_SetContent(cmsg, cinfo, SEC_OID_PKCS7_DATA, (void *)data) != SECSuccess) { return SECFailure; + } if (detached) { cinfo->rawContent = NULL; } @@ -230,6 +248,10 @@ NSS_CMSContentInfo_SetContent_EncryptedD void * NSS_CMSContentInfo_GetContent(NSSCMSContentInfo *cinfo) { + if (cinfo == NULL) { + return NULL; + } + SECOidTag tag = cinfo->contentTypeTag ? cinfo->contentTypeTag->offset : SEC_OID_UNKNOWN; @@ -260,6 +282,10 @@ NSS_CMSContentInfo_GetInnerContent(NSSCM SECOidTag tag; SECItem *pItem = NULL; + if (cinfo == NULL) { + return NULL; + } + tag = NSS_CMSContentInfo_GetContentTypeTag(cinfo); if (NSS_CMSType_IsData(tag)) { pItem = cinfo->content.data; @@ -282,6 +308,10 @@ NSS_CMSContentInfo_GetInnerContent(NSSCM SECOidTag NSS_CMSContentInfo_GetContentTypeTag(NSSCMSContentInfo *cinfo) { + if (cinfo == NULL) { + return SEC_OID_UNKNOWN; + } + if (cinfo->contentTypeTag == NULL) cinfo->contentTypeTag = SECOID_FindOID(&(cinfo->contentType)); @@ -294,11 +324,17 @@ NSS_CMSContentInfo_GetContentTypeTag(NSS SECItem * NSS_CMSContentInfo_GetContentTypeOID(NSSCMSContentInfo *cinfo) { - if (cinfo->contentTypeTag == NULL) + if (cinfo == NULL) { + return NULL; + } + + if (cinfo->contentTypeTag == NULL) { cinfo->contentTypeTag = SECOID_FindOID(&(cinfo->contentType)); + } - if (cinfo->contentTypeTag == NULL) + if (cinfo->contentTypeTag == NULL) { return NULL; + } return &(cinfo->contentTypeTag->oid); } @@ -310,8 +346,13 @@ NSS_CMSContentInfo_GetContentTypeOID(NSS SECOidTag NSS_CMSContentInfo_GetContentEncAlgTag(NSSCMSContentInfo *cinfo) { - if (cinfo->contentEncAlgTag == SEC_OID_UNKNOWN) + if (cinfo == NULL) { + return SEC_OID_UNKNOWN; + } + + if (cinfo->contentEncAlgTag == SEC_OID_UNKNOWN) { cinfo->contentEncAlgTag = SECOID_GetAlgorithmTag(&(cinfo->contentEncAlg)); + } return cinfo->contentEncAlgTag; } @@ -322,6 +363,10 @@ NSS_CMSContentInfo_GetContentEncAlgTag(N SECAlgorithmID * NSS_CMSContentInfo_GetContentEncAlg(NSSCMSContentInfo *cinfo) { + if (cinfo == NULL) { + return NULL; + } + return &(cinfo->contentEncAlg); } @@ -330,10 +375,14 @@ NSS_CMSContentInfo_SetContentEncAlg(PLAr SECOidTag bulkalgtag, SECItem *parameters, int keysize) { SECStatus rv; + if (cinfo == NULL) { + return SECFailure; + } rv = SECOID_SetAlgorithmID(poolp, &(cinfo->contentEncAlg), bulkalgtag, parameters); - if (rv != SECSuccess) + if (rv != SECSuccess) { return SECFailure; + } cinfo->keysize = keysize; return SECSuccess; } @@ -343,27 +392,42 @@ NSS_CMSContentInfo_SetContentEncAlgID(PL SECAlgorithmID *algid, int keysize) { SECStatus rv; + if (cinfo == NULL) { + return SECFailure; + } rv = SECOID_CopyAlgorithmID(poolp, &(cinfo->contentEncAlg), algid); - if (rv != SECSuccess) + if (rv != SECSuccess) { return SECFailure; - if (keysize >= 0) + } + if (keysize >= 0) { cinfo->keysize = keysize; + } return SECSuccess; } void NSS_CMSContentInfo_SetBulkKey(NSSCMSContentInfo *cinfo, PK11SymKey *bulkkey) { - cinfo->bulkkey = PK11_ReferenceSymKey(bulkkey); - cinfo->keysize = PK11_GetKeyStrength(cinfo->bulkkey, &(cinfo->contentEncAlg)); + if (cinfo == NULL) { + return; + } + + if (bulkkey == NULL) { + cinfo->bulkkey = NULL; + cinfo->keysize = 0; + } else { + cinfo->bulkkey = PK11_ReferenceSymKey(bulkkey); + cinfo->keysize = PK11_GetKeyStrength(cinfo->bulkkey, &(cinfo->contentEncAlg)); + } } PK11SymKey * NSS_CMSContentInfo_GetBulkKey(NSSCMSContentInfo *cinfo) { - if (cinfo->bulkkey == NULL) + if (cinfo == NULL || cinfo->bulkkey == NULL) { return NULL; + } return PK11_ReferenceSymKey(cinfo->bulkkey); } @@ -371,5 +435,9 @@ NSS_CMSContentInfo_GetBulkKey(NSSCMSCont int NSS_CMSContentInfo_GetBulkKeySize(NSSCMSContentInfo *cinfo) { + if (cinfo == NULL) { + return 0; + } + return cinfo->keysize; } Index: nss-3.42/nss/lib/smime/cmsdigdata.c =================================================================== --- nss-3.42.orig/nss/lib/smime/cmsdigdata.c 2019-02-19 12:00:17.662903828 +0100 +++ nss-3.42/nss/lib/smime/cmsdigdata.c 2019-02-19 12:00:17.662903828 +0100 @@ -56,7 +56,9 @@ void NSS_CMSDigestedData_Destroy(NSSCMSDigestedData *digd) { /* everything's in a pool, so don't worry about the storage */ - NSS_CMSContentInfo_Destroy(&(digd->contentInfo)); + if (digd != NULL) { + NSS_CMSContentInfo_Destroy(&(digd->contentInfo)); + } return; } Index: nss-3.42/nss/lib/smime/cmsencdata.c =================================================================== --- nss-3.42.orig/nss/lib/smime/cmsencdata.c 2019-02-19 12:00:17.662903828 +0100 +++ nss-3.42/nss/lib/smime/cmsencdata.c 2019-02-19 12:00:17.662903828 +0100 @@ -87,7 +87,9 @@ void NSS_CMSEncryptedData_Destroy(NSSCMSEncryptedData *encd) { /* everything's in a pool, so don't worry about the storage */ - NSS_CMSContentInfo_Destroy(&(encd->contentInfo)); + if (encd != NULL) { + NSS_CMSContentInfo_Destroy(&(encd->contentInfo)); + } return; } Index: nss-3.42/nss/lib/smime/cmsenvdata.c =================================================================== --- nss-3.42.orig/nss/lib/smime/cmsenvdata.c 2019-02-19 12:00:17.662903828 +0100 +++ nss-3.42/nss/lib/smime/cmsenvdata.c 2019-02-19 12:00:17.662903828 +0100 @@ -144,6 +144,11 @@ NSS_CMSEnvelopedData_Encode_BeforeStart( poolp = envd->cmsg->poolp; cinfo = &(envd->contentInfo); + if (cinfo == NULL) { + PORT_SetError(SEC_ERROR_BAD_DATA); + goto loser; + } + recipientinfos = envd->recipientInfos; if (recipientinfos == NULL) { PORT_SetError(SEC_ERROR_BAD_DATA); Index: nss-3.42/nss/lib/smime/cmsmessage.c =================================================================== --- nss-3.42.orig/nss/lib/smime/cmsmessage.c 2019-02-19 12:00:17.662903828 +0100 +++ nss-3.42/nss/lib/smime/cmsmessage.c 2019-02-19 12:00:44.770732868 +0100 @@ -88,6 +88,9 @@ NSS_CMSMessage_SetEncodingParams(NSSCMSM void NSS_CMSMessage_Destroy(NSSCMSMessage *cmsg) { + if (cmsg == NULL) + return; + PORT_Assert(cmsg->refCount > 0); if (cmsg->refCount <= 0) /* oops */ return; Index: nss-3.42/nss/lib/smime/cmsudf.c =================================================================== --- nss-3.42.orig/nss/lib/smime/cmsudf.c 2019-02-19 12:00:17.662903828 +0100 +++ nss-3.42/nss/lib/smime/cmsudf.c 2019-02-19 12:00:17.662903828 +0100 @@ -239,7 +239,7 @@ NSS_CMSGenericWrapperData_Destroy(SECOid { const nsscmstypeInfo *typeInfo = nss_cmstype_lookup(type); - if (typeInfo && typeInfo->destroy) { + if (typeInfo && (typeInfo->destroy) && (gd != NULL)) { (*typeInfo->destroy)(gd); } } debian/patches/CVE-2018-12384-2.patch0000644000000000000000000001133713404746516013500 0ustar Backport of: # HG changeset patch # User Martin Thomson # Date 1535421480 -36000 # Node ID f182a11fbe532b1b9edb76a57a0d4609d9d8ab75 # Parent a4de0e81d1ccdb153817fbeda86d2182eec6f726 Bug 1483128 - Test that randoms aren't fixed, r=ekr We can't easily test that ClientHello.random and ServerHello.random are truly random in these tests, but we can catch mistakes the likes of which produced this bug. This just runs a few handshakes and tests that none of the random values are equal to any other, or they are equal to zero. Index: nss-3.28.4/nss/gtests/ssl_gtest/ssl_loopback_unittest.cc =================================================================== --- nss-3.28.4.orig/nss/gtests/ssl_gtest/ssl_loopback_unittest.cc 2018-12-14 09:49:41.076490347 -0500 +++ nss-3.28.4/nss/gtests/ssl_gtest/ssl_loopback_unittest.cc 2018-12-14 09:50:40.948573444 -0500 @@ -229,6 +229,51 @@ TEST_F(TlsConnectStreamTls13, Tls13Faile client_->CheckErrorCode(SSL_ERROR_SOCKET_WRITE_FAILURE); } +// We can't test for randomness easily here, but we can test that we don't +// produce a zero value, or produce the same value twice. There are 5 values +// here: two ClientHello.random, two ServerHello.random, and one zero value. +// Matrix them and fail if any are the same. +TEST_P(TlsConnectGeneric, CheckRandoms) { + ConfigureSessionCache(RESUME_NONE, RESUME_NONE); + + static const size_t random_len = 32; + uint8_t crandom1[random_len], srandom1[random_len]; + uint8_t z[random_len] = {0}; + + auto ch = std::make_shared(ssl_hs_client_hello); + client_->SetTlsRecordFilter(ch); + auto sh = std::make_shared(ssl_hs_server_hello); + server_->SetTlsRecordFilter(sh); + Connect(); + ASSERT_TRUE(ch->buffer().len() > (random_len + 2)); + ASSERT_TRUE(sh->buffer().len() > (random_len + 2)); + memcpy(crandom1, ch->buffer().data() + 2, random_len); + memcpy(srandom1, sh->buffer().data() + 2, random_len); + EXPECT_NE(0, memcmp(crandom1, srandom1, random_len)); + EXPECT_NE(0, memcmp(crandom1, z, random_len)); + EXPECT_NE(0, memcmp(srandom1, z, random_len)); + + Reset(); + ch = std::make_shared(ssl_hs_client_hello); + client_->SetTlsRecordFilter(ch); + sh = std::make_shared(ssl_hs_server_hello); + server_->SetTlsRecordFilter(sh); + Connect(); + ASSERT_TRUE(ch->buffer().len() > (random_len + 2)); + ASSERT_TRUE(sh->buffer().len() > (random_len + 2)); + const uint8_t* crandom2 = ch->buffer().data() + 2; + const uint8_t* srandom2 = sh->buffer().data() + 2; + + EXPECT_NE(0, memcmp(crandom2, srandom2, random_len)); + EXPECT_NE(0, memcmp(crandom2, z, random_len)); + EXPECT_NE(0, memcmp(srandom2, z, random_len)); + + EXPECT_NE(0, memcmp(crandom1, crandom2, random_len)); + EXPECT_NE(0, memcmp(crandom1, srandom2, random_len)); + EXPECT_NE(0, memcmp(srandom1, crandom2, random_len)); + EXPECT_NE(0, memcmp(srandom1, srandom2, random_len)); +} + INSTANTIATE_TEST_CASE_P(GenericStream, TlsConnectGeneric, ::testing::Combine(TlsConnectTestBase::kTlsModesStream, TlsConnectTestBase::kTlsVAll)); Index: nss-3.28.4/nss/gtests/ssl_gtest/ssl_v2_client_hello_unittest.cc =================================================================== --- nss-3.28.4.orig/nss/gtests/ssl_gtest/ssl_v2_client_hello_unittest.cc 2018-12-14 09:49:41.076490347 -0500 +++ nss-3.28.4/nss/gtests/ssl_gtest/ssl_v2_client_hello_unittest.cc 2018-12-14 09:49:41.072490341 -0500 @@ -333,6 +333,32 @@ TEST_P(SSLv2ClientHelloTest, RequireSafe Connect(); } +TEST_P(SSLv2ClientHelloTest, CheckServerRandom) { + ConfigureSessionCache(RESUME_NONE, RESUME_NONE); + SetAvailableCipherSuite(TLS_DHE_RSA_WITH_AES_128_CBC_SHA); + + static const size_t random_len = 32; + uint8_t srandom1[random_len]; + uint8_t z[random_len] = {0}; + + auto sh = std::make_shared(ssl_hs_server_hello); + server_->SetTlsRecordFilter(sh); + Connect(); + ASSERT_TRUE(sh->buffer().len() > (random_len + 2)); + memcpy(srandom1, sh->buffer().data() + 2, random_len); + EXPECT_NE(0, memcmp(srandom1, z, random_len)); + + Reset(); + sh = std::make_shared(ssl_hs_server_hello); + server_->SetTlsRecordFilter(sh); + Connect(); + ASSERT_TRUE(sh->buffer().len() > (random_len + 2)); + const uint8_t* srandom2 = sh->buffer().data() + 2; + + EXPECT_NE(0, memcmp(srandom2, z, random_len)); + EXPECT_NE(0, memcmp(srandom1, srandom2, random_len)); +} + // Connect to the server with TLS 1.1, signalling that this is a fallback from // a higher version. As the server doesn't support anything higher than TLS 1.1 // it must accept the connection. debian/patches/CVE-2018-18508-2.patch0000644000000000000000000001361613433003606013472 0ustar Backport of: # HG changeset patch # User J.C. Jones # Date 1547487325 25200 # Node ID 5e70b72131ac28457b14cdc6100e8674409bbdd4 # Parent da45424cb9a0b4d8e45e5040e2e3b574d994e254 Bug 1507135 - Add additional null checks to CMS message functions r=mt Differential review: https://phabricator.services.mozilla.com//D16488 Index: nss-3.42/nss/lib/smime/cmsmessage.c =================================================================== --- nss-3.42.orig/nss/lib/smime/cmsmessage.c 2019-02-19 12:01:05.638605750 +0100 +++ nss-3.42/nss/lib/smime/cmsmessage.c 2019-02-19 12:04:09.757630189 +0100 @@ -29,8 +29,9 @@ NSS_CMSMessage_Create(PLArenaPool *poolp if (poolp == NULL) { poolp = PORT_NewArena(1024); /* XXX what is right value? */ - if (poolp == NULL) + if (poolp == NULL) { return NULL; + } poolp_is_ours = PR_TRUE; } @@ -44,8 +45,9 @@ NSS_CMSMessage_Create(PLArenaPool *poolp if (mark) { PORT_ArenaRelease(poolp, mark); } - } else + } else { PORT_FreeArena(poolp, PR_FALSE); + } return NULL; } @@ -53,8 +55,9 @@ NSS_CMSMessage_Create(PLArenaPool *poolp cmsg->poolp_is_ours = poolp_is_ours; cmsg->refCount = 1; - if (mark) + if (mark) { PORT_ArenaUnmark(poolp, mark); + } return cmsg; } @@ -73,8 +76,13 @@ NSS_CMSMessage_SetEncodingParams(NSSCMSM NSSCMSGetDecryptKeyCallback decrypt_key_cb, void *decrypt_key_cb_arg, SECAlgorithmID **detached_digestalgs, SECItem **detached_digests) { - if (pwfn) + if (cmsg == NULL) { + return; + } + if (pwfn) { PK11_SetPasswordFunc(pwfn); + } + cmsg->pwfn_arg = pwfn_arg; cmsg->decrypt_key_cb = decrypt_key_cb; cmsg->decrypt_key_cb_arg = decrypt_key_cb_arg; @@ -92,18 +100,21 @@ NSS_CMSMessage_Destroy(NSSCMSMessage *cm return; PORT_Assert(cmsg->refCount > 0); - if (cmsg->refCount <= 0) /* oops */ + if (cmsg->refCount <= 0) { /* oops */ return; + } cmsg->refCount--; /* thread safety? */ - if (cmsg->refCount > 0) + if (cmsg->refCount > 0) { return; + } NSS_CMSContentInfo_Destroy(&(cmsg->contentInfo)); /* if poolp is not NULL, cmsg is the owner of its arena */ - if (cmsg->poolp_is_ours) + if (cmsg->poolp_is_ours) { PORT_FreeArena(cmsg->poolp, PR_FALSE); /* XXX clear it? */ + } } /* @@ -115,8 +126,9 @@ NSS_CMSMessage_Destroy(NSSCMSMessage *cm NSSCMSMessage * NSS_CMSMessage_Copy(NSSCMSMessage *cmsg) { - if (cmsg == NULL) + if (cmsg == NULL) { return NULL; + } PORT_Assert(cmsg->refCount > 0); @@ -130,6 +142,10 @@ NSS_CMSMessage_Copy(NSSCMSMessage *cmsg) PLArenaPool * NSS_CMSMessage_GetArena(NSSCMSMessage *cmsg) { + if (cmsg == NULL) { + return NULL; + } + return cmsg->poolp; } @@ -139,6 +155,10 @@ NSS_CMSMessage_GetArena(NSSCMSMessage *c NSSCMSContentInfo * NSS_CMSMessage_GetContentInfo(NSSCMSMessage *cmsg) { + if (cmsg == NULL) { + return NULL; + } + return &(cmsg->contentInfo); } @@ -150,6 +170,10 @@ NSS_CMSMessage_GetContentInfo(NSSCMSMess SECItem * NSS_CMSMessage_GetContent(NSSCMSMessage *cmsg) { + if (cmsg == NULL) { + return NULL; + } + /* this is a shortcut */ NSSCMSContentInfo *cinfo = NSS_CMSMessage_GetContentInfo(cmsg); SECItem *pItem = NSS_CMSContentInfo_GetInnerContent(cinfo); @@ -167,6 +191,10 @@ NSS_CMSMessage_ContentLevelCount(NSSCMSM int count = 0; NSSCMSContentInfo *cinfo; + if (cmsg == NULL) { + return 0; + } + /* walk down the chain of contentinfos */ for (cinfo = &(cmsg->contentInfo); cinfo != NULL;) { count++; @@ -186,6 +214,10 @@ NSS_CMSMessage_ContentLevel(NSSCMSMessag int count = 0; NSSCMSContentInfo *cinfo; + if (cmsg == NULL) { + return NULL; + } + /* walk down the chain of contentinfos */ for (cinfo = &(cmsg->contentInfo); cinfo != NULL && count < n; cinfo = NSS_CMSContentInfo_GetChildContentInfo(cinfo)) { @@ -203,6 +235,10 @@ NSS_CMSMessage_ContainsCertsOrCrls(NSSCM { NSSCMSContentInfo *cinfo; + if (cmsg == NULL) { + return PR_FALSE; + } + /* descend into CMS message */ for (cinfo = &(cmsg->contentInfo); cinfo != NULL; cinfo = NSS_CMSContentInfo_GetChildContentInfo(cinfo)) { @@ -224,6 +260,10 @@ NSS_CMSMessage_IsEncrypted(NSSCMSMessage { NSSCMSContentInfo *cinfo; + if (cmsg == NULL) { + return PR_FALSE; + } + /* walk down the chain of contentinfos */ for (cinfo = &(cmsg->contentInfo); cinfo != NULL; cinfo = NSS_CMSContentInfo_GetChildContentInfo(cinfo)) { @@ -254,13 +294,21 @@ NSS_CMSMessage_IsSigned(NSSCMSMessage *c { NSSCMSContentInfo *cinfo; + if (cmsg == NULL) { + return PR_FALSE; + } + /* walk down the chain of contentinfos */ for (cinfo = &(cmsg->contentInfo); cinfo != NULL; cinfo = NSS_CMSContentInfo_GetChildContentInfo(cinfo)) { switch (NSS_CMSContentInfo_GetContentTypeTag(cinfo)) { case SEC_OID_PKCS7_SIGNED_DATA: - if (!NSS_CMSArray_IsEmpty((void **)cinfo->content.signedData->signerInfos)) + if (cinfo->content.signedData == NULL) { + return PR_FALSE; + } + if (!NSS_CMSArray_IsEmpty((void **)cinfo->content.signedData->signerInfos)) { return PR_TRUE; + } break; default: /* callback here for generic wrappers? */ @@ -281,8 +329,9 @@ NSS_CMSMessage_IsContentEmpty(NSSCMSMess { SECItem *item = NULL; - if (cmsg == NULL) + if (cmsg == NULL) { return PR_TRUE; + } item = NSS_CMSContentInfo_GetContent(NSS_CMSMessage_GetContentInfo(cmsg)); debian/patches/CVE-2017-7805.patch0000644000000000000000000000606613163441214013252 0ustar Backport of: # HG changeset patch # User Martin Thomson # Date 1501813647 -36000 # Node ID 839200ce0943166a079284bdf45dcc37bb672925 # Parent 6254e8431392863fd0aa7e70c311add48af05775 Bug 1377618 - Simplify handling of CertificateVerify, r=kaie Index: nss-3.28.4/nss/lib/ssl/ssl3con.c =================================================================== --- nss-3.28.4.orig/nss/lib/ssl/ssl3con.c 2017-09-29 08:50:13.360518595 -0400 +++ nss-3.28.4/nss/lib/ssl/ssl3con.c 2017-09-29 08:50:13.356518549 -0400 @@ -9774,13 +9774,12 @@ ssl3_HandleCertificateVerify(sslSocket * hashAlg = ssl_SignatureSchemeToHashType(sigScheme); - if (hashes->u.pointer_to_hash_input.data) { - rv = ssl3_ComputeHandshakeHash(hashes->u.pointer_to_hash_input.data, - hashes->u.pointer_to_hash_input.len, - hashAlg, &localHashes); - } else { - rv = SECFailure; - } + /* Read from the message buffer, but we need to use only up to the end + * of the previous handshake message. The length of the transcript up to + * that point is saved in |hashes->u.transcriptLen|. */ + rv = ssl3_ComputeHandshakeHash(ss->ssl3.hs.messages.buf, + hashes->u.transcriptLen, + hashAlg, &localHashes); if (rv == SECSuccess) { hashesForVerify = &localHashes; @@ -11680,15 +11679,15 @@ ssl3_HandleHandshakeMessage(sslSocket *s * additional handshake messages will have been added to the * buffer, e.g. the certificate_verify message itself.) * - * Therefore, we use SSL3Hashes.u.pointer_to_hash_input - * to signal the current state of the buffer. + * Therefore, we use SSL3Hashes.u.transcriptLen to save how much + * data there is and read directly from ss->ssl3.hs.messages + * when calculating the hashes. * * ssl3_HandleCertificateVerify will detect * hashType == handshake_hash_record * and use that information to calculate the hash. */ - hashes.u.pointer_to_hash_input.data = ss->ssl3.hs.messages.buf; - hashes.u.pointer_to_hash_input.len = ss->ssl3.hs.messages.len; + hashes.u.transcriptLen = ss->ssl3.hs.messages.len; hashesPtr = &hashes; } else { computeHashes = PR_TRUE; Index: nss-3.28.4/nss/lib/ssl/ssl3prot.h =================================================================== --- nss-3.28.4.orig/nss/lib/ssl/ssl3prot.h 2017-09-29 08:50:13.360518595 -0400 +++ nss-3.28.4/nss/lib/ssl/ssl3prot.h 2017-09-29 08:50:42.164845265 -0400 @@ -237,7 +237,7 @@ typedef struct { union { PRUint8 raw[64]; SSL3HashesIndividually s; - SECItem pointer_to_hash_input; + unsigned int transcriptLen; } u; } SSL3Hashes; debian/patches/38_kbsd.patch0000644000000000000000000001271013100126223013062 0ustar ## 38_kbsd.patch by Petr Salinger ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: GNU/kFreeBSD support. bz#356011 ## DP: Added Hurd support. Index: nss-3.28.4/nss/lib/freebl/unix_rand.c =================================================================== --- nss-3.28.4.orig/nss/lib/freebl/unix_rand.c 2017-04-26 10:19:04.069358739 -0400 +++ nss-3.28.4/nss/lib/freebl/unix_rand.c 2017-04-26 10:19:54.818161445 -0400 @@ -160,7 +160,7 @@ #endif -#if defined(SCO) || defined(UNIXWARE) || defined(BSDI) || defined(FREEBSD) || defined(NETBSD) || defined(DARWIN) || defined(OPENBSD) || defined(NTO) || defined(__riscos__) +#if defined(SCO) || defined(UNIXWARE) || defined(BSDI) || defined(FREEBSD) || defined(NETBSD) || defined(DARWIN) || defined(OPENBSD) || defined(NTO) || defined(__riscos__) || defined(__GNU__) || defined(__FreeBSD_kernel__) || defined(__NetBSD_kernel__) #include #define getdtablesize() sysconf(_SC_OPEN_MAX) Index: nss-3.28.4/nss/lib/softoken/softoken.h =================================================================== --- nss-3.28.4.orig/nss/lib/softoken/softoken.h 2017-04-26 10:19:04.069358739 -0400 +++ nss-3.28.4/nss/lib/softoken/softoken.h 2017-04-26 10:19:04.069358739 -0400 @@ -183,7 +183,7 @@ #define CHECK_FORK_MIXED -#elif defined(LINUX) +#elif defined(LINUX) || defined (__GLIBC__) #define CHECK_FORK_PTHREAD Index: nss-3.28.4/nss/lib/ssl/sslmutex.c =================================================================== --- nss-3.28.4.orig/nss/lib/ssl/sslmutex.c 2017-04-26 10:19:04.069358739 -0400 +++ nss-3.28.4/nss/lib/ssl/sslmutex.c 2017-04-26 10:19:04.069358739 -0400 @@ -60,7 +60,7 @@ return SECSuccess; } -#if defined(LINUX) || defined(AIX) || defined(BEOS) || defined(BSDI) || (defined(NETBSD) && __NetBSD_Version__ < 500000000) || defined(OPENBSD) +#if defined(LINUX) || defined(AIX) || defined(BEOS) || defined(BSDI) || (defined(NETBSD) && __NetBSD_Version__ < 500000000) || defined(OPENBSD) || defined(__GLIBC__) #include #include Index: nss-3.28.4/nss/lib/ssl/sslmutex.h =================================================================== --- nss-3.28.4.orig/nss/lib/ssl/sslmutex.h 2017-04-26 10:19:04.069358739 -0400 +++ nss-3.28.4/nss/lib/ssl/sslmutex.h 2017-04-26 10:19:04.069358739 -0400 @@ -49,7 +49,7 @@ typedef int sslPID; -#elif defined(LINUX) || defined(AIX) || defined(BEOS) || defined(BSDI) || (defined(NETBSD) && __NetBSD_Version__ < 500000000) || defined(OPENBSD) +#elif defined(LINUX) || defined(AIX) || defined(BEOS) || defined(BSDI) || (defined(NETBSD) && __NetBSD_Version__ < 500000000) || defined(OPENBSD) || defined(__GLIBC__) #include #include "prtypes.h" Index: nss-3.28.4/nss/coreconf/arch.mk =================================================================== --- nss-3.28.4.orig/nss/coreconf/arch.mk 2017-04-26 10:19:04.069358739 -0400 +++ nss-3.28.4/nss/coreconf/arch.mk 2017-04-26 10:19:04.069358739 -0400 @@ -115,6 +115,14 @@ ifneq ($(words $(OS_RELEASE)),1) OS_RELEASE := $(word 1,$(OS_RELEASE)).$(word 2,$(OS_RELEASE)) endif + KERNEL = linux +endif + +# This check must be last. Since all uses of OS_ARCH that follow affect only +# userland, we can merge other Glibc systems with Linux here. +ifneq (, $(filter GNU GNU_%, $(OS_ARCH))) +OS_ARCH = Linux +OS_RELEASE = 2.6 endif # Index: nss-3.28.4/nss/coreconf/Linux.mk =================================================================== --- nss-3.28.4.orig/nss/coreconf/Linux.mk 2017-04-26 10:19:04.069358739 -0400 +++ nss-3.28.4/nss/coreconf/Linux.mk 2017-04-26 10:19:04.069358739 -0400 @@ -106,7 +106,7 @@ LIBC_TAG = _glibc endif -ifeq ($(OS_RELEASE),2.0) +ifeq ($(KERNEL)-$(OS_RELEASE),linux-2.0) OS_REL_CFLAGS += -DLINUX2_0 MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) $(RPATH) ifdef MAPFILE @@ -139,14 +139,21 @@ OS_PTHREAD = -lpthread endif -OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DLINUX -Dlinux -DHAVE_STRERROR +OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR +ifeq ($(KERNEL),linux) +OS_CFLAGS += -DLINUX -Dlinux +endif OS_LIBS = $(OS_PTHREAD) -ldl -lc ifdef USE_PTHREADS DEFINES += -D_REENTRANT endif -ARCH = linux +ifeq ($(KERNEL),linux) + ARCH = linux +else + ARCH = gnu +endif DSO_CFLAGS = -fPIC DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections @@ -167,7 +174,7 @@ LDFLAGS += -Wl,-rpath-link,/usr/lib:/lib endif -# INCLUDES += -I/usr/include -Y/usr/include/linux +# INCLUDES += -I/usr/include G++INCLUDES = -I/usr/include/g++ # @@ -202,7 +209,9 @@ endif endif +ifeq ($(KERNEL), linux) OS_REL_CFLAGS += -DLINUX2_1 +endif MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) $(RPATH) ifdef MAPFILE Index: nss-3.28.4/nss/coreconf/config.mk =================================================================== --- nss-3.28.4.orig/nss/coreconf/config.mk 2017-04-26 10:19:04.069358739 -0400 +++ nss-3.28.4/nss/coreconf/config.mk 2017-04-26 10:19:04.069358739 -0400 @@ -31,7 +31,7 @@ ####################################################################### TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \ - AIX RISCOS WINNT WIN95 Linux Android + AIX RISCOS WINNT WIN95 Linux Android GNU GNU_% ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET))) include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk debian/patches/CVE-2017-7502.patch0000644000000000000000000003130513120745617013245 0ustar Backport of: # HG changeset patch # User Tim Taubert # Date 1483435195 -3600 # Node ID 55ea60effd0d7c427f9b57a0bd43fb0fcbdae0e9 # Parent 316fcf7c1ca35a1d1bb8e12605cca6f9af933bde Bug 1328122 - Fix various ssl3_GatherData() issues r=mt,franziskus Differential Revision: https://nss-review.dev.mozaws.net/D135 Index: nss-3.28.4/nss/gtests/ssl_gtest/manifest.mn =================================================================== --- nss-3.28.4.orig/nss/gtests/ssl_gtest/manifest.mn 2017-06-16 08:10:10.962166946 -0400 +++ nss-3.28.4/nss/gtests/ssl_gtest/manifest.mn 2017-06-16 08:10:10.878165957 -0400 @@ -25,6 +25,7 @@ CPPSRCS = \ ssl_exporter_unittest.cc \ ssl_extension_unittest.cc \ ssl_fuzz_unittest.cc \ + ssl_gather_unittest.cc \ ssl_gtest.cc \ ssl_hrr_unittest.cc \ ssl_loopback_unittest.cc \ Index: nss-3.28.4/nss/gtests/ssl_gtest/ssl_gather_unittest.cc =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ nss-3.28.4/nss/gtests/ssl_gtest/ssl_gather_unittest.cc 2017-06-16 08:10:10.898166191 -0400 @@ -0,0 +1,153 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=2 et sw=2 tw=80: */ +/* 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/. */ + +#include "gtest_utils.h" +#include "tls_connect.h" + +namespace nss_test { + +class GatherV2ClientHelloTest : public TlsConnectTestBase { + public: + GatherV2ClientHelloTest() : TlsConnectTestBase(STREAM, 0) {} + + void ConnectExpectMalformedClientHello(const DataBuffer &data) { + EnsureTlsSetup(); + + auto alert_recorder = new TlsAlertRecorder(); + server_->SetPacketFilter(alert_recorder); + + client_->SendDirect(data); + server_->StartConnect(); + server_->Handshake(); + ASSERT_TRUE_WAIT( + (server_->error_code() == SSL_ERROR_RX_MALFORMED_CLIENT_HELLO), 2000); + + EXPECT_EQ(kTlsAlertFatal, alert_recorder->level()); + EXPECT_EQ(illegal_parameter, alert_recorder->description()); + } +}; + +// Gather a 5-byte v3 record, with a zero fragment length. The empty handshake +// message should be ignored, and the connection will succeed afterwards. +TEST_F(TlsConnectTest, GatherEmptyV3Record) { + DataBuffer buffer; + + size_t idx = 0; + idx = buffer.Write(idx, 0x16, 1); // handshake + idx = buffer.Write(idx, 0x0301, 2); // record_version + (void)buffer.Write(idx, 0U, 2); // length=0 + + EnsureTlsSetup(); + client_->SendDirect(buffer); + Connect(); +} + +// Gather a 5-byte v3 record, with a fragment length exceeding the maximum. +TEST_F(TlsConnectTest, GatherExcessiveV3Record) { + DataBuffer buffer; + + size_t idx = 0; + idx = buffer.Write(idx, 0x16, 1); // handshake + idx = buffer.Write(idx, 0x0301, 2); // record_version + (void)buffer.Write(idx, MAX_FRAGMENT_LENGTH + 2048 + 1, 2); // length=max+1 + + EnsureTlsSetup(); + auto alert_recorder = new TlsAlertRecorder(); + server_->SetPacketFilter(alert_recorder); + client_->SendDirect(buffer); + server_->StartConnect(); + server_->Handshake(); + ASSERT_TRUE_WAIT((server_->error_code() == SSL_ERROR_RX_RECORD_TOO_LONG), + 2000); + + EXPECT_EQ(kTlsAlertFatal, alert_recorder->level()); + EXPECT_EQ(record_overflow, alert_recorder->description()); +} + +// Gather a 3-byte v2 header, with a fragment length of 2. +TEST_F(GatherV2ClientHelloTest, GatherV2RecordLongHeader) { + DataBuffer buffer; + + size_t idx = 0; + idx = buffer.Write(idx, 0x0002, 2); // length=2 (long header) + idx = buffer.Write(idx, 0U, 1); // padding=0 + (void)buffer.Write(idx, 0U, 2); // data + + ConnectExpectMalformedClientHello(buffer); +} + +// Gather a 3-byte v2 header, with a fragment length of 1. +TEST_F(GatherV2ClientHelloTest, GatherV2RecordLongHeader2) { + DataBuffer buffer; + + size_t idx = 0; + idx = buffer.Write(idx, 0x0001, 2); // length=1 (long header) + idx = buffer.Write(idx, 0U, 1); // padding=0 + idx = buffer.Write(idx, 0U, 1); // data + (void)buffer.Write(idx, 0U, 1); // surplus (need 5 bytes total) + + ConnectExpectMalformedClientHello(buffer); +} + +// Gather a 3-byte v2 header, with a zero fragment length. +TEST_F(GatherV2ClientHelloTest, GatherEmptyV2RecordLongHeader) { + DataBuffer buffer; + + size_t idx = 0; + idx = buffer.Write(idx, 0U, 2); // length=0 (long header) + idx = buffer.Write(idx, 0U, 1); // padding=0 + (void)buffer.Write(idx, 0U, 2); // surplus (need 5 bytes total) + + ConnectExpectMalformedClientHello(buffer); +} + +// Gather a 2-byte v2 header, with a fragment length of 3. +TEST_F(GatherV2ClientHelloTest, GatherV2RecordShortHeader) { + DataBuffer buffer; + + size_t idx = 0; + idx = buffer.Write(idx, 0x8003, 2); // length=3 (short header) + (void)buffer.Write(idx, 0U, 3); // data + + ConnectExpectMalformedClientHello(buffer); +} + +// Gather a 2-byte v2 header, with a fragment length of 2. +TEST_F(GatherV2ClientHelloTest, GatherEmptyV2RecordShortHeader2) { + DataBuffer buffer; + + size_t idx = 0; + idx = buffer.Write(idx, 0x8002, 2); // length=2 (short header) + idx = buffer.Write(idx, 0U, 2); // data + (void)buffer.Write(idx, 0U, 1); // surplus (need 5 bytes total) + + ConnectExpectMalformedClientHello(buffer); +} + +// Gather a 2-byte v2 header, with a fragment length of 1. +TEST_F(GatherV2ClientHelloTest, GatherEmptyV2RecordShortHeader3) { + DataBuffer buffer; + + size_t idx = 0; + idx = buffer.Write(idx, 0x8001, 2); // length=1 (short header) + idx = buffer.Write(idx, 0U, 1); // data + (void)buffer.Write(idx, 0U, 2); // surplus (need 5 bytes total) + + ConnectExpectMalformedClientHello(buffer); +} + +// Gather a 2-byte v2 header, with a zero fragment length. +TEST_F(GatherV2ClientHelloTest, GatherEmptyV2RecordShortHeader) { + DataBuffer buffer; + + size_t idx = 0; + idx = buffer.Write(idx, 0x8000, 2); // length=0 (short header) + (void)buffer.Write(idx, 0U, 3); // surplus (need 5 bytes total) + + ConnectExpectMalformedClientHello(buffer); +} + +} // namespace nss_test Index: nss-3.28.4/nss/gtests/ssl_gtest/ssl_gtest.gyp =================================================================== --- nss-3.28.4.orig/nss/gtests/ssl_gtest/ssl_gtest.gyp 2017-06-16 08:10:10.962166946 -0400 +++ nss-3.28.4/nss/gtests/ssl_gtest/ssl_gtest.gyp 2017-06-16 08:10:10.898166191 -0400 @@ -25,6 +25,7 @@ 'ssl_exporter_unittest.cc', 'ssl_extension_unittest.cc', 'ssl_fuzz_unittest.cc', + 'ssl_gather_unittest.cc', 'ssl_gtest.cc', 'ssl_hrr_unittest.cc', 'ssl_loopback_unittest.cc', Index: nss-3.28.4/nss/gtests/ssl_gtest/ssl_v2_client_hello_unittest.cc =================================================================== --- nss-3.28.4.orig/nss/gtests/ssl_gtest/ssl_v2_client_hello_unittest.cc 2017-06-16 08:10:10.962166946 -0400 +++ nss-3.28.4/nss/gtests/ssl_gtest/ssl_v2_client_hello_unittest.cc 2017-06-16 08:10:10.926166522 -0400 @@ -202,6 +202,28 @@ TEST_P(SSLv2ClientHelloTest, Connect) { Connect(); } +// Sending a v2 ClientHello after a no-op v3 record must fail. +TEST_P(SSLv2ClientHelloTest, ConnectAfterEmptyV3Record) { + DataBuffer buffer; + + size_t idx = 0; + idx = buffer.Write(idx, 0x16, 1); // handshake + idx = buffer.Write(idx, 0x0301, 2); // record_version + (void)buffer.Write(idx, 0U, 2); // length=0 + + SetAvailableCipherSuite(TLS_DHE_RSA_WITH_AES_128_CBC_SHA); + EnsureTlsSetup(); + client_->SendDirect(buffer); + + // Need padding so the connection doesn't just time out. With a v2 + // ClientHello parsed as a v3 record we will use the record version + // as the record length. + SetPadding(255); + + ConnectExpectFail(); + EXPECT_EQ(SSL_ERROR_BAD_CLIENT, server_->error_code()); +} + // Test negotiating TLS 1.3. TEST_F(SSLv2ClientHelloTestF, Connect13) { EnsureTlsSetup(); Index: nss-3.28.4/nss/lib/ssl/ssl3gthr.c =================================================================== --- nss-3.28.4.orig/nss/lib/ssl/ssl3gthr.c 2017-06-16 08:10:10.962166946 -0400 +++ nss-3.28.4/nss/lib/ssl/ssl3gthr.c 2017-06-16 08:10:10.926166522 -0400 @@ -32,6 +32,7 @@ ssl3_InitGather(sslGather *gs) gs->readOffset = 0; gs->dtlsPacketOffset = 0; gs->dtlsPacket.len = 0; + gs->rejectV2Records = PR_FALSE; status = sslBuffer_Grow(&gs->buf, 4096); return status; } @@ -147,8 +148,11 @@ ssl3_GatherData(sslSocket *ss, sslGather switch (gs->state) { case GS_HEADER: /* Check for SSLv2 handshakes. Always assume SSLv3 on clients, - * support SSLv2 handshakes only when ssl2gs != NULL. */ - if (!ssl2gs || ssl3_isLikelyV3Hello(gs->hdr)) { + * support SSLv2 handshakes only when ssl2gs != NULL. + * Always assume v3 after we received the first record. */ + if (!ssl2gs || + ss->gs.rejectV2Records || + ssl3_isLikelyV3Hello(gs->hdr)) { /* Should have a non-SSLv2 record header in gs->hdr. Extract * the length of the following encrypted data, and then * read in the rest of the record into gs->inbuf. */ @@ -183,7 +187,7 @@ ssl3_GatherData(sslSocket *ss, sslGather /* This is the max length for an encrypted SSLv3+ fragment. */ if (!v2HdrLength && gs->remainder > (MAX_FRAGMENT_LENGTH + 2048)) { - SSL3_SendAlert(ss, alert_fatal, unexpected_message); + SSL3_SendAlert(ss, alert_fatal, record_overflow); gs->state = GS_INIT; PORT_SetError(SSL_ERROR_RX_RECORD_TOO_LONG); return SECFailure; @@ -205,13 +209,28 @@ ssl3_GatherData(sslSocket *ss, sslGather * many into the gs->hdr[] buffer. Copy them over into inbuf so * that we can properly process the hello record later. */ if (v2HdrLength) { + /* Reject v2 records that don't even carry enough data to + * resemble a valid ClientHello header. */ + if (gs->remainder < SSL_HL_CLIENT_HELLO_HBYTES) { + SSL3_SendAlert(ss, alert_fatal, illegal_parameter); + PORT_SetError(SSL_ERROR_RX_MALFORMED_CLIENT_HELLO); + return SECFailure; + } + + PORT_Assert(lbp); gs->inbuf.len = 5 - v2HdrLength; PORT_Memcpy(lbp, gs->hdr + v2HdrLength, gs->inbuf.len); gs->remainder -= gs->inbuf.len; lbp += gs->inbuf.len; } - break; /* End this case. Continue around the loop. */ + if (gs->remainder > 0) { + break; /* End this case. Continue around the loop. */ + } + + /* FALL THROUGH if (gs->remainder == 0) as we just received + * an empty record and there's really no point in calling + * ssl_DefRecv() with buf=NULL and len=0. */ case GS_DATA: /* @@ -219,6 +238,10 @@ ssl3_GatherData(sslSocket *ss, sslGather */ SSL_TRC(10, ("%d: SSL[%d]: got record of %d bytes", SSL_GETPID(), ss->fd, gs->inbuf.len)); + + /* reject any v2 records from now on */ + ss->gs.rejectV2Records = PR_TRUE; + gs->state = GS_INIT; return 1; } Index: nss-3.28.4/nss/lib/ssl/ssldef.c =================================================================== --- nss-3.28.4.orig/nss/lib/ssl/ssldef.c 2017-06-16 08:10:10.962166946 -0400 +++ nss-3.28.4/nss/lib/ssl/ssldef.c 2017-06-16 08:10:10.942166711 -0400 @@ -66,6 +66,8 @@ ssl_DefRecv(sslSocket *ss, unsigned char PRFileDesc *lower = ss->fd->lower; int rv; + PORT_Assert(buf && len > 0); + rv = lower->methods->recv(lower, (void *)buf, len, flags, ss->rTimeout); if (rv < 0) { DEFINE_ERROR Index: nss-3.28.4/nss/lib/ssl/sslimpl.h =================================================================== --- nss-3.28.4.orig/nss/lib/ssl/sslimpl.h 2017-06-16 08:10:10.962166946 -0400 +++ nss-3.28.4/nss/lib/ssl/sslimpl.h 2017-06-16 08:10:10.942166711 -0400 @@ -367,6 +367,10 @@ struct sslGatherStr { /* the start of the buffered DTLS record in dtlsPacket */ unsigned int dtlsPacketOffset; + + /* tracks whether we've seen a v3-type record before and must reject + * any further v2-type records. */ + PRBool rejectV2Records; }; /* sslGather.state */ debian/patches/CVE-2018-12384-1.patch0000644000000000000000000000270213404746513013470 0ustar Backport of: # HG changeset patch # User Martin Thomson # Date 1535720767 -7200 # Node ID 46f9a1f40c3dd53cf4627e007429530fe989f592 # Parent 93108979390d163ae97d73db5a2df883d2bf8c62 Bug 1483128, backported fix for CVE-2018-12384 to the NSS_3_36_BRANCH Index: nss-3.28.4/nss/lib/ssl/ssl3con.c =================================================================== --- nss-3.28.4.orig/nss/lib/ssl/ssl3con.c 2018-12-14 09:48:09.000000000 -0500 +++ nss-3.28.4/nss/lib/ssl/ssl3con.c 2018-12-14 09:48:58.192430935 -0500 @@ -8421,14 +8421,6 @@ ssl3_HandleClientHello(sslSocket *ss, SS goto alert_loser; } - /* Generate the Server Random now so it is available - * when we process the ClientKeyShare in TLS 1.3 */ - rv = ssl3_GetNewRandom(&ss->ssl3.hs.server_random); - if (rv != SECSuccess) { - errCode = SSL_ERROR_GENERATE_RANDOM_FAILURE; - goto loser; - } - #ifndef TLS_1_3_DRAFT_VERSION /* * [draft-ietf-tls-tls13-11 Section 6.3.1.1]. @@ -9323,7 +9315,11 @@ ssl3_SendServerHello(sslSocket *ss) if (rv != SECSuccess) { return rv; /* err set by AppendHandshake. */ } - /* Random already generated in ssl3_HandleClientHello */ + + rv = ssl3_GetNewRandom(&ss->ssl3.hs.server_random); + if (rv != SECSuccess) { + return SECFailure; + } rv = ssl3_AppendHandshake( ss, &ss->ssl3.hs.server_random, SSL3_RANDOM_LENGTH); if (rv != SECSuccess) { debian/libnss3-1d.links.in0000644000000000000000000000053012234360534012514 0ustar usr/lib/@DEB_HOST_MULTIARCH@/libnss3.so usr/lib/@DEB_HOST_MULTIARCH@/libnss3.so.1d usr/lib/@DEB_HOST_MULTIARCH@/libnssutil3.so usr/lib/@DEB_HOST_MULTIARCH@/libnssutil3.so.1d usr/lib/@DEB_HOST_MULTIARCH@/libsmime3.so usr/lib/@DEB_HOST_MULTIARCH@/libsmime3.so.1d usr/lib/@DEB_HOST_MULTIARCH@/libssl3.so usr/lib/@DEB_HOST_MULTIARCH@/libssl3.so.1d debian/libnss3.lintian-overrides.in0000644000000000000000000000143412234360534014534 0ustar # ABI compatibility is ensured upstream, and the SO version, if it needed # a change at any time, would be a change in the library name. There is # no reason to make compatibility more difficult with other distros and # upstream binary releases. libnss3: shlib-without-versioned-soname usr/lib/@DEB_HOST_MULTIARCH_WC@/libnss3.so libnss3.so libnss3: shlib-without-versioned-soname usr/lib/@DEB_HOST_MULTIARCH_WC@/libssl3.so libssl3.so libnss3: shlib-without-versioned-soname usr/lib/@DEB_HOST_MULTIARCH_WC@/libnssutil3.so libnssutil3.so libnss3: shlib-without-versioned-soname usr/lib/@DEB_HOST_MULTIARCH_WC@/libsmime3.so libsmime3.so # License says GPL 2 or subsequent, so pointing to the latest version is fine libnss3: copyright-refers-to-versionless-license-file usr/share/common-licenses/GPL debian/libnss3-dev.links.in0000644000000000000000000000014612234360534012771 0ustar usr/lib/@DEB_HOST_MULTIARCH@/pkgconfig/nss.pc usr/lib/@DEB_HOST_MULTIARCH@/pkgconfig/xulrunner-nss.pc debian/make.mk0000644000000000000000000000172512234360534010443 0ustar lazy = $(eval $(1) = $$(if $$(___$(1)),,$$(eval ___$(1) := $(2)))$$(___$(1))) lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1)))))))))))))))))))))))))) uc = $(subst a,A,$(subst b,B,$(subst c,C,$(subst d,D,$(subst e,E,$(subst f,F,$(subst g,G,$(subst h,H,$(subst i,I,$(subst j,J,$(subst k,K,$(subst l,L,$(subst m,M,$(subst n,N,$(subst o,O,$(subst p,P,$(subst q,Q,$(subst r,R,$(subst s,S,$(subst t,T,$(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,$(subst z,Z,$1)))))))))))))))))))))))))) __VARS := $(.VARIABLES) dump: @$(foreach var,$(sort $(filter-out $(__VARS) __VARS preprocess ___%,$(.VARIABLES))),echo '$(var) = $(subst ','\'',$(subst \,\\,$($(var))))';) dump-%: @echo $($*) .PHONY: dump debian/compat0000644000000000000000000000000212234360534010366 0ustar 9 debian/nss-config.in0000644000000000000000000000456212234360534011575 0ustar #!/bin/sh prefix=/usr major_version=@MOD_MAJOR_VERSION@ minor_version=@MOD_MINOR_VERSION@ patch_version=@MOD_PATCH_VERSION@ usage() { cat <&2 fi lib_ssl=yes lib_smime=yes lib_nss=yes lib_nssutil=yes while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --prefix=*) prefix=$optarg ;; --prefix) echo_prefix=yes ;; --exec-prefix=*) exec_prefix=$optarg ;; --exec-prefix) echo_exec_prefix=yes ;; --includedir=*) includedir=$optarg ;; --includedir) echo_includedir=yes ;; --libdir=*) libdir=$optarg ;; --libdir) echo_libdir=yes ;; --version) echo ${major_version}.${minor_version}.${patch_version} ;; --cflags) echo_cflags=yes ;; --libs) echo_libs=yes ;; ssl) lib_ssl=yes ;; smime) lib_smime=yes ;; nss) lib_nss=yes ;; nssutil) lib_nssutil=yes ;; *) usage 1 1>&2 ;; esac shift done # Set variables that may be dependent upon other variables if test -z "$exec_prefix"; then exec_prefix=${prefix} fi if test -z "$includedir"; then includedir=${prefix}/include/nss fi if test -z "$libdir"; then libdir=${exec_prefix}/lib/@DEB_HOST_MULTIARCH@ fi if test "$echo_prefix" = "yes"; then echo $prefix fi if test "$echo_exec_prefix" = "yes"; then echo $exec_prefix fi if test "$echo_includedir" = "yes"; then echo $includedir fi if test "$echo_libdir" = "yes"; then echo $libdir fi if test "$echo_cflags" = "yes"; then echo -I$includedir fi if test "$echo_libs" = "yes"; then libdirs="-L$libdir" if test -n "$lib_ssl"; then libdirs="$libdirs -lssl${major_version}" fi if test -n "$lib_smime"; then libdirs="$libdirs -lsmime${major_version}" fi if test -n "$lib_nss"; then libdirs="$libdirs -lnss${major_version}" fi if test -n "$lib_nssutil"; then libdirs="$libdirs -lnssutil${major_version}" fi echo $libdirs fi debian/libnss3-dev.lintian-overrides0000644000000000000000000000024612234360534014703 0ustar # License says GPL 2 or subsequent, so pointing to the latest version is fine libnss3-dev: copyright-refers-to-versionless-license-file usr/share/common-licenses/GPL debian/copyright0000644000000000000000000006275412264614421011141 0ustar This package was debianized by Mike Hommey on Sun, 25 Mar 2007 19:36:42 +0200. It was downloaded from http://ftp.mozilla.org/pub/mozilla.org/security/nss/ Upstream Author: The Mozilla Project. The NSS library is licensed under the terms of the Mozilla Public License version 2.0, which terms can be found further below. The original code is copyright (c) 1994-2000 Netscape Communications Corporation. Some external libraries are also provided in the source tree with the following licensing terms: === zlib The nss/lib/zlib directory is licensed under the following terms: (C) 1995-2004 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu If you use the zlib library in a product, we would appreciate *not* receiving lengthy legal documents to sign. The sources are provided for free but without warranty of any kind. The library has been entirely written by Jean-loup Gailly and Mark Adler; it does not include third-party code. If you redistribute modified sources, we would appreciate that you include in the file ChangeLog history information documenting your changes. Please read the FAQ for more information on the distribution of modified source versions. === dbm The nss/lib/dbm directory, with few exceptions, is licensed under the following terms: Copyright (c) 1991, 1993, 1994 The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. ***REMOVED*** - see ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change" 4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. === sqlite The nss/lib/sqlite/sqlite3.[ch] files contain a copy of sqlite with the following licensing terms: The author disclaims copyright to this source code. In place of a legal notice, here is a blessing: May you do good and not evil. May you find forgiveness for yourself and forgive others. May you share freely, never taking more than you give. === mkdepend The nss/coreconf/mkdepend directory contains a copy of mkdepend with the following licensing terms: cppsetup.c, def.h, include.c, main.c, mkdepend.man, parse.c, pr.c: Copyright (c) 1993, 1994, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. ifparser.[ch]: Copyright 1992 Network Computing Devices, Inc. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Network Computing Devices may not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Network Computing Devices makes no representations about the suitability of this software for any purpose. It is provided ``as is'' without express or implied warranty. NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. imakemdep.h: Copyright (c) 1993, 1994 X Consortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. === MPL Note on GPL Compatibility ------------------------- The MPL 2, section 3.3, permits you to combine NSS with code under the GNU General Public License (GPL) version 2, or any later version of that license, to make a Larger Work, and distribute the result under the GPL. The only condition is that you must also make NSS, and any changes you have made to it, available to recipients under the terms of the MPL 2 also. Anyone who receives the combined code from you does not have to continue to dual licence in this way, and may, if they wish, distribute under the terms of either of the two licences - either the MPL alone or the GPL alone. However, we discourage people from distributing copies of NSS under the GPL alone, because it means that any improvements they make cannot be reincorporated into the main version of NSS. There is never a need to do this for license compatibility reasons. Note on LGPL Compatibility -------------------------- The above also applies to combining MPLed code in a single library with code under the GNU Lesser General Public License (LGPL) version 2.1, or any later version of that license. If the LGPLed code and the MPLed code are not in the same library, then the copyleft coverage of the two licences does not overlap, so no issues arise. Mozilla Public License Version 2.0 ================================== 1. Definitions -------------- 1.1. "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software. 1.2. "Contributor Version" means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor's Contribution. 1.3. "Contribution" means Covered Software of a particular Contributor. 1.4. "Covered Software" means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof. 1.5. "Incompatible With Secondary Licenses" means (a) that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or (b) that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License. 1.6. "Executable Form" means any form of the work other than Source Code Form. 1.7. "Larger Work" means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software. 1.8. "License" means this document. 1.9. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License. 1.10. "Modifications" means any of the following: (a) any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or (b) any new file in Source Code Form that contains any Covered Software. 1.11. "Patent Claims" of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version. 1.12. "Secondary License" means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses. 1.13. "Source Code Form" means the form of the work preferred for making modifications. 1.14. "You" (or "Your") means an individual or a legal entity exercising rights under this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. 2. License Grants and Conditions -------------------------------- 2.1. Grants Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: (a) under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and (b) under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version. 2.2. Effective Date The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution. 2.3. Limitations on Grant Scope The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor: (a) for any code that a Contributor has removed from Covered Software; or (b) for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or (c) under Patent Claims infringed by Covered Software in the absence of its Contributions. This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4). 2.4. Subsequent Licenses No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3). 2.5. Representation Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License. 2.6. Fair Use This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents. 2.7. Conditions Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1. 3. Responsibilities ------------------- 3.1. Distribution of Source Form All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients' rights in the Source Code Form. 3.2. Distribution of Executable Form If You distribute Covered Software in Executable Form then: (a) such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and (b) You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients' rights in the Source Code Form under this License. 3.3. Distribution of a Larger Work You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s). 3.4. Notices You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies. 3.5. Application of Additional Terms You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction. 4. Inability to Comply Due to Statute or Regulation --------------------------------------------------- If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. 5. Termination -------------- 5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice. 5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate. 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination. ************************************************************************ * * * 6. Disclaimer of Warranty * * ------------------------- * * * * Covered Software is provided under this License on an "as is" * * basis, without warranty of any kind, either expressed, implied, or * * statutory, including, without limitation, warranties that the * * Covered Software is free of defects, merchantable, fit for a * * particular purpose or non-infringing. The entire risk as to the * * quality and performance of the Covered Software is with You. * * Should any Covered Software prove defective in any respect, You * * (not any Contributor) assume the cost of any necessary servicing, * * repair, or correction. This disclaimer of warranty constitutes an * * essential part of this License. No use of any Covered Software is * * authorized under this License except under this disclaimer. * * * ************************************************************************ ************************************************************************ * * * 7. Limitation of Liability * * -------------------------- * * * * Under no circumstances and under no legal theory, whether tort * * (including negligence), contract, or otherwise, shall any * * Contributor, or anyone who distributes Covered Software as * * permitted above, be liable to You for any direct, indirect, * * special, incidental, or consequential damages of any character * * including, without limitation, damages for lost profits, loss of * * goodwill, work stoppage, computer failure or malfunction, or any * * and all other commercial damages or losses, even if such party * * shall have been informed of the possibility of such damages. This * * limitation of liability shall not apply to liability for death or * * personal injury resulting from such party's negligence to the * * extent applicable law prohibits such limitation. Some * * jurisdictions do not allow the exclusion or limitation of * * incidental or consequential damages, so this exclusion and * * limitation may not apply to You. * * * ************************************************************************ 8. Litigation ------------- Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims. 9. Miscellaneous ---------------- This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor. 10. Versions of the License --------------------------- 10.1. New Versions Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number. 10.2. Effect of New Versions You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward. 10.3. Modified Versions If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License). 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached. Exhibit A - Source Code Form License Notice ------------------------------------------- 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/. If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. You may add additional accurate notices of copyright ownership. Exhibit B - "Incompatible With Secondary Licenses" Notice --------------------------------------------------------- This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. debian/libnss3-nssdb.dirs0000644000000000000000000000002612264617640012543 0ustar etc/pki var/lib/nssdb debian/source/0000755000000000000000000000000012234360534010470 5ustar debian/source/format0000644000000000000000000000001412234360534011676 0ustar 3.0 (quilt) debian/libnss3-dev.dirs0000644000000000000000000000003012234360534012175 0ustar usr/bin usr/include/nss debian/nss.pc.in0000644000000000000000000000043212234360534010723 0ustar prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib/@DEB_HOST_MULTIARCH@ includedir=${prefix}/include/nss Name: NSS Description: Mozilla Network Security Services Version: @VERSION@ Requires: nspr Libs: -L${libdir} -lnss3 -lnssutil3 -lsmime3 -lssl3 Cflags: -I${includedir} debian/libnss3-tools.dirs0000644000000000000000000000001012234360534012555 0ustar usr/bin debian/libnss3-nssdb.links0000644000000000000000000000003412264616670012723 0ustar var/lib/nssdb etc/pki/nssdb debian/libnss3-tools.lintian-overrides0000644000000000000000000000025012234360534015260 0ustar # License says GPL 2 or subsequent, so pointing to the latest version is fine libnss3-tools: copyright-refers-to-versionless-license-file usr/share/common-licenses/GPL debian/changelog0000644000000000000000000011647013433003614011046 0ustar nss (2:3.28.4-0ubuntu0.14.04.5) trusty-security; urgency=medium * SECURITY UPDATE: DoS in NULL pointer dereference in CMS functions - debian/patches/CVE-2018-18508-1.patch: add null checks in nss/lib/smime/cmscinfo.c, nss/lib/smime/cmsdigdata.c, nss/lib/smime/cmsencdata.c, nss/lib/smime/cmsenvdata.c, nss/lib/smime/cmsmessage.c, nss/lib/smime/cmsudf.c. - debian/patches/CVE-2018-18508-2.patch: add null checks in nss/lib/smime/cmsmessage.c. - CVE-2018-18508 -- Marc Deslauriers Tue, 19 Feb 2019 14:41:32 +0100 nss (2:3.28.4-0ubuntu0.14.04.4) trusty-security; urgency=medium * SECURITY UPDATE: side-channel attack on ECDSA signatures - debian/patches/CVE-2018-0495.patch: improve ecdsa and dsa in nss/lib/freebl/dsa.c, nss/lib/freebl/ec.c. - CVE-2018-0495 * SECURITY UPDATE: ServerHello.random is all zero in v2 ClientHello - debian/patches/CVE-2018-12384-1.patch: fix random logic in nss/lib/ssl/ssl3con.c. - debian/patches/CVE-2018-12384-2.patch: add tests to nss/gtests/ssl_gtest/ssl_loopback_unittest.cc, nss/gtests/ssl_gtest/ssl_v2_client_hello_unittest.cc. - CVE-2018-12384 * SECURITY UPDATE: cache side-channel variant of the Bleichenbacher attack - debian/patches/CVE-2018-12404-1.patch: improve RSA key exchange handling in nss/lib/ssl/ssl3con.c. - debian/patches/CVE-2018-12404-3.patch: add constant time mp_to_fixlen_octets in nss/gtests/freebl_gtest/mpi_unittest.cc, nss/lib/freebl/mpi/mpi.c, nss/lib/freebl/mpi/mpi.h. - CVE-2018-12404 -- Marc Deslauriers Fri, 14 Dec 2018 10:33:50 -0500 nss (2:3.28.4-0ubuntu0.14.04.3) trusty-security; urgency=medium * SECURITY UPDATE: Use-after-free in TLS 1.2 generating handshake hashes - debian/patches/CVE-2017-7805.patch: Simplify handling of CertificateVerify in nss/lib/ssl/ssl3con.c, nss/lib/ssl/ssl3prot.h. - CVE-2017-7805 -- Marc Deslauriers Fri, 29 Sep 2017 08:54:40 -0400 nss (2:3.28.4-0ubuntu0.14.04.2) trusty-security; urgency=medium * SECURITY UPDATE: DoS via empty SSLv2 messages - debian/patches/CVE-2017-7502.patch: reject broken v2 records in nss/lib/ssl/ssl3gthr.c, nss/lib/ssl/ssldef.c, nss/lib/ssl/sslimpl.h, added tests to nss/gtests/ssl_gtest/ssl_gather_unittest.cc, nss/gtests/ssl_gtest/ssl_gtest.gyp, nss/gtests/ssl_gtest/manifest.mn, nss/gtests/ssl_gtest/ssl_v2_client_hello_unittest.cc. - CVE-2017-7502 -- Marc Deslauriers Fri, 16 Jun 2017 08:14:11 -0400 nss (2:3.28.4-0ubuntu0.14.04.1) trusty-security; urgency=medium * Updated to upstream 3.28.4 to fix security issues and get a new CA certificate bundle. * SECURITY UPDATE: DES and Triple DES ciphers birthday attack - CVE-2016-2183 * SECURITY UPDATE: out-of-bounds write in Base64 decoding - CVE-2017-5461 * debian/patches/99_jarfile_ftbfs.patch: removed, upstream. * debian/patches/*.patch: refreshed for new version. * debian/control: bump libnspr4-dev to 4.13.1. * debian/libnss3.symbols: added new symbols. -- Marc Deslauriers Wed, 26 Apr 2017 10:25:43 -0400 nss (2:3.26.2-0ubuntu0.14.04.3) trusty-security; urgency=medium * Updated to upstream 3.26.2 to fix security issues and get a new CA certificate bundle. * SECURITY UPDATE: denial of service via invalid DH keys - CVE-2016-5285 * SECURITY UPDATE: small subgroup confinement attack - CVE-2016-8635 * SECURITY UPDATE: insufficient mitigation of timing side-channel attack - CVE-2016-9074 * debian/rules: added libfreeblpriv3.so. * debian/libnss3.symbols: updated for new version, added SSL_GetCipherSuiteInfo and SSL_GetChannelInfo as they are not backwards compatible. * debian/patches/*.patch: refreshed for new version. * debian/rules: When building with -O3, build with -Wno-error=maybe- uninitialized to fix FTBFS on ppc64el. * debian/patches/99_jarfile_ftbfs.patch: fix FTBFS on powerpc. -- Marc Deslauriers Mon, 05 Dec 2016 07:19:11 -0500 nss (2:3.23-0ubuntu0.14.04.1) trusty-security; urgency=medium * Updated to upstream 3.23 to fix a security issue and get a new CA certificate bundle. * SECURITY UPDATE: multiple memory safety issues - CVE-2016-2834 * debian/control: bump libnspr4-dev Build-Depends to 2:4.12. * debian/libnss3.symbols: updated for new version. * debian/patches/CVE-2016-1950.patch: dropped, upstream. * debian/patches/ftbfs_ppc64el.patch: dropped, no longer needed. * debian/patches/relax_dh_size.patch: removed, now require a minimum DH size of 1023 bits. * debian/patches/*.patch: refreshed for new version. -- Marc Deslauriers Thu, 07 Jul 2016 14:09:52 -0400 nss (2:3.21-0ubuntu0.14.04.2) trusty-security; urgency=medium * SECURITY UPDATE: buffer overflow during ASN.1 decoding - debian/patches/CVE-2016-1950.patch: check lengths in nss/lib/util/secasn1d.c. - CVE-2016-1950 -- Marc Deslauriers Wed, 09 Mar 2016 07:38:11 -0500 nss (2:3.21-0ubuntu0.14.04.1) trusty-security; urgency=medium * Updated to upstream 3.21 to fix a security issue and get a new CA certificate bundle. * SECURITY UPDATE: improper division in mp_div and mp_exptmod - CVE-2016-1938 * debian/libnss3.symbols: updated for new version. * debian/patches/95_add_spi+cacert_ca_certs.patch: dropped, no longer want the SPI cert * debian/patches/97_SSL_RENEGOTIATE_TRANSITIONAL.patch: dropped, no longer needed * debian/patches/CVE-2015-7575.patch: dropped, upstream * debian/patches/ftbfs_ppc64el.patch: don't enable -Werror on ppc64el, there are too many uninitialized variable false positives. -- Marc Deslauriers Thu, 04 Feb 2016 09:38:27 -0500 nss (2:3.19.2.1-0ubuntu0.14.04.2) trusty-security; urgency=medium * SECURITY UPDATE: incorrect MD5 support with TLS 1.2 - debian/patches/CVE-2015-7575.patch: remove MD5 in nss/lib/ssl/ssl3con.c. - CVE-2015-7575 -- Marc Deslauriers Thu, 07 Jan 2016 13:23:37 -0500 nss (2:3.19.2.1-0ubuntu0.14.04.1) trusty-security; urgency=medium * Updated to upstream 3.19.2.1 to fix two security issues. * SECURITY UPDATE: use-after-poison in sec_asn1d_parse_leaf - CVE-2015-7181 * SECURITY UPDATE: ASN.1 decoder heap overflow - CVE-2015-7182 -- Marc Deslauriers Wed, 04 Nov 2015 10:44:42 -0600 nss (2:3.19.2-0ubuntu0.14.04.1) trusty-security; urgency=medium * SECURITY UPDATE: update to upstream 3.19.2 to fix multiple security issues and get a new CA certificate bundle. - CVE-2015-2721 - CVE-2015-2730 * debian/libnss3.symbols: updated for new version. * debian/patches/relax_dh_size.patch: relax minimum DH size to 768 bits for compatibility reasons. This patch will get reverted in the future once servers have upgraded to longer DH sizes. -- Marc Deslauriers Wed, 08 Jul 2015 12:27:02 -0400 nss (2:3.17.4-0ubuntu0.14.04.1) trusty-security; urgency=medium * SECURITY UPDATE: update to upstream 3.17.4 to get new CA certificate bundle, and to fix incorrect SHA-1 behaviour. (LP: #1423031) * Removed unneeded patches: - debian/patches/CVE-2014-1569.patch: included upstream. -- Marc Deslauriers Thu, 19 Feb 2015 07:44:05 -0500 nss (2:3.17.1-0ubuntu0.14.04.2) trusty-security; urgency=medium * SECURITY UPDATE: arbitrary data smuggling via incorrect ASN.1 DER length decoding - debian/patches/CVE-2014-1569.patch: properly validate lengths in nss/lib/util/quickder.c. - CVE-2014-1569 -- Marc Deslauriers Tue, 06 Jan 2015 13:19:26 -0500 nss (2:3.17.1-0ubuntu0.14.04.1) trusty-security; urgency=medium * SECURITY UPDATE: update to 3.17.1 - see USN-2361-1 * debian/libnss3.symbols: updated for new version. * debian/patches/38_ppc64le.patch: removed, upstream. -- Marc Deslauriers Wed, 24 Sep 2014 07:32:00 -0400 nss (2:3.17-0ubuntu0.14.04.1) trusty-security; urgency=medium * SECURITY UPDATE: update to upstream 3.17 to get new CA certificate bundle. * Removed unneeded patches: - debian/patches/38_x32.patch: included upstream. - debian/patches/CVE-2014-1492.patch: included upstream. - debian/patches/CVE-2014-1544.patch: included upstream. * Refreshed patches for new version: - debian/patches/38_kbsd.patch - debian/patches/85_security_load.patch - renamed debian/patches/95_add_spi_certs.patch to debian/patches/95_add_spi+cacert_ca_certs.patch to match Debian. * debian/patches/38_ppc64le.patch: new patch for ppc64le support. * debian/libnss3.symbols: updated for new version. * debian/rules: USE_X32 instead of USE_x32. -- Marc Deslauriers Fri, 19 Sep 2014 09:06:41 -0400 nss (2:3.15.4-1ubuntu7.1) trusty-security; urgency=medium * SECURITY UPDATE: possible arbitrary code execution via race condition - debian/patches/CVE-2014-1544.patch: prevent nssTrustDomain_AddCertsToCache from freeing the CERTCertificate associated with the NSSCertificate in nss/lib/pk11wrap/pk11cert.c. - CVE-2014-1544 -- Marc Deslauriers Tue, 09 Sep 2014 07:49:06 -0400 nss (2:3.15.4-1ubuntu7) trusty; urgency=medium * SECURITY UPDATE: incorrect IDNA wildcard handling - debian/patches/CVE-2014-1492.patch: conform to RFC 6125 in nss/lib/certdb/certdb.c. - CVE-2014-1492 -- Marc Deslauriers Wed, 02 Apr 2014 10:14:01 -0400 nss (2:3.15.4-1ubuntu6) trusty; urgency=medium * No longer ship cacert.org certificates. (LP: #1258286) - removed debian/patches/95_add_spi+cacert_ca_certs.patch - added debian/patches/95_add_spi_certs.patch -- Marc Deslauriers Thu, 20 Feb 2014 07:38:51 -0500 nss (2:3.15.4-1ubuntu5) trusty; urgency=medium * debian/rules: Switch from DEB_BUILD_ARCH to DEB_HOST_ARCH to fix cross. -- Adam Conrad Sat, 25 Jan 2014 21:08:34 -0700 nss (2:3.15.4-1ubuntu4) trusty; urgency=medium * control: Mark libnss3-nssdb as M-A: foreign. (LP: #1272292) -- Timo Aaltonen Fri, 24 Jan 2014 14:13:10 +0200 nss (2:3.15.4-1ubuntu3) trusty; urgency=medium * debian/rules: create directory before creating cert database to fix ftbfs -- Marc Deslauriers Thu, 23 Jan 2014 13:22:01 -0500 nss (2:3.15.4-1ubuntu2) trusty; urgency=medium * debian/rules: switch back to DEB_BUILD_ARCH to fix ftbfs -- Marc Deslauriers Thu, 23 Jan 2014 12:39:23 -0500 nss (2:3.15.4-1ubuntu1) trusty; urgency=medium * Merge with Debian, remaining changes: - Add x32 support. -- Marc Deslauriers Thu, 23 Jan 2014 11:32:47 -0500 nss (2:3.15.4-1) unstable; urgency=low * New upstream release. * Acknowledge NMU. * debian/rules: Avoid long one-liner with semi-colons. * debian/patches/*: Refresh patches. * debian/copyright: Update. Closes: #730428. * debian/control, debian/libnss3-nssdb.*, debian/pkcs11.txt, debian/rules: Add shared cert and key databases. Thanks Timo Aaltonen. Closes: #537866. * debian/rules: Use DEB_HOST_ARCH instead of DEB_BUILD_ARCH. * debian/control: Mark libnss3-dev as Multi-Arch: same. Thanks Shawn Landden. Closes: #682925. * debian/libnss3.symbols: Add NSS_3.15.4 symbol versions. -- Mike Hommey Mon, 13 Jan 2014 10:46:04 +0900 nss (2:3.15.3.1-1.1ubuntu1) trusty; urgency=medium * Add x32 support. Closes: #699217. -- Matthias Klose Mon, 06 Jan 2014 21:27:26 +0100 nss (2:3.15.3.1-1.1) unstable; urgency=low * Non-Maintainer Upload - ship extra NSS utilities (Closes: #701141) -- Daniel Kahn Gillmor Sat, 04 Jan 2014 11:34:41 -0500 nss (2:3.15.3.1-1) unstable; urgency=high * New upstream release. - Distrusts AC DG Tresor SSL CA. -- Mike Hommey Sun, 15 Dec 2013 10:09:48 +0900 nss (2:3.15.3-1) unstable; urgency=high * New upstream release. - Fixes CVE-2013-1741, CVE-2013-5605, CVE-2013-5606. -- Mike Hommey Sat, 16 Nov 2013 08:50:45 +0900 nss (2:3.15.2-1) unstable; urgency=low * New upstream release. - Fixes CVE-2013-1739. Closes: #726473. -- Mike Hommey Mon, 21 Oct 2013 08:05:24 +0900 nss (2:3.15.1-1) unstable; urgency=low * New upstream release. * debian/patches/*: Refresh patches. * debian/patches/lower-dhe-priority.patch: Removed, as it was only necessary for Iceweasel 3.5, which is long gone. -- Mike Hommey Mon, 05 Aug 2013 14:41:14 +0900 nss (2:3.15-1) unstable; urgency=low * New upstream release. * debian/patches/*: Refresh patches and removed unused ones. * debian/rules: Adjusted to the new source layout. * debian/libnss3.symbols: Add NSS*_3.15 symbol versions. * debian/control: Bump nspr build dependency. -- Mike Hommey Sat, 15 Jun 2013 19:23:12 +0900 nss (2:3.14.3-1) unstable; urgency=high * New upstream release. - Fixes TLS timing attack (luck 13). Closes: #699888. * debian/libnss3.symbols: Add NSS_3.14.3 symbol version. * debian/control: Unbump sqlite3 build dependency, 3.14.3 lifted the need for sqlite 3.7.15. -- Mike Hommey Sun, 17 Mar 2013 15:01:06 +0100 nss (2:3.14.2-1) unstable; urgency=low * New upstream release. * debian/control: Bump sqlite3 build dependency. * debian/rules: Avoid installing freebl, softokn, nssckbi and nssdbm in two places. * debian/libnss3-1d.lintian-overrides.in: Stop preprocessing, it has nothing to preprocess anymore. * debian/libnss3.lintian-overrides.in: Fix not to contain a reference to the libnss3-1d package. -- Mike Hommey Fri, 15 Feb 2013 10:06:59 +0100 nss (2:3.14.1.with.ckbi.1.93-1) unstable; urgency=low * New upstream release. - Explicitly distrust two intermediate CA certificates mis-issued by TURKTRUST. * debian/patches/95_add_spi+cacert_ca_certs.patch: Refreshed. -- Mike Hommey Fri, 04 Jan 2013 11:16:33 +0100 nss (2:3.14.1-1) unstable; urgency=low * New upstream release. * debian/patches: Removed patches applied upstream, and refreshed the others. * debian/libnss3.symbols: Updated for new symbols. -- Mike Hommey Sun, 23 Dec 2012 17:40:21 +0100 nss (2:3.14-2) unstable; urgency=low * debian/nss-config.in: Fix nss-config when version is in the x.y form instead of x.y.z. -- Mike Hommey Fri, 07 Dec 2012 17:07:05 +0100 nss (2:3.14-1) unstable; urgency=low * New upstream release. * debian/patches: Removed patches applied upstream, and refreshed the others. * debian/libnss3.symbols: Updated for new symbols. -- Mike Hommey Thu, 01 Nov 2012 10:37:39 +0100 nss (2:3.13.6-1) unstable; urgency=low * New upstream release. * debian/rules: Use xz compression for binary packages. Thanks Ansgar Burchardt. Closes: #683835. -- Mike Hommey Fri, 31 Aug 2012 09:56:53 +0200 nss (2:3.13.5-1) unstable; urgency=low * New upstream release. -- Mike Hommey Fri, 15 Jun 2012 09:40:00 +0200 nss (2:3.13.4-3) unstable; urgency=low * debian/rules: Skip epoch when getting upstream version number. -- Mike Hommey Sun, 20 May 2012 07:36:11 +0200 nss (2:3.13.4-2) unstable; urgency=low * debian/control, debian/libnss3*, debian/rules, mozilla/security/coreconf/*, mozilla/security/nss/lib/*/manifest.mn: Move to unversioned library. ABI compatibility is ensured upstream, and the SO version, if it needed a change at any time, would be a change in the library name. There is no reason to keep making compatibility more difficult with other distros and upstream binary releases. While previous versions were one-way compatible (binaries built against other distros or upstream nspr could work on Debian), this approach works both ways. * debian/control: - Bump Standards-Version to 3.9.3.0. No changes required. - Force to build against libnspr4-dev >= 2:4.9 * Removed unapplied patches. * Adding an epoch to match the old libnss3 package that used to be in the Debian archive. -- Mike Hommey Thu, 17 May 2012 09:45:36 +0200 nss (3.13.4-1) unstable; urgency=low * New upstream release. - Changed __GNUC_MINOR__ use in pkcs11n.h. Closes: #650319. * mozilla/security/nss/cmd/certcgi/certcgi.c, mozilla/security/nss/cmd/digest/digest.c, mozilla/security/nss/cmd/signver/pk7print.c: Import patch from Moritz Muehlenhoff for hardened format strings. * debian/make.mk, debian/rules, debian/control: Enable hardening. Closes: #657325. * debian/libnss3-1d.lintian-overrides.in, debian/rules: Use wildcards in lintian override. Closes: #670013. * debian/compat, debian/control: Bump debian/compat to 9. This has the effect of using build-id for debug files, thus Closes: #670015. * debian/libnss3-1d.symbols: Add symbols for /usr/lib/nss/ libraries. -- Mike Hommey Sun, 29 Apr 2012 09:48:58 +0200 nss (3.13.3-1) unstable; urgency=low * New upstream release. * debian/libnss3-1d.symbols: Updated to fit new upstream. -- Mike Hommey Fri, 24 Feb 2012 09:56:10 +0100 nss (3.13.2~beta1-3) experimental; urgency=low * debian/libnss3-1d.symbols: Fix symbol version for the symbol added in -2. -- Mike Hommey Fri, 23 Dec 2011 19:20:23 +0100 nss (3.13.2~beta1-2) experimental; urgency=low * mozilla/security/nss/lib/ssl/*, mozilla/security/nss/cmd/tstclnt/tstclnt.c, mozilla/security/nss/tests/ssl/ssl.sh: Apply patches from bz#542832, required for Iceweasel 11. * debian/libnss3-1d.symbols: Add corresponding symbol. -- Mike Hommey Fri, 23 Dec 2011 17:54:03 +0100 nss (3.13.2~beta1-1) experimental; urgency=low * New upstream snapshot, picked from NSS_3_13_2_BETA1 cvs tag. * debian/libnss3-1d.symbols: Add NSS 3.13.2 symbols. -- Mike Hommey Fri, 23 Dec 2011 16:22:05 +0100 nss (3.13.1.with.ckbi.1.88-1) unstable; urgency=low * New upstream release. - Distrusts malaysian Digicert Sdn. Bhd CA certificate. - Addresses CVE-2011-3640 (Untrusted search path vulnerability). Closes: #647614. * debian/patches/*: Refreshed patches. * debian/libnss3-1d.symbols: Add NSS 3.13 symbols. -- Mike Hommey Sat, 05 Nov 2011 17:05:26 +0100 nss (3.12.11-3) unstable; urgency=high * mozilla/security/nss/lib/ckfw/builtins/certdata.*: Explicitely distrust various DigiNotar CAs: - DigiNotar Root CA - DigiNotar Services 1024 CA - DigiNotar Cyber CA - DigiNotar Cyber CA 2nd - DigiNotar PKIoverheid - DigiNotar PKIoverheid G2 -- Mike Hommey Sat, 03 Sep 2011 09:33:28 +0200 nss (3.12.11-2) unstable; urgency=high * mozilla/security/nss/lib/ckfw/builtins/certdata.*: Remove DigiNotar Root CA. -- Mike Hommey Wed, 31 Aug 2011 08:49:00 +0200 nss (3.12.11-1) unstable; urgency=low * New upstream release. * mozilla/security/nss/lib/ckfw/builtins/certdata.*, * mozilla/security/coreconf/{config,Linux}.mk: Refreshed. * debian/copyright: Update dbm license according to that in the source. Closes: #624310 -- Mike Hommey Fri, 12 Aug 2011 12:45:08 +0200 nss (3.12.10-3) unstable; urgency=low * debian/nss-config.in, debian/nss.pc.in, debian/rules: Return the multiarch path in nss-config and nss.pc. -- Mike Hommey Thu, 21 Jul 2011 18:08:48 +0200 nss (3.12.10-2) unstable; urgency=low * debian/control, debian/libnss3-1d.dirs, debian/libnss3-1d.lintian-overrides.in, debian/libnss3-dev.dirs, debian/libnss3-1d.links.in, debian/libnss3-dev.links.in, debian/rules: Switch to multi-arch while keeping backports easy. Closes: #497088. -- Mike Hommey Mon, 04 Jul 2011 11:24:18 +0200 nss (3.12.10-1) unstable; urgency=low * New upstream release. * mozilla/security/nss/lib/ckfw/builtins/certdata.*: Refreshed. * debian/control: Build depend on libnspr4-dev >= 4.8.8. * debian/libnss3-1d.symbols: Add new symbol version. -- Mike Hommey Wed, 25 May 2011 10:20:59 +0200 nss (3.12.9.with.ckbi.1.82-1) unstable; urgency=low * New upstream release. - Marks fraudulent Comodo certificates as untrusted. * mozilla/security/nss/lib/ckfw/builtins/certdata.*: Refreshed. -- Mike Hommey Thu, 24 Mar 2011 16:37:46 +0100 nss (3.12.9-2) unstable; urgency=low * Upload to unstable. * debian/rules: Fallback to DEB_BUILD_ARCH when dpkg-architecture does't support DEB_BUILD_ARCH_BITS. * debian/control: Lower build depends on dpkg-dev to (>= 1.13.19), which was the previous value. * mozilla/security/nss/lib/freebl/unix_rand.c: We don't need to prevent using netstat for entropy seeding. The seeding will stop before netstat if it could get data from /dev/urandom. * mozilla/security/coreconf/Linux.mk: We shouldn't need to special case mips64 anymore. * mozilla/security/nss/cmd/shlibsign/Makefile, debian/rules: Don't rely on patching the source to not create .chk files during build. -- Mike Hommey Sun, 06 Mar 2011 09:58:41 +0100 nss (3.12.9-1) experimental; urgency=low * New upstream release. -- Mike Hommey Sat, 15 Jan 2011 11:33:35 +0100 nss (3.12.9~beta2-1) experimental; urgency=low * New upstream snapshot, picked from NSS_3_12_9_BETA2 cvs tag. * debian/patches/*: Refresh patches. * debian/libnss3-1d.symbols: Add new symbol versions. * debian/rules: Bump shlibs. -- Mike Hommey Fri, 17 Dec 2010 15:01:31 +0100 nss (3.12.8-1) unstable; urgency=low * New upstream release. * debian/patches/*: Refresh patches. * debian/patches/series: + lower-dhe-priority.patch: Upstream patch from bz#583337 to lower DHE priority. Closes: #592315. -- Mike Hommey Thu, 07 Oct 2010 08:50:48 +0200 nss (3.12.8~b2-1) experimental; urgency=low * New upstream snapshot, picked from NSS_3_12_8_BETA2 cvs tag. * debian/patches/*: Refresh patches. -- Mike Hommey Mon, 23 Aug 2010 18:11:12 +0200 nss (3.12.7-1) unstable; urgency=low * New upstream release. * debian/patches/*: Refresh patches. * debian/control: - Bump Standards-Version to 3.9.1.0. - Build depend on libnspr4-dev >= 4.8.6. * debian/libnss3-1d.symbols: Simplify symbols file and add new symbols. * debian/rules: Bump shlibs. -- Mike Hommey Fri, 06 Aug 2010 13:55:14 +0200 nss (3.12.6-3) unstable; urgency=low * debian/rules: + Sign libnssdbm3.so. Closes: #588806. + Test that the FIPS mode can be properly enabled during build. * debian/control: + Remove conflicts with very old packages. + Bump Standards-Version to 3.9.0.0. -- Mike Hommey Mon, 12 Jul 2010 15:12:24 +0200 nss (3.12.6-2) unstable; urgency=low * debian/patches/series: + 00_ckbi_1.79.patch: New patch to update CKBI to 1.79. + 95_add_spi+cacert_ca_certs.patch: Refreshed against CKBI 1.79. -- Mike Hommey Fri, 09 Apr 2010 10:45:01 +0200 nss (3.12.6-1) unstable; urgency=low * New upstream release. * debian/patches/*: Refresh patches. * debian/libnss3-1d.symbols, debian/rules: Update symbols file with new symbols and bump shlibs. * debian/patches/97_SSL_RENEGOTIATE_TRANSITIONAL.patch, debian/patches/series: Enable transitional scheme for ssl renegotiation. Closes: #561918. * debian/control: + Bump Standards-Version to 3.8.4.0. + Drop libnss3-1d dependency on dpkg. The versions it didn't really like were between oldstable and stable. + Don't allow different versions of libnss3-1d, libnss3-1d-dbg and libnss3-tools to be installed at the same time. + Add ${misc:Depends} to libnss3-1d-dbg dependencies. * debian/rules: Revert workaround for gcc 4.4 bug on powerpc with -Os. * debian/rules, debian/control, debian/compat: Simplify debian/rules by using dh. -- Mike Hommey Wed, 17 Mar 2010 20:33:32 +0100 nss (3.12.5-2) unstable; urgency=low * debian/control: + Remove build dependency on autotools-dev, we don't use it. + libnss3-dev depends on libnspr4-dev >= 4.6.6-1. 4.6.6-1 was the first version where the pkg-config file was nspr.pc instead of xulrunner-nspr.pc. Closes: #567134. * debian/patches/96_NSS_VersionCheck.patch, debian/patches/series: Remove runtime check of NSPR version in NSS_VersionCheck, which seems to be pointless. Closes: #567136. -- Mike Hommey Thu, 28 Jan 2010 12:12:35 +0100 nss (3.12.5-1) unstable; urgency=low * New upstream release. * debian/copyright: Modify with new location for the embedded copy of zlib. * debian/patches/*: + Adapt patches to new upstream. + Switch to quilt format * debian/source/format: Switch to 3.0 (quilt) format. * debian/rules, debian/control: Stop using dpatch. * debian/patches/38_intel_aes_executable_stack.patch: Removed. An upstream change in version 3.12.4 obsoleted it. * debian/rules: + Remove DEB_{BUILD,HOST}_* variables, they are not used. + Use DEB_BUILD_ARCH_BITS to determine whether to build with USE_64 or not. + Ship more tools in libnss3-tools. Closes: #526267. + Work around gcc 4.4 bug on powerpc with -Os. + Force non parallel build. There are too many race conditions in the build system to support parallel builds. Closes: #536248. + Bump shlibs. * debian/control: + Bump Standards-Version to 3.8.3.0. + Build-depend on dpkg-dev (>= 1.15.4) for DEB_BUILD_ARCH_BITS. + Stricter dependency between libnss3-dev and libnss3-1d. * debian/libnss3-1d.symbols: + Add new symbols. + Remove debian revision for symbols added in 3.12.4. * debian/patches/38_hurd.patch: Fix FTBFS on Hurd due to PATH_MAX usage in unix_rand.c. Closes: #550995. -- Mike Hommey Fri, 18 Dec 2009 11:48:14 +0100 nss (3.12.4-1) unstable; urgency=low * New upstream release. * debian/patches/38_kbsd.dpatch: + Use CHECK_FORK_PTHREAD on kfreebsd and hurd. Closes: #547301. + Adapt to upstream changes. * debian/patches/95_add_spi+cacert_ca_certs.dpatch, * debian/patches/81_sonames.dpatch: Adapt to upstream changes. * debian/libnss3-1d.symbols: Update symbols file with new symbols. * debian/rules: Bumped shlibs. -- Mike Hommey Sun, 11 Oct 2009 01:26:14 +0200 nss (3.12.3.1-1) unstable; urgency=low * New upstream release. * debian/patches/95_add_spi+cacert_ca_certs.dpatch, Adapted to upstream changes. -- Mike Hommey Fri, 21 Aug 2009 23:47:24 +0200 nss (3.12.3-1) unstable; urgency=low * New upstream release. * debian/watch: Updated to catch new upstream .bz2 tarballs. * debian/copyright: Add information about mozilla/security/corecond/mkdepend. * debian/patches/38_hurd.dpatch, debian/patches/38_kbsd.dpatch: Adapted to upstream changes. * debian/patches/85_security_load.dpatch: Load libsoftokn3.so from /usr/lib/nss when unable to load it from standard ld.so paths in shlibsign. * debian/rules: + Add debian/libnss3-1d/usr/lib/nss to LD_LIBRARY_PATH when running shlibsign during build. + Bumped shlibs. * debian/libnss3-1d.symbols: Update symbols file with new symbols. * debian/control: + Bumped Standards-Version to 3.8.1.0. No changes needed. + Put the libnss3-1d-dbg package in the "debug" section. + Correct libnss3-1d-dbg short description. + Remove redundant section on libnss3-1d. + Build-depend on proper version of debhelper for dh_lintian. * debian/*.lintian-overrides, debian/rules: Install some Lintian overrides with dh_lintian. * debian/patches/38_intel_aes_executable_stack.dpatch: Indicate that we don't need executable stack in intel-aes.s. * debian/patches/00list: Updated accordingly. -- Mike Hommey Sat, 18 Apr 2009 09:37:31 +0200 nss (3.12.2.with.ckbi.1.73-2) unstable; urgency=low * mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.h: Apply patch from upstream to fix alignment issues on sparc and ia64. Closes: #509930. -- Mike Hommey Mon, 06 Apr 2009 20:24:01 +0200 nss (3.12.2.with.ckbi.1.73-1) unstable; urgency=low * debian/patches/38_kbsd.dpatch: Brown paper bag fix for regression in previous release that led to FTBFS on i386 only. Closes: #513101. Thanks Steffen Joeris, Sebastian Andrzej Siewior and Petr Salinger. * debian/patches/95_add_spi+cacert_ca_certs.dpatch, debian/patches/80_security_tools.dpatch: Adapted to upstream changes. * debian/libnss3-1d.symbols: Update symbols file with new symbols. * debian/rules: Bumped shlibs. -- Mike Hommey Sat, 31 Jan 2009 16:41:26 +0100 nss (3.12.1-1) unstable; urgency=low * New upstream release. * debian/patches/95_add_spi+cacert_ca_certs.dpatch, debian/patches/38_mips64_build.dpatch, debian/patches/38_kbsd.dpatch: Adapted to upstream changes. * debian/libnss3-1d.symbols: Update symbols file with new symbols. * debian/rules: Bumped shlibs. -- Mike Hommey Sat, 20 Dec 2008 12:11:28 +0100 nss (3.12.0-5) unstable; urgency=low * debian/control: + Conflict with libnss3-0d >= 3.11.5, that has conflicting files in /usr/lib/nss. Older versions (those from etch) don't conflict. This makes updates from old testing smoother. Closes: #492332. + Build-depend on libsqlite3-dev >= 3.3.9, since API introduced in this version is used. Closes: #493191. -- Mike Hommey Sun, 03 Aug 2008 09:42:03 +0200 nss (3.12.0-4) unstable; urgency=low * debian/control: Remove conflict with libnss3-0d, it was only useful when libnss3-0d was a transitional package. Closes: #490995. -- Mike Hommey Wed, 16 Jul 2008 21:29:19 +0200 nss (3.12.0-3) unstable; urgency=low * debian/rules: + Enable ECC cypher suite. Closes: #490826. + Build with the same optimization level as upstream. -- Mike Hommey Mon, 14 Jul 2008 17:35:25 +0200 nss (3.12.0-2) unstable; urgency=low * debian/patches/95_add_spi+cacert_ca_certs.dpatch: + Add CAcert root and class 3 certificates to nssckbi module. + Add SPI Inc. certificate to nssckbi module. Thanks to Martin F Krafft for these. Closes: #309564. * debian/patches/00list: Updated accordingly. -- Mike Hommey Sat, 12 Jul 2008 18:26:09 +0200 nss (3.12.0-1) unstable; urgency=low * New upstream release. * debian/patches/92_ocsp.dpatch: Removed, as applied upstream. * debian/patches/00list: Updated accordingly. * debian/control: + Bumped Standards-Version to 3.8.0.1. No changes needed. + Added Vcs-Browser and Vcs-Git fields. + libnss3-dev don't need explicit version dependency on libnss3-1d. + libnss3-dev depends on libnspr4-dev. Closes: #488402. + Make the -dbg package less a hassle for manual installations with dpkg. + libnss3-1d depends on version of dpkg that either don't support symbols files or has fix for #474079. * debian/patches/85_security_load.dpatch: Load files from /usr/lib/nss if given reference path is only a filename, which happens when freebl is statically linked in a binary executable, such as signtool, and the executable is run from $PATH. When the executable is run using a full path, we must replace /bin/ in the path with /lib/ to find the libraries. Closes: #483774. * debian/libnss3-1d.symbols: Re-enable symbols file. -- Mike Hommey Sat, 05 Jul 2008 10:19:53 +0200 nss (3.12.0~rc3-3) unstable; urgency=low * debian/control: Make libnss3-0d conflict with old libnss3, which can still be installed on some systems, though it hasn't been in the archive since sarge. Closes: #485080. -- Mike Hommey Sun, 08 Jun 2008 14:11:13 +0200 nss (3.12.0~rc3-2) unstable; urgency=low * debian/patches/92_ocsp.dpatch: Apply patches from bz433594 and bz#433386, which are applied in upstream RC4 (and are the only changes), to fix crashes under some conditions with OCSP checks. * debian/patches/00list: Updated accordingly. * debian/libnss3-dev.links, debian/libnss3-1d.links: Don't install so files in the -dev package but in the library package. It will allow external applications linked against upstream nss to work on Debian with system nss libraries, and will avoid all browsers to have to implement symlinks themselves to allow some external plugins to work properly. * debian/control: Make libnss3-1d conflict with older versions of libnss3-dev and libnss3-dev need newer libnss3-1d accordingly. -- Mike Hommey Sat, 07 Jun 2008 11:57:55 +0200 nss (3.12.0~rc3-1) unstable; urgency=low * New upstream snapshot, picked from NSS_3_12_RC3 cvs tag. -- Mike Hommey Sun, 11 May 2008 16:58:17 +0200 nss (3.12.0~beta3-1) unstable; urgency=low * New upstream snapshot, picked from NSS_3_12_BETA3 cvs tag. * debian/control: Turn Homepage indications in descriptions into a control field. * debian/patches/91_build_pwdecrypt.dpatch: Enable building and installing pwdecrypt. Thanks Paul Wise. Closes: #472303. * debian/patches/00list: Updated accordingly. * debian/libnss3-1d.symbols: Update symbols file with new symbols and rename the file, so that it isn't used, as a workaround to #474079. Closes: #474007. * debian/rules: Bumped shlibs. -- Mike Hommey Tue, 08 Apr 2008 21:23:53 +0200 nss (3.12.0~beta2-1) unstable; urgency=low * New upstream snapshot, picked from NSS_3_12_BETA2 cvs tag. * debian/patches/10_3.11.7_symbol_fix.dpatch: Removed, as applied upstream. * debian/patches/38_kbsd.dpatch: Adapted to upstream changes. * debian/patches/81_sonames.dpatch: Add SO_VERSION to libnssutil3. * debian/libnss3-dev.links: Add link for libnssutil3. * debian/libnss3-1d.symbols: Update symbols file with new symbols. Note that SEC_StringToOID disappeared (well, was moved to nssutil), compared to version 3.12.0~1.9b1, but it was a new symbol, and isn't used anywhere. * debian/nss.pc.in, debian/nss-config.in: Add libnssutil3 support. * debian/rules: + Bumped shlibs. + Don't generate libsoftokn3.so.0d. * debian/control: + Remove transitional libnss3-0d package. + Bumped Standards-Version to 3.7.3.0. No changes needed. + Build depend on libnspr4-dev >= 4.7.0 (we *do* need the RTM version, and not the preceding betas) * debian/libnss3-0d.*: Removed. * debian/patches/85_security_load.dpatch: Load files from $ORIGIN/nss before those of $ORIGIN. Closes: #469079. * debian/patches/38_hurd.dpatch: Fix FTBFS on Hurd because of MAXPATHLEN. Closes: #419529. * debian/patches/00list: Updated accordingly. -- Mike Hommey Fri, 07 Mar 2008 21:27:54 +0100 nss (3.12.0~1.9b1-2) unstable; urgency=low * debian/control: libnss3-1-dbg needs to conflict with older libnss3-0d-dbg, as it overwrites so of its files. Closes: #455875. * debian/patches/90_realpath.dpatch: Use realpath() in loader_GetOriginalPathname, so that symlinks are properly followed when determining where the current library lives. * debian/patches/00list: Updated accordingly. * debian/patches/85_security_load.dpatch: When the module given by the caller contains a directory name, remove it so that the module can be properly loaded. Closes: #456296. -- Mike Hommey Sun, 16 Dec 2007 11:06:03 +0100 nss (3.12.0~1.9b1-1) unstable; urgency=low * New upstream snapshot, picked from FIREFOX_3_0b1_RELEASE cvs tag. * debian/copyright: Add licensing information about the recently added sqlite copy in the source tree. * debian/control: + Build depend on libsqlite3-dev. + Rename all -0d packages to -1d, but keep a transitional -0d package, since all libraries are compatible (except for the removed one). + Make libnss3-1d conflict with older libnss3-0d. * debian/patches/38_kbsd.dpatch, debian/patches/81_sonames.dpatch: Adapted to upstream changes. * debian/patches/81_sonames.dpatch: + Remove SO version from libsoftokn3, now it is not linked against anymore, but dlloaded. + Remove the hacks to have shlibsign and the signature verification code handle the SO version in the file name. + Bump SO version to 1d. * debian/rules: + Add NSS_USE_SYSTEM_SQLITE=1 to the make options. + Install libsoftokn3 and the new libnssdbm3 in /usr/lib/nss. + Run shlibsign on libsoftokn3 in /usr/lib/nss, without a SO version. + For some reason, build-stamp was missing in install-stamp dependencies. + Bumped shlibs because of new symbols, and pass -c4 to dpkg-gensymbols, so that it fails in all cases where the symbols file is not up to date. + Adapt upstream version pattern matching so that the ~1.9b1 part is removed. + Install .1d libraries in -1d packages. + Create a dummy libsoftokn3.so.0d library, installed in the libnss3-0d package. * debian/libnss3-0d.links: + Remove links in /usr/lib/xulrunner. The workaround they were implementing is going to be done another way. + Add .0d links to .1d libraries. * debian/libnss3-dev.links: + Don't put a symlink for libsoftokn3. + .so files now link to .1d libraries. * debian/patches/80_security_build.dpatch: Remove the hack to load libfreebl from /usr/lib/nss. * debian/patches/85_security_load.dpatch: Load modules from $ORIGIN/nss. * debian/patches/10_3.11.7_symbol_fix.dpatch: Fix a symbol version. Stolen from bz#325672. * debian/patches/00list: Updated accordingly. * debian/libnss3-0d.dirs: Renamed to libnss3-1d.dirs. -- Mike Hommey Sat, 08 Dec 2007 10:53:02 +0100 nss (3.11.7-1) unstable; urgency=low * New upstream release, picked from NSS_3_11_7_RTM cvs tag. * debian/patches/38_kbsd.dpatch: Also add support for the Hurd. Closes: #419529. * debian/rules: + Don't fail on clean with unpatched ruleset. Closes: #421542. + Bumped shlibs because of new symbols. * debian/patches/81_sonames.dpatch: Adapted to upstream changes. -- Mike Hommey Sun, 01 Jul 2007 11:29:06 +0200 nss (3.11.5-3) unstable; urgency=low * Upload to unstable. -- Mike Hommey Mon, 09 Apr 2007 20:37:25 +0200 nss (3.11.5-2) experimental; urgency=low * debian/rules: + Cleaner way to set the NSPR location. + Install libcrmf.a files in libnss3-dev. + binary-indep now does nothing. * debian/control: Make libnss3-dev an Arch: any package. * debian/nss.pc.in: + Remove libsoftokn3 from ld libraries. + Improvement in directories setting. * debian/libnss3-dev.dirs: Create /usr/bin. * debian/nss-config.in, debian/rules: Install a nss-config script into libnss3-dev. -- Mike Hommey Tue, 27 Mar 2007 20:41:11 +0200 nss (3.11.5-1) experimental; urgency=low * Initial release. (Closes: #416151) -- Mike Hommey Sun, 25 Mar 2007 23:56:17 +0200