All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: David Howells <dhowells@redhat.com>
Cc: Eric Biggers <ebiggers@kernel.org>,
	linux-integrity@vger.kernel.org, stable@vger.kernel.org,
	Anvik Loitongbam <permissiontogallop@gmail.com>,
	Paul Moore <paul@paul-moore.com>,
	James Morris <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Mimi Zohar <zohar@linux.vnet.ibm.com>,
	"open list:KEYS/KEYRINGS" <keyrings@vger.kernel.org>,
	"open list:SECURITY SUBSYSTEM"
	<linux-security-module@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] KEYS: Reject restricted dest_keyring in construct_alloc_key()
Date: Sat, 31 Oct 2026 11:49:22 +0200	[thread overview]
Message-ID: <auW5oonD4v63Cog6@kernel.org> (raw)
In-Reply-To: <20261031092820.497238-1-jarkko@kernel.org>

On Sat, Oct 31, 2026 at 11:28:18AM +0200, Jarkko Sakkinen wrote:
> construct_alloc_key() links keys into dest_keyring without checking
> restrict_link, allowing keys whose key->state reaches KEY_IS_POSITIVE to
> remain in a restricted keyring when instantiated without relinking into
> dest_keyring. Reject restricted destination keyrings with -EPERM after
> __key_link_lock() unless KEY_ALLOC_BYPASS_RESTRICTION is set.
> 
> Cc: stable@vger.kernel.org
> Fixes: 5ac7eace2d00 ("KEYS: Add a facility to restrict new links into a keyring")
> Reported-by: Anvik Loitongbam <permissiontogallop@gmail.com>
> Closes: https://lore.kernel.org/keyrings/20261030173930.40948-1-permissiontogallop@gmail.com/
> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>

I don't understand why this came out twice. I must have forgot to add
--dry-run when I trialed it. Sorry about that; was unintended.

Br, Jarkko

      parent reply	other threads:[~2026-10-31  9:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-31  9:28 [PATCH] KEYS: Reject restricted dest_keyring in construct_alloc_key() Jarkko Sakkinen
2026-10-31  9:28 ` Jarkko Sakkinen
2026-10-31  9:37   ` sashiko-bot
2026-10-31  9:34 ` sashiko-bot
2026-10-31  9:49 ` Jarkko Sakkinen [this message]

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=auW5oonD4v63Cog6@kernel.org \
    --to=jarkko@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=ebiggers@kernel.org \
    --cc=jmorris@namei.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=permissiontogallop@gmail.com \
    --cc=serge@hallyn.com \
    --cc=stable@vger.kernel.org \
    --cc=zohar@linux.vnet.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.