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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGXu5jLgPCccC1kR1swdTsojh-nEw82QbhfBNXUgOYaGudTmjw@mail.gmail.com>
Date:	Tue, 31 Jan 2012 11:26:29 -0800
From:	Kees Cook <keescook@...omium.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Randy Dunlap <rdunlap@...otime.net>,
	Borislav Petkov <bp@...en8.de>,
	Vasiliy Kulikov <segoon@...nwall.com>,
	Dan Ballard <dan@...dstab.net>, Jiri Kosina <jkosina@...e.cz>,
	Al Viro <viro@...iv.linux.org.uk>,
	Stephen Wilson <wilsons@...rt.ca>,
	David Rientjes <rientjes@...gle.com>,
	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Eric Paris <eparis@...hat.com>,
	"Serge E. Hallyn" <serge.hallyn@...onical.com>,
	linux-doc@...r.kernel.org,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Colin Walters <walters@...bum.org>
Subject: Re: [PATCH v3] sysctl: control functionality of /proc/pid/mem

On Wed, Jan 25, 2012 at 3:30 PM, Andrew Morton
<akpm@...ux-foundation.org> wrote:
> On Mon, 23 Jan 2012 13:21:15 -0800
> Kees Cook <keescook@...omium.org> wrote:
>> Add the "proc_pid_mem" sysctl to control whether or not /proc/pid/mem is
>> allowed to work: 0: disabled, 1: read only, 2: read/write (default).
>
> I agree with Colin on this (he stole my line!).
>
> Overall, the patch looks really hacky and random.  I felt the same way
> as Vasily: it's easy to see how a significant number of similar (and
> hacky and random) patches could be added, resulting in a regrettable
> mess.
>
> Is there some better designed, more organized way of approaching all of
> this?  Random ideas:
>
> - A parallel /procfs-perms filesystem.  You write a number into
>  /procfs-perms/stat to affect access to /proc/stat (although why the
>  heck not just run `chmod /proc/stat'?) It's unclear how to handle
>  /proc/pid/.  Perhaps literally have a /procfs-perms/pid/ directory.

This seems like too much overhead to me.

> - Make tasks inherit their /proc/pid/* permissions across fork, do a
>  chmod /proc/1/whatever in initscripts.

This is actually pretty interesting. I think as long as it only
allowed the _reduction_ of access. I don't want a process to open up
access, just restrict it further. It does make me wonder what the
side-effects would be, though. Dropping user r/w perms to things for
non-DAC_OVERRIDE processes would be ... weird.

-Kees

-- 
Kees Cook
ChromeOS Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