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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1299509808.2071.1445.camel@dan>
Date:	Mon, 07 Mar 2011 09:56:48 -0500
From:	Dan Rosenberg <drosenberg@...curity.com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
Cc:	Ted Ts'o <tytso@....edu>, Matt Mackall <mpm@...enic.com>,
	Pekka Enberg <penberg@...nel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Dave Hansen <dave@...ux.vnet.ibm.com>, cl@...ux-foundation.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] Make /proc/slabinfo 0400

On Sun, 2011-03-06 at 13:19 +0000, Alan Cox wrote:
> > If we had wrappers for the most common cases, then any cases that were
> > left that used copy_from_user() explicitly could be flagged and
> > checked by hand, since they would be exception, and not the rule.
> 
> Arjan's copy_from_user validation code already does verification checks
> on the copies using gcc magic.
> 
> Some of the others might be useful - kmalloc_from_user() is a fairly
> obvious interface, a copy_from_user_into() interface where you pass
> the destination object and its actual length as well is mostly covered by
> Arjan's stuff.
> 
> Alan

This is all worthwhile discussion, and a good implementation of these
kinds of features is available as part of grsecurity (PAX_USERCOPY) - it
provides additional bounds-checking for copy operations into both heap
and stack buffers.  Rather than reinventing the wheel, perhaps it would
be a better use of time to extract this patch and make it suitable for
inclusion.

In the meantime, I'd like to get back to the original patch
(make /proc/slabinfo 0400), and the subsequent followup patch (randomize
free objects within a slab).  While it's clear that these patches by
themselves will not entirely prevent kernel heap exploits, they both
seem to be sane improvements, won't significantly impact performance,
and shouldn't be more than a very minor inconvenience to some small
subset of normal users.  In addition, the absence of these changes might
undermine future hardening improvements (e.g. with a more hardened heap,
the readability of /proc/slabinfo may be more necessary for successful
exploitation).

-Dan

--
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