http://bugs.winehq.org/show_bug.cgi?id=30397
Bug #: 30397 Summary: Spoon Studio 2011 (ex Xenocode) application sandboxing scheme needs support for NtSetInformationFile class FileDispositionInformation (Stylizer 5.x, Visual CSS editor) Product: Wine Version: 1.5.1 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: ntdll AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net Classification: Unclassified
Hello,
Stylizer 5.x (Visual CSS editor) is wrapped in Xenocode like sandboxing scheme, now called "Spoon Studio 2011".
The usual native API hooking in several places. It seems not very happy about some unimplemented NtSetInformationFile classes.
---snip --- ... 0025:Call ntdll.RtlInitUnicodeString(0032f334,008b3068 L"\??\C:\users\focht\Local Settings\Application Data\Skybound\Stylizer\Sandbox\2011.12.15T20.58\XSandbox.bin.__tmp__") ret=0034d108 0025:Ret ntdll.RtlInitUnicodeString() retval=0032f334 ret=0034d108 0025:Call ntdll.NtOpenFile(0032f308,00110100,0032f31c,0032f2f8,00000007,00000020) ret=0034da48 0025:Ret ntdll.NtOpenFile() retval=00000000 ret=0034da48 0025:Call ntdll.NtSetInformationFile(00000068,0032f300,0032f2cc,00000028,00000004) ret=0034da84 0025:Ret ntdll.NtSetInformationFile() retval=00000000 ret=0034da84 0025:Call ntdll.NtSetInformationFile(00000068,0032f300,0032f31b,00000001,0000000d) ret=0034da9d 0025:fixme:ntdll:NtSetInformationFile Unsupported class (13) 0025:Ret ntdll.NtSetInformationFile() retval=c0000002 ret=0034da9d 0025:Call ntdll.NtClose(00000068) ret=0036b1d3 0025:Ret ntdll.NtClose() retval=00000000 ret=0036b1d3 ... 0025:Call user32.MessageBoxW(00000000,008b2f70 L"The sandbox at \??\C:\users\focht\Local Settings\Application Data\Skybound\Stylizer\Sandbox\2011.12.15T20.58 is corrupt or inaccessible. Please check the location and try again.",008a3f48 L"Spoon Studio 2011",00000010) ret=00396aa6 ... ---snip ---
MSDN (ZwSetInformationFile): http://msdn.microsoft.com/en-us/library/windows/hardware/ff567096%28v=vs.85%...
class 13 -> FILE_DISPOSITION_INFORMATION:
http://msdn.microsoft.com/en-us/library/windows/hardware/ff545765%28v=vs.85%...
Also interesting read: Cygwin's Corinna Vinschen and some MS guy about deletion semantics ;-)
http://www.tech-archive.net/Archive/Development/microsoft.public.win32.progr...
--- quote --- First off, FILE_DELETE_ON_CLOSE and FileDispositionInformation are NOT the same thing.
There are really two parts to delete. The first part is to logically delete the file. This consists of the file system marking the file as deleted and then waiting for the last handle to close. When a file is marked as deleted, many operations (including new opens) fail. Once the last handle as closed, the actual delete of the file can take place.
When you open a file with FILE_DELETE_ON_CLOSE, the file is left as is. Neither part of delete is done. The only thing done is to remember that when this handle is closed, the file should be deleted. All operations on the file will proceed as normal. When the handle marked as delete on close is closed, the file is logically deleted. If that handle was the last handle, the file will also actually be deleted.
When you use FileDispositionInformation to set a file to deleted, the file is logically deleted right then. Any new opens for the file and many other operations will fail. The file system will not complete the actual removal of the file until the last handle is closed, though. --- quote ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=30397
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, obfuscation URL| |http://filequake.com/downlo | |ading/stylizer/
--- Comment #1 from Anastasius Focht focht@gmx.net 2012-04-09 11:48:20 CDT --- Hello,
filling fields ... Although ntdll is "visible" component it needs support/implementation in wineserver.
Stylizer 5.1.11.1214
$ du -sh Stylizer5Setup.exe 15M Stylizer5Setup.exe
$ sha1sum Stylizer5Setup.exe 4df9db3c932dd6c77621a67d52ba45ad2b638bb7 Stylizer5Setup.exe
$ wine --version wine-1.5.1-197-g73e7346
Regards
http://bugs.winehq.org/show_bug.cgi?id=30397
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30399
http://bugs.winehq.org/show_bug.cgi?id=30397
Julian Rüger jr98@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jr98@gmx.net
http://bugs.winehq.org/show_bug.cgi?id=30397
Sylvain Petreolle spetreolle@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |spetreolle@yahoo.fr
http://bugs.winehq.org/show_bug.cgi?id=30397
Sylvain Petreolle spetreolle@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24018
http://bugs.winehq.org/show_bug.cgi?id=30397
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Installer URL|http://filequake.com/downlo |http://www.computerssilenro |ading/stylizer/ |c.nl/downloads/Software/CSS | |_Editors/Stylizer5Setup.exe Summary|Spoon Studio 2011 (ex |Multiple applications need |Xenocode) application |support for |sandboxing scheme needs |NtSetInformationFile class |support for |FileDispositionInformation |NtSetInformationFile class |(Cygwin installer, Stylizer |FileDispositionInformation |5.x Visual CSS editor, |(Stylizer 5.x, Visual CSS |Spoon Studio 2011 (ex |editor) |Xenocode) application | |sandboxing scheme)
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting, still present.
--- snip --- ... 0032:trace:ntdll:FILE_CreateFile handle=0x33f2ec access=00110100 name=L"\??\C:\users\focht\Local Settings\Application Data\Skybound\Stylizer\Sandbox\2012.11.26T17.48\xsandbox.bin.__tmp__" objattr=00000040 root=(nil) sec=(nil) io=0x33f2dc alloc_size=(nil) attr=00000000 sharing=00000007 disp=1 options=00000020 ea=(nil).0x00000000 ... 0032:Call ntdll.NtSetInformationFile(00000078,0033f2e4,0033f2ff,00000001,0000000d) ret=0037972f 0032:trace:ntdll:NtSetInformationFile (0x78,0x33f2e4,0x33f2ff,0x00000001,0x0000000d) 0032:fixme:ntdll:NtSetInformationFile Unsupported class (13) 0032:Ret ntdll.NtSetInformationFile() retval=c0000002 ret=0037972f ... 0032:Call user32.MessageBoxW(00000000,008e4008 L"The sandbox at \??\C:\users\focht\Local Settings\Application Data\Skybound\Stylizer\Sandbox\2012.11.26T17.48 is corrupt or inaccessible. Please check the location and try again.",008d5058 L"Spoon Virtual Application Studio 2012",00000010) ret=003ccc07 ... 0032:warn:debugstr:OutputDebugStringA "The sandbox at \??\C:\users\focht\Local Settings\Application Data\Skybound\Stylizer\Sandbox\2012.11.26T17.48 is corrupt or inaccessible. Please check the location and try again." ... 0032:warn:debugstr:OutputDebugStringA "ERROR: 0xC0000002, VMAPICALL(VmMoveFile(_hFile, _sFullPath))\nERROR: 0xD0000002, In call: pStmSandboxFile->Commit()\nERROR: 0x8007FF04, In call: CSandbox::InitializeSandbox(CProcessSettings::VmFlagSet(eDeleteSandbox), fCheckSandboxSpace, cMinSandboxSpaceAvail)\nERROR: 0x8007FF04, In call: g_vm.Essent"... ... 0032:Call KERNEL32.TerminateProcess(ffffffff,ffffffff) ret=003b8012 ... --- snip ---
According to http://bugs.winehq.org/show_bug.cgi?id=24018#c17 (Andrey Turkin) also needed for Cygwin installer:
--- quote ---
first postinstall script created an empty /etc/fstab file rather than what was intended (presumably because of some Wine bug or regression) and that may have had a snowball effect on everything else resulting in the many "Read-only file system" error messages above.
This turned out to be an issue with Wine which makes "unlink" syscall to not work which is really bad, and in particular it makes bash's heredoc (and probably all tmpfile operations) to fail. Wine needs to implement FileDispositionInformation class; there is a bug 30397 for that already, already filled (as usual) excellent description from Anastasius Focht. --- quote ---
Refining summary.
$ sha1sum Stylizer5Setup.exe fa99802266f80441ac4f091e90b20691e170f12d Stylizer5Setup.exe
$ du -sh Stylizer5Setup.exe 16M Stylizer5Setup.exe
$ wine --version wine-1.7.10-262-g6925362
Regards
http://bugs.winehq.org/show_bug.cgi?id=30397
--- Comment #3 from Dmitry Timoshkov dmitry@baikal.ru --- Here is my attempt on this: http://www.winehq.org/pipermail/wine-patches/2014-February/130240.html http://www.winehq.org/pipermail/wine-patches/2014-February/130241.html http://www.winehq.org/pipermail/wine-patches/2014-February/130242.html
https://bugs.winehq.org/show_bug.cgi?id=30397
OmegaPhil00@startmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |OmegaPhil00@startmail.com
https://bugs.winehq.org/show_bug.cgi?id=30397
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=30397
--- Comment #4 from OmegaPhil@startmail.com --- Thanks Dmitry for the patches - I have just patched v1.7.30, and while they apply cleanly, I get a build failure (without them I can build fine):
=========================================================================
make[1]: Entering directory '/home/omega/files/source/wine/wine-1.7.30/build/dlls/aclui' gcc -c -o aclui_main.o ../../../dlls/aclui/aclui_main.c -I. -I../../../dlls/aclui -I../../include \ -I../../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing \ -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Wstrict-prototypes -Wtype-limits \ -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith -Wlogical-op -gdwarf-2 \ -gstrict-dwarf -fno-omit-frame-pointer -g -O2 In file included from ../../server/file.c:51:0: ../../server/file.c:733:14: warning: ‘struct set_file_info_reply’ declared inside parameter list DECL_HANDLER(set_file_info) ^ ../../server/request.h:34:63: note: in definition of macro ‘DECL_HANDLER’ void req_##name( const struct name##_request *req, struct name##_reply *reply ) ^ ../../server/file.c:733:14: warning: its scope is only this definition or declaration, which is probably not what you want DECL_HANDLER(set_file_info) ^ ../../server/request.h:34:63: note: in definition of macro ‘DECL_HANDLER’ void req_##name( const struct name##_request *req, struct name##_reply *reply ) ^ ../../server/file.c:733:14: warning: ‘struct set_file_info_request’ declared inside parameter list DECL_HANDLER(set_file_info) ^ ../../server/request.h:34:63: note: in definition of macro ‘DECL_HANDLER’ void req_##name( const struct name##_request *req, struct name##_reply *reply ) ^ ../../server/file.c: In function ‘req_set_file_info’: ../../server/file.c:737:52: error: dereferencing pointer to incomplete type if ((file = get_file_obj( current->process, req->handle, DELETE ))) ^ ../../server/file.c:739:42: error: dereferencing pointer to incomplete type set_fd_disposition( file->fd, req->unlink ); ^ ../../server/file.c:747:70: error: dereferencing pointer to incomplete type if ((file = (struct file *)get_dir_obj( current->process, req->handle, DELETE ))) ^ ../../server/file.c:749:46: error: dereferencing pointer to incomplete type set_fd_disposition( file->fd, req->unlink ); ^ Makefile:366: recipe for target 'file.o' failed make[1]: *** [file.o] Error 1 make[1]: Leaving directory '/home/omega/files/source/wine/wine-1.7.30/build/server' Makefile:21326: recipe for target 'server' failed make: *** [server] Error 2
=========================================================================
Can you still build at your end? I'm interested in seeing if these patches solve the Cygwin Installer installation failures (which appear to be some sort of renaming problem).
Thanks
https://bugs.winehq.org/show_bug.cgi?id=30397
--- Comment #5 from Sebastian Lackner sebastian@fds-team.de --- You forgot to run tools/make_requests after applying the patches, which is always necessary when the wineserver protocol changes. Nevertheless, please use the forums / #winehq in the future for such questions about how to build wine. It doesn't make sense to explain all this over and over again in each individual bugreport.
Just another remark: This patchset is also included in "Wine Staging", and we're also providing precompiled binaries including this (and many other) patches:
https://github.com/wine-compholio/wine-staging/tree/master/patches/ntdll-Fil... https://github.com/wine-compholio/wine-staging/wiki/Installation
https://bugs.winehq.org/show_bug.cgi?id=30397
--- Comment #6 from OmegaPhil@startmail.com --- Thanks for your feedback - I was treating WINE as a normal project and therefore not expecting to have to look into special commands or procedures etc (I'm in enduser mode for this stuff).
Thankyou about the staging repo, I will check that out later.
https://bugs.winehq.org/show_bug.cgi?id=30397
--- Comment #7 from OmegaPhil@startmail.com --- For reference I have installed from the WINE staging repo and can confirm the patch doesn't help cygwin installation. Thanks for telling me about WINE staging all the same.
https://bugs.winehq.org/show_bug.cgi?id=30397
Qian Hong fracting@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fracting@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=30397
--- Comment #8 from Sebastian Lackner sebastian@fds-team.de --- Please note that wine bug reports are always about specific technical issues, not about applications. I assume that Cygwin would need additional fixes to work properly. If the issue you are experiencing is not documented yet, feel free to reproduce it a minimally patched version and open a bug report for it (which should of course exactly mention which patches and workarounds are necessary to reproduce it).
https://bugs.winehq.org/show_bug.cgi?id=30397
--- Comment #9 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting, obviously still present.
$ wine --version wine-1.7.48-74-gb3fe96a
Regards
https://bugs.winehq.org/show_bug.cgi?id=30397
--- Comment #10 from Sebastian Lackner sebastian@fds-team.de --- Wooho, finally some progress. This bug should be fixed with http://source.winehq.org/git/wine.git/commit/0fabfe7d6b30cac1f15c1f70786da6e.... There are a couple of more patches left for corner cases, but for most apps it should already be sufficient. Please go ahead and retest :)
https://bugs.winehq.org/show_bug.cgi?id=30397
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |0fabfe7d6b30cac1f15c1f70786 | |da6ebe2bffe2e Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #11 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit https://source.winehq.org/git/wine.git/commitdiff/0fabfe7d6b30cac1f15c1f7078...
Thanks Sebastian
NOTE: Xenocode wrapped apps depend on bug 30399 being fixed too, so even if the error message still states: "VM SandBox is corrupt or inaccessible" the problem domain has moved.
Regards
https://bugs.winehq.org/show_bug.cgi?id=30397
--- Comment #12 from Sebastian Lackner sebastian@fds-team.de --- (In reply to Anastasius Focht from comment #11)
Hello folks,
this is fixed by commit https://source.winehq.org/git/wine.git/commitdiff/ 0fabfe7d6b30cac1f15c1f70786da6ebe2bffe2e
Thanks Sebastian
NOTE: Xenocode wrapped apps depend on bug 30399 being fixed too, so even if the error message still states: "VM SandBox is corrupt or inaccessible" the problem domain has moved.
Regards
Thanks for testing. I'm planning to send patches for bug 30399 and also for FileLinkInformation as a next step.
https://bugs.winehq.org/show_bug.cgi?id=30397
--- Comment #13 from Austin English austinenglish@gmail.com --- (In reply to Anastasius Focht from comment #11)
Hello folks,
this is fixed by commit https://source.winehq.org/git/wine.git/commitdiff/ 0fabfe7d6b30cac1f15c1f70786da6ebe2bffe2e
Thanks Sebastian
NOTE: Xenocode wrapped apps depend on bug 30399 being fixed too, so even if the error message still states: "VM SandBox is corrupt or inaccessible" the problem domain has moved.
Regards
The same for Cygwin. With this fixed, when attempting to install packages it reports an I/O for each package. With the patchset for 30399 applied, that issue is avoided, and it appears to work up until the postinstall (where dash.exe crashes).
https://bugs.winehq.org/show_bug.cgi?id=30397
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.50.
https://bugs.winehq.org/show_bug.cgi?id=30397
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.computerssilenro |https://archive.org/downloa |c.nl/downloads/Software/CSS |d/stylizer-5-setup/Stylizer |_Editors/Stylizer5Setup.exe |5Setup.exe