[Bug 950] terminal settings not restored after Ctrl+C during password prompt in scp/sftp

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Thu Jan 20 23:35:18 EST 2005


------- Additional Comments From peak at argo.troja.mff.cuni.cz  2005-01-20 23:35 -------
It appears BSD unlike POSIX/SUS does not revoke access to the controlling
terminal from orphaned processes. This makes the race condition almost
irrelevant on BSD but it does not make it completely irrelevant IMHO.

Consider this scenario (unlikely but possible):
1. scp (the parent) exits
2. ssh (the child) gets SIGINT but blocks for whatever reason (e.g. swapping)
3. the grandparent sees scp has exited and starts a new process
4. the new process turns tty echo off
5. ssh wakes up, turns tty echo on in order to clean up after itself, and exits
6. the new process resumes, unaware echo has been turned on behind its back
(I suspect POSIX demands the revocation of tty access from orphans to make that

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the openssh-bugs mailing list