libytnef buffer overflow

2013.04.11
Credit: Igor Vlasenko
Risk: High
Local: Yes
Remote: No
CWE: CWE-119


CVSS Base Score: 4.3/10
Impact Subscore: 2.9/10
Exploitability Subscore: 8.6/10
Exploit range: Remote
Attack complexity: Medium
Authentication: No required
Confidentiality impact: None
Integrity impact: None
Availability impact: Partial

Description of problem: compiler warning: call ... will always overflow destination buffer. indeed, there is a trivial bug in the code, no space is reserved for trailing \0. patch to fix: --- libytnef-1.5/ytnef.c 2004-08-26 17:09:05.000000000 +0000 +++ libytnef-1.5/ytnef.c 2012-06-08 19:34:07.826123387 +0000 @@ -1327,7 +1327,7 @@ ULONG compressedSize, uncompressedSize, magic, crc32; comp_Prebuf.size = strlen(RTF_PREBUF); - comp_Prebuf.data = calloc(comp_Prebuf.size, 1); + comp_Prebuf.data = calloc(comp_Prebuf.size+1, 1); strcpy(comp_Prebuf.data, RTF_PREBUF); src = p->data; Version-Release number of selected component (if applicable): libytnef-1.5-7.fc17

References:

https://bugzilla.redhat.com/show_bug.cgi?id=831322
http://lists.fedoraproject.org/pipermail/package-announce/2012-July/083853.html
http://lists.fedoraproject.org/pipermail/package-announce/2012-July/083804.html
https://bugzilla.redhat.com/show_bug.cgi?id=831322
http://sourceforge.net/p/ytnef/bugs/13/


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top