OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
[Dailydave] spike bug?

From: Avri (avri.schneidergmail.com)
Date: Tue Aug 09 2005 - 14:52:12 CDT


I found that adding these two lines:
=====
  if (fd==-1)
    return(0);
=====
in the beginning of s_fd_wait() (right after fd=current_spike->fd;)
fixes this segfault problem:

Program received signal SIGSEGV, Segmentation fault.
0x0804e78b in s_fd_wait () at spike.c:1510
1510 FD_SET(fd, &rfds);
(gdb) bt
#0 0x0804e78b in s_fd_wait () at spike.c:1510
#1 0x0804e63e in s_fd_clear () at spike.c:1440
#2 0x0804e3bb in spike_close_tcp () at spike.c:1312
#3 0x0804b20e in main (argc=6, argv=0xbf99c094) at generic_send_tcp.c:152
====

Notice that spike_close_tcp() does this: current_spike->fd=-1;
and then in s_fd_wait() it tries to write to this fd...
  FD_SET(fd, &rfds);

I searched for "spike segmentation fault" in google and found this:
http://archives.neohapsis.com/archives/apps/spike/2003-q3/0012.html

I beleive he had the same problem...

Regards,
Avri
_______________________________________________
Dailydave mailing list
Dailydavelists.immunitysec.com
https://lists.immunitysec.com/mailman/listinfo/dailydave