From: Christian Kujau <lists@nerdbynature.de>
To: Kees Cook <keescook@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
zhanglin <zhang.lin16@zte.com.cn>,
dan.j.williams@intel.com, jgg@ziepe.ca, mingo@kernel.org,
dave.hansen@linux.intel.com, namit@vmware.com, bp@suse.de,
christophe.leroy@c-s.fr, rdunlap@infradead.org,
osalvador@suse.de, richardw.yang@linux.intel.com,
linux-kernel@vger.kernel.org, xue.zhihong@zte.com.cn,
wang.yi59@zte.com.cn, jiang.xuexin@zte.com.cn
Subject: Re: [PATCH] kernel: Restrict permissions of /proc/iomem.
Date: Tue, 29 Oct 2019 04:05:16 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.21.99999.352.1910290359280.2844@trent.utfs.org> (raw)
In-Reply-To: <201910281213.720C0DB89@keescook>
On Mon, 28 Oct 2019, Kees Cook wrote:
> > It's risky to change things like this - heaven knows which userspace
> > applications might break.
> >
> > Possibly we could obfuscate the information if that is considered
> > desirable. Why is this a problem anyway? What are the possible
> > exploit scenarios?
>
> This is already done: kptr_restrict sysctl already zeros these values
> if it is set. e.g.:
>
> 00000000-00000000 : System RAM
> 00000000-00000000 : Kernel code
> 00000000-00000000 : Kernel data
> 00000000-00000000 : Kernel bss
>
> > Can't the same info be obtained by running dmesg and looking at the
> > startup info?
>
> Both virtual and physical address dumps in dmesg are considered "bad
> form" these days and most have been removed.
>
> > Can't the user who is concerned about this run chmod 0400 /proc/iomem
> > at boot?
>
> That is also possible.
As a user, I still like this patch, or some variation of it. On various
(server and desktop) systems I do this during boot for some time now and
never had a problem:
find /proc -xdev -mindepth 1 -maxdepth 1 ! \( -name "[0-9]*" \
-o -name cpuinfo -o -name modules -o -name loadavg -o -name meminfo \
-o -name mounts -o -name net -o -name self -o -name diskstats \
-o -name stat -o -name sys -o -name swaps -o -name thread-self \
-o -name vmstat -o -name uptime \) -exec chmod -c go-rwx '{}' +
C.
--
BOFH excuse #436:
Daemon escaped from pentagram
next prev parent reply other threads:[~2019-10-29 11:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-25 8:56 [PATCH] kernel: Restrict permissions of /proc/iomem zhanglin
2019-10-25 21:32 ` Andrew Morton
2019-10-28 19:16 ` Kees Cook
2019-10-29 11:05 ` Christian Kujau [this message]
2019-10-25 21:38 ` Dave Hansen
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=alpine.DEB.2.21.99999.352.1910290359280.2844@trent.utfs.org \
--to=lists@nerdbynature.de \
--cc=akpm@linux-foundation.org \
--cc=bp@suse.de \
--cc=christophe.leroy@c-s.fr \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=jgg@ziepe.ca \
--cc=jiang.xuexin@zte.com.cn \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namit@vmware.com \
--cc=osalvador@suse.de \
--cc=rdunlap@infradead.org \
--cc=richardw.yang@linux.intel.com \
--cc=wang.yi59@zte.com.cn \
--cc=xue.zhihong@zte.com.cn \
--cc=zhang.lin16@zte.com.cn \
/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).