-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Vulnerability Report for Feng
Application
- Name: Feng
- Versions: 2.1.0_rc1
- Platforms: Linux
- Exploitation: Remote
- Date: October 22, 2024
- Author: Yuhan Wu, Haiyang Wei
- Email: [email protected]
1) Introduction
Feng is an open-source RTSP/RTP streaming server developed by the Politecnico di Torino for the LScube project. It is intended for use in streaming multimedia content and has been identified to contain several security vulnerabilities. This report covers two recent crashes, which indicate segmentation faults leading to potential service disruption.
2) Bugs Identified
A] Segmentation Fault in check_forbidden_path
- Issue: A NULL pointer dereference occurs during URI validation. If the
URIstructure passed to the function isNULL, the server crashes when attempting to access the path usingstrstr(). - Impact: An attacker can send a specially crafted request with a missing or malformed URL to cause a denial of service (DoS) by triggering a segmentation fault.
- Code Location:From
src/network/rtsp_utils.c:static gboolean check_forbidden_path(URI *uri) { if ( strstr(uri->path, "../") || strstr(uri->path, "./") ) return false; return true; }
- Root Cause:
The functioncheck_forbidden_path()does not validate if theURIpointer or thepathfield isNULLbefore callingstrstr(). This results in a segmentation fault if aNULLURI is passed to the function.
B] Segmentation Fault in RTSP_handle_headers
- Issue: A NULL pointer dereference occurs during RTSP header handling. If the
pending_requeststructure’sheadersfield isNULL, the function causes a segmentation fault by trying to access theheaderswithout validation. - Impact: An attacker could send a specially crafted RTSP request with missing headers to cause a denial of service (DoS) by triggering a segmentation fault.
- Code Location:From
src/network/rtsp_state_machine.c:static gboolean RTSP_handle_headers(RTSP_Client *rtsp) { ... if ( rtsp->pending_request->headers == NULL ) ... }
- Root Cause:
The functionRTSP_handle_headers()fails to validate ifrtsp->pending_requestor itsheadersfield isNULLbefore accessing them. This results in a segmentation fault if a malformed or incomplete RTSP request is processed.
3) The Code (Proof of Concept)
To reproduce the issues, malicious users can send crafted RTSP requests to trigger the crashes:
Metadata
Metadata
Assignees
Labels
No labels