APFS Bug in macOS High Sierra Can Cause Data Loss When Writing to Disk Images

Apple's APFS file system included in macOS High Sierra suffers from a disk image vulnerability that in certain circumstances can lead to data loss, according to the creator of Carbon Copy Cloner.

In a blog post last Thursday, software developer Mike Bombich explained that he had uncovered the data writing flaw in the Apple File System, or APFS, through his regular work with "sparse" disk images.


For those who aren't familiar with the term, a sparse disk image is basically a file that macOS mounts on the desktop and treats as if it was a physically attached drive with a classic disk volume structure. The flexibility of sparse disk images means they are commonly used in the course of performing backup and disk cloning operations, hence Bombich's extensive experience with them.

Earlier this week I noticed that an APFS-formatted sparsebundle disk image volume showed ample free space, despite that the underlying disk was completely full. Curious, I copied a video file to the disk image volume to see what would happen. The whole file copied without error! I opened the file, verified that the video played back start to finish, checksummed the file – as far as I could tell, the file was intact and whole on the disk image. When I unmounted and remounted the disk image, however, the video was corrupted. If you've ever lost data, you know the kick-in-the-gut feeling that would have ensued. Thankfully, I was just running some tests and the file that disappeared was just test data.

Two related problems are identified by Bombich, above. The first is that the free space on the APFS-formatted sparse disk image doesn't update as it should when the free space on the underlying physical host disk is reduced. The second problem is the lack of error reports when write requests fail to dynamically grow the disk image, resulting in data being "written" into a void. Bombich tracks both bugs back to macOS's background "diskimages-helper" application service, which he has since reported to Apple.

Bombich's video demonstrating the APFS bug

Every installation of High Sierra on Macs with all-flash storage converts the existing file system to APFS, which is optimized for modern storage systems like solid-state drives. However, as Bombich notes, ordinary APFS volumes like SSD startup disks are not affected by the problem described above, so the vast majority of users won't be affected by it – the flaw is most applicable when making backups to network volumes. Bombich says Carbon Copy Cloner will not support AFPS-formatted sparse disk images until Apple resolves the issue.

The APFS flaw follows the discovery of another bug in Apple's operating systems that received extensive coverage last week. That bug is induced by sending a specific character in the Indian language Telugu, which causes certain apps on iPhones, iPads, and Macs to freeze up and become unresponsive. The Telugu character bug has already been fixed in Apple's upcoming iOS 11.3 and macOS 10.13.4 software updates.

Tag: APFS

Top Rated Comments

(View all)
Avatar
34 months ago
Glad I reverted to Sierra when I deemed High Sierra a S-show after a couple of weeks. There seems to be no end to Apple's incompetence with this OS.
Score: 49 Votes (Like | Disagree)
Avatar
34 months ago
Another day, another bug. How very Apple-esque. #ifstevejobswasalive #firetimcook
Score: 26 Votes (Like | Disagree)
Avatar
34 months ago
Ah this isn't important. Who cares about data.

People want..........new emoji! ;)
Score: 24 Votes (Like | Disagree)
Avatar
34 months ago
quote: The bug has already been fixed in Apple's upcoming iOS 11.3 and macOS 10.13.4 software updates.
Score: 22 Votes (Like | Disagree)
Avatar
34 months ago
High Sierra has been a complete disaster for me. My computer locks up for 5-10 seconds every few hours. Probably some memory leaks or something. Either way this is really pathetic, even windows works better than this.
Score: 18 Votes (Like | Disagree)
Avatar
34 months ago

“Bombich”... you can’t make this stuff up.

Making fun of surnames. Feels like primary school already.
Score: 16 Votes (Like | Disagree)

Top Stories

Leaker: 'iPhone 12 mini' and iPhone 12 Storage Capacities Start at 64GB, Pro Models at 128GB

Tuesday September 29, 2020 2:31 am PDT by
Rumors suggest Apple's iPhone 12 launch event will be held on October 13, with the more affordable 5.4 and 6.1-inch devices set to ship out ahead of the more expensive 6.1-inch and 6.7-inch Pro devices, and this morning hit-and-miss leaker Jon Prosser has further committed to that date by providing alleged details on Apple's first shipment of finalized iPhone 12 units. Prosser claims the...

Hands-On With iOS 14.2's New Shazam Music Recognition Toggle in Control Center

Monday September 28, 2020 2:35 pm PDT by
Shortly after launching iOS 14, Apple introduced an upcoming iOS 14.2 update, which is now available to developers and public beta testers ahead of a public release that could come at some point in October. Subscribe to the MacRumors YouTube channel for more videos. The iOS 14.2 update mainly focuses on the Control Center, introducing a new Music Recognition toggle that deepens the Shazam...

Top Stories: iOS 14 Feature Tour, 'iPhone 12 mini' Rumors, Apple Watch Band Controversy

Saturday September 26, 2020 6:00 am PDT by
Things started to calm down a bit this week following last week's rush of media event, Apple Watch and iPad launches, and the release of iOS 14 and other operating updates. But that doesn't mean there wasn't still a lot of news, from digging deeper into iOS 14 to more iPhone 12 rumors to the uproar over trying to exchange band sizes on the new Apple Watch. On top of all of that, we heard...

DigiTimes: 12.9-inch Mini-LED iPad Pro Arriving Early 2021, Mini-LED MacBook Coming Later

Tuesday September 29, 2020 4:18 am PDT by
Apple will launch a 12.9-inch mini LED-backlit iPad Pro in early 2021 and a mini LED-backlit MacBook in the second-half of next year, according to DigiTimes. The Taiwan-based industry publication claims Epistar will supply the over-10,000 mini LEDs used in each iPad Pro tablet. Meanwhile, Apple is expected to recruit Osram Opto as another supplier of mini LEDs for use in a new "high-end"...

iPhone 12 May Launch Earlier Than Usual in South Korea

Monday September 28, 2020 5:24 am PDT by
The upcoming iPhone 12 lineup may launch earlier than usual in South Korea, reports The Korea Herald. South Korean telecoms firms speaking to The Korea Herald have said that the iPhone 12 lineup will launch ahead of its usual schedule. Normally, the release of new iPhones in South Korea comes about one month after launch in the United States. Last year, the iPhone 11 arrived in South Korea ...

iOS 14: 'Phoenix 2' Space Shooter Delivers Playable Demo via App Clips

Saturday September 26, 2020 2:08 pm PDT by
One of the new features that arrived in iOS 14 is called App Clips. App Clips is described by Apple to be a "small part of your app" that can be available to users at just the right moment.App Clips focus on finishing one task quickly. An ideal App Clip experience allows users to open and complete a task in seconds. Instead of requiring an App Store download, they can be loaded and run via...

Epic Games Unlikely to Win Injunction in Ongoing Fortnite Battle With Apple, Jury Trial Possible

Monday September 28, 2020 1:14 pm PDT by
The ongoing legal dispute between Apple and Epic Games continued on today, with a preliminary injunction hearing taking place this morning. We're still waiting to hear the judge's official ruling, but it looks like Epic is not going to be granted an injunction to allow Fortnite back into the App Store as the case unfolds. Many of the arguments that lawyers for Apple and Epic Games made were...

iPhone 12 Production Lines at Foxconn's Zhengzhou Factory in China Running '24 Hours a Day'

Tuesday September 29, 2020 3:38 am PDT by
Apple contract manufacturer Foxconn is running its massive Zhengzhou factory in China 24 hours a day to produce the new iPhone 12, according to Chinese media reports. Apple's main iPhone manufacturer in China is said to be cancelling workers' holidays and introducing mandatory overtime with additional bonuses for longer-serving staff, according to information garnered from employees,...

'iPhone 12 mini' Name Reappears in Leaked Apple iPhone 12 Case Stickers

Friday September 25, 2020 1:58 am PDT by
Earlier this week a proven leaker claimed that the iPhone 12 lineup would be named "iPhone 12 mini," "iPhone 12," "iPhone 12 Pro," and "iPhone 12 Pro Max," and today the same nomenclature has appeared again in a photo depicting alleged stickers from unreleased Silicone iPhone cases originating from Apple's international distribution center in Ireland. The photo shows three stickers with the...

Apple Releases iOS 14.0.1 With Fix for Bug That Resets Default Apps After Rebooting

Thursday September 24, 2020 10:12 am PDT by
Apple today released iOS 14.0.1, the first update to the iOS 14 operating system that was released on September 16. Today's update is a bug fix update addressing issues that weren't able to be fixed in the initial iOS 14 launch. The iOS 14.0.1 update is available on all eligible devices over-the-air in the Settings app. To access the new software, go to Settings > General > Software Update. ...