lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 10 Jan 2022 20:25:40 +0100
From:   Pablo Neira Ayuso <pablo@...filter.org>
To:     Julian Wiedmann <jwiedmann.dev@...il.com>
Cc:     netfilter-devel@...r.kernel.org, davem@...emloft.net,
        netdev@...r.kernel.org, kuba@...nel.org
Subject: Re: [PATCH net-next 19/32] netfilter: nft_connlimit: move stateful
 fields out of expression data

Hi,

On Mon, Jan 10, 2022 at 08:20:47PM +0200, Julian Wiedmann wrote:
> On 10.01.22 01:16, Pablo Neira Ayuso wrote:
> > In preparation for the rule blob representation.
> > 
> > Signed-off-by: Pablo Neira Ayuso <pablo@...filter.org>
> > ---
> >  net/netfilter/nft_connlimit.c | 26 ++++++++++++++++++--------
> >  1 file changed, 18 insertions(+), 8 deletions(-)
> > 
> > diff --git a/net/netfilter/nft_connlimit.c b/net/netfilter/nft_connlimit.c
> > index 7d0761fad37e..58dcafe8bf79 100644
> > --- a/net/netfilter/nft_connlimit.c
> > +++ b/net/netfilter/nft_connlimit.c
> 
> [...]
> 
> >  
> >  static int nft_connlimit_do_dump(struct sk_buff *skb,
> > @@ -200,7 +205,11 @@ static int nft_connlimit_clone(struct nft_expr *dst, const struct nft_expr *src)
> >  	struct nft_connlimit *priv_dst = nft_expr_priv(dst);
> >  	struct nft_connlimit *priv_src = nft_expr_priv(src);
> >  
> > -	nf_conncount_list_init(&priv_dst->list);
> > +	priv_dst->list = kmalloc(sizeof(*priv_dst->list), GFP_ATOMIC);
> > +	if (priv_dst->list)
> > +		return -ENOMEM;
> > +
> > +	nf_conncount_list_init(priv_dst->list);
> >  	priv_dst->limit	 = priv_src->limit;
> >  	priv_dst->invert = priv_src->invert;
> >  
> 
> Hi Pablo,
> 
> Coverity (CID 1510697) spotted a typo in this NULL check, it should be
> 
> 	if (!priv_dst->list)
> 		return -ENOMEM;
> 
> 
> Looks like the following patches also have this bug.

Thanks, I'll post a patchset to fix this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