New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ext2/3/4, NTFS: issues with allocated orphan files #2813
Comments
Let me provide additional information. The first issue described above is about documentation. Currently, the documentation insists that files having the "(realloc)" mark are reallocated (file data doesn't correspond to a file name), while another (and not so rare) option exists (file data corresponds to a file name). I think that both options are worth mentioning (especially because examiners don't trust or simply ignore the "file name - file data" connection when they see the "(realloc)" mark). The second issue is about code. Currently, allocated inodes having no associated file names aren't listed as orphan files. In fact, when all deleted file names of such an allocated inode are overwritten, there is no way to reach that inode using the fls tool. Its associated data is marked as allocated, but this inode is absent in the directory tree. One can see the file data using the blkls -a command, but not using the fls and icat tools together. I have attached a sample image (gzipped). The orphan inode number is 13. |
The second issue also affects the NTFS parser. Such an orphan inode isn't listed anywhere by the fls tool (not in the actual directory tree, not in the virtual directory for orphan files):
(Also, there is no corresponding index entry, the allocated file is "fully" unlinked by the driver.) |
Hello.
According to the documentation (#1, #2):
In the Ext2/3/4 file systems, the fls tool (its version is 4.12.0) always reports orphan files (files that were deleted while opened in another program) as reallocated.
For example:
As you can see, the "1.txt" file is always marked as reallocated, while it's not (the inode metadata and the file data correspond to the deleted file name entry).
The existing documentation pages could be updated to reflect such a scenario (it's not uncommon in the Linux world).
Additionally, according to the documentation (#3):
The existing code doesn't list such orphan files in the "$OrphanFiles" virtual directory.
For example:
(Two other images produce the same behavior.)
The existing code could be updated to list allocated inodes without file names (when the link count is zero), which are also on the orphan inode list, in the "$OrphanFiles" virtual directory.
From the file system's point of view, such files are deleted.
The text was updated successfully, but these errors were encountered: