Skip to content

Commit 822989d

Browse files
committed
docs: add Apple Silicon / ARM64 troubleshooting for y-wing
The amd64-only y-wing image (santosomar/ywing:latest) crashes on ARM64 hosts under QEMU user-mode emulation with "lfstack.push invalid packing" because Go's runtime pointer-tagging assumes a memory layout that QEMU's x86-on-ARM emulation breaks. This is a QEMU/Go-runtime incompatibility, not a config bug in this repo. Document workarounds for users hitting this on Apple Silicon and other ARM64 hosts, ranked by effectiveness: - Docker Desktop with Rosetta 2 (most reliable on Apple Silicon) - Run on an x86_64 host (Vagrantfile / cloud VM) - tonistiigi/binfmt amd64 handler (helps most amd64 images, not y-wing) - Skip y-wing as a last resort Add a comment in docker-compose.yml above the y-wing service so operators see the warning and link to issue #82 before the crash. Refs #82 Made-with: Cursor
1 parent acdd665 commit 822989d

2 files changed

Lines changed: 57 additions & 0 deletions

File tree

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,58 @@ docker compose build --no-cache [container_name]
145145

146146

147147

148+
---
149+
150+
## Troubleshooting
151+
152+
### Apple Silicon (M1/M2/M3/M4) and other ARM64 hosts
153+
154+
Several containers in this lab (`webgoat`, `dvwa`, `galactic-archives`, `gravemind`, `y-wing`, `redis-rogue`) are published as `linux/amd64`-only images and run under emulation on ARM64 hosts. Most work fine, but some — notably **`y-wing`** — are Go binaries that crash under QEMU user-mode emulation with errors like:
155+
156+
```
157+
runtime: lfstack.push invalid packing
158+
fatal error: lfstack.push
159+
```
160+
161+
This is a known incompatibility between Go's runtime pointer packing and QEMU's x86-on-ARM emulation. It is not a configuration bug in this repo — see [issue #82](https://github.com/The-Art-of-Hacking/websploit/issues/82).
162+
163+
Pick whichever option fits your setup:
164+
165+
#### Option 1 (recommended for Apple Silicon): Use Docker Desktop with Rosetta 2
166+
167+
Run Docker Desktop directly on macOS (instead of Docker inside a Kali ARM VM) so amd64 emulation goes through Apple's Rosetta 2, which handles Go binaries reliably:
168+
169+
1. Docker Desktop → **Settings → General** → enable **"Use Virtualization framework"**
170+
2. Docker Desktop → **Settings → General** → enable **"Use Rosetta for x86_64/amd64 emulation on Apple Silicon"**
171+
3. Restart Docker Desktop, then `docker compose up -d`.
172+
173+
You can still run Kali in a separate VM for the offensive tooling and reach the labs over the network at the documented `10.6.6.x` addresses (or via host-port mappings).
174+
175+
#### Option 2: Run on an x86_64 host
176+
177+
Use the supplied `Vagrantfile` on an Intel/AMD machine, or deploy to any x86_64 cloud VM (AWS, GCP, Azure, DigitalOcean, etc.). No emulation involved, everything works as designed.
178+
179+
#### Option 3: Install QEMU binfmt handlers (helps most amd64 images, not y-wing)
180+
181+
Inside an ARM Linux host (e.g., Kali on UTM), register multi-arch handlers before bringing the stack up:
182+
183+
```bash
184+
sudo docker run --privileged --rm tonistiigi/binfmt --install amd64
185+
docker compose up -d
186+
```
187+
188+
This makes most amd64 containers run, but `y-wing` will still crash because of the Go-runtime issue described above.
189+
190+
#### Option 4: Skip y-wing
191+
192+
If you cannot use options 1–3, start everything except `y-wing`:
193+
194+
```bash
195+
docker compose up -d $(docker compose config --services | grep -v '^y-wing$')
196+
```
197+
198+
Or comment out the `y-wing` service block in `docker-compose.yml`. The rest of the labs are independent.
199+
148200
---
149201

150202
## Disclaimer

docker-compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ services:
5050
ipv4_address: 10.6.6.23
5151

5252
# Star Wars themed CTF challenge
53+
# Note: this image is amd64-only. On Apple Silicon / ARM64 hosts the Go runtime
54+
# inside this container can crash under QEMU emulation ("lfstack.push invalid
55+
# packing"). See the Troubleshooting section in README.md and issue #82
56+
# (https://github.com/The-Art-of-Hacking/websploit/issues/82) for workarounds
57+
# (Rosetta on Docker Desktop, an x86_64 host, or skipping this service).
5358
y-wing:
5459
container_name: y-wing
5560
image: santosomar/ywing:latest

0 commit comments

Comments
 (0)