]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - include/linux/ceph/msgr.h
libceph: add authorizer challenge
authorIlya Dryomov <idryomov@gmail.com>
Fri, 27 Jul 2018 17:18:34 +0000 (19:18 +0200)
committerSultan Alsawaf <sultan.alsawaf@canonical.com>
Wed, 24 Jul 2019 15:44:55 +0000 (09:44 -0600)
commit8549d879e2db736502a85e2e85c4c05c1fc644f9
tree9d668fdc0b4c852cd57d464e7b9a94250d00f609
parent266714e9af49eaefaa9191ea1ac9c9ecebfed664
libceph: add authorizer challenge

BugLink: https://bugs.launchpad.net/bugs/1836968
commit 6daca13d2e72bedaaacfc08f873114c9307d5aea upstream.

When a client authenticates with a service, an authorizer is sent with
a nonce to the service (ceph_x_authorize_[ab]) and the service responds
with a mutation of that nonce (ceph_x_authorize_reply).  This lets the
client verify the service is who it says it is but it doesn't protect
against a replay: someone can trivially capture the exchange and reuse
the same authorizer to authenticate themselves.

Allow the service to reject an initial authorizer with a random
challenge (ceph_x_authorize_challenge).  The client then has to respond
with an updated authorizer proving they are able to decrypt the
service's challenge and that the new authorizer was produced for this
specific connection instance.

The accepting side requires this challenge and response unconditionally
if the client side advertises they have CEPHX_V2 feature bit.

This addresses CVE-2018-1128.

Link: http://tracker.ceph.com/issues/24836
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/ceph/mds_client.c
include/linux/ceph/auth.h
include/linux/ceph/messenger.h
include/linux/ceph/msgr.h
net/ceph/auth.c
net/ceph/auth_x.c
net/ceph/auth_x_protocol.h
net/ceph/messenger.c
net/ceph/osd_client.c