From: Cong Wang <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Cc: netfilter-devel@vger.kernel.org,
Cong Wang <xiyou.wangcong@gmail.com>,
syzbot+cf23983d697c26c34f60@syzkaller.appspotmail.com,
Florian Westphal <fw@strlen.de>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Fernando Fernandez Mancera <ffmancera@riseup.net>
Subject: [Patch nf] netfilter: nft_osf: NFTA_OSF_DREG must not be null
Date: Sat, 18 Jan 2020 11:40:15 -0800 [thread overview]
Message-ID: <20200118194015.14988-1-xiyou.wangcong@gmail.com> (raw)
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
next reply other threads:[~2020-01-18 19:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-18 19:40 Cong Wang [this message]
2020-01-18 20:19 ` [Patch nf] netfilter: nft_osf: NFTA_OSF_DREG must not be null Pablo Neira Ayuso
2020-01-18 20:37 ` Cong Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200118194015.14988-1-xiyou.wangcong@gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=ffmancera@riseup.net \
--cc=fw@strlen.de \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=syzbot+cf23983d697c26c34f60@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).