Inside The iOS Bug That Made Deleted Photos Reappear
A data migration handler in iOS 17.5 reset a flag that tracks whether the photo library had already imported files from the filesystem, causing previously deleted photos to reappear after the update. The bug was fixed in iOS 17.5.1 by removing the registration of that migration action.
synacktiv.com
Published on synacktiv.com
Rédigé par Quentin Salingue - 23/05/2024 - dans Reverse-engineering - Téléchargement
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a migration action that reset the filesystem import token flag was registered for devices upgrading to iOS 17.5, causing the photo library to re-import filesystem assets including previously deleted photos.
Impact
Users who upgraded to iOS 17.5 could see photos they had previously deleted reappear on their device.
What the attacker needed
Device running iOS 17.5; previously deleted photos on device
The fix
The fix was to stop registering the migration action that reset the filesystem import token, which Apple shipped in iOS 17.5.1.
How it was found
- Download the iOS 17.5 and 17.5.1 updates and extract the DYLD shared cache
- Compare the shared caches to find which libraries changed
- Diff the PhotoLibraryServices binary with BinDiff to locate the changed function
- Identify that the registration of the ResetFilesystemImportToken migration action was removed
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When you update a phone, small programs called migration handlers convert your old data into the new format. One of these handlers mistakenly cleared a marker that says 'the photo library has already been imported', so the phone imported photos again and old deleted ones showed up. Apple removed that handler in the next update.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.