Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re[2]: SECURITY.NNOV: Multiple applications fd_set structure bitmap array index overflow |
|---|---|
| Date: | Sun, 30 Jan 2005 14:56:19 +0300 |
Dear David LeBlanc, You're absolutely right, there is no buffer overflow under Windows. I just want to point checking FD_SETSIZE before select() and it's macros should become good coding practice for both Windows and Unix. Currently it's not. If Windows application uses select() and doesn't check FD_SETSIZE it will misbehave, because there is no chance to check FD_SET result. As an example it may lead to sockets leak and DoS through resource consumption. Windows example in advisory was given mostly to explain strange Cygwin approach. Cygwin defines FD_SETSIZE as 64, but exports Unix style bitmap-based fd_set structure and FD_SET macro without FD_SETSIZE checking in headers. It's because later it's converted to Windows-style fd_set structure before using winsock's select(). It's extremely dangerous, cygwin-ported server should not be used in production environment. --Saturday, January 29, 2005, 12:00:12 AM, you wrote to 3APA3A@security.nnov.ru: DL> defines maximum number of sockets in this array. So, Windows DL> application may be vulnerable only if it places a large number of DL> sockets into same fd_set structure (finite state machine DL> architecture).
For Windows default FD_SETSIZE is 64 and select() is only
DL> POSIX-complatible function to wait on socket input (there is no poll(),
DL> but there are Windows specific functions).
DL> [snip]
DL> if (((fd_set FAR *)(set))->fd_count < FD_SETSIZE) { \
DL> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DL> So if you attempted to put FD_SETSIZE + 1 sockets into an fd_set, it
DL> would just fail.
--
~/ZARAZA
Да, ему чертовски повезло. Эх и паршиво б ему пришлось если бы он выжил! (Твен)
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | drone armies C&C report - Jan/2005, Gadi Evron |
|---|---|
| Next by Date: | Re: SECURITY.NNOV: Multiple applications fd_set structure bitmap array index overflow, Casper . Dik |
| Previous by Thread: | Re: SECURITY.NNOV: Multiple applications fd_set structure bitmap array index overflow, Damien Miller |
| Next by Thread: | RE: SECURITY.NNOV: Multiple applications fd_set structure bitmap array index overflow, David LeBlanc |
| Indexes: | [Date] [Thread] [Top] [All Lists] |