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

Rosetta Emulation Error on ARM-based Mac (M3) when Running naabu v2.3.1 #1220

Open
oksuzkayra opened this issue Sep 27, 2024 · 2 comments
Open
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@oksuzkayra
Copy link

Naabu version:

v2.3.1 (amd64)

Current Behavior:

I am encountering an issue when trying to run naabu on an ARM-based Mac (Apple M3) using Docker. I receive the following error:

rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
Trace/breakpoint trap

This error occurs even though I am using the amd64 version of naabu within the Docker container. Other amd64 applications in the same Docker environment work as expected, using Rosetta 2 for emulation.

Expected Behavior:

Naabu should run normally without any errors on ARM-based Macs using Rosetta 2 emulation, just like other amd64 binaries.

Steps To Reproduce:

  1. Create a Dockerfile based on kalilinux/kali-last-release (amd64).
  2. Download and install naabu v2.3.1 (amd64) as part of the Dockerfile.
  3. Attempt to run the naabu binary inside the container on an ARM-based Mac (Apple M3).
  4. Observe the error:
rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
Trace/breakpoint trap

Anything else:

I have tried the following steps to address the issue:

  • Adding the required lib64 libraries.
  • Specifying the container to run with --platform linux/amd64.
  • Installing naabu's ARM64 version (which works), but I prefer using the amd64 version for compatibility.

It appears that naabu may be utilizing certain dynamic libraries or features that are not fully compatible with Rosetta 2. Any insights or suggestions for running naabu on ARM-based Macs using Rosetta would be appreciated.

Thank you!

@oksuzkayra oksuzkayra added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Sep 27, 2024
@mcamou
Copy link

mcamou commented Oct 15, 2024

@oksuzkayra to help with reproducing the bug, could you please attach / copy/paste your Dockerfile?

@mcamou
Copy link

mcamou commented Oct 15, 2024

Even though Rosetta is the one reporting the error, failed to open elf means that it's not finding the ld-linux-x86-64.so.2 shared library, so it's an issue with the Linux installation within the image. Are you adding --platform linux/amd64 to the docker build command too? Otherwise by default on MacOS the image will only be built for aarch64. AFAIK you need to specify --platform on both docker build and docker run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

2 participants