Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Aug 2013 17:53:03 +0000 (UTC)
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r324678 - in branches/RELENG_9_2_0/security: polarssl polarssl/files vuxml
Message-ID:  <201308131753.r7DHr32K021009@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mandree
Date: Tue Aug 13 17:53:03 2013
New Revision: 324678
URL: http://svnweb.freebsd.org/changeset/ports/324678

Log:
  Merge from head: Security update to PolarSSL 1.2.8, and fix download.
  
  Announcement:
  https://polarssl.org/tech-updates/releases/polarssl-1.2.8-released
  
  Security advisory:
  https://polarssl.org/tech-updates/security-advisories/polarssl-security-advisory-2013-03
  
  Adds two include files to pkg-plist.
  
  PR:		ports/181252
  Approved by:	jase (maintainer)
  Approved by:	portmgr (bdrewery)
  Security:	72bf9e21-03df-11e3-bd8d-080027ef73ec
  Security:	CVE-2013-4623

Added:
  branches/RELENG_9_2_0/security/polarssl/files/fetchwrapper.sh
     - copied unchanged from r324675, head/security/polarssl/files/fetchwrapper.sh
Modified:
  branches/RELENG_9_2_0/security/polarssl/Makefile
  branches/RELENG_9_2_0/security/polarssl/distinfo
  branches/RELENG_9_2_0/security/polarssl/pkg-plist
  branches/RELENG_9_2_0/security/vuxml/vuln.xml
Directory Properties:
  branches/RELENG_9_2_0/   (props changed)

Modified: branches/RELENG_9_2_0/security/polarssl/Makefile
==============================================================================
--- branches/RELENG_9_2_0/security/polarssl/Makefile	Tue Aug 13 17:39:57 2013	(r324677)
+++ branches/RELENG_9_2_0/security/polarssl/Makefile	Tue Aug 13 17:53:03 2013	(r324678)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=	polarssl
-PORTVERSION=	1.2.7
+PORTVERSION=	1.2.8
 DISTVERSIONSUFFIX=	-gpl
 CATEGORIES=	security devel
 MASTER_SITES=	http://polarssl.org/download/
@@ -12,7 +12,10 @@ COMMENT=	Open Source embedded SSL/TLS cr
 
 LICENSE=	GPLv2
 
-FETCH_ARGS=	-pRr
+# bypass the HTML "now downloading..." splash site, code below
+# .include <bsd.port.pre.mk>
+URL_SUFFIX=	?do=yes
+FETCH_ARGS=	-pRro ${DISTFILES}
 ALL_TARGET=	no_test
 
 USE_GMAKE=	yes
@@ -48,6 +51,9 @@ post-install:
 
 .include <bsd.port.pre.mk>
 
+FETCH_CMD:=	${SHELL} ${FILESDIR}/fetchwrapper.sh \
+			${URL_SUFFIX} ${FETCH_BINARY} ${FETCH_ARGS}
+
 .if ${ARCH} == "powerpc"
 BROKEN=		Does not compile on powerpc
 .endif

Modified: branches/RELENG_9_2_0/security/polarssl/distinfo
==============================================================================
--- branches/RELENG_9_2_0/security/polarssl/distinfo	Tue Aug 13 17:39:57 2013	(r324677)
+++ branches/RELENG_9_2_0/security/polarssl/distinfo	Tue Aug 13 17:53:03 2013	(r324678)
@@ -1,2 +1,2 @@
-SHA256 (polarssl-1.2.7-gpl.tgz) = d64c2d1247f93cdeb884bd3706dfddffc636634bbf81d3772af750d5b5191328
-SIZE (polarssl-1.2.7-gpl.tgz) = 977888
+SHA256 (polarssl-1.2.8-gpl.tgz) = 23cf931e322ab397d26c89b7e805cf2229df46c5196f4f67ebfc0e285848637b
+SIZE (polarssl-1.2.8-gpl.tgz) = 998609

