Serv-U HTTP Remote Buffer Overflow

November 18, 2009

Serv-U File Server is a multi-protocol file server allowing users to connect to the server by different means. HTTP and HTTPS are two protocols supported by Serv-U. A HTTP request consists of a Request-Line, header section and the message body, as shown in the following:

Request = Request-Line 	*(( general-header | request-header | entity-header) CRLF) 	CRLF 	[ message-body ]

A web server processes HTTP requests which may contain various methods, such as GET, POST, HEAD and so on as well as HTTP headers. One such HTTP header is the Cookie header. The following example highlights the use of a Cookie header within an HTTP request:

	GET / HTTP/1.1 	Host: dhcp61 	User-Agent: Serv-U 	Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 	Accept-Language: en-us,en;q=0.5 	Accept-Encoding: gzip,deflate 	Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 	Keep-Alive: 300 	Connection: keep-alive 	Cookie: SULang=en%2CUS; themename=xp

A stack-based buffer overflow vulnerability exists in the Ser-U Web Server. Specifically, the vulnerability is due to a boundary error while parsing the Session parameter of the "Cookie" header. According to the vulnerable code, the parameter of "cookie" header will be converted into Unicode string and copied into a fixed stack buffer, and the NULL (x00x00) will be considered as the end of the parameter. If the parameter of "Cookie" header is long enough, the stack buffer will be overwritten. A remote attacker can leverage this vulnerability to inject and execute malicious shell code.

To protect SonicWALL customers from being attacked by any attacks addressing this vulnerability, the SonicWALL UTM team has created and released the following IPS signatures at the same day as the advisory was released.

  • 4057 Rhino Serv-U Web Client HTTP Request Remote Buffer Overflow