Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/crypto/ssh: unmarshal error for field Language of type disconnectMsg #43026

Open
cernec1999 opened this issue Dec 5, 2020 · 3 comments
Open

x/crypto/ssh: unmarshal error for field Language of type disconnectMsg #43026

cernec1999 opened this issue Dec 5, 2020 · 3 comments

Comments

@cernec1999
Copy link

@cernec1999 cernec1999 commented Dec 5, 2020

What version of Go are you using (go version)?

$ go version
go version go1.15.6 linux/arm64

Does this issue reproduce with the latest release?

I am using

golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 [v0.0.0-20201203163018-be400aefbc4c]

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/home/ubuntu/.cache/go-build"
GOENV="/home/ubuntu/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/ubuntu/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/ubuntu/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_arm64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/ubuntu/ssh-honeypot/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build038631070=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I'm writing an SSH honeypot. When receiving connections, sometimes, their connection isn't accepted because of an unmarshal error. I'm not sure if this is an issue that can be resolved.

If I had to guess, maybe unsupported characters are in the Language field of the disconnectMsg struct.

Unfortunately, there's no easy way to reproduce. I just ran my honeypot and got these errors occasionally.

What did you expect to see?

I expected to see a successful authentication.

What did you see instead?

I receive these messages in my logs after calling ssh.NewServerConn:

[DBG] SSH password attempt from 142.93.52.3:48066.
[DBG] Username: root
[DBG] Password: Password
[DBG] Could not initiate SSH handshake: ssh: unmarshal error for field Language of type disconnectMsg
@gopherbot gopherbot added this to the Unreleased milestone Dec 5, 2020
@toothrot
Copy link
Contributor

@toothrot toothrot commented Dec 8, 2020

/cc @FiloSottile

@yasya1100
Copy link

@yasya1100 yasya1100 commented Dec 9, 2020

What version of Go are you using (go version)?

$ go version
go version go1.15.6 linux/arm64

Does this issue reproduce with the latest release?

I am using

golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 [v0.0.0-20201203163018-be400aefbc4c]

What operating system and processor architecture are you using (go env)?

go env Output

What did you do?

I'm writing an SSH honeypot. When receiving connections, sometimes, their connection isn't accepted because of an unmarshal error. I'm not sure if this is an issue that can be resolved.

If I had to guess, maybe unsupported characters are in the Language field of the disconnectMsg struct.

Unfortunately, there's no easy way to reproduce. I just ran my honeypot and got these errors occasionally.

What did you expect to see?

I expected to see a successful authentication.

What did you see instead?

I receive these messages in my logs after calling ssh.NewServerConn:

[DBG] SSH password attempt from 142.93.52.3:48066.
[DBG] Username: root
[DBG] Password: Password
[DBG] Could not initiate SSH handshake:

#43099 (comment)

@yasya1100
Copy link

@yasya1100 yasya1100 commented Dec 9, 2020

What version of Go are you using (go version)?

$ go version
go version go1.15.6 linux/arm64

Does this issue reproduce with the latest release?

I am using
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 [v0.0.0-20201203163018-be400aefbc4c]

What operating system and processor architecture are you using (go env)?

go env Output

What did you do?

I'm writing an SSH honeypot. When receiving connections, sometimes, their connection isn't accepted because of an unmarshal error. I'm not sure if this is an issue that can be resolved.
If I had to guess, maybe unsupported characters are in the Language field of the disconnectMsg struct.
Unfortunately, there's no easy way to reproduce. I just ran my honeypot and got these errors occasionally.
#43100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants