Subject: Re: [PATCH] net: cgroup: fix out of bounds accesses

From: Gao feng <[email-masked]>
Date: Tue, 10 Jul 2012 10:33:23 +0800

于 2012年07月10日 05:51, David Miller 写道:
> From: Gao feng <[email-masked]>
> Date: Mon, 09 Jul 2012 16:15:29 +0800
> 
>> 于 2012年07月09日 15:45, Eric Dumazet 写道:
>>> From: Eric Dumazet <[email-masked]>
>>>
>>> dev->priomap is allocated by extend_netdev_table() called from
>>> update_netdev_tables().
>>> And this is only called if write_priomap() is called.
>>>
>>> But if write_priomap() is not called, it seems we can have out of bounds
>>> accesses in cgrp_destroy(), read_priomap() & skb_update_prio()
>>>
>>> With help from Gao Feng
>>>
>>> Signed-off-by: Eric Dumazet <[email-masked]>
>>> Cc: Neil Horman <[email-masked]>
>>> Cc: Gao feng <[email-masked]>
>>> ---
>>> net/core/dev.c            |    8 ++++++--
>>> net/core/netprio_cgroup.c |    4 ++--
>>> 2 files changed, 8 insertions(+), 4 deletions(-)
>>
>> Acked-by: Gao feng <[email-masked]>
> 
> Applied.
> 

Hi David

Please see my patch in this thread, I think it's a better way to fix this bug.

Thanks.