Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1226009

Re: [PATCH v4] add stealth mode

From Eric Dumazet <eric.dumazet@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4] add stealth mode
Date 2015-09-16 13:20 +0200
Message-ID <q9iUO-2PF-29@gated-at.bofh.it> (permalink)
References <q93M6-5yj-19@gated-at.bofh.it> <q9hFo-Ro-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 2015-09-16 at 11:54 +0200, Matteo Croce wrote:
> diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
> index 93898e0..fe62ae0 100644
> --- a/net/ipv4/tcp_ipv4.c
> +++ b/net/ipv4/tcp_ipv4.c
> @@ -77,6 +77,7 @@
>  #include <net/busy_poll.h>
>  
>  #include <linux/inet.h>
> +#include <linux/inetdevice.h>
>  #include <linux/ipv6.h>
>  #include <linux/stddef.h>
>  #include <linux/proc_fs.h>
> @@ -1652,7 +1653,7 @@ csum_error:
>  		TCP_INC_STATS_BH(net, TCP_MIB_CSUMERRORS);
>  bad_packet:
>  		TCP_INC_STATS_BH(net, TCP_MIB_INERRS);
> -	} else {
> +	} else if (!IN_DEV_STEALTH(skb->dev->ip_ptr)) {
>  		tcp_v4_send_reset(NULL, skb);
>  	}


It is illegal to deref skb->dev->ip_ptr without proper accessor /
annotations.

Check 

struct in_device *in_dev = __in_dev_get_rcu(skb->dev); 

(Same remarks in other places of your patch)



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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH] [PATCH v3] add stealth mode David Miller <davem@davemloft.net> - 2015-09-15 21:10 +0200
  [PATCH v4] add stealth mode Matteo Croce <matteo@openwrt.org> - 2015-09-16 12:00 +0200
    Re: [PATCH v4] add stealth mode Daniel Borkmann <daniel@iogearbox.net> - 2015-09-16 12:30 +0200
      Re: [PATCH v4] add stealth mode Matteo Croce <matteo@openwrt.org> - 2015-09-16 12:50 +0200
        Re: [PATCH v4] add stealth mode Daniel Borkmann <daniel@iogearbox.net> - 2015-09-16 13:20 +0200
    Re: [PATCH v4] add stealth mode Florian Westphal <fw@strlen.de> - 2015-09-16 13:10 +0200
    Re: [PATCH v4] add stealth mode Eric Dumazet <eric.dumazet@gmail.com> - 2015-09-16 13:20 +0200

csiph-web