libceph: check authorizer reply/challenge length before reading
authorIlya Dryomov <idryomov@gmail.com>
Fri, 27 Jul 2018 17:40:30 +0000 (19:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Dec 2018 18:41:27 +0000 (19:41 +0100)
commit0c5f2e899241aceab46e6dcba01c6fb2223bdeb5
tree7409b9ee8e87234ec9a3a8ae196e79c9492429ea
parent14118df4e7b4738815f222f5b20fceb3957ab206
libceph: check authorizer reply/challenge length before reading

commit 130f52f2b203aa0aec179341916ffb2e905f3afd upstream.

Avoid scribbling over memory if the received reply/challenge is larger
than the buffer supplied with the authorizer.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ceph/messenger.c