• Ilya Dryomov's avatar
    libceph: handle an empty authorize reply · b9172020
    Ilya Dryomov authored
    commit 0fd3fd0a upstream.
    
    The authorize reply can be empty, for example when the ticket used to
    build the authorizer is too old and TAG_BADAUTHORIZER is returned from
    the service.  Calling ->verify_authorizer_reply() results in an attempt
    to decrypt and validate (somewhat) random data in au->buf (most likely
    the signature block from calc_signature()), which fails and ends up in
    con_fault_finish() with !con->auth_retry.  The ticket isn't invalidated
    and the connection is retried again and again until a new ticket is
    obtained from the monitor:
    
      libceph: osd2 192.168.122.1:6809 bad authorize reply
      libceph: osd2 192.168.122.1:6809 bad authorize reply
      libceph: osd2 192.168.122.1:6809 bad authorize reply
      libceph: osd2 192.168.122.1:6809 bad authorize reply
    
    Let TAG_BADAUTHORIZER handler kick in and increment con->auth_retry.
    
    Cc: stable@vger.kernel.org
    Fixes: 5c056fdc ("libceph: verify authorize reply on connect")
    Link: https://tracker.ceph.com/issues/20164Signed-off-by: 's avatarIlya Dryomov <idryomov@gmail.com>
    Reviewed-by: 's avatarSage Weil <sage@redhat.com>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    b9172020
Name
Last commit
Last update
..
crush Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
armor.c Loading commit data...
auth.c Loading commit data...
auth_none.c Loading commit data...
auth_none.h Loading commit data...
auth_x.c Loading commit data...
auth_x.h Loading commit data...
auth_x_protocol.h Loading commit data...
buffer.c Loading commit data...
ceph_common.c Loading commit data...
ceph_fs.c Loading commit data...
ceph_hash.c Loading commit data...
ceph_strings.c Loading commit data...
cls_lock_client.c Loading commit data...
crypto.c Loading commit data...
crypto.h Loading commit data...
debugfs.c Loading commit data...
messenger.c Loading commit data...
mon_client.c Loading commit data...
msgpool.c Loading commit data...
osd_client.c Loading commit data...
osdmap.c Loading commit data...
pagelist.c Loading commit data...
pagevec.c Loading commit data...
snapshot.c Loading commit data...
string_table.c Loading commit data...
striper.c Loading commit data...