FreeBSD Bugzilla – Attachment 91014 Details for
Bug 128298
Security: mail/libspf2, mail/libspf2-10 buffer overflow
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
libspf2.diff
libspf2.diff (text/x-patch; type=patch; charset=US-ASCII), 10.71 KB, created by
Hajimu UMEMOTO
on 2008-10-24 10:31:40 UTC
(
hide
)
Description:
libspf2.diff
Filename:
MIME Type:
Creator:
Hajimu UMEMOTO
Created:
2008-10-24 10:31:40 UTC
Size:
10.71 KB
patch
obsolete
>diff -urpN /usr/ports/mail/libspf2/Makefile libspf2/Makefile >--- /usr/ports/mail/libspf2/Makefile Fri Aug 22 03:52:12 2008 >+++ libspf2/Makefile Fri Oct 24 11:47:44 2008 >@@ -6,8 +6,8 @@ > # > > PORTNAME= libspf2 >-PORTVERSION= 1.2.5 >-PORTREVISION= 3 >+PORTVERSION= 1.2.8 >+#PORTREVISION= 0 > CATEGORIES= mail > MASTER_SITES= http://www.libspf2.org/%SUBDIR%/ > MASTER_SITE_SUBDIR= spf >diff -urpN /usr/ports/mail/libspf2/distinfo libspf2/distinfo >--- /usr/ports/mail/libspf2/distinfo Thu Nov 10 00:33:28 2005 >+++ libspf2/distinfo Fri Oct 24 11:49:34 2008 >@@ -1,3 +1,3 @@ >-MD5 (libspf2-1.2.5.tar.gz) = 06ed6a3b0b54c8590679315ae2d28ad9 >-SHA256 (libspf2-1.2.5.tar.gz) = 879410f87ab4ffd575b1d8149167de6d5eee751199debc039efcc1558c7d0ecb >-SIZE (libspf2-1.2.5.tar.gz) = 517945 >+MD5 (libspf2-1.2.8.tar.gz) = 824d62a83e76108f8e21a39e1ae2ad62 >+SHA256 (libspf2-1.2.8.tar.gz) = 3b1cc6c891451b97b094b3e3b40348a952048a4d27ca16c0e50d0fb53938e07f >+SIZE (libspf2-1.2.8.tar.gz) = 575270 >diff -urpN /usr/ports/mail/libspf2/files/patch-RFC4408-DOS libspf2/files/patch-RFC4408-DOS >--- /usr/ports/mail/libspf2/files/patch-RFC4408-DOS Mon Feb 11 23:49:20 2008 >+++ libspf2/files/patch-RFC4408-DOS Thu Jan 1 09:00:00 1970 >@@ -1,49 +0,0 @@ >---- src/include/spf.h.orig 2008-02-10 11:30:04.000000000 -0200 >-+++ src/include/spf.h 2008-02-10 11:30:20.000000000 -0200 >-@@ -52,8 +52,8 @@ >- >- /* FYI only -- defaults can't be changed without recompiling the library */ >- #define SPF_DEFAULT_MAX_DNS_MECH 10 /* DoS limit on SPF mechanisms */ >--#define SPF_DEFAULT_MAX_DNS_PTR 5 /* DoS limit on PTR records */ >--#define SPF_DEFAULT_MAX_DNS_MX 5 /* DoS limit on MX records */ >-+#define SPF_DEFAULT_MAX_DNS_PTR 10 /* DoS limit on PTR records */ >-+#define SPF_DEFAULT_MAX_DNS_MX 10 /* DoS limit on MX records */ >- #define SPF_DEFAULT_SANITIZE 1 >- #define SPF_DEFAULT_WHITELIST "include:spf.trusted-forwarder.org" >- #define SPF_EXP_MOD_NAME "exp-text" >---- src/include/spf_internal.h.orig 2008-02-10 11:30:28.000000000 -0200 >-+++ src/include/spf_internal.h 2008-02-10 11:31:26.000000000 -0200 >-@@ -57,13 +57,13 @@ >- /* It is a bad idea to change this for the same reasons as mentioned >- * above for SPF_MAX_DNS_MECH >- */ >--#define SPF_MAX_DNS_PTR 5 >-+#define SPF_MAX_DNS_PTR 10 >- #endif >- #ifndef SPF_MAX_DNS_MX >- /* It is a bad idea to change this for the same reasons as mentioned >- * above for SPF_MAX_DNS_MECH >- */ >--#define SPF_MAX_DNS_MX 5 >-+#define SPF_MAX_DNS_MX 10 >- #endif >- >- #if 1 >---- src/include/spf_server.h.orig 2008-02-10 11:31:38.000000000 -0200 >-+++ src/include/spf_server.h 2008-02-10 11:31:55.000000000 -0200 >-@@ -43,13 +43,13 @@ >- /* It is a bad idea to change this for the same reasons as mentioned >- * above for SPF_MAX_DNS_MECH >- */ >--#define SPF_MAX_DNS_PTR 5 >-+#define SPF_MAX_DNS_PTR 10 >- #endif >- #ifndef SPF_MAX_DNS_MX >- /* It is a bad idea to change this for the same reasons as mentioned >- * above for SPF_MAX_DNS_MECH >- */ >--#define SPF_MAX_DNS_MX 5 >-+#define SPF_MAX_DNS_MX 10 >- #endif >- >- struct SPF_server_struct { >diff -urpN /usr/ports/mail/libspf2/files/patch-configure libspf2/files/patch-configure >--- /usr/ports/mail/libspf2/files/patch-configure Mon Oct 17 18:38:39 2005 >+++ libspf2/files/patch-configure Thu Jan 1 09:00:00 1970 >@@ -1,15 +0,0 @@ >---- configure.orig Wed Feb 23 23:14:51 2005 >-+++ configure Thu Jul 28 20:12:32 2005 >-@@ -23661,12 +23661,6 @@ >- cat >>conftest.$ac_ext <<_ACEOF >- /* end confdefs.h. */ >- >-- #ifdef HAVE_SYS_SOCKET_H >-- # include <sys/socket.h> /* inet_ functions / structs */ >-- #endif >-- #ifdef HAVE_NETINET_IN_H >-- # include <netinet/in.h> /* inet_ functions / structs */ >-- #endif >- #ifdef HAVE_ARPA_NAMESER_H >- # include <arpa/nameser.h> /* DNS HEADER struct */ >- #endif >diff -urpN /usr/ports/mail/libspf2/files/patch-src__libspf2__spf_interpret.c libspf2/files/patch-src__libspf2__spf_interpret.c >--- /usr/ports/mail/libspf2/files/patch-src__libspf2__spf_interpret.c Wed Dec 13 11:57:08 2006 >+++ libspf2/files/patch-src__libspf2__spf_interpret.c Thu Jan 1 09:00:00 1970 >@@ -1,13 +0,0 @@ >---- src/libspf2/spf_interpret.c.orig Wed Dec 13 00:46:58 2006 >-+++ src/libspf2/spf_interpret.c Wed Dec 13 00:47:23 2006 >-@@ -49,8 +49,8 @@ >- SPF_record_t *spf_record; >- SPF_errcode_t err; >- char *buf; >-- int buflen; >-- int len; >-+ size_t buflen; >-+ size_t len; >- >- SPF_ASSERT_NOTNULL(spf_response); >- spf_request = spf_response->spf_request; >diff -urpN /usr/ports/mail/libspf2/files/patch-src_include_spf__server.h libspf2/files/patch-src_include_spf__server.h >--- /usr/ports/mail/libspf2/files/patch-src_include_spf__server.h Mon Sep 12 06:26:39 2005 >+++ libspf2/files/patch-src_include_spf__server.h Thu Jan 1 09:00:00 1970 >@@ -1,10 +0,0 @@ >---- src/include/spf_server.h.orig Thu Jul 28 18:35:53 2005 >-+++ src/include/spf_server.h Thu Jul 28 18:35:59 2005 >-@@ -20,7 +20,6 @@ >- >- #include "spf_record.h" >- #include "spf_dns.h" >--#include "spf_dns_internal.h" >- >- #ifndef SPF_MAX_DNS_MECH >- /* It is a bad idea to change this for two reasons. >diff -urpN /usr/ports/mail/libspf2/files/patch-src_libspf2_spf__dns__resolv.c libspf2/files/patch-src_libspf2_spf__dns__resolv.c >--- /usr/ports/mail/libspf2/files/patch-src_libspf2_spf__dns__resolv.c Wed Dec 13 14:42:39 2006 >+++ libspf2/files/patch-src_libspf2_spf__dns__resolv.c Fri Oct 24 12:21:16 2008 >@@ -1,15 +1,8 @@ > Index: src/libspf2/spf_dns_resolv.c > diff -u -p src/libspf2/spf_dns_resolv.c.orig src/libspf2/spf_dns_resolv.c >---- src/libspf2/spf_dns_resolv.c.orig Sat Feb 19 11:38:12 2005 >-+++ src/libspf2/spf_dns_resolv.c Mon Jul 31 14:02:57 2006 >-@@ -71,13 +71,18 @@ typedef struct >- # define SPF_h_errno h_errno >- #endif >- >-+#if HAVE_DECL_RES_NINIT >- static pthread_once_t res_state_control = PTHREAD_ONCE_INIT; >- static pthread_key_t res_state_key; >- >+--- src/libspf2/spf_dns_resolv.c.orig Thu Oct 16 07:02:03 2008 >++++ src/libspf2/spf_dns_resolv.c Fri Oct 24 12:19:29 2008 >+@@ -92,7 +92,11 @@ static pthread_key_t res_state_key; > static void > SPF_dns_resolv_thread_term(void *arg) > { >@@ -21,82 +14,12 @@ diff -u -p src/libspf2/spf_dns_resolv.c. > free(arg); > } > >-@@ -86,6 +91,7 @@ SPF_dns_resolv_init_key() >- { >- pthread_key_create(&res_state_key, SPF_dns_resolv_thread_term); >- } >-+#endif >- >- >- #if 0 >-@@ -130,8 +136,10 @@ SPF_dns_resolv_lookup(SPF_dns_server_t * >- int rdlen; >- const u_char *rdata, *rdata_end; >- >-+#if HAVE_DECL_RES_NINIT >- void *res_spec; >- struct __res_state *res_state; >-+#endif >- >- SPF_ASSERT_NOTNULL(spf_dns_server); >- >-@@ -140,10 +148,15 @@ SPF_dns_resolv_lookup(SPF_dns_server_t * >- SPF_ASSERT_NOTNULL(spfhook); >- #endif >- >-+#if HAVE_DECL_RES_NINIT >- res_spec = pthread_getspecific(res_state_key); >- if (res_spec == NULL) { >- res_state = (struct __res_state *) >- malloc(sizeof(struct __res_state)); >-+ if (res_state == NULL) { >-+ SPF_error("Failed to call malloc()"); >-+ } >-+ memset(res_state, 0, sizeof(*res_state)); >- if (res_ninit(res_state) != 0) { >- SPF_error("Failed to call res_ninit()"); >- } >-@@ -152,6 +165,11 @@ SPF_dns_resolv_lookup(SPF_dns_server_t * >- else { >- res_state = (struct __res_state *)res_spec; >- } >-+#else >-+ if ((_res.options & RES_INIT) == 0 && res_init() != 0) { >-+ SPF_error("Failed to call res_init()"); >-+ } >-+#endif >- >- /* >- * try resolving the name >-@@ -486,7 +504,9 @@ SPF_dns_resolv_new(SPF_dns_server_t *lay >- SPF_dns_resolv_config_t *spfhook; >- #endif >- >-+#if HAVE_DECL_RES_NINIT >+@@ -615,7 +619,7 @@ SPF_dns_resolv_new(SPF_dns_server_t *lay >+ #if HAVE_DECL_RES_NINIT > pthread_once(&res_state_control, SPF_dns_resolv_init_key); >-+#endif >- >- spf_dns_server = malloc(sizeof(SPF_dns_server_t)); >- if ( spf_dns_server == NULL ) >-@@ -517,19 +537,19 @@ SPF_dns_resolv_new(SPF_dns_server_t *lay >- spfhook = SPF_voidp2spfhook( spf_dns_server->hook ); >- #endif >- >--#if HAVE_DECL_RES_NINIT >- #if 0 >-+#if HAVE_DECL_RES_NINIT >- if ( res_ninit( &spfhook->res_state ) != 0 ) { >- free(spfhook); >- free(spf_dns_server); >- return NULL; >- } >--#endif > #else >- if ( res_init() != 0 ) { >- free( spf_dns_server ); >+- if ( res_init() != 0 ) { >++ if ((_res.options & RES_INIT) == 0 && res_init() != 0) { >+ perror("res_init"); > return NULL; >- } >-+#endif >- #endif >- >- return spf_dns_server; >+ } >diff -urpN /usr/ports/mail/libspf2/files/patch-src_spf__example_spf__example.c libspf2/files/patch-src_spf__example_spf__example.c >--- /usr/ports/mail/libspf2/files/patch-src_spf__example_spf__example.c Mon Sep 12 06:26:39 2005 >+++ libspf2/files/patch-src_spf__example_spf__example.c Fri Oct 24 12:56:07 2008 >@@ -1,34 +1,5 @@ > --- src/spf_example/spf_example.c.orig Mon Mar 28 14:17:20 2005 > +++ src/spf_example/spf_example.c Mon Mar 28 14:22:46 2005 >-@@ -90,17 +90,17 @@ >- "\n" >- "Valid data options are:\n" >- " -i <IP address> The IP address that is sending email\n" >-- " -s <email address> The email address used as the\n" >-- " envelope-from. If no username (local\n" >-- " part) is given, 'postmaster' will be\n" >-- " assumed.\n" >-- " -r <email address> [optional] The email address used as\n" >-- " the envelope-to email address, for\n" >-- " secondary-MX checking.\n" >-- " -h <domain name> The domain name given on the SMTP HELO\n" >-- " command. This is only needed if the\n" >-- " -sender option is not given.\n" >-- " -d [debug level] debug level.\n" >-+ " -s <email address> The email address used as the\n" >-+ " envelope-from. If no username (local\n" >-+ " part) is given, 'postmaster' will be\n" >-+ " assumed.\n" >-+ " -r <email address> [optional] The email address used as\n" >-+ " the envelope-to email address, for\n" >-+ " secondary-MX checking.\n" >-+ " -h <domain name> The domain name given on the SMTP HELO\n" >-+ " command. This is only needed if the\n" >-+ " -sender option is not given.\n" >-+ " -d [debug level] debug level.\n" >- ); >- } >- > @@ -206,7 +206,7 @@ > * destroyed when you are finished. > */ >diff -urpN /usr/ports/mail/libspf2/files/patch-src_spfquery_spfquery.c libspf2/files/patch-src_spfquery_spfquery.c >--- /usr/ports/mail/libspf2/files/patch-src_spfquery_spfquery.c Mon Sep 12 06:26:39 2005 >+++ libspf2/files/patch-src_spfquery_spfquery.c Thu Jan 1 09:00:00 1970 >@@ -1,11 +0,0 @@ >---- src/spfquery/spfquery.c.orig Thu Jul 28 19:04:46 2005 >-+++ src/spfquery/spfquery.c Thu Jul 28 19:04:54 2005 >-@@ -261,7 +261,7 @@ >- response_print_errors(const char *context, >- SPF_response_t *spf_response, SPF_errcode_t err) >- { >-- SPF_error_t *spf_error;; >-+ SPF_error_t *spf_error; >- int i; >- >- printf("StartError\n"); >diff -urpN /usr/ports/mail/libspf2/pkg-plist libspf2/pkg-plist >--- /usr/ports/mail/libspf2/pkg-plist Thu Feb 23 22:51:03 2006 >+++ libspf2/pkg-plist Fri Oct 24 13:02:03 2008 >@@ -24,4 +24,4 @@ include/spf2/spf_server.h > lib/libspf2.a > lib/libspf2.la > lib/libspf2.so >-lib/libspf2.so.2 >+lib/libspf2.so.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 128298
: 91014 |
91015