From: Kees Cook <keescook@chromium.org>
To: Mark Salyzyn <salyzyn@android.com>
Cc: "Lukasz Stelmach" <stlman@poczta.fm>,
LKML <linux-kernel@vger.kernel.org>,
"Anton Vorontsov" <anton@enomsg.org>,
"Colin Cross" <ccross@android.com>,
"Tony Luck" <tony.luck@intel.com>,
"Krzysztof Kozlowski" <k.kozlowski@samsung.com>,
"Bartłomiej Żołnierkiewicz" <b.zolnierkie@samsung.com>
Subject: Re: [PATCH v4 4/5] pstore: add pmsg
Date: Tue, 3 Feb 2015 10:21:10 -0800 [thread overview]
Message-ID: <CAGXu5jJD977K4Y+=VafAWsKUcqhDadgh=u_++YLL25BxFDVcRQ@mail.gmail.com> (raw)
In-Reply-To: <54D0F1B7.7020204@android.com>
On Tue, Feb 3, 2015 at 8:05 AM, Mark Salyzyn <salyzyn@android.com> wrote:
> Thanks for your response.
>
> On 01/30/2015 12:57 PM, Lukasz Stelmach wrote:
>>
>> On 28.01.2015 18:28, Mark Salyzyn wrote:
>>>
>>> - Precious little user-space content goes to kmsg (otherwise you
>>> can ask why is there a syslogd?), there is a reason for this, user
>>> space is notorious for containing Personal Identifiable Information
>>> whereas kernel information does not.
>>
>> Sure it does too: MAC addresses, UUIDs, serial numbers. With mobile
>> devices these are actually PII.
>
> :-)
>
> Names, Passwords, credit card number, addresses. Personal Identifiable
> Information, lawsuits are never lodged against MAC addresses UUIDs or serial
> numbers.
>>>
>>> - pmsg0 can take a lot of content (with a ramoops backend) and
>>> will not disrupt/DOS the kernel logs.
>>
>> Documentation/ramoops.txt says it is for logging kernel oopses
>> and panics not user logs.
>
> I probably should have changed the ramoops.txt content with the addition of
> pmsg :-)
>>
>>
>> - /dev/pmsg0 write is atomic
>> devkmsg_write + vprintk_emit are atomic too.
>
> Hmmm, I managed to get content corrupted
>>>
>>> - /dev/pmsg0 is write only, there is no access to the live content
>>> _unless_ there is a reboot.
>>
>> Why do you consider this an advantage?
>
> It is more serendipity than design, once this feature was highlighted, it
> became a must-have for the security concerns. The current boot instance
> contains an environment of files, programs and state information that
> combined would be useful for cracking a large amount of PII. Once a kernel
> panics what remains is a trace of user-space activities that can be
> correlated with kernel activities in order to replay or triage what lead up
> to the kernel panic. Yet crippled enough to not be as useful as a vector.
>>>
>>> - Personal identification which abounds in user space could be placed
>>> into /dev/pmsg0, and there is no way except a reboot in order to
>>> extract the content, and then /sys/fs/pstore/pmsg-ramoops-0 can be
>>> deleted, or heavily MAC and DAC controlled to enforce protection
>>> (doing so to kmsg would be unlivable)
>>
>> Read access to /dev/kmsg can be limited too.
>
> When you delete /sys/fs/pstore/pmsg-ramoops-0 after moving it to secure
> storage, it is gone. Same is separately true for
> /sys/fs/pstore/console-ramoops-0, so yes, similar characteristics. The issue
> is separation. The issue is also no ability to read the live content of the
> user space data until it becomes relevant (kernel panic triage).
>>
>>
>> I think that the goals you present can be met with less code.
>> You could try adding support for multiple /dev/kmsg instances
>> for example. How about that?
>
> Not a bad idea. But with multiple kmsg instances, you also get to add code
> in pstore to divide it up along with a device tree that decides how much
> storage is provided for each instance. I would wager a desire will be
> expressed to make sure the live co There is a vacuum.ntent be accessible
> with a netlink socket and a new flag in dmesg which would be counter to our
> security concerns.
>
> pstore is all about persistence. kmsg is not, until pstore supports it. A
> user-space persistent storehouse felt appropriate to support at the bottom
> layer.
>
FWIW, I prefer keeping "pmsg" separate from "kmsg". They do feel
similar, but given the persistence backing, I think it justifies the
separation. I'm not sure it's right to change the semantics of kmsg.
-Kees
> Sincerely -- Mark Salyzyn
--
Kees Cook
Chrome OS Security
next prev parent reply other threads:[~2015-02-03 18:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 0:16 [PATCH v4 4/5] pstore: add pmsg Mark Salyzyn
2015-01-14 18:16 ` Kees Cook
2015-01-17 0:05 ` Luck, Tony
[not found] ` <871tmfz06r.fsf%stlman@poczta.fm>
2015-01-28 17:28 ` Mark Salyzyn
2015-01-30 20:57 ` Lukasz Stelmach
2015-02-03 16:05 ` Mark Salyzyn
2015-02-03 18:21 ` Kees Cook [this message]
2015-02-04 2:35 ` Lukasz Stelmach
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='CAGXu5jJD977K4Y+=VafAWsKUcqhDadgh=u_++YLL25BxFDVcRQ@mail.gmail.com' \
--to=keescook@chromium.org \
--cc=anton@enomsg.org \
--cc=b.zolnierkie@samsung.com \
--cc=ccross@android.com \
--cc=k.kozlowski@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=salyzyn@android.com \
--cc=stlman@poczta.fm \
--cc=tony.luck@intel.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;
as well as URLs for NNTP newsgroup(s).