Commit b96e7dac authored by Tyler Hicks's avatar Tyler Hicks Committed by Greg Kroah-Hartman

libceph: Fix NULL pointer dereference in auth client code

commit 2cb33cac upstream.

A malicious monitor can craft an auth reply message that could cause a
NULL function pointer dereference in the client's kernel.

To prevent this, the auth_none protocol handler needs an empty
ceph_auth_client_ops->build_request() function.

CVE-2013-1059
Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
Reported-by: default avatarChanam Park <chanam.park@hkpco.kr>
Reviewed-by: default avatarSeth Arnold <seth.arnold@canonical.com>
Reviewed-by: default avatarSage Weil <sage@inktank.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8bb495e3
...@@ -39,6 +39,11 @@ static int should_authenticate(struct ceph_auth_client *ac) ...@@ -39,6 +39,11 @@ static int should_authenticate(struct ceph_auth_client *ac)
return xi->starting; return xi->starting;
} }
static int build_request(struct ceph_auth_client *ac, void *buf, void *end)
{
return 0;
}
/* /*
* the generic auth code decode the global_id, and we carry no actual * the generic auth code decode the global_id, and we carry no actual
* authenticate state, so nothing happens here. * authenticate state, so nothing happens here.
...@@ -106,6 +111,7 @@ static const struct ceph_auth_client_ops ceph_auth_none_ops = { ...@@ -106,6 +111,7 @@ static const struct ceph_auth_client_ops ceph_auth_none_ops = {
.destroy = destroy, .destroy = destroy,
.is_authenticated = is_authenticated, .is_authenticated = is_authenticated,
.should_authenticate = should_authenticate, .should_authenticate = should_authenticate,
.build_request = build_request,
.handle_reply = handle_reply, .handle_reply = handle_reply,
.create_authorizer = ceph_auth_none_create_authorizer, .create_authorizer = ceph_auth_none_create_authorizer,
.destroy_authorizer = ceph_auth_none_destroy_authorizer, .destroy_authorizer = ceph_auth_none_destroy_authorizer,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment