ALT Linux kernel packages development
 help / color / mirror / Atom feed
* [d-kernel] [PATCH 6.12/sisyphus 0/29] libceph: add support for AES256KRB5 (aes256k) cephx keys
@ 2026-11-18 11:44 Alexey Shabalin
  2026-11-18 11:45 ` [d-kernel] [PATCH 6.12/sisyphus 15/29] lib/scatterlist: Add SG_MITER_LOCAL and use it Alexey Shabalin
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Alexey Shabalin @ 2026-11-18 11:44 UTC (permalink / raw)
  To: devel-kernel

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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-11-18 11:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18 11:44 [d-kernel] [PATCH 6.12/sisyphus 0/29] libceph: add support for AES256KRB5 (aes256k) cephx keys Alexey Shabalin
2026-11-18 11:45 ` [d-kernel] [PATCH 6.12/sisyphus 15/29] lib/scatterlist: Add SG_MITER_LOCAL and use it Alexey Shabalin
2026-11-18 11:45 ` [d-kernel] [PATCH 6.12/sisyphus 16/29] crypto: krb5 - Use SG miter instead of doing it by hand Alexey Shabalin
2026-11-18 11:45 ` [d-kernel] [PATCH 6.12/sisyphus 17/29] crypto/krb5: Fix change to use SG miter to use offset Alexey Shabalin
2026-11-18 11:45 ` [d-kernel] [PATCH 6.12/sisyphus 18/29] crypto: krb5 - Fix memory leak in krb5_test_one_prf() Alexey Shabalin
2026-11-18 11:45 ` [d-kernel] [PATCH 6.12/sisyphus 21/29] crypto: krb5 - filter out async aead implementations at alloc Alexey Shabalin
2026-11-18 11:45 ` [d-kernel] [PATCH 6.12/sisyphus 22/29] crypto: krb5 - use kfree_sensitive() for derived key buffers Alexey Shabalin
2026-11-18 11:45 ` [d-kernel] [PATCH 6.12/sisyphus 23/29] libceph: Rename hmac_sha256() to ceph_hmac_sha256() Alexey Shabalin
2026-11-18 11:45 ` [d-kernel] [PATCH 6.12/sisyphus 24/29] libceph: generalize ceph_x_encrypt_offset() and ceph_x_encrypt_buflen() Alexey Shabalin
2026-11-18 11:45 ` [d-kernel] [PATCH 6.12/sisyphus 25/29] libceph: Remove unused ceph_crypto_key_encode Alexey Shabalin
2026-11-18 11:45 ` [d-kernel] [PATCH 6.12/sisyphus 26/29] libceph: introduce ceph_crypto_key_prepare() Alexey Shabalin
2026-11-18 11:45 ` [d-kernel] [PATCH 6.12/sisyphus 27/29] libceph: add support for CEPH_CRYPTO_AES256KRB5 Alexey Shabalin
2026-11-18 11:45 ` [d-kernel] [PATCH 6.12/sisyphus 28/29] libceph: adapt ceph_x_challenge_blob hashing and msgr1 message signing Alexey Shabalin
2026-11-18 11:45 ` [d-kernel] [PATCH 6.12/sisyphus 29/29] config: enable CONFIG_CRYPTO_KRB5 Alexey Shabalin

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