]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: define and enforce CEPH_MAX_KEY_LEN
authorIlya Dryomov <idryomov@gmail.com>
Fri, 4 Jul 2025 14:30:50 +0000 (16:30 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 9 Feb 2026 11:29:21 +0000 (12:29 +0100)
commitac431d597a9bdfc2ba6b314813f29a6ef2b4a3bf
tree3d8cd1c3581ea0eb7195307c38a81b50b136186f
parent05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
libceph: define and enforce CEPH_MAX_KEY_LEN

When decoding the key, verify that the key material would fit into
a fixed-size buffer in process_auth_done() and generally has a sane
length.

The new CEPH_MAX_KEY_LEN check replaces the existing check for a key
with no key material which is a) not universal since CEPH_CRYPTO_NONE
has to be excluded and b) doesn't provide much value since a smaller
than needed key is just as invalid as no key -- this has to be handled
elsewhere anyway.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/crypto.c
net/ceph/crypto.h
net/ceph/messenger_v2.c