[Bug 37488] Quicken 2014 reports error 0x0000054f on startup (NtAreMappedFilesTheSame fails to compare in-memory loader view of builtin dlls with mapped disk image)
WineHQ Bugzilla
wine-bugs at winehq.org
Sun Mar 28 08:42:12 CDT 2021
https://bugs.winehq.org/show_bug.cgi?id=37488
--- Comment #7 from Anastasius Focht <focht at gmx.net> ---
Hello folks,
unfortunately Quicken 2014 was not fixed in Wine 6.5. The test app doesn't
fully resemble what the protection scheme does (using native API):
--- snip ---
...
0024:Call
ntdll.NtQueryVirtualMemory(ffffffff,7bc00000,00000002,01420920,0000004c,0033f604)
ret=006fbe70
0024: get_mapping_filename( process=ffffffff, addr=7bc00000 )
0024: get_mapping_filename() = 0 { len=66,
filename=L"\\??\\C:\\windows\\system32\\ntdll.dll" }
0024:Ret ntdll.NtQueryVirtualMemory() retval=00000000 ret=006fbe70
0024:Call ntdll.RtlInitUnicodeString(0033f660,014208b0
L"\\??\\C:\\windows\\system32\\ntdll.dll") ret=006f5669
0024:Ret ntdll.RtlInitUnicodeString() retval=00000044 ret=006f5669
0024:Call
ntdll.NtCreateFile(0033f650,80100000,0033f670,0033f668,00000000,00000000,00000005,00000001,00000060,00000000,00000000)
ret=006f56b1
0024: create_file( access=80100000, sharing=00000005, create=1,
options=00000060, attrs=00000000,
objattr={rootdir=0000,attributes=00000040,sd={},name=L"\\??\\C:\\windows\\syswow64\\ntdll.dll"},
filename="/home/focht/.wine/dosdevices/c:/windows/syswow64/ntdll.dll" )
0024: create_file() = 0 { handle=0094 }
0024:Ret ntdll.NtCreateFile() retval=00000000 ret=006f56b1
0024:Call
ntdll.NtCreateSection(0033f654,000f0005,00000000,00000000,00000008,08000000,00000094)
ret=006f56d2
0024: create_mapping( access=000f0005, flags=08000000, file_access=00000001,
size=00000000, file_handle=0094, objattr={} )
0024: create_mapping() = 0 { handle=0098 }
0024:Ret ntdll.NtCreateSection() retval=00000000 ret=006f56d2
0024:Call ntdll.NtClose(00000094) ret=006f56e0
0024: close_handle( handle=0094 )
0024: close_handle() = 0
0024:Ret ntdll.NtClose() retval=00000000 ret=006f56e0
0024:Call
ntdll.NtMapViewOfSection(00000098,ffffffff,0033f64c,00000000,00000000,00000000,0033f658,00000002,00000000,00000008)
ret=006f570a
0024: get_mapping_info( handle=0098, access=00000004 )
0024: get_mapping_info() = 0 { size=0007e000, flags=00800000, shared_file=0000,
total=0, image={}, name=L"" }
0024: get_handle_fd( handle=0098 )
0024: *fd* 0098 -> 245
0024: get_handle_fd() = 0 { type=1, cacheable=1, access=000f0005,
options=00000020 }
0024: map_view( mapping=0098, access=00000004, base=01440000, size=0007e000,
start=00000000, image={}, name=L"" )
0024: map_view() = 0
0024:Ret ntdll.NtMapViewOfSection() retval=00000000 ret=006f570a
0024:Call ntdll.NtClose(00000098) ret=006f5712
0024: close_handle( handle=0098 )
0024: close_handle() = 0
0024:Ret ntdll.NtClose() retval=00000000 ret=006f5712
0024:Call ntdll.NtAreMappedFilesTheSame(7bc00000,01440000) ret=006f5723
0024: is_same_mapping( base1=7bc00000, base2=01440000 )
0024: is_same_mapping() = NOT_SAME_DEVICE
0024:Ret ntdll.NtAreMappedFilesTheSame() retval=c00000d4 ret=006f5723
0024:Call ntdll.NtUnmapViewOfSection(ffffffff,01440000) ret=006f5733
0024: unmap_view( base=01440000 )
0024: unmap_view() = 0
0024:Ret ntdll.NtUnmapViewOfSection() retval=00000000 ret=006f5733
0024:trace:seh:dispatch_exception code=c0000005 flags=0 addr=006F6CC6
ip=006f6cc6 tid=0024
0024:trace:seh:dispatch_exception info[0]=00000000
0024:trace:seh:dispatch_exception info[1]=01440000
0024:warn:seh:dispatch_exception EXCEPTION_ACCESS_VIOLATION exception
(code=c0000005) raised
--- snip ---
The section is created with SEC_COMMIT allocation attributes hence the
server-side check which looks for SEC_IMAGE will always fail.
Wine source:
https://source.winehq.org/git/wine.git/blob/71d41b37a1917cdf20cdb171dc73c20dbfdaeefa:/server/mapping.c#l1270
--- snip ---
1270 /* check if two memory maps are for the same file */
1271 DECL_HANDLER(is_same_mapping)
1272 {
1273 struct memory_view *view1 = find_mapped_view( current->process,
req->base1 );
1274 struct memory_view *view2 = find_mapped_view( current->process,
req->base2 );
1275
1276 if (!view1 || !view2) return;
1277 if (!view1->fd || !view2->fd ||
1278 !(view1->flags & SEC_IMAGE) || !(view2->flags & SEC_IMAGE) ||
1279 !is_same_file_fd( view1->fd, view2->fd ))
1280 set_error( STATUS_NOT_SAME_DEVICE );
1281 }
--- snip ---
$ wine --version
wine-6.5
Regards
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list