mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Fix a use-after-free in idle and ftp bounce scans
PortList::forgetPort in verbose mode tries to print details on a Port after it has been deleted. This function is only called in idle and ftp bounce scans. Reported by Mak Kolybabi: http://seclists.org/nmap-dev/2015/q1/129
This commit is contained in:
parent
5c486b83cb
commit
29174ba87d
1 changed files with 1 additions and 2 deletions
|
|
@ -721,8 +721,6 @@ int PortList::forgetPort(u16 portno, u8 protocol) {
|
|||
state_counts_proto[protocol][answer->state]--;
|
||||
state_counts_proto[protocol][default_port_state[protocol].state]++;
|
||||
|
||||
delete answer;
|
||||
|
||||
port_list[protocol][portno] = NULL;
|
||||
|
||||
if (o.verbose) {
|
||||
|
|
@ -732,6 +730,7 @@ int PortList::forgetPort(u16 portno, u8 protocol) {
|
|||
log_flush(LOG_STDOUT);
|
||||
}
|
||||
|
||||
delete answer;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue