flaw in "nf_tables: add reject module for NFPROTO_INET"

From: Kees Cook
Date: Wed Feb 12 2014 - 15:43:40 EST


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@xxxxxxxxxxxx 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/