1 (edited by SheldonCooper 2013-02-26 01:26:50)

Topic: uninitialized variables in Sniffer Application

Hey All,
I have been using the Sniffer Application over the past few months - I noticed that once in a very long time, the application crushes with a seg fault. I have set up a testing environment and by inspecting the core files I have discovered the following variables were uninitialized and most likely have caused the seg fault (I was unable to reproduce the crush after fixing those):
in src/Internal.c:
in function InitSSL - need to add:

ssl->keys.encryptSz = 0;
InitCipherSpecs(&(ssl->specs));

I suspect that after a long enough time, a new session is allocated with a "dirty" encryptSz and this causes a memory corruption followed by a seg fault later on.

second initialization required is interesting: the function "InitCipherSpecs" is actually supplied in the sniffer application but never used, I just added a call in the SSL object initialization method and it appears to have resolved the second seg fault i have encountered.

thanks in advance for considering these additions,

Dan

Share

Re: uninitialized variables in Sniffer Application

Thanks for the suggestions!  We've added those to the github dev branch.  How are you using the ssl sniffer?  Thanks again.

Share

Re: uninitialized variables in Sniffer Application

Hey,
sry for the late reply.
I am using the sniffer application in order to monitor one of my servers for personal use. since I am using it rather constantly, I am encountering some of these errors.


thanks,
Dan

Share