netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/ipv6: Skip policy check to improve compliance
@ 2019-03-08 19:01 Andrew Boyer
  2019-03-08 19:40 ` David Miller
  2019-03-10 18:47 ` David Miller
  0 siblings, 2 replies; 6+ messages in thread
From: Andrew Boyer @ 2019-03-08 19:01 UTC (permalink / raw)
  To: aboyer, netdev; +Cc: Farrell Woods

From: Farrell Woods <farrell_woods@dell.com>

The patch fixes an IPv6 conformance test failure (v6LC_1_2_03a in the
UNH INTACT suite) that occurs specifically when IPsec is in use.  The
test iterates through the set of unassigned protocol numbers (currently,
143 through 252) and inserts these into the next header field of a
Destination Options header.  The expected test result is that an
ICMPv6 Parameter Problem is sent back.  But if there's a policy in
place that requires an active SA between the Test Node and the
Device Under Test (and none exists), the inbound packet is quietly
dropped.

Signed-off-by: Farrell Woods <farrell_woods@dell.com>
---
 net/ipv6/ip6_input.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index c7ed2b6..26259b3 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -409,12 +409,10 @@ void ip6_protocol_deliver_rcu(struct net *net, struct sk_buff *skb, int nexthdr,
 		}
 	} else {
 		if (!raw) {
-			if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) {
-				__IP6_INC_STATS(net, idev,
-						IPSTATS_MIB_INUNKNOWNPROTOS);
-				icmpv6_send(skb, ICMPV6_PARAMPROB,
-					    ICMPV6_UNK_NEXTHDR, nhoff);
-			}
+			__IP6_INC_STATS(net, idev,
+					IPSTATS_MIB_INUNKNOWNPROTOS);
+			icmpv6_send(skb, ICMPV6_PARAMPROB,
+				    ICMPV6_UNK_NEXTHDR, nhoff);
 			kfree_skb(skb);
 		} else {
 			__IP6_INC_STATS(net, idev, IPSTATS_MIB_INDELIVERS);

-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] net/ipv6: Skip policy check to improve compliance
  2019-03-08 19:01 [PATCH] net/ipv6: Skip policy check to improve compliance Andrew Boyer
@ 2019-03-08 19:40 ` David Miller
  2019-03-10 18:47 ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2019-03-08 19:40 UTC (permalink / raw)
  To: andrew.boyer; +Cc: aboyer, netdev, Farrell.Woods


Why did you post this twice?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net/ipv6: Skip policy check to improve compliance
  2019-03-08 19:01 [PATCH] net/ipv6: Skip policy check to improve compliance Andrew Boyer
  2019-03-08 19:40 ` David Miller
@ 2019-03-10 18:47 ` David Miller
  2019-03-12  5:08   ` Herbert Xu
  1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2019-03-10 18:47 UTC (permalink / raw)
  To: andrew.boyer; +Cc: aboyer, netdev, Farrell.Woods, steffen.klassert, herbert

From: Andrew Boyer <andrew.boyer@dell.com>
Date: Fri,  8 Mar 2019 14:01:11 -0500

> From: Farrell Woods <farrell_woods@dell.com>
> 
> The patch fixes an IPv6 conformance test failure (v6LC_1_2_03a in the
> UNH INTACT suite) that occurs specifically when IPsec is in use.  The
> test iterates through the set of unassigned protocol numbers (currently,
> 143 through 252) and inserts these into the next header field of a
> Destination Options header.  The expected test result is that an
> ICMPv6 Parameter Problem is sent back.  But if there's a policy in
> place that requires an active SA between the Test Node and the
> Device Under Test (and none exists), the inbound packet is quietly
> dropped.
> 
> Signed-off-by: Farrell Woods <farrell_woods@dell.com>

First of all, please CC: the IPSEC maintainers on all IPSEC changes.

Second of all, is the conformance test setting up these IPSEC rules?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net/ipv6: Skip policy check to improve compliance
  2019-03-10 18:47 ` David Miller
@ 2019-03-12  5:08   ` Herbert Xu
  2019-03-27 14:11     ` Boyer, Andrew
  0 siblings, 1 reply; 6+ messages in thread
From: Herbert Xu @ 2019-03-12  5:08 UTC (permalink / raw)
  To: David Miller
  Cc: andrew.boyer, aboyer, netdev, Farrell.Woods, steffen.klassert

On Sun, Mar 10, 2019 at 11:47:47AM -0700, David Miller wrote:
> From: Andrew Boyer <andrew.boyer@dell.com>
> Date: Fri,  8 Mar 2019 14:01:11 -0500
> 
> > From: Farrell Woods <farrell_woods@dell.com>
> > 
> > The patch fixes an IPv6 conformance test failure (v6LC_1_2_03a in the
> > UNH INTACT suite) that occurs specifically when IPsec is in use.  The
> > test iterates through the set of unassigned protocol numbers (currently,
> > 143 through 252) and inserts these into the next header field of a
> > Destination Options header.  The expected test result is that an
> > ICMPv6 Parameter Problem is sent back.  But if there's a policy in
> > place that requires an active SA between the Test Node and the
> > Device Under Test (and none exists), the inbound packet is quietly
> > dropped.
> > 
> > Signed-off-by: Farrell Woods <farrell_woods@dell.com>
> 
> First of all, please CC: the IPSEC maintainers on all IPSEC changes.
> 
> Second of all, is the conformance test setting up these IPSEC rules?

On the face of it I don't see why we shouldn't be dropping the
packets when there is a relevant IPsec policy in place as to do
otherwise makes us vulnerable to DoS attacks.

Please provide a rationale why such packets should *not* be dropped
based on a relevant RFC document.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net/ipv6: Skip policy check to improve compliance
  2019-03-12  5:08   ` Herbert Xu
@ 2019-03-27 14:11     ` Boyer, Andrew
  0 siblings, 0 replies; 6+ messages in thread
From: Boyer, Andrew @ 2019-03-27 14:11 UTC (permalink / raw)
  To: Herbert Xu, David Miller; +Cc: aboyer, netdev, Woods, Farrell, steffen.klassert

On 3/12/19, 1:09 AM, "Herbert Xu" <herbert@gondor.apana.org.au> wrote:    
    On Sun, Mar 10, 2019 at 11:47:47AM -0700, David Miller wrote:
    > From: Andrew Boyer <andrew.boyer@dell.com>
    > Date: Fri,  8 Mar 2019 14:01:11 -0500
    > 
    > > From: Farrell Woods <farrell_woods@dell.com>
    > > 
    > > The patch fixes an IPv6 conformance test failure (v6LC_1_2_03a in the
    > > UNH INTACT suite) that occurs specifically when IPsec is in use.  The
    > > test iterates through the set of unassigned protocol numbers (currently,
    > > 143 through 252) and inserts these into the next header field of a
    > > Destination Options header.  The expected test result is that an
    > > ICMPv6 Parameter Problem is sent back.  But if there's a policy in
    > > place that requires an active SA between the Test Node and the
    > > Device Under Test (and none exists), the inbound packet is quietly
    > > dropped.
    > > 
    > > Signed-off-by: Farrell Woods <farrell_woods@dell.com>
    > 
    > First of all, please CC: the IPSEC maintainers on all IPSEC changes.
    > 
    > Second of all, is the conformance test setting up these IPSEC rules?
    
    On the face of it I don't see why we shouldn't be dropping the
    packets when there is a relevant IPsec policy in place as to do
    otherwise makes us vulnerable to DoS attacks.
    
    Please provide a rationale why such packets should *not* be dropped
    based on a relevant RFC document.
    
    Thanks,

Hello Herbert,
Our product was configured with IPSEC security policies before sending it through the UNH suite. Farrell listed the test that failed in the commit message.

I have no more info to share, since he is no longer available and I was just helping with the formatting, If you are not interested in taking this change, it's fine with us. You can just drop the patch.

Thank you,
Andrew



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] net/ipv6: Skip policy check to improve compliance
@ 2019-03-08 16:36 Andrew Boyer
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Boyer @ 2019-03-08 16:36 UTC (permalink / raw)
  To: netdev; +Cc: Farrell Woods

From: Farrell Woods <farrell_woods@dell.com>

The patch fixes an IPv6 conformance test failure (v6LC_1_2_03a in the
UNH INTACT suite) that occurs specifically when IPsec is in use.  The
test iterates through the set of unassigned protocol numbers (currently,
143 through 252) and inserts these into the next header field of a
Destination Options header.  The expected test result is that an
ICMPv6 Parameter Problem is sent back.  But if there's a policy in
place that requires an active SA between the Test Node and the
Device Under Test (and none exists), the inbound packet is quietly
dropped.

Signed-off-by: Farrell Woods <farrell_woods@dell.com>
---
 net/ipv6/ip6_input.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index c7ed2b6..26259b3 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -409,12 +409,10 @@ void ip6_protocol_deliver_rcu(struct net *net, struct sk_buff *skb, int nexthdr,
 		}
 	} else {
 		if (!raw) {
-			if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) {
-				__IP6_INC_STATS(net, idev,
-						IPSTATS_MIB_INUNKNOWNPROTOS);
-				icmpv6_send(skb, ICMPV6_PARAMPROB,
-					    ICMPV6_UNK_NEXTHDR, nhoff);
-			}
+			__IP6_INC_STATS(net, idev,
+					IPSTATS_MIB_INUNKNOWNPROTOS);
+			icmpv6_send(skb, ICMPV6_PARAMPROB,
+				    ICMPV6_UNK_NEXTHDR, nhoff);
 			kfree_skb(skb);
 		} else {
 			__IP6_INC_STATS(net, idev, IPSTATS_MIB_INDELIVERS);

-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-03-27 14:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-08 19:01 [PATCH] net/ipv6: Skip policy check to improve compliance Andrew Boyer
2019-03-08 19:40 ` David Miller
2019-03-10 18:47 ` David Miller
2019-03-12  5:08   ` Herbert Xu
2019-03-27 14:11     ` Boyer, Andrew
  -- strict thread matches above, loose matches on Subject: below --
2019-03-08 16:36 Andrew Boyer

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).