Skip to content

Segfault in upterm 0.7.3 #103

@larsks

Description

@larsks

If I start a session with upterm 0.7.3...

$ upterm version
Upterm version v0.7.3
$ upterm host
=== ...
Command:                /bin/bash
Force Command:          n/a
Host:                   ssh://uptermd.upterm.dev:22
SSH Session:            ssh [email protected]
Press <q> or <ctrl-c> to continue...
$

And then connect to that session with ssh, the session crashes with:

[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x86fc92]

goroutine 47 [running]:
golang.org/x/crypto/ssh.(*curve25519sha256).Server(0xc000474390, {0x7f3cdbfc4f10, 0xc000164000}, {0xb94880, 0xc0000b8570}, 0x80, {0x0, 0x0})
/home/runner/work/upterm/upterm/vendor/golang.org/x/crypto/ssh/kex.go:515 +0x272
golang.org/x/crypto/ssh.(*handshakeTransport).server(0xc00017e2c0, {0xba06f8, 0x1038970}, 0xc000128500, 0xc0001645a0)
/home/runner/work/upterm/upterm/vendor/golang.org/x/crypto/ssh/handshake.go:643 +0xe3
golang.org/x/crypto/ssh.(*handshakeTransport).enterKeyExchange(0xc00017e2c0, {0xc000302700, 0x0, 0x0})
/home/runner/work/upterm/upterm/vendor/golang.org/x/crypto/ssh/handshake.go:592 +0x3eb
golang.org/x/crypto/ssh.(*handshakeTransport).kexLoop(0xc00017e2c0)
/home/runner/work/upterm/upterm/vendor/golang.org/x/crypto/ssh/handshake.go:301 +0xa6
created by golang.org/x/crypto/ssh.newServerTransport
/home/runner/work/upterm/upterm/vendor/golang.org/x/crypto/ssh/handshake.go:143 +0x13d

It also leaves the terminal in a bad state such that running stty sane is necessary (the traceback is also formatted very poorly due to the terminal state. I've just remove all leading whitespace to try to make it a little more legible).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions