[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
Fri Nov 5 11:05:51 EST 2004


http://bugzilla.mindrot.org/show_bug.cgi?id=950

           Summary: terminal settings not restored after Ctrl+C during
                    password prompt in scp/sftp
           Product: Portable OpenSSH
           Version: 3.8.1p1
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: scp
        AssignedTo: openssh-bugs at mindrot.org
        ReportedBy: peak at argo.troja.mff.cuni.cz


It appears there is a race condition between the handler for SIGINT et al. in
scp/sftp and signal handling in readpassphrase(). When I press Ctrl+C during
password prompt, SIGINT kills the parent process (scp/sftp) before the child
process (ssh) exits. This makes the child process orphaned: it loses access to
its controlling terminal, tcsetattr() fails with EIO, and readpassphrase() exits
without restoring the original terminal settings (i.e. ECHO). The problem was
observed on 3.8.1p1 on Linux 2.4.



------- 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