commit: 30fa4bb1eed4fb6dd85bb64e40d5c5b724c383b6 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> AuthorDate: Wed Feb 7 18:23:41 2018 +0000 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> CommitDate: Wed Feb 7 21:13:56 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30fa4bb1
net-analyzer/dnstracer: Fix buffer overflow in host argument (bug #620928). Package-Manager: Portage-2.3.24, Repoman-2.3.6 net-analyzer/dnstracer/dnstracer-1.9-r2.ebuild | 22 ++++++++++++++++++++++ .../dnstracer/files/dnstracer-1.9-argv0.patch | 11 +++++++++++ 2 files changed, 33 insertions(+) diff --git a/net-analyzer/dnstracer/dnstracer-1.9-r2.ebuild b/net-analyzer/dnstracer/dnstracer-1.9-r2.ebuild new file mode 100644 index 00000000000..b5c49114d51 --- /dev/null +++ b/net-analyzer/dnstracer/dnstracer-1.9-r2.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Determines where a given nameserver gets its information from" +HOMEPAGE="http://www.mavetju.org/unix/general.php" +SRC_URI="http://www.mavetju.org/download/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux" +IUSE="ipv6" + +DOCS=( CHANGES README ) +PATCHES=( + "${FILESDIR}"/${PN}-1.9-argv0.patch +) + +src_configure() { + econf $(use_enable ipv6) +} diff --git a/net-analyzer/dnstracer/files/dnstracer-1.9-argv0.patch b/net-analyzer/dnstracer/files/dnstracer-1.9-argv0.patch new file mode 100644 index 00000000000..c83c38ea7d7 --- /dev/null +++ b/net-analyzer/dnstracer/files/dnstracer-1.9-argv0.patch @@ -0,0 +1,11 @@ +--- a/dnstracer.c ++++ b/dnstracer.c +@@ -1619,7 +1619,7 @@ + if (argv[0] == NULL) usage(); + + // check for a trailing dot +- strcpy(argv0, argv[0]); ++ strncpy(argv0, argv[0], NS_MAXDNAME); + if (argv0[strlen(argv[0]) - 1] == '.') argv0[strlen(argv[0]) - 1] = 0; + + printf("Tracing to %s[%s] via %s, maximum of %d retries\n",
