Bug 153079 - inappropriate strcpy in unix2dos on garbage pointer
inappropriate strcpy in unix2dos on garbage pointer
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: unix2dos (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
:
: 140979 145167 163828 164543 (view as bug list)
Depends On:
Blocks: 156322
  Show dependency treegraph
 
Reported: 2005-04-01 07:43 EST by Neil Horman
Modified: 2007-11-30 17:07 EST (History)
4 users (show)

See Also:
Fixed In Version: RHBA-2005-566
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-05 10:43:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to remove unneeded strcpy (425 bytes, patch)
2005-04-01 07:43 EST, Neil Horman
no flags Details | Diff

  None (edit)
Description Neil Horman 2005-04-01 07:43:45 EST
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 07:43:46 EST
Created attachment 112580 [details]
patch to remove unneeded strcpy
Comment 2 Tim Waugh 2005-04-12 09:53:51 EDT
Thanks.  Fixed in CVS.
Comment 3 Tim Waugh 2005-04-12 09:55:17 EDT
*** Bug 140979 has been marked as a duplicate of this bug. ***
Comment 4 Tim Waugh 2005-04-12 09:56:09 EDT
*** Bug 145167 has been marked as a duplicate of this bug. ***
Comment 5 Sitsofe Wheeler 2005-04-12 13:45:08 EDT
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 10:35:45 EDT
*** Bug 163828 has been marked as a duplicate of this bug. ***
Comment 12 Tim Waugh 2005-07-28 12:52:07 EDT
*** Bug 164543 has been marked as a duplicate of this bug. ***
Comment 13 Red Hat Bugzilla 2005-10-05 10:43:40 EDT
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

Note You need to log in before you can comment on or make changes to this bug.