From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH v2] keys: big_key: Remove the redundant quota reservation
Date: Sat, 17 Oct 2026 15:28:10 +0000 [thread overview]
Message-ID: <sashiko-outbox-175584@kernel.org> (raw)
In-Reply-To: <20261017152123.1200429-1-4ncienth@gmail.com>
> A big_key is charged a fixed 16 bytes of key quota, regardless of its
> payload size. big_key_update() nevertheless reserves the new raw payload
> length before destroying the old payload, and generic_key_instantiate()
> then reserves the fixed quota length.
>
> For an update shorter than 16 bytes, the first reservation temporarily
> returns quota. Another key operation by the same user can consume that
> quota before generic_key_instantiate() reserves it again. If the second
> reservation fails, the key remains positive after its old payload has been
> destroyed. Reading a buffer-backed key or revoking a shmem-backed key then
> dereferences a NULL payload pointer.
>
> On a KASAN build, reading a buffer-backed key reports:
>
> BUG: KASAN: null-ptr-deref in big_key_read+0x110/0x310
> [ ... ]
>
> Fixes: b6f61c314649 ("keys: Implement update for the big_key type")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Daehyeon Ko <4ncienth@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261017152123.1200429-1-4ncienth@gmail.com?part=1
next prev parent reply other threads:[~2026-10-17 15:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 4:00 [PATCH] keys: big_key: Reserve the final quota before destroying the payload Daehyeon Ko
2026-10-16 4:07 ` sashiko-bot
2026-10-16 23:33 ` Jarkko Sakkinen
2026-10-16 23:40 ` Jarkko Sakkinen
2026-10-17 15:21 ` [PATCH v2] keys: big_key: Remove the redundant quota reservation Daehyeon Ko
2026-10-17 15:28 ` sashiko-bot [this message]
2026-10-17 20:39 ` Jarkko Sakkinen
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=sashiko-outbox-175584@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox