drk1wi / portspoof

Portspoof
http://drk1wi.github.io/portspoof/
Other
964 stars 147 forks source link

Occasional segfault when starting #7

Closed PherricOxide closed 10 years ago

PherricOxide commented 11 years ago

There seems to be an occasional (it doesn't happen every time) segfault when loading.

-> Using user defined configuration file /home/pherricoxide/Code/portspoof/tools/portspoof.conf
-> Using user defined signature file /home/pherricoxide/Code/portspoof/tools/portspoof_signatures
-> Verbose mode on.

Program received signal SIGSEGV, Segmentation fault.
revregex_bracket (str=str@entry=0xde9a40 "\\+OK POP3 server \\(Neon Mail Server System Advance ye_EHcL, a[\374\n\a\\) ready [-\\w_.]+\\. <\n", start_offset=<optimized out>, 
    end_offset=end_offset@entry=80, retlen=0x7f01ffffd5ac, retlen@entry=0x7fffffffd5ac) at revregex.cpp:271
271     *retlen=finsize;
(gdb) backtrace 
#0  revregex_bracket (str=str@entry=0xde9a40 "\\+OK POP3 server \\(Neon Mail Server System Advance ye_EHcL, a[\374\n\a\\) ready [-\\w_.]+\\. <\n", start_offset=<optimized out>, 
    end_offset=end_offset@entry=80, retlen=0x7f01ffffd5ac, retlen@entry=0x7fffffffd5ac) at revregex.cpp:271
#1  0x000000000040785d in revregex (param_str=param_str@entry=0xdea110 "\\+OK POP3 server \\(Neon Mail Server System Advance ([-\\w_.]+), [^)]*\\) ready ([-\\w_.]+)\\. <\n", 
    param_len=param_len@entry=0x7fffffffd5fc, start_offset=start_offset@entry=0, end_offset=end_offset@entry=91) at revregex.cpp:448
#2  0x0000000000407bb8 in process_signature (str=...) at revregex.cpp:578
#3  0x000000000040436b in Configuration::processSignatureFile (this=this@entry=0x64d010) at Configuration.cpp:278
#4  0x0000000000404953 in Configuration::processArgs (this=this@entry=0x64d010, argc=argc@entry=6, argv=argv@entry=0x7fffffffe078) at Configuration.cpp:173
#5  0x0000000000402b82 in main (argc=6, argv=0x7fffffffe078) at Portspoof.cpp:54
(gdb) 
PherricOxide commented 11 years ago

Might be related to #1?

drk1wi commented 11 years ago

Thx for this one. It's an old bug that I thought was fixed long time ago...

I am right now rewritting most of that code to both finally create a decent implementation for that functionality and support more than 1800 services (right now there is 8k) :)

drk1wi commented 11 years ago

This is somehow OS dependent. I will investigate it more throuroughly.