From: coverity-bot <keescook@chromium.org>
To: Florian Westphal <fw@strlen.de>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
linux-next@vger.kernel.org
Subject: Coverity: nfnl_hook_dump_start(): Memory - corruptions
Date: Tue, 8 Jun 2021 10:47:11 -0700 [thread overview]
Message-ID: <202106081047.6B49EA0EC@keescook> (raw)
Hello!
This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20210608 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan
You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:
Mon Jun 7 12:41:10 2021 +0200
e2cf17d3774c ("netfilter: add new hook nfnl subsystem")
Coverity reported the following:
*** CID 1505167: Memory - corruptions (OVERRUN)
/net/netfilter/nfnetlink_hook.c: 294 in nfnl_hook_dump_start()
288
289 nla_strscpy(name, nla[NFNLA_HOOK_DEV], sizeof(name));
290 }
291
292 rcu_read_lock();
293 /* Not dereferenced; for consistency check only */
vvv CID 1505167: Memory - corruptions (OVERRUN)
vvv Overrunning callee's array of size 5 by passing argument "hooknum" (which evaluates to 255) in call to "nfnl_hook_entries_head".
294 head = nfnl_hook_entries_head(family, hooknum, net, name);
295 rcu_read_unlock();
296
297 if (head && IS_ERR(head))
298 return PTR_ERR(head);
299
If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):
Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1505167 ("Memory - corruptions")
Fixes: e2cf17d3774c ("netfilter: add new hook nfnl subsystem")
Thanks for your attention!
--
Coverity-bot
reply other threads:[~2021-06-08 17:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202106081047.6B49EA0EC@keescook \
--to=keescook@chromium.org \
--cc=fw@strlen.de \
--cc=gustavo@embeddedor.com \
--cc=linux-next@vger.kernel.org \
--cc=pablo@netfilter.org \
/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).