Skip to content

[ciqlts9_6] Multiple patches tested (30 commits) - #1685

Open
ciq-kernel-automation[bot] wants to merge 30 commits into
ciqlts9_6from
{maple_cve-2025-30156}_ciqlts9_6
Open

ciq-kernel-automation[bot] wants to merge 30 commits into
ciqlts9_6from
{maple_cve-2025-30156}_ciqlts9_6

Conversation

@ciq-kernel-automation

@ciq-kernel-automation ciq-kernel-automation Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Summary

This PR has been automatically created after successful completion of all CI stages.

Commit Message(s)

lib/scatterlist: Add SG_MITER_LOCAL and use it

jira VULN-203242
cve-pre CVE-2025-30156
commit-author Herbert Xu <herbert@gondor.apana.org.au>
commit fc8d5bba61ad8087af9a56337a7a297af6b46129
crypto/krb5: Add some constants out of sunrpc headers

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 2ac92fedb6369a1a17ff995198b8e84ec0cf7a4e
crypto: Add 'krb5enc' hash and cipher AEAD algorithm

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit d1775a177f7f38156d541c8a3e3c91eaa6e69699
upstream-diff |
    Adpated to the 5.14 crypto API, matching the rebuild from 9.8
    sources from RHEL/Rocky on tag resf_kernel-5.14.0-687.5.1.el9_8.
crypto: krb5enc - fix sleepable flag handling in encrypt dispatch

jira VULN-203242
cve-pre CVE-2025-30156
commit-author Wesley Atwell <atwellwea@gmail.com>
commit 2ef3bac16fb5e9eee4fb1d722578a79b751ea58a
crypto: krb5enc - fix async decrypt skipping hash verification

jira VULN-183474
cve CVE-2026-31719
commit-author Dudu Lu <phx0fer@gmail.com>
commit 3bfbf5f0a99c991769ec562721285df7ab69240b
upstream-diff |
    Referenced the end state of the rebuild from RHEL/Rocky kernel at
    tag resf_kernel-5.14.0-687.20.1.el9_8.  krb5enc_decrypt_done() takes
    (struct crypto_async_request *, int) and recovers the aead_request
    via areq->data. upstream's context assumes the post-5.14 completion
    signature.
crypto/krb5: Test manager data

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 1b80b6f446ed262077f5212ad213e8ead2cdecc3
upstream-diff |
    Context conflict due to missing commit
    730f67d8b826 - ("crypto: keywrap - remove unused keywrap algorithm")
crypto/krb5: Implement Kerberos crypto core

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 3936f02bf2d3308a7359dd37dd96cd60603d8170
upstream-diff |
    Contextual Conflict on crypto/Makefile due to missing commit
    026a733e6659 - ("crypto: kdf - add SP800-108 counter key derivation function")
crypto/krb5: Add an API to query the layout of the crypto section

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 025ac491f4eeb48c03353719f0de20a6db36b826
crypto/krb5: Add an API to alloc and prepare a crypto object

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit a9c27d2d87a388433db100889262841afe771f7a
crypto/krb5: Add an API to perform requests

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 0392b110ccaf543b31842b04c8142f4f8ce7bdec
crypto/krb5: Provide infrastructure and key derivation

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 41cf1d1e8a86c5c675982136f07c519c4b15b157
crypto/krb5: Implement the Kerberos5 rfc3961 key derivation

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit c8d8f6af66c3cd7896460da4a0ddd006f391f6d2
crypto/krb5: Provide RFC3961 setkey packaging functions

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 8bcdbfa89f4fc1ab7b06e784cb9c3346a943955e
crypto/krb5: Implement the Kerberos5 rfc3961 encrypt and decrypt functions

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 00244da40f7821b242c4612428d4192230dba27f
crypto/krb5: Implement the Kerberos5 rfc3961 get_mic and verify_mic

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 348f5669d1f6c1c210b9017ebb8b82282eca6f25
crypto: krb5 - Use SG miter instead of doing it by hand

jira VULN-203242
cve-pre CVE-2025-30156
commit-author Herbert Xu <herbert@gondor.apana.org.au>
commit da6f9bf40ac267b5c720694a817beea84fa40f77
crypto/krb5: Fix change to use SG miter to use offset

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit eed848871c96d4b5a7b06307755b75abd0cc7a06
crypto/krb5: Implement the AES enctypes from rfc3962

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 7c164b66b276c49b3888d3280e1b70a85732a38c
crypto/krb5: Implement the AES enctypes from rfc8009

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 6c3c0e86c2acf53bf67c095c67335a0bec2a16af
crypto: krb5 - filter out async aead implementations at alloc

