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

Router vulnerability note - MikroTik

MikroTik libumsg: one bad message, one restarted router

What happened

RouterOS processes most of its own internals through libumsg, the message library that carries requests between processes. unflatten() turns a received message back into a structure, and a malformed one took the process with it. The finder published a short write-up on integer handling in the library, which is a good hint at how these bugs usually look: not dramatic, just a length that was trusted.

The reason to care is that libumsg sits under the things you reach remotely — the API, Winbox and the web interface all speak to the routing and firewall processes through it. A crash there on a small board is a reboot from the customer's point of view, and reboots on a router with PPPoE and a CAPsMAN controller are not free.

Who is affected

RouterOS 7.21.x before 7.21.4 and 7.22.x before 7.22.2.

Check it yourself

Version and the message traffic

[admin@router] > /system package print where name=system
 0  system   7.21.2   stable
[admin@router] > /system resource print
             uptime: 21d:04:11:02
[admin@router] > /log print where message~"unflatten" or message~"restart"
 (look for reboots you did not schedule)

Do this

  • Move to 7.21.4 or 7.22.2 or newer.
  • If you automate through the API or REST, remember the collector is a remote trigger too.
  • Keep a scheduled export on the box so a crash is an inconvenience rather than a rebuild.
  • Watch the uptime counter after the patch; a router that stops rebooting is the evidence you wanted.

How we handle it

We patch libraries like this during a scheduled window rather than at 04:12, and we test that the tunnel comes back. Monitored sites get the note in the monthly PDF; everyone else gets it in the report.

Sources

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