From: Yuansheng Yang <0xbeac@gmail.com>
To: Jarkko Sakkinen <jarkko@kernel.org>
Cc: dhowells@redhat.com, paul@paul-moore.com, jmorris@namei.org,
serge@hallyn.com, keyrings@vger.kernel.org,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v6] KEYS: Protect pkey method checks against type removal
Date: Tue, 10 Nov 2026 11:02:26 +0800 [thread overview]
Message-ID: <20261110030226.9898-1-0xbeac@gmail.com> (raw)
In-Reply-To: <avJ4KM-Erci0FkgZ@kernel.org>
On Tue, Nov 10, 2026 at 03:49:28AM +0200, Jarkko Sakkinen wrote:
> > - if (!params->key->type->asym_query)
> > - return -EOPNOTSUPP;
> > -
>
> I think I asked to remove this. I need to revoke my reviewed-by from
> this version.
>
> It's not relevant for the bug fix.
You did, in the v4 review, and v6 dropped the check again by mistake.
v7 restores it: keyctl_pkey_params_get() is identical to 7.4-rc1 again,
and the diff does not touch it at all.
The two early checks in keyctl_pkey_e_d_s() and keyctl_pkey_verify()
stay where v6 moved them, in the key->sem section of
keyctl_pkey_params_get_2() and after the buffer size validation, so the
error precedence is unchanged. Only the check you named is restored.
Sashiko's remaining point on v5 was that this check reads key->type
without key->sem. That is how 7.4-rc1 has it and you asked to keep the
hunk out of the patch, so v7 leaves it alone; the call sites recheck
the method under key->sem before they use it.
> Also if possible try to make a bit more compact description of the
> fix. I did not ask this for reviewed patch because did not see it
> relevant enough but now that this needs a new round, you could
> address this part too.
Done: the race diagram and the paragraph describing the early-check
move are gone; the problem, the action, why it is safe and the coverage
list stay.
v7 follows right after this mail.
Thanks,
Yuansheng Yang
next prev parent reply other threads:[~2026-11-10 3:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 3:29 [PATCH] " BeaCox
2026-11-03 15:17 ` Jarkko Sakkinen
2026-11-04 2:14 ` [PATCH v2] " BeaCox
2026-11-04 14:49 ` Jarkko Sakkinen
2026-11-04 23:59 ` Jarkko Sakkinen
2026-11-05 2:24 ` Yuansheng Yang
2026-11-05 3:28 ` Jarkko Sakkinen
2026-11-05 4:38 ` [PATCH v3] " Yuansheng Yang
2026-11-05 16:55 ` Jarkko Sakkinen
2026-11-05 19:36 ` [PATCH v4] " Yuansheng Yang
2026-11-06 14:08 ` Jarkko Sakkinen
2026-11-08 12:59 ` Yuansheng Yang
2026-11-08 13:14 ` [PATCH v5] " Yuansheng Yang
2026-11-08 15:45 ` Jarkko Sakkinen
2026-11-09 5:52 ` [PATCH v6] " Yuansheng Yang
2026-11-09 15:04 ` Jarkko Sakkinen
2026-11-09 15:06 ` Jarkko Sakkinen
2026-11-10 1:49 ` Jarkko Sakkinen
2026-11-10 3:02 ` Yuansheng Yang [this message]
2026-11-10 3:02 ` [PATCH v7] " Yuansheng Yang
2026-11-10 3:06 ` 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=20261110030226.9898-1-0xbeac@gmail.com \
--to=0xbeac@gmail.com \
--cc=dhowells@redhat.com \
--cc=jarkko@kernel.org \
--cc=jmorris@namei.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=serge@hallyn.com \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®