]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: do not hard code max auth ticket len
authorIlya Dryomov <ilya.dryomov@inktank.com>
Tue, 9 Sep 2014 15:39:15 +0000 (19:39 +0400)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Wed, 10 Sep 2014 16:08:36 +0000 (20:08 +0400)
commit47c9b7a1759c3ff63cbb25c46ab8bfb3b67575ae
treee92bd4ec8ba94b9bf361c8df5f8d32f97b9f441c
parent9373e33d944c5a3f884f1f610116e1f89f527de8
libceph: do not hard code max auth ticket len

We hard code cephx auth ticket buffer size to 256 bytes.  This isn't
enough for any moderate setups and, in case tickets themselves are not
encrypted, leads to buffer overflows (ceph_x_decrypt() errors out, but
ceph_decode_copy() doesn't - it's just a memcpy() wrapper).  Since the
buffer is allocated dynamically anyway, allocated it a bit later, at
the point where we know how much is going to be needed.

Fixes: http://tracker.ceph.com/issues/8979
Cc: stable@vger.kernel.org
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@redhat.com>
net/ceph/auth_x.c