MS office fails on wine due to fortify

Bug #665270 reported by Jaime Sánchez
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Wine
Invalid
Medium
wine1.2 (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Undecided
Unassigned
Maverick
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: wine1.2

Hi,

Is being told on wine bug http://bugs.winehq.org/show_bug.cgi?id=24606 that compilation flag D_FORTIFY_SOURCE is breaking wine somehow. Alexandre Julliard suggested that this flag is not a good idea on wine compilation.

MS office is not working on wine 1.3.4 and 1.3.5 due to the use of this compilation flag.

Regards
Jaime

Revision history for this message
In , Arethusa26 (arethusa26) wrote :

The severity isn't critical; see http://bugs.winehq.org/page.cgi?id=fields.html#importance for correct usage. I don't see any evidence that the problem is related to ole32, so I'm changing the component field to unknown. Please perform a regression test:

http://wiki.winehq.org/RegressionTesting

Revision history for this message
In , Marcus Eby (marcuseby) wrote :

I updated via Ubuntu USA Servers 3 days ago, and no new wine, I updated today and new wine version.

1.3.4

Whatever version was released to Ubuntu's update servers in the past 3 days, would be the version.

I'm not doing regression testing, sorry, not setup for it.

Marcus

Revision history for this message
In , Jeffz (jeffz) wrote :

(In reply to comment #2)
> I'm not doing regression testing, sorry, not setup for it.

If the instructions aren't clear, please visit http://forum.winehq.org to ask for help with the regression test.

Revision history for this message
In , Vesnikos+wine (vesnikos+wine) wrote :

Also affect me, same backtrace as OP.

ubuntu 10.10 wine ver 1.3.4

Revision history for this message
In , Vesnikos+wine (vesnikos+wine) wrote :

Created an attachment (id=31212)
backtrace-ves

backtraace for comparison

Revision history for this message
In , mr.larch (bunglehead) wrote :

Install wine debug symbols (or build it yourself) and attach a +tid,+shell log.

Revision history for this message
In , Vesnikos+wine (vesnikos+wine) wrote :

Created an attachment (id=31213)
+tid,+shell log (compressed an otherwise too big log)

+tid,+shell log

Revision history for this message
In , mr.larch (bunglehead) wrote :

(In reply to comment #7)
> Created an attachment (id=31213) [details]
> +tid,+shell log (compressed an otherwise too big log)
>
> +tid,+shell log

There's no crashes in this log.

Revision history for this message
In , Dimesio (dimesio) wrote :

I can't reproduce this, but I'm on openSUSE.

Revision history for this message
In , mr.larch (bunglehead) wrote :

(In reply to comment #9)
> I can't reproduce this, but I'm on openSUSE.

Yes, looks like it's about ubuntu libc build:

---
/lib32/libc.so.6(__fortify_fail+0x50)[0xf7544a90]
/lib32/libc.so.6(+0xe39ca)[0xf75439ca]
/lib32/libc.so.6(__strcpy_chk+0x44)[0xf7542d44]
/usr/bin/../lib32/wine/shell32.dll.so(_ILCreateEntireNetwork+0x5c)[0x7e1e19ac]
/usr/bin/../lib32/wine/shell32.dll.so(+0x683c5)[0x7e20b3c5]
/usr/bin/../lib32/wine/shell32.dll.so(SHELL32_ParseNextElement+0x99)[0x7e21dcd9]
/usr/bin/../lib32/wine/shell32.dll.so(+0x60521)[0x7e203521]
---

Revision history for this message
In , Dmitry-codeweavers (dmitry-codeweavers) wrote :
Revision history for this message
In , Vesnikos+wine (vesnikos+wine) wrote :

(In reply to comment #11)
> There was a patch for this kind of the crash:
> http://www.winehq.org/pipermail/wine-patches/2010-September/093377.html

(In reply to comment #7)
> Created an attachment (id=31213) [details]
> +tid,+shell log (compressed an otherwise too big log)
>
> +tid,+shell log

It's a 'soft crash, meaning word catches the the exception, gives you the option to report about the crash and exits with the option in next run to recover the document (which works A-ok)

Revision history for this message
In , Marcus Eby (marcuseby) wrote :

>
> It's a 'soft crash, meaning word catches the the exception, gives you the
> option to report about the crash and exits with the option in next run to
> recover the document (which works A-ok)

So thats great that its a soft crash, its still a crash to me, and I can't save any documents.

So since it happened after the upgrade and was fine before the upgrade, please tell me how I can fix it.

Thanks

Marcus

Revision history for this message
In , Vesnikos+wine (vesnikos+wine) wrote :

(In reply to comment #13)
> >
> > It's a 'soft crash, meaning word catches the the exception, gives you the
> > option to report about the crash and exits with the option in next run to
> > recover the document (which works A-ok)
>
> So thats great that its a soft crash, its still a crash to me, and I can't save
> any documents.
>
> So since it happened after the upgrade and was fine before the upgrade, please
> tell me how I can fix it.
>
> Thanks
>
> Marcus

If you're on ubuntu you can find the previous packages here :

10.10 (maveric)
https://launchpad.net/~ubuntu-wine/+archive/ppa/+packages?field.name_filter=&field.status_filter=superseded&field.series_filter=maverick

10.04 (lucid)
https://launchpad.net/~ubuntu-wine/+archive/ppa/+packages?field.name_filter=&field.status_filter=superseded&field.series_filter=lucid

previous version is 1.3.3 if I not mistaken

Revision history for this message
In , Kyle Milz (kmilz) wrote :

I can confirm this bug and that in fact the patch supplied by Mike Frysinger noted in comment 12 works perfectly.

x86_64 gentoo w/ wine 1.3.4.

Revision history for this message
In , Marcus Eby (marcuseby) wrote :

(In reply to comment #15)
> I can confirm this bug and that in fact the patch supplied by Mike Frysinger
> noted in comment 12 works perfectly.
>
> x86_64 gentoo w/ wine 1.3.4.

Thanks Kyle.
How do I apply the patch?
Sorry to sound ignorant, but I'm still learning Ubuntu/Linux.

Marcus

Revision history for this message
In , Kyle Milz (kmilz) wrote :

Created an attachment (id=31235)
patch to fix the problem

This is just mikes patch with some white space fixups that don't come through on the email message in the link on comment 12.

Revision history for this message
In , Kyle Milz (kmilz) wrote :

(In reply to comment #17)
> Created an attachment (id=31235) [details]
> patch to fix the problem
>
> This is just mikes patch with some white space fixups that don't come through
> on the email message in the link on comment 12.

On Ubuntu this is going to be tricky, and almost impossible as there is no easy way to install your own custom version of wine (well there is, read up on it if you are interested). The best thing to do would be find out who packages wine for Ubuntu and point them to this bug, and specifically the patch here.

They will know what to do, and will rebuild the wine package and push it out through the normal channels (hopefully).

If you're feeling adventurous, download wine from git, and the patch above. Put the patch in the root of the wine/ git checkout and do a

patch -p1 < fix-msoffice.patch

when you are in the root directory of the wine/ git checkout at a terminal.

Best of luck (also, don't feel bad if you can't do this ... this is outside the scope of regular operating system users and should be taken care of by developers)

Revision history for this message
In , Vesnikos+wine (vesnikos+wine) wrote :

Why szName is defined with length of 1 if it gives an exception in certain situations in the first place?

Revision history for this message
In , Alexandre Julliard (julliard) wrote :

(In reply to comment #19)
> Why szName is defined with length of 1 if it gives an exception in certain
> situations in the first place?

The code is perfectly correct, and doesn't give any exceptions unless it's built with broken crap like Fortify.

Revision history for this message
In , Kyle Milz (kmilz) wrote :

Yep, as Alexandre stated this bug disappears when -D_FORTIFY_SOURCE=0 is passed in CFLAGS. So yeah sorry for the noise and this bogus patch that fixes a non-existent problem.

On a side note, what the hell are distributions doing compiling wine with fortify source on? I'm on Gentoo right now and I trust their package maintainers more than other distributions and this is just worrisome.

Alexandre, would you say it is never a good idea to use -D_FORTIFY_SOURCE when compiling wine?

Revision history for this message
In , Alexandre Julliard (julliard) wrote :

(In reply to comment #21)
> Alexandre, would you say it is never a good idea to use -D_FORTIFY_SOURCE when
> compiling wine?

It's definitely not a good idea. We already had to disable the broken longjmp checks that were causing crashes, and also to turn off some warnings because Fortify causes spurious ones. Now it looks like we need to disable the strcpy checks too. And with all the trouble it gave us, I have never seen it catch any real problem. I'm seriously considering turning it off globally in configure.

Revision history for this message
In , Vesnikos+wine (vesnikos+wine) wrote :

(In reply to comment #21)
> Yep, as Alexandre stated this bug disappears when -D_FORTIFY_SOURCE=0 is passed
> in CFLAGS. So yeah sorry for the noise and this bogus patch that fixes a
> non-existent problem.
>
> On a side note, what the hell are distributions doing compiling wine with
> fortify source on? I'm on Gentoo right now and I trust their package
> maintainers more than other distributions and this is just worrisome.
>

The dev packages that one of my computers use are maintained ( and compiled )by Scott Richie

Revision history for this message
In , Markmoor (markmoor) wrote :

It seems the problem has been acknowledged, the issue identified, and a reasonable, certain, and straightforward correction suggested. Why is this still marked Unconfirmed?

Revision history for this message
In , Juan-lang (juan-lang) wrote :

It's actually invalid, see the summary, and especially comment 20. I'm guessing we're holding it open to prevent a flood of duplicates.

Revision history for this message
In , Jaime Sánchez (jskartman) wrote :

I am hitting this bug on ubuntu maverick, the patch worked fine, but I am guessing that a lot of plp (without wine compile - patching knowledge) would be affected seriously by this bug.

Revision history for this message
In , Marcus Eby (marcuseby) wrote :

As Jaime stated those (without wine compile - patching knowledge) would be seriously affected includes me.

I waited for the latest update to wine via the ubuntu channels, but nothing was fixed.

If someone could spell out the patch for the masses like me, who don't know how to patch, would be outstanding.

Thanks

Revision history for this message
In , Dmitry-codeweavers (dmitry-codeweavers) wrote :

(In reply to comment #27)
> If someone could spell out the patch for the masses like me, who don't know how
> to patch, would be outstanding.

It's not about patching Wine, it's about using certain compiler defines
which break the Wine binary. The Comment 21 contains the details. Just
file a bug with Ubuntu and ask them to compile Wine without Fortify.

Revision history for this message
In , Jaime Sánchez (jskartman) wrote :
Revision history for this message
In , Austin English (austinenglish) wrote :
Revision history for this message
Jaime Sánchez (jskartman) wrote : MS office fails on wine 1.3.5 due to fortify

Binary package hint: wine1.2

Hi,

Is being told on wine bug http://bugs.winehq.org/show_bug.cgi?id=24606 that compilation flag D_FORTIFY_SOURCE is breaking wine somehow. Alexandre Julliard suggested that this flag is not a good idea on wine compilation.

MS office is not working on wine 1.3.4 and 1.3.5 due to the use of this compilation flag.

Regards
Jaime

Revision history for this message
Jaime Rave (jaimerave) wrote :
Revision history for this message
Jaime Sánchez (jskartman) wrote :

ok, nice!, i report and 18 minutes later there is a fix! :)

Revision history for this message
In , Dmitry-codeweavers (dmitry-codeweavers) wrote :

Time to resolve this bug then.

Revision history for this message
In , Dmitry-codeweavers (dmitry-codeweavers) wrote :

Closing invalid.

Revision history for this message
Kees Cook (kees) wrote : Re: MS office fails on wine 1.3.5 due to fortify

Thanks for the report. Wine 1.3.x is not in the Ubuntu archive (only version 1.2 and lower are), so this bug does not seem to apply. Can you verify that this is a problem with the Wine shipped with Ubuntu?

Regardless, it's too bad that upstream has disabled FORTIFY as the "solution", as it has quite a bit of value. Resizing statically declared strings seems pretty wrong.

Changed in wine1.2 (Ubuntu):
status: New → Invalid
status: Invalid → Incomplete
Changed in wine:
importance: Unknown → Medium
status: Unknown → Invalid
Revision history for this message
In , Marcus Eby (marcuseby) wrote :

Fixed in the last ubuntu release, Oct, 30th, 2010

Revision history for this message
In , Arethusa26 (arethusa26) wrote :

*** Bug 25055 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Arethusa26 (arethusa26) wrote :

*** Bug 25073 has been marked as a duplicate of this bug. ***

Revision history for this message
In , mr.larch (bunglehead) wrote :

*** Bug 25076 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Scott Ritchie (scottritchie) wrote :

Nominating the configure change for 1.2.2

Revision history for this message
In , Austin English (austinenglish) wrote :

(In reply to comment #37)
> Nominating the configure change for 1.2.2

This bug was closed invalid, I'm not sure if it will be picked up for 1.2.2...

Revision history for this message
In , Alexandre Julliard (julliard) wrote :

Removing 1.2.x milestone from bugs included in 1.2.2.

Revision history for this message
Scott Ritchie (scottritchie) wrote : Re: MS office fails on wine 1.3.5 due to fortify

Will be fixed in 1.2.2

Changed in wine1.2 (Ubuntu):
status: Incomplete → In Progress
summary: - MS office fails on wine 1.3.5 due to fortify
+ MS office fails on wine due to fortify
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wine1.2 - 1.2.2-0ubuntu1

---------------
wine1.2 (1.2.2-0ubuntu1) natty; urgency=low

  * New upstream release (LP: #685474)
    - Support for animated cursors.
    - Translation updates.
    - Various bug fixes. (LP: #665270)
  * Add Japanese font aliases to workaround lack of fontconfig substitution
  * Recommend requisite umefont as a default (same as Crossover)
  * Conflict with "wine" << 1.2.1 to prevent upgrade failures from very old
    ppa packages.
 -- Scott Ritchie <email address hidden> Mon, 06 Dec 2010 00:21:37 -0800

Changed in wine1.2 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted wine1.2 into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in wine1.2 (Ubuntu Maverick):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted wine1.2 into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in wine1.2 (Ubuntu Lucid):
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted wine1.2 into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wine1.2 - 1.2.2-0ubuntu2~lucid1

---------------
wine1.2 (1.2.2-0ubuntu2~lucid1) lucid-proposed; urgency=low

  * New upstream release (LP: #685474)
    - Support for animated cursors.
    - Translation updates.
    - Various bug fixes. (LP: #665270)
  * Add Japanese Korean font aliases to workaround lack of fontconfig substitution
    - Recommend requisite umefont as a default (same as Crossover)
  * Add Korean font aliases to workaround lack of fontconfig substitution
    - Recommend requisite ttf-unfonts-core (already included in ubuntu-desktop)
  * Use Droid Sans Fallback font for Arial Unicode MS
    - Recommend ttf-droid
  * Conflict with "wine" << 1.2.1 to prevent upgrade failures from very old
    ppa packages. (LP: #634949)
  * Adjust conflicts to also apply to wine-dev
 -- Scott Ritchie <email address hidden> Tue, 04 Jan 2011 14:21:36 -0800

Changed in wine1.2 (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wine1.2 - 1.2.2-0ubuntu2~maverick2

---------------
wine1.2 (1.2.2-0ubuntu2~maverick2) maverick-proposed; urgency=low

  * New upstream release (LP: #685474)
    - Support for animated cursors.
    - Translation updates.
    - Various bug fixes. (LP: #665270)
  * Add Japanese Korean font aliases to workaround lack of fontconfig substitution
    - Recommend requisite umefont as a default (same as Crossover)
  * Add Korean font aliases to workaround lack of fontconfig substitution
    - Recommend requisite ttf-unfonts-core (already included in ubuntu-desktop)
  * Use Droid Sans Fallback font for Arial Unicode MS
    - Recommend ttf-droid
  * Conflict with "wine" << 1.2.1 to prevent upgrade failures from very old
    ppa packages. (LP: #634949)
  * Adjust conflicts to also apply to wine-dev
 -- Scott Ritchie <email address hidden> Thu, 06 Jan 2011 13:07:13 -0800

Changed in wine1.2 (Ubuntu Maverick):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.