Skip to contentSkip to conversation

libnspr: bump to version 4.14

PATCH New Baruch Siach 3 participants 7 messages Apr 20, 2017 – Apr 24, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 libnspr: bump to version 4.14

---
 package/libnspr/libnspr.hash | 4 ++--
 package/libnspr/libnspr.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
package/libnspr/libnspr.hash +2 -2
index a4b19b7f9c1c..9111a32c8669 100644
@@ -1,2 +1,2 @@
-# From https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.13.1/src/SHA256SUMS
-sha256	5e4c1751339a76e7c772c0c04747488d7f8c98980b434dc846977e43117833ab	nspr-4.13.1.tar.gz
+# From https://ftp.mozilla.org/pub/nspr/releases/v4.14/src/SHA256SUMS
+sha256	64fc18826257403a9132240aa3c45193d577a84b08e96f7e7770a97c074d17d5	nspr-4.14.tar.gz
package/libnspr/libnspr.mk +1 -1
index 1fc82be0d4ff..c74b14ac333d 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBNSPR_VERSION = 4.13.1
+LIBNSPR_VERSION = 4.14
 LIBNSPR_SOURCE = nspr-$(LIBNSPR_VERSION).tar.gz
 LIBNSPR_SITE = https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$(LIBNSPR_VERSION)/src
 LIBNSPR_SUBDIR = nspr
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/2 libnss: security bump to version 3.30.2

