Skip to content

Commit 225f77d

Browse files
committed
librasan: Use bx instruction for ARM patch
1 parent 9771891 commit 225f77d

File tree

1 file changed

+2
-2
lines changed
  • libafl_qemu/librasan/asan/src/patch

1 file changed

+2
-2
lines changed

libafl_qemu/librasan/asan/src/patch/raw.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ impl RawPatch {
7171
#[cfg(target_arch = "arm")]
7272
fn get_patch(destination: GuestAddr) -> Result<Vec<u8>, RawPatchError> {
7373
// ldr ip, [pc]
74-
// mov pc, ip
74+
// bx ip
7575
// .long 0xdeadface
7676
let insns = [
7777
[0x00, 0xc0, 0x9f, 0xe5].to_vec(),
78-
[0x0c, 0xf0, 0xa0, 0xe1].to_vec(),
78+
[0x1c, 0xff, 0x2f, 0xe1].to_vec(),
7979
[0xce, 0xfa, 0xad, 0xde].to_vec(),
8080
];
8181
let addr = destination.to_ne_bytes().to_vec();

0 commit comments

Comments
 (0)