All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joey Lee <JLee@suse.com>
To: "linux-security-module@vger.kernel.org" 
	<linux-security-module@vger.kernel.org>
Cc: David Howells <dhowells@redhat.com>,
	"gnomes@lxorguk.ukuu.org.uk" <gnomes@lxorguk.ukuu.org.uk>,
	"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jforbes@redhat.com" <jforbes@redhat.com>,
	Matthew Garrett <mjg59@google.com>,
	James Morris <jmorris@namei.org>
Subject: Re: [PATCH 18/30] acpi: Disable APEI error injection if the kernel is locked down
Date: Thu, 7 Nov 2019 08:21:40 +0000	[thread overview]
Message-ID: <20191107082131.GI12016@linux-l9pv.suse> (raw)
In-Reply-To: <151024877315.28329.472560163492858160.stgit@warthog.procyon.org.uk>

Hi experts,

On Thu, Nov 09, 2017 at 05:32:53PM +0000, David Howells wrote:
> From: Linn Crosetto <linn@hpe.com>
> 
> ACPI provides an error injection mechanism, EINJ, for debugging and testing
> the ACPI Platform Error Interface (APEI) and other RAS features.  If
> supported by the firmware, ACPI specification 5.0 and later provide for a
> way to specify a physical memory address to which to inject the error.
> 
> Injecting errors through EINJ can produce errors which to the platform are
> indistinguishable from real hardware errors.  This can have undesirable
> side-effects, such as causing the platform to mark hardware as needing
> replacement.
> 
> While it does not provide a method to load unauthenticated privileged code,
> the effect of these errors may persist across reboots and affect trust in
> the underlying hardware, so disable error injection through EINJ if
> the kernel is locked down.
> 
> Signed-off-by: Linn Crosetto <linn@hpe.com>
> Signed-off-by: David Howells <dhowells@redhat.com>
> Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
> cc: linux-acpi@vger.kernel.org

I was looking at the lockdown pathes in v5.4-rc kernel and found that the
"acpi: Disable APEI error injection if the kernel is locked down" did not
merged with lockdown patch set. This patch be sent with Matthew's pull
request lockdown patches for 5.2:
    http://kernsec.org/pipermail/linux-security-module-archive/2019-March/012033.html

But it didn't show in Morris's git:
    https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git/log/?h=next-lockdown

Maybe I missed some detail of this patch. Could anyone point out the
concern of this patch please?