jira VULN-194693
cve CVE-2026-64439
commit-author Michael Bommarito <michael.bommarito@gmail.com>
commit 6c9dddeb582fde005360f4fe02c760d45ca05fb5
crypto/krb5: Implement the Camellia enctypes from rfc6803

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 742e38d4d4033e7ff53178acf7edd2b1fe0142ef
crypto/krb5: Implement crypto self-testing

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit fc0cf10c04f49ddba1925b630467f49ea993569e
crypto: krb5 - Fix memory leak in krb5_test_one_prf()

jira VULN-203242
cve-pre CVE-2025-30156
commit-author Eric Biggers <ebiggers@kernel.org>
commit b19f1ab8d5bf417e00d5855c62e061fb449b13c5
libceph: Remove unused ceph_crypto_key_encode

jira VULN-203242
cve-pre CVE-2025-30156
commit-author Dr. David Alan Gilbert <linux@treblig.org>
commit 3e0f59f09e3f319b6652e5b4523fe02d965515a5
libceph: define and enforce CEPH_MAX_KEY_LEN

jira VULN-184904
cve CVE-2026-43304
commit-author Ilya Dryomov <idryomov@gmail.com>
commit ac431d597a9bdfc2ba6b314813f29a6ef2b4a3bf
libceph: generalize ceph_x_encrypt_offset() and ceph_x_encrypt_buflen()

jira VULN-203242
cve-pre CVE-2025-30156
commit-author Ilya Dryomov <idryomov@gmail.com>
commit 0ee8bccf7396d50726c9c8dd3135fb64a9fe8426
libceph: introduce ceph_crypto_key_prepare()

jira VULN-203242
cve-pre CVE-2025-30156
commit-author Ilya Dryomov <idryomov@gmail.com>
commit 6cec0b61aacce4da5125b21c718189f0dc11eb51
libceph: add support for CEPH_CRYPTO_AES256KRB5

jira VULN-203242
cve CVE-2025-30156
commit-author Ilya Dryomov <idryomov@gmail.com>
commit b7cc142dbafeaf6c053284ca9121b9f70b6d6d06
upstream-diff |
    Context conflict in net/ceph/Kconfig
    27c0a7b05d1 - ("libceph: Use HMAC-SHA256 library instead of crypto_shash")
libceph: adapt ceph_x_challenge_blob hashing and msgr1 message signing

jira VULN-203242
cve CVE-2025-30156
commit-author Ilya Dryomov <idryomov@gmail.com>
commit 8356b4b1103b8c970648c94bab724aa30e42d869
upstream-diff |
    Conflict due to missing chain of commits around hmac_sha256
    1cf5cdf8d2a - ("libceph: Rename hmac_sha256() to ceph_hmac_sha256()")
    27c0a7b05d1 - ("libceph: Use HMAC-SHA256 library instead of crypto_shash")
    8356b4b1103 - ("libceph: adapt ceph_x_challenge_blob hashing and msgr1 message signing")
    Additionally HMAC-SHA256 library API used in the upstream (struct
    hmac_sha_256_key, hmac_sha256_preparekey(), hmac_256() in
    include/crypto/hmac.h / lib/hmac.c). Due to this and referencing the
    backport from RedHat on our git history rebuild tag:
    resf_kernel-5.14.0-687.5.1.el9_8 we noticed that RHEL did this patch
    set with some custom code not in the upstream.  The adaptation is
    done by the original author (except with a redhat email) on
    centos-stream-9: f1020545d20d7305807c548aa4233c90cdd07fbd
    Due to this the hmac(256) shash tfm owned by struct ceph_crypto_key
    is used insteak:
    - set_hmac_and_krb5_tfms() allocates and keys the tfm before setting
      up the krb5 tfms; ceph_crypto_key_prepare() and
      ceph_crypto_key_destroy() manage its lifecycle
    - ceph_hmac_sha256() returns int and computes the digest via
      crypto_shash_tfm_digest()
    - ceph_x_build_request() challenge-blob hashing and
      calc_signature() msgr1 signing propagate the new error return
crypto: krb5 - use kfree_sensitive() for derived key buffers

jira VULN-218408
cve CVE-2026-80924
commit-author Jan Sebastian Götte <linux@jaseg.de>
commit f7d53dd3f267e46a784f219a75072f2f400d42b9

Test Results

✅ Build Stage

Architecture Build Time Total Time
x86_64 33m 17s 34m 12s
aarch64 20m 45s 21m 27s

✅ Boot Verification

✅ Kernel Selftests

Architecture Passed Failed Compared Against Status
x86_64 204 45 ciqlts9_6 ✅ No regressions
aarch64 154 45 ciqlts9_6 ✅ No regressions

✅ LTP Results

Architecture Passed Failed Compared Against Status
x86_64 1452 83 ciqlts9_6 ❌ 1 regressions
aarch64 1426 83 ciqlts9_6 ✅ No regressions

x86_64 regressions:

  • futex_wake04 (PASS -> FAIL)

🤖 This PR was automatically generated by GitHub Actions
Run ID: 38969127812

@ciq-kernel-automation ciq-kernel-automation Bot added the created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI) label Oct 10, 2026
@github-actions

Copy link
Copy Markdown

🔍 Diffofdiffs: 8 of 31 backports differ from upstream

View the diffofdiffs report.

Open to anyone signed in to GitHub. Report expires 2027-01-08 01:32 UTC.

# Subject Backport Upstream
1 crypto: Add 'krb5enc' hash and cipher AEAD algorithm ec2e431f8e06 d1775a177f7f
2 crypto: krb5enc - fix async decrypt skipping hash verification 8a5644dc5f7b 3bfbf5f0a99c
3 crypto/krb5: Test manager data bcf5a4fe9556 1b80b6f446ed
4 crypto/krb5: Implement Kerberos crypto core a58982d8bf50 3936f02bf2d3
5 libceph: generalize ceph_x_encrypt_offset() and ceph_x_encrypt_buflen() 25d8a1e42a23 0ee8bccf7396
6 libceph: add support for CEPH_CRYPTO_AES256KRB5 2cfcd28cdd68 b7cc142dbafe
7 libceph: adapt ceph_x_challenge_blob hashing and msgr1 message signing 076769b11602 8356b4b1103b
8 crypto: testmgr - allow authenc(hmac(sha{256,384}),cts(cbc(aes))) in FIPS mode 19ed6b25fa93 6b7e97752854

Checked PR revision 0ff47e214a55 against base 879dc8dcfef9.

@PlaidCat
PlaidCat requested a review from a team October 13, 2026 12:59
@PlaidCat PlaidCat self-assigned this Oct 13, 2026
@bmastbergen

Copy link
Copy Markdown
Collaborator

@PlaidCat I think you mentioned something about the CVE -> hash mappings being funky with ceph, is that why our checks fail for CVE-205-30156?

 % python ./check_kernel_commits.py --repo ~/ciq/kernel-src-tree --pr_branch {maple_cve-2025-30156}_ciqlts9_6 --base_branch origin/ciqlts9_6 --check-cves
[CVE-NOTFOUND] PR commit 7ae2c44cae7af (libceph: add support for
               CEPH_CRYPTO_AES256KRB5) references CVE-2025-30156 but upstream
               commit b7cc142dbafe has no CVE assigned

[CVE-NOTFOUND] PR commit b2ffa2efdc711 (libceph: adapt ceph_x_challenge_blob
               hashing and msgr1 message signing) references CVE-2025-30156 but
               upstream commit 8356b4b1103b has no CVE assigned


@PlaidCat

PlaidCat commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

@bmastbergen

@PlaidCat I think you mentioned something about the CVE -> hash mappings being funky with ceph, is that why our checks fail for CVE-205-30156?

 % python ./check_kernel_commits.py --repo ~/ciq/kernel-src-tree --pr_branch {maple_cve-2025-30156}_ciqlts9_6 --base_branch origin/ciqlts9_6 --check-cves
[CVE-NOTFOUND] PR commit 7ae2c44cae7af (libceph: add support for
               CEPH_CRYPTO_AES256KRB5) references CVE-2025-30156 but upstream
               commit b7cc142dbafe has no CVE assigned

[CVE-NOTFOUND] PR commit b2ffa2efdc711 (libceph: adapt ceph_x_challenge_blob
               hashing and msgr1 message signing) references CVE-2025-30156 but
               upstream commit 8356b4b1103b has no CVE assigned

Yes this is the CVE that specifically calls out vendor kernels

GHSA-7q3q-3975-qw3q

bmastbergen
bmastbergen previously approved these changes Oct 13, 2026

@bmastbergen bmastbergen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥌

@bmastbergen
bmastbergen requested a review from a team October 13, 2026 20:04
kerneltoast
kerneltoast previously approved these changes Oct 14, 2026

