alephsecurity / xnu-qemu-arm64

Other
1.37k stars 123 forks source link

Random Segfaults #30

Open jeppojeps opened 3 years ago

jeppojeps commented 3 years ago

Hello,

I followed the guide, adapted everything for iOS 14, built the branches, the driver etc. When I run qemu in Linux the emulator crashes on memcpy in read_dtb_prop (deterministically - always) - on OSX BigSur on M1 either it never finishes or it gives me a segfault (w/o core) - any hint on that? The device tree I provide is generated like this python3 xnu-qemu-arm64-tools/bootstrap_scripts/asn1dtredecode.py kips/Firmware/all_flash/DeviceTree.n104ap.im4p dt104a, kernelcache is ios15 beta 5, I tried with 4 and 6 GB of memory.

Here is my command line

/xnu-qemu-arm64/aarch64-softmmu/qemu-system-aarch64 -machine iPhone11-n104,kernel-filename=kout12,dtb-filename=dt104ap,driver-filename=aleph_bev_drv.bin,qc-file-0-filename=hfs.main,qc-file-1-filename=hfs.sec,kern-cmd-args="debug=0x8 kextlog=0xfff cpus=1 rd=disk0 serial=2" -cpu max -m 6G -serial mon:stdio -vga std

Thanks

VisualEhrmanntraut commented 2 years ago

You have to decompress the device tree with lzfse