From e14ed8232deb0980e58cdf7d24bc03457b5210bd Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Mon, 25 Jan 2021 17:16:21 +0000 Subject: [PATCH] Rework vuxml a bit to make them validable again modify tidy.xsl to make it generates manually the xml declaration xsl is not able to generate a list of entity otherwise. Remove copyright form included files, they are redudundant anyway and in the end only the vuln.xml file is distribued with entities expanded Rework a bit the entity declaration in order for the document to look great after expansion (as it did before we introduced the expansion mechanism) All validation are now processed direcly on the flattened file. This is based on a patch from mfechner here Submitted by: mfechner Differential Revision: https://reviews.freebsd.org/D28299 --- security/vuxml/Makefile | 19 ++++++++++++------- security/vuxml/files/tidy.xsl | 25 +++++++++++++++++++++++-- security/vuxml/vuln-2003.xml | 31 ------------------------------- security/vuxml/vuln-2004.xml | 31 ------------------------------- security/vuxml/vuln-2005.xml | 31 ------------------------------- security/vuxml/vuln-2006.xml | 31 ------------------------------- security/vuxml/vuln-2007.xml | 31 ------------------------------- security/vuxml/vuln-2008.xml | 31 ------------------------------- security/vuxml/vuln-2009.xml | 31 ------------------------------- security/vuxml/vuln-2010.xml | 31 ------------------------------- security/vuxml/vuln-2011.xml | 31 ------------------------------- security/vuxml/vuln-2012.xml | 31 ------------------------------- security/vuxml/vuln-2013.xml | 31 ------------------------------- security/vuxml/vuln-2014.xml | 31 ------------------------------- security/vuxml/vuln-2015.xml | 31 ------------------------------- security/vuxml/vuln-2016.xml | 31 ------------------------------- security/vuxml/vuln-2017.xml | 31 ------------------------------- security/vuxml/vuln-2018.xml | 31 ------------------------------- security/vuxml/vuln-2019.xml | 31 ------------------------------- 19 files changed, 35 insertions(+), 536 deletions(-) diff --git a/security/vuxml/Makefile b/security/vuxml/Makefile index 231969d30dd5..6eb47eb15837 100644 --- a/security/vuxml/Makefile +++ b/security/vuxml/Makefile @@ -31,6 +31,11 @@ WRKSRC= ${WRKDIR} dir_DTD= share/xml/dtd/vuxml VUXML_FILE?= ${PKGDIR}/vuln.xml +VUXML_FLAT_FILE?= ${PKGDIR}/vuln-flat.xml + +post-clean: + @${RM} "${VUXML_FILE}.tidy" + @${RM} "${VUXML_FLAT_FILE}" do-extract: @${RM} -r ${WRKDIR} @@ -54,9 +59,9 @@ vuln-flat.xml: vuln.xml xmllint -noent ${.ALLSRC} > ${.TARGET} validate: tidy - @${SH} ${FILESDIR}/validate.sh "${VUXML_FILE}" + @${SH} ${FILESDIR}/validate.sh "${VUXML_FLAT_FILE}" @${ECHO_MSG} Checking if tidy differs... - @if ${DIFF} -u "${VUXML_FILE}" "${VUXML_FILE}.tidy"; \ + @if ${DIFF} -u "${VUXML_FLAT_FILE}" "${VUXML_FILE}.tidy"; \ then \ ${ECHO_MSG} ... seems okay; \ ${RM} "${VUXML_FILE}.tidy"; \ @@ -64,8 +69,8 @@ validate: tidy return 1; \ fi @${ECHO_MSG} Checking for space/tab... - @unexpand "${VUXML_FILE}" | ${SED} -E 's,[[:space:]]*$$,,g' > "${VUXML_FILE}.unexpanded" - @if ${DIFF} -u "${VUXML_FILE}" "${VUXML_FILE}.unexpanded"; \ + @unexpand "${VUXML_FLAT_FILE}" | ${SED} -E 's,[[:space:]]*$$,,g' > "${VUXML_FILE}.unexpanded" + @if ${DIFF} -u "${VUXML_FLAT_FILE}" "${VUXML_FILE}.unexpanded"; \ then \ ${ECHO_MSG} ... seems okay; \ ${RM} "${VUXML_FILE}.unexpanded"; \ @@ -74,15 +79,15 @@ validate: tidy ${ECHO_CMD} Consider using ${VUXML_FILE}.unexpanded for final commit; \ return 1; \ fi - ${PYTHON_CMD} ${FILESDIR}/extra-validation.py ${VUXML_FILE} + ${PYTHON_CMD} ${FILESDIR}/extra-validation.py ${VUXML_FLAT_FILE} -tidy: vuln.xml +tidy: vuln-flat.xml @if [ ! -e ${LOCALBASE}/share/xml/dtd/vuxml/catalog.xml ]; \ then \ echo "Please install the VuXML port prior to running make validate/tidy."; \ exit 1; \ fi - ${SH} ${FILESDIR}/tidy.sh "${FILESDIR}/tidy.xsl" "${VUXML_FILE}" > "${VUXML_FILE}.tidy" + ${SH} ${FILESDIR}/tidy.sh "${FILESDIR}/tidy.xsl" "${VUXML_FLAT_FILE}" > "${VUXML_FILE}.tidy" newentry: @${SH} ${FILESDIR}/newentry.sh "${VUXML_FILE}" diff --git a/security/vuxml/files/tidy.xsl b/security/vuxml/files/tidy.xsl index bf56f3184a0d..faf457596fea 100644 --- a/security/vuxml/files/tidy.xsl +++ b/security/vuxml/files/tidy.xsl @@ -12,8 +12,7 @@ @@ -24,6 +23,27 @@ result in more namespace declarations than we wish. --> + + + + + + + + + + + + + + + + + + +]> +]]> @@ -54,6 +74,7 @@ don't have ). Insert an empty line between elements. + - ElGamal sign+encrypt keys created by GnuPG can be compromised diff --git a/security/vuxml/vuln-2004.xml b/security/vuxml/vuln-2004.xml index e31b80efff15..aa6e6b1adbe5 100644 --- a/security/vuxml/vuln-2004.xml +++ b/security/vuxml/vuln-2004.xml @@ -1,34 +1,3 @@ - - a2ps -- insecure temporary file creation diff --git a/security/vuxml/vuln-2005.xml b/security/vuxml/vuln-2005.xml index f96a8a56757c..7b03ffd4d899 100644 --- a/security/vuxml/vuln-2005.xml +++ b/security/vuxml/vuln-2005.xml @@ -1,34 +1,3 @@ - - qmail -- 64 bit integer overflows with possible remote code execution on large SMTP requests diff --git a/security/vuxml/vuln-2006.xml b/security/vuxml/vuln-2006.xml index 1fd566d2d018..d94b827cbd2b 100644 --- a/security/vuxml/vuln-2006.xml +++ b/security/vuxml/vuln-2006.xml @@ -1,34 +1,3 @@ - - plone -- user can masquerade as a group diff --git a/security/vuxml/vuln-2007.xml b/security/vuxml/vuln-2007.xml index 61ca4162bb48..cfac8ca9cf37 100644 --- a/security/vuxml/vuln-2007.xml +++ b/security/vuxml/vuln-2007.xml @@ -1,34 +1,3 @@ - - dovecot -- Specific LDAP + auth cache configuration may mix up user logins diff --git a/security/vuxml/vuln-2008.xml b/security/vuxml/vuln-2008.xml index aac344c0c23b..f5f2ff988c59 100644 --- a/security/vuxml/vuln-2008.xml +++ b/security/vuxml/vuln-2008.xml @@ -1,34 +1,3 @@ - - vinagre -- format string vulnerability diff --git a/security/vuxml/vuln-2009.xml b/security/vuxml/vuln-2009.xml index 01376ce671bb..4ed63453900d 100644 --- a/security/vuxml/vuln-2009.xml +++ b/security/vuxml/vuln-2009.xml @@ -1,34 +1,3 @@ - - drupal -- multiple cross-site scripting diff --git a/security/vuxml/vuln-2010.xml b/security/vuxml/vuln-2010.xml index 457e867c003b..d3a8f569873e 100644 --- a/security/vuxml/vuln-2010.xml +++ b/security/vuxml/vuln-2010.xml @@ -1,34 +1,3 @@ - - webkit-gtk2 -- Multiple vulnerabilities diff --git a/security/vuxml/vuln-2011.xml b/security/vuxml/vuln-2011.xml index 8fbb27faac06..6247a20e1ee6 100644 --- a/security/vuxml/vuln-2011.xml +++ b/security/vuxml/vuln-2011.xml @@ -1,34 +1,3 @@ - - WordPress -- cross site scripting vulnerability diff --git a/security/vuxml/vuln-2012.xml b/security/vuxml/vuln-2012.xml index 53754e059174..5de258b56e1c 100644 --- a/security/vuxml/vuln-2012.xml +++ b/security/vuxml/vuln-2012.xml @@ -1,34 +1,3 @@ - - puppet -- multiple vulnerabilities diff --git a/security/vuxml/vuln-2013.xml b/security/vuxml/vuln-2013.xml index 93cc12587e09..f46442c6e179 100644 --- a/security/vuxml/vuln-2013.xml +++ b/security/vuxml/vuln-2013.xml @@ -1,34 +1,3 @@ - - OpenX -- SQL injection vulnerability diff --git a/security/vuxml/vuln-2014.xml b/security/vuxml/vuln-2014.xml index 1bdf1eb96554..6b1f1c8cce16 100644 --- a/security/vuxml/vuln-2014.xml +++ b/security/vuxml/vuln-2014.xml @@ -1,34 +1,3 @@ - - mutt -- denial of service via crafted mail message diff --git a/security/vuxml/vuln-2015.xml b/security/vuxml/vuln-2015.xml index 84672a2aac58..36997bebdfe4 100644 --- a/security/vuxml/vuln-2015.xml +++ b/security/vuxml/vuln-2015.xml @@ -1,34 +1,3 @@ - - mono -- DoS and code execution diff --git a/security/vuxml/vuln-2016.xml b/security/vuxml/vuln-2016.xml index 8c1eb6bf02b5..5fe4fdc4bf1b 100644 --- a/security/vuxml/vuln-2016.xml +++ b/security/vuxml/vuln-2016.xml @@ -1,34 +1,3 @@ - - h2o -- Use-after-free vulnerability diff --git a/security/vuxml/vuln-2017.xml b/security/vuxml/vuln-2017.xml index bca4b7f1e162..042ca4a18394 100644 --- a/security/vuxml/vuln-2017.xml +++ b/security/vuxml/vuln-2017.xml @@ -1,34 +1,3 @@ - - OTRS -- Multiple vulnerabilities diff --git a/security/vuxml/vuln-2018.xml b/security/vuxml/vuln-2018.xml index df9b671b6800..f7070bce36c7 100644 --- a/security/vuxml/vuln-2018.xml +++ b/security/vuxml/vuln-2018.xml @@ -1,34 +1,3 @@ - - gitea -- privilege escalation, XSS diff --git a/security/vuxml/vuln-2019.xml b/security/vuxml/vuln-2019.xml index 4917d18c0858..c506c424fb6b 100644 --- a/security/vuxml/vuln-2019.xml +++ b/security/vuxml/vuln-2019.xml @@ -1,34 +1,3 @@ - - rack -- information leak / session hijack vulnerability