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

SSH command panic when using CA mode with host-key-mount-point #3921

Closed
rmbrad opened this issue Feb 6, 2018 · 1 comment
Closed

SSH command panic when using CA mode with host-key-mount-point #3921

rmbrad opened this issue Feb 6, 2018 · 1 comment

Comments

@rmbrad
Copy link
Contributor

rmbrad commented Feb 6, 2018

When using the SSH command in CA mode if host-key-mount-point flag is used the client panics with runtime error: invalid memory address or nil pointer dereference.

Environment:

  • Vault Version: Vault v0.9.3 ('7d73ac4c967b3b8726c71e00c017129e1d36ad3c')
  • Operating System/Architecture: CentOS7/x86_64

Expected Behavior:
Establishment of a SSH connection to host without prompt to verify identity of host.

Actual Behavior:
The command panics:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7b01e3]

goroutine 1 [running]:
github.com/hashicorp/vault/api.(*Client).NewRequest(0x0, 0x22523cc, 0x3, 0xc42041af60, 0x19, 0x0)
	/go/src/github.com/hashicorp/vault/api/client.go:472 +0x43
github.com/hashicorp/vault/api.(*Logical).Read(0xc420553a10, 0xc420553958, 0x15, 0x0, 0x0, 0x0)
	/go/src/github.com/hashicorp/vault/api/logical.go:47 +0xbf
github.com/hashicorp/vault/command.(*SSHCommand).handleTypeCA(0xc420534500, 0x7fff73d29637, 0x9, 0xc4203bfb20, 0x9, 0xc420553c48, 0x0, 0x0, 0x0)
	/go/src/github.com/hashicorp/vault/command/ssh.go:394 +0x1241
github.com/hashicorp/vault/command.(*SSHCommand).Run(0xc420534500, 0xc42000e0d0, 0x1, 0x1, 0xc420538250)
	/go/src/github.com/hashicorp/vault/command/ssh.go:313 +0x5d3
github.com/hashicorp/vault/vendor/github.com/mitchellh/cli.(*CLI).Run(0xc4204dba40, 0xc420148d20, 0xc420506940, 0xc420148d20)
	/go/src/github.com/hashicorp/vault/vendor/github.com/mitchellh/cli/cli.go:255 +0x1eb
github.com/hashicorp/vault/command.Run(0xc42000e080, 0x6, 0x6, 0x1b38259)
	/go/src/github.com/hashicorp/vault/command/main.go:47 +0x411
main.main()
	/go/src/github.com/hashicorp/vault/main.go:10 +0x63

Steps to Reproduce:
Execute:

vault ssh -mode=ca -mount-point=<ssh-client-mount> -role=<valid-role> -host-key-mount-point=<ssh-host-mount> <user>@<host>
@vishalnayak
Copy link
Member

Fixed by #3909.

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

No branches or pull requests

2 participants