Re: [patch 0/5] Support for sanitization flag in low-level page allocator

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ingo Molnar
Date: Saturday, May 30, 2009 - 11:21 am

* Larry H. <research@subreption.com> wrote:


i mean its most obvious meaning: if you change the SLAB subsystem, 
it goes via Pekka. Also, changes to the page allocator impact the 
SLAB subsystem too (which is the most common front-end to the page 
allocator) so he has a say there too obviously ...


SLOB is a rarely used (and high overhead) allocator. But the right 
answer there: fix kzalloc().


if kzfree() is broken then a number of places in the kernel that 
currently rely on it are potentially broken as well.

So as far as i'm concerned, your patchset is best expressed in the 
following form: Cryto, WEP and other sensitive places should be 
updated to use kzfree() to free keys.

This can be done unconditionally (without any Kconfig flag), as it's 
all in slow-paths - and because there's a real security value in 
sanitizing buffers that held sensitive keys, when they are freed.

Regarding a whole-sale 'clear everything on free' approach - that's 
both pointless security wise (sensitive information can still leak 
indefinitely [if you disagree i can provide an example]) and has a 
very high cost so it's not acceptable to normal Linux distros.


Unconditional honesty is definitely welcome ;-)

Freeing keys is an utter slow-path (if not then the clearing is the 
least of our performance worries), so any clearing cost is in the 
noise. Furthermore, kzfree() is an existing facility already in use. 
If it's reused by your patches that brings further advantages: 
kzfree(), if it has any bugs, will be fixed. While if you add a 
parallel facility kzfree() stays broken.

So your examples about real or suspected kzfree() breakages only 
strengthen the point that your patches should be using it. Keeping a 
rarely used kernel facility (like kzfree) correct is hard - 
splintering it by creating a parallel facility is actively harmful 
for that reason.

	Ingo
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Support for unconditional page sanitization, Larry H., (Sat May 23, 11:21 am)
Re: [PATCH] Support for unconditional page sanitization, Arjan van de Ven, (Sat May 23, 2:05 pm)
Re: [PATCH] Support for unconditional page sanitization, Arjan van de Ven, (Sun May 24, 9:38 am)
Re: [patch 0/5] Support for sanitization flag in low-level ..., Ingo Molnar, (Sat May 30, 11:21 am)