diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2018-07-27 19:18:34 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-08-02 21:33:24 +0200 |
commit | 6daca13d2e72bedaaacfc08f873114c9307d5aea (patch) | |
tree | 97278ec273414431dd2fab13ccbc3a5d98140cec /net/ceph/auth_x_protocol.h | |
parent | 149cac4a50b0b4081b38b2f38de6ef71c27eaa85 (diff) |
libceph: add authorizer challenge
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>
Diffstat (limited to 'net/ceph/auth_x_protocol.h')
-rw-r--r-- | net/ceph/auth_x_protocol.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ceph/auth_x_protocol.h b/net/ceph/auth_x_protocol.h index 32c13d763b9a..24b0b74564d0 100644 --- a/net/ceph/auth_x_protocol.h +++ b/net/ceph/auth_x_protocol.h @@ -70,6 +70,13 @@ struct ceph_x_authorize_a { struct ceph_x_authorize_b { __u8 struct_v; __le64 nonce; + __u8 have_challenge; + __le64 server_challenge_plus_one; +} __attribute__ ((packed)); + +struct ceph_x_authorize_challenge { + __u8 struct_v; + __le64 server_challenge; } __attribute__ ((packed)); struct ceph_x_authorize_reply { |