diff options
author | Tyler Hicks <tyhicks@canonical.com> | 2013-06-20 13:13:59 -0700 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2014-02-10 16:10:44 -0500 |
commit | 859ca6fe36694a71a32952aacc29be742e04a3e0 (patch) | |
tree | d7e5d1d95c46c947c4ddd8761368768283b4e506 /fs | |
parent | a11a914060471392c91a7f92fc334df220abdf64 (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>
[PG: in v2.6.34, file is fs/ceph and not net/ceph]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/auth_none.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ceph/auth_none.c b/fs/ceph/auth_none.c index 8cd9e3af07f7..1d1f9b4cbd87 100644 --- a/fs/ceph/auth_none.c +++ b/fs/ceph/auth_none.c @@ -31,6 +31,11 @@ static int is_authenticated(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. @@ -97,6 +102,7 @@ static const struct ceph_auth_client_ops ceph_auth_none_ops = { .reset = reset, .destroy = destroy, .is_authenticated = is_authenticated, + .build_request = build_request, .handle_reply = handle_reply, .create_authorizer = ceph_auth_none_create_authorizer, .destroy_authorizer = ceph_auth_none_destroy_authorizer, |