mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: bert hubert <ahu@ds9a.nl>
To: "David S. Miller" <davem@redhat.com>,
	mdiehl@dominion.dyndns.org, linux-kernel@vger.kernel.org,
	kuznet@ms2.inr.ac.ru
Subject: Re: [documentation] Re: [LARTC] IPSEC FIRST LIGHT! (by non-kernel developer :-))
Date: Fri, 8 Nov 2002 13:25:23 +0100	[thread overview]
Message-ID: <20021108122523.GA21075@outpost.ds9a.nl> (raw)
In-Reply-To: <20021108112715.GA20226@outpost.ds9a.nl>

On Fri, Nov 08, 2002 at 12:27:15PM +0100, bert hubert wrote:
> On Fri, Nov 08, 2002 at 12:15:29PM +0100, bert hubert wrote:
> 
> > This code locks up solid on any ipsec TCP traffic outgoing with this
> > configuration:

Bug is here:

+/* Optimize later using cookies and generation ids. */
+
 static struct dst_entry *xfrm4_dst_check(struct dst_entry *dst, u32 cookie)
 {
-       dst_release(dst);
-       return NULL;
+       struct dst_entry *child = dst;
+
+       while (child) {
+               if (child->obsolete > 0 ||
+                   (child->xfrm && child->xfrm->km.state != XFRM_STATE_VALID)) {
+                       dst_release(dst);
+                       return NULL;
+               }
+       }
+
+       return dst;
 }


Kernel enters a very tight loop here, I'm amazed that magic sysrq still
works, how is that?

Anyhow, this function smells but I'm not sure how it should be fixed,
perhaps child=child->next?

Regards,

bert


> 
> Also with the following configuration:
> 
> add 10.0.0.216 10.0.0.12 ah 24500 -A hmac-md5 "1234567890123456";
> spdadd 10.0.0.216 10.0.0.11 any -P out ipsec
>             ah/transport//require;
> 
> -or-
> 
> add 10.0.0.216 10.0.0.12 esp 24501 -E 3des-cbc "123456789012123456789012";
> spdadd 10.0.0.216 10.0.0.11 any -P out ipsec
>             esp/transport//require;
>  
> 10.0.0.12 is a host which does not exist. 'telnet 10.0.0.12' locks up
> instantly. I'm unsure how to extract more data from my kernel.
> 
> Regards,
> 
> bert
> 
> -- 
> http://www.PowerDNS.com          Versatile DNS Software & Services
> http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO

-- 
http://www.PowerDNS.com          Versatile DNS Software & Services
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO

  reply	other threads:[~2002-11-08 12:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-07  4:20 Silly advise in bridge Configure help Randy.Dunlap
2002-11-07  9:15 ` David S. Miller
2002-11-07  9:18   ` bert hubert
2002-11-07  9:49     ` David S. Miller
2002-11-07 10:39       ` bert hubert
2002-11-07 10:41         ` bert hubert
2002-11-07 10:52         ` David S. Miller
2002-11-07 11:16           ` bert hubert
2002-11-07 13:02           ` IPSEC FIRST LIGHT! (by non-kernel developer :-)) bert hubert
2002-11-07 13:14             ` James Morris
2002-11-07 13:21             ` David S. Miller
2002-11-07 14:12               ` bert hubert
2002-11-07 15:18                 ` David S. Miller
2002-11-07 15:33                   ` bert hubert
2002-11-07 17:49                   ` kuznet
2002-11-07 18:41                     ` bert hubert
2002-11-07 19:05                       ` kuznet
2002-11-08  1:59             ` [LARTC] " Mike Diehl
2002-11-08  9:41               ` [documentation] " bert hubert
2002-11-08  9:52                 ` David S. Miller
2002-11-08 11:15                   ` bert hubert
2002-11-08 11:27                     ` bert hubert
2002-11-08 12:25                       ` bert hubert [this message]
2002-11-08 13:31                         ` kuznet
2002-11-08 13:44                           ` bert hubert

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=20021108122523.GA21075@outpost.ds9a.nl \
    --to=ahu@ds9a.nl \
    --cc=davem@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdiehl@dominion.dyndns.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

all inboxes | Powered by JetHome®