Re: [PATCH net v2] packet: avoid out of bounds read in round robin fanout

2015-06-21 Thread David Miller
From: Willem de Bruijn Date: Wed, 17 Jun 2015 15:59:34 -0400 > From: Willem de Bruijn > > PACKET_FANOUT_LB computes f->rr_cur such that it is modulo > f->num_members. It returns the old value unconditionally, but > f->num_members may have changed since the last store. Ensure > that the return v

Re: [PATCH net v2] packet: avoid out of bounds read in round robin fanout

2015-06-18 Thread Eric Dumazet
On Wed, 2015-06-17 at 15:59 -0400, Willem de Bruijn wrote: > From: Willem de Bruijn > > PACKET_FANOUT_LB computes f->rr_cur such that it is modulo > f->num_members. It returns the old value unconditionally, but > f->num_members may have changed since the last store. Ensure > that the return value

[PATCH net v2] packet: avoid out of bounds read in round robin fanout

2015-06-17 Thread Willem de Bruijn
From: Willem de Bruijn PACKET_FANOUT_LB computes f->rr_cur such that it is modulo f->num_members. It returns the old value unconditionally, but f->num_members may have changed since the last store. Ensure that the return value is always < num. When modifying the logic, simplify it further by rep