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

rgw: fix potential null pointer dereference in rgw_admin. #15667

Merged
merged 1 commit into from Jul 17, 2017

Conversation

Projects
None yet
4 participants
@rzarzynski
Contributor

rzarzynski commented Jun 13, 2017

The recent Static Analysis for Ceph (linked 13 June 2017 on ceph-devel) shows that the send_to_remote_gateway of rgw_admin potentially dereferences a null pointer. This commit rectifies that behaviour.

Signed-off-by: Radoslaw Zarzynski rzarzynski@mirantis.com

rgw_user user;
int ret = conn->forward(user, info, NULL, MAX_REST_RESPONSE, &in_data, &response);
int ret = conn->forward(user, info, nullptr, MAX_REST_RESPONSE,
&in_data, &response);

This comment has been minimized.

@joscollin

joscollin Jun 21, 2017

Member

Please make it single line

This comment has been minimized.

@rzarzynski

rzarzynski Jun 21, 2017

Contributor

Sure, I will update it. IIRC I wrapped the line due to crossing the 80th column boundary.

bufferlist response;
if (!conn) {
return -EINVAL;
}

This comment has been minimized.

@joscollin

joscollin Jun 21, 2017

Member

This checking is fine for this function. But it looks like the test doesn't identify the branching correctly. I have sent you an email about it.

http://people.redhat.com/bhubbard/scan-build-2017-06-14-192846-5371-1/report-5828b7.html#Path14

rgw: fix potential null pointer dereference in rgw_admin.
The recent Static Analysis for Ceph (linked 13 June 2017 on
ceph-devel) shows that the send_to_remote_gateway of rgw_admin
potentially dereferences a null pointer. This commit rectifies
that behaviour.

Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
@rzarzynski

This comment has been minimized.

Contributor

rzarzynski commented Jun 22, 2017

jenkins retest this please (failure of unrelated tests)

@cbodley

This comment has been minimized.

Contributor

cbodley commented Jun 22, 2017

jenkins test this please (Could not resolve host: github.com)

@joscollin joscollin added the needs-qa label Jun 23, 2017

@yuriw yuriw merged commit a6adc6c into ceph:master Jul 17, 2017

3 of 4 checks passed

arm64 make check arm64 make check failed
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment