Under certain conditions, macOS may copy data into the void, leading to data loss of important files, all due to a bug in how the operating system handles APFS sparse disk images.

The issue was discovered and reported to Apple this past week by Mike Bombich, the creator of a Mac backup application named Carbon Copy Cloner.

Bug affects only APFS sparse disk image files

Bombich says the bug affects only “sparse disk images” formatted in Apple’s new filesystem format APFS, first deployed macOS High Sierra in March 2017.

A “disk image” is a file format that contains the entire contents and structure of a disk volume, such as USB, CD, DVD, hard disk drive, or network share.

Many Mac applications utilize disk images, especially backup software, allowing users to create copies of other volumes and quickly move files in and out of an older backup image at a later date.

A “sparse” disk image is a type of disk image file that can grow as the user adds more data to it. But sparse image disks can only go as far as the underlying storage medium permits, and they will show a free space available value, depending on the free space that remains on the underlying hard drive.

Users at risk of losing sensitive data

The issue is that APFS sparse disk images fail to synchronize the value of the “free disk space” from the sparse disk image with the real “free disk space” value from the underlying hard drive.

This leads to catastrophic scenarios where users might think they have free space on APFS sparse disk images —but they do not— and end up writing data into a void, once the underlying storage disk is full and data…