[AArch64] Always Branch patch on tbnz still broken in 6.0.10905 (regression of #6613/#7280)

Offen
#8,696 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
58/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
cpp

Rechercherichtung

The issue identifies the AArch64 tbnz instruction and the Patch → Always Branch action; it does not name an implementation file or test. Start by locating the AArch64 patch logic for Always Branch and compare its behavior with Invert Branch and Never Branch on the provided instruction word, 0x37000108. Done means Always Branch produces the unconditional b target encoding 0x14000008 while the other two actions retain their reported behavior.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Arch: ARM64

Version and Platform (required):

  • Binary Ninja Version: 6.0.10905 Personal (fe7968aa)
  • Edition: Non-Commercial
  • OS: macOS
  • OS Version: 27.0.1 (26A434)
  • CPU Architecture: M4

Bug Description:
On AArch64, "Patch → Always Branch" applied to a tbnz produces an invalid instruction instead of an unconditional branch. Regression of #6613 / #7280 (both closed) — still reproducible on current stable.

Steps To Reproduce:

  1. Open an arm64 Mach-O containing tbnz w8, #0, target (word 0x37000108)
  2. Right-click the tbnz → Patch → Always Branch

Expected Behavior:
b target = 14000008

Actual:
tbz w15, #0, target = 3600010f — condition inverted (tbnz→tbz) AND register changed (w8→w15), so the branch is still conditional and tests an unrelated register. Patch silently does nothing useful.

"Invert Branch" (→ tbz w8) and "Never Branch" (→ nop) work correctly on the same instruction; only Always Branch is broken.

Reproduced on a tiny Rust debug build (if input.trim() == "1"), instruction at offset 0x17fc. Happy to attach the binary if useful.

Screenshots/Video Recording:
Image

Binary:
ceramic spring optimizes quantitatively

Vorherrschende Sprache
C++
Sterne
1.3k
Forks
304
Ø Merge
2 T. 20 Std.
Gemergte PRs (30 T.)
10

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Vector35/binaryninja-api

Alle Issues in Vector35/binaryninja-api

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.