Linux Documentation
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Guicai Ma <maguicai@kylinos.cn>
Cc: keyrings@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	David Howells <dhowells@redhat.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Paul Moore <paul@paul-moore.com>,
	James Morris <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Jann Horn <jannh@google.com>
Subject: Re: [PATCH v4 2/2] KEYS: Reject keyring creation with overridden credentials
Date: Sat, 28 Nov 2026 12:23:11 +0200	[thread overview]
Message-ID: <awqrj3Hhb5UVQZMa@kernel.org> (raw)
In-Reply-To: <20261128021108.3171324-1-maguicai@kylinos.cn>

On Fri, Nov 27, 2026 at 09:11:08PM -0500, Guicai Ma wrote:
> On Fri, Nov 27, 2026 at 02:14:32PM +0200, Jarkko Sakkinen wrote:
> > If the current task is running with overridden credentials calling
> > commit_creds() is forbidden and triggers a BUG_ON().
> > 
> > Reject keyring creation with -EPERM when credentials are overridden.
> 
> Tested on the same arm64/KVM KASAN/lockdep setup on top of patch 1/2.
> Under override_creds(), lookup_user_key() with KEY_LOOKUP_CREATE now
> returns -EPERM for KEY_SPEC_{SESSION,PROCESS,THREAD,USER}_KEYRING
> without hitting commit_creds().
> 
> Reviewed-by: Guicai Ma <maguicai@kylinos.cn>
> Tested-by: Guicai Ma <maguicai@kylinos.cn>

Thanks a bunch!

Br, Jarkko

  reply	other threads:[~2026-11-28 10:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 12:14 [PATCH v4 1/2] KEYS: Return user session keyring on lookup Jarkko Sakkinen
2026-11-27 12:14 ` [PATCH v4 2/2] KEYS: Reject keyring creation with overridden credentials Jarkko Sakkinen
2026-11-28  2:11   ` Guicai Ma
2026-11-28 10:23     ` Jarkko Sakkinen [this message]
2026-11-28  2:11 ` [PATCH v4 1/2] KEYS: Return user session keyring on lookup Guicai Ma

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=awqrj3Hhb5UVQZMa@kernel.org \
    --to=jarkko@kernel.org \
    --cc=corbet@lwn.net \
    --cc=dhowells@redhat.com \
    --cc=jannh@google.com \
    --cc=jmorris@namei.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=maguicai@kylinos.cn \
    --cc=paul@paul-moore.com \
    --cc=rdunlap@infradead.org \
    --cc=serge@hallyn.com \
    --cc=skhan@linuxfoundation.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