On Fri, Oct 23, 2026 at 04:19:08PM +0800, Baokun Li wrote:
> Fix this by returning early from blk_crypto_fallback_evict_key() when
> tfms_inited[] is not set for the key's mode.  tfms_inited[] is only set
> after blk_crypto_fallback_init() has successfully initialized the
> profile, so the crash above is no longer reachable.
> 
> The bug has been latent since commit c984ff1423ae ("blk-crypto:
> dynamically allocate fallback profile") was merged in v6.5, and only
> became actually triggerable when commit e7f57d2c47e2 ("dm-inlinecrypt:
> add target for inline block device encryption") was merged in v7.2.
> 
> Fixes: c984ff1423ae ("blk-crypto: dynamically allocate fallback profile")
> Cc: [email protected]
> Reported-by: Sashiko <[email protected]>
> Closes: https://patch.msgid.link/[email protected]
> Suggested-by: Eric Biggers <[email protected]>
> Link: https://patch.msgid.link/20261014155131.GB322435@quark
> Signed-off-by: Baokun Li <[email protected]>

Reviewed-by: Eric Biggers <[email protected]>

- Eric

Reply via email to