bitdefender / bddisasm

bddisasm is a fast, lightweight, x86/x64 instruction decoder. The project also features a fast, basic, x86/x64 instruction emulator, designed specifically to detect shellcode-like behavior.
Apache License 2.0
887 stars 115 forks source link

False-positive decoding on AMD64: CL1INVMB #24

Closed woodruffw closed 4 years ago

woodruffw commented 4 years ago

Similar to #22 and #23: CL1INVMB is a 16/32-bit only instruction that was only available on obscure Intel cores (specifically, their Single-chip Cloud Computer platform).

Neither bare nor prefixed versions should be allowed in 64-bit mode, since no 64-bit x86 CPUs support them:

0f0a (0 / 0) (0 / 0) CL1INVMB (2 / 8)
26676736440f0a (0 / 0) (0 / 0) CL1INVMB (7 / 8)

More generally: it probably makes sense to put CL1INVMB behind a feature flag, since normal 16/32-bit x86 CPUs also don't support it.