netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <paul.moore@hp.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: netdev@vger.kernel.org, latten@us.ibm.com
Subject: Re: IPsec replay sequence number overflow behavior? (RFC4303 section 3.3.3)
Date: Sun, 9 Dec 2007 09:37:56 -0500	[thread overview]
Message-ID: <200712090937.56599.paul.moore@hp.com> (raw)
In-Reply-To: <E1J1Bfw-0006Kw-00@gondolin.me.apana.org.au>

On Saturday 08 December 2007 9:13:48 pm Herbert Xu wrote:
> Paul Moore <paul.moore@hp.com> wrote:
> > If it is a bug, I think the basic fix should be pretty simple, changing
> > the above xfrm_output() code to the following:
> >
> >   if (x->type->flags & XFRM_TYPE_REPLAY_PROT) {
> >           XFRM_SKB_CB(skb)->seq = ++x->replay.oseq;
> > +          if (x->replay.oseq == 0)
> > +                  goto error;
>
> Yes we need this check.
>
> However please add an unlikely around it since it's a 1-in-4
> billion event :)

 :)

Thanks for clearing that up, I'll send a patch this week; complete with an 
unlikely (similar to the RFC quality IPsec audit patch I sent on Friday) and 
a decrement to the sequence counter in case of rollover.

-- 
paul moore
linux security @ hp

  reply	other threads:[~2007-12-09 14:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-07 16:04 IPsec replay sequence number overflow behavior? (RFC4303 section 3.3.3) Paul Moore
2007-12-09  2:13 ` Herbert Xu
2007-12-09 14:37   ` Paul Moore [this message]
2007-12-10  3:06     ` Herbert Xu
2007-12-10  3:16       ` Patrick McHardy
2007-12-10  3:43         ` Herbert Xu
2007-12-18 16:14           ` Paul Moore
  -- strict thread matches above, loose matches on Subject: below --
2007-12-19  6:36 Joy Latten

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=200712090937.56599.paul.moore@hp.com \
    --to=paul.moore@hp.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=latten@us.ibm.com \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).