Skip to content

Conversation

@bart0sh
Copy link
Contributor

@bart0sh bart0sh commented Feb 23, 2019

What type of PR is this?

/kind bug

What this PR does / why we need it:

Fixed nil pointer dereference in url validation code that
caused kubeamd panic:

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

goroutine 1 [running]:
kubeadm/validation.ValidateURLs(0x40000bafe0, 0x2, 0x2, 0x1, 0x40002967b0, 0x0, 0x40002967b0, 0xf302a0)
kubeadm/validation/validation.go:324 +0xcc
kubeadm/validation.ValidateEtcd(0x400000b490, 0x4000296720, 0x0, 0x0, 0x0)
kubeadm/validation/validation.go:291 +0x1f0
...

Which issue(s) this PR fixes:

Fixes kubernetes/kubeadm#1419

Does this PR introduce a user-facing change?:

kubeadm: fixed nil pointer dereference caused by a bug in url parsing

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 23, 2019
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 23, 2019
@bart0sh
Copy link
Contributor Author

bart0sh commented Feb 23, 2019

/cc @neolit123

@k8s-ci-robot k8s-ci-robot added area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 23, 2019
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the quick fix.

/priority critical-urgent
/kind bug
/approve

we need a backport to 1.13 (at least) after this PR merges.
@bart0sh let me know if are going to do it. else, i can too...
https://github.com/eBay/Kubernetes/blob/master/docs/devel/cherry-picks.md

@k8s-ci-robot k8s-ci-robot added priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 23, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bart0sh, neolit123

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 23, 2019
Fixed nil pointer dereference in url validation code that
caused kubeamd panic:

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

  goroutine 1 [running]:
  kubeadm/validation.ValidateURLs(0x40000bafe0, 0x2, 0x2, 0x1, 0x40002967b0, 0x0, 0x40002967b0, 0xf302a0)
    kubeadm/validation/validation.go:324 +0xcc
  kubeadm/validation.ValidateEtcd(0x400000b490, 0x4000296720, 0x0, 0x0, 0x0)
    kubeadm/validation/validation.go:291 +0x1f0
      ...

Fixes: kubernetes/kubeadm#1419

Signed-off-by: Ed Bartosh <[email protected]>
@bart0sh bart0sh force-pushed the PR0064-kubeadm-1419-fix-ValidateURLs branch from 4097a5f to f8d235b Compare February 23, 2019 15:50
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 23, 2019
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 23, 2019
@neolit123
Copy link
Member

/lgtm
@bart0sh i will send the cherry pick after this merges.

@k8s-ci-robot k8s-ci-robot merged commit 1cfaf2b into kubernetes:master Feb 23, 2019
k8s-ci-robot added a commit that referenced this pull request Feb 24, 2019
…454-origin-release-1.12

Automated cherry pick of #74454: kubeadm: fix url validation code
k8s-ci-robot added a commit that referenced this pull request Feb 26, 2019
…454-origin-release-1.13

Automated cherry pick of #74454: kubeadm: fix url validation code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1.13.3: panic in validation/validation.go

3 participants