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

nil pointer dereference on invalid filepath in helm lint -f #7985

Open
jkroepke opened this issue Apr 23, 2020 · 4 comments · May be fixed by #7995
Open

nil pointer dereference on invalid filepath in helm lint -f #7985

jkroepke opened this issue Apr 23, 2020 · 4 comments · May be fixed by #7995
Labels
bug Categorizes issue or PR as related to a bug. in progress

Comments

@jkroepke
Copy link

By running

helm lint -f valu%s.yaml
# OR
helm lint -f %
# OR
helm lint -f :

helm throws an SIGSEGV.

% helm lint -f valu%s.yaml
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x226ad1c]

goroutine 1 [running]:
helm.sh/helm/v3/pkg/cli/values.readFile(0xc0006f6e70, 0xb, 0xc000244700, 0x2, 0x2, 0x3b54008, 0x0, 0x1, 0xc000665710, 0xc0002e7b60)
        /private/tmp/helm-20200423-41927-615sa8/src/helm.sh/helm/pkg/cli/values/options.go:115  0x6c
helm.sh/helm/v3/pkg/cli/values.(*Options).MergeValues(0xc000681bc0, 0xc000244700, 0x2, 0x2, 0xc00043abc0, 0x1, 0x1)
        /private/tmp/helm-20200423-41927-615sa8/src/helm.sh/helm/pkg/cli/values/options.go:48  0x114
main.newLintCmd.func1(0xc00042a580, 0xc00000eea0, 0x0, 0x2, 0x0, 0x0)
        /private/tmp/helm-20200423-41927-615sa8/src/helm.sh/helm/cmd/helm/lint.go:72  0x35f
github.com/spf13/cobra.(*Command).execute(0xc00042a580, 0xc00000ee80, 0x2, 0x2, 0xc00042a580, 0xc00000ee80)
        /private/tmp/helm-20200423-41927-615sa8/pkg/mod/github.com/spf13/[email protected]/command.go:842  0x460
github.com/spf13/cobra.(*Command).ExecuteC(0xc0000f1340, 0x2973300, 0xc0001049a0, 0xc0005ed964)
        /private/tmp/helm-20200423-41927-615sa8/pkg/mod/github.com/spf13/[email protected]/command.go:950  0x349
github.com/spf13/cobra.(*Command).Execute(...)
        /private/tmp/helm-20200423-41927-615sa8/pkg/mod/github.com/spf13/[email protected]/command.go:887
main.main()
        /private/tmp/helm-20200423-41927-615sa8/src/helm.sh/helm/cmd/helm/helm.go:83  0x206

It doesn't matter if % exists.

Output of helm version:

version.BuildInfo{Version:"v3.2.0", GitCommit:"e11b7ce3b12db2941e90399e874513fbd24bcb71", GitTreeState:"clean", GoVersion:"go1.13.10"}

OS: macOS 10.15.4

@bacongobbler bacongobbler added the bug Categorizes issue or PR as related to a bug. label Apr 24, 2020
@lou-lan
Copy link

lou-lan commented Apr 25, 2020

/assign

@lou-lan lou-lan linked a pull request Apr 25, 2020 that will close this issue
@technosophos technosophos changed the title SIGSEGV on invalid filepath nil pointer dereference on invalid filepath in helm lint -f Apr 27, 2020
@github-actions
Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Aug 21, 2020
@bridgetkromhout
Copy link
Member

Removing the "Stale" label because there is a PR in progess which needs another review pass.

@github-actions
Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug. in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants