This is the tale of a long weekend spent uncovering a mysterious iOS 18 Neural Engine bug—a journey of problem-solving in a system where full visibility is elusive, especially in the locked-down world of Apple’s platforms. But the process I followed is a general approach you can use for any opaque system. It all began last week when I stumbled upon a strange behavior in my iOS app. The output generated from a CoreML model was completely broken—something I had never seen before. And after some digging, I realized this only happened when the model was running on the Neural Engine of iOS 18. The first step was triage. I implemented a quick workaround in the app: if the device is running iOS 18, switch from the Neural Engine to the GPU. This temporarily solved the issue, but I had no idea why it worked or whether other CoreML models in the app’s pipeline might also be affected. Without a deeper understanding of the root cause, I knew I cou
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>ShutdownReportTimeout</key> | |
| <integer>2</integer> | |
| <key>SIGTERMTimeout</key> | |
| <integer>5</integer> | |
| <key>CrashOnSIGTERMTimeout</key> | |
| <true/> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #import <CoreGraphics/CoreGraphics.h> | |
| #import <Foundation/Foundation.h> | |
| #import <objc/runtime.h> | |
| #import <objc/message.h> | |
| #import <dlfcn.h> | |
| __attribute__((constructor)) static void init(void) { | |
| Method bundleIdentifierMethod = class_getInstanceMethod(objc_getClass("NSBundle"), sel_registerName("bundleIdentifier")); | |
| IMP newImp = imp_implementationWithBlock(^(id self) { | 
resources to find what Apple/Asahi acronyms mean:
- check out this table
- search with site:asahilinux.org(maybe they talked about it in the blog)
- grep the linux and m1n1 repos
some other random acronyms, mostly peripherals of the SoC:
- AIC → Apple Interrupt Controller
- AP → Application Processor (where the OS runs)
- DART → Device Address Resolution Table (IOMMU)
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python3 | |
| ''' | |
| Decompresses a pbzx stream. | |
| Simplified/corrected version of <https://gist.github.com/Lekensteyn/6e0840e77bc9bd013f57> | |
| Example usage (from Python): | |
| decompress_pbzx(open('PayloadJava', 'rb'), open('PayloadJava.cpio', wb')) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /************************************************************************** | |
| add a grid to a graph in .dot format | |
| **************************************************************************/ | |
| BEGIN{ | |
| int i, Indx, bcnt, LR; | |
| string Type, Val, Gcolor[], Gstyle[], Gsize[], tmpstr; | |
| string Hcolor, Vcolor, Hstyle, Vstyle, gridType, gridAlign; | |
| float Hsize, Vsize, deltaX, deltaY, minX, minY, maxX, maxY; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python | |
| from elftools.elf.elffile import ELFFile | |
| from pathlib import Path | |
| import struct | |
| import subprocess | |
| # Steps | |
| # | |
| # 0) Read definitions with addresses | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| # Run the lsregister command and store the output in a variable | |
| output=$(/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump) | |
| # Use awk to parse the relevant sections | |
| echo "$output" | awk ' | |
| # When "CFBundleDisplayName" is found, store the app name | |
| /CFBundleDisplayName/ { | |
| app_name = substr($0, index($0, "=") + 2) | 
A Google Summer of Code 2024 Project with the AFLplusplus Organization
Mentor: @rmalmain
Project repository: https://github.com/AFLplusplus/LibAFL/
Note: This report is not intended to be purely technical documentation of the developed code. Instead, its goal is to describe my GSoC 2024 contributor experience, link to the developed code, summarize the current state of the project, and outline the challenges and lessons learned.
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env bash | |
| # | |
| # Build Frida DEB. | |
| # register the cleanup function to be called on the EXIT signal | |
| trap cleanup INT | |
| ####################################### | |
| # Deletes the temp directory. | |
| # Globals: |