You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading a qcow with a backing file, the backing file can take precedent when blocks exist in the layer above.
Setup:
Created a backing qcow with data formatted as MBR + ntfs, then a delta disk on top of it with a new file in the NTFS partition. When opening the delta file and setting the backing file, the new files created in the delta disk are not seen.
In this case we read the entire qcow into memory (4MB). Attaching the example files, the qcow map looks like:
When we reach offset 0x20000, we pass the rest of read to be read from the parent file rather than breaking back out and calling libqcow_internal_file_get_cluster_block_offset on the immediate offset after the backing block.
This causes an issue where if we create files at the root of the drive in the delta disk, the MFT is actually read from the base disk. Only the blocks which are new in the delta disk get read.
You can test this by trying to read the entire QCOW into memory and then comparing a byte read to a small read at
When reading a qcow with a backing file, the backing file can take precedent when blocks exist in the layer above.
Setup:
Created a backing qcow with data formatted as MBR + ntfs, then a delta disk on top of it with a new file in the NTFS partition. When opening the delta file and setting the backing file, the new files created in the delta disk are not seen.
In this case we read the entire qcow into memory (4MB). Attaching the example files, the qcow map looks like:
The problematic line(s) are here:
https://github.com/libyal/libqcow/blob/main/libqcow/libqcow_file.c#L2693
When we reach offset 0x20000, we pass the rest of read to be read from the parent file rather than breaking back out and calling
libqcow_internal_file_get_cluster_block_offset
on the immediate offset after the backing block.This causes an issue where if we create files at the root of the drive in the delta disk, the MFT is actually read from the base disk. Only the blocks which are new in the delta disk get read.
You can test this by trying to read the entire QCOW into memory and then comparing a byte read to a small read at
ntfs_test.zip
The text was updated successfully, but these errors were encountered: