Bug 480112 - mtools fails
Summary: mtools fails
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mtools
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Adam Tkac
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F11Alpha, F11AlphaBlocker
TreeView+ depends on / blocked
 
Reported: 2009-01-15 04:53 UTC by Bill Nottingham
Modified: 2014-03-17 03:17 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-01-21 18:44:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bill Nottingham 2009-01-15 04:53:59 UTC
Description of problem:

In file_name.c:

wchar_t *unix_name(doscp_t *dosCp, ...

        char *s, tname[9], text[4], ans[11];
...
        if (*text) {
                strcpy(ans, tname);
                strcat(ans, ".");
                strcat(ans, text);
        }

Oddly enough...

/usr/bin/mcopy -D o -D O -o - s:/ldlinux.sys
*** buffer overflow detected ***: /usr/bin/mcopy terminated
======= Backtrace: =========
/lib64/libc.so.6(__fortify_fail+0x37)[0x7ffff7b4d717]
/lib64/libc.so.6[0x7ffff7b4b5c0]
/lib64/libc.so.6[0x7ffff7b4a3ad]
/usr/bin/mcopy[0x40a33f]
/usr/bin/mcopy[0x41ce5b]
/usr/bin/mcopy[0x41570d]
/usr/bin/mcopy[0x41592e]
/usr/bin/mcopy[0x40e915]

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

mtools-4.0.0-2.fc11.x86_64

Comment 1 Jeremy Katz 2009-01-16 16:40:54 UTC
This stops people from using live images off of a USB stick, so sticking on the alpha blocker list.

Comment 2 Adam Tkac 2009-01-21 12:08:36 UTC
(In reply to comment #0)
> Description of problem:
> 
> In file_name.c:
> 
> wchar_t *unix_name(doscp_t *dosCp, ...
> 
>         char *s, tname[9], text[4], ans[11];
> ...
>         if (*text) {
>                 strcpy(ans, tname);
>                 strcat(ans, ".");
>                 strcat(ans, text);
>         }
> 
> Oddly enough...
> 

It is a bug but I'm not 100% sure that your crash is due this "off-by-two" error. Could you attach backtrace/core dump, please? Thanks

Comment 3 Bill Nottingham 2009-01-21 18:26:05 UTC
Don't have it at the moment. However, a s/11/13/ patch makes it not happen.

Comment 4 Adam Tkac 2009-01-21 18:44:55 UTC
fixed in mtools-4.0.0-3.fc11


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