@kerneltoast kerneltoast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave extra scrutiny to libceph: adapt ceph_x_challenge_blob hashing and msgr1 message signing and it looks correct along with everything else.

🚢

@jallisonciq

Copy link
Copy Markdown

Why is "crypto: testmgr - allow authenc(hmac(sha{256,384}),cts(cbc(aes))) in FIPS mode" needed for ceph ?

This is only a FIPS mode change. I can see the need for this if we were planning to officially support ceph in FIPS mode, but not otherwise.

@PlaidCat PlaidCat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting on follow up from FIPS labs on changes, block to prevent accidental merges

@jallisonciq

Copy link
Copy Markdown

Official response from the lab:

"Yes, such a change will alter the list of cryptographic algorithms and thus
necessitate a revalition if you want to apply the current certificate to the
new code base."

@jallisonciq

Copy link
Copy Markdown

So if we remove this one:

crypto: testmgr - allow authenc(hmac(sha{256,384}),cts(cbc(aes))) in FIPS mode

jira VULN-203242
cve-bf CVE-2025-30156
commit-author Ilya Dryomov idryomov@gmail.com
commit 6b7e977

I think this is good w.r.t. FIPS.

jira VULN-203242
cve-pre CVE-2025-30156
commit-author Herbert Xu <herbert@gondor.apana.org.au>
commit fc8d5bb

Add kmap_local support to the scatterlist iterator.  Use it for
all the helper functions in lib/scatterlist.

	Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit fc8d5bb)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 2ac92fe

Add some constants from the sunrpc headers.

	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
(cherry picked from commit 2ac92fe)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit d1775a1
upstream-diff |
    Adpated to the 5.14 crypto API, matching the rebuild from 9.8
    sources from RHEL/Rocky on tag resf_kernel-5.14.0-687.5.1.el9_8.

Add an AEAD template that does hash-then-cipher (unlike authenc that does
cipher-then-hash).  This is required for a number of Kerberos 5 encoding
types.

[!] Note that the net/sunrpc/auth_gss/ implementation gets a pair of
ciphers, one non-CTS and one CTS, using the former to do all the aligned
blocks and the latter to do the last two blocks if they aren't also
aligned.  It may be necessary to do this here too for performance reasons -
but there are considerations both ways:

 (1) firstly, there is an optimised assembly version of cts(cbc(aes)) on
     x86_64 that should be used instead of having two ciphers;

 (2) secondly, none of the hardware offload drivers seem to offer CTS
     support (Intel QAT does not, for instance).

However, I don't know if it's possible to query the crypto API to find out
whether there's an optimised CTS algorithm available.

	Signed-off-by: David Howells <dhowells@redhat.com>
	cc: Herbert Xu <herbert@gondor.apana.org.au>
	cc: "David S. Miller" <davem@davemloft.net>
	cc: Chuck Lever <chuck.lever@oracle.com>
	cc: Marc Dionne <marc.dionne@auristor.com>
	cc: Eric Dumazet <edumazet@google.com>
	cc: Jakub Kicinski <kuba@kernel.org>
	cc: Paolo Abeni <pabeni@redhat.com>
	cc: Simon Horman <horms@kernel.org>
	cc: linux-afs@lists.infradead.org
	cc: linux-nfs@vger.kernel.org
	cc: linux-crypto@vger.kernel.org
	cc: netdev@vger.kernel.org
(cherry picked from commit d1775a1)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
Assisted-By: GLM-5.3
jira VULN-203242
cve-pre CVE-2025-30156
commit-author Wesley Atwell <atwellwea@gmail.com>
commit 2ef3bac

krb5enc_encrypt_ahash_done() continues encryption from an ahash
completion callback by calling krb5enc_dispatch_encrypt().

That helper takes a flags argument for this continuation path, but it
ignored that argument and reused aead_request_flags(req) when setting
up the skcipher subrequest callback. This can incorrectly preserve
CRYPTO_TFM_REQ_MAY_SLEEP when the encrypt step is started from callback
context.

Preserve the original request flags but clear
CRYPTO_TFM_REQ_MAY_SLEEP for the callback continuation path, and use
the caller-supplied flags when setting up the skcipher subrequest.

Fixes: d1775a1 ("crypto: Add 'krb5enc' hash and cipher AEAD algorithm")
Assisted-by: Codex:GPT-5
	Signed-off-by: Wesley Atwell <atwellwea@gmail.com>
	Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 2ef3bac)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-183474
