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

From: Gao feng
Date: Mon Jul 09 2012 - 22:32:57 EST


ä 2012å07æ10æ 05:51, David Miller åé:
> From: Gao feng <gaofeng@xxxxxxxxxxxxxx>
> Date: Mon, 09 Jul 2012 16:15:29 +0800
>
>> ä 2012å07æ09æ 15:45, Eric Dumazet åé:
>>> From: Eric Dumazet <edumazet@xxxxxxxxxx>
>>>
>>> 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 <edumazet@xxxxxxxxxx>
>>> Cc: Neil Horman <nhorman@xxxxxxxxxxxxx>
>>> Cc: Gao feng <gaofeng@xxxxxxxxxxxxxx>
>>> ---
>>> net/core/dev.c | 8 ++++++--
>>> net/core/netprio_cgroup.c | 4 ++--
>>> 2 files changed, 8 insertions(+), 4 deletions(-)
>>
>> Acked-by: Gao feng <gaofeng@xxxxxxxxxxxxxx>
>
> Applied.
>

Hi David

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

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