Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:
edgeos



Nmap Development: Re: [BUG] NSE/Nsock filehandle exhaustion

Re: [BUG] NSE/Nsock filehandle exhaustion

From: majek04 <majek04_at_gmail.com>
Date: Thu, 30 Aug 2007 20:45:34 +0200

On 8/28/07, Brandon Enright <bmenrigh_at_ucsd.edu> wrote:
> Maybe there needs to be some (tunable) cap on the number parallel NSE
> scripts or number of sockets allowed open by NSE at a time. I'm thinking
> that nmap.new_socket() could block if the number of connected/open sockets
> goes above some threshold.
>
> Brandon

Hi!

I implemented it exactly as you proposed. nsock_connect blocks when the
number of opened connections exceeds some threshold.

For this moment this threshold is hardcoded in
#define NSOCK_DESCRIPTORS_THRESHOLD 768
(btw. in future maybe it's good idea to decrease this value to 1 for
easier nse debugging, you know, only one script running at a time)

My patch is rather hackish but it should work.
(It can run two times lua_yield on lua thread, but it seems that it isn't
bad, although it's not theoretically proper I think),

Cheers!
 Marek Majkowski

(patch attached)

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Received on Aug 30 2007
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]