-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Sending multiple Ctrl+C to UART ttylogin will trigger a system restart #11306
Comments
Why is this a problem? |
The premise of system restart is that the system administrator knows what is being done, rather than the restart caused by unknown operations. According to the thinking of non-developers, who knows that Ctrl+C will cause system downtime. If the current system is performing core business, the consequences will be is catastrophic |
non-developer would not be using UART It would be nice if you or someone else could fix this, but I think we can all agree that it is not a critical problem it seems like your description of the cause is pretty accurate, although fixing it might involve a kernel patch instead of changes to procd, since procd is not in control of what happens when it recieves SIGINT. alternatively, something about blocking or redirecting console to null might be possible, but IIRC, procd actually uses the console to interact with ubusd or something like that... |
Well, the thing is that FAEs and support technicians might use console access. The problem here is that procd gets a controlling TTY during a window period of ~0.5s, which is 100% unintended and a bug in procd. I'll post a fix for the issue later this week after it has passed our internal code-review. |
Disable the use of implicit controlling TTYs. They will be enabled on demand. This fixes a bug where 2 or more consecutive Ctrl-C at the login prompt triggers a reboot of the device. Closes: openwrt/openwrt#11306 Signed-off-by: Markus Gothe <[email protected]>
first enable ttylogin
uci set system.@System[0].ttylogin='1'; uci commit; sync; reboot
second input root and send multiple Ctrl+C by UART, the system will reboot
It seems that during the time /usr/libexec/login.sh exited, procd received the Ctrl+C signal, causing procd to restart the system
ttyS0::askfirst:/usr/libexec/login.sh
The text was updated successfully, but these errors were encountered: