public inbox for linux-sctp@vger.kernel.org
 help / color / mirror / Atom feed
From: Vlad Yasevich <vyasevich@gmail.com>
To: linux-sctp@vger.kernel.org
Subject: Re: HB.Max.Burst
Date: Fri, 21 Mar 2014 13:52:59 +0000	[thread overview]
Message-ID: <532C443B.3040809@gmail.com> (raw)
In-Reply-To: <CAGugRbWm5=S_6Sf2YQ1=0=AYx40yBTt8+cYcL_3UcDpd8O1rNg@mail.gmail.com>

On 03/21/2014 08:11 AM, Karl Heiss wrote:
> On Thu, Mar 20, 2014 at 3:55 PM, Vlad Yasevich <vyasevich@gmail.com> wrote:
>> On 03/20/2014 09:31 AM, Karl Heiss wrote:
>>> I have a question about the HB.Max.Burst parameter for the LKSCTP
>>> stack.  I notice that there is no explicit parameter for this value
>>> and the alternative from RFC 5062 (only one HB per RTT) does not
>>> appear to be implemented either (see excerpt below).  The only
>>> limiting factor appears to be max.burst.  Am I missing something
>>> obvious or should there be some other form of limiting heartbeats to
>>> mitigate some of the issues outlined in RFC 5062?
>>
>> Not sure what you mean by "there is no explicit parameter".
>>
>> There is a system tunable /proc/sys/net/sctp/max_burst that can be
>> changed.
>>
>> The value may also be controlled by application through the
>> SCTP_MAX_BURST socket option.
>>
>> Additionally, lksctp will only send one HB per RTT.
>>
> 
> I did not realize that it would only send one HB per RTT.  I do see
> now that max_burst does indeed apply to control chunks, as I was
> originally under the wrong impression that it only applied to data
> chunks.

Ooops.  My mistake here, and you are correct.  max_burst applies only
to data chunks and I wasn't careful enough to not that you are talking
about Heartbeats.

It does appear that we do not have a limiter for heartbeats.  So,
if the association is started with 10 unconfirmed addresses, there
will be 10 HBs sent.  The only slight mitigation factor we have is
that they will be jittered at +/-50% of rto.

> 
> However, from what I can see in the source, it appears that
> sctp_sf_sendbeat_8_3 is only limited by asoc->max_retrans and
> SPP_HB_ENABLE.  Thus I would think that every time the heartbeat timer
> expires, we would queue up a heartbeat, assuming that are have not hit
> max_burst and other constraints.  Is it limited somewhere later in the
> stack or am I just being obtuse?

No, it's not limited by anything else.  The nice thing is that each
transport has it's own HB timer separate from RTO and it is jittered
even for UNCONFIRMED addresses.  So, HB will not show up as bursting,
but it appears that we still need a limit for # of outstanding HB to
UNCONFIRMED addresses.

Let me see if I can work something up.

Thanks
-vlad
> 
> Karl
> 
>> What do you thinks is missing?
>>
>> Thanks
>> -vlad
>>
>>>
>>> 6.3.  Mitigation Option
>>>
>>>    To limit the effectiveness of this attack, the new parameter
>>>    HB.Max.Burst was introduced in [RFC4960] and an endpoint should:
>>>
>>>    1) not allow very large cookie lifetimes, even if they are requested.
>>>
>>>    2) not use larger HB.Max.Burst parameter values than recommended.
>>>       Note that an endpoint may decide to send only one Heartbeat per
>>>       RTT instead of the maximum (i.e., HB.Max.Burst).  An endpoint that
>>>       chooses this approach will however slow down detection of
>>>       endpoints camping on valid addresses.
>>>
>>>    3) not use large HEARTBEATs for path confirmation.
>>>
>>>
>>> Karl
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>


      parent reply	other threads:[~2014-03-21 13:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-20 13:31 HB.Max.Burst Karl Heiss
2014-03-20 14:54 ` HB.Max.Burst Karl Heiss
2014-03-20 19:55 ` HB.Max.Burst Vlad Yasevich
2014-03-21 12:11 ` HB.Max.Burst Karl Heiss
2014-03-21 13:52 ` Vlad Yasevich [this message]

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=532C443B.3040809@gmail.com \
    --to=vyasevich@gmail.com \
    --cc=linux-sctp@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