Unnecessary `cs` segment override prefix (in Win32 flat mode) breaks jump table lifting
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- cpp
- Bereich
- reverse-engineering
Rechercherichtung
Start by tracing x86 decoding of the 0x2e prefix and LLIL generation for the jmp [sib] sequence described in the issue. Check how Win32 flat-mode segment semantics are represented, then add a regression case for an equivalent instruction sequence if the test framework permits. Done means inert cs overrides no longer contribute cs.d or prevent jump-table lifting, while fs/gs behavior remains unchanged.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Version and Platform (required):
- Binary Ninja Version: 5.3.9757 Personal (a99f2380)
- OS: macOS
- OS Version: 26.6.1
- CPU Architecture: ARM64
Bug Description:
I have a Win32 user-mode binary from the 90s that, for whatever reason, contains a redundant 0x2e segment override prefix on a jmp [sib] opcode, where the SIB encodes a jump table which follows immediately afterwards (all absolute addresses, not position-independent).
Binary Ninja decides to turn this into an "Unresolved Indirect Control Flow" even though this segment override has no effect in Win32.
If I manually patch the segment override prefix into a nop in the hex editor view, this is able to work around the problem (in only that specific instance, of course).
Steps To Reproduce:
Please provide all steps required to reproduce the behavior:
- Load a binary that contains an unnecessary segment override as I've shown
- Look in the disassembly view and notice the large red ? question mark.
- Look in the LLIL view and see
cs.das part of the jump computation. - Patch the
0x2eto0x90in the hex editor. Observe that everything works now.
Expected Behavior:
x86 segment overrides should be ignored on platforms where they are known to not do anything (which includes most modern userspace, for segments other than fs/gs)
Screenshots/Video Recording:
Screenshots of Binary Ninja seeing the segment override:
Screenshot after manual patches in the hex editor
Binary:
Unfortunately, I do not have permission to share the binary.
Additional Information:
N/A
- Vorherrschende Sprache
- C++
- Sterne
- 1.3k
- Forks
- 298
- Ø Merge
- 5 T. 5 Std.
- Gemergte PRs (30 T.)
- 19
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Vector35/binaryninja-api
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Vector35/binaryninja-api#8540 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Vector35/binaryninja-api#8516 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
Vector35/binaryninja-api#8503 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Vector35/binaryninja-api#8446 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Vector35/binaryninja-api#8444 ·
Alle Issues in Vector35/binaryninja-api
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
gazebosim/gz-sensors#662 · 1 Kommentar ·
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
comp-datalake
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
ClickHouse/ClickHouse#121222 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
LadybirdBrowser/ladybird#12123 ·