From 555b2c795bd90f8db80e69551b6aa48ea96e4c00 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Wed, 5 May 2021 20:21:50 +0200 Subject: [PATCH] Fix crash with unix sockets Resolves: #1957178 --- nmap-unix_crash.patch | 32 ++++++++++++++++++++++++++++++++ nmap.spec | 7 ++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 nmap-unix_crash.patch diff --git a/nmap-unix_crash.patch b/nmap-unix_crash.patch new file mode 100644 index 0000000..feb8f7a --- /dev/null +++ b/nmap-unix_crash.patch @@ -0,0 +1,32 @@ +From f6b40614e4a8131394792d590965f8af3c635323 Mon Sep 17 00:00:00 2001 +From: nnposter +Date: Fri, 16 Oct 2020 02:54:52 +0000 +Subject: [PATCH] Fix a Unix domain socket crash. Fixes #2154 + +--- + CHANGELOG | 2 ++ + ncat/ncat_main.c | 4 ++-- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/ncat/ncat_main.c b/ncat/ncat_main.c +index 8942d83cb9..2792a6ac24 100644 +--- a/ncat/ncat_main.c ++++ b/ncat/ncat_main.c +@@ -846,7 +846,7 @@ int main(int argc, char *argv[]) + 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 @@ int main(int argc, char *argv[]) + 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 diff --git a/nmap.spec b/nmap.spec index 6609f18..ef2b342 100644 --- a/nmap.spec +++ b/nmap.spec @@ -7,7 +7,7 @@ Name: nmap Epoch: 3 Version: 7.91 #global prerelease TEST5 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Network exploration tool and security scanner URL: http://nmap.org/ # Uses combination of licenses based on GPL license, but with extra modification @@ -33,6 +33,8 @@ Patch7: nmap_resolve_config.patch ## https://github.com/nmap/nmap/commit/28bfe0dfd26dbc4e9917db9ad5457ab496769d24.patch Patch9: nmap-safe_fd_functions.patch +## https://github.com/nmap/nmap/commit/f6b40614e4a8131394792d590965f8af3c635323.patch +Patch10: nmap-unix_crash.patch BuildRequires: automake make BuildRequires: autoconf @@ -155,6 +157,9 @@ fi %{_mandir}/man1/ncat.1.gz %changelog +* Wed May 5 2021 Pavel Zhukov - 3:7.91-7 +- Fix crash with unix sockets + * Fri Apr 16 2021 Pavel Zhukov - 3:7.91-6 - Bumping release because brew is ignorant of such innovative concept as RPM Epochs