Skip to content

Failed precodition when connecting to ssh server with algorithms .all #76

@depth42

Description

@depth42

Describe the bug
When connecting to a certain ssh server, Citadel crashes with a failed precondition.

Reproducer Sample

  • Build and run the sample code attached in a zip file. This is the relevant part:

func test() async throws {
let client = try await SSHClient.connect(
host: "vwp5409.webpack.hosteurope.de",
authenticationMethod: .passwordBased(username: "abc", password: "abc"),
hostKeyValidator: .acceptAnything(),
reconnect: .never,
algorithms: .all
)
try await client.close()
}

Expected behavior
The connection attempt should throw an error because of wrong user credentials.

** Actual behavior**
The app terminates with a failed precondition in NIOCore.ByteBuffer-code:1066
"NIO-ELT-0-#0 (9): Precondition failed: new writerIndex: 2051, expected: range(0, 2048)"

Client (please complete the following information):

  • macOS 15.0.1
  • Xcode 16.0
  • Citadel 0.8

Server (please complete the following information):

  • OpenSSH_7.9p1 Debian-10+deb10u4

SFTPClient.zip

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions