sonertari / SSLproxy

Transparent SSL/TLS proxy for decrypting and diverting network traffic to other programs, such as UTM services, for deep SSL inspection
BSD 2-Clause "Simplified" License
377 stars 98 forks source link

possible memory leak? #72

Open applehxb opened 2 weeks ago

applehxb commented 2 weeks ago

Excuse me, why smtp and pop3 protocols do not register proto_free functions like HTTP protocols, will this cause ctx->protoctx->arg memory leaks of smtp and pop3 protocols ?

sonertari commented 2 weeks ago

Yes, I think you're right, that is expected to cause memory leaks. I'll check again to see if I'm missing something. If not, I should create proto_free functions for them too. Good catch, thanks. Btw, how did you find this issue, manual inspection or a tool like valgrind?

sonertari commented 1 week ago

Fixed now, thanks

applehxb commented 1 week ago

Yes, I think you're right, that is expected to cause memory leaks. I'll check again to see if I'm missing something. If not, I should create proto_free functions for them too. Good catch, thanks. Btw, how did you find this issue, manual inspection or a tool like valgrind?

Very glad to receive your reply. I didn't find the issue by tool, just with code review. I am very interested in the SSLproxy project, which is excellent. I am recently interested in SSL proxy, mail protocol proxy, mail content filtering, so I am learning this project code. Btw, currently this project supports SMTP/POP3, will IMAP be supported in the future? Thank you very much.

sonertari commented 1 week ago

IMAP has been in my todo list for more than 4 years now, but there are more important todo items in the list, so I wouldn't expect it any time soon.

sonertari commented 1 week ago

Btw, you can use tcp and ssl proxyspecs for imap and imaps protocols. I've never tried myself, but if we don't have to do anything special for IMAP, it should work. (But we do special things for smtp for request/response packets and protocol validation, as I guess you have seen.)