Re: [kernel-hardening] Re: [PATCH 2/2] mm: restrict access to /proc/meminfo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 29, 2011 at 09:30 -0700, Dave Hansen wrote:
> On Thu, 2011-09-29 at 20:18 +0400, Vasiliy Kulikov wrote:
> > I'm not convinced with rounding the information to MBs.  The attacker
> > still may fill slabs with new objects to trigger new slab pages
> > allocations.  He will be able to see when this MB-granularity barrier is
> > overrun thus seeing how many kbs there were before:
> > 
> >     old = new - filled_obj_size_sum
> > 
> > As `new' is just increased, it means it is known with KB granularity,
> > not MB.  By counting used slab objects he learns filled_obj_size_sum.
> > 
> > So, rounding gives us nothing, but obscurity. 
> 
> I'll agree that it doesn't fundamentally fix anything.  But, it does
> make an attack more difficult in the real world.

No, it doesn't.  An attacker is able to simply add/remove objects from
slab and get the precise numbers.  The only thing it takes some time,
but the delay is negligible.  It neither eliminates the whole attack
vector in specific cases nor makes the attacks probabilistic.


>  There's a reason that
> real-world attackers are going after slabinfo: it's a fundamentally
> *BETTER* than meminfo as a tool with which to aim an attack.

Agreed, it gives much more information.


>  A
> MB-rounded meminfo is also fundamentally *BETTER* than a
> PAGE_SIZE-rounded meminfo.  I find it hard to call this "nothing".

Could you elaborate?  As I've tried to describe above, an attacker still
may recover the numbers.

Thanks,

-- 
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]