Skip to content

ARM Thumb2 TBB Instruction Incorrect Implemenation #5555

Open
@Martyx00

Description

@Martyx00

Version and Platform (required):

  • Binary Ninja Version: 4.1.5470-dev
  • OS: Ubuntu Linux
  • OS Version: 24.04
  • CPU Architecture: x64

Bug Description:
Binary Ninja fails to recognize Jump Table with ARM Thumb2 TBB instruction. There are potentially two issues:

  1. It appears that current handling of TBB instruction is assuming a half word (2-byte) jump table which is incorrect as the table should be single byte only. Half-word size is correct for TBH instruction not for TBB though.
  2. Current implementation fails to recognize the Jump table as it continues with the disassembly where the jump table should be. I would assume that the implementation fails to add label after the TBB.

Steps To Reproduce:
Please provide all steps required to reproduce the behavior:
Unfortunately the screenshot I have shared is the most I can provide (cannot share the library). I am happy to test any updates though so let me know. (Or we can have a screen sharing session in private)

Expected Behavior:
TBB instruction should be followed by label to stop the disassembly and allow detecting of the jump table which must be one byte aligned.

Screenshots/Video Recording:
image

Binary:
If applicable, please provide us with the binary to help us work with the issue faster. Here are a few options:
Not possible unless we have official NDA, sorry.

Additional Information:
Please add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

Arch: ARM/ThumbIssues with the ARM/Thumb architecture pluginEffort: LowIssue should take < 1 weekImpact: LowIssue is a papercut or has a good, supported workaroundLiftingissues related to LLIL lifting

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions