dash exits when receiving wall message
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dash (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
When using "/bin/sh" (dash) as a shell for ssh, or just starting /bin/sh in a terminal, when the shell receives a wall message (from another user or root), it just quits.
How to reproduce:
- start a terminal (xterm, gnome-terminal, etc), usually starts with bash
- from bash run 'sh' command to open a dash shell
- start another terminal, and run: echo "foo" | wall
- the broadcast message appears on both terminals
- in the first terminal you are thrown back to bash, because dash exits
I've tried this on Ubuntu 14.04, 16.04, 18.04 (64bits) latest updates and it's happening on all of them. I've also tried with latest dash from git, compiled on Ubuntu 16.04, same problem, that's why I don't think it's dash's problem.
Also tried on CentOS 7, there is no problem there.
The problem appears this morning (6 February) after updating to latest version of 16.04, 18.04. I also have a box with 16.04 but not the latest updates, and on that box the problem does not happen.
If one uses dash as a login shell, and enters on a remote box with SSH for example, the connection can be terminated by another user simply wall'ing a broadcast message (or a system daemon like NUT). This could be taken as a potential security issue.
affects: | ubuntu → dash (Ubuntu) |
I've attached two straces, -bad when dash exits after receiving a wall message, and good when dash does NOT exit after a wall, only after I press Ctrl+D.