CVE-2005-0852
Windows XP SP1 local DoS via empty datagram on raw IP over IP socket using Python 2.3
- CVSS 2.1
- CWE-20: Improper Input Validation
- Resource Management
- Local
Microsoft Windows XP SP1 allows local users to cause a denial of service (system crash) via an empty datagram to a raw IP over IP socket (IP protocol 4), as originally demonstrated using code in Python 2.3.
- CVSS base score
- 2.1
- Published
- 2005-05-02
- OWASP
- A05 Security Misconfiguration
- Orthogonal defect classification
- Function
- Code defect classification
- Incorrect Functionality
- Category
- Resource Management
- Subcategory
- Resource Exhaustion
- Accessibility scope
- Local
- Impact
- Denial of Service (DoS)
- Affected component
- Python 2.3
- Fixed by upgrading
- Yes
Solution
Update Windows XP SP1 to the latest service pack or consider upgrading to a newer operating system.
Vulnerable code sample
import socket
def send_empty_datagram(ip_address, port):
# Create a raw socket
sock = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
sock.bind((ip_address, port))
# Send an empty datagram
sock.sendto(b'', (ip_address, port))
# Example usage
send_empty_datagram('127.0.0.1', 0)Patched code sample
import socket
def safe_send_empty_datagram(ip_address, port):
# Create a raw socket
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
sock.bind((ip_address, port))
# Set the socket options to prevent sending empty datagrams
sock.setsockopt(socket.IPPROTO_IP, socket.IP_HDRINCL, 1)
# Instead of sending an empty datagram, we can send a valid payload
payload = b'Valid data'
sock.sendto(payload, (ip_address, port))
except Exception as e:
print(f"An error occurred: {e}")
finally:
sock.close()
# Example usage
safe_send_empty_datagram('127.0.0.1', 0)Cite this entry
@misc{vaitp:cve20050852,
title = {{Windows XP SP1 local DoS via empty datagram on raw IP over IP socket using Python 2.3}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2005},
note = {VAITP Python Vulnerability Dataset, entry CVE-2005-0852},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2005-0852/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
