Tue Sep 8 10:36:27 2009 UTC ()
Fix an abort() caused by miscalculating the size of an internal buffer.
This can crash applications using "libspf2" (e.g. "milter-greylist")
in an e-mail gets delivered via SMTP over IPv6 depending on the
remote machine's IPv6 address.


(tron)
diff -r1.6 -r1.7 pkgsrc/mail/libspf2/Makefile
diff -r1.3 -r1.4 pkgsrc/mail/libspf2/distinfo
diff -r0 -r1.1 pkgsrc/mail/libspf2/patches/patch-aa

cvs diff -r1.6 -r1.7 pkgsrc/mail/libspf2/Makefile (expand / switch to unified diff)

--- pkgsrc/mail/libspf2/Makefile 2009/07/17 18:00:18 1.6
+++ pkgsrc/mail/libspf2/Makefile 2009/09/08 10:36:27 1.7
@@ -1,16 +1,17 @@ @@ -1,16 +1,17 @@
1# $NetBSD: Makefile,v 1.6 2009/07/17 18:00:18 adrianp Exp $ 1# $NetBSD: Makefile,v 1.7 2009/09/08 10:36:27 tron Exp $
2 2
3DISTNAME= libspf2-1.2.9 3DISTNAME= libspf2-1.2.9
 4PKGREVISION= 1
4CATEGORIES= mail 5CATEGORIES= mail
5MASTER_SITES= http://www.libspf2.org/spf/ 6MASTER_SITES= http://www.libspf2.org/spf/
6 7
7MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
8HOMEPAGE= http://www.libspf2.org/ 9HOMEPAGE= http://www.libspf2.org/
9COMMENT= Implementation of the Sender Policy Framework 10COMMENT= Implementation of the Sender Policy Framework
10 11
11PKG_DESTDIR_SUPPORT= user-destdir 12PKG_DESTDIR_SUPPORT= user-destdir
12 13
13GNU_CONFIGURE= YES 14GNU_CONFIGURE= YES
14USE_LIBTOOL= YES 15USE_LIBTOOL= YES
15 16
16CONFLICTS+= libspf_alt-* 17CONFLICTS+= libspf_alt-*

cvs diff -r1.3 -r1.4 pkgsrc/mail/libspf2/distinfo (expand / switch to unified diff)

--- pkgsrc/mail/libspf2/distinfo 2009/01/10 23:34:13 1.3
+++ pkgsrc/mail/libspf2/distinfo 2009/09/08 10:36:27 1.4
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
1$NetBSD: distinfo,v 1.3 2009/01/10 23:34:13 adrianp Exp $ 1$NetBSD: distinfo,v 1.4 2009/09/08 10:36:27 tron Exp $
2 2
3SHA1 (libspf2-1.2.9.tar.gz) = 15dfe3b9172180654f4de4dd85f3f01e3bc11503 3SHA1 (libspf2-1.2.9.tar.gz) = 15dfe3b9172180654f4de4dd85f3f01e3bc11503
4RMD160 (libspf2-1.2.9.tar.gz) = d0754d47e297a00038e4185e17704a24d38a4888 4RMD160 (libspf2-1.2.9.tar.gz) = d0754d47e297a00038e4185e17704a24d38a4888
5Size (libspf2-1.2.9.tar.gz) = 518001 bytes 5Size (libspf2-1.2.9.tar.gz) = 518001 bytes
 6SHA1 (patch-aa) = 81f60333222b510cb511b80aedbb679d2212ab0d

File Added: pkgsrc/mail/libspf2/patches/Attic/patch-aa
$NetBSD: patch-aa,v 1.1 2009/09/08 10:36:27 tron Exp $

Fix an abort() caused by miscalculating the size of an internal buffer.
This can crash applications using "libspf2" (e.g. "milter-greylist")
in an e-mail gets delivered via SMTP over IPv6 depending on the
remote machine's IPv6 address.

--- src/libspf2/spf_expand.c.orig	2008-11-03 21:29:00.000000000 +0000
+++ src/libspf2/spf_expand.c	2009-09-08 11:27:52.000000000 +0100
@@ -245,7 +245,7 @@
 		case PARM_CLIENT_IP:		/* SMTP client IP				*/
 #ifdef COMPUTE
 			if (compute_length) {
-				len = sizeof(ip6_buf);
+				len = sizeof(ip6_rbuf);
 				if (d->dv.url_encode)
 					len *= 3;
 				buflen += len;