From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DEEEA138359 for ; Thu, 5 Nov 2020 14:08:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1A61BE081E; Thu, 5 Nov 2020 14:08:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E0DECE081E for ; Thu, 5 Nov 2020 14:08:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B4D0A340C8D for ; Thu, 5 Nov 2020 14:08:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 368E03A2 for ; Thu, 5 Nov 2020 14:08:08 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1604585281.75f0ee948825fc1dd8060a4480a0dd5872424313.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/nDPI/, net-libs/nDPI/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/nDPI/Manifest net-libs/nDPI/files/nDPI-3.4-fix-oob-in-kerberos-dissector.patch net-libs/nDPI/nDPI-3.4.ebuild X-VCS-Directories: net-libs/nDPI/ net-libs/nDPI/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 75f0ee948825fc1dd8060a4480a0dd5872424313 X-VCS-Branch: master Date: Thu, 5 Nov 2020 14:08:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e4102a9e-5a9d-45bc-9af4-ebc7026d85f1 X-Archives-Hash: ba56d4e454ea0f9c7a80ba1a878b57bd commit: 75f0ee948825fc1dd8060a4480a0dd5872424313 Author: John Helmert III posteo net> AuthorDate: Wed Nov 4 07:09:03 2020 +0000 Commit: Sam James gentoo org> CommitDate: Thu Nov 5 14:08:01 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75f0ee94 net-libs/nDPI: bump to 3.4 Bug: https://bugs.gentoo.org/719084 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: John Helmert III posteo.net> Signed-off-by: Sam James gentoo.org> net-libs/nDPI/Manifest | 1 + .../nDPI-3.4-fix-oob-in-kerberos-dissector.patch | 16 ++++++ net-libs/nDPI/nDPI-3.4.ebuild | 63 ++++++++++++++++++++++ 3 files changed, 80 insertions(+) diff --git a/net-libs/nDPI/Manifest b/net-libs/nDPI/Manifest index ff887adc5eb..11430d2ded9 100644 --- a/net-libs/nDPI/Manifest +++ b/net-libs/nDPI/Manifest @@ -3,3 +3,4 @@ DIST nDPI-2.2.tar.gz 19937173 BLAKE2B a00287d5901487f7e56d7aeab7dcb357c0eb6348be DIST nDPI-2.8.tar.gz 19754226 BLAKE2B c112ae2d9fff872f116a23bbffe7bca39a5c876346b4e41ef503934301f39413517fce169a37a766ffae16b0cb1ee81d96573ffa1ee2519d295dfb32cc1f115e SHA512 aae757047810bbc32700ecf7ac2e5df4b93528021a50da4a0b83865a5248dfca8b1643c75aa7eeb6eac4f155638d45666db487318b2be9adb2f3412cb8ec8497 DIST nDPI-3.0.tar.gz 26902734 BLAKE2B 79380ce5138b8ba99169ce3a2afeaa2a2bcded9bc7834d32af6911e9cee60395613a390d2d5d0530b9ff9263ad707e78f49d35098428c66a9c95a98aee2d8df8 SHA512 74c4a41201e809b476f4c23b99c2391b7bcbc76507a11261d216caf2350db8fd4ae3dac69d1d2179b12217901da1e04676aeca05d3a8e63d1a162469b33ab4c0 DIST nDPI-3.2.tar.gz 29586049 BLAKE2B 4ea7f1cf39b5363b724c2db84c006de2f0e05ea275586241c3e1b9a53681f1da83dc752e69d379d6b8c8bcf8b15b146e8a2de127931d3b2061112aef297f7d79 SHA512 bf3a6e66479110b8e1a51a3b66cc0a85aef98af455f2895a75fe2a8b06a9fb72a4dca3d4bbfa6f44959c5043c038927a1a8acb312e881d4e2bb544dc84b6eea8 +DIST nDPI-3.4.tar.gz 37976087 BLAKE2B 49e25586671a91278d90775c3dbc881ce4ca9ae4afd3108b1caff3b0d38251808bcd52ead253f451474195994fbf94658f70241acedb23c35a475df3b15c4a20 SHA512 ed5a22b6ddc14ad707a18a0bd96746c1df489969faaa42016fa9aad8d414fc4ee303b96cac15c3ba86f484a80a0aaa2dd1be5f92be672912e0e0d30da4bdad4c diff --git a/net-libs/nDPI/files/nDPI-3.4-fix-oob-in-kerberos-dissector.patch b/net-libs/nDPI/files/nDPI-3.4-fix-oob-in-kerberos-dissector.patch new file mode 100644 index 00000000000..7e8f381cdea --- /dev/null +++ b/net-libs/nDPI/files/nDPI-3.4-fix-oob-in-kerberos-dissector.patch @@ -0,0 +1,16 @@ +Sourced from https://github.com/gentoo/gentoo/commit/c02681fcb7839ac1829ec09394334ddbca1b0aea + +diff --git a/src/lib/protocols/kerberos.c b/src/lib/protocols/kerberos.c +index fa0ab6cb..32319668 100644 +--- a/src/lib/protocols/kerberos.c ++++ b/src/lib/protocols/kerberos.c +@@ -189,7 +189,8 @@ void ndpi_search_kerberos(struct ndpi_detection_module_struct *ndpi_struct, + + body_offset = koffsetp + 1 + pad_len; + +- for(i=0; i<10; i++) if(body_offsetpayload_packet_len && packet->payload[body_offset] != 0x05) body_offset++; /* ASN.1 */ ++ for(i=0; i<10 && body_offset < packet->payload_packet_len; i++) ++ if(packet->payload[body_offset] != 0x05) body_offset++; /* ASN.1 */ + #ifdef KERBEROS_DEBUG + printf("body_offset=%u [%02X %02X] [byte 0 must be 0x05]\n", body_offset, packet->payload[body_offset], packet->payload[body_offset+1]); + #endif diff --git a/net-libs/nDPI/nDPI-3.4.ebuild b/net-libs/nDPI/nDPI-3.4.ebuild new file mode 100644 index 00000000000..39a1a4c8a57 --- /dev/null +++ b/net-libs/nDPI/nDPI-3.4.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="Open Source Deep Packet Inspection Software Toolkit" +HOMEPAGE="https://www.ntop.org/" +SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-3+" +SLOT="0/$(ver_cut 1)" +KEYWORDS="~amd64 ~x86" + +DEPEND="dev-libs/json-c:= + net-libs/libpcap" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-3.4-fix-oob-in-kerberos-dissector.patch" +) + +src_prepare() { + eval $(grep '^NDPI_MAJOR=' autogen.sh) + eval $(grep '^NDPI_MINOR=' autogen.sh) + eval $(grep '^NDPI_PATCH=' autogen.sh) + NDPI_VERSION_SHORT="${NDPI_MAJOR}.${NDPI_MINOR}.${NDPI_PATCH}" + + sed \ + -e "s/@NDPI_MAJOR@/${NDPI_MAJOR}/g" \ + -e "s/@NDPI_MINOR@/${NDPI_MINOR}/g" \ + -e "s/@NDPI_PATCH@/${NDPI_PATCH}/g" \ + -e "s/@NDPI_VERSION_SHORT@/${NDPI_VERSION_SHORT}/g" \ + -e "s/@FUZZY@//g" \ + < "${S}/configure.seed" \ + > "${S}/configure.ac" || die + + sed -i \ + -e "s%^libdir\s*=\s*\${prefix}/lib\s*$%libdir = \${prefix}/$(get_libdir)%" \ + src/lib/Makefile.in || die + + default + eautoreconf + + # Taken from autogen.sh (bug #704074): + sed -i \ + -e "s/#define PACKAGE/#define NDPI_PACKAGE/g" \ + -e "s/#define VERSION/#define NDPI_VERSION/g" \ + configure || die +} + +src_install() { + default + rm "${D}"/usr/$(get_libdir)/lib${PN,,}.a || die +} + +src_test() { + pushd tests || die + ./do.sh || die "Failed tests" + ./do-unit.sh || die "Failed tests" + popd || die +}