keystone icon indicating copy to clipboard operation
keystone copied to clipboard

Error in assembly of thumb2 instructions(adr/adr.w)

Open ele7enxxh opened this issue 5 years ago • 1 comments

Hi all,

kstool:

kstool thumb "start:; adr r3, start; b #0x129f8;" 0x32f048  --> wrong
start:; adr r3, start; b #0x129f8; = [ af f2 04 03 e3 f4 d5 bc ] 

kstool thumb "start:; adr.w r3, start; b #0x129f8;" 0x32f048  --> right
start:; adr.w r3, start; b #0x129f8; = [ af f2 04 03 e3 f4 d4 bc ]

cstool:

cstool thumb "af f2 04 03 e3 f4 d5 bc" 0x32f048
32f048  af f2 04 03  subw       r3, pc, #4
32f04c  e3 f4 d5 bc  b.w        #0x129fa ---> wrong

cstool thumb "af f2 04 03 e3 f4 d4 bc" 0x32f048
32f048  af f2 04 03  subw       r3, pc, #4
32f04c  e3 f4 d4 bc  b.w        #0x129f8 ----> right

ele7enxxh avatar Nov 11 '20 06:11 ele7enxxh

http://aosp.opersys.com/xref/android-10.0.0_r3/xref/cts/hostsidetests/securitybulletin/securityPatch/CVE-2018-9424/poc.cpp

google-mirror avatar Nov 13 '20 07:11 google-mirror