Subject: [secdir] secdir review of draft-ietf-karp-bfd-analysis-06

From: Samuel Weiler <[email-masked]>
Date: Mon, 18 Aug 2014 16:38:48 -0400 (EDT)

(Doc scheduled for telechat this week.)

I have reviewed this document as part of the security directorate's 
ongoing effort to review all IETF documents being processed by the 
IESG.  These comments were written primarily for the benefit of the 
security area directors.  Document editors and WG chairs should treat 
these comments just like any other last call comments.

Summary: I'm not seeing anything that's grossly incorrect, but I 
wonder if this doc is taking the right approach.

The security consideration section acknowledges that increasing the 
length of the sequence number or connecting the sequence numbers to 
clock time could reduce the risk of replay attacks as, presumably, 
could moving to the "meticulous" approaches that require an increasing 
sequence number (and recomputation) at every packet, at the possible 
cost of needing special hardware or having to increase the time 
between BFD packets.  These seem like simpler fixes that adding a new 
hash algorithm, which is what the doc ultimately suggests, and I 
wonder if adding GMAC is really needed.

One thing that's not explicitly discussed, and which I would like to 
see, is a general analysis of algorithm agility - how hard is it to 
add a new algorithm?  The doc says that BFD has no key rollover 
mechanism - I suspect that adding that and algorithm agility are more 
important, in the long run, than just adding a stronger hash 
algorithm.  (Which isn't to say that we even need to improve those, 
just that they may be more important.)

I'm also somewhat skeptical of the premise that BFD needs to use 
algorithms that match the routing algorithm strength:

    Moving the routing protocols to a stronger algorithm while using
    weaker algorithm for BFD would allow the attacker to bring down BFD
    in order to bring down the routing protocol.  BFD therefore needs
    to match the routing protocols in its strength of algorithm.

Are the attack models of the two really aligned?  Do the keying models 
for both suggest that one or the other could cope with weaker 
algorithms?  Can one be more easily rekeyed, thus making it easier to 
cope with weaker algorithms?

Lastly, RFC5880 (the BFD spec) says:
    An attacker who is in complete control of the link between the
    systems can easily drop all BFD packets but forward everything else
    (causing the link to be falsely declared down), or forward only the
    BFD packets but nothing else (causing the link to be falsely
    declared up).  This attack cannot be prevented by BFD.

Given that, does it make sense to go to this pain to replace MD5 and 
SHA1?

-- Sam

---

From: manav bhatia <[email-masked]>
Date: Tue, 19 Aug 2014 10:46:22 +0530

Hi Samuel,

Thanks for the review.

Please look at my comments inline.

> The security consideration section acknowledges that increasing the length
> of the sequence number or connecting the sequence numbers to clock time
> could reduce the risk of replay attacks as, presumably, could moving to the
> "meticulous" approaches that require an increasing sequence number (and
> recomputation) at every packet, at the possible cost of needing special
> hardware or having to increase the time between BFD packets.  These seem
> like simpler fixes that adding a new hash algorithm, which is what the doc
> ultimately suggests, and I wonder if adding GMAC is really needed.
>

We need to remove all references that suggest tying the sequence number to
the clock. I had removed that in the -05 version and i forgot to remove a
remnant from the Security Considerations section. Will remove this in -07

BFD is a unique control protocol that sends packets every few milli seconds
and is hence almost always implemented in the hardware. It is virtually
impossible for HW to authenticate each packet that comes at this rate
especially when you have scaled up your sessions. Enforcing "meticulous"
mode is only going to make matters worse. In fact, we've often discussed
about deprecating the "meticulous" mode since that doesnt make any sense in
the context of BFD.

> One thing that's not explicitly discussed, and which I would like to see,
> is a general analysis of algorithm agility - how hard is it to add a new
> algorithm?  The doc says that BFD has no key rollover mechanism - I suspect
> that adding that and algorithm agility are more important, in the long run,
> than just adding a stronger hash algorithm.  (Which isn't to say that we
> even need to improve those, just that they may be more important.)
>

I agree. This should be mentioned.

> Are the attack models of the two really aligned?  Do the keying models for
> both suggest that one or the other could cope with weaker algorithms?  Can
> one be more easily rekeyed, thus making it easier to cope with weaker
> algorithms?
>

Theoretically the two should use algorithms of similar strength. In fact
one could argue that BFD needs stronger algorithm since an attack on BFD
can bring down all your control protocols.

> Given that, does it make sense to go to this pain to replace MD5 and SHA1?
>

Sure, but such attacks are outside the scope of routing protocol security.

Cheers, Manav