All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: keyrings@vger.kernel.org
Cc: Jarkko Sakkinen <jarkko@kernel.org>,
	linux-doc@vger.kernel.org, linux-security-module@vger.kernel.org,
	David Howells <dhowells@redhat.com>,
	Guicai Ma <maguicai@kylinos.cn>, James Morris <jmorris@namei.org>,
	Jann Horn <jannh@google.com>, Jonathan Corbet <corbet@lwn.net>,
	Paul Moore <paul@paul-moore.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: [PATCH 0/2] KEYS: Fix credential handling in lookup_user_key()
Date: Sun, 29 Nov 2026 23:41:12 +0200	[thread overview]
Message-ID: <20261129214115.3043489-1-jarkko@kernel.org> (raw)

The commit messages looked a bit too stub so I refined them just a bit
and piggybacked these changes for a sanity check round:

1. Return the user session keyring directly on non-creating
   KEY_SPEC_SESSION_KEYRING lookups instead of mutating task credentials.
2. Reject KEY_LOOKUP_CREATE with -EPERM when subjective credentials are
   overridden, avoiding the BUG_ON() in commit_creds().

Hope this helps with the clarity. They are pushed to my -next mirror
branch but I can still either drop or add more tags. If nothing comes
up, I'll just move forward with the PR.

Link: https://lore.kernel.org/keyrings/CAG48ez0XjVSR=M--UBauTm8sJuc+ZbhKzaPa3a6wrSVHyoKevw@mail.gmail.com/

Cc: keyrings@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-security-module@vger.kernel.org
Cc: David Howells <dhowells@redhat.com>
Cc: Guicai Ma <maguicai@kylinos.cn>
Cc: James Morris <jmorris@namei.org>
Cc: Jann Horn <jannh@google.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Paul Moore <paul@paul-moore.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>

Jarkko Sakkinen (2):
  KEYS: Return user session keyring on lookup
  KEYS: Reject keyring creation with overridden credentials

 Documentation/security/keys/core.rst |  7 ++--
 security/keys/keyctl.c               |  5 ++-
 security/keys/process_keys.c         | 50 +++++++++-------------------
 3 files changed, 22 insertions(+), 40 deletions(-)


base-commit: 822ba3a89c7896b26e4beb70e2ebffb881924dfe
prerequisite-patch-id: 6b9f0c26cb5c2290d5a2a78c18ccf225b09a6bbb
prerequisite-patch-id: 0f71199bbbbaf9fe1fa82afb1926b452c493532e
prerequisite-patch-id: 97be79eb77addef7282d5cb9966c4208cf0e965e
--
2.47.3


             reply	other threads:[~2026-11-29 21:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29 21:41 Jarkko Sakkinen [this message]
2026-11-29 21:41 ` [PATCH 1/2] KEYS: Return user session keyring on lookup Jarkko Sakkinen
2026-11-29 21:41 ` [PATCH 2/2] KEYS: Reject keyring creation with overridden credentials Jarkko Sakkinen
2026-11-29 21:51 ` [PATCH 0/2] KEYS: Fix credential handling in lookup_user_key() 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=20261129214115.3043489-1-jarkko@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-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 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.