lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.99999.352.1910290359280.2844@trent.utfs.org>
Date:   Tue, 29 Oct 2019 04:05:16 -0700 (PDT)
From:   Christian Kujau <lists@...dbynature.de>
To:     Kees Cook <keescook@...omium.org>
cc:     Andrew Morton <akpm@...ux-foundation.org>,
        zhanglin <zhang.lin16@....com.cn>, dan.j.williams@...el.com,
        jgg@...pe.ca, mingo@...nel.org, dave.hansen@...ux.intel.com,
        namit@...are.com, bp@...e.de, christophe.leroy@....fr,
        rdunlap@...radead.org, osalvador@...e.de,
        richardw.yang@...ux.intel.com, linux-kernel@...r.kernel.org,
        xue.zhihong@....com.cn, wang.yi59@....com.cn,
        jiang.xuexin@....com.cn
Subject: Re: [PATCH] kernel: Restrict permissions of /proc/iomem.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