]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: krb5enc - fix sleepable flag handling in encrypt dispatch
authorWesley Atwell <atwellwea@gmail.com>
Mon, 9 Mar 2026 06:26:24 +0000 (00:26 -0600)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 21 Mar 2026 08:34:30 +0000 (17:34 +0900)
commit2ef3bac16fb5e9eee4fb1d722578a79b751ea58a
treeb04207294f275cb4cddc27cd740262df403f7530
parente0ce97f781c78b717b00493630a9e34caf04f79b
crypto: krb5enc - fix sleepable flag handling in encrypt dispatch

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: d1775a177f7f ("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>
crypto/krb5enc.c