BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000612 [BusyBox] Security crash always 12-23-05 06:35 01-10-06 19:24
Reporter alita View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version 1.01
Summary 0000612: Buffer Overflow in the httpd
Description I found a buffer overflow in the httpd. In the function encodeString() it allocates only len*5+1 bytes, but to store entities over 99 it needs len*6+1 bytes. So if you try to encode a multiple KB long string with many characters over 99, it ends up with a segfault. This is maybe a security risk.

In the function decodeString() you can jump over the terminating zero byte, if you place the '%' character at the right (wrong) place, and access the memory after it.

For example if you run the following command, it will output your first environment variable:
httpd -d "%20%8"; echo

This function is used in the handleIncoming(), too. This is maybe a security risk, so it sould better be fixed soon. I have write a patch that correct it and attach it to this bug report.

Sorry, for my bad english. I hope you can understand it.
Additional Information
Attached Files  httpd_bufferoverflow.patch [^] (1,155 bytes) 12-23-05 06:35
 httpd_bufferoverflow2.patch [^] (1,197 bytes) 12-23-05 06:47

- Relationships

- Notes
(0000807)
alita
12-23-05 06:50

Better use the second patch...
 
(0000815)
vodz
12-26-05 09:28

Thanks. Its old and not my problem. See fresh changes: 12978 SVN revision.
 
(0000918)
landley
01-10-06 19:24

vodz got it.
 

- Issue History
Date Modified Username Field Change
12-23-05 06:35 alita New Issue
12-23-05 06:35 alita Status new => assigned
12-23-05 06:35 alita Assigned To  => BusyBox
12-23-05 06:35 alita File Added: httpd_bufferoverflow.patch
12-23-05 06:46 alita Issue Monitored: alita
12-23-05 06:47 alita File Added: httpd_bufferoverflow2.patch
12-23-05 06:50 alita Note Added: 0000807
12-26-05 09:28 vodz Note Added: 0000815
01-10-06 19:24 landley Status assigned => closed
01-10-06 19:24 landley Note Added: 0000918
01-10-06 19:24 landley Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker