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 in pkg/operator/controller/cruft.go #2852

Closed
jean-edouard opened this issue Aug 17, 2023 · 1 comment · Fixed by #2856
Closed

Nil pointer dereference in pkg/operator/controller/cruft.go #2852

jean-edouard opened this issue Aug 17, 2023 · 1 comment · Fixed by #2856
Assignees
Labels

Comments

@jean-edouard
Copy link

What happened:
cdi-operator crashes if the CDI CR is missing or in error state.

What you expected to happen:
No crash

How to reproduce it (as minimally and precisely as possible):
Delete the CDI CR?

Additional context:
in pkg/operator/controller/cruft.go, watchCDICRD() calls GetActiveCDI() which can return nil, nil, and then dereferences the first value if the second is nil

Environment:
app.kubernetes.io/version: 4.13.3

@jean-edouard
Copy link
Author

/assign @maya-r
git blame points to be9e171

maya-r added a commit to maya-r/containerized-data-importer that referenced this issue Aug 21, 2023
Seen in practice when deleting CDI CR in issue kubevirt#2852

Signed-off-by: Maya Rashish <mrashish@redhat.com>
kubevirt-bot pushed a commit that referenced this issue Aug 22, 2023
Seen in practice when deleting CDI CR in issue #2852

Signed-off-by: Maya Rashish <mrashish@redhat.com>
kubevirt-bot pushed a commit to kubevirt-bot/containerized-data-importer that referenced this issue Aug 22, 2023
Seen in practice when deleting CDI CR in issue kubevirt#2852

Signed-off-by: Maya Rashish <mrashish@redhat.com>
maya-r added a commit to maya-r/containerized-data-importer that referenced this issue Aug 22, 2023
Seen in practice when deleting CDI CR in issue kubevirt#2852

Signed-off-by: Maya Rashish <mrashish@redhat.com>
kubevirt-bot pushed a commit that referenced this issue Aug 22, 2023
Seen in practice when deleting CDI CR in issue #2852

Signed-off-by: Maya Rashish <mrashish@redhat.com>
kubevirt-bot added a commit that referenced this issue Aug 22, 2023
Seen in practice when deleting CDI CR in issue #2852

Signed-off-by: Maya Rashish <mrashish@redhat.com>
Co-authored-by: Maya Rashish <mrashish@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants