Skip to content

Commit

Permalink
libceph: Fix NULL pointer dereference in auth client code
Browse files Browse the repository at this point in the history
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: Tyler Hicks <[email protected]>
Reported-by: Chanam Park <[email protected]>
Reviewed-by: Seth Arnold <[email protected]>
Reviewed-by: Sage Weil <[email protected]>
Cc: [email protected]
  • Loading branch information
tyhicks authored and Sage Weil committed Jul 3, 2013
1 parent 93faca6 commit 2cb33ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/ceph/auth_none.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ static int should_authenticate(struct ceph_auth_client *ac)
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
* authenticate state, so nothing happens here.
Expand Down Expand Up @@ -106,6 +111,7 @@ static const struct ceph_auth_client_ops ceph_auth_none_ops = {
.destroy = destroy,
.is_authenticated = is_authenticated,
.should_authenticate = should_authenticate,
.build_request = build_request,
.handle_reply = handle_reply,
.create_authorizer = ceph_auth_none_create_authorizer,
.destroy_authorizer = ceph_auth_none_destroy_authorizer,
Expand Down

0 comments on commit 2cb33ca

Please sign in to comment.