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

chore (c sshnpd): consider exiting more often for certain types of errors. #1604

Open
XavierChanth opened this issue Dec 9, 2024 · 0 comments
Assignees

Comments

@XavierChanth
Copy link
Member

Certain types of failures should be a log error and exit, running out of heap memory being the main one. However, if the program runs out of heap memory, there are a few reasons as to why that could be:

  • Too many sessions active
    • Unlikely, as we minimize the amount of memory allocated before executing srv. This pretty much means we only store the arguments required to invoke srv and hold that in memory until it ends. Someone would have to automate this process, to realistically spin up enough sessions. This would likely be due to a bad actor in the event of an already compromised device, which means crashing would only slow down the damage already being done.
    • Another point worth noting, is that since other sessions are external processes, they will not be killed by exiting sshnpd due to memory related issues.
  • Other situations which may be potentially unrecoverable.
@XavierChanth XavierChanth self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant