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

pkg/auth: fix nil deref #1419

Merged
merged 1 commit into from
Apr 11, 2023
Merged

Conversation

vrothberg
Copy link
Member

github.com/containers/podman/pkg/api/server.panicHandler.func1.1.1()
        /builddir/build/BUILD/containers-podman-05037d3/_build/src/github.com/containers/podman/pkg/api/server/handler_panic.go:22 +0x85
panic({0x55b681f5a640, 0x55b682d5e370})
        /usr/lib/golang/src/runtime/panic.go:884 +0x212
bufio.(*Reader).fill(0xc00075cd98)
        /usr/lib/golang/src/bufio/bufio.go:106 +0xd8
bufio.(*Reader).ReadSlice(0xc00075cd98, 0xc8?)
        /usr/lib/golang/src/bufio/bufio.go:372 +0x2f
bufio.(*Reader).collectFragments(0x55b6807917e9?, 0xa0?)
        /usr/lib/golang/src/bufio/bufio.go:447 +0x71
bufio.(*Reader).ReadString(0x55b682188240?, 0x80?)
        /usr/lib/golang/src/bufio/bufio.go:495 +0x2b
github.com/containers/podman/vendor/github.com/containers/common/pkg/auth.getUserAndPass(0xc00075d110, {0xc00084e370, 0x3}, {0x0, 0x0})
        /builddir/build/BUILD/containers-podman-05037d3/_build/src/github.com/containers/podman/vendor/github.com/containers/common/pkg/auth/auth.go:253 +0x29d

Reported-by: Alex Jia ajia@redhat.com

@mtrmac @rhatdan PTAL

```
github.com/containers/podman/pkg/api/server.panicHandler.func1.1.1()
        /builddir/build/BUILD/containers-podman-05037d3/_build/src/github.com/containers/podman/pkg/api/server/handler_panic.go:22 +0x85
panic({0x55b681f5a640, 0x55b682d5e370})
        /usr/lib/golang/src/runtime/panic.go:884 +0x212
bufio.(*Reader).fill(0xc00075cd98)
        /usr/lib/golang/src/bufio/bufio.go:106 +0xd8
bufio.(*Reader).ReadSlice(0xc00075cd98, 0xc8?)
        /usr/lib/golang/src/bufio/bufio.go:372 +0x2f
bufio.(*Reader).collectFragments(0x55b6807917e9?, 0xa0?)
        /usr/lib/golang/src/bufio/bufio.go:447 +0x71
bufio.(*Reader).ReadString(0x55b682188240?, 0x80?)
        /usr/lib/golang/src/bufio/bufio.go:495 +0x2b
github.com/containers/podman/vendor/github.com/containers/common/pkg/auth.getUserAndPass(0xc00075d110, {0xc00084e370, 0x3}, {0x0, 0x0})
        /builddir/build/BUILD/containers-podman-05037d3/_build/src/github.com/containers/podman/vendor/github.com/containers/common/pkg/auth/auth.go:253 +0x29d
```

Reported-by: Alex Jia <ajia@redhat.com>
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
@vrothberg
Copy link
Member Author

Will add a Podman PR with a regression test.

@vrothberg
Copy link
Member Author

Let's wait for containers/podman#18143 to turn green before merging.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

@vrothberg vrothberg marked this pull request as ready for review April 11, 2023 10:53
@vrothberg
Copy link
Member Author

containers/podman#18143 is green. Ready to merge.

@vrothberg
Copy link
Member Author

@containers/podman-maintainers PTAL

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, vrothberg

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

The pull request process is described here

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

@openshift-merge-robot openshift-merge-robot merged commit 19b624d into containers:main Apr 11, 2023
@vrothberg vrothberg deleted the auth-fix branch April 11, 2023 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants