]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: Use correct size for fscrypt dummy key 68141/head
authorChristopher Hoffman <choffman@redhat.com>
Mon, 30 Mar 2026 19:30:53 +0000 (19:30 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Mon, 30 Mar 2026 19:30:53 +0000 (19:30 +0000)
Use the correct size of FSCRYPT_MAX_KEY_SIZE for master
key when using fscrypt dummy encyption. If smaller size
used, a seg fault occurs if fscrypt crypto library attempts
to read unmapped memory.

Fixes: https://tracker.ceph.com/issues/75254
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
src/client/Client.cc

index 7e353b5c05107dc386726cd09d4948a69595ea19..d1eb72dc33c771fd4856ec1845722d59b4ba1b23 100644 (file)
@@ -7351,7 +7351,7 @@ void Client::abort_conn()
 #if defined(__linux__)
 int Client::fscrypt_dummy_encryption() {
     // get add key
-    char key[FSCRYPT_KEY_IDENTIFIER_SIZE];
+    char key[FSCRYPT_MAX_KEY_SIZE];
     memset(key, 0, sizeof(key));
 
     char keyid[FSCRYPT_KEY_IDENTIFIER_SIZE];