[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120710113237.GB5215@hmsreliant.think-freely.org>
Date: Tue, 10 Jul 2012 07:32:37 -0400
From: Neil Horman <nhorman@...driver.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Gao feng <gaofeng@...fujitsu.com>, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, lizefan@...wei.com, tj@...nel.org,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH v2] net: cgroup: fix access the unallocated memory in
netprio cgroup
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:
> > there are some out of bound accesses in netprio cgroup.
>
> > - 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists