DynamoRIO / DynamoRIO/dynamorio

Missing load/store categories for some AARCH64 instructions

Open
#7,146 0 comments 0 reactions 0 assignees View on GitHub
Bug-ToolFail Component-IR help wanted
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

Some AARCH64 instructions that perform read/write operations are missing their corresponding load/store categories (DR_INSTR_CATEGORY_LOAD, DR_INSTR_CATEGORY_STORE).
For example:
```
13127323 10416044: 7446 ifetch 4 byte(s) @ 0x0000aaaaefe73500 88eb7dac casa %w11 %w12 (%x13)[4byte] -> %w11 (%x13)[4byte]
13127324 10416044: 7446 read 4 byte(s) @ 0x0000115cffc33ba0 by PC 0x0000aaaaefe73500
13127325 10416044: 7446 write 4 byte(s) @ 0x0000115cffc33ba0 by PC 0x0000aaaaefe73500
```
Performs a read and write operation, hence it should have both load and store categories.

However, hacking the view_tool to print the categories for this instructions reveals that only the load category (printed right before the `casa` opcode) is set:
```
13127323 10416044: 7446 ifetch 4 byte(s) @ 0x0000aaaaefe73500 88eb7dac load casa %w11 %w12 (%x13)[4byte] -> %w11 (%x13)[4byte]
13127324 10416044: 7446 read 4 byte(s) @ 0x0000115cffc33ba0 by PC 0x0000aaaaefe73500
13127325 10416044: 7446 write 4 byte(s) @ 0x0000115cffc33ba0 by PC 0x0000aaaaefe73500
```

This is likely a bug in `decode_load_store_category()` in `core/ir/aarch64/codec.c`.

We have not observed this issue in x86 instructions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.