diff options
-rw-r--r-- | libsodium-last.spec | 7 | ||||
-rw-r--r-- | libsodium-upstream.patch | 45 |
2 files changed, 52 insertions, 0 deletions
diff --git a/libsodium-last.spec b/libsodium-last.spec index 6d2f6b5..585b71c 100644 --- a/libsodium-last.spec +++ b/libsodium-last.spec @@ -15,6 +15,8 @@ License: ISC URL: http://libsodium.org/ Source0: http://download.libsodium.org/libsodium/releases/%{libname}-%{version}.tar.gz +Patch0: %{libname}-upstream.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -56,6 +58,9 @@ This package can't be installed with system %{libname}-devel. %prep %setup -q -n %{libname}-%{version} +%patch0 -p1 -b .upstream + + %build %configure --disable-static --disable-silent-rules make %{_smp_mflags} @@ -100,6 +105,8 @@ rm -rf %{buildroot} %changelog * Tue Oct 20 2015 Remi Collet <remi@fedoraproject.org> - 1.0.4-1 - update to 1.0.4 +- add upstream patch for segfault on RHEL-6 i386 + https://github.com/jedisct1/libsodium/issues/307 * Sat May 16 2015 Remi Collet <remi@fedoraproject.org> - 1.0.3-1 - update to 1.0.3 diff --git a/libsodium-upstream.patch b/libsodium-upstream.patch new file mode 100644 index 0000000..b4fa729 --- /dev/null +++ b/libsodium-upstream.patch @@ -0,0 +1,45 @@ +From 63b9c02f0c093d496edd2ebeb40e04b87813fea7 Mon Sep 17 00:00:00 2001 +From: Frank Denis <github@pureftpd.org> +Date: Tue, 20 Oct 2015 17:48:35 +0200 +Subject: [PATCH] Alignment + +--- + src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +index 31f12da..9177252 100644 +--- a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c ++++ b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +@@ -507,7 +507,6 @@ crypto_aead_aes256gcm_encrypt_afternm(unsigned char *c, unsigned long long *clen + const unsigned char *npub, + const crypto_aead_aes256gcm_state *ctx_) + { +- unsigned char H[16]; + const __m128i rev = _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); + const context *ctx = (const context *) ctx_; + const __m128i *rkeys = ctx->rkeys; +@@ -515,6 +514,7 @@ crypto_aead_aes256gcm_encrypt_afternm(unsigned char *c, unsigned long long *clen + unsigned long long i, j; + unsigned long long adlen_rnd64 = adlen & ~63ULL; + unsigned long long mlen_rnd128 = mlen & ~127ULL; ++ CRYPTO_ALIGN(16) unsigned char H[16]; + CRYPTO_ALIGN(16) unsigned char n2[16]; + CRYPTO_ALIGN(16) unsigned char T[16]; + CRYPTO_ALIGN(16) unsigned char accum[16]; +@@ -623,7 +623,6 @@ crypto_aead_aes256gcm_decrypt_afternm(unsigned char *m, unsigned long long *mlen + const unsigned char *npub, + const crypto_aead_aes256gcm_state *ctx_) + { +- unsigned char H[16]; + const __m128i rev = _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); + const context *ctx = (const context *) ctx_; + const __m128i *rkeys = ctx->rkeys; +@@ -632,6 +631,7 @@ crypto_aead_aes256gcm_decrypt_afternm(unsigned char *m, unsigned long long *mlen + unsigned long long adlen_rnd64 = adlen & ~63ULL; + unsigned long long mlen; + unsigned long long mlen_rnd128; ++ CRYPTO_ALIGN(16) unsigned char H[16]; + CRYPTO_ALIGN(16) unsigned char n2[16]; + CRYPTO_ALIGN(16) unsigned char T[16]; + CRYPTO_ALIGN(16) unsigned char accum[16]; |