Monday, May 20, 2024

iOS 17.5 Resurfacing Deleted Photos

Juli Clover:

A Reddit user wiped an iPad following Apple’s guidelines in September of 2023 before selling it off to a friend. That friend updated the iPad to iPadOS 17.5 this week, and began seeing the Reddit user’s old photos reappearing in the Photos app.

That would be very concerning because it would imply that Apple is retaining deleted photos in the cloud. However, this particular Reddit post has since been deleted, and I haven’t seen any others making this claim.

I do continue to see reports that deleted, non-cloud photos are resurrected after installing iOS 17.5. That is also a serious bug, which I hope Apple will communicate about. It’s apparently fixed today in iOS 17.5.1, but Apple has not posted release notes of that yet.

Previously:

Update (2024-05-20): Juli Clover:

Images deleted as far back as 2010 were surfacing again, leading to confusion and worry over what was going on. Apple’s information today indicates that it was a database corruption issue, and iOS 17.5.1 should solve the problem.

Some details are still missing here. Presumably, the database was corrupted at the time of deletion, which is why the photos were left on disk. iOS 17.5 wasn’t the cause of the problem; it just revealed the failure that happened long ago. This implies that people who don’t (or can’t) update to iOS 17.5/17.5.1 may still be subject to the problem. It’s also not clear what the fix is. How does 17.5.1 detect which photos were meant to be deleted? If the database is corrupted, how does it do that without potentially losing photos that are meant to be there?

Is it confirmed that there is no cloud angle to this bug and that it doesn’t affect wiped devices?

Update (2024-05-21): _tysen:

I may or may not know somebody who is a Private Contractor @ Apple, and they may have or may not have given me an explanation on the current situation.

[…]

Now how are the deleted photos “reappearing” after being deleted? This is because almost every case of this incident happening which Apple has investigated has been caused by the photo(s) being deleted from the “Photos” app but NOT the “Files” app. They are two separate apps with two copies of the photos.

[…]

But due to a rare bug within iOS 17.5 the system attempts to re-save all photos/media/files from the “Files” app into the “Photos” app, this happens during the re-indexing process which happens when you update your iPhone. Since the “Photos” app can’t display files but it can display media/photos, it appears as your “deleted” photos have reappeared ALTHOUGH they have been on your iPhone the whole time in the “Files” app.

This doesn’t seem to be the full explanation because some people have reported the problem in relation to photos that are not in the Files app and indeed which predate the app’s existence.

Nick Heer:

I suppose even a “rare” bug would, at Apple’s scale, impact lots of people. I heard from multiple readers who said they, too, saw presumed deleted photos reappear.

The thing about these bare release notes — which are not yet on Apple’s support site — is how they do not really answer reasonable questions about what happened.

Apple did eventually publish the release notes, but they don’t answer the questions people have.

Adam Engst:

I don’t know if there’s an easy way to tell if you’re affected—I certainly couldn’t tell you if a few deleted photos reappeared in my library.

[…]

While the exact cause remains unknown, reports suggest Apple may have been attempting to fix a problem that caused photos to be lost if the iPhone crashed during upload and corrupted the database underneath the Photos library.

[…]

Is there any connection to iCloud Photos here? Some people who have experienced the bug do not use iCloud Photos, so it’s not required. However, it would be more troubling if deleted images were retained online instead of just locally.

What happens to the corrupted images after updating to iOS 17.5.1 and iPadOS 17.5.1? Are they kept or deleted?

Victoria Song:

It raises valid questions as to how Apple stores photo data and whether iPhone owners can truly trust that their deleted data is actually deleted. The Verge has reached out to Apple multiple times to comment publicly on the matter but has yet to receive a response. Doing so would at least shed light on why this bug happened, what’s been done to fix it, and what it’s doing to ensure that this won’t happen again.

[…]

If anything, Apple ought to comment simply because it markets itself as a company that cares about your privacy. It’s spent countless WWDC keynotes talking about software updates to keep your data encrypted so that not even Apple knows what’s going on on your phone. That you can trust its services because privacy is a fundamental, core tenet of its philosophy. Responsible disclosure and transparency are the hallmarks of a company that truly believes in protecting your privacy. Brushing things under the rug? Not so much.

See also: Lauren Goode (Hacker News).

Update (2024-05-22): The bug also affected tvOS. Since it’s now “fixed” everywhere, I suppose this is all we’re going to hear from Apple, but something about this story still doesn’t sit right with me.

Update (2024-05-24): Bill Toulas:

Analysts at Synactiv reverse-engineered the iOS 17.5.1 update that addressed the problem, examining the IPSW files and comparing the DYLD shared caches of the two versions to find changes.

[…]

Apple removed a routine in the function responsible for scanning and re-importing photos from the filesystem, which caused it to reindex old files on the local file system and add them back to people’s galleries.

[…]

“The reason why those files were there in the first place is unknown.”

Quentin Salingue (Saagar Jha):

The 17.5.1 update removed the scanning of the filesystem that was added in 17.5 to prevent deleted photos stored outside of the photo library to re-appear. According to our analysis, no code was added to purge the imported photos from the library as well as the “deleted” pictures lying on the filesystem.

