-
Notifications
You must be signed in to change notification settings - Fork 404
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
Large SendEnv variables prevent connection #177
Comments
Ah, I could see how that would happen. What is the need for such large environment variables? |
I'm sure there's several use cases. For me, it's convenience. I like to take a few things "with me" when connecting to other machines, such as $LS_COLORS or the contents of my .bashrc. While there's no hard need for these, having to explicitely exclude Dropbear hosts from the Cheers! |
Fixing this would be tricky. Dropbear allows 35000 bytes per packet (from rfc4253). Increasing that value gives more scope of running out of memory on small devices. A whole packet needs to be kept in memory at once, at least to validate the hmac/aead. I'll close this, though if someone has ideas how to work around it feel free to reopen. |
Interesting. I wonder if OpenSSH simply allows larger packets, or somehow tells the client to fragment them. Is there a way to truncate the payload of larger packets during the initial connection without breaking everything? Or warn the user? Crashing with a Broken Pipe makes it hard to diagnose this issue from the user perspective. Cheers! |
Dropbear probably should send a |
Hello,
the following bug can be observed with Dropbear v2020.81 on armv7l and an OpenSSH_8.9p1 client. It was also observed with older versions of server and client. Unfortunately I'm not able to compile and test a newer version of Dropbear.
When the total size of variables sent by the client via the SendEnv option exceed a certain size, the connection will fail with a Broken pipe. The size seems to be between 30 kB and 40 kB. OpenSSH servers do not have this problem.
Repro:
Thanks!
The text was updated successfully, but these errors were encountered: