public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <kees@outflux.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>,
	Patrick McHardy <kaber@trash.net>
Cc: linux-kernel@vger.kernel.org, davej@redhat.com
Subject: flaw in "nf_tables: add reject module for NFPROTO_INET"
Date: Wed, 12 Feb 2014 12:43:08 -0800	[thread overview]
Message-ID: <20140212204307.GK23300@outflux.net> (raw)
In-Reply-To: <52fb24097b42_6b5073486c727c3@209.249.196.67.mail>

Hi,

This seems like a legit problem detected by Coverity. Looks like a break is
missing?

-Kees

On Tue, Feb 11, 2014 at 11:34:33PM -0800, scan-admin@coverity.com wrote:
> 
> Hi,
> 
> 
> Please find the latest report on new defect(s) introduced to Linux found with Coverity Scan.
> 
> Defect(s) Reported-by: Coverity Scan
> Showing 1 of 1 defect(s)
> 
> 
> ** CID 1171942:  Missing break in switch  (MISSING_BREAK)
> /net/netfilter/nft_reject_inet.c: 25 in nft_reject_inet_eval()
> 
> 
> ________________________________________________________________________________________________________
> *** CID 1171942:  Missing break in switch  (MISSING_BREAK)
> /net/netfilter/nft_reject_inet.c: 25 in nft_reject_inet_eval()
> 19     				 struct nft_data data[NFT_REG_MAX + 1],
> 20     				 const struct nft_pktinfo *pkt)
> 21     {
> 22     	switch (pkt->ops->pf) {
> 23     	case NFPROTO_IPV4:
> 24     		nft_reject_ipv4_eval(expr, data, pkt);
> >>>     CID 1171942:  Missing break in switch  (MISSING_BREAK)
> >>>     The above case falls through to this one.
> 25     	case NFPROTO_IPV6:
> 26     		nft_reject_ipv6_eval(expr, data, pkt);
> 27     	}
> 28     }
> 29     
> 30     static struct nft_expr_type nft_reject_inet_type;

-- 
Kees Cook                                            @outflux.net

       reply	other threads:[~2014-02-12 20:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <52fb24097b42_6b5073486c727c3@209.249.196.67.mail>
2014-02-12 20:43 ` Kees Cook [this message]
2014-02-12 20:50   ` flaw in "nf_tables: add reject module for NFPROTO_INET" Dave Jones
2014-02-12 20:54     ` Kees Cook
2014-02-12 21:03       ` Dave Jones
2014-02-12 21:05         ` Kees Cook
2014-02-12 21:31           ` tytso
2014-02-12 21:41             ` Kees Cook
2014-02-12 22:40               ` Theodore Ts'o
2014-02-12 22:48                 ` David Miller

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=20140212204307.GK23300@outflux.net \
    --to=kees@outflux.net \
    --cc=davej@redhat.com \
    --cc=kaber@trash.net \
    --cc=linux-kernel@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