From: Jarkko Sakkinen <jarkko@kernel.org>
To: Heiko Carstens <hca@linux.ibm.com>
Cc: Anastasia Eskova <anastasia.eskova@ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Peter Oberparleiter <oberpar@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
keyrings@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [PATCH 1/2] s390/cert_store: Allocate keyring with link restriction
Date: Mon, 23 Nov 2026 15:42:13 +0200 [thread overview]
Message-ID: <awRCtUt7_hHclKpe@kernel.org> (raw)
In-Reply-To: <20261123102324.483917-2-hca@linux.ibm.com>
On Mon, Nov 23, 2026 at 11:23:23AM +0100, Heiko Carstens wrote:
> From: Anastasia Eskova <anastasia.eskova@ibm.com>
>
> The keyring is linked into the user session keyring on allocation, but
> keyring_restrict() is only called after all certificates were added.
> Until then a possessor of the keyring can link arbitrary keys into it.
> If keyring_restrict() fails, the error is only logged and the keyring
> stays writable.
>
> Allocate the keyring with a restriction which rejects all links, create
> the certificate keys with KEY_ALLOC_BYPASS_RESTRICTION and drop the late
> keyring_restrict() call.
>
> Fixes: 8cf57d7217c3 ("s390: add support for user-defined certificates")
> Signed-off-by: Anastasia Eskova <anastasia.eskova@ibm.com>
> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
I think it is best for overall good that earliest possible release
for my intersecting changes is v4.7. I think that it is good to
do that architectural change but since it is a problem solved
there's no need to rush it in.
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Br, Jarkko
next prev parent reply other threads:[~2026-11-23 13:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 10:23 [PATCH 0/2] s390/cert_store: Restrict link creation and key type creation Heiko Carstens
2026-11-23 10:23 ` [PATCH 1/2] s390/cert_store: Allocate keyring with link restriction Heiko Carstens
2026-11-23 13:42 ` Jarkko Sakkinen [this message]
2026-11-23 14:11 ` Heiko Carstens
2026-11-23 14:18 ` Jarkko Sakkinen
2026-11-23 14:20 ` Jarkko Sakkinen
2026-11-23 10:23 ` [PATCH 2/2] s390/cert_store: Only allow the kernel to create cert_store_key keys Heiko Carstens
2026-11-23 13:43 ` Jarkko Sakkinen
2026-11-23 10:31 ` [PATCH 0/2] s390/cert_store: Restrict link creation and key type creation sashiko-bot
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=awRCtUt7_hHclKpe@kernel.org \
--to=jarkko@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=anastasia.eskova@ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=oberpar@linux.ibm.com \
--cc=svens@linux.ibm.com \
/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.