kernel-hardening.lists.openwall.com archive mirror
 help / color / mirror / Atom feed
From: Dan Aloni <dan@kernelim.com>
To: Jann Horn <jannh@google.com>
Cc: kernel list <linux-kernel@vger.kernel.org>,
	Kernel Hardening <kernel-hardening@lists.openwall.com>
Subject: Re: [kernel-hardening] [PATCH 0/5] RFC: Public key encryption of dmesg by the kernel
Date: Wed, 3 Jan 2018 22:41:42 +0200	[thread overview]
Message-ID: <20180103204142.GB28211@gmail.com> (raw)
In-Reply-To: <CAG48ez2gYFqifarkx3g8QP0aSzGswLpjxq_xPf4WiCPBn-GWAw@mail.gmail.com>

On Sat, Dec 30, 2017 at 10:42:49PM +0100, Jann Horn wrote:
> On Sat, Dec 30, 2017 at 6:57 PM, Dan Aloni <dan@kernelim.com> wrote:
> > From: Dan Aloni <dan@kernelim.com>
> >
> > Hi All,
> >
> > There has been a lot of progress in recent times regarding the removal
> > of sensitive information from dmesg (pointers, etc.), so I figured - why
> > not encrypt it all? However, I have not found any existing discussions
> > or references regarding this technical direction.
> >
> > I am not sure that desktop and power users would like to have their
> > kernel message encrypted, but there are scenarios such as in mobile
> > devices, where only the developers, makers of devices, may actually
> > benefit from access to kernel prints messages, and the users may be
> > more protected from exploits.
> 
> What is the benefit of your approach compared to setting
> dmesg_restrict=1 or something like that and letting userland decide
> who should get access to raw dmesg output and in what form?

Inter-process vulnerabilities (via sockets, shared memory, etc.) can
still allow one process with lesser dmesg privileges to exploit another
with higher privileges. Once the higher process is exploited, without
this approach, a plaintext dmesg is exposed for kernel exploitation
through it.

There can be systems designed in such a way that the most privileged
userland process would still be barred from accessing the raw hardware
directly, and in those systems we still want to guard the kernel from
exploits, in order to keep the hardware protected, but still allow
developers to debug the kernel.

-- 
Dan Aloni

  reply	other threads:[~2018-01-03 20:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-30 17:57 [kernel-hardening] [PATCH 0/5] RFC: Public key encryption of dmesg by the kernel Dan Aloni
2017-12-30 17:58 ` [kernel-hardening] [PATCH 1/5] crypto: fix memory leak in rsa-kcs1pad encryption Dan Aloni
2017-12-30 17:58 ` [kernel-hardening] [PATCH 2/5] certs: allow in-kernel access of trusted keys Dan Aloni
2017-12-30 18:52   ` [kernel-hardening] " Randy Dunlap
2017-12-30 17:58 ` [kernel-hardening] [PATCH 3/5] kernel/printk: allow kmsg to be encrypted using public key encryption Dan Aloni
2017-12-30 20:39   ` [kernel-hardening] " Randy Dunlap
2017-12-30 17:58 ` [kernel-hardening] [PATCH 4/5] tools: add dmesg decryption program Dan Aloni
2017-12-30 20:20   ` [kernel-hardening] " Randy Dunlap
2017-12-30 17:58 ` [kernel-hardening] [PATCH 5/5] docs: add dmesg encryption doc Dan Aloni
2017-12-30 19:14   ` Boris Lukashev
2017-12-30 19:40   ` [kernel-hardening] " Randy Dunlap
2018-01-03 20:21     ` Dan Aloni
2018-01-03 20:45       ` Randy Dunlap
2017-12-30 21:42 ` [kernel-hardening] [PATCH 0/5] RFC: Public key encryption of dmesg by the kernel Jann Horn
2018-01-03 20:41   ` Dan Aloni [this message]
2018-01-18 21:57 ` [kernel-hardening] " Pavel Machek

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=20180103204142.GB28211@gmail.com \
    --to=dan@kernelim.com \
    --cc=jannh@google.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).