original_kernel/net/ceph
Ilya Dryomov 0fd3fd0a9b libceph: handle an empty authorize reply
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: 5c056fdc5b ("libceph: verify authorize reply on connect")
Link: https://tracker.ceph.com/issues/20164
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2019-02-18 18:05:33 +01:00
..
crush
Kconfig
Makefile
armor.c
auth.c
auth_none.c
auth_none.h
auth_x.c
auth_x.h
auth_x_protocol.h
buffer.c
ceph_common.c libceph: allow setting abort_on_full for rbd 2019-01-07 22:47:48 +01:00
ceph_fs.c
ceph_hash.c
ceph_strings.c
cls_lock_client.c
crypto.c
crypto.h
debugfs.c libceph: allow setting abort_on_full for rbd 2019-01-07 22:47:48 +01:00
messenger.c libceph: handle an empty authorize reply 2019-02-18 18:05:33 +01:00
mon_client.c
msgpool.c
osd_client.c libceph: allow setting abort_on_full for rbd 2019-01-07 22:47:48 +01:00
osdmap.c
pagelist.c
pagevec.c
snapshot.c
string_table.c
striper.c