This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 473862 - Windows application won't run due to several text relocation warnings
Windows application won't run due to several text relocation warnings
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
10
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-01 00:22 EST by Andre Robatino
Modified: 2008-12-01 14:48 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-01 14:32:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
unhandled page fault from attempting to run rad-mc.exe using wine on x86_64 (3.30 KB, text/plain)
2008-12-01 00:22 EST, Andre Robatino
no flags Details
sealert from attempting to run rad-mc.exe (this happens on both 32- and 64-bit) (3.05 KB, text/plain)
2008-12-01 00:24 EST, Andre Robatino
no flags Details
sealert from running the rad-mc.exe installer after changing its file context (3.38 KB, text/plain)
2008-12-01 13:47 EST, Andre Robatino
no flags Details

  None (edit)
Description Andre Robatino 2008-12-01 00:22:32 EST
Created attachment 325172 [details]
unhandled page fault from attempting to run rad-mc.exe using wine on x86_64

Description of problem:
The Windows application MyCash (see http://www.radsoftware.org/html/mycash.html) used to run adequately under F9 using wine.  Suddenly, in F10, there are text relocation warnings regarding several files, including the installer file rad-mc.exe.  Originally I assumed this was just Fedora progressively tightening up its security and uncovering an existing problem with the program.  However, after seeing several bugs filed against Fedora components regarding the same type of warning, I'm not sure anymore.  I tried updating to selinux-policy-3.5.13-26.fc10.noarch and selinux-policy-targeted-3.5.13-26.fc10.noarch but the problem seems to persist.

In addition, on my x86_64 F10 box, I can't even run rad-mc.exe - it crashes with an unhandled page fault.  I've attached this below along with the associated sealert.  In x86 F10, I just get the sealert, which can be bypassed by changing the file context, but when attempting to run it there are similar warnings for several installed files.

Version-Release number of selected component (if applicable):
selinux-policy-3.5.13-18.fc10.noarch

How reproducible:
always

Steps to Reproduce:
1.  Try to install/run MyCash from the above page.
  
Actual results:
Lots of text relocation warnings, along with an unhandled page fault in x86_64.

Expected results:
Not sure - don't know how much is the fault of the program vs. selinux-policy.

Additional info:
This program is not malware - it's been around for years.  It won't try to reformat your hard drive, so it should be safe to attempt installing/using.  Of course, unless these warnings start showing up in Windows, the author is unlikely to fix them.
Comment 1 Andre Robatino 2008-12-01 00:24:16 EST
Created attachment 325173 [details]
sealert from attempting to run rad-mc.exe (this happens on both 32- and 64-bit)
Comment 2 Daniel Walsh 2008-12-01 13:17:49 EST
I have no idea why this would have worked on F9? unless you had the allow_execmod boolean turned on.

setsebool -P allow_execmod=1

I think if you use wine to execute this application it will get the priv to use execmod, but I did not know you could start an EXE directly.

If you 

chcon -t textrel_shlib_t '/home/andre/rad-mc.exe'

Does the application work?
Comment 3 Andre Robatino 2008-12-01 13:45:51 EST
I'm trying this now using x86_64 F10.  If I run

chcon -t textrel_shlib_t '/home/andre/rad-mc.exe'

then running "./rad-mc.exe" in my home directory works - the installer runs.  Below are messages from the terminal - this sort of minor crud is normal (meaning I saw it in F9 when the application worked).

[andre@localhost ~]$ ./rad-mc.exe 
fixme:advpack:set_ldids Need to support changing paths - default will be used
err:setupapi:SetupDefaultQueueCallbackW copy error 3 L"C:\\windows\\temp\\$INFTool.Tmp\\MyCash.exe" -> L"\\MyCash.exe"
err:setupapi:SetupDefaultQueueCallbackW copy error 3 L"C:\\windows\\temp\\$INFTool.Tmp\\ReadMe.Txt" -> L"\\ReadMe.Txt"
err:setupapi:SetupDefaultQueueCallbackW copy error 3 L"C:\\windows\\temp\\$INFTool.Tmp\\Catalog.exe" -> L"\\Catalog.exe"
err:setupapi:SetupDefaultQueueCallbackW copy error 3 L"C:\\windows\\temp\\$INFTool.Tmp\\001.cl" -> L"\\001.cl"
err:setupapi:SetupDefaultQueueCallbackW copy error 3 L"C:\\windows\\temp\\$INFTool.Tmp\\001.lpt" -> L"\\001.lpt"
err:setupapi:SetupDefaultQueueCallbackW copy error 3 L"C:\\windows\\temp\\$INFTool.Tmp\\001.mc" -> L"\\001.mc"
err:setupapi:SetupDefaultQueueCallbackW copy error 3 L"C:\\windows\\temp\\$INFTool.Tmp\\001.pl" -> L"\\001.pl"
err:setupapi:SetupDefaultQueueCallbackW copy error 3 L"C:\\windows\\temp\\$INFTool.Tmp\\MyCash.Dex" -> L"\\MyCash.Dex"
err:setupapi:SetupDefaultQueueCallbackW copy error 3 L"C:\\windows\\temp\\$INFTool.Tmp\\RADSite.url" -> L"\\RADSite.url"
err:setupapi:SetupDefaultQueueCallbackW copy error 3 L"C:\\windows\\temp\\$INFTool.Tmp\\EULA.txt" -> L"\\EULA.txt"
[andre@localhost ~]$

I also get another sealert, which I've attached.  If I attempt to run the installed application, there will be several more sealerts associated with several more files.  Like I said, either selinux-policy suddenly improved its security substantially with F10, or it's an selinux bug, since these text relocation errors never appeared in F9, on two different 32-bit machines (I just bought the 64-bit box).
Comment 4 Andre Robatino 2008-12-01 13:47:00 EST
Created attachment 325281 [details]
sealert from running the rad-mc.exe installer after changing its file context
Comment 5 Andre Robatino 2008-12-01 13:50:02 EST
Also should have mentioned that to get Windows executables to run this way using Wine, all I have to do is to give them execute permission.  I haven't changed any other settings from the defaults.  It should work out of the box on any Fedora install after installing wine.
Comment 6 Andre Robatino 2008-12-01 14:11:32 EST
After running the installer the first time, if I do

chcon -t textrel_shlib_t '/home/andre/.wine/drive_c/windows/system32/MSVBVM50.DLL'

and then run it again, I get two more sealerts (text relocation again), so I do

chcon -t textrel_shlib_t '/home/andre/.wine/drive_c/windows/system32/ccrpDtp.ocx'
chcon -t textrel_shlib_t '/home/andre/.wine/drive_c/windows/system32/tabctl32.ocx'

and after running the installer again, I get two more sealerts (text relocation again), so I do

chcon -t textrel_shlib_t '/home/andre/.wine/drive_c/windows/system32/msflxgrd.ocx'
chcon -t textrel_shlib_t '/home/andre/.wine/drive_c/windows/system32/Anigif.dll'

and if I run the installer again, it works without any sealerts.

Now, if I try to actually run the installed application (~/.wine/drive_c/MyCash.exe), it appears to run, but I get another sealert (text relocation), so I do

chcon -t textrel_shlib_t '/home/andre/.wine/drive_c/MyCash.exe'

and it now appears to start more or less normally.  But I never saw a single text relocation warning in F9.
Comment 7 Daniel Walsh 2008-12-01 14:16:49 EST
allow_execmod was turned on by default in Fedora 9, and turned off by default in Fedora 10.

So turn the boolean on and you should be fine.

setsebool -P allow_execmod=1

Which will allow you to run apps as an unconfined user which requires execmod.
Comment 8 Andre Robatino 2008-12-01 14:32:51 EST
After running "setsebool -P allow_execmod=1" as root, everything works now, same as F9.  I'll close this as NOTABUG, and do some reading about the security implications of allowing this.  Thanks and sorry for the trouble.
Comment 9 Andre Robatino 2008-12-01 14:41:08 EST
One quick question - did this happen because this particular Windows application was written incorrectly, or would attempting to run any Windows program have generated the same errors?
Comment 10 Daniel Walsh 2008-12-01 14:48:49 EST
Running any window application will cause this problem, I believe.

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