From: Junxiao Bi <junxiao.bi@oracle.com>
To: Paul Moore <paul@paul-moore.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org, jmorris@namei.org,
serge@hallyn.com, nathanl@linux.ibm.com, joe.jin@oracle.com,
Eric <eric.snowberg@oracle.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
axboe@kernel.dk
Subject: Re: Semantics of blktrace with lockdown (integrity) enabled kernel.
Date: Mon, 10 Apr 2023 12:19:53 -0700 [thread overview]
Message-ID: <93ef5db7-fb4d-bf3f-9456-3fb6e7d5ca29@oracle.com> (raw)
In-Reply-To: <CAHC9VhR06pa2mDwW26XFqiry11Ubz2_3YKj+ayftu0JdYx9m9w@mail.gmail.com>
On 4/6/23 2:43 PM, Paul Moore wrote:
> On Thu, Apr 6, 2023 at 3:33 PM Konrad Rzeszutek Wilk
> <konrad.wilk@oracle.com> wrote:
>> On Thu, Apr 06, 2023 at 02:39:57PM -0400, Paul Moore wrote:
> ...
>
>>> Before we go any further, can you please verify that your issue is
>>> reproducible on a supported, upstream tree (preferably Linus')?
>> Yes. Very much so.
> Okay, in that case I suspect the issue is due to the somewhat limited
> granularity in the lockdown LSM. While there are a number of
> different lockdown "levels", the reality is that the admin has to
> choose from either NONE, INTEGRITY, or CONFIDENTIALITY. Without
> digging to deep into the code path that you would be hitting, we can
> see that TRACEFS is blocked by the CONFIDENTIALITY (and therefore
> INTEGRITY too) setting and DEBUGFS is blocked by the INTEGRITY
> setting. With DEBUGFS blocked by INTEGRITY, the only lockdown option
> that would allow DEBUGFS is NONE.
>
> Without knowing too much about blktrace beyond the manpage, it looks
> like it has the ability to trace/snoop on the block device operations
> so I don't think this is something we would want to allow in a
> "locked" system.
blktrace depends on tracepoint in block layer to trace io events of
block devices,
through the test with mainline, those tracepoints were not blocked by
lockdown.
If snoop block devices operations is a security concern in lock down, these
tracepoints should be disabled?
[root@jubi-ol8 tracecmd]# uname -a
Linux jubi-ol8 6.3.0-rc6.master.20230410.ol8.x86_64 #1 SMP
PREEMPT_DYNAMIC Mon Apr 10 03:33:56 PDT 2023 x86_64 x86_64 x86_64 GNU/Linux
[root@jubi-ol8 tracecmd]# cat /sys/kernel/security/lockdown
none [integrity] confidentiality
[root@jubi-ol8 tracecmd]# trace-cmd record -e block:block_rq_issue -e
block:block_rq_complete
Hit Ctrl^C to stop recording
^CCPU0 data recorded at offset=0x9fa000
4096 bytes in size
CPU1 data recorded at offset=0x9fb000
4096 bytes in size
CPU2 data recorded at offset=0x9fc000
53248 bytes in size
CPU3 data recorded at offset=0xa09000
12288 bytes in size
Thanks,
Junxiao.
>
> Sorry.
>
next prev parent reply other threads:[~2023-04-10 19:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 17:37 Semantics of blktrace with lockdown (integrity) enabled kernel Konrad Rzeszutek Wilk
2023-04-06 18:39 ` Paul Moore
2023-04-06 19:30 ` Junxiao Bi
2023-04-06 21:30 ` Paul Moore
2023-04-06 19:32 ` Konrad Rzeszutek Wilk
2023-04-06 21:43 ` Paul Moore
2023-04-10 19:19 ` Junxiao Bi [this message]
2023-04-10 20:22 ` Paul Moore
2023-04-10 21:28 ` Junxiao Bi
2023-04-10 21:44 ` Paul Moore
2023-04-10 21:51 ` Junxiao Bi
2023-04-10 22:00 ` Paul Moore
2023-04-10 22:31 ` Junxiao Bi
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=93ef5db7-fb4d-bf3f-9456-3fb6e7d5ca29@oracle.com \
--to=junxiao.bi@oracle.com \
--cc=axboe@kernel.dk \
--cc=boris.ostrovsky@oracle.com \
--cc=eric.snowberg@oracle.com \
--cc=jmorris@namei.org \
--cc=joe.jin@oracle.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=nathanl@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;
as well as URLs for NNTP newsgroup(s).