Bug 153079

Summary: inappropriate strcpy in unix2dos on garbage pointer
Product: Red Hat Enterprise Linux 4 Reporter: Neil Horman <nhorman>
Component: unix2dosAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: dcb314, jsalz-redhat, krafthef, tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2005-566 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-05 14:43:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 156322    
Attachments:
Description Flags
patch to remove unneeded strcpy none

Description Neil Horman 2005-04-01 12:43:45 UTC
Description of problem:
in version 2.2 of unix to dos in the ConvertUnixToDosNewFile function there is a
call to strcpy on line 250 to an unset pointer on the stack.  Since the pointer
is unset this can lead to unpredictable results.  Additionally the strcpy is no
longer needed as the MakeTempFileFrom sets the pointer in question
appropriately.  I've attached a patch to correct this.

Version-Release number of selected component (if applicable):
2.2

How reproducible:
Unsure

Steps to Reproduce:
1.
2.
3.
  
Actual results:
Potential sigsegv, or data corruption

Expected results:
No sigsegv or data corruption

Additional info:
This problem was discovered in relation to IT69278, in which the reporter
discovered that by trying to convert a certain ELF file (I'm not sure why they
tried this) they received a sigsegv.

Comment 1 Neil Horman 2005-04-01 12:43:46 UTC
Created attachment 112580 [details]
patch to remove unneeded strcpy

Comment 2 Tim Waugh 2005-04-12 13:53:51 UTC
Thanks.  Fixed in CVS.

Comment 3 Tim Waugh 2005-04-12 13:55:17 UTC
*** Bug 140979 has been marked as a duplicate of this bug. ***

Comment 4 Tim Waugh 2005-04-12 13:56:09 UTC
*** Bug 145167 has been marked as a duplicate of this bug. ***

Comment 5 Sitsofe Wheeler 2005-04-12 17:45:08 UTC
I'm a little unhappy bug #145167 was forward duped but never mind (I guess RHEL
reports matter more). Anyway will the specfile be fixed up to generate a useful
debuginfo and will the warning patch also be applied?

Comment 11 Tim Waugh 2005-07-21 14:35:45 UTC
*** Bug 163828 has been marked as a duplicate of this bug. ***

Comment 12 Tim Waugh 2005-07-28 16:52:07 UTC
*** Bug 164543 has been marked as a duplicate of this bug. ***

Comment 13 Red Hat Bugzilla 2005-10-05 14:43:40 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-566.html