Skip to content

Inconsistent lifting of aarch64 str/stp/strb to high-level IR #8368

Description

@jvoisin

Version and Platform (required):

  • Binary Ninja Version: 5.4.10202-dev Personal, 1b846134
  • OS: fedora-asahi-remix
  • OS Version: 44
  • CPU Architecture: arm64

Bug Description:

Binary Ninja is using array[N] = X and *(array + N) = X seemingly at random when lifting str/stp/strb aarch64 instructions to high-level IR. This behaviour is even more puzzling when looking at the medium-level IR, as there doesn't seem to be any inconsistencies there.

Steps To Reproduce:

  1. Open a binary containing a function using str/stp/strb instructions to move characters into an array
  2. Notice that Binary Ninja is using array[N] = X and *(array + N) = X seemingly at random, instead of picking one.

Expected Behavior:

Binary Ninja should pick either array[N] = X or *(array + N) = X (with a personal preference for the former) and stick to it.

Screenshots:

High-level IR vs. Dissasembly

Image

High-level IR vs. Medium-level IR

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions