lkml.org 
[lkml]   [2020]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][next] netfilter: nftables: fix incorrect increment of loop counter
On Tue, Dec 15, 2020 at 03:38:30PM +0100, Pablo Neira Ayuso wrote:
> Hi,
>
> On Mon, Dec 14, 2020 at 11:40:15PM +0000, Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > The intention of the err_expr cleanup path is to iterate over the
> > allocated expr_array objects and free them, starting from i - 1 and
> > working down to the start of the array. Currently the loop counter
> > is being incremented instead of decremented and also the index i is
> > being used instead of k, repeatedly destroying the same expr_array
> > element. Fix this by decrementing k and using k as the index into
> > expr_array.
> >
> > Addresses-Coverity: ("Infinite loop")
> > Fixes: 8cfd9b0f8515 ("netfilter: nftables: generalize set expressions support")
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
>
> Reviewed-by: Pablo Neira Ayuso <pablo@netfilter.org>
>
> @Jakub: Would you please take this one into net-next? Thanks!

You marked as "Awaiting Upstream", I'll take care of it.

Thanks.

\
 
 \ /
  Last update: 2020-12-15 17:23    [W:0.207 / U:3.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site