[Bug 50791] NtQueryObject( ..., ObjectBasicInformation, NULL, 0, &retLen) returns incorrect NTSTATUS error code and no buffer size (EditSection, Google sandbox-attacksurface-analysis-tools v1.1.x)

WineHQ Bugzilla wine-bugs at winehq.org
Sat Apr 17 03:29:47 CDT 2021


https://bugs.winehq.org/show_bug.cgi?id=50791

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
      Fixed by SHA1|                            |749f8c25e262cb049289e7c96bb
                   |                            |390edcafa1021

--- Comment #3 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

this is fixed by commit
https://source.winehq.org/git/wine.git/commitdiff/749f8c25e262cb049289e7c96bb390edcafa1021
("ntdll: Return STATUS_INFO_LENGTH_MISMATCH when len is too small in
NtQueryObject(ObjectBasicInformation).").

Thanks Gijs

--- snip ---
$ WINEDEBUG=+seh,+relay,+ntdll,+server wine ./EditSection.exe >>log.txt 2>&1
...
0024:Call ntdll.NtQuerySystemInformation(00000005,00304e28,00002228,0021eaf4)
ret=05a4c1a7
0024:trace:ntdll:NtQuerySystemInformation
(0x00000005,0x304e28,0x00002228,0x21eaf4)
0024: list_processes( )
0024: list_processes() = 0 { info_size=2024, process_count=9,
data={{start_time=1d73362fbfada74
(-5.6514720),thread_count=3,priority=2,pid=0020,parent_pid=0000,handle_count=128,unix_pid=221181,name=L"\\??\\Z:\\home\\focht\\Downloads\\commonobj\\EditSection.exe",threads={{start_time=1d73362fb88c4ac
(-6.3991400),tid=0024,base_priority=0,current_priority=0,unix_tid=221181},{start_time=1d73362fc19b8d6
(-5.4491710),tid=0104,base_priority=0,current_priority=0,unix_tid=221248},{start_time=1d73362fc1a7e38
(-5.4441180),tid=0108,base_priority=2,current_priority=2,unix_tid=221249}}},{start_time=1d73362fb903b92 
...
0024:Ret  ntdll.NtQuerySystemInformation() retval=00000000 ret=05a4c1a7 
...
0024:Call KERNEL32.MultiByteToWideChar(0000fde9,00000000,05909c7d
"Threads",00000007,0021e540,00000007) ret=011d02b9
0024:Call ntdll.RtlUTF8ToUnicodeN(0021e540,0000000e,0021e478,05909c7d,00000007)
ret=7b0219cc
0024:Ret  ntdll.RtlUTF8ToUnicodeN() retval=00000000 ret=7b0219cc
0024:Ret  KERNEL32.MultiByteToWideChar() retval=00000007 ret=011d02b9 
...
0024:Call ntdll.NtOpenProcess(0021ecdc,00001040,0021ec70,01d31118) ret=05a4cfd9
0024: open_process( pid=0038, access=00001040, attributes=00000000 )
0024: open_process() = 0 { handle=01cc }
0024:Ret  ntdll.NtOpenProcess() retval=00000000 ret=05a4cfd9
0024:Call KERNEL32.GetLastError() ret=0119af80
0024:Ret  KERNEL32.GetLastError() retval=00000078 ret=0119af80
...
0024:Call ntdll.NtQueryObject(000001cc,00000000,00000000,00000000,0021ebd4)
ret=05a40b58
0024:Ret  ntdll.NtQueryObject() retval=c0000004 ret=05a40b58
0024:Call KERNEL32.LocalAlloc(00000000,00000038) ret=79a2875f
0024:Call ntdll.RtlAllocateHeap(00220000,00000000,00000038) ret=7b02a492
0024:Ret  ntdll.RtlAllocateHeap() retval=00303b00 ret=7b02a492
0024:Ret  KERNEL32.LocalAlloc() retval=00303b00 ret=79a2875f
0024:Call ntdll.NtQueryObject(000001cc,00000000,00303b00,00000038,0021ebd4)
ret=05a40b58
0024: get_object_info( handle=01cc )
0024: get_object_info() = 0 { access=00001040, ref_count=0000000b,
handle_count=00000001, total=0, name=L"" }
0024:Ret  ntdll.NtQueryObject() retval=00000000 ret=05a40b58
...
--- snip ---

$ wine --version
wine-6.6-196-g749f8c25e26

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