Skip to content
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

SSH port forwarding leaks connections after exit #8097

Closed
TheQuantumPhysicist opened this issue Mar 19, 2023 · 10 comments
Closed

SSH port forwarding leaks connections after exit #8097

TheQuantumPhysicist opened this issue Mar 19, 2023 · 10 comments
Labels

Comments

@TheQuantumPhysicist
Copy link

When calling ssh somehostname -L1234:127.0.0.1:1234 (for port forwarding) from a tabby terminal, closing the terminal (CMD+Q) doesn't abort the tunnel connections.

I use bash as the default terminal on MacOS 13.2.1.

@TheQuantumPhysicist
Copy link
Author

Could someone at least either confirm this bug or tell me what I'm doing wrong?

@ExpLog
Copy link

ExpLog commented Jan 24, 2024

I'm having the same issue.

In fact, just using close focused pane is leaving the shell open with whatever process it was running in it.

@TheQuantumPhysicist
Copy link
Author

I stopped using tabby after a few days of reporting this. It doesn't seem to follow any security considerations and if bugs like this one remain open for months, this isn't the standard for apps I install on my work laptop. The fact that it has like 1.7k issues open isn't a good sign. Good luck.

@Eugeny
Copy link
Owner

Eugeny commented Jan 24, 2024

@TheQuantumPhysicist I'm sure you'll be happy to donate some of your time to work on this issue or help triage existing tickets to this open-source project run by a single person in their free time.

@ExpLog
Copy link

ExpLog commented Jan 24, 2024

Hey @Eugeny, thanks for investing so much time on Tabby.

For now I've worked around this issue by removing the hotkey from close focused pane and always exiting the shell instead.

@TheQuantumPhysicist
Copy link
Author

@TheQuantumPhysicist I'm sure you'll be happy to donate some of your time to work on this issue or help triage existing tickets to this open-source project run by a single person in their free time.

Two points, since we're bordering on being rude

  1. This half-butt excuse of "come and do it yourself" in open source doesn't excuse writing bad code. Your response is proof that this software is just bad and cannot solve this problem, which should've been a design thing, with crappy JavaScript without proper RAII to clean up a session. There's a reason why there's 1700 issues. It's because the design is so bad that no one can keep up with all these problems.

  2. I'm a C++ and Rust dev. So even if I wanted to help, I couldn't, and maybe you should check what kind of dev I am before making the half-butt excuse of "come do it yourself", because I wouldn't let a JavaScript developer touch my rust code.

And I'm trying to be respectful here. So let's play nice. You ignored a security issue for months. This isn't a good look.

@Eugeny
Copy link
Owner

Eugeny commented Jan 24, 2024

@TheQuantumPhysicist ok

@Eugeny
Copy link
Owner

Eugeny commented Jan 24, 2024

@ExpLog this is not the case of having another open tab connected to the same server or using the same server as a jump host, right? Since the underlying session and its port forwards is shared between tabs.

@ExpLog
Copy link

ExpLog commented Jan 24, 2024

@Eugeny it doesn't look like it, since I'm seeing it happen with empty shells. To add some context I'm running zsh under WSL2 on Windows 11.

My steps to reproduce:

  1. Open powershell and run wsl --shutdown to get a clean start.
  2. Open one wsl ubuntu tab on Tabby, and split it into two panes.
  3. Run pgrep zsh, there are 3 zsh processes as expected:
    image
  4. Close the extra pane with close focused pane.
  5. Run pgrep zsh again, the process for the extra zsh from step 2 is still there, but I expected it to be gone:
    image

That being said, I think it has definitely also happened the way you described.

Thanks for the help, by the way, I appreciate it.

@Eugeny Eugeny closed this as completed in da5342b Jan 26, 2024
@ExpLog
Copy link

ExpLog commented Jan 27, 2024

Thanks @Eugeny! I appreciate it (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants