From patchwork Tue Aug 3 13:11:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 4589 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4GfFcq6vhSz3x62 for ; Tue, 3 Aug 2021 13:11:23 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4GfFcp1rgDz2M9; Tue, 3 Aug 2021 13:11:22 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4GfFcn5dnGz2xVx; Tue, 3 Aug 2021 13:11:21 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4GfFcm6WM7z2x9h for ; Tue, 3 Aug 2021 13:11:20 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4GfFcm2MBYz16p; Tue, 3 Aug 2021 13:11:19 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1627996280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=+jif5Vkf7Bd8WF5Q2yd/bbDIvCugcmFmAALCF7P0bwQ=; b=ynsi1YpBjJ9953nLaFyYCW5npNTD7ptXK/+5ymi7Z2um3YfT6mfXXXTlMwaC40as9maJMr M38G92U+2YRdgSDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1627996280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=+jif5Vkf7Bd8WF5Q2yd/bbDIvCugcmFmAALCF7P0bwQ=; b=Q/0PAWTfxlAWtW6D0WENuCXd0kDPefoyeuygM97JUAs4Y6p5XWUOnzJjQxZmOOjpXDhcwP bn01sBs9yHe7jQFzo2MD/YsYcQ0LRjy8wm08F4bmwXoGe3Faw7jlr/w0PlDtsEP8Bzjz8R UvBzi6hAhGev7UdoI1Lp8QYoW9GgWMTrzzxCPaYdyqh4fIkgcD/KBu45gxWwv9FUfwiMZX nYxgEUIi0r0AT3KSbvAzGStMO6kGxpuR80m54qabugDMpvdLrV8b2CPLOTi+Nq7hCLua5W m5uO3SDRfBo7Wv3aFsPtsMIzAhjqj8FtU1wnssxGi1qR61OpXEmtCTBldLnpnQ== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] ncat: Update to 7.91 and fix #12647 ncat segfault if virtmanager try to connect libvirt Date: Tue, 3 Aug 2021 15:11:11 +0200 Message-Id: <20210803131111.1523787-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - Update from 7.80 to 7.91 - Update of rootfile - Changelog is too long to include here Full details can be found in the CHANGELOG file in the source tarball - Added patch to fix segfault - https://github.com/nmap/nmap/issues/2154 - Ran with unpatched 7.91 version $ touch /tmp/foo $ nc -U /tmp/foo Segmentation fault - flagged problem in #12647 - Ran with patched 7.91 version $ touch /tmp/foo $ nc -U /tmp/foo Ncat: Connection refused. - Expected behaviour Tested-by: Adolf Belka Signed-off-by: Adolf Belka Reviewed-by: Michael Tremer --- lfs/ncat | 7 ++++--- ...-7.91-fix-a-unix-domain-socket-crash.patch | 21 +++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 src/patches/ncat-7.91-fix-a-unix-domain-socket-crash.patch diff --git a/lfs/ncat b/lfs/ncat index b8c8768dc..0e327a043 100644 --- a/lfs/ncat +++ b/lfs/ncat @@ -24,7 +24,7 @@ include Config -VER = 7.80 +VER = 7.91 THISAPP = ncat-$(VER) DL_FILE = nmap-$(VER).tar.bz2 @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/nmap-$(VER) TARGET = $(DIR_INFO)/$(THISAPP) PROG = ncat -PAK_VER = 6 +PAK_VER = 7 DEPS = @@ -44,7 +44,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_MD5 = d37b75b06d1d40f27b76d60db420a1f5 +$(DL_FILE)_MD5 = 239cef725863ab454590a1bb8793b72b install : $(TARGET) @@ -77,6 +77,7 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/ncat-7.91-fix-a-unix-domain-socket-crash.patch $(UPDATE_AUTOMAKE) cd $(DIR_APP) && mkdir -p build cd $(DIR_APP) && ./configure \ diff --git a/src/patches/ncat-7.91-fix-a-unix-domain-socket-crash.patch b/src/patches/ncat-7.91-fix-a-unix-domain-socket-crash.patch new file mode 100644 index 000000000..7ffad08b2 --- /dev/null +++ b/src/patches/ncat-7.91-fix-a-unix-domain-socket-crash.patch @@ -0,0 +1,21 @@ +--- a/ncat/ncat_main.c 2020-10-07 17:21:42.253789857 -0600 ++++ b/ncat/ncat_main.c 2020-10-14 21:37:31.527610020 -0600 +@@ -846,7 +846,7 @@ + targetaddrs->addr.un.sun_family = AF_UNIX; + strncpy(targetaddrs->addr.un.sun_path, argv[optind], sizeof(targetaddrs->addr.un.sun_path)); + targetaddrs->addrlen = SUN_LEN(&targetaddrs->addr.un); +- o.target = argv[optind]; ++ o.sslservername = o.target = argv[optind]; + optind++; + } else + #endif +@@ -865,7 +865,7 @@ + targetaddrs->addr.vm.svm_cid = long_cid; + + targetaddrs->addrlen = sizeof(targetaddrs->addr.vm); +- o.target = argv[optind]; ++ o.sslservername = o.target = argv[optind]; + optind++; + } + } else +