Cygwin 3.1.5, 3.1.6 and 3.1.7 builds reporting tty errors with OpenSSH Services in indows Event Logs

Peter Board p_board@hotmail.com
Mon Sep 14 08:18:53 GMT 2020


Hi,

I am trying to update our Cygwin libraries at work, which we use on many servers to provide OpenSSH services.
I have been making update packages for many years from a Cygwin install on a development server, and went to update our systems to the latest OpenSSH 8.3p1 build.

However after making the update package, I found that the Windows Event Log (or if Syslogd is setup – which we do have in our general Cygwin deployment /var/log/messages) gets two errors when using any version of the Cygwin Libraries after the 3.1.4 build.


Sep 14 12:06:48 hostname sshd: PID 2093: error: Failed to disconnect from controlling tty.

Sep 14 12:06:48 hostname sshd: PID 2093: error: ioctl(TIOCSCTTY): Operation not permitted

I first tried rolling back to older OpenSSH packages (tried 8.2, 8.1 and what we had been using 7.8), but found that all versions still had the same error in the ssh connections. I then tried older builds of the core Cygwin updates and found that version 3.1.4 and earlier don’t display this error when the SSH connection occurs, but 3.1.5 and later (tested up to 3.1.7) do show this error.

It doesn’t actually seem to affect the SSH connections, they work fine, but it logs two errors every time.

I found the lines that produce these errors in the sshpty.c file (https://github.com/openssh/openssh-portable/blob/master/sshpty.c), lines 120 and 127 in the source code write these errors out, but I can’t see specifically what I would need to change to fix this, and I checked that the source code for older versions of OpenSSH haven’t changed for many versions (checked the master branch, and versions back to the 7.8 build we were on before in the sshpty.c source code).

Anyway, I think its a bug that has been introduced in 3.1.5 version or later, or possibly it has always been happening but just not reported before?

I’ve attached a cygcheck.exe -s output (I removed a few bits that for internal security I wouldn’t want to post), but in my test Cygwin x64 build I can see this problem is resolved by rolling back to the 3.1.4 cygwin core libraries.

Any help in resolving this issue would be great.

Peter

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.txt
URL: <https://cygwin.com/pipermail/cygwin/attachments/20200914/9202cc84/attachment-0001.txt>


More information about the Cygwin mailing list