Thread (5 messages) flat view 5 messages, 3 authors, 2012-07-11

Re: [PATCH v2] net: cgroup: fix access the unallocated memory in netprio cgroup

From: Neil Horman <nhorman@tuxdriver.com>
Date: 2012-07-10 11:32:53
Also in: lkml

On Tue, Jul 10, 2012 at 01:05:50PM +0200, Eric Dumazet wrote:
On Tue, 2012-07-10 at 18:44 +0800, Gao feng wrote:
quoted
there are some out of bound accesses in netprio cgroup.
quoted
-	update_netdev_tables();
+	ret = extend_netdev_table(dev, max_len);
+	if (ret < 0)
+		goto out_free_devname;
+
 	ret = 0;
 	rcu_read_lock();
 	map = rcu_dereference(dev->priomap);
Its unfortunately adding a bug.

extend_netdev_table() is protected by RTNL.
More specifically it needs to be protected by rtnl, and the call above isn't.
Other than that it looks pretty good to me.
Neil
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help