cve CVE-2026-31719
commit-author Dudu Lu <phx0fer@gmail.com>
commit 3bfbf5f
upstream-diff |
    Referenced the end state of the rebuild from RHEL/Rocky kernel at
    tag resf_kernel-5.14.0-687.20.1.el9_8.  krb5enc_decrypt_done() takes
    (struct crypto_async_request *, int) and recovers the aead_request
    via areq->data. upstream's context assumes the post-5.14 completion
    signature.

krb5enc_dispatch_decrypt() sets req->base.complete as the skcipher
callback, which is the caller's own completion handler. When the
skcipher completes asynchronously, this signals "done" to the caller
without executing krb5enc_dispatch_decrypt_hash(), completely bypassing
the integrity verification (hash check).

Compare with the encrypt path which correctly uses
krb5enc_encrypt_done as an intermediate callback to chain into the
hash computation on async completion.

Fix by adding krb5enc_decrypt_done as an intermediate callback that
chains into krb5enc_dispatch_decrypt_hash() upon async skcipher
completion, matching the encrypt path's callback pattern.

Also fix EBUSY/EINPROGRESS handling throughout: remove
krb5enc_request_complete() which incorrectly swallowed EINPROGRESS
notifications that must be passed up to callers waiting on backlogged
requests, and add missing EBUSY checks in krb5enc_encrypt_ahash_done
for the dispatch_encrypt return value.

Fixes: d1775a1 ("crypto: Add 'krb5enc' hash and cipher AEAD algorithm")
	Signed-off-by: Dudu Lu <phx0fer@gmail.com>

Unset MAY_BACKLOG on the async completion path so the user won't
see back-to-back EINPROGRESS notifications.

	Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 3bfbf5f)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
Assisted-By: GLM-5.3
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 1b80b6f
upstream-diff |
    Context conflict due to missing commit
    730f67d - ("crypto: keywrap - remove unused keywrap algorithm")

Add Kerberos crypto tests to the test manager database.  This covers:

	camellia128-cts-cmac		samples from RFC6803
	camellia256-cts-cmac		samples from RFC6803
	aes128-cts-hmac-sha256-128	samples from RFC8009
	aes256-cts-hmac-sha384-192	samples from RFC8009

but not:

	aes128-cts-hmac-sha1-96
	aes256-cts-hmac-sha1-96

as the test samples in RFC3962 don't seem to be suitable.

	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
(cherry picked from commit 1b80b6f)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 3936f02
upstream-diff |
    Contextual Conflict on crypto/Makefile due to missing commit
    026a733 - ("crypto: kdf - add SP800-108 counter key derivation function")

Provide core structures, an encoding-type registry and basic module and
config bits for a generic Kerberos crypto library.

	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
(cherry picked from commit 3936f02)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 025ac49

Provide some functions to allow the called to find out about the layout of
the crypto section:

 (1) Calculate, for a given size of data, how big a buffer will be
     required to hold it and where the data will be within it.

 (2) Calculate, for an amount of buffer, what's the maximum size of data
     that will fit therein, and where it will start.

 (3) Determine where the data will be in a received message.

	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
(cherry picked from commit 025ac49)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit a9c27d2

Add an API by which users of the krb5 crypto library can get an allocated
and keyed crypto object.

For encryption-mode operation, an AEAD object is returned; for
checksum-mode operation, a synchronous hash object is returned.

	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
(cherry picked from commit a9c27d2)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 0392b11

Add an API by which users of the krb5 crypto library can perform crypto
requests, such as encrypt, decrypt, get_mic and verify_mic.  These
functions take the previously prepared crypto objects to work on.

	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
(cherry picked from commit 0392b11)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 41cf1d1

Provide key derivation interface functions and a helper to implement the
PRF+ function from rfc4402.

	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
(cherry picked from commit 41cf1d1)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit c8d8f6a

Implement the simplified crypto profile for Kerberos 5 rfc3961 with the
pseudo-random function, PRF(), from section 5.3 and the key derivation
function, DK() from section 5.1.

	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
(cherry picked from commit c8d8f6a)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 8bcdbfa

Provide functions to derive keys according to RFC3961 (or load the derived
keys for the selftester where only derived keys are available) and to
package them up appropriately for passing to a krb5enc AEAD setkey or a
hash setkey function.

	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
(cherry picked from commit 8bcdbfa)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
…tions

jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 00244da

Add functions that encrypt and decrypt a message according to rfc3961 sec
5.3, using Ki to checksum the data to be secured and Ke to encrypt it
during the encryption phase, then decrypting with Ke and verifying the
checksum with Ki in the decryption phase.

	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
