diff options
author | Tyler Hicks <tyhicks@canonical.com> | 2013-06-20 16:13:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-13 14:42:25 -0400 |
commit | b96e7dacf24315a84f71ba0f15a603ba5f82b010 (patch) | |
tree | eecf2188f148182fb08437684e033ecbe5959759 | |
parent | 8bb495e3f02401ee6f76d1b1d77f3ac9f079e376 (diff) |
libceph: Fix NULL pointer dereference in auth client code
commit 2cb33cac622afde897aa02d3dcd9fbba8bae839e 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: Tyler Hicks <tyhicks@canonical.com>
Reported-by: Chanam Park <chanam.park@hkpco.kr>
Reviewed-by: Seth Arnold <seth.arnold@canonical.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/ceph/auth_none.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ceph/auth_none.c b/net/ceph/auth_none.c index 925ca583c09c..8c93fa8d81bc 100644 --- a/net/ceph/auth_none.c +++ b/net/ceph/auth_none.c | |||
@@ -39,6 +39,11 @@ static int should_authenticate(struct ceph_auth_client *ac) | |||
39 | return xi->starting; | 39 | return xi->starting; |
40 | } | 40 | } |
41 | 41 | ||
42 | static int build_request(struct ceph_auth_client *ac, void *buf, void *end) | ||
43 | { | ||
44 | return 0; | ||
45 | } | ||
46 | |||
42 | /* | 47 | /* |
43 | * the generic auth code decode the global_id, and we carry no actual | 48 | * the generic auth code decode the global_id, and we carry no actual |
44 | * authenticate state, so nothing happens here. | 49 | * authenticate state, so nothing happens here. |
@@ -106,6 +111,7 @@ static const struct ceph_auth_client_ops ceph_auth_none_ops = { | |||
106 | .destroy = destroy, | 111 | .destroy = destroy, |
107 | .is_authenticated = is_authenticated, | 112 | .is_authenticated = is_authenticated, |
108 | .should_authenticate = should_authenticate, | 113 | .should_authenticate = should_authenticate, |
114 | .build_request = build_request, | ||
109 | .handle_reply = handle_reply, | 115 | .handle_reply = handle_reply, |
110 | .create_authorizer = ceph_auth_none_create_authorizer, | 116 | .create_authorizer = ceph_auth_none_create_authorizer, |
111 | .destroy_authorizer = ceph_auth_none_destroy_authorizer, | 117 | .destroy_authorizer = ceph_auth_none_destroy_authorizer, |