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
| ||
|
Message-ID: <077d6843-bf14-f528-d9cd-9c5245687be5@gmail.com> Date: Mon, 10 Jan 2022 20:20:47 +0200 From: Julian Wiedmann <jwiedmann.dev@...il.com> To: Pablo Neira Ayuso <pablo@...filter.org>, netfilter-devel@...r.kernel.org Cc: 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 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.
Powered by blists - more mailing lists