-
-
Notifications
You must be signed in to change notification settings - Fork 93
Fix writing to tls socket #1849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
There are 2 ways to fix this. This is the 2nd way: Please review and tell me, which way you prefer. |
|
if you dont know also, then pick the 1st way of fix, thats the PR in its current state. What i want to avoid is this PR getting stuck because of no decision on that matter. |
|
I hunted some more. Line 95 in 890e7e4
|
|
Can you resolve conflicts when you get a chance? Thanks! |
done. |
Found by: https://github.com/michaelortmann/
Patch by: https://github.com/michaelortmann/
Fixes:
One-line summary:
Fix writing to tls socket
Additional description (if needed):
SSL_write()intputs()eggdrop/src/net.c
Line 1346 in 890e7e4
ssl_info()which can call
debug1():eggdrop/src/tls.c
Lines 900 to 902 in 890e7e4
which can destroy memory by a chain of events like
dprintf()->dprint()->out_dcc_general()->escape_telnet()with the following static buffer:eggdrop/src/dcc.c
Line 95 in 890e7e4
In this case, during
SSL_write(), garbage (len bytes of the debug message) will be written to the tls socket.This PR changes the
escape_telnet()function, so it doesnt use a static buffer anymore. Only pros, no cons.This bug is since at least eggdrop 1.8.3rc1, #497
Test cases demonstrating functionality (if applicable):
> openssl s_client -connect 127.0.0.1:3343Before:
After: