Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830623 - net-misc/openssh-contrib fails with SecureCRT 9 when HPN is enabled
Summary: net-misc/openssh-contrib fails with SecureCRT 9 when HPN is enabled
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-05 05:33 UTC by Reuben Farrelly
Modified: 2024-03-03 22:36 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info,5.45 KB, text/plain)
2022-01-05 05:33 UTC, Reuben Farrelly
Details
sshd debugs with HPN enabled (client cannot connect) (openssh-hpn-enabled-noconnect.txt,7.29 KB, text/plain)
2022-01-05 05:34 UTC, Reuben Farrelly
Details
sshd debugs with HPN not in USE flag (client with same settings can succesfully connect) (openssh-nohpn-works.txt,5.43 KB, text/plain)
2022-01-05 05:35 UTC, Reuben Farrelly
Details
sshd debugs with HPN enabled (client cannot connect) (openssh-hpn-enabled-noconnect.txt,7.26 KB, text/plain)
2022-01-05 05:36 UTC, Reuben Farrelly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reuben Farrelly 2022-01-05 05:33:19 UTC
Created attachment 761327 [details]
emerge --info

OpenSSH-8.8 and likely earlier appear to have some sort of compatibility issue with SecureCRT clients when the HPN USE flag is enabled.

This is with openssh-8.8_p1-r4.  The server is a Gentoo x86_64 system.

The client starts to connect, and if it has not been able to connect before it is prompted to accept the key for the server side.  But after that it fails when the server side disconnects it.

Interestingly enough though the problem is not seen from other OpenSSH clients.  So in this case I can SSH from another Gentoo system just fine or even a Windows 11 command prompt, but not directly from my Windows machine using SecureCRT.  This affects SecureCRT 9.1 and 9.2 (not sure if earlier versions or not).  Take the HPN use flag away and recompile and it all works fine again and both SecureCRT and OpenSSH clients can connect normally.

This might be related to https://bugs.gentoo.org/719698 but there doesn't appear to be enough information in that bug report to identify the problem.  Hopefully with the logs I am about to attach we may be able to identify the root cause.

I have a support contract with SecureCRT so I'm happy to engage them if required but as it is the server side disconnecting the client I figure this is the best place to start.
Comment 1 Reuben Farrelly 2022-01-05 05:34:06 UTC
Created attachment 761328 [details]
sshd debugs with HPN enabled (client cannot connect)
Comment 2 Reuben Farrelly 2022-01-05 05:35:20 UTC
Created attachment 761329 [details]
sshd debugs with HPN not in USE flag (client with same settings can succesfully connect)
Comment 3 Reuben Farrelly 2022-01-05 05:36:25 UTC
Created attachment 761330 [details]
sshd debugs with HPN enabled (client cannot connect)

Correct debug log
Comment 4 Patrick McLean gentoo-dev 2022-01-05 20:26:55 UTC
My initial guess is an incompatibility with MTR-AES-CTR.

Could you add the following line to your sshd_config, and re-test:
DisableMTAES yes

I am wondering if we should add this to sshd_config by default for USE=hpn. On modern hardware, the single threaded implementation is often faster with AES-NI. The multithreaded cipher is mostly useful on older hardware without AES-NI support.
Comment 5 Reuben Farrelly 2022-01-06 05:55:17 UTC
Settting:

DisableMTAES yes

in sshd_config allowed SecureCRT to connect just fine now even with hpn support enabled.
Comment 6 Klaus Kusche 2023-05-27 08:14:21 UTC
Emerging openssh-contrib now says that "DisableMTAES yes"
must be added to sshd_config.

However, it must also be added to ssh_config:
When ssh-ing or sftp-ing to my webspace provider,
my client and my provider's server agree on AES CTR cipher,
and the connection breaks immediately after authentification.

When disabling HPN on my client, 
or when adding "DisableMTAES yes" to my ssh_config,
ssh and sftp work fine without any changes on the server side.

Hence, this is a general problem on the client and the server side,
and it is not specific to SecureCRT.

So please:

* Change the title of this bug.

* Change the message in the ebuild (or disable MT AES by default):
"DisableMTAES yes" must be added to *both* ssh_config and sshd_config.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-27 08:17:55 UTC
(In reply to Klaus Kusche from comment #6)
> However, it must also be added to ssh_config:
> When ssh-ing or sftp-ing to my webspace provider,
> my client and my provider's server agree on AES CTR cipher,
> and the connection breaks immediately after authentification.
> 

See bug 905750 as well. It's likely that issue rather than this older one.

> Hence, this is a general problem on the client and the server side,
> and it is not specific to SecureCRT.
> 
> So please:
> 
> * Change the title of this bug.
> 

Please give a new title.
Comment 8 Klaus Kusche 2023-05-27 08:35:31 UTC
(In reply to Sam James from comment #7)
> (In reply to Klaus Kusche from comment #6)
> > However, it must also be added to ssh_config:
> > When ssh-ing or sftp-ing to my webspace provider,
> > my client and my provider's server agree on AES CTR cipher,
> > and the connection breaks immediately after authentification.
> > 
> 
> See bug 905750 as well. It's likely that issue rather than this older one.

I had only a quick look at 905750 and ruled out 905750 
because in my case, there was definitely no segfault.
But after reading 905750 closely, I noticed that 905750 
is a miscompilation problem which does not necessarily result in segfaults.
So yes, that might also be the problem.

> > Hence, this is a general problem on the client and the server side,
> > and it is not specific to SecureCRT.
> > 
> > So please:
> > 
> > * Change the title of this bug.
> > 
> 
> Please give a new title.

Something like 
net-misc/openssh-contrib: connections closed immediately when HPN with  multithreaded AES CTR cipher is used