diff options
author | Tyler Hicks <tyhicks@canonical.com> | 2013-06-20 13:13:59 -0700 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-07-27 05:34:26 +0100 |
commit | 88a4055704b39e5c67c9cbc837cc15ec6a6d8671 (patch) | |
tree | 08d0d683c37094436403fa2c99e7e14ba752d0c1 | |
parent | 226f3aac00bdf3650b150b2fe9640c64b25aaaa8 (diff) | |
download | kernel-common-88a4055704b39e5c67c9cbc837cc15ec6a6d8671.tar.gz kernel-common-88a4055704b39e5c67c9cbc837cc15ec6a6d8671.tar.bz2 kernel-common-88a4055704b39e5c67c9cbc837cc15ec6a6d8671.zip |
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: Ben Hutchings <ben@decadent.org.uk>
-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 214c2bb43d62..9f78c5f01a60 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) 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. @@ -107,6 +112,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, |