-
Notifications
You must be signed in to change notification settings - Fork 3
Description
This is a relatively big refactor but needed pre-requisite to introduce other I/O (protocols) such as SPI/I2C/CAN to this project.
Current state machine experiments/drafting are happening in: https://github.com/brainstorm/ssh_fsm_tests ... on a std context for testing convenience (faster iteration/experimentation loop).
Moving to compile-time validated FSMs will give some peace of mind w.r.t, for instance, pre-auth attacks that have been unfortunately common in recent SSH server explorations, see:
https://threatprotect.qualys.com/2025/04/21/erlang-otp-ssh-server-remote-code-execution-vulnerability-cve-2025-32433/
https://www.runzero.com/blog/sshamble-unexpected-exposures-in-the-secure-shell/
The trigger of this refactoring idea is https://www.firezone.dev/blog/sans-io, for reference. This approach should be combined with some kind of profiling to ensure we don't regress performance-wise.
Hopefully, by the time of tackling this task, there will be some suitable profiling facility for esp-hal's no-std?: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/app_trace.html