Skip to content

Commit e84b48d

Browse files
committed
libceph: return the handler error from mon_handle_auth_done()
Currently any error from ceph_auth_handle_reply_done() is propagated via finish_auth() but isn't returned from mon_handle_auth_done(). This results in higher layers learning that (despite the monitor considering us to be successfully authenticated) something went wrong in the authentication phase and reacting accordingly, but msgr2 still trying to proceed with establishing the session in the background. In the case of secure mode this can trigger a WARN in setup_crypto() and later lead to a NULL pointer dereference inside of prepare_auth_signature(). Cc: stable@vger.kernel.org Fixes: cd1a677 ("libceph, ceph: implement msgr2.1 protocol (crc and secure modes)") Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
1 parent e3fe30e commit e84b48d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/ceph/mon_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,7 @@ static int mon_handle_auth_done(struct ceph_connection *con,
14171417
if (!ret)
14181418
finish_hunting(monc);
14191419
mutex_unlock(&monc->mutex);
1420-
return 0;
1420+
return ret;
14211421
}
14221422

14231423
static int mon_handle_auth_bad_method(struct ceph_connection *con,

0 commit comments

Comments
 (0)