(cherry picked from commit 00244da)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 348f566

Add functions that sign and verify a message according to rfc3961 sec 5.4,
using Kc to generate a checksum and insert it into the MIC field in the
skbuff in the sign phase then checksum the data and compare it to the MIC
in the verify phase.

	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
(cherry picked from commit 348f566)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author Herbert Xu <herbert@gondor.apana.org.au>
commit da6f9bf

The function crypto_shash_update_sg iterates through an SG by
hand.  It fails to handle corner cases such as SG entries longer
than a page.  Fix this by using the SG iterator.

Fixes: 348f566 ("crypto/krb5: Implement the Kerberos5 rfc3961 get_mic and verify_mic")
	Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit da6f9bf)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit eed8488

The recent patch to make the rfc3961 simplified code use sg_miter rather
than manually walking the scatterlist to hash the contents of a buffer
described by that scatterlist failed to take the starting offset into
account.

This is indicated by the selftests reporting:

    krb5: Running aes128-cts-hmac-sha256-128 mic
    krb5: !!! TESTFAIL crypto/krb5/selftest.c:446
    krb5: MIC mismatch

Fix this by calling sg_miter_skip() before doing the loop to advance
by the offset.

This only affects packet signing modes and not full encryption in RxGK
because, for full encryption, the message digest is handled inside the
authenc and krb5enc drivers.

Note: Nothing in linus/master uses the krb5lib, though the bug is there.
It is used by AF_RXRPC's RxGK implementation in -next, no need to backport.

Fixes: da6f9bf ("crypto: krb5 - Use SG miter instead of doing it by hand")
	Reported-by: Marc Dionne <marc.dionne@auristor.com>
	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
	Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Link: https://patch.msgid.link/3824017.1745835726@warthog.procyon.org.uk
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit eed8488)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 7c164b6

Implement the aes128-cts-hmac-sha1-96 and aes256-cts-hmac-sha1-96 enctypes
from rfc3962, using the rfc3961 kerberos 5 simplified crypto scheme.

	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
(cherry picked from commit 7c164b6)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 6c3c0e8

Implement the aes128-cts-hmac-sha256-128 and aes256-cts-hmac-sha384-192
enctypes from rfc8009, overriding the rfc3961 kerberos 5 simplified crypto
scheme.

	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
(cherry picked from commit 6c3c0e8)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-194693
cve CVE-2026-64439
commit-author Michael Bommarito <michael.bommarito@gmail.com>
commit 6c9ddde

krb5_aead_encrypt(), krb5_aead_decrypt() in rfc3961_simplified.c and
rfc8009_encrypt(), rfc8009_decrypt() in rfc8009_aes2.c set a NULL
completion callback and treat any negative return from
crypto_aead_{encrypt,decrypt}() as terminal, falling through to
kfree_sensitive(buffer).  When the encrypt_name resolves to an
async AEAD instance the request returns -EINPROGRESS, the buffer
is freed while the backend's worker still holds a pointer, and the
worker dereferences the freed slab on completion.

KASAN report under UML+SLUB with a synthetic async aead backend
bound to krb5->encrypt_name:

  BUG: KASAN: slab-use-after-free in t5_stub_complete+0x7d/0xc7

The helpers were written synchronously, so filter the async
instances out at allocation time instead of plumbing
crypto_wait_req() through every call site.

Reachable via net/rxrpc/rxgk.c, fs/afs/cm_security.c and
net/ceph/crypto.c on systems with an async AEAD provider bound to
the krb5 enctype name.

Fixes: 00244da ("crypto/krb5: Implement the Kerberos5 rfc3961 encrypt and decrypt functions")
Fixes: 6c3c0e8 ("crypto/krb5: Implement the AES enctypes from rfc8009")
	Cc: stable@vger.kernel.org
	Suggested-by: Herbert Xu <herbert@gondor.apana.org.au>
Assisted-by: Claude:claude-opus-4-7
	Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
	Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 6c9ddde)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit 742e38d

Implement the camellia128-cts-cmac and camellia256-cts-cmac enctypes from
rfc6803.

Note that the test vectors in rfc6803 for encryption are incomplete,
lacking the key usage number needed to derive Ke and Ki, and there are
errata for this:

	https://www.rfc-editor.org/errata_search.php?rfc=6803

	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
(cherry picked from commit 742e38d)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author David Howells <dhowells@redhat.com>
commit fc0cf10

Implement self-testing infrastructure to test the pseudo-random function,
key derivation, encryption and checksumming.

Add the testing data from rfc8009 to test AES + HMAC-SHA2.

Add the testing data from rfc6803 to test Camellia.  Note some encryption
test vectors here are incomplete, lacking the key usage number needed to
derive Ke and Ki, and there are errata for this:

	https://www.rfc-editor.org/errata_search.php?rfc=6803

	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
(cherry picked from commit fc0cf10)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author Eric Biggers <ebiggers@kernel.org>
commit b19f1ab

Fix a leak reported by kmemleak:

    unreferenced object 0xffff8880093bf7a0 (size 32):
      comm "swapper/0", pid 1, jiffies 4294877529
      hex dump (first 32 bytes):
        9d 18 86 16 f6 38 52 fe 86 91 5b b8 40 b4 a8 86  .....8R...[.@...
        ff 3e 6b b0 f8 19 b4 9b 89 33 93 d3 93 85 42 95  .>k......3....B.
      backtrace (crc 8ba12f3b):
        kmemleak_alloc+0x8d/0xa0
        __kmalloc_noprof+0x3cd/0x4d0
        prep_buf+0x36/0x70
        load_buf+0x10d/0x1c0
        krb5_test_one_prf+0x1e1/0x3c0
        krb5_selftest.cold+0x7c/0x54c
        crypto_krb5_init+0xd/0x20
        do_one_initcall+0xa5/0x230
        do_initcalls+0x213/0x250
        kernel_init_freeable+0x220/0x260
        kernel_init+0x1d/0x170
        ret_from_fork+0x301/0x410
        ret_from_fork_asm+0x1a/0x30

Fixes: fc0cf10 ("crypto/krb5: Implement crypto self-testing")
	Signed-off-by: Eric Biggers <ebiggers@kernel.org>
	Acked-by: David Howells <dhowells@redhat.com>
	Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit b19f1ab)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author Dr. David Alan Gilbert <linux@treblig.org>
commit 3e0f59f

ceph_crypto_key_encode() was added in 2010's commit
8b6e4f2 ("ceph: aes crypto and base64 encode/decode helpers")

but has remained unused (the decode is used).

Remove it.

	Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
	Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
	Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 3e0f59f)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-184904
cve CVE-2026-43304
commit-author Ilya Dryomov <idryomov@gmail.com>
commit ac431d5

When decoding the key, verify that the key material would fit into
a fixed-size buffer in process_auth_done() and generally has a sane
length.

The new CEPH_MAX_KEY_LEN check replaces the existing check for a key
with no key material which is a) not universal since CEPH_CRYPTO_NONE
has to be excluded and b) doesn't provide much value since a smaller
than needed key is just as invalid as no key -- this has to be handled
elsewhere anyway.

	Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit ac431d5)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author Ilya Dryomov <idryomov@gmail.com>
commit 0ee8bcc

- introduce the notion of a data offset for ceph_x_encrypt_offset()
  to allow for e.g. confounder to be prepended before the encryption
  header in the future.  For CEPH_CRYPTO_AES, the data offset is 0
  (i.e. nothing is prepended).

- adjust ceph_x_encrypt_buflen() accordingly and make it account for
  PKCS#7 padding that is used by CEPH_CRYPTO_AES precisely instead of
  just always adding 16.

	Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 0ee8bcc)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve-pre CVE-2025-30156
commit-author Ilya Dryomov <idryomov@gmail.com>
commit 6cec0b6

In preparation for bringing in a new encryption scheme/key type,
decouple decoding or cloning the key from allocating required crypto
API objects and setting them up.  The rationale is that a) in some
cases a shallow clone is sufficient and b) ceph_crypto_key_prepare()
may grow additional parameters that would be inconvenient to provide
at the point the key is originally decoded.

	Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 6cec0b6)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve CVE-2025-30156
commit-author Ilya Dryomov <idryomov@gmail.com>
commit b7cc142
upstream-diff |
    Context conflict in net/ceph/Kconfig
    27c0a7b - ("libceph: Use HMAC-SHA256 library instead of crypto_shash")

This is based on AES256-CTS-HMAC384-192 crypto algorithm per RFC 8009
(i.e. Kerberos 5, hence the name) with custom-defined key usage numbers.
The implementation allows a given key to have/be linked to between one
and three usage numbers.

The existing CEPH_CRYPTO_AES remains in place and unchanged.  The
usage_slot parameter that needed to be added to ceph_crypt() and its
wrappers is simply ignored there.

	Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit b7cc142)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira VULN-203242
