Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BugId fails with Assertion: uAddress is not a valid 32-bit pointer! #124

Open
maxcoderrrr opened this issue Nov 29, 2023 · 0 comments
Open

Comments

@maxcoderrrr
Copy link

Hi,

Playing around some more, I found an application that doesn't handle page heap well. I tried to run BugId regardless on a crashing input, understanding that the analysis might not be accurate, but encountered the following error:

┌───[ Software license warning ]──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ ▲ You have no license for BugId and your trial period will expire on December 28th, 2023
│ ▲ You have no license for mBugId and your trial period will expire on December 28th, 2023
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
→ Command line: C:\test\foo.EXE C:\test\foo.bar
▲ Full page heap is not enabled for foo.EXE in process 77104/0x12D30.
  Without page heap enabled, detection and anaylsis of any bugs will be sub-
  optimal. Please enable page heap to improve detection and analysis.

  You can enabled full page heap for foo.exe by running:

      PageHeap.cmd "foo.EXE" ON

+ Main process 77104/0x12D30 (foo.EXE, x86, IL:3): Attached (C:\test\foo.EXE C:\test\foo.bar).
┌───[ Fatal builtins.AssertionError Exception in thread 74104/0x12178 (cThread#278FBD8D090{main = __fRun, #74104, running}) ]─────────────────────────────────────────────────────────────
│ uAddress 0x1`0000`0000 is not a valid 32-bit pointer!
│ 
│ Local variables:
│   ohProcess = <pointer HANDLE (64-bit @ 0x278`FBD09818) =weak=> VOID @ 0x30C>#278FBD097D0
│   oSelf = <instance mWindowsAPI.cVirtualAllocation:cVirtualAllocation>#278FBDAFE50
│   sProcessISA = 'x86'
│   u0Address = 4294967296
│   uAddress = 4294967296
│ 
│ Stack for thread 74104/0x12178 (cThread#278FBD8D090{main = __fRun, #74104, running}):
│ ─┐ __fRun @ C:\BugId3\modules\mBugId\cCdbWrapper\cCdbWrapper_cHelperThread.py:66
│  │ 65:      try:
│  │ 66:        oSelf.__fActivity(*oSelf.__axActivityArguments);
│  ├─┐ cCdbWrapper_fCdbStdInOutHelperThread @ C:\BugId3\modules\mBugId\cCdbWrapper\cCdbWrapper_fCdbStdInOutHelperThread.py:54
│  ╷ │ 53:    oCdbWrapper.fbFireCallbacks("Log message", "Main loop #%d" % uMainLoopCounter);
│  ╷ │ 54:    (bEventIsFatal, bEventHasBeenHandled) = oCdbWrapper.ftbHandleLastCdbEvent(asbOutputWhileRunningApplication);
│  ╷ ├─┐ cCdbWrapper_ftbHandleLastCdbEvent @ C:\BugId3\modules\mBugId\cCdbWrapper\cCdbWrapper_ftbHandleLastCdbEvent.py:229
│  ╷ ╷ │ 228:  ### Report bug and see if the collateral bug handler can ignore it #################################################
│  ╷ ╷ │ 229:  o0BugReport.fReport();
│  ╷ ╷ ├─┐ cBugReport?.fReport @ C:\BugId3\modules\mBugId\cBugReport\cBugReport.py:261
│  ╷ ╷ ╷ │ 260:      if oSelf.bRegistersRelevant:
│  ╷ ╷ ╷ │ 261:        s0RegistersBlockHTML = oSelf.fs0GetRegistersBlockHTML(oSelf.__oProcess, oSelf.__oWindowsAPIThread);
│  ╷ ╷ ╷ ├─┐ cBugReport_fs0GetRegistersBlockHTML @ C:\BugId3\modules\mBugId\cBugReport\cBugReport_fs0GetRegistersBlockHTML.py:7
│  ╷ ╷ ╷ ╷ │ 6:  # Create and add registers block
│  ╷ ╷ ╷ ╷ │ 7:  a0txRegisters = oProcess.fa0txGetRegistersForThreadId(oWindowsAPIThread.uId);
│  ╷ ╷ ╷ ╷ ├─┐ cProcess_fa0txGetRegistersForThreadId @ C:\BugId3\modules\mBugId\cProcess\cProcess_fa0txGetRegistersForThreadId.py:19
│  ╷ ╷ ╷ ╷ ╷ │ 18:      else:
│  ╷ ╷ ╷ ╷ ╷ │ 19:        o0HeapManagerData = oProcess.fo0GetHeapManagerDataForAddressNearHeapBlock(
│  ╷ ╷ ╷ ╷ ╷ ├─┐ cProcess?.fo0GetHeapManagerDataForAddressNearHeapBlock @ C:\BugId3\modules\mBugId\cProcess\cProcess.py:234
│  ╷ ╷ ╷ ╷ ╷ ╷ │ 233:    else:
│  ╷ ╷ ╷ ╷ ╷ ╷ │ 234:      return oSelf.fo0GetWindowsHeapManagerDataForAddressNearHeapBlock(uAddressNearHeapBlock);
│  ╷ ╷ ╷ ╷ ╷ ╷ ├─┐ cProcess?.fo0GetWindowsHeapManagerDataForAddressNearHeapBlock @ C:\BugId3\modules\mBugId\cProcess\cProcess.py:245
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 244:      oSelf.__do0HeapManagerData_by_uAddressNearHeapBlock[uAddressNearHeapBlock] = \
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 245:          cProcess_fo0GetWindowsHeapManagerDataForAddressNearHeapBlock(oSelf, uAddressNearHeapBlock);
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ├─┐ cProcess_fo0GetWindowsHeapManagerDataForAddressNearHeapBlock @ C:\BugId3\modules\mBugId\cProcess\cProcess_fo0GetWindowsHeapManagerDataForAddressNearHeapBlock.py:94
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 93:        if uOffsetFromEndOfVirtualAllocation < oSystemInfo.uPageSize:
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 94:          oNextVitualAllocation = cVirtualAllocation(
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ├─┐ cVirtualAllocation?.__init__ @ C:\BugId3\modules\mWindowsAPI\cVirtualAllocation.py:126
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 125:    oSelf.__u0PointerSize = None;
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 126:    oSelf.__fUpdate(uAddress);
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ├─┐ __fUpdate @ C:\BugId3\modules\mWindowsAPI\cVirtualAllocation.py:153
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 152:      oSelf.__u0PointerSize = {"x86": 4, "x64": 8}[sProcessISA];
│  ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ │ 153:    assert 0 <= uAddress < (1 << (oSelf.__u0PointerSize * 8)), \
│  ╒═══════════════════╛ ▲ Assertion failed: 'uAddress 0x1`0000`0000 is not a valid 32-bit pointer!'
│  │ __fRun @ C:\BugId3\modules\mBugId\cCdbWrapper\cCdbWrapper_cHelperThread.py:74
│  │ 73:        cException, oException, oTraceBack = sys.exc_info();
│  │ 74:        if not oSelf.__oCdbWrapper.fbFireCallbacks("Internal exception", oSelf.__oThread, oException, oTraceBack):
│ ═╛ ▲ Application terminated because exception was not handled.
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Please report the above details at the below web-page so it can be addressed:
    https://github.com/SkyLined/BugId/issues/new
If you do not have a github account, or you want to report this issue
privately, you can also send an email to:
    [email protected]

In your report, please copy ALL the information about the exception reported
above, as well as the stack trace and BugId version information. This makes
it easier to determine the cause of this issue and makes for faster fixes.

If you can reproduce the issue, it would help a lot if you can run BugId in
verbose mode by adding the --verbose command-line argument.
as in: BugId -v --isa=x86 --n0ApplicationMaxRunTimeInSeconds=120 C:\test\foo.EXE -- C:\test\foo.bar


  ____________________________________________________________________________
                              __
   ││▌║█▐▐║▌▌█│║║│      _,siSP**YSis,_       ╒╦╦══╦╗             ╒╦╦╕    ╔╦╕
   ││▌║█▐▐║▌▌█│║║│    ,SP*'`    . `'*YS,      ║╠══╬╣ ╔╗ ╔╗ ╔╦═╦╗  ║║  ╔╦═╬╣
   ╵2808197631337╵   dS'  _    |    _ 'Sb    ╘╩╩══╩╝ ╚╩═╩╝ ╚╩═╬╣ ╘╩╩╛ ╚╩═╩╝
                    dP     \,-` `-<` `  Y;                 ╚╩═╩╝    ╮╷╭
      ╮╷╭          ,S`  \+' \      \    `Sissssssssssssssssssss,   :O()    ╲ö╱
     :O()          (S   (   | --====)   :SSSSSSSSSSSSSSSSSSSSSSD    ╯╵╰    ─O─
      ╯╵╰  ╮╷╭     'S,  /+, /      /    ,S?********************'           ╱O╲
           ()O:     Yb    _/'-_ _-<._.  dP
           ╯╵╰       YS,       |      ,SP         https://bugid.skylined.nl
  ____________________`Sbs,_    ' _,sdS`______________________________________
                        `'*YSissiSY*'`
                              ``
┌───[ Version information ]───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ ▲ BugId version: 2022-12-12 12:05 (in trial period).
│ ▲ mBugId version: 2022-12-12 12:05 (in trial period).
│ √ mConsole version: 2022-12-12 12:05.
│ √ mDateTime version: 2022-12-12 12:04.
│ √ mDebugOutput version: 2022-12-12 12:05.
│ √ mFileSystemItem version: 2022-12-12 12:05.
│ √ mHumanReadable version: 2022-12-12 12:04.
│ √ mMultiThreading version: 2022-12-12 12:05.
│ √ mNotProvided version: 2022-12-12 12:04.
│ √ mProductDetails version: 2022-12-12 12:05.
│ √ mRegistry version: 2022-12-12 12:05.
│ √ mWindowsAPI version: 2022-12-12 12:05.
│ √ mWindowsSDK version: 2022-12-12 12:04.
│ • Windows version: Windows 10 Pro release 2009, build 19045 x64.
│ • Python version: 3.11.1 x64.
│ • cdb.exe (x86) version: 10.0.22621.2428.
│ • cdb.exe (x64) version: 10.0.22621.2428.
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Thank you in advance for helping to improve BugId!
√ A copy of the error report can be found in C:\BugId3\Internal error reports\2023-11-28 19։25։43.30382 BugId error report #2.txt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant