CVE-2016-1245
Critical · 9.8CVSS
9.8
EPSS
3.7%
Published
Feb 22, 2017
CISA due date
—
Cloudanix analysis
A flaw in network routing software could let attackers remotely take over or shut down systems that handle certain network messages.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Network Service
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Stack-based buffer overflow in the zebra daemon when handling IPv6 Neighbor Discovery messages caused by assuming BUFSIZ matches message size, enabling memory corruption.
Why it matters to the business
Attackers could crash routing services or execute code to disrupt network operations, with urgency for any unpatched Quagga deployments given the flaw's age and remote reach.
How an attack unfolds
An unauthenticated remote attacker sends a crafted IPv6 Neighbor Discovery message exceeding expected size; the daemon copies data into a fixed stack buffer sized by BUFSIZ, corrupting memory and allowing control-flow hijacking or denial of service.
How to fix it
Upgrade Quagga to version containing commit cfb1fae25f8c092e0d17073eaf7bd428ce1cd546 or later release 1.0.20161017; apply equivalent fixed packages for any dependent products such as kubernetes-dashboard-metrics-scraper-fips at 1.0.9-r2.
How to confirm the fix worked
Verify installed Quagga version against fixed commit or release; perform packet fuzzing with oversized IPv6 ND messages in a lab environment to confirm absence of overflow.
Typical attack path
- Locate exposed Quagga zebra daemon accepting IPv6 traffic
- Craft oversized IPv6 Neighbor Discovery message
- Send packet to trigger stack overflow
- Achieve code execution or service crash
How to detect it
Review zebra daemon logs and system crash dumps for buffer overflow indicators; inspect network captures for unusually large or malformed IPv6 Neighbor Discovery packets targeting routing ports.
What your security team should do
- Apply the listed fixed versions immediately on all affected systems
- Restrict IPv6 access to zebra daemon to trusted sources only
- Monitor network traffic for anomalous IPv6 Neighbor Discovery patterns
The record
It was discovered that the zebra daemon in Quagga before 1.0.20161017 suffered from a stack-based buffer overflow when processing IPv6 Neighbor Discovery messages. The root cause was relying on BUFSIZ to be compatible with a message size; however, BUFSIZ is system-dependent.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:7 | quagga | 0 | 0.99.22.4-1+wheezy3+deb7u1 |
| Debian:8 | quagga | 0 | 0.99.23.1-1+deb8u3 |
| Mageia:5 | quagga | 0 | 0.99.22.4-4.3.mga5 |
| Red Hat:enterprise_linux:6::server | quagga | 0 | 0:0.99.15-14.el6 |
| Red Hat:enterprise_linux:6::server | quagga-contrib | 0 | 0:0.99.15-14.el6 |
| Red Hat:enterprise_linux:6::server | quagga-debuginfo | 0 | 0:0.99.15-14.el6 |
| Red Hat:enterprise_linux:6::server | quagga-devel | 0 | 0:0.99.15-14.el6 |
| Red Hat:enterprise_linux:6::workstation | quagga | 0 | 0:0.99.15-14.el6 |
| Red Hat:enterprise_linux:6::workstation | quagga-contrib | 0 | 0:0.99.15-14.el6 |
| Red Hat:enterprise_linux:6::workstation | quagga-debuginfo | 0 | 0:0.99.15-14.el6 |
| Red Hat:enterprise_linux:6::workstation | quagga-devel | 0 | 0:0.99.15-14.el6 |
| SUSE:Linux Enterprise Server 11 SP4 | quagga | 0 | 0.99.15-0.29.1 |
| SUSE:Linux Enterprise Server 12 SP1 | quagga | 0 | 0.99.22.1-15.1 |
| SUSE:Linux Enterprise Server 12 SP2 | quagga | 0 | 1.1.1-17.3.3 |
| SUSE:Linux Enterprise Server 12 SP3 | quagga | 0 | 1.1.1-17.3.3 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | quagga | 0 | 1.1.1-17.3.3 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | quagga | 0 | 0.99.15-0.29.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | quagga | 0 | 0.99.22.1-15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | quagga | 0 | 1.1.1-17.3.3 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | quagga | 0 | 1.1.1-17.3.3 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | quagga | 0 | 0.99.15-0.29.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP1 | quagga | 0 | 0.99.22.1-15.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | quagga | 0 | 1.1.1-17.3.3 |
| SUSE:Linux Enterprise Software Development Kit 12 SP3 | quagga | 0 | 1.1.1-17.3.3 |
| Ubuntu:14.04:LTS | quagga | 0 | 0.99.22.4-3ubuntu1.3 |
| Ubuntu:16.04:LTS | quagga | 0 | 0.99.24.1-2ubuntu1.2 |
| openSUSE:Tumbleweed | quagga | 0 | 1.0.20160315-5.1 |
Related vulnerabilities
- CVE-2018-5380 The Quagga BGP daemon (bgpd) prior to version 1.2.3 can overrun internal BGP… Also affects quagga
- CVE-2018-5379 The Quagga BGP daemon (bgpd) prior to version 1.2.3 can double-free memory when… Also affects quagga
- CVE-2018-5381 The Quagga BGP daemon (bgpd) prior to version 1.2.3 has a bug in its parsing of… Also affects quagga
- CVE-2017-16227 The aspath_put function in bgpd/bgp_aspath.c in Quagga before 1.2.2 allows remote… Also affects quagga
- CVE-2016-4036 The quagga package before 0.99.23-2.6.1 in openSUSE and SUSE Linux Enterprise Server 11… Also affects quagga
- CVE-2016-2342 The bgp_nlri_parse_vpnv4 function in bgp_mplsvpn.c in the VPNv4 NLRI parser in bgpd in… Also affects quagga
- CVE-2013-2236 Stack-based buffer overflow in the new_msg_lsa_change_notify function in the OSPFD API… Also affects quagga
- CVE-2017-5495 All versions of Quagga, 0.93 through 1.1.0, are vulnerable to an unbounded memory… Also affects quagga