> ---
> 
>  drivers/acpi/apei/einj.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
> index b38737c83a24..6d71e1e97b20 100644
> --- a/drivers/acpi/apei/einj.c
> +++ b/drivers/acpi/apei/einj.c
> @@ -518,6 +518,9 @@ static int einj_error_inject(u32 type, u32 flags, u64 param1, u64 param2,
>  	int rc;
>  	u64 base_addr, size;
>  
> +	if (kernel_is_locked_down("ACPI error injection"))
> +		return -EPERM;
> +
>  	/* If user manually set "flags", make sure it is legal */
>  	if (flags && (flags &
>  		~(SETWA_FLAGS_APICID|SETWA_FLAGS_MEM|SETWA_FLAGS_PCIE_SBDF)))
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-efi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Thanks
Joey Lee

  reply	other threads:[~2019-11-07  8:24 UTC|newest]

Thread overview: 130+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09 17:30 [PATCH 00/30] security, efi: Add kernel lockdown David Howells
2017-11-09 17:30 ` David Howells
2017-11-09 17:30 ` [PATCH 01/30] Add the ability to lock down access to the running kernel image David Howells
2017-11-09 17:30   ` David Howells
2017-11-09 17:31 ` [PATCH 03/30] ima: require secure_boot rules in lockdown mode David Howells
2017-11-09 17:31   ` David Howells
2017-11-09 17:31 ` [PATCH 05/30] Restrict /dev/{mem, kmem, port} when the kernel is locked down David Howells
2017-11-09 17:31   ` David Howells
2017-11-09 17:31 ` [PATCH 06/30] kexec: Disable at runtime if " David Howells
2017-11-09 17:31   ` David Howells
2017-11-09 17:31 ` [PATCH 07/30] Copy secure_boot flag in boot params across kexec reboot David Howells
2017-11-09 17:31   ` David Howells
2017-11-09 17:31 ` [PATCH 08/30] kexec_file: Restrict at runtime if the kernel is locked down David Howells
2017-11-09 17:31   ` David Howells
     [not found]   ` <151024869793.28329.4817577607302613028.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2018-01-11 11:59     ` Jiri Bohac
2018-01-11 11:59       ` Jiri Bohac
2018-01-11 11:59       ` Jiri Bohac
     [not found]       ` <20180111115915.dejachty3l7fwpmf-Q+Z4OdfSLAKN3ZZ/Hiejyg@public.gmane.org>
2018-01-11 12:01         ` [PATCH 08a/30] kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE Jiri Bohac
2018-01-11 12:01           ` Jiri Bohac
2018-01-11 12:01           ` Jiri Bohac
2018-01-11 12:43         ` [PATCH 08/30] kexec_file: Restrict at runtime if the kernel is locked down David Howells
2018-01-11 12:43           ` David Howells
2018-01-11 12:43           ` David Howells
2018-01-11 12:47           ` David Howells
2018-01-11 12:47             ` David Howells
     [not found]             ` <13005.1515674877-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2018-01-11 15:44               ` Jiri Bohac
2018-01-11 15:44                 ` Jiri Bohac
2018-01-11 15:44                 ` Jiri Bohac
     [not found]             ` <20180111154445.duootisvanetnr24-Q+Z4OdfSLAKN3ZZ/Hiejyg@public.gmane.org>
2018-01-17 16:16               ` David Howells
2018-01-17 16:16                 ` David Howells
2018-01-17 16:16                 ` David Howells
2018-01-11 12:02       ` [PATCH 08b/30] " Jiri Bohac
2018-01-11 12:02         ` Jiri Bohac
     [not found]       ` <20180111120157.23qceywzi6omvvkb-Q+Z4OdfSLAKN3ZZ/Hiejyg@public.gmane.org>
2018-01-16 16:31         ` [PATCH 08a/30] kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE David Howells
2018-01-16 16:31           ` David Howells
2018-01-16 16:31           ` David Howells
2018-01-16 19:39           ` Jiri Bohac
2018-01-16 19:39             ` Jiri Bohac
2018-01-17 16:34             ` David Howells
2018-01-17 16:34               ` David Howells
     [not found]               ` <24618.1516206864-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2018-01-19 12:54                 ` Jiri Bohac
2018-01-19 12:54                   ` Jiri Bohac
2018-01-19 12:54                   ` Jiri Bohac
2018-02-21 16:20                   ` David Howells
2018-02-21 16:20                     ` David Howells
2018-02-22 14:20   ` [PATCH 08/30] kexec_file: Restrict at runtime if the kernel is locked down David Howells
2018-02-22 14:20     ` David Howells
2018-02-22 14:21     ` David Howells
2018-02-22 14:21       ` David Howells
2018-02-22 19:14       ` Jiri Bohac
2018-02-22 19:14         ` Jiri Bohac
2018-02-22 19:08     ` Jiri Bohac
2018-02-22 19:08       ` Jiri Bohac
     [not found] ` <151024863544.28329.2436580122759221600.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-11-09 17:30   ` [PATCH 02/30] Add a SysRq option to lift kernel lockdown David Howells
2017-11-09 17:30     ` David Howells
2017-11-09 17:30     ` David Howells
2017-11-09 17:31   ` [PATCH 04/30] Enforce module signatures if the kernel is locked down David Howells
2017-11-09 17:31     ` David Howells
2017-11-09 17:31     ` David Howells
2018-02-22 13:07     ` David Howells
2018-02-22 13:07       ` David Howells
2018-02-22 18:44       ` Jiri Bohac
2018-02-22 18:44         ` Jiri Bohac
2017-11-09 17:31   ` [PATCH 09/30] hibernate: Disable when " David Howells
2017-11-09 17:31     ` David Howells
2017-11-09 17:31     ` David Howells
2017-11-09 17:34   ` [PATCH 30/30] efi: Lock down the kernel if booted in secure boot mode David Howells
2017-11-09 17:34     ` David Howells
2017-11-09 17:34     ` David Howells
2017-11-09 17:31 ` [PATCH 10/30] uswsusp: Disable when the kernel is locked down David Howells
2017-11-09 17:31   ` David Howells
2017-11-09 17:32 ` [PATCH 11/30] PCI: Lock down BAR access " David Howells
2017-11-09 17:32   ` David Howells
2017-11-09 17:32 ` [PATCH 12/30] x86: Lock down IO port " David Howells
2017-11-09 17:32   ` David Howells
2017-11-09 17:32 ` [PATCH 13/30] x86/msr: Restrict MSR " David Howells
2017-11-09 17:32   ` David Howells
2017-11-09 17:32 ` [PATCH 14/30] asus-wmi: Restrict debugfs interface " David Howells
2017-11-09 17:32   ` David Howells
2017-11-09 17:32 ` [PATCH 15/30] ACPI: Limit access to custom_method " David Howells
2017-11-09 17:32   ` David Howells
2017-11-09 17:32 ` [PATCH 16/30] acpi: Ignore acpi_rsdp kernel param when the kernel has been " David Howells
2017-11-09 17:32   ` David Howells
2017-11-09 17:32 ` [PATCH 17/30] acpi: Disable ACPI table override if the kernel is " David Howells
2017-11-09 17:32   ` David Howells
2017-11-09 17:32 ` [PATCH 18/30] acpi: Disable APEI error injection " David Howells
2017-11-09 17:32   ` David Howells
2019-11-07  8:21   ` Joey Lee [this message]
2022-05-28  0:11     ` joeyli
2017-11-09 17:33 ` [PATCH 19/30] scsi: Lock down the eata driver David Howells
2017-11-09 17:33   ` David Howells
2017-11-09 17:33 ` [PATCH 20/30] Prohibit PCMCIA CIS storage when the kernel is locked down David Howells
2017-11-09 17:33   ` David Howells
2017-11-09 17:33 ` [PATCH 21/30] Lock down TIOCSSERIAL David Howells
2017-11-09 17:33   ` David Howells
2017-11-09 17:33 ` [PATCH 22/30] Lock down module params that specify hardware parameters (eg. ioport) David Howells
2017-11-09 17:33   ` David Howells
2017-11-09 17:33 ` [PATCH 23/30] x86/mmiotrace: Lock down the testmmiotrace module David Howells
2017-11-09 17:33   ` David Howells
2017-11-09 17:33 ` [PATCH 24/30] debugfs: Disallow use of debugfs files when the kernel is locked down David Howells
2017-11-09 17:33   ` David Howells
2017-11-09 17:33 ` [PATCH 25/30] Lock down /proc/kcore David Howells
2017-11-09 17:33   ` David Howells
2017-11-09 17:33 ` [PATCH 26/30] Lock down ftrace David Howells
2017-11-09 17:33   ` David Howells
     [not found]   ` <151024883613.28329.14808632296386937974.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-11-10  9:23     ` Jiri Kosina
2017-11-10  9:23       ` Jiri Kosina
2017-11-10  9:23       ` Jiri Kosina
     [not found]   ` <alpine.LRH.2.00.1711101021440.24296-n3slAPhISTXBD9DXoRIzZw@public.gmane.org>
2017-11-10 10:07     ` David Howells
2017-11-10 10:07       ` David Howells
2017-11-10 10:07       ` David Howells
     [not found]       ` <27323.1510308432-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-11-10 10:15         ` Jiri Kosina
2017-11-10 10:15           ` Jiri Kosina
2017-11-10 10:15           ` Jiri Kosina
     [not found]       ` <nycvar.YFH.7.76.1711101114410.32604-YHPUNQjx9ReKbouaWp301Q@public.gmane.org>
2017-11-10 10:21         ` David Howells
2017-11-10 10:21           ` David Howells
2017-11-10 10:21           ` David Howells
2017-11-10 10:23           ` Jiri Kosina
2017-11-10 10:23             ` Jiri Kosina
     [not found]           ` <nycvar.YFH.7.76.1711101122190.32604-YHPUNQjx9ReKbouaWp301Q@public.gmane.org>
2017-11-10 11:06             ` David Howells
2017-11-10 11:06               ` David Howells
2017-11-10 11:06               ` David Howells
2017-11-09 17:34 ` [PATCH 27/30] Lock down kprobes David Howells
2017-11-09 17:34   ` David Howells
2017-11-09 17:34 ` [PATCH 28/30] bpf: Restrict kernel image access functions when the kernel is locked down David Howells
2017-11-09 17:34   ` David Howells
2017-11-09 17:34 ` [PATCH 29/30] efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode David Howells
2017-11-09 17:34   ` David Howells
2018-03-03  1:18 ` [PATCH 00/30] security, efi: Add kernel lockdown Andrew Morton
2018-03-03  1:18   ` Andrew Morton

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=20191107082131.GI12016@linux-l9pv.suse \
    --to=jlee@suse.com \
    --cc=dhowells@redhat.com \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=jforbes@redhat.com \
    --cc=jmorris@namei.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mjg59@google.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.