Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for running OFRAK on arm64 Linux #562

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

alchzh
Copy link
Collaborator

@alchzh alchzh commented Jan 7, 2025

Authored by @Jepson2k

One sentence summary of this PR (This should go in the CHANGELOG!)
Added support for running OFRAK on arm64 Linux

Link to Related Issue(s)
#549

Please describe the changes in your request.

  • Bumped version of lief to 0.16.1 for arm binaries
  • Bumped version of angr to 9.2.133 for arm binaries
  • Bumped version of capstone to 5.0.3 for arm binaries
  • Bumped version of orjson to 3.10.12 for arm binaries
  • Added amd64 multilib packages to Dockerstubs when building an arm image
  • Added arm64 host toolchains
  • Added support for glob patterns in toolchain.conf to account for naming differences between platforms

Anyone you think should look at this, specifically?
@rbs-jacob

@alchzh alchzh added this to the 3.3.0 Release milestone Jan 7, 2025
@alchzh alchzh requested a review from rbs-jacob January 7, 2025 20:21
@alchzh
Copy link
Collaborator Author

alchzh commented Jan 7, 2025

test currently failing because the bumped angr version requires python >=3.10. I guess we can set a complex requirement for it

@rbs-jacob
Copy link
Member

test currently failing because the bumped angr version requires python >=3.10. I guess we can set a complex requirement for it

Is the bumped angr version the minimum version that will work?

ofrak_core/Makefile Outdated Show resolved Hide resolved
Comment on lines 54 to 63
raw_value = config.get(section, key)

if "*" in raw_value:
matches = glob.glob(raw_value)
if matches:
return matches[0]
else:
raise NotFoundError(f"No file matches wildcard {raw_value}")
else:
return raw_value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel very positively about this change to use globbing. I personally feel that it makes the config file harder to read and understand. It also seems kind of error-prone for anyone not running OFRAK inside of Docker, who may have their own toolchains installed on their system.

@Jepson2k @alchzh what alternatives were considered here instead of globbing?

@alchzh
Copy link
Collaborator Author

alchzh commented Jan 17, 2025

Changed it so that toolchain.conf can be read from the /etc/ofrak/toolchain.conf, and the Dockerstub copies over the correct file based on the platform architecture

Left the current toolchain.conf in place to avoid breaking anyone's setup if they install a newer version. I want to update it to one without absolute paths in the future though so users can use executables that exist on their local PATH

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.

Add multiarch binaries and aarch64 variants of toolchains for full ARM support
3 participants