Update to 7.91
This commit is contained in:
parent
29fdaff88f
commit
8ff6f85b18
6
nmap-7.91.tar.bz2.asc
Normal file
6
nmap-7.91.tar.bz2.asc
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
|
iF0EABECAB0WIQRDbWarmnmEJf2g4/gBr58Da5NV0AUCX4IG7AAKCRABr58Da5NV
|
||||||
|
0En1AJ40wogwUYKdlVLFaPWl9LPSuNmJ5QCfR6Y8/9JBvs+w6rklBmN/zTcIcX0=
|
||||||
|
=/xYe
|
||||||
|
-----END PGP SIGNATURE-----
|
@ -1,8 +1,20 @@
|
|||||||
|
From 28bfe0dfd26dbc4e9917db9ad5457ab496769d24 Mon Sep 17 00:00:00 2001
|
||||||
|
From: dmiller <dmiller@e0a8ed71-7df4-0310-8962-fdc924857419>
|
||||||
|
Date: Thu, 7 Jan 2021 17:52:24 +0000
|
||||||
|
Subject: [PATCH] Use checked versions of FD_* macros. Closes #2202
|
||||||
|
|
||||||
|
---
|
||||||
|
ncat/ncat_core.c | 2 +-
|
||||||
|
ncat/ncat_listen.c | 78 +++++++++++++++++++++++-----------------------
|
||||||
|
ncat/ncat_posix.c | 8 ++---
|
||||||
|
ncat/ncat_proxy.c | 12 +++----
|
||||||
|
5 files changed, 53 insertions(+), 50 deletions(-)
|
||||||
|
|
||||||
diff --git a/ncat/ncat_core.c b/ncat/ncat_core.c
|
diff --git a/ncat/ncat_core.c b/ncat/ncat_core.c
|
||||||
index f734247..b76d5ea 100644
|
index d1a88ac946..7c39e5d360 100644
|
||||||
--- a/ncat/ncat_core.c
|
--- a/ncat/ncat_core.c
|
||||||
+++ b/ncat/ncat_core.c
|
+++ b/ncat/ncat_core.c
|
||||||
@@ -498,7 +498,7 @@ int ncat_broadcast(fd_set *fds, const fd_list_t *fdlist, const char *msg, size_t
|
@@ -431,7 +431,7 @@ int ncat_broadcast(fd_set *fds, const fd_list_t *fdlist, const char *msg, size_t
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
for (i = 0; i <= fdlist->fdmax; i++) {
|
for (i = 0; i <= fdlist->fdmax; i++) {
|
||||||
@ -12,10 +24,10 @@ index f734247..b76d5ea 100644
|
|||||||
|
|
||||||
fdn = get_fdinfo(fdlist, i);
|
fdn = get_fdinfo(fdlist, i);
|
||||||
diff --git a/ncat/ncat_listen.c b/ncat/ncat_listen.c
|
diff --git a/ncat/ncat_listen.c b/ncat/ncat_listen.c
|
||||||
index 1e0c22f..bf4d54f 100644
|
index 84ece94d08..e6dad13597 100644
|
||||||
--- a/ncat/ncat_listen.c
|
--- a/ncat/ncat_listen.c
|
||||||
+++ b/ncat/ncat_listen.c
|
+++ b/ncat/ncat_listen.c
|
||||||
@@ -312,10 +312,10 @@ static int ncat_listen_stream(int proto)
|
@@ -244,10 +244,10 @@ static int ncat_listen_stream(int proto)
|
||||||
unblock_socket(listen_socket[num_sockets]);
|
unblock_socket(listen_socket[num_sockets]);
|
||||||
|
|
||||||
/* setup select sets and max fd */
|
/* setup select sets and max fd */
|
||||||
@ -28,64 +40,61 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
|
|
||||||
num_sockets++;
|
num_sockets++;
|
||||||
}
|
}
|
||||||
@@ -368,7 +368,7 @@ static int ncat_listen_stream(int proto)
|
@@ -296,7 +296,7 @@ static int ncat_listen_stream(int proto)
|
||||||
*/
|
struct fdinfo *fdi = &client_fdlist.fds[i];
|
||||||
for (i = 0; i <= client_fdlist.fdmax && fds_ready > 0; i++) {
|
int cfd = fdi->fd;
|
||||||
/* Loop through descriptors until there's something to read */
|
/* Loop through descriptors until there's something to read */
|
||||||
- if (!FD_ISSET(i, &readfds) && !FD_ISSET(i, &writefds))
|
- if (!FD_ISSET(cfd, &readfds) && !FD_ISSET(cfd, &writefds))
|
||||||
+ if (!checked_fd_isset(i, &readfds) && !checked_fd_isset(i, &writefds))
|
+ if (!checked_fd_isset(cfd, &readfds) && !checked_fd_isset(cfd, &writefds))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (o.debug > 1)
|
if (o.debug > 1)
|
||||||
@@ -376,30 +376,30 @@ static int ncat_listen_stream(int proto)
|
@@ -304,27 +304,27 @@ static int ncat_listen_stream(int proto)
|
||||||
|
|
||||||
#ifdef HAVE_OPENSSL
|
#ifdef HAVE_OPENSSL
|
||||||
/* Is this an ssl socket pending a handshake? If so handle it. */
|
/* Is this an ssl socket pending a handshake? If so handle it. */
|
||||||
- if (o.ssl && FD_ISSET(i, &sslpending_fds)) {
|
- if (o.ssl && FD_ISSET(cfd, &sslpending_fds)) {
|
||||||
+ if (o.ssl && checked_fd_isset(i, &sslpending_fds)) {
|
- FD_CLR(cfd, &master_readfds);
|
||||||
struct fdinfo *fdi = NULL;
|
- FD_CLR(cfd, &master_writefds);
|
||||||
- FD_CLR(i, &master_readfds);
|
+ if (o.ssl && checked_fd_isset(cfd, &sslpending_fds)) {
|
||||||
- FD_CLR(i, &master_writefds);
|
+ checked_fd_clr(cfd, &master_readfds);
|
||||||
+ checked_fd_clr(i, &master_readfds);
|
+ checked_fd_clr(cfd, &master_writefds);
|
||||||
+ checked_fd_clr(i, &master_writefds);
|
|
||||||
fdi = get_fdinfo(&client_fdlist, i);
|
|
||||||
ncat_assert(fdi != NULL);
|
|
||||||
switch (ssl_handshake(fdi)) {
|
switch (ssl_handshake(fdi)) {
|
||||||
case NCAT_SSL_HANDSHAKE_COMPLETED:
|
case NCAT_SSL_HANDSHAKE_COMPLETED:
|
||||||
/* Clear from sslpending_fds once ssl is established */
|
/* Clear from sslpending_fds once ssl is established */
|
||||||
- FD_CLR(i, &sslpending_fds);
|
- FD_CLR(cfd, &sslpending_fds);
|
||||||
+ checked_fd_clr(i, &sslpending_fds);
|
+ checked_fd_clr(cfd, &sslpending_fds);
|
||||||
post_handle_connection(*fdi);
|
post_handle_connection(*fdi);
|
||||||
break;
|
break;
|
||||||
case NCAT_SSL_HANDSHAKE_PENDING_WRITE:
|
case NCAT_SSL_HANDSHAKE_PENDING_WRITE:
|
||||||
- FD_SET(i, &master_writefds);
|
- FD_SET(cfd, &master_writefds);
|
||||||
+ checked_fd_set(i, &master_writefds);
|
+ checked_fd_set(cfd, &master_writefds);
|
||||||
break;
|
break;
|
||||||
case NCAT_SSL_HANDSHAKE_PENDING_READ:
|
case NCAT_SSL_HANDSHAKE_PENDING_READ:
|
||||||
- FD_SET(i, &master_readfds);
|
- FD_SET(cfd, &master_readfds);
|
||||||
+ checked_fd_set(i, &master_readfds);
|
+ checked_fd_set(cfd, &master_readfds);
|
||||||
break;
|
break;
|
||||||
case NCAT_SSL_HANDSHAKE_FAILED:
|
case NCAT_SSL_HANDSHAKE_FAILED:
|
||||||
default:
|
default:
|
||||||
SSL_free(fdi->ssl);
|
SSL_free(fdi->ssl);
|
||||||
Close(fdi->fd);
|
Close(fdi->fd);
|
||||||
- FD_CLR(i, &sslpending_fds);
|
- FD_CLR(cfd, &sslpending_fds);
|
||||||
- FD_CLR(i, &master_readfds);
|
- FD_CLR(cfd, &master_readfds);
|
||||||
+ checked_fd_clr(i, &sslpending_fds);
|
+ checked_fd_clr(cfd, &sslpending_fds);
|
||||||
+ checked_fd_clr(i, &master_readfds);
|
+ checked_fd_clr(cfd, &master_readfds);
|
||||||
rm_fd(&client_fdlist, i);
|
rm_fd(&client_fdlist, cfd);
|
||||||
/* Are we in single listening mode(without -k)? If so
|
/* Since we removed this one, start loop over at the beginning.
|
||||||
then we should quit also. */
|
* Wastes a little time, but ensures correctness.
|
||||||
@@ -410,7 +410,7 @@ static int ncat_listen_stream(int proto)
|
@@ -339,7 +339,7 @@ static int ncat_listen_stream(int proto)
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
- if (FD_ISSET(i, &listen_fds)) {
|
- if (FD_ISSET(cfd, &listen_fds)) {
|
||||||
+ if (checked_fd_isset(i, &listen_fds)) {
|
+ if (checked_fd_isset(cfd, &listen_fds)) {
|
||||||
/* we have a new connection request */
|
/* we have a new connection request */
|
||||||
handle_connection(i);
|
handle_connection(cfd);
|
||||||
} else if (i == STDIN_FILENO) {
|
} else if (cfd == STDIN_FILENO) {
|
||||||
@@ -490,7 +490,7 @@ static void handle_connection(int socket_accept)
|
@@ -424,7 +424,7 @@ static void handle_connection(int socket_accept)
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < num_listenaddrs; i++) {
|
for (i = 0; i < num_listenaddrs; i++) {
|
||||||
Close(listen_socket[i]);
|
Close(listen_socket[i]);
|
||||||
@ -94,7 +103,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
rm_fd(&client_fdlist, listen_socket[i]);
|
rm_fd(&client_fdlist, listen_socket[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -528,9 +528,9 @@ static void handle_connection(int socket_accept)
|
@@ -468,9 +468,9 @@ static void handle_connection(int socket_accept)
|
||||||
#ifdef HAVE_OPENSSL
|
#ifdef HAVE_OPENSSL
|
||||||
if (o.ssl) {
|
if (o.ssl) {
|
||||||
/* Add the socket to the necessary descriptor lists. */
|
/* Add the socket to the necessary descriptor lists. */
|
||||||
@ -107,7 +116,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
/* Add it to our list of fds too for maintaining maxfd. */
|
/* Add it to our list of fds too for maintaining maxfd. */
|
||||||
if (add_fdinfo(&client_fdlist, &s) < 0)
|
if (add_fdinfo(&client_fdlist, &s) < 0)
|
||||||
bye("add_fdinfo() failed.");
|
bye("add_fdinfo() failed.");
|
||||||
@@ -563,10 +563,10 @@ static void post_handle_connection(struct fdinfo sinfo)
|
@@ -503,10 +503,10 @@ static void post_handle_connection(struct fdinfo sinfo)
|
||||||
} else {
|
} else {
|
||||||
/* Now that a client is connected, pay attention to stdin. */
|
/* Now that a client is connected, pay attention to stdin. */
|
||||||
if (!stdin_eof)
|
if (!stdin_eof)
|
||||||
@ -120,7 +129,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
/* add it to our list of fds for maintaining maxfd */
|
/* add it to our list of fds for maintaining maxfd */
|
||||||
#ifdef HAVE_OPENSSL
|
#ifdef HAVE_OPENSSL
|
||||||
/* Don't add it twice (see handle_connection above) */
|
/* Don't add it twice (see handle_connection above) */
|
||||||
@@ -578,7 +578,7 @@ static void post_handle_connection(struct fdinfo sinfo)
|
@@ -518,7 +518,7 @@ static void post_handle_connection(struct fdinfo sinfo)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -129,7 +138,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
if (add_fdinfo(&broadcast_fdlist, &sinfo) < 0)
|
if (add_fdinfo(&broadcast_fdlist, &sinfo) < 0)
|
||||||
bye("add_fdinfo() failed.");
|
bye("add_fdinfo() failed.");
|
||||||
|
|
||||||
@@ -603,7 +603,7 @@ int read_stdin(void)
|
@@ -543,7 +543,7 @@ int read_stdin(void)
|
||||||
logdebug("EOF on stdin\n");
|
logdebug("EOF on stdin\n");
|
||||||
|
|
||||||
/* Don't close the file because that allows a socket to be fd 0. */
|
/* Don't close the file because that allows a socket to be fd 0. */
|
||||||
@ -138,7 +147,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
/* Buf mark that we've seen EOF so it doesn't get re-added to the
|
/* Buf mark that we've seen EOF so it doesn't get re-added to the
|
||||||
select list. */
|
select list. */
|
||||||
stdin_eof = 1;
|
stdin_eof = 1;
|
||||||
@@ -656,14 +656,14 @@ int read_socket(int recv_fd)
|
@@ -596,14 +596,14 @@ int read_socket(int recv_fd)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
close(recv_fd);
|
close(recv_fd);
|
||||||
@ -156,7 +165,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
|
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
@@ -753,7 +753,7 @@ static int ncat_listen_dgram(int proto)
|
@@ -693,7 +693,7 @@ static int ncat_listen_dgram(int proto)
|
||||||
logdebug("do_listen(\"%s\"): %s\n", inet_ntop_ez(&listenaddrs[i].storage, sizeof(listenaddrs[i].storage)), socket_strerror(socket_errno()));
|
logdebug("do_listen(\"%s\"): %s\n", inet_ntop_ez(&listenaddrs[i].storage, sizeof(listenaddrs[i].storage)), socket_strerror(socket_errno()));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -165,7 +174,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
add_fd(&listen_fdlist, sockfd[num_sockets].fd);
|
add_fd(&listen_fdlist, sockfd[num_sockets].fd);
|
||||||
sockfd[num_sockets].addr = listenaddrs[i];
|
sockfd[num_sockets].addr = listenaddrs[i];
|
||||||
num_sockets++;
|
num_sockets++;
|
||||||
@@ -773,14 +773,14 @@ static int ncat_listen_dgram(int proto)
|
@@ -713,14 +713,14 @@ static int ncat_listen_dgram(int proto)
|
||||||
|
|
||||||
if (fdn != -1) {
|
if (fdn != -1) {
|
||||||
/*remove socket descriptor which is burnt */
|
/*remove socket descriptor which is burnt */
|
||||||
@ -182,7 +191,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
add_fd(&listen_fdlist, sockfd[fdn].fd);
|
add_fd(&listen_fdlist, sockfd[fdn].fd);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -818,7 +818,7 @@ static int ncat_listen_dgram(int proto)
|
@@ -758,7 +758,7 @@ static int ncat_listen_dgram(int proto)
|
||||||
*/
|
*/
|
||||||
for (i = 0; i <= listen_fdlist.fdmax && fds_ready > 0; i++) {
|
for (i = 0; i <= listen_fdlist.fdmax && fds_ready > 0; i++) {
|
||||||
/* Loop through descriptors until there is something ready */
|
/* Loop through descriptors until there is something ready */
|
||||||
@ -191,7 +200,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Check each listening socket */
|
/* Check each listening socket */
|
||||||
@@ -911,8 +911,8 @@ static int ncat_listen_dgram(int proto)
|
@@ -856,8 +856,8 @@ static int ncat_listen_dgram(int proto)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,7 +211,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
fdmax = socket_n;
|
fdmax = socket_n;
|
||||||
|
|
||||||
/* stdin -> socket and socket -> stdout */
|
/* stdin -> socket and socket -> stdout */
|
||||||
@@ -932,7 +932,7 @@ static int ncat_listen_dgram(int proto)
|
@@ -877,7 +877,7 @@ static int ncat_listen_dgram(int proto)
|
||||||
if (fds_ready == 0)
|
if (fds_ready == 0)
|
||||||
bye("Idle timeout expired (%d ms).", o.idletimeout);
|
bye("Idle timeout expired (%d ms).", o.idletimeout);
|
||||||
|
|
||||||
@ -211,7 +220,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
nbytes = Read(STDIN_FILENO, buf, sizeof(buf));
|
nbytes = Read(STDIN_FILENO, buf, sizeof(buf));
|
||||||
if (nbytes <= 0) {
|
if (nbytes <= 0) {
|
||||||
if (nbytes < 0 && o.verbose) {
|
if (nbytes < 0 && o.verbose) {
|
||||||
@@ -940,7 +940,7 @@ static int ncat_listen_dgram(int proto)
|
@@ -885,7 +885,7 @@ static int ncat_listen_dgram(int proto)
|
||||||
} else if (nbytes == 0 && o.debug) {
|
} else if (nbytes == 0 && o.debug) {
|
||||||
logdebug("EOF on stdin\n");
|
logdebug("EOF on stdin\n");
|
||||||
}
|
}
|
||||||
@ -220,7 +229,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
if (nbytes < 0)
|
if (nbytes < 0)
|
||||||
return 1;
|
return 1;
|
||||||
continue;
|
continue;
|
||||||
@@ -964,7 +964,7 @@ static int ncat_listen_dgram(int proto)
|
@@ -909,7 +909,7 @@ static int ncat_listen_dgram(int proto)
|
||||||
tempbuf = NULL;
|
tempbuf = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -229,7 +238,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
nbytes = recv(socket_n, buf, sizeof(buf), 0);
|
nbytes = recv(socket_n, buf, sizeof(buf), 0);
|
||||||
if (nbytes < 0) {
|
if (nbytes < 0) {
|
||||||
loguser("%s.\n", socket_strerror(socket_errno()));
|
loguser("%s.\n", socket_strerror(socket_errno()));
|
||||||
@@ -1048,7 +1048,7 @@ static void read_and_broadcast(int recv_fd)
|
@@ -993,7 +993,7 @@ static void read_and_broadcast(int recv_fd)
|
||||||
|
|
||||||
/* Don't close the file because that allows a socket to be
|
/* Don't close the file because that allows a socket to be
|
||||||
fd 0. */
|
fd 0. */
|
||||||
@ -238,7 +247,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
/* But mark that we've seen EOF so it doesn't get re-added to
|
/* But mark that we've seen EOF so it doesn't get re-added to
|
||||||
the select list. */
|
the select list. */
|
||||||
stdin_eof = 1;
|
stdin_eof = 1;
|
||||||
@@ -1075,14 +1075,14 @@ static void read_and_broadcast(int recv_fd)
|
@@ -1020,14 +1020,14 @@ static void read_and_broadcast(int recv_fd)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
close(recv_fd);
|
close(recv_fd);
|
||||||
@ -256,7 +265,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
|
|
||||||
if (o.chat)
|
if (o.chat)
|
||||||
chat_announce_disconnect(recv_fd);
|
chat_announce_disconnect(recv_fd);
|
||||||
@@ -1113,7 +1113,7 @@ static void read_and_broadcast(int recv_fd)
|
@@ -1058,7 +1058,7 @@ static void read_and_broadcast(int recv_fd)
|
||||||
|
|
||||||
/* Send to everyone except the one who sent this message. */
|
/* Send to everyone except the one who sent this message. */
|
||||||
broadcastfds = master_broadcastfds;
|
broadcastfds = master_broadcastfds;
|
||||||
@ -265,7 +274,7 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
ncat_broadcast(&broadcastfds, &broadcast_fdlist, outbuf, n);
|
ncat_broadcast(&broadcastfds, &broadcast_fdlist, outbuf, n);
|
||||||
|
|
||||||
free(chatbuf);
|
free(chatbuf);
|
||||||
@@ -1128,7 +1128,7 @@ static void shutdown_sockets(int how)
|
@@ -1073,7 +1073,7 @@ static void shutdown_sockets(int how)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i <= broadcast_fdlist.fdmax; i++) {
|
for (i = 0; i <= broadcast_fdlist.fdmax; i++) {
|
||||||
@ -274,20 +283,20 @@ index 1e0c22f..bf4d54f 100644
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
fdn = get_fdinfo(&broadcast_fdlist, i);
|
fdn = get_fdinfo(&broadcast_fdlist, i);
|
||||||
@@ -1153,7 +1153,7 @@ static int chat_announce_connect(int fd, const union sockaddr_u *su)
|
@@ -1098,7 +1098,7 @@ static int chat_announce_connect(int fd, const union sockaddr_u *su)
|
||||||
union sockaddr_u su;
|
union sockaddr_u tsu;
|
||||||
socklen_t len = sizeof(su.storage);
|
socklen_t len = sizeof(tsu.storage);
|
||||||
|
|
||||||
- if (i == fd || !FD_ISSET(i, &master_broadcastfds))
|
- if (i == fd || !FD_ISSET(i, &master_broadcastfds))
|
||||||
+ if (i == fd || !checked_fd_isset(i, &master_broadcastfds))
|
+ if (i == fd || !checked_fd_isset(i, &master_broadcastfds))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (getpeername(i, &su.sockaddr, &len) == -1)
|
if (getpeername(i, &tsu.sockaddr, &len) == -1)
|
||||||
diff --git a/ncat/ncat_posix.c b/ncat/ncat_posix.c
|
diff --git a/ncat/ncat_posix.c b/ncat/ncat_posix.c
|
||||||
index 12207c0..9709e63 100644
|
index b9fc3bc0b3..4f5641e4ac 100644
|
||||||
--- a/ncat/ncat_posix.c
|
--- a/ncat/ncat_posix.c
|
||||||
+++ b/ncat/ncat_posix.c
|
+++ b/ncat/ncat_posix.c
|
||||||
@@ -273,8 +273,8 @@ void netexec(struct fdinfo *info, char *cmdexec)
|
@@ -205,8 +205,8 @@ void netexec(struct fdinfo *info, char *cmdexec)
|
||||||
int r, n_r;
|
int r, n_r;
|
||||||
|
|
||||||
FD_ZERO(&fds);
|
FD_ZERO(&fds);
|
||||||
@ -298,7 +307,7 @@ index 12207c0..9709e63 100644
|
|||||||
|
|
||||||
r = fselect(maxfd + 1, &fds, NULL, NULL, NULL);
|
r = fselect(maxfd + 1, &fds, NULL, NULL, NULL);
|
||||||
if (r == -1) {
|
if (r == -1) {
|
||||||
@@ -283,7 +283,7 @@ void netexec(struct fdinfo *info, char *cmdexec)
|
@@ -215,7 +215,7 @@ void netexec(struct fdinfo *info, char *cmdexec)
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -307,7 +316,7 @@ index 12207c0..9709e63 100644
|
|||||||
int pending;
|
int pending;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@@ -293,7 +293,7 @@ void netexec(struct fdinfo *info, char *cmdexec)
|
@@ -225,7 +225,7 @@ void netexec(struct fdinfo *info, char *cmdexec)
|
||||||
write_loop(child_stdin[1], buf, n_r);
|
write_loop(child_stdin[1], buf, n_r);
|
||||||
} while (pending);
|
} while (pending);
|
||||||
}
|
}
|
||||||
@ -317,10 +326,10 @@ index 12207c0..9709e63 100644
|
|||||||
n_r = read(child_stdout[0], buf, sizeof(buf));
|
n_r = read(child_stdout[0], buf, sizeof(buf));
|
||||||
if (n_r <= 0)
|
if (n_r <= 0)
|
||||||
diff --git a/ncat/ncat_proxy.c b/ncat/ncat_proxy.c
|
diff --git a/ncat/ncat_proxy.c b/ncat/ncat_proxy.c
|
||||||
index 72fe2ea..51ad9c4 100644
|
index 5ba10a61ad..befcf902a5 100644
|
||||||
--- a/ncat/ncat_proxy.c
|
--- a/ncat/ncat_proxy.c
|
||||||
+++ b/ncat/ncat_proxy.c
|
+++ b/ncat/ncat_proxy.c
|
||||||
@@ -234,7 +234,7 @@ int ncat_http_server(void)
|
@@ -166,7 +166,7 @@ int ncat_http_server(void)
|
||||||
unblock_socket(listen_socket[num_sockets]);
|
unblock_socket(listen_socket[num_sockets]);
|
||||||
|
|
||||||
/* setup select sets and max fd */
|
/* setup select sets and max fd */
|
||||||
@ -329,7 +338,7 @@ index 72fe2ea..51ad9c4 100644
|
|||||||
add_fd(&listen_fdlist, listen_socket[num_sockets]);
|
add_fd(&listen_fdlist, listen_socket[num_sockets]);
|
||||||
|
|
||||||
num_sockets++;
|
num_sockets++;
|
||||||
@@ -267,7 +267,7 @@ int ncat_http_server(void)
|
@@ -199,7 +199,7 @@ int ncat_http_server(void)
|
||||||
|
|
||||||
for (i = 0; i <= listen_fdlist.fdmax && fds_ready > 0; i++) {
|
for (i = 0; i <= listen_fdlist.fdmax && fds_ready > 0; i++) {
|
||||||
/* Loop through descriptors until there is something ready */
|
/* Loop through descriptors until there is something ready */
|
||||||
@ -338,7 +347,7 @@ index 72fe2ea..51ad9c4 100644
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Check each listening socket */
|
/* Check each listening socket */
|
||||||
@@ -525,8 +525,8 @@ static int handle_connect(struct socket_buffer *client_sock,
|
@@ -457,8 +457,8 @@ static int handle_connect(struct socket_buffer *client_sock,
|
||||||
|
|
||||||
maxfd = client_sock->fdn.fd < s ? s : client_sock->fdn.fd;
|
maxfd = client_sock->fdn.fd < s ? s : client_sock->fdn.fd;
|
||||||
FD_ZERO(&m);
|
FD_ZERO(&m);
|
||||||
@ -349,7 +358,7 @@ index 72fe2ea..51ad9c4 100644
|
|||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
|
||||||
@@ -540,7 +540,7 @@ static int handle_connect(struct socket_buffer *client_sock,
|
@@ -472,7 +472,7 @@ static int handle_connect(struct socket_buffer *client_sock,
|
||||||
|
|
||||||
zmem(buf, sizeof(buf));
|
zmem(buf, sizeof(buf));
|
||||||
|
|
||||||
@ -358,7 +367,7 @@ index 72fe2ea..51ad9c4 100644
|
|||||||
do {
|
do {
|
||||||
do {
|
do {
|
||||||
len = fdinfo_recv(&client_sock->fdn, buf, sizeof(buf));
|
len = fdinfo_recv(&client_sock->fdn, buf, sizeof(buf));
|
||||||
@@ -556,7 +556,7 @@ static int handle_connect(struct socket_buffer *client_sock,
|
@@ -488,7 +488,7 @@ static int handle_connect(struct socket_buffer *client_sock,
|
||||||
} while (fdinfo_pending(&client_sock->fdn));
|
} while (fdinfo_pending(&client_sock->fdn));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
From 33f421fd6e68fcb8ed50071661d9704717c81b2b Mon Sep 17 00:00:00 2001
|
|
||||||
From: dmiller <dmiller@e0a8ed71-7df4-0310-8962-fdc924857419>
|
|
||||||
Date: Tue, 3 Dec 2019 17:04:13 +0000
|
|
||||||
Subject: [PATCH] Avoid assertion failure when unsolicited ARP response
|
|
||||||
received
|
|
||||||
|
|
||||||
We probably want a more explicit handling of the case where we get an
|
|
||||||
ARP response to a request that we did not send (system's own, or another
|
|
||||||
Nmap scan running at the same time). In any case, this ought to solve
|
|
||||||
the crashes reported as #1797 and #1764.
|
|
||||||
---
|
|
||||||
scan_engine.cc | 7 ++++++-
|
|
||||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/scan_engine.cc b/scan_engine.cc
|
|
||||||
index bd73cc8ead..7a4766da26 100644
|
|
||||||
--- a/scan_engine.cc
|
|
||||||
+++ b/scan_engine.cc
|
|
||||||
@@ -1275,7 +1275,12 @@ int UltraScanInfo::removeCompletedHosts() {
|
|
||||||
}
|
|
||||||
if (timedout)
|
|
||||||
gstats->num_hosts_timedout++;
|
|
||||||
- hss->target->stopTimeOutClock(&now);
|
|
||||||
+ /* We may have received an ARP response before we sent a probe, which
|
|
||||||
+ * would mean the timeout clock is not running. Avoid an assertion
|
|
||||||
+ * failure here by checking first. */
|
|
||||||
+ if (hss->target->timeOutClockRunning()) {
|
|
||||||
+ hss->target->stopTimeOutClock(&now);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return hostsRemoved;
|
|
16
nmap.spec
16
nmap.spec
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
Name: nmap
|
Name: nmap
|
||||||
Epoch: 3
|
Epoch: 3
|
||||||
Version: 7.80
|
Version: 7.91
|
||||||
#global prerelease TEST5
|
#global prerelease TEST5
|
||||||
Release: 11%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Network exploration tool and security scanner
|
Summary: Network exploration tool and security scanner
|
||||||
URL: http://nmap.org/
|
URL: http://nmap.org/
|
||||||
# Uses combination of licenses based on GPL license, but with extra modification
|
# Uses combination of licenses based on GPL license, but with extra modification
|
||||||
@ -28,11 +28,10 @@ Patch2: nmap-4.52-noms.patch
|
|||||||
# upstream provided patch for rhbz#845005, not yet in upstream repository
|
# upstream provided patch for rhbz#845005, not yet in upstream repository
|
||||||
Patch3: ncat_reg_stdin.diff
|
Patch3: ncat_reg_stdin.diff
|
||||||
Patch4: nmap-6.25-displayerror.patch
|
Patch4: nmap-6.25-displayerror.patch
|
||||||
# https://github.com/nmap/nmap/commit/33f421fd6e68fcb8ed50071661d9704717c81b2b.patch
|
|
||||||
Patch5: nmap-unsolicited_arp_assert.patch
|
|
||||||
Patch6: nmap-safe_fd_functions.patch
|
|
||||||
# https://github.com/nmap/nmap/pull/2247
|
# https://github.com/nmap/nmap/pull/2247
|
||||||
Patch7: nmap_resolve_config.patch
|
Patch7: nmap_resolve_config.patch
|
||||||
|
## https://github.com/nmap/nmap/commit/28bfe0dfd26dbc4e9917db9ad5457ab496769d24.patch
|
||||||
|
Patch9: nmap-safe_fd_functions.patch
|
||||||
|
|
||||||
|
|
||||||
BuildRequires: automake make
|
BuildRequires: automake make
|
||||||
@ -138,7 +137,7 @@ if [ $1 -eq 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%files -f nmap.lang
|
%files -f nmap.lang
|
||||||
%license COPYING*
|
%license LICENSE
|
||||||
%doc docs/README
|
%doc docs/README
|
||||||
%doc docs/nmap.usage.txt
|
%doc docs/nmap.usage.txt
|
||||||
%{_bindir}/nmap
|
%{_bindir}/nmap
|
||||||
@ -148,7 +147,7 @@ fi
|
|||||||
%{_datadir}/nmap
|
%{_datadir}/nmap
|
||||||
|
|
||||||
%files ncat
|
%files ncat
|
||||||
%license COPYING
|
%license LICENSE
|
||||||
%doc ncat/docs/AUTHORS ncat/docs/README ncat/docs/THANKS ncat/docs/examples
|
%doc ncat/docs/AUTHORS ncat/docs/README ncat/docs/THANKS ncat/docs/examples
|
||||||
%ghost %{_bindir}/nc
|
%ghost %{_bindir}/nc
|
||||||
%{_bindir}/ncat
|
%{_bindir}/ncat
|
||||||
@ -156,6 +155,9 @@ fi
|
|||||||
%{_mandir}/man1/ncat.1.gz
|
%{_mandir}/man1/ncat.1.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 8 2021 Pavel Zhukov <pzhukov@redhat.com> - 3:7.91-1
|
||||||
|
- Bring 7.91 back
|
||||||
|
|
||||||
* Sun Mar 07 2021 Robert Scheck <robert@fedoraproject.org> - 3:7.80-11
|
* Sun Mar 07 2021 Robert Scheck <robert@fedoraproject.org> - 3:7.80-11
|
||||||
- Manage nc symlink using alternatives (#1653119)
|
- Manage nc symlink using alternatives (#1653119)
|
||||||
|
|
||||||
|
95
nmap_gpgkeys.txt
Normal file
95
nmap_gpgkeys.txt
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
GPG detached signatures and MD5/SHA-1 hashes for each Nmap release are
|
||||||
|
available from https://nmap.org/dist/sigs/?C=M;O=D . The
|
||||||
|
releases are signed by the Nmap project GPG key (KeyId 6B9355D0).
|
||||||
|
Some messages to Nmap mailing lists may be signed by Nmap author and
|
||||||
|
maintainer Fyodor. Fyodor's KeyID is 33599B5F. Those two keys and
|
||||||
|
their fingerprints are reproduced below. The latest version of this
|
||||||
|
file is always available at
|
||||||
|
https://nmap.org/data/nmap_gpgkeys.txt .
|
||||||
|
|
||||||
|
To verify a file with GPG, obtain and import the keys with a command
|
||||||
|
such as "gpg --import nmap_gpgkeys.txt" and then verify the obtained
|
||||||
|
files as shown in this example:
|
||||||
|
|
||||||
|
> gpg --verify nmap-3.81.tar.bz2.gpg.txt nmap-3.81.tar.bz2
|
||||||
|
gpg: Signature made Sat 23 Apr 2005 11:34:32 PM PDT using DSA key ID 6B9355D0
|
||||||
|
gpg: Good signature from "Nmap Project Signing Key (http://www.insecure.org/)"
|
||||||
|
|
||||||
|
Here are the GPG keys for the Nmap Project and Fyodor:
|
||||||
|
|
||||||
|
pub 1024D/6B9355D0 2005-04-24
|
||||||
|
Key fingerprint = 436D 66AB 9A79 8425 FDA0 E3F8 01AF 9F03 6B93 55D0
|
||||||
|
uid Nmap Project Signing Key (http://www.insecure.org/)
|
||||||
|
sub 2048g/A50A6A94 2005-04-24
|
||||||
|
|
||||||
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
Version: GnuPG v1.4.1 (GNU/Linux)
|
||||||
|
|
||||||
|
mQGiBEJrBfgRBADogo5DEoGsm2C3OC3NoKBQ0J7Ixp/cymuMeGQmDhqP6Vfmxmso
|
||||||
|
BGln4nhDr3WMDW76Q2p6dHTZEbWx3NAna8q3wa3PrPTVRcmEgEgUd8y086I33NqW
|
||||||
|
BV5Fz4bvPWtSGc/4MxXwac+XqrGY+iTkaO3sd4/eEKa/KkJlXpIGAbGbZwCgq9HS
|
||||||
|
bHctYmUWmvz1YXJmFlQvnTsD/RRyTlnQ/AOpq2XPYy5AlUzHMWAef2Dt+wXYKSjp
|
||||||
|
zvqVWtl8QigrWSOP3ia39v+rDUF/CHb1U8mmx9XzRpy9KgS99Wi4IUnBCYM/e/IP
|
||||||
|
K5ReAoNoPMjLmLU4cxYzOxF1yzuSFvhXiKVy/QW6Qo9AP9YdlhlxxXrJA+HrAcXb
|
||||||
|
UE/SBACsoJRsIEyzcfm7Y/KA11enEhxo2nVZ/HpJCq8RHcaXxWFaCglKlydNaw1S
|
||||||
|
vlZkLggRXQrig6aHgVva3WC+gSYMk+SPtzYNrjWiDE+v+DoEFdNEuO8DXScTMGmB
|
||||||
|
pmUtZNWGoK9ewo9kE/ccGDl6lmrxfC9x2nYFHlCvV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nDVUnUs31S8kQ/6PhZP8ldn47W2CakHSA3S/M99A
|
||||||
|
gltKiG6MR2z018fqD8FJC3tLiEkEGBECAAkFAkJrBfoCGwwACgkQAa+fA2uTVdBM
|
||||||
|
QgCfciVPJeohzn5mJ4WGE/6B1CyCOIYAn2ghTW1IKTP+tfOgxVg/p8HJOoiz
|
||||||
|
=18Dk
|
||||||
|
-----END PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
|
|
||||||
|
pub 1024D/33599B5F 2005-04-24
|
||||||
|
Key fingerprint = BB61 D057 C0D7 DCEF E730 996C 1AF6 EC50 3359 9B5F
|
||||||
|
uid Fyodor <fyodor@insecure.org>
|
||||||
|
sub 2048g/D3C2241C 2005-04-24
|
||||||
|
|
||||||
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
Version: GnuPG v1.4.1 (GNU/Linux)
|
||||||
|
|
||||||
|
mQGiBEJrBG4RBADfjVQenTh2v1NK2N0Wi83pGMm0u/IDDX8eT8lxSR+XdevdcK+F
|
||||||
|
bRhVh+tMhTo1T2OoZkBfYj+OVCWsBZlIxZtGycWaGAwn3MbUEiUJD0YVv4pm4KVk
|
||||||
|
HEZSOYEkzUFIw3IP03Cv6wBDrhk5lAu99+sK0iQGeHGw+gBhIuA3axSeBwCgn86p
|
||||||
|
r+C4P3w61musiflp1SosfSsEALwyE7o60S105UTijAn5tswqecZlumQAxQ+DIeC+
|
||||||
|
9F8mSujIZn8xb1wJtaZb2F0HU0vd67BaOIDXqO7KVe6Tx6JKf5zup2vaGRvUspNv
|
||||||
|
V8CLuSbT7WnnvTBM5dfBMTJw6xLjOsSTk65Q24xcTJ3f2efnYy9imAMl7EzhalBE
|
||||||
|
11pfBADVLuhe6rUpRrhaMJRXZJLdE9A2zcHWtM0X3DDe6QhaWU94JivtORKtleGv
|
||||||
|
atGu4or9jwIhXixeBsvu7RP3bWog5jiLgUWJrvJNeLcFQqIWTtIdh5iuInzezxbg
|
||||||
|
Fvst2YIdUr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6pD1HCgyJV0aG
|
||||||
|
jhQdmfkp+fYEibPWrIGTsayQnYiCrVo3W7C7ZplekoAJkcN0rnfJeV1+kj694XSe
|
||||||
|
U6oYj9RaNoTV1xt1lx5Rwl00HwEYHWAsGmT6+pWmbXo5PT7N7OfcmtclICBsrcjC
|
||||||
|
hKcn6WdTitUR+uOXgL+86Th4W/FYdIXAyyC9KTXhMDmfiEkEGBECAAkFAkJrBHIC
|
||||||
|
GwwACgkQGvbsUDNZm19xAgCeNmaeak8iviUmHje1YAePwEFGleEAn26n8sNrVole
|
||||||
|
NtNX5k7XyTWBQUdG
|
||||||
|
=cBzb
|
||||||
|
-----END PGP PUBLIC KEY BLOCK-----
|
4
sources
4
sources
@ -1,3 +1 @@
|
|||||||
SHA512 (nmap-7.80.tar.bz2.asc) = e55e371a0c7faa08535e8a3c182a3723b90d1beec0489e5aa432c604c0fbda5f3ff187e6a6bc7fbc56f4ae00bca2ca392d955f6578ebf7ffb75c8067b411ed02
|
SHA512 (nmap-7.91.tar.bz2) = 9d59f031b5f748311e9f9a0b9d05ad4a7a70fc6ac17598d7c4c81a4825c95d53817d74435d839e67b9379a052f2d37889fd634f9c75301a851f465d60fb9974d
|
||||||
SHA512 (nmap_gpgkeys.txt) = ab9dddbedb7c74697ae1ec68e456e3d607c057b4ca9a3bf0269a9fde0289e81031ec15718da2686aa7a68b5428e95042072c53f93925439ba6b60abf43e61317
|
|
||||||
SHA512 (nmap-7.80.tar.bz2) = d4384d3ebf4f3abf3588eed5433f733874ecdceb9342a718dc36db19634b0cc819d73399974eb0a9a9c9dd9e5c88473e07644ec91db28b0c072552b54430be6b
|
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
USER=root
|
|
||||||
PROGRAM=/usr/bin/zenmap
|
|
||||||
SESSION=true
|
|
||||||
FALLBACK=true
|
|
Loading…
Reference in New Issue
Block a user