rizinorg / rizin

UNIX-like reverse engineering framework and command-line toolset.
https://rizin.re
GNU Lesser General Public License v3.0
2.69k stars 360 forks source link

../subprojects/rzwinkd/winkd.c:652:19: runtime error: load of value 32, which is not a valid value for type 'bool' #2476

Closed XVilka closed 2 years ago

XVilka commented 2 years ago

I know, it's a bug that's probably triggered because of the incomplete PDB download, but nevertheless worth fixing.

[XX] db/formats/dmp/dmp : Triage Dump Debug arm64
RZ_NOPLUGINS=1 rizin -escr.utf8=0 -escr.color=0 -escr.interactive=0 -N -Qc '%RZ_CURL=1
e cfg.debug=1
iH
dL dmp
dpa
dr
s pc
e asm.sub.names=false
pi 4
' dmp://bins/dmp/triage_arm64.dmp
-- stdout
--- expected
+++ actual
@@ -47,43 +47,3 @@
   DebuggerDataSize : 0x00000380
   DataBlocksOffset : 0x0001d6b0
   DataBlocksCount : 0x000002a7
-cpsr = 0x80000144
-x0 = 0x00000000
-x1 = 0x00000001
-x2 = 0xffffffffffffff80
-x3 = 0xfffff803f3a36aa0
-x4 = 0x00000000
-x5 = 0x00000000
-x6 = 0xfffff803f3a16000
-x7 = 0x0000064d
-x8 = 0x00000000
-x9 = 0xfffff803f3a2d000
-x10 = 0x00008000
-x11 = 0xffffe00e0e4bd000
-x12 = 0xffffe00e0e4b5000
-x13 = 0x00000017
-x14 = 0x00124925
-x15 = 0x00000fff
-x16 = 0x80000001
-x17 = 0x6402a279369a
-x18 = 0xfffff803efd00000
-x19 = 0xfffff803efd00980
-x20 = 0x00000001
-x21 = 0x00000001
-x22 = 0x00000000
-x23 = 0x00000000
-x24 = 0x00000000
-x25 = 0x00001b58
-x26 = 0xfffff803f3a20860
-x27 = 0x00000000
-x28 = 0x00000000
-fp = 0xffffe00e0e4bc4a0
-lr = 0x00000000
-sp = 0xffffe00e0e4bc4a0
-pc = 0xfffff803f32de014
-fpcr = 0x00000000
-fpsr = 0x00000010
-add x0, x19, 0x40
-bl 0xfffff803f318f560
-adrp x8, 0xfffff803f3a23000
-ldr x11, [x8, 0xa40]

-- stderr
Attempting to download compressed pdb in /home/runner/.local/share/rizin/pdb/ntoskrnl.exe/df291b09103e000/ntoskrnl.ex_
Falling back to uncompressed pdb
Attempting to download uncompressed pdb in /home/runner/.local/share/rizin/pdb/ntoskrnl.exe/df291b09103e000/ntoskrnl.exe
Falling back to uncompressed pdb
Attempting to download uncompressed pdb in /home/runner/.local/share/rizin/pdb/ntkrnlmp.pdb/C45A6B0B7232AA5B23BCCAFF5D2E312C1/ntkrnlmp.pdb
ERROR: Invalid MSF superblock!
../subprojects/rzwinkd/winkd.c:652:19: runtime error: load of value 32, which is not a valid value for type 'bool'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../subprojects/rzwinkd/winkd.c:652:19 in 
WARNING: Failed to read DISPACHER_HEAD.Type at: 0x0
WARNING: Failed to read DISPACHER_HEAD.Type at: 0x0
WARNING: Failed to read DISPACHER_HEAD.Type at: 0x0
WARNING: Failed to read DISPACHER_HEAD.Type at: 0x0
WARNING: Failed to read DISPACHER_HEAD.Type at: 0x0
WARNING: Failed to read DISPACHER_HEAD.Type at: 0x0
WARNING: Failed to read DISPACHER_HEAD.Type at: 0x0
WARNING: Failed to read DISPACHER_HEAD.Type at: 0x0

https://github.com/rizinorg/rizin/runs/5774830729?check_suite_focus=true#step:17:536

GustavoLCR commented 2 years ago

Is this a false positive? I don't get the UB here https://github.com/rizinorg/rizin/blob/7586b3152300c6f219c4516d82dfd365e8b5e0d9/subprojects/rzwinkd/winkd.c#L652

XVilka commented 2 years ago

Probably a false positive then, you are right. Closing.