Skip to content

Avoids type confusion in cpu12 for M680X#1417

Merged
aquynh merged 1 commit intocapstone-engine:nextfrom
catenacyber:cpu12typeconfusion
Mar 5, 2019
Merged

Avoids type confusion in cpu12 for M680X#1417
aquynh merged 1 commit intocapstone-engine:nextfrom
catenacyber:cpu12typeconfusion

Conversation

@catenacyber
Copy link
Copy Markdown
Contributor

Found by oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13487

Either the union is int32_t imm or it is m680x_op_ext ext
But it cannot be both at the same time

@aquynh
Copy link
Copy Markdown
Collaborator

aquynh commented Mar 4, 2019

@emoon please ack.

@emoon
Copy link
Copy Markdown
Contributor

emoon commented Mar 4, 2019

this is for M680X and not M68K so I don't know about this code.

@aquynh
Copy link
Copy Markdown
Collaborator

aquynh commented Mar 4, 2019

oops sorry, that was a bad typo ;-)

@aladur please ack.

@aladur
Copy link
Copy Markdown
Contributor

aladur commented Mar 4, 2019

Good finding! Looks good to me.
On a little ending test architecture this was not found because as being part of the union (uint16_t) ext.address and the lower two bytes of (int32_t)imm share the same memory location.

@aquynh aquynh merged commit 238b4b6 into capstone-engine:next Mar 5, 2019
@aquynh
Copy link
Copy Markdown
Collaborator

aquynh commented Mar 5, 2019

merged, thanks!

aquynh pushed a commit that referenced this pull request Mar 5, 2019
aquynh pushed a commit that referenced this pull request Mar 5, 2019
@riptl riptl mentioned this pull request Jul 22, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants