net: cgroup: fix out of bounds accesses
authorEric Dumazet <edumazet@google.com>
Sun, 8 Jul 2012 21:45:10 +0000 (21:45 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Jul 2012 21:50:54 +0000 (14:50 -0700)
commit91c68ce2b26319248a32d7baa1226f819d283758
treeeeeea052a0b13d2f97435fe33caa5139e4729a53
parent96ca7ffe748bf91f851e6aa4479aa11c8b1122ba
net: cgroup: fix out of bounds accesses

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@google.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Gao feng <gaofeng@cn.fujitsu.com>
Acked-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c
net/core/netprio_cgroup.c