diff options
Diffstat (limited to 'app-crypt/mhash/files')
12 files changed, 76 insertions, 27 deletions
diff --git a/app-crypt/mhash/files/mhash-0.9.9-autotools-namespace-stomping.patch b/app-crypt/mhash/files/mhash-0.9.9-autotools-namespace-stomping.patch index 19981b6b9072..4bccf6765ae0 100644 --- a/app-crypt/mhash/files/mhash-0.9.9-autotools-namespace-stomping.patch +++ b/app-crypt/mhash/files/mhash-0.9.9-autotools-namespace-stomping.patch @@ -7,9 +7,8 @@ Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=221093 Patch-URL: http://bugs.gentoo.org/attachment.cgi?id=152625&action=view Signed-off-by: Peter Alfredson <loki_val@gentoo.org> -diff -NrU5 mhash-0.9.9.orig/configure.in mhash-0.9.9/configure.in ---- mhash-0.9.9.orig/configure.in 2008-05-09 16:17:52.000000000 +0200 -+++ mhash-0.9.9/configure.in 2008-05-09 16:18:20.000000000 +0200 +--- a/configure.in ++++ b/configure.in @@ -4,10 +4,11 @@ AC_CANONICAL_TARGET AC_CONFIG_SRCDIR([lib/mhash.c]) @@ -22,9 +21,8 @@ diff -NrU5 mhash-0.9.9.orig/configure.in mhash-0.9.9/configure.in dnl Check system. -diff -NrU5 mhash-0.9.9.orig/include/mutils/config.h.in mhash-0.9.9/include/mutils/config.h.in ---- mhash-0.9.9.orig/include/mutils/config.h.in 1970-01-01 01:00:00.000000000 +0100 -+++ mhash-0.9.9/include/mutils/config.h.in 2008-05-09 16:18:20.000000000 +0200 +--- a/include/mutils/config.h.in ++++ b/include/mutils/config.h.in @@ -0,0 +1,22 @@ +/* Name of package */ +#undef PACKAGE @@ -48,9 +46,8 @@ diff -NrU5 mhash-0.9.9.orig/include/mutils/config.h.in mhash-0.9.9/include/mutil +#undef VERSION + + -diff -NrU5 mhash-0.9.9.orig/include/mutils/mhash_config.h.in mhash-0.9.9/include/mutils/mhash_config.h.in ---- mhash-0.9.9.orig/include/mutils/mhash_config.h.in 2008-05-09 16:17:52.000000000 +0200 -+++ mhash-0.9.9/include/mutils/mhash_config.h.in 2008-05-09 16:19:17.000000000 +0200 +--- a/include/mutils/mhash_config.h.in ++++ b/include/mutils/mhash_config.h.in @@ -179,28 +179,10 @@ #undef MHASH_VERSION diff --git a/app-crypt/mhash/files/mhash-0.9.9-fix-mem-leak.patch b/app-crypt/mhash/files/mhash-0.9.9-fix-mem-leak.patch index 74552499501f..f6083eb180f5 100644 --- a/app-crypt/mhash/files/mhash-0.9.9-fix-mem-leak.patch +++ b/app-crypt/mhash/files/mhash-0.9.9-fix-mem-leak.patch @@ -14,8 +14,8 @@ Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=255006 Patch-URL: http://bugs.gentoo.org/attachment.cgi?id=178560 Signed-off-by: Thomas Harning <harningt@gmail.com> ---- mhash-0.9.9/lib/mhash.c 2007-02-21 01:18:46.000000000 -0500 -+++ mhash-0.9.9-new/lib/mhash.c 2009-01-15 01:57:53.000000000 -0500 +--- a/lib/mhash.c ++++ b/lib/mhash.c @@ -719,6 +719,8 @@ mutils_memcpy( &ret->state_size, &mem[pos], sizeof(ret->state_size)); pos += sizeof( ret->state_size); diff --git a/app-crypt/mhash/files/mhash-0.9.9-fix-snefru-segfault.patch b/app-crypt/mhash/files/mhash-0.9.9-fix-snefru-segfault.patch index c308269c1b24..6e9e0275b025 100644 --- a/app-crypt/mhash/files/mhash-0.9.9-fix-snefru-segfault.patch +++ b/app-crypt/mhash/files/mhash-0.9.9-fix-snefru-segfault.patch @@ -14,8 +14,8 @@ Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=255131 Patch-URL: http://bugs.gentoo.org/attachment.cgi?id=178666&action=view Signed-off-by: Thomas Harning <harningt@gmail.com> ---- mhash-0.9.9/lib/snefru.c 2009-01-16 00:16:04.000000000 -0500 -+++ mhash-0.9.9-new/lib/snefru.c 2009-01-16 00:16:21.000000000 -0500 +--- a/lib/snefru.c ++++ b/lib/snefru.c @@ -859,6 +859,8 @@ { mutils_word32 i; diff --git a/app-crypt/mhash/files/mhash-0.9.9-fix-whirlpool-segfault.patch b/app-crypt/mhash/files/mhash-0.9.9-fix-whirlpool-segfault.patch index 6c79139d5793..8437e624b2ee 100644 --- a/app-crypt/mhash/files/mhash-0.9.9-fix-whirlpool-segfault.patch +++ b/app-crypt/mhash/files/mhash-0.9.9-fix-whirlpool-segfault.patch @@ -14,8 +14,8 @@ Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=255131 Patch-URL: http://bugs.gentoo.org/attachment.cgi?id=178667&action=view Signed-off-by: Thomas Harning <harningt@gmail.com> ---- mhash-0.9.9/lib/whirlpool.c 2006-01-08 03:14:47.000000000 -0500 -+++ mhash-0.9.9-new/lib/whirlpool.c 2009-01-16 00:17:34.000000000 -0500 +--- a/lib/whirlpool.c ++++ b/lib/whirlpool.c @@ -970,6 +970,8 @@ mutils_word8 * digest) { diff --git a/app-crypt/mhash/files/mhash-0.9.9.9-align.patch b/app-crypt/mhash/files/mhash-0.9.9.9-align.patch index 04bb310aa772..81486034cb6a 100644 --- a/app-crypt/mhash/files/mhash-0.9.9.9-align.patch +++ b/app-crypt/mhash/files/mhash-0.9.9.9-align.patch @@ -1,6 +1,5 @@ -diff -up mhash-0.9.9.9/lib/stdfns.c.BAD mhash-0.9.9.9/lib/stdfns.c ---- mhash-0.9.9.9/lib/stdfns.c.BAD 2009-07-02 16:38:43.217029623 -0400 -+++ mhash-0.9.9.9/lib/stdfns.c 2009-07-02 16:41:58.647120391 -0400 +--- a/lib/stdfns.c ++++ b/lib/stdfns.c @@ -152,6 +152,18 @@ mutils_bzero(void *s, __const mutils_wor } } diff --git a/app-crypt/mhash/files/mhash-0.9.9.9-alignment.patch b/app-crypt/mhash/files/mhash-0.9.9.9-alignment.patch index 04df22167a3f..0df89bc84865 100644 --- a/app-crypt/mhash/files/mhash-0.9.9.9-alignment.patch +++ b/app-crypt/mhash/files/mhash-0.9.9.9-alignment.patch @@ -1,6 +1,5 @@ -diff -up mhash-0.9.9.9/lib/stdfns.c.BAD mhash-0.9.9.9/lib/stdfns.c ---- mhash-0.9.9.9/lib/stdfns.c.BAD 2009-07-21 12:05:40.139461097 -0400 -+++ mhash-0.9.9.9/lib/stdfns.c 2009-07-21 12:06:52.151190927 -0400 +--- a/lib/stdfns.c ++++ b/lib/stdfns.c @@ -378,6 +378,12 @@ mutils_memmove(void *dest, __const void bigptr1 = (mutils_word32 *) dest; bigptr2 = (mutils_word32 *) src; diff --git a/app-crypt/mhash/files/mhash-0.9.9.9-cast-temp-64bit.patch b/app-crypt/mhash/files/mhash-0.9.9.9-cast-temp-64bit.patch new file mode 100644 index 000000000000..3b173f8072cb --- /dev/null +++ b/app-crypt/mhash/files/mhash-0.9.9.9-cast-temp-64bit.patch @@ -0,0 +1,13 @@ +diff --git a/lib/tiger.c b/lib/tiger.c +index 8f15df4..8d28f27 100644 +--- a/lib/tiger.c ++++ b/lib/tiger.c +@@ -254,7 +254,7 @@ void tiger_final(struct tiger_ctx *ctx) + register mutils_word64 i, j; + /* Force 64-bit alignment */ + mutils_word64 temp_64bit[TIGER_DATASIZE/8]; +- mutils_word8 *temp = temp_64bit; ++ mutils_word8 *temp = (mutils_word8 *) temp_64bit; + i = ctx->index; + + #if defined(WORDS_BIGENDIAN) diff --git a/app-crypt/mhash/files/mhash-0.9.9.9-force64bit-tiger.patch b/app-crypt/mhash/files/mhash-0.9.9.9-force64bit-tiger.patch index 2248bcc6a308..08f18d458285 100644 --- a/app-crypt/mhash/files/mhash-0.9.9.9-force64bit-tiger.patch +++ b/app-crypt/mhash/files/mhash-0.9.9.9-force64bit-tiger.patch @@ -1,6 +1,5 @@ -diff -up mhash-0.9.9.9/lib/tiger.c.BAD mhash-0.9.9.9/lib/tiger.c ---- mhash-0.9.9.9/lib/tiger.c.BAD 2009-07-02 16:42:47.683029940 -0400 -+++ mhash-0.9.9.9/lib/tiger.c 2009-07-02 16:43:46.085049317 -0400 +--- a/lib/tiger.c ++++ b/lib/tiger.c @@ -252,7 +252,9 @@ void tiger_update(struct tiger_ctx *ctx, void tiger_final(struct tiger_ctx *ctx) { diff --git a/app-crypt/mhash/files/mhash-0.9.9.9-hmac-uaf-test.patch b/app-crypt/mhash/files/mhash-0.9.9.9-hmac-uaf-test.patch new file mode 100644 index 000000000000..cd9b3c041891 --- /dev/null +++ b/app-crypt/mhash/files/mhash-0.9.9.9-hmac-uaf-test.patch @@ -0,0 +1,19 @@ +https://bugs.gentoo.org/914173 +https://sourceforge.net/p/mhash/patches/12/ +https://sourceforge.net/p/mhash/bugs/43/ + +Fixes a segfault due to use-after-free on x86 & ARM in the test suite. + +Index: mhash-0.9.9.9/src/hmac_test.c +=================================================================== +--- mhash-0.9.9.9/src/hmac_test.c ++++ mhash-0.9.9.9/src/hmac_test.c 2020-04-01 00:04:44.039815882 +0200 +@@ -76,8 +76,6 @@ + + /* Test No 2 */ + +- mutils_memset(tmp, 0, sizeof(tmp)); +- + passlen=sizeof(KEY2) - 1; + password = (mutils_word8 *) mutils_malloc(passlen+1); + mutils_memcpy(password, KEY2, passlen); diff --git a/app-crypt/mhash/files/mhash-0.9.9.9-no-malloc-check.patch b/app-crypt/mhash/files/mhash-0.9.9.9-no-malloc-check.patch new file mode 100644 index 000000000000..6da1f98ac785 --- /dev/null +++ b/app-crypt/mhash/files/mhash-0.9.9.9-no-malloc-check.patch @@ -0,0 +1,20 @@ +https://sourceforge.net/p/mhash/patches/11/ + +Compiling mhash-0.9.9.9 on platforms (like AIX) without GNU libc compatible malloc leads to undefined symbol rpl_malloc +when linking the in-mhash executables drver, frag_test, rest_test, hmac_test, keygen_test. + +Reason is that configure.in still contains AC_FUNC_MALLOC, detecting need +to "#define malloc rpl_malloc", while mhash does not provide a rpl_malloc implementation. + +As the only use of malloc() in lib/stdfns.c does not rely on GNU libc +compatible malloc actually, there is no need to check for one. +--- a/configure.in ++++ b/configure.in +@@ -64,7 +64,6 @@ AC_CHECK_HEADERS(signal.h stdint.h stdio.h stdlib.h string.h strings.h) + + dnl Checks for functions + +-AC_FUNC_MALLOC + AC_FUNC_MEMCMP + + AC_CHECK_FUNCS(bcopy bzero) diff --git a/app-crypt/mhash/files/mhash-0.9.9.9-remove_premature_free.patch b/app-crypt/mhash/files/mhash-0.9.9.9-remove_premature_free.patch index 5ed4ecbe6292..f81ec66b6f9c 100644 --- a/app-crypt/mhash/files/mhash-0.9.9.9-remove_premature_free.patch +++ b/app-crypt/mhash/files/mhash-0.9.9.9-remove_premature_free.patch @@ -1,6 +1,5 @@ -diff -ru mhash-0.9.9.9.orig/src/keygen_test.c mhash-0.9.9.9/src/keygen_test.c ---- mhash-0.9.9.9.orig/src/keygen_test.c 2007-02-21 07:39:08.000000000 +0100 -+++ mhash-0.9.9.9/src/keygen_test.c 2009-12-04 01:29:16.000000000 +0100 +--- a/src/keygen_test.c ++++ b/src/keygen_test.c @@ -121,8 +121,6 @@ mhash_keygen_ext(KEYGEN_S2K_SALTED, data, key, keysize, password, passlen); diff --git a/app-crypt/mhash/files/mhash.pc b/app-crypt/mhash/files/mhash.pc new file mode 100644 index 000000000000..6186f85c7839 --- /dev/null +++ b/app-crypt/mhash/files/mhash.pc @@ -0,0 +1,4 @@ +Libs:-lmhash +Name: mhash +Version: @VERSION@ +Description: provides a uniform interface to several hash algorithms |