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

2012-07-09 Thread David Miller
From: Gao feng Date: Tue, 10 Jul 2012 10:33:23 +0800 > Please see my patch in this thread, I think it's a better way to fix this bug. You'll need to work that out with Eric, fwiw I think his patch was clean and just fine and it's staying in my tree. -- To unsubscribe from this list: send the

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

2012-07-09 Thread Gao feng
于 2012年07月10日 05:51, David Miller 写道: > From: Gao feng > Date: Mon, 09 Jul 2012 16:15:29 +0800 > >> 于 2012年07月09日 15:45, Eric Dumazet 写道: >>> From: Eric Dumazet >>> >>> dev->priomap is allocated by extend_netdev_table() called from >>> update_netdev_tables(). >>> And this is only called if

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

2012-07-09 Thread David Miller
From: Gao feng Date: Mon, 09 Jul 2012 16:15:29 +0800 > 于 2012年07月09日 15:45, Eric Dumazet 写道: >> From: Eric Dumazet >> >> 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

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

2012-07-09 Thread Neil Horman
On Mon, Jul 09, 2012 at 02:40:25PM +0200, Eric Dumazet wrote: > On Mon, 2012-07-09 at 08:13 -0400, Neil Horman wrote: > > On Mon, Jul 09, 2012 at 01:50:52PM +0200, Eric Dumazet wrote: > > > On Mon, 2012-07-09 at 07:01 -0400, Neil Horman wrote: > > > > > > > Thank you for doing this Eric, Gao.

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

2012-07-09 Thread Eric Dumazet
On Mon, 2012-07-09 at 08:13 -0400, Neil Horman wrote: > On Mon, Jul 09, 2012 at 01:50:52PM +0200, Eric Dumazet wrote: > > On Mon, 2012-07-09 at 07:01 -0400, Neil Horman wrote: > > > > > Thank you for doing this Eric, Gao. Just to be sure (I asked in the > > > previous > > > thread), would it be

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

2012-07-09 Thread Neil Horman
On Mon, Jul 09, 2012 at 01:50:52PM +0200, Eric Dumazet wrote: > On Mon, 2012-07-09 at 07:01 -0400, Neil Horman wrote: > > > Thank you for doing this Eric, Gao. Just to be sure (I asked in the > > previous > > thread), would it be better to avoid the length check in skb_update_prio, > > and > >

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

2012-07-09 Thread Eric Dumazet
On Mon, 2012-07-09 at 07:01 -0400, Neil Horman wrote: > Thank you for doing this Eric, Gao. Just to be sure (I asked in the previous > thread), would it be better to avoid the length check in skb_update_prio, and > instead update the netdev tables to be long enough in cgrp_create and in >

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

2012-07-09 Thread Neil Horman
On Mon, Jul 09, 2012 at 09:45:10AM +0200, Eric Dumazet wrote: > From: Eric Dumazet > > 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

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

2012-07-09 Thread Gao feng
于 2012年07月09日 15:45, Eric Dumazet 写道: > From: Eric Dumazet > > 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

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

2012-07-09 Thread Eric Dumazet
From: Eric Dumazet 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()

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

2012-07-09 Thread Eric Dumazet
From: Eric Dumazet eduma...@google.com 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()

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

2012-07-09 Thread Gao feng
于 2012年07月09日 15:45, Eric Dumazet 写道: From: Eric Dumazet eduma...@google.com 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

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

2012-07-09 Thread Neil Horman
On Mon, Jul 09, 2012 at 09:45:10AM +0200, Eric Dumazet wrote: From: Eric Dumazet eduma...@google.com 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

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

2012-07-09 Thread Eric Dumazet
On Mon, 2012-07-09 at 07:01 -0400, Neil Horman wrote: Thank you for doing this Eric, Gao. Just to be sure (I asked in the previous thread), would it be better to avoid the length check in skb_update_prio, and instead update the netdev tables to be long enough in cgrp_create and in

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

2012-07-09 Thread Neil Horman
On Mon, Jul 09, 2012 at 01:50:52PM +0200, Eric Dumazet wrote: On Mon, 2012-07-09 at 07:01 -0400, Neil Horman wrote: Thank you for doing this Eric, Gao. Just to be sure (I asked in the previous thread), would it be better to avoid the length check in skb_update_prio, and instead

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

2012-07-09 Thread Eric Dumazet
On Mon, 2012-07-09 at 08:13 -0400, Neil Horman wrote: On Mon, Jul 09, 2012 at 01:50:52PM +0200, Eric Dumazet wrote: On Mon, 2012-07-09 at 07:01 -0400, Neil Horman wrote: Thank you for doing this Eric, Gao. Just to be sure (I asked in the previous thread), would it be better to

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

2012-07-09 Thread Neil Horman
On Mon, Jul 09, 2012 at 02:40:25PM +0200, Eric Dumazet wrote: On Mon, 2012-07-09 at 08:13 -0400, Neil Horman wrote: On Mon, Jul 09, 2012 at 01:50:52PM +0200, Eric Dumazet wrote: On Mon, 2012-07-09 at 07:01 -0400, Neil Horman wrote: Thank you for doing this Eric, Gao. Just to be sure

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

2012-07-09 Thread David Miller
From: Gao feng gaof...@cn.fujitsu.com Date: Mon, 09 Jul 2012 16:15:29 +0800 于 2012年07月09日 15:45, Eric Dumazet 写道: From: Eric Dumazet eduma...@google.com dev-priomap is allocated by extend_netdev_table() called from update_netdev_tables(). And this is only called if write_priomap() is

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

2012-07-09 Thread Gao feng
于 2012年07月10日 05:51, David Miller 写道: From: Gao feng gaof...@cn.fujitsu.com Date: Mon, 09 Jul 2012 16:15:29 +0800 于 2012年07月09日 15:45, Eric Dumazet 写道: From: Eric Dumazet eduma...@google.com dev-priomap is allocated by extend_netdev_table() called from update_netdev_tables(). And this is

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

2012-07-09 Thread David Miller
From: Gao feng gaof...@cn.fujitsu.com Date: Tue, 10 Jul 2012 10:33:23 +0800 Please see my patch in this thread, I think it's a better way to fix this bug. You'll need to work that out with Eric, fwiw I think his patch was clean and just fine and it's staying in my tree. -- To unsubscribe from