Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 153079 - inappropriate strcpy in unix2dos on garbage pointer
Summary: inappropriate strcpy in unix2dos on garbage pointer
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: unix2dos
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
: 140979 145167 164543 (view as bug list)
Depends On:
Blocks: 156322
TreeView+ depends on / blocked
 
Reported: 2005-04-01 12:43 UTC by Neil Horman
Modified: 2007-11-30 22:07 UTC (History)
4 users (show)

Fixed In Version: RHBA-2005-566
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-05 14:43:39 UTC


Attachments (Terms of Use)
patch to remove unneeded strcpy (deleted)
2005-04-01 12:43 UTC, Neil Horman
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:566 qe-ready SHIPPED_LIVE unix2dos bug fix update 2005-10-05 04:00:00 UTC

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



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