Re: Crash in AsyncSocket when scanning with nmap
Re: Crash in AsyncSocket when scanning with nmap
- Subject: Re: Crash in AsyncSocket when scanning with nmap
- From: "Martin Redington" <email@hidden>
- Date: Thu, 8 Feb 2007 23:36:34 +0000
Have you checked the result CFSocketCopyPeerAddress.
doh! That looks very likely to be the cause.
It seems like when scanning with nmap, the calls to retrieve the
socket sometimes succeed and sometimes fails. In the latter case,
AsyncSocket prints an error message, but in either case, AsyncSocket
rolls on, retrieves the peer, doesn't check the return value, and then
calls the addressPort method on the peer, which always crashes in
either case.
Fixing that leaves another nmap related crasher in AsyncSocket, when a
CFStreamEvent callback gets called for the CFReadStream, and
CFReadStreamGetError is called with a NULL CFReadStream as argument.
Patching to avoid that fixes the nmap crashes completely for me so far.
Thanks for the pointer!
cheers,
m.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden