From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 From: Alexey Shabalin To: devel-kernel@altlinux.org Date: Wed, 18 Nov 2026 14:44:49 +0300 Message-ID: <20261118114518.3605222-1-shaba@altlinux.org> X-Mailer: git-send-email 2.50.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [d-kernel] [PATCH 6.12/sisyphus 0/29] libceph: add support for AES256KRB5 (aes256k) cephx keys X-BeenThere: devel-kernel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux kernel packages development List-Id: ALT Linux kernel packages development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2026 11:45:25 -0000 Archived-At: List-Archive: List-Post: Ceph 19.2.6+ generates cephx keys in the new AES256KRB5 (aes256k) format by default, following CVE-2025-30156 (AES-CBC misuse in CephX). The kernel client, however, accepts only the legacy CEPH_CRYPTO_AES keys, so mounting any such cluster with mount -t ceph fails with EINVAL ("libceph: secret too big 32"). https://bugzilla.altlinux.org/61355 This series backports the upstream CEPH_CRYPTO_AES256KRB5 support (merged in v7.0-rc1 via the "ceph-for-7.0-rc1" pull: https://lore.kernel.org/all/20260217173743.1840319-1-idryomov@gmail.com/) to 6.12. It consists of: - the crypto/krb5 library (the upstream v6.14 series plus follow-up fixes, as present in 6.18) and its prerequisite "lib/scatterlist: Add SG_MITER_LOCAL and use it" (v6.15); the rxrpc parts of the follow-up fixes are omitted, as noted in the commit messages - the libceph series from Ilya Dryomov, leading up to "libceph: add support for CEPH_CRYPTO_AES256KRB5" The upstream commit "libceph: Use HMAC-SHA256 library instead of crypto_shash" (27c0a7b05d13) is not applicable as-is because it depends on the crypto/sha2.h restructuring introduced between 6.13 and 6.15; ceph_hmac_sha256() stays crypto_shash-based and returns an error instead, with ceph_crypto_key carrying hmac_tfm rather than a precomputed hmac_key. This is noted in the adapted commit. Testing: kernel-image-6.12 with this series was built and tested against a Ceph 20.2.5-alt1 (tentacle) cluster: - the stock kernel fails to mount with "libceph: secret too big 32" - with this series, mount -t ceph with an aes256k key (ceph fs authorize --key-type=aes256k) succeeds - msgr1 (legacy, mon port 6789) and msgr2 both verified - read/write (64 MiB file, checksummed), 250-char file names, nested directories; dmesg clean, no warnings Please apply to 6.12/sisyphus (and to p11 after testing). Alexey Shabalin (1): config: enable CONFIG_CRYPTO_KRB5 David Howells (17): crypto/krb5: Add some constants out of sunrpc headers crypto/krb5: Implement Kerberos crypto core crypto/krb5: Add an API to query the layout of the crypto section crypto/krb5: Add an API to alloc and prepare a crypto object crypto/krb5: Add an API to perform requests crypto/krb5: Provide infrastructure and key derivation crypto/krb5: Implement the Kerberos5 rfc3961 key derivation crypto/krb5: Provide RFC3961 setkey packaging functions crypto/krb5: Implement the Kerberos5 rfc3961 encrypt and decrypt functions crypto/krb5: Implement the Kerberos5 rfc3961 get_mic and verify_mic crypto/krb5: Implement the AES enctypes from rfc3962 crypto/krb5: Implement the AES enctypes from rfc8009 crypto/krb5: Implement the Camellia enctypes from rfc6803 crypto/krb5: Implement crypto self-testing crypto/krb5: Fix change to use SG miter to use offset crypto/krb5: Add API Documentation crypto/krb5, rxrpc: Fix lack of pre-decrypt/pre-verify length checks Dr. David Alan Gilbert (1): libceph: Remove unused ceph_crypto_key_encode Eric Biggers (2): crypto: krb5 - Fix memory leak in krb5_test_one_prf() libceph: Rename hmac_sha256() to ceph_hmac_sha256() Herbert Xu (2): lib/scatterlist: Add SG_MITER_LOCAL and use it crypto: krb5 - Use SG miter instead of doing it by hand Ilya Dryomov (4): libceph: generalize ceph_x_encrypt_offset() and ceph_x_encrypt_buflen() libceph: introduce ceph_crypto_key_prepare() libceph: add support for CEPH_CRYPTO_AES256KRB5 libceph: adapt ceph_x_challenge_blob hashing and msgr1 message signing Jan Sebastian Götte (1): crypto: krb5 - use kfree_sensitive() for derived key buffers Michael Bommarito (1): crypto: krb5 - filter out async aead implementations at alloc Documentation/crypto/index.rst | 1 + Documentation/crypto/krb5.rst | 271 +++++++++++ config | 6 + crypto/Kconfig | 1 + crypto/Makefile | 2 + crypto/krb5/Kconfig | 26 + crypto/krb5/Makefile | 18 + crypto/krb5/internal.h | 247 ++++++++++ crypto/krb5/krb5_api.c | 494 +++++++++++++++++++ crypto/krb5/krb5_kdf.c | 145 ++++++ crypto/krb5/rfc3961_simplified.c | 793 +++++++++++++++++++++++++++++++ crypto/krb5/rfc3962_aes.c | 115 +++++ crypto/krb5/rfc6803_camellia.c | 237 +++++++++ crypto/krb5/rfc8009_aes2.c | 362 ++++++++++++++ crypto/krb5/selftest.c | 545 +++++++++++++++++++++ crypto/krb5/selftest_data.c | 291 ++++++++++++ include/crypto/krb5.h | 163 +++++++ include/linux/ceph/ceph_fs.h | 5 +- include/linux/scatterlist.h | 1 + lib/scatterlist.c | 12 +- net/ceph/Kconfig | 1 + net/ceph/auth_x.c | 200 +++++--- net/ceph/auth_x_protocol.h | 38 ++ net/ceph/crypto.c | 300 +++++++++--- net/ceph/crypto.h | 22 +- net/ceph/messenger_v2.c | 12 +- 26 files changed, 4180 insertions(+), 128 deletions(-) create mode 100644 Documentation/crypto/krb5.rst create mode 100644 crypto/krb5/Kconfig create mode 100644 crypto/krb5/Makefile create mode 100644 crypto/krb5/internal.h create mode 100644 crypto/krb5/krb5_api.c create mode 100644 crypto/krb5/krb5_kdf.c create mode 100644 crypto/krb5/rfc3961_simplified.c create mode 100644 crypto/krb5/rfc3962_aes.c create mode 100644 crypto/krb5/rfc6803_camellia.c create mode 100644 crypto/krb5/rfc8009_aes2.c create mode 100644 crypto/krb5/selftest.c create mode 100644 crypto/krb5/selftest_data.c create mode 100644 include/crypto/krb5.h -- 2.50.1