Copied: branches/RELENG_9_2_0/security/polarssl/files/fetchwrapper.sh (from r324675, head/security/polarssl/files/fetchwrapper.sh)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/RELENG_9_2_0/security/polarssl/files/fetchwrapper.sh	Tue Aug 13 17:53:03 2013	(r324678, copy of r324675, head/security/polarssl/files/fetchwrapper.sh)
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+# This script tacks the first argument onto each URL found in the list,
+# discards and then executes the list.
+
+# URL matching is simplistic, a URL is what matches *tp://* (so file:///
+# is not matched).
+
+# For instance, calling:
+#   fetchwrapper.sh '?do=yes' /usr/bin/fetch -pPr http://example.org/file
+# will execute:
+#   /usr/bin/fetch -pPr http://example.org/file?do=yes
+
+# The intention is to work around download splash screens on web servers.
+
+# (C) Copyright 2013 by Matthias Andree.
+# Licensed under the 2-clause BSD license.
+
+if [ $# -lt 3 ] ; then
+    echo >&2 "Usage: $0 URLsuffix fetch-command [options] URL [post-options]"
+    exit 1
+fi
+
+patcharray() {
+    # based on Rich Felker's "Working with arrays",
+    # http://www.etalabs.net/sh_tricks.html
+    for i do
+	case "$i" in *tp://*) j=$suffix ;; *) j= ;; esac
+	printf %s%s\\n "$i" "$j" | sed -e "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/"
+    done
+    echo " "
+}
+
+suffix="$1" ; shift
+args=$(patcharray "$@")
+eval "set -- $args"
+
+set -x
+exec "$@"

Modified: branches/RELENG_9_2_0/security/polarssl/pkg-plist
==============================================================================
--- branches/RELENG_9_2_0/security/polarssl/pkg-plist	Tue Aug 13 17:39:57 2013	(r324677)
+++ branches/RELENG_9_2_0/security/polarssl/pkg-plist	Tue Aug 13 17:53:03 2013	(r324678)
@@ -50,6 +50,8 @@ include/polarssl/padlock.h
 include/polarssl/pem.h
 include/polarssl/pbkdf2.h
 include/polarssl/pkcs11.h
+include/polarssl/pkcs12.h
+include/polarssl/pkcs5.h
 include/polarssl/rsa.h
 include/polarssl/sha1.h
 include/polarssl/sha2.h

Modified: branches/RELENG_9_2_0/security/vuxml/vuln.xml
==============================================================================
--- branches/RELENG_9_2_0/security/vuxml/vuln.xml	Tue Aug 13 17:39:57 2013	(r324677)
+++ branches/RELENG_9_2_0/security/vuxml/vuln.xml	Tue Aug 13 17:53:03 2013	(r324678)
@@ -51,6 +51,36 @@ Note:  Please add new entries to the beg
 
 -->
 <vuxml xmlns="http://www.vuxml.org/apps/vuxml-1">;
+  <vuln vid="72bf9e21-03df-11e3-bd8d-080027ef73ec">
+    <topic>polarssl -- denial of service through unterminated loop in certificate parser</topic>
+    <affects>
+      <package>
+	<name>polarssl</name>
+	<range><lt>1.2.8</lt></range>
+      </package>
+    </affects>
+    <description>
+      <body xmlns="http://www.w3.org/1999/xhtml">;
+	<p>Paul Bakker reports:</p>
+	<blockquote cite="https://polarssl.org/tech-updates/security-advisories/polarssl-security-advisory-2013-03">;
+	  <p>A bug in the logic of the parsing of PEM encoded certificates in x509parse_crt() can result in an infinite loop, thus hogging processing power.
+	  </p><p>
+	    While parsing a Certificate message during the SSL/TLS handshake, PolarSSL extracts the presented certificates and sends them on to be parsed. As the RFC specifies that the certificates in the Certificate message are always X.509 certificates in DER format, bugs in the decoding of PEM certificates should normally not be triggerable via the SSL/TLS handshake.
+	    </p><p>
+	  Versions of PolarSSL prior to 1.1.7 in the 1.1 branch and prior to 1.2.8 in the 1.2 branch call the generic x509parse_crt() function for parsing during the handshake. x509parse_crt() is a generic functions that wraps parsing of both PEM-encoded and DER-formatted certificates. As a result it is possible to craft a Certificate message that includes a PEM encoded certificate in the Certificate message that triggers the infinite loop.</p>
+	</blockquote>
+      </body>
+    </description>
+    <references>
+      <url>https://polarssl.org/tech-updates/security-advisories/polarssl-security-advisory-2013-03</url>;
+      <cvename>CVE-2013-4623</cvename>
+    </references>
+    <dates>
+      <discovery>2013-06-21</discovery>
+      <entry>2013-08-13</entry>
+    </dates>
+  </vuln>
+
   <vuln vid="e21c7c7a-0116-11e3-9e83-3c970e169bc2">
     <topic>samba -- denial of service vulnerability</topic>
     <affects>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308131753.r7DHr32K021009>