From: Michael Ellerman <mpe@ellerman.id.au>
To: Paul Moore <paul@paul-moore.com>, Nathan Lynch <nathanl@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, jmorris@namei.org,
serge@hallyn.com, ajd@linux.ibm.com, gcwilson@linux.ibm.com,
nayna@linux.ibm.com
Subject: Re: [PATCH 1/2] powerpc/pseries: block untrusted device tree changes when locked down
Date: Fri, 23 Sep 2022 17:03:59 +1000 [thread overview]
Message-ID: <87zgeqzi5c.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <CAHC9VhQG_jEh_H8pV-qJgX2oX_fyGjXoBV7_EJOgvOd4ndc+Xw@mail.gmail.com>
Paul Moore <paul@paul-moore.com> writes:
> On Thu, Sep 22, 2022 at 3:38 PM Nathan Lynch <nathanl@linux.ibm.com> wrote:
>>
>> The /proc/powerpc/ofdt interface allows the root user to freely alter
>> the in-kernel device tree, enabling arbitrary physical address writes
>> via drivers that could bind to malicious device nodes, thus making it
>> possible to disable lockdown.
>>
>> Historically this interface has been used on the pseries platform to
>> facilitate the runtime addition and removal of processor, memory, and
>> device resources (aka Dynamic Logical Partitioning or DLPAR). Years
>> ago, the processor and memory use cases were migrated to designs that
>> happen to be lockdown-friendly: device tree updates are communicated
>> directly to the kernel from firmware without passing through untrusted
>> user space. I/O device DLPAR via the "drmgr" command in powerpc-utils
>> remains the sole legitimate user of /proc/powerpc/ofdt, but it is
>> already broken in lockdown since it uses /dev/mem to allocate argument
>> buffers for the rtas syscall. So only illegitimate uses of the
>> interface should see a behavior change when running on a locked down
>> kernel.
>>
>> Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
>> ---
>> arch/powerpc/platforms/pseries/reconfig.c | 5 +++++
>> include/linux/security.h | 1 +
>> security/security.c | 1 +
>> 3 files changed, 7 insertions(+)
>
> A couple of small nits below, but in general this seems reasonable.
> However, as we are currently at -rc6 I would like us to wait to merge
> this until after the upcoming merge window closes (I don't like
> merging new functionality into -next at -rc6).
It's a bug fix, not a new feature IMHO.
I'd like to take it via the powerpc tree.
cheers
next prev parent reply other threads:[~2022-09-23 7:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 19:38 [PATCH 0/2] powerpc/pseries: restrict error injection and DT changes when locked down Nathan Lynch
2022-09-22 19:38 ` [PATCH 1/2] powerpc/pseries: block untrusted device tree " Nathan Lynch
2022-09-23 1:18 ` Paul Moore
2022-09-23 7:03 ` Michael Ellerman [this message]
2022-09-23 15:58 ` Nathan Lynch
2022-09-22 19:38 ` [PATCH 2/2] powerpc/rtas: block error injection " Nathan Lynch
2022-09-23 1:28 ` Paul Moore
2022-09-23 7:12 ` Michael Ellerman
2022-09-23 15:39 ` Nathan Lynch
2022-09-23 17:42 ` Paul Moore
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=87zgeqzi5c.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=ajd@linux.ibm.com \
--cc=gcwilson@linux.ibm.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nathanl@linux.ibm.com \
--cc=nayna@linux.ibm.com \
--cc=paul@paul-moore.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox