support.mikro.strouter help over vpn
since 2014 Contact us now

Router vulnerability note - MikroTik

MikroTik BGP: one malformed NLRI, and the routing process goes away

What happened

An MP_REACH_NLRI update carrying a VPNv4 or VPNv6 prefix with a length below the minimum for a labelled VPN NLRI passed the iterator's checks while describing a route with a negative-length address portion. The result is a crash of the routing service and a dropped BGP session, and because a single crafted UPDATE held the plane down, a persistent one. There is no NOTIFICATION to explain it, which is the part that makes operators suspicious.

The awkward detail for anyone running RouterOS as a route reflector or a VPN provider edge: the fix ships only in 7.25beta4, a development build. So the choice is between the stable branch with a known crash and a beta with the fix, and that is not a choice we can make for you — it depends whether the peer in question is your upstream or a customer's firewall.

Who is affected

RouterOS before 7.25beta4, for devices that accept BGP UPDATEs with labelled-VPN NLRI from peers they do not fully control.

Check it yourself

Are you a VPN route reflector, and who peers with you?

[admin@router] > /routing bgp instance print
 0 name: default as: 65001 router-id: 10.0.0.1
[admin@router] > /routing bgp peer print status
 0  address: 10.0.0.9  afi: vpnv4  established: yes
[admin@router] > /log print where topics~"bgp"
 (sessions dropping without a NOTIFICATION are the tell)

Do this

  • If you do not run VPNv4/VPNv6, this is not your emergency; note it and move on.
  • Restrict BGP peers by address, and do not accept updates from an unfiltered eBGP peer on a small branch.
  • Consider TCP MD5 (or AES where available) on sessions that cross the internet.
  • If you must have the fix, evaluate 7.25beta4 in a window rather than pushing it to every site on a Friday.

How we handle it

BGP conversations are the ones where we like to be on the phone. If your MikroTik peers with an upstream over the public internet, we would rather plan the upgrade with you than discover it during an alert.

Sources

Not your thing? We can run these checks for you over an OpenVPN tunnel: €45 fix visit, or just mail us.