All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: "David Howells" <dhowells@redhat.com>,
	"David Woodhouse" <dwmw2@infradead.org>,
	"Paul Moore" <paul@paul-moore.com>,
	"James Morris" <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	"Mickaël Salaün" <mic@digikod.net>,
	keyrings@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	"Paul Menzel" <pmenzel@molgen.mpg.de>,
	"Mark Pearson" <markpearson@lenovo.com>
Subject: Re: [PATCH RESEND v6 0/3] certs: Prevent spurious errors on repeated blacklisting
Date: Fri, 20 Jan 2023 21:10:33 +0000	[thread overview]
Message-ID: <Y8sDSSbCcxydFDYx@kernel.org> (raw)
In-Reply-To: <20221212-keys-blacklist-v6-0-933267a80582@weissschuh.net>

On Mon, Jan 09, 2023 at 11:59:41PM +0000, Thomas Weißschuh wrote:
> When the blacklist keyring was changed to allow updates from the root
> user it gained an ->update() function that disallows all updates.
> When the a hash is blacklisted multiple times from the builtin or
> firmware-provided blacklist this spams prominent logs during boot:
> 
> [    0.890814] blacklist: Problem blacklisting hash (-13)
> 
> This affects the firmware of various vendors. Reported have been at least:
> * Samsung: https://askubuntu.com/questions/1436856/
> * Acer: https://ubuntuforums.org/showthread.php?t=2478840
> * MSI: https://forum.archlabslinux.com/t/blacklist-problem-blacklisting-hash-13-errors-on-boot/6674/7
> * Micro-Star: https://bbs.archlinux.org/viewtopic.php?id=278860
> * Lenovo: https://lore.kernel.org/lkml/c8c65713-5cda-43ad-8018-20f2e32e4432@t-8ch.de/
> 
> Note: In the meantime I lost access to the machine exhibiting the
> problematic behavior. If larger changes are required to this series
> somebody else would have to validate them or take over the series.
> 
> Changelog:
> 
> v1: https://lore.kernel.org/all/20221104014704.3469-1-linux@weissschuh.net/
> v1 -> v2:
>  * Improve logging message to include the failed hash
>  * Add key_create() function without update semantics
>  * Use key_create() from mark_raw_hash_blacklisted() and log specific message
>    on -EEXIST
> 
> v2: https://lore.kernel.org/lkml/20221109025019.1855-1-linux@weissschuh.net/
> v2 -> v3:
>  * Clarify commit titles and messages
>  * Drop the change to BLACKLIST_KEY_PERM from patch 3, as it was an artifact
>    of some obsolete version of the patch and not needed
> 
> v3: https://lore.kernel.org/lkml/20221118040343.2958-1-linux@weissschuh.net/
> v3 -> v4:
>  * Drop Fixes-tag from first patch
>  * Flesh out commit descriptions and messages
> 
> v4: https://lore.kernel.org/r/20221212-keys-blacklist-v4-0-00afeb3137fb@weissschuh.net
> v4 -> v5:
>  * Reduce lines needed by function calls in key.c
>  * Add Reviewed-by from Jarkko
> 
> v5: https://lore.kernel.org/r/20221212-keys-blacklist-v5-0-52e9eb5a8827@weissschuh.net
> v5 -> v6:
>  * Correct Jarkkos email in Reviewed-by tags
>  * Resend to hopefully reach @kernel.org recipients
> 
> Thomas Weißschuh (3):
>   certs: log hash value on blacklist error
>   KEYS: Add key_create()
>   certs: don't try to update blacklist keys
> 
>  certs/blacklist.c   |  21 ++++---
>  include/linux/key.h |   8 +++
>  security/keys/key.c | 149 +++++++++++++++++++++++++++++++++-----------
>  3 files changed, 132 insertions(+), 46 deletions(-)
> 
> --
> 2.38.1
> 
> To: David Howells <dhowells@redhat.com>
> To: David Woodhouse <dwmw2@infradead.org>
> To: Jarkko Sakkinen <jarkko@kernel.org>
> To: Paul Moore <paul@paul-moore.com>
> To: James Morris <jmorris@namei.org>
> To: "Serge E. Hallyn" <serge@hallyn.com>
> To: "Mickaël Salaün" <mic@digikod.net>
> Cc: keyrings@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-security-module@vger.kernel.org
> Cc: Paul Menzel <pmenzel@molgen.mpg.de>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> Cc: Mark Pearson <markpearson@lenovo.com>
> 
> ---
> Thomas Weißschuh (3):
>       certs: make blacklisted hash available in klog
>       KEYS: Add new function key_create()
>       certs: don't try to update blacklist keys
> 
>  certs/blacklist.c   |  21 ++++----
>  include/linux/key.h |   8 +++
>  security/keys/key.c | 137 ++++++++++++++++++++++++++++++++++++++--------------
>  3 files changed, 120 insertions(+), 46 deletions(-)
> ---
> base-commit: 512dee0c00ad9e9c7ae9f11fc6743702ea40caff
> change-id: 20221212-keys-blacklist-2c79a64667c9
> 
> Best regards,
> -- 
> Thomas Weißschuh <linux@weissschuh.net>

Hi, I'e applied and pushed this now. Thank you.

BR, Jarkko

      parent reply	other threads:[~2023-01-20 21:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09 23:59 [PATCH RESEND v6 0/3] certs: Prevent spurious errors on repeated blacklisting Thomas Weißschuh
2023-01-09 23:59 ` [PATCH RESEND v6 1/3] certs: make blacklisted hash available in klog Thomas Weißschuh
2023-01-09 23:59 ` [PATCH RESEND v6 2/3] KEYS: Add new function key_create() Thomas Weißschuh
2023-01-09 23:59 ` [PATCH RESEND v6 3/3] certs: don't try to update blacklist keys Thomas Weißschuh
2023-01-20 21:10 ` 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=Y8sDSSbCcxydFDYx@kernel.org \
    --to=jarkko@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=jmorris@namei.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=markpearson@lenovo.com \
    --cc=mic@digikod.net \
    --cc=paul@paul-moore.com \
    --cc=pmenzel@molgen.mpg.de \
    --cc=serge@hallyn.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.