Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

libceph: Fix NULL pointer dereference in auth client code

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>
Cc: stable@vger.kernel.org

authored by

Tyler Hicks and committed by
Sage Weil
2cb33cac 93faca6e

+6
+6
net/ceph/auth_none.c
··· 39 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 48 * the generic auth code decode the global_id, and we carry no actual 44 49 * authenticate state, so nothing happens here. ··· 111 106 .destroy = destroy, 112 107 .is_authenticated = is_authenticated, 113 108 .should_authenticate = should_authenticate, 109 + .build_request = build_request, 114 110 .handle_reply = handle_reply, 115 111 .create_authorizer = ceph_auth_none_create_authorizer, 116 112 .destroy_authorizer = ceph_auth_none_destroy_authorizer,