Skip to content

Unexpected panic on wrong public key #221

@mrpalide

Description

@mrpalide

Describe the bug
Suddenly get panic on running dmsg-server

Environment information:

  • OS: Linux
  • Platform: Ubuntu 22.04 amd64

Logs:

2023/05/31 04:02:18 Invalid public key
panic: Invalid public key

goroutine 175212 [running]:
log.Panic({0xc005aa5cf8?, 0x0?, 0x0?})
	/usr/lib/go-1.18/src/log/log.go:385 +0x65
github.com/skycoin/skycoin/src/cipher.MustNewPubKey({0xc000eb5410?, 0x20?, 0x20?})
	/root/dmsg/vendor/github.com/skycoin/skycoin/src/cipher/crypto.go:114 +0xc5
github.com/skycoin/dmsg/pkg/noise.Secp256k1.DH({}, {0xc00044b3d1, 0x20, 0x20}, {0xc000eb5410?, 0x80?, 0x0?})
	/root/dmsg/pkg/noise/dh.go:26 +0x54
github.com/skycoin/noise.(*HandshakeState).ReadMessage(0xc004ed7520, {0x0, 0x0, 0x0}, {0xc001e0e002, 0x23, 0x1ffe})
	/root/dmsg/vendor/github.com/skycoin/noise/state.go:450 +0x48f
github.com/skycoin/dmsg/pkg/noise.(*Noise).ProcessHandshakeMessage(0xb9dbd0?, {0xc001e0e002?, 0x40cd76?, 0x8fc800?})
	/root/dmsg/pkg/noise/noise.go:116 +0xbd
github.com/skycoin/dmsg/pkg/noise.ResponderHandshake(0xc000c79110, 0xc0032437b8?, {0x7feadc886358, 0xc002ac51f0})
	/root/dmsg/pkg/noise/read_writer.go:242 +0x5c
github.com/skycoin/dmsg/pkg/noise.(*ReadWriter).Handshake.func1()
	/root/dmsg/pkg/noise/read_writer.go:181 +0xbf
created by github.com/skycoin/dmsg/pkg/noise.(*ReadWriter).Handshake
	/root/dmsg/pkg/noise/read_writer.go:177 +0x98

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions