radareorg / radare2

UNIX-like reverse engineering framework and command-line toolset
https://www.radare.org/
GNU Lesser General Public License v3.0
20.31k stars 2.97k forks source link

Instructions with relocated addresses are replaced with stmdaeq #22822

Open hikir1 opened 5 months ago

hikir1 commented 5 months ago

Environment

Thu 11 Apr 2024 10:18:56 AM EDT radare2 5.8.8 1 @ linux-x86-64 birth: git.5.8.8 2023-06-08__14:00:41 commit: ea7f0356519884715cf1d5fba16042bac72b2df5 options: gpl -O1 cs:5 cl:0 make Linux x86_64

Description

Running r2 with -e bin.cache=true on a 32 bit ARM kernel module replaces instructions referencing relocated addresses with stmdaeq

r2-bug

Test

run r2 -e bin.cache=true on the following kernel module, after unzipping:

media_clock.ko.zip

trufae commented 4 months ago

looks like R_ARM_CALL relocs that point outside the GOT table are not working well. working on that in this pr https://github.com/radareorg/radare2/pull/22877