From: Alexey Shabalin <shaba@altlinux.org>
To: devel-kernel@altlinux.org
Subject: [d-kernel] [PATCH v2 6.12/sisyphus 0/29] libceph: add support for AES256KRB5 (aes256k) cephx keys
Date: Wed, 18 Nov 2026 17:49:06 +0300
Message-ID: <20261118144935.3872281-1-shaba@altlinux.org> (raw)
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.
Changes since v1:
- add Signed-off-by from the sender to every patch, as requested
- no code changes
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).
/tmp/cl612v2/0000-cover-letter.patch
/tmp/cl612v2/0001-crypto-krb5-Add-some-constants-out-of-sunrpc-headers.patch
/tmp/cl612v2/0002-crypto-krb5-Implement-Kerberos-crypto-core.patch
/tmp/cl612v2/0003-crypto-krb5-Add-an-API-to-query-the-layout-of-the-cr.patch
/tmp/cl612v2/0004-crypto-krb5-Add-an-API-to-alloc-and-prepare-a-crypto.patch
/tmp/cl612v2/0005-crypto-krb5-Add-an-API-to-perform-requests.patch
/tmp/cl612v2/0006-crypto-krb5-Provide-infrastructure-and-key-derivatio.patch
/tmp/cl612v2/0007-crypto-krb5-Implement-the-Kerberos5-rfc3961-key-deri.patch
/tmp/cl612v2/0008-crypto-krb5-Provide-RFC3961-setkey-packaging-functio.patch
/tmp/cl612v2/0009-crypto-krb5-Implement-the-Kerberos5-rfc3961-encrypt-.patch
/tmp/cl612v2/0010-crypto-krb5-Implement-the-Kerberos5-rfc3961-get_mic-.patch
/tmp/cl612v2/0011-crypto-krb5-Implement-the-AES-enctypes-from-rfc3962.patch
/tmp/cl612v2/0012-crypto-krb5-Implement-the-AES-enctypes-from-rfc8009.patch
/tmp/cl612v2/0013-crypto-krb5-Implement-the-Camellia-enctypes-from-rfc.patch
/tmp/cl612v2/0014-crypto-krb5-Implement-crypto-self-testing.patch
/tmp/cl612v2/0015-lib-scatterlist-Add-SG_MITER_LOCAL-and-use-it.patch
/tmp/cl612v2/0016-crypto-krb5-Use-SG-miter-instead-of-doing-it-by-hand.patch
/tmp/cl612v2/0017-crypto-krb5-Fix-change-to-use-SG-miter-to-use-offset.patch
/tmp/cl612v2/0018-crypto-krb5-Fix-memory-leak-in-krb5_test_one_prf.patch
/tmp/cl612v2/0019-crypto-krb5-Add-API-Documentation.patch
/tmp/cl612v2/0020-crypto-krb5-rxrpc-Fix-lack-of-pre-decrypt-pre-verify.patch
/tmp/cl612v2/0021-crypto-krb5-filter-out-async-aead-implementations-at.patch
/tmp/cl612v2/0022-crypto-krb5-use-kfree_sensitive-for-derived-key-buff.patch
/tmp/cl612v2/0023-libceph-Rename-hmac_sha256-to-ceph_hmac_sha256.patch
/tmp/cl612v2/0024-libceph-generalize-ceph_x_encrypt_offset-and-ceph_x_.patch
/tmp/cl612v2/0025-libceph-Remove-unused-ceph_crypto_key_encode.patch
/tmp/cl612v2/0026-libceph-introduce-ceph_crypto_key_prepare.patch
/tmp/cl612v2/0027-libceph-add-support-for-CEPH_CRYPTO_AES256KRB5.patch
/tmp/cl612v2/0028-libceph-adapt-ceph_x_challenge_blob-hashing-and-msgr.patch
/tmp/cl612v2/0029-config-enable-CONFIG_CRYPTO_KRB5.patch
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
next reply other threads:[~2026-11-18 14:49 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 14:49 Alexey Shabalin [this message]
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 01/29] crypto/krb5: Add some constants out of sunrpc headers Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 02/29] crypto/krb5: Implement Kerberos crypto core Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 03/29] crypto/krb5: Add an API to query the layout of the crypto section Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 04/29] crypto/krb5: Add an API to alloc and prepare a crypto object Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 05/29] crypto/krb5: Add an API to perform requests Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 06/29] crypto/krb5: Provide infrastructure and key derivation Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 07/29] crypto/krb5: Implement the Kerberos5 rfc3961 " Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 08/29] crypto/krb5: Provide RFC3961 setkey packaging functions Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 09/29] crypto/krb5: Implement the Kerberos5 rfc3961 encrypt and decrypt functions Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 10/29] crypto/krb5: Implement the Kerberos5 rfc3961 get_mic and verify_mic Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 11/29] crypto/krb5: Implement the AES enctypes from rfc3962 Alexey Shabalin
2026-11-20 16:45 ` Ivan A. Melnikov
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 12/29] crypto/krb5: Implement the AES enctypes from rfc8009 Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 13/29] crypto/krb5: Implement the Camellia enctypes from rfc6803 Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 14/29] crypto/krb5: Implement crypto self-testing Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 15/29] lib/scatterlist: Add SG_MITER_LOCAL and use it Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 16/29] crypto: krb5 - Use SG miter instead of doing it by hand Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 17/29] crypto/krb5: Fix change to use SG miter to use offset Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 18/29] crypto: krb5 - Fix memory leak in krb5_test_one_prf() Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 19/29] crypto/krb5: Add API Documentation Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 20/29] crypto/krb5, rxrpc: Fix lack of pre-decrypt/pre-verify length checks Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 21/29] crypto: krb5 - filter out async aead implementations at alloc Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 22/29] crypto: krb5 - use kfree_sensitive() for derived key buffers Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 23/29] libceph: Rename hmac_sha256() to ceph_hmac_sha256() Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 24/29] libceph: generalize ceph_x_encrypt_offset() and ceph_x_encrypt_buflen() Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 25/29] libceph: Remove unused ceph_crypto_key_encode Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 26/29] libceph: introduce ceph_crypto_key_prepare() Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 27/29] libceph: add support for CEPH_CRYPTO_AES256KRB5 Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 28/29] libceph: adapt ceph_x_challenge_blob hashing and msgr1 message signing Alexey Shabalin
2026-11-18 14:49 ` [d-kernel] [PATCH v2 6.12/sisyphus 29/29] config: enable CONFIG_CRYPTO_KRB5 Alexey Shabalin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261118144935.3872281-1-shaba@altlinux.org \
--to=shaba@altlinux.org \
--cc=devel-kernel@altlinux.org \
--cc=devel-kernel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux kernel packages development
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
public-inbox-index devel-kernel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git