mirror of
https://github.com/nmap/nmap.git
synced 2026-02-03 12:06:35 +00:00
77119bb4d863fb9a2c3ba7813bc6188934f07753
and broadcast lists when a connection is broken, instead of re-reading the descriptor from the fdinfo struct. The problem was that there were two calls to rm_fd, and the first one invalidated the data that the struct pointer pointed to. For some reason this didn't cause any problems in most situations. Mak Kolybabi reported that it caused a segfault in ncat -l --ssl -k -v 5061 > /dev/null < /dev/zero With SSL, new connections would try to read memory that was previously freed, as descriptors were not being removed from the broadcast list as they were removed from the read list. You can see the error in these debug logs: NCAT DEBUG: Closing connection. NCAT DEBUG: Swapping fd[2] (4) with fd[3] (5) NCAT DEBUG: Removed fd 4 from list, nfds 3, maxfd 5 NCAT DEBUG: Swapping fd[1] (5) with fd[1] (5) NCAT DEBUG: Removed fd 5 from list, nfds 1, maxfd 4 The "Remove fd X" should have the same X in both lines.
Modified UDP-payload-related code to make it independent of the NmapOps class so it can be reused by other apps like Nping. More info at http://seclists.org/nmap-dev/2009/q3/0051.html
Here is some documentation for Nmap, but these files are much less comprehensive than what you'll find at the actual Nmap documentation site ( http://nmap.org ).
Description
Languages
C
37.5%
Lua
28.1%
C++
16.8%
Shell
5.8%
Python
4.2%
Other
7.3%