cve CVE-2025-30156
commit-author Ilya Dryomov <idryomov@gmail.com>
commit 8356b4b
upstream-diff |
    Conflict due to missing chain of commits around hmac_sha256
    1cf5cdf - ("libceph: Rename hmac_sha256() to ceph_hmac_sha256()")
    27c0a7b - ("libceph: Use HMAC-SHA256 library instead of crypto_shash")
    8356b4b - ("libceph: adapt ceph_x_challenge_blob hashing and msgr1 message signing")
    Additionally HMAC-SHA256 library API used in the upstream (struct
    hmac_sha_256_key, hmac_sha256_preparekey(), hmac_256() in
    include/crypto/hmac.h / lib/hmac.c). Due to this and referencing the
    backport from RedHat on our git history rebuild tag:
    resf_kernel-5.14.0-687.5.1.el9_8 we noticed that RHEL did this patch
    set with some custom code not in the upstream.  The adaptation is
    done by the original author (except with a redhat email) on
    centos-stream-9: f102054
    Due to this the hmac(256) shash tfm owned by struct ceph_crypto_key
    is used insteak:
    - set_hmac_and_krb5_tfms() allocates and keys the tfm before setting
      up the krb5 tfms; ceph_crypto_key_prepare() and
      ceph_crypto_key_destroy() manage its lifecycle
    - ceph_hmac_sha256() returns int and computes the digest via
      crypto_shash_tfm_digest()
    - ceph_x_build_request() challenge-blob hashing and
      calc_signature() msgr1 signing propagate the new error return

The existing approach where ceph_x_challenge_blob is encrypted with the
client's secret key and then the digest derived from the ciphertext is
used for the test doesn't work with CEPH_CRYPTO_AES256KRB5 because the
confounder randomizes the ciphertext: the client and the server get two
different ciphertexts and therefore two different digests.

msgr1 signatures are affected the same way: a digest derived from the
ciphertext for the message's "sigblock" is what becomes a signature and
the two sides disagree on the expected value.

For CEPH_CRYPTO_AES256KRB5 (and potential future encryption schemes),
switch to HMAC-SHA256 function keyed in the same way as the existing
encryption.  For CEPH_CRYPTO_AES, everything is preserved as is.

	Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 8356b4b)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
Assisted-By: GLM-5.3
jira VULN-218408
cve CVE-2026-80924
commit-author Jan Sebastian Götte <linux@jaseg.de>
commit f7d53dd

crypto_krb5_prepare_encryption() and crypto_krb5_prepare_checksum()
free the buffer holding the freshly derived keys with plain kfree(),
leaving the key material behind in the freed slab object.

Fixes: 3936f02 ("crypto/krb5: Implement Kerberos crypto core")
	Cc: stable@vger.kernel.org
	Signed-off-by: Jan Sebastian Götte <linux@jaseg.de>
	Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit f7d53dd)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
@PlaidCat
PlaidCat dismissed stale reviews from kerneltoast and bmastbergen via f2336d0 October 16, 2026 21:22
@PlaidCat
PlaidCat force-pushed the {maple_cve-2025-30156}_ciqlts9_6 branch from 0ff47e2 to f2336d0 Compare October 16, 2026 21:22
@github-actions

Copy link
Copy Markdown

🔍 Diffofdiffs: 7 of 30 backports differ from upstream

View the diffofdiffs report.

Open to anyone signed in to GitHub. Report expires 2027-01-14 21:22 UTC.

# Subject Backport Upstream
1 crypto: Add 'krb5enc' hash and cipher AEAD algorithm 1b618dae1a18 d1775a177f7f
2 crypto: krb5enc - fix async decrypt skipping hash verification 860d416acd8e 3bfbf5f0a99c
3 crypto/krb5: Test manager data e1ff73aafb24 1b80b6f446ed
4 crypto/krb5: Implement Kerberos crypto core bf68a82aabf9 3936f02bf2d3
5 libceph: generalize ceph_x_encrypt_offset() and ceph_x_encrypt_buflen() cf15b3bb437d 0ee8bccf7396
6 libceph: add support for CEPH_CRYPTO_AES256KRB5 94eb3b1dd0f1 b7cc142dbafe
7 libceph: adapt ceph_x_challenge_blob hashing and msgr1 message signing 970d47886203 8356b4b1103b

Checked PR revision f2336d0e34fa against base 801604db5d50.

@ciq-kernel-automation ciq-kernel-automation Bot changed the title [ciqlts9_6] Multiple patches tested (31 commits) [ciqlts9_6] Multiple patches tested (30 commits) Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI)

Development

Successfully merging this pull request may close these issues.

4 participants