summaryrefslogtreecommitdiff
path: root/net/ceph/crypto.h
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2025-07-04 16:30:50 +0200
committerIlya Dryomov <idryomov@gmail.com>2026-02-09 12:29:21 +0100
commitac431d597a9bdfc2ba6b314813f29a6ef2b4a3bf (patch)
tree3d8cd1c3581ea0eb7195307c38a81b50b136186f /net/ceph/crypto.h
parent05f7e89ab9731565d8a62e3b5d1ec206485eeb0b (diff)
downloadlinux-next-ac431d597a9bdfc2ba6b314813f29a6ef2b4a3bf.tar.gz
linux-next-ac431d597a9bdfc2ba6b314813f29a6ef2b4a3bf.zip
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>
Diffstat (limited to 'net/ceph/crypto.h')
-rw-r--r--net/ceph/crypto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ceph/crypto.h b/net/ceph/crypto.h
index 23de29fc613c..a20bad6d1e96 100644
--- a/net/ceph/crypto.h
+++ b/net/ceph/crypto.h
@@ -5,7 +5,7 @@
#include <linux/ceph/types.h>
#include <linux/ceph/buffer.h>
-#define CEPH_KEY_LEN 16
+#define CEPH_MAX_KEY_LEN 16
#define CEPH_MAX_CON_SECRET_LEN 64
/*