All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Baokun Li <libaokun@linux.alibaba.com>
Cc: linux-block@vger.kernel.org, axboe@kernel.dk,
	linux-fscrypt@vger.kernel.org, hch@lst.de,
	dm-devel@lists.linux.dev, mpatocka@redhat.com,
	sweettea-kernel@dorminy.me, stable@vger.kernel.org,
	Sashiko <sashiko-bot@kernel.org>
Subject: Re: [PATCH v3] blk-crypto: fix NULL deref and UAF in __blk_crypto_evict_key()
Date: Fri, 23 Oct 2026 16:20:07 +0000	[thread overview]
Message-ID: <20261023162007.GA2810556@google.com> (raw)
In-Reply-To: <20261023081908.3505413-1-libaokun@linux.alibaba.com>

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: stable@vger.kernel.org
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://patch.msgid.link/sashiko-outbox-167341@kernel.org
> Suggested-by: Eric Biggers <ebiggers@kernel.org>
> Link: https://patch.msgid.link/20261014155131.GB322435@quark
> Signed-off-by: Baokun Li <libaokun@linux.alibaba.com>

Reviewed-by: Eric Biggers <ebiggers@kernel.org>

- Eric

  reply	other threads:[~2026-10-23 16:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23  8:19 [PATCH v3] blk-crypto: fix NULL deref and UAF in __blk_crypto_evict_key() Baokun Li
2026-10-23 16:20 ` Eric Biggers [this message]
2026-10-29 17:07   ` Eric Biggers
2026-10-29 17:12 ` Jens Axboe

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=20261023162007.GA2810556@google.com \
    --to=ebiggers@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@lists.linux.dev \
    --cc=hch@lst.de \
    --cc=libaokun@linux.alibaba.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=sashiko-bot@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=sweettea-kernel@dorminy.me \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.