[nss-softokn] Fix a segmentation fault when signing on i686 that occurs in Rawhide
Elio Maldonado
emaldonado at fedoraproject.org
Sun Mar 2 20:30:29 UTC 2014
commit 567f7698e517bccbf694cb457e04f59214298775
Author: Elio Maldonado <emaldona at redhat.com>
Date: Sun Mar 2 12:29:32 2014 -0800
Fix a segmentation fault when signing on i686 that occurs in Rawhide
- Patch contributed by Stephan Bergmann
- Resolves: Bug 1071679 - Define -DMP_USE_UINT_DIGIT in lib/freebl/Makefile for Linux x86
mozbug-972450.patch | 22 ++++++++++++++++++++++
nss-softokn.spec | 16 +++++++++++++++-
2 files changed, 37 insertions(+), 1 deletions(-)
---
diff --git a/mozbug-972450.patch b/mozbug-972450.patch
new file mode 100644
index 0000000..5be84a1
--- /dev/null
+++ b/mozbug-972450.patch
@@ -0,0 +1,22 @@
+diff --git a/lib/freebl/Makefile b/lib/freebl/Makefile
+--- a/lib/freebl/Makefile
++++ b/lib/freebl/Makefile
+@@ -190,17 +190,17 @@ ifeq ($(CPU_ARCH),x86_64)
+ ASFILES += intel-aes.s intel-gcm.s
+ EXTRA_SRCS += intel-gcm-wrap.c
+ INTEL_GCM = 1
+ MPI_SRCS += mpi_amd64.c mp_comba.c
+ endif
+ ifeq ($(CPU_ARCH),x86)
+ ASFILES = mpi_x86.s
+ DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
+- DEFINES += -DMP_ASSEMBLY_DIV_2DX1D
++ DEFINES += -DMP_ASSEMBLY_DIV_2DX1D -DMP_USE_UINT_DIGIT
+ DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
+ # The floating point ECC code doesn't work on Linux x86 (bug 311432).
+ #ECL_USE_FP = 1
+ endif
+ ifeq ($(CPU_ARCH),arm)
+ DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
+ DEFINES += -DMP_USE_UINT_DIGIT
+ DEFINES += -DSHA_NO_LONG_LONG # avoid 64-bit arithmetic in SHA512
diff --git a/nss-softokn.spec b/nss-softokn.spec
index 677bf68..ec5f721 100644
--- a/nss-softokn.spec
+++ b/nss-softokn.spec
@@ -25,7 +25,7 @@
Summary: Network Security Services Softoken Module
Name: nss-softokn
Version: 3.15.5
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MPLv2.0
URL: http://www.mozilla.org/projects/security/pki/nss/
Group: System Environment/Libraries
@@ -71,6 +71,12 @@ Patch9: nss-versus-softoken-tests.patch
# NSSUTIL_INCLUDE_DIR, after all, contains both util and freebl headers.
# Once has been bootstapped the patch may be removed, but it doesn't hurt to keep it.
Patch10: iquote.patch
+# Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=972450
+# Define -DMP_USE_UINT_DIGIT for Linux x86 because mpi_x86.s
+# requires mp_digit to be an unsigned int. The MP_USE_UINT_DIGIT macro
+# ensures that. We were previously relying on ULLONG_MAX being undefined
+# in the compilation environment, which isn't true in C99 mode.
+Patch11: mozbug-972450.patch
%description
Network Security Services Softoken Cryptographic Module
@@ -125,6 +131,9 @@ Header and library files for doing development with Network Security Services.
%patch9 -p0 -b .cryptotests
# activate if needed when doing a major update with new apis
%patch10 -p0 -b .iquote
+pushd nss
+%patch11 -p1 -b .fixsegfault
+popd
%build
@@ -389,6 +398,11 @@ done
%{_includedir}/nss3/shsign.h
%changelog
+* Sun Mar 02 2014 Elio Maldonado <emaldona at redhat.com> - 3.15.5-2
+- Fix a segmentation fault when signing on i686 that occurs in Rawhide
+- Patch contributed by Stephan Bergmann
+- Resolves: Bug 1071679 - Define -DMP_USE_UINT_DIGIT in lib/freebl/Makefile for Linux x86
+
* Wed Feb 19 2014 Elio Maldonado <emaldona at redhat.com> - 3.15.5-1
- Update to nss-3.15.1 - Resolves: Bug 1066877
More information about the scm-commits
mailing list