From: Christopher Hoffman Date: Mon, 30 Mar 2026 19:30:53 +0000 (+0000) Subject: client: Use correct size for fscrypt dummy key X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F68141%2Fhead;p=ceph.git client: Use correct size for fscrypt dummy key 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 --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 7e353b5c0510..d1eb72dc33c7 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -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];