All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch nf] netfilter: nft_osf: NFTA_OSF_DREG must not be null
@ 2020-01-18 19:40 Cong Wang
  2020-01-18 20:19 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Cong Wang @ 2020-01-18 19:40 UTC (permalink / raw)
  To: netdev
  Cc: netfilter-devel, Cong Wang, syzbot+cf23983d697c26c34f60,
	Florian Westphal, Pablo Neira Ayuso, Fernando Fernandez Mancera

Fixes: b96af92d6eaf ("netfilter: nf_tables: implement Passive OS fingerprint module in nft_osf")
Reported-by: syzbot+cf23983d697c26c34f60@syzkaller.appspotmail.com
Cc: Florian Westphal <fw@strlen.de>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Fernando Fernandez Mancera <ffmancera@riseup.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
 net/netfilter/nft_osf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/netfilter/nft_osf.c b/net/netfilter/nft_osf.c
index f54d6ae15bb1..b42247aa48a9 100644
--- a/net/netfilter/nft_osf.c
+++ b/net/netfilter/nft_osf.c
@@ -61,6 +61,9 @@ static int nft_osf_init(const struct nft_ctx *ctx,
 	int err;
 	u8 ttl;
 
+	if (!tb[NFTA_OSF_DREG])
+		return -EINVAL;
+
 	if (tb[NFTA_OSF_TTL]) {
 		ttl = nla_get_u8(tb[NFTA_OSF_TTL]);
 		if (ttl > 2)
-- 
2.21.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Patch nf] netfilter: nft_osf: NFTA_OSF_DREG must not be null
  2020-01-18 19:40 [Patch nf] netfilter: nft_osf: NFTA_OSF_DREG must not be null Cong Wang
@ 2020-01-18 20:19 ` Pablo Neira Ayuso
  2020-01-18 20:37   ` Cong Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2020-01-18 20:19 UTC (permalink / raw)
  To: Cong Wang
  Cc: netdev, netfilter-devel, syzbot+cf23983d697c26c34f60,
	Florian Westphal, Fernando Fernandez Mancera

Thanks. This is a dup though:

https://patchwork.ozlabs.org/patch/1225125/

Thanks in any case.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch nf] netfilter: nft_osf: NFTA_OSF_DREG must not be null
  2020-01-18 20:19 ` Pablo Neira Ayuso
@ 2020-01-18 20:37   ` Cong Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Cong Wang @ 2020-01-18 20:37 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: Linux Kernel Network Developers, NetFilter,
	syzbot+cf23983d697c26c34f60, Florian Westphal,
	Fernando Fernandez Mancera

On Sat, Jan 18, 2020 at 12:19 PM Pablo Neira Ayuso <pablo@netfilter.org> wrote:
>
> Thanks. This is a dup though:
>
> https://patchwork.ozlabs.org/patch/1225125/
>
> Thanks in any case.

I didn't see it on netdev. But glad to see there is already a fix.

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-18 20:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-18 19:40 [Patch nf] netfilter: nft_osf: NFTA_OSF_DREG must not be null Cong Wang
2020-01-18 20:19 ` Pablo Neira Ayuso
2020-01-18 20:37   ` Cong Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.