CVE-2017-5461 - Out-of-bounds write in Base64 encoding in NSS. Might cause remote arbitrary code execution
(https://access.redhat.com/errata/RHSA-2017:1100).

CVE-2017-5462 - DRBG flaw in NSS

Drop 0001-cross-compile.patch and TARGET* variables. Upstream Makefile now allows override of CC, so use TARGET_CONFIGURE_OPTS instead.

Drop upstream 0003-it-uninitialized-fix.patch.

Renumber the remaining patch.

---
Backport note: depends on libnspr version 4.14

---
 package/libnss/0001-cross-compile.patch            | 48 ----------------------
 .../{0002-uclibc.patch => 0001-uclibc.patch}       |  0
 package/libnss/0003-it-uninitialized-fix.patch     | 24 -----------
 package/libnss/libnss.hash                         |  4 +-
 package/libnss/libnss.mk                           | 12 ++----
 5 files changed, 6 insertions(+), 82 deletions(-)
 delete mode 100644 package/libnss/0001-cross-compile.patch
 rename package/libnss/{0002-uclibc.patch => 0001-uclibc.patch} (100%)
 delete mode 100644 package/libnss/0003-it-uninitialized-fix.patch
package/libnss/0001-cross-compile.patch deleted +0 -48
deleted file mode 100644
index 31de71bc5add..000000000000
@@ -1,48 +0,0 @@
-This patch allows us to set a value for the cross compiler via TARGETCC without
-setting CC on the command line. CC is used for host tools as well as cross
-compiled code so we cannot define it on the command line without breaking
-the host tools build.
-
-[Gustavo: update for nss 3.16.1]
-[baruch: add OPTIMIZER handling]
-Signed-off-by: Will Newton <[email protected]>
-
-diff -Nuar nss-3.16.1-orig/nss/coreconf/Linux.mk nss-3.16.1/nss/coreconf/Linux.mk
---- nss-3.16.1-orig/nss/coreconf/Linux.mk	2014-05-02 06:27:18.000000000 +0300
-+++ nss-3.16.1/nss/coreconf/Linux.mk	2014-07-01 02:38:18.701480512 +0300
-@@ -16,9 +16,13 @@
- 	IMPL_STRATEGY = _PTH
- endif
- 
--CC			= gcc
--CCC			= g++
--RANLIB			= ranlib
-+TARGETCC		= gcc
-+TARGETCCC		= g++
-+TARGETRANLIB		= ranlib
-+
-+CC			= $(TARGETCC)
-+CCC			= $(TARGETCCC)
-+RANLIB			= $(TARGETRANLIB)
- 
- DEFAULT_COMPILER = gcc
- 
-@@ -125,6 +129,7 @@
- endif
- endif
- 
-+OPTIMIZER = $(TARGET_OPTIMIZER)
- 
- ifeq ($(USE_PTHREADS),1)
- OS_PTHREAD = -lpthread 
-diff -Nuar nss-3.16.1-orig/nss/coreconf/nsinstall/Makefile nss-3.16.1/nss/coreconf/nsinstall/Makefile
---- nss-3.16.1-orig/nss/coreconf/nsinstall/Makefile	2014-05-02 06:27:18.000000000 +0300
-+++ nss-3.16.1/nss/coreconf/nsinstall/Makefile	2014-07-01 02:38:48.102185011 +0300
-@@ -31,6 +31,7 @@
- 
- ifdef NATIVE_FLAGS
- OS_CFLAGS=$(NATIVE_FLAGS)
-+OPTIMIZER=
- endif
- 
- include $(DEPTH)/coreconf/rules.mk
package/libnss/0001-uclibc.patch renamed from package/libnss/0002-uclibc.patch +0 -0
similarity index 100%
rename from package/libnss/0002-uclibc.patch
rename to package/libnss/0001-uclibc.patch
package/libnss/0003-it-uninitialized-fix.patch deleted +0 -24
deleted file mode 100644
index 7736c6a939c8..000000000000
@@ -1,24 +0,0 @@
-# HG changeset patch
-# User catdesk <[email protected]>
-# Date 1477710600 -7200
-#      Sat Oct 29 05:10:00 2016 +0200
-# Node ID b9ef971b94ab110302d49255339077bc1b4aed7f
-# Parent  eb8c96563cd70aa69d48b01516085f7d2fb46178
-Bug 1313846 - Declare 'it = NULL' earlier. r=franziskus
-
-[Thomas: patch taken from upstream mercurial repository, revision
-12791.]
-Signed-off-by: Thomas Petazzoni <[email protected]>
-
-diff -r eb8c96563cd7 -r b9ef971b94ab lib/jar/jarfile.c
---- a/nss/lib/jar/jarfile.c	Mon Oct 31 17:31:20 2016 +0100
-+++ b/nss/lib/jar/jarfile.c	Sat Oct 29 05:10:00 2016 +0200
-@@ -657,7 +657,7 @@
- jar_listzip(JAR *jar, JAR_FILE fp)
- {
-     ZZLink *ent;
--    JAR_Item *it;
-+    JAR_Item *it = NULL;
-     JAR_Physical *phy = NULL;
-     struct ZipLocal *Local = PORT_ZNew(struct ZipLocal);
-     struct ZipCentral *Central = PORT_ZNew(struct ZipCentral);
package/libnss/libnss.hash +2 -2
index 975e52d23850..7be7e48a6951 100644
@@ -1,2 +1,2 @@
-# From https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_27_2_RTM/src/SHA256SUMS
-sha256	dc8ac8524469d0230274fd13a53fdcd74efe4aa67205dde1a4a92be87dc28524	nss-3.27.2.tar.gz
+# From https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_30_2_RTM/src/SHA256SUMS
+sha256	0d4a77ff26bcee79fa8afe0125e0df6ae9e798b6b36782fa29e28febf7cfce24	nss-3.30.2.tar.gz
package/libnss/libnss.mk +4 -8
index d624cde09507..1e157df1df3c 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBNSS_VERSION = 3.27.2
+LIBNSS_VERSION = 3.30.2
 LIBNSS_SOURCE = nss-$(LIBNSS_VERSION).tar.gz
 LIBNSS_SITE = https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(subst .,_,$(LIBNSS_VERSION))_RTM/src
 LIBNSS_DISTDIR = dist
@@ -33,9 +33,6 @@ LIBNSS_BUILD_VARS = \
 	NSS_USE_SYSTEM_SQLITE=1 \
 	NSS_ENABLE_ECC=1 \
 	NATIVE_CC="$(HOSTCC)" \
-	TARGETCC="$(TARGET_CC)" \
-	TARGETCCC="$(TARGET_CXX)" \
-	TARGETRANLIB="$(TARGET_RANLIB)" \
 	OS_ARCH="Linux" \
 	OS_RELEASE="2.6" \
 	OS_TEST="$(ARCH)"
@@ -55,17 +52,16 @@ endif
 endif
 
 define LIBNSS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)/nss coreconf \
+	$(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D)/nss coreconf \
 		SOURCE_MD_DIR=$(@D)/$(LIBNSS_DISTDIR) \
 		DIST=$(@D)/$(LIBNSS_DISTDIR) \
 		CHECKLOC= \
 		$(LIBNSS_BUILD_VARS)
-	$(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)/nss lib/dbm all \
+	$(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D)/nss lib/dbm all \
 		SOURCE_MD_DIR=$(@D)/$(LIBNSS_DISTDIR) \
 		DIST=$(@D)/$(LIBNSS_DISTDIR) \
 		CHECKLOC= \
-		$(LIBNSS_BUILD_VARS) TARGET_OPTIMIZER="$(TARGET_CFLAGS)" \
-		NATIVE_FLAGS="$(HOST_CFLAGS)"
+		$(LIBNSS_BUILD_VARS) NATIVE_FLAGS="$(HOST_CFLAGS)"
 endef
 
 define LIBNSS_INSTALL_STAGING_CMDS
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/2 libnss: security bump to version 3.30.2

Hello,

Quoted 16 lines · Baruch Siach

CVE-2017-5461 - Out-of-bounds write in Base64 encoding in NSS. Might cause remote arbitrary code execution
(https://access.redhat.com/errata/RHSA-2017:1100).

CVE-2017-5462 - DRBG flaw in NSS

Drop 0001-cross-compile.patch and TARGET* variables. Upstream Makefile now allows override of CC, so use TARGET_CONFIGURE_OPTS instead.

Drop upstream 0003-it-uninitialized-fix.patch.

Renumber the remaining patch.

---
Backport note: depends on libnspr version 4.14

Quoted 10 lines
---
 package/libnss/0001-cross-compile.patch            | 48 ----------------------
 .../{0002-uclibc.patch => 0001-uclibc.patch}       |  0
 package/libnss/0003-it-uninitialized-fix.patch     | 24 -----------
 package/libnss/libnss.hash                         |  4 +-
 package/libnss/libnss.mk                           | 12 ++----
 5 files changed, 6 insertions(+), 82 deletions(-)
 delete mode 100644 package/libnss/0001-cross-compile.patch
 rename package/libnss/{0002-uclibc.patch => 0001-uclibc.patch} (100%)
 delete mode 100644 package/libnss/0003-it-uninitialized-fix.patch

Applied to master, thanks.

Peter: we want this patch for the LTS branch. Baruch, can you comment on whether PATCH 1/2 is also needed for the libnss security bump?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 2/2 libnss: security bump to version 3.30.2

Hi Thomas,

Quoted 28 lines · Thomas Petazzoni
Quoted 16 lines · Baruch Siach

CVE-2017-5461 - Out-of-bounds write in Base64 encoding in NSS. Might cause remote arbitrary code execution
(https://access.redhat.com/errata/RHSA-2017:1100).

CVE-2017-5462 - DRBG flaw in NSS

Drop 0001-cross-compile.patch and TARGET* variables. Upstream Makefile now allows override of CC, so use TARGET_CONFIGURE_OPTS instead.

Drop upstream 0003-it-uninitialized-fix.patch.

Renumber the remaining patch.

---
Backport note: depends on libnspr version 4.14

Quoted 10 lines
---
 package/libnss/0001-cross-compile.patch            | 48 ----------------------
 .../{0002-uclibc.patch => 0001-uclibc.patch}       |  0
 package/libnss/0003-it-uninitialized-fix.patch     | 24 -----------
 package/libnss/libnss.hash                         |  4 +-
 package/libnss/libnss.mk                           | 12 ++----
 5 files changed, 6 insertions(+), 82 deletions(-)
 delete mode 100644 package/libnss/0001-cross-compile.patch
 rename package/libnss/{0002-uclibc.patch => 0001-uclibc.patch} (100%)
 delete mode 100644 package/libnss/0003-it-uninitialized-fix.patch
Quoted 4 lines

Applied to master, thanks.

Peter: we want this patch for the LTS branch. Baruch, can you comment on whether PATCH 1/2 is also needed for the libnss security bump?

As I noted in the backport note above, this NSS version needs libnspr version 4.14, so PATCH 1/2 is prerequisite for this bump.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#4 lore raw

PATCH 2/2 libnss: security bump to version 3.30.2

In reply to Baruch Siach
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

CVE-2017-5461 - Out-of-bounds write in Base64 encoding in NSS. Might cause remote arbitrary code execution
(https://access.redhat.com/errata/RHSA-2017:1100).

CVE-2017-5462 - DRBG flaw in NSS

Drop 0001-cross-compile.patch and TARGET* variables. Upstream Makefile now allows override of CC, so use TARGET_CONFIGURE_OPTS instead.

Quoted 7 lines

Drop upstream 0003-it-uninitialized-fix.patch.

Renumber the remaining patch.

---
Backport note: depends on libnspr version 4.14

Committed to 2017.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 1/2 libnspr: bump to version 4.14

In reply to Baruch Siach

Hello,

Quoted 5 lines · Baruch Siach
---
 package/libnspr/libnspr.hash | 4 ++--
 package/libnspr/libnspr.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com