John Gordon:

Am I wrong that Apple had a recovery fix for Photos.app images lost due to sync bugs but then rolled it back so now there is no fix?

Yes, either way it sounds like there will be orphaned photos left on the disk. Either they are images that should have been recovered or ones that should have been deleted, in some cases more than a decade go. The 17.5.1 update doesn’t fix this; it just returns us to the status quo ante.

Chance Miller (MacRumors):

One question many people had is how images from dates as far back as 2010 resurfaced because of this problem. After all, most people aren’t still using the same devices now as they were in 2010. Apple confirmed to me that iCloud Photos is not to be blamed for this. Instead, it all boils to the corrupt database entry that existed on the device’s file system itself.

According to Apple, the photos that did not fully delete from a user’s device were not synced to iCloud Photos. Those files were only on the device itself. However, the files could have persisted from one device to another when restoring from a backup, performing a device-to-device transfer, or when restoring from an iCloud Backup but not using iCloud Photos.

[…]

The company says that after a device has been completely erased using the steps below, all files and content are permanently deleted.

[…]

iOS 17.5.1 doesn’t automatically re-delete photos that reappeared after updating to iOS 17.5. If you were affected by this problem, you’ll need to go to the Photos app and manually delete those images.

I still think it’s unclear how tvOS was affected. How did the photos get on the Apple TV if not via iCloud Photos?

Dan Moren:

While it’s good that Apple has now (after several days of requests) clarified the issue, this does speak to a larger point: why is the company not more proactive in talking about these issues when they come up?

Stephen Hackett:

Now the company should address the recent issue with folks having their Apple IDs locked.

Previously:

Update (2024-05-28): Ezekiel Elin:

It’s possible that the database repair process was also present on tvOS and they removed it out of caution.

This whole thing seems relatively simple and I haven’t seen any concrete evidence it’s more complex than:

  • Database/file management bug in the past (maybe ongoing)
  • Repair process (probably implemented alongside fix to original bug) bringing back undeleted photos

8 Comments RSS · Twitter · Mastodon

I don’t think there is a cloud angle, and the restore to a wiped device claim hasn’t been corroborated by multiple people yet so it is unlikely, but if true would be a huge deal. I’ve commented in https://mjtsai.com/blog/2024/05/13/ios-17-5-and-ipados-17-5/ with my observations.

Apple should be more transparent about what happened, as well as what 17.5.1 does. Does it actually erase the orphaned files, or does it just not attempt to restore them but leaves them in place? If you let the files restore and then didn’t delete them over the past few days does it delete them after installing 17.5.1?

@Eric Yes, that is a great point that they should tell what happens to photos that were restored by 17.5.

Right, is this solving anything for people who installed 17.5 and already had the issue, or just preventing it from happening for those people who hadn't gotten around to installing 17.5 yet?

If you ask me, the root of all of this drama was that there was a bug introduced sometime between iOS 17 and 17.4, which didn't update the phone's database (or corrupted it) when you took new photos.

This is what I experienced...
https://www.reddit.com/r/ios/comments/1cr4hx2/comment/l3yigmz/

The thing with this bug was that if I connected the phone to a windows PC with a USB cable (or to a mac using iFunBox) and accessed the DCIM folders, the photos were there.

In my opinion, 17.5 tried to remedy this by going through the filesystem and added the missing photos to the database, but in doing so was too aggressive and added photos that weren't really supposed to be added.

Just my 2 cents.

Maybe it’s time for Apple to relaunch its ridiculous Las Vegas banner.

« What happens on your iPhone stays on your iPhone * »

• forever, even if you deleted it.

Tudorminator

@Eric: I already deleted the restored files and they were in the Recently Deleted album. I just installed 17.5.1 and it left them there.

@TudorminatorMay I was more wondering what would happen if someone just left them in their library—would 17.5.1 delete them them by moving them to recently deleted at that point thus honoring the delete request from a year ago or whenever it happened?

There are many ways to save to the photo library. With Camera app, with a 3rd party camera app, taking a screenshot, importing from Files app, saving from another app such as Safari, Twitter, etc. It seems we have examples of all of these methods being used to save photos, so maybe the method the photos were saved is not an indicator that they could be affected, but simply if photos app crashes at an inopportune time (probably mid delete or mid import).

I do think it could go back years although lots of comments are about photos from 2022 and 23. My one stuck "on my Mac" photo was from 2014. I guess it's removal should be considered when I started using iCloud Photo Library but I don't recall when that was.

Mark Charnell

Another bit of weirdness to add here. When I looked into this yesterday on my phone I discovered, in the Recents album (and in the Duplicates album), multiple copies of previously deleted (?) photos - 22 in one case - all with exactly the same metadata. I looked in the Library view and there weren’t mulutiple copies there. These were all RAW photos taken with Halide (by Lux Optics) which I would have edited in RAW Power (by Gentelman Coders) or in it’s Photos extension. It looks like there was a copy saved in the database for each edit. Come to think of it, I’m fairly certain that I didn’t even delete any of those photos. I just edited them multiple times. I’m also certain that those multiple copies were not present prior to iOS 17.5.

Leave a Comment