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
I think this is the right repository for this issue. I was having an issue in DFVFS where volume shadows are not being opened for some logical volumes and think I have narrowed it down to this library. Here is the exact pysmdev error as shown in the following example (Python 2.7 and 3.6 both produce it):
pyvshadow_volume_open_file_object: unable to open volume. pyvshadow_file_object_read_buffer: unable to read from file object with error: 'pysmdev_handle_read_buffer: unable to read data. libsmdev_handle_read_buffer: offset exceeds media size.'.
pyvshadow_file_object_io_handle_read: unable to read from file object.
libbfio_handle_read_buffer: unable to read from handle.
libvshadow_io_handle_read_ntfs_volume_header: unable to read NTFS backup volume header data.
libvshadow_volume_open_read: unable to read NTFS volume header.
libvshadow_volume_open_file_io_handle: unable to read from file IO handle.
with libsmdev_handle_read_buffer: offset exceeds media size. being the issue.
This is the same error I am seeing when trying the open the VShadow object in dfvfs.
I understand this will be difficult to reproduce because it is specific to my logical volume and I have not found a test image where the resulting error is reproduced. Maybe you can formulate a hypothesis by seeing what I did, and what the output was?
Whats weird is it works on my D: but not C:.
C: is on a SSD with bitlocker turned on.
D: is on a HD with bitlocker turned on.
More fs and drive info can be found at the bottom of this comment.
Below is the code I used to produce the error followed by the results of it being ran on my system:
importpysmdevimportpyvshadowdefmain():
####################################################### using normal file handle######################################################print("Test 1: VShadow from C as file handle")
withopen('\\\\.\\C:', "rb") asvolume_handle:
vshadow_volume=pyvshadow.volume()
try:
vshadow_volume.open_file_object(
volume_handle
)
print("VSS Found for C: Store count -> {}".format(
vshadow_volume.get_number_of_stores()
))
exceptExceptionaserror:
error_str=str(error).replace("\r", "\n")
print("Error Opening VShadow using <file> on [C:]")
print(error_str)
print("\n")
print("Test 2: VShadow from D as file handle")
# As regular file.withopen('\\\\.\\D:', "rb") asvolume_handle:
vshadow_volume=pyvshadow.volume()
try:
vshadow_volume.open_file_object(
volume_handle
)
print("VSS Found for D: Store count -> {}".format(
vshadow_volume.get_number_of_stores()
))
exceptExceptionaserror:
error_str=str(error).replace("\r", "\n")
print("Error Opening VShadow using <file> on [D:]")
print(error_str)
print("\n")
####################################################### using pysmdev handle######################################################print("Test 3: VShadow from C as pymsdev.handle")
smdev_handle=pysmdev.handle()
smdev_handle.open("\\\\.\\C:")
vshadow_volume=pyvshadow.volume()
try:
vshadow_volume.open_file_object(
smdev_handle
)
print("VSS Found for C: Store count -> {}".format(
vshadow_volume.get_number_of_stores()
))
exceptExceptionaserror:
error_str=str(error).replace("\r", "\n")
print("Error Opening VShadow using <pysmdev.handle> on [C:]")
print(error_str)
print("\n")
print("Test 4: VShadow from D as pymsdev.handle")
smdev_handle=pysmdev.handle()
smdev_handle.open("\\\\.\\D:")
vshadow_volume=pyvshadow.volume()
try:
vshadow_volume.open_file_object(
smdev_handle
)
print("VSS Found for D: Store count -> {}".format(
vshadow_volume.get_number_of_stores()
))
exceptExceptionaserror:
error_str=str(error).replace("\r", "\n")
print("Error Opening VShadow using <pysmdev.handle> on [D:]")
print(error_str)
print("\n")
if__name__=="__main__":
main()
Test 1: VShadow from C as file handle
VSS Found for C: Store count -> 11
Test 2: VShadow from D as file handle
VSS Found for D: Store count -> 11
Test 3: VShadow from C as pymsdev.handle
Error Opening VShadow using <pysmdev.handle> on [C:]
pyvshadow_volume_open_file_object: unable to open volume. pyvshadow_file_object_read_buffer: unable to read from file object with error: 'pysmdev_handle_read_buffer: unable to read data. libsmdev_handle_read_buffer: offset exceeds media size.'.
pyvshadow_file_object_io_handle_read: unable to read from file object.
libbfio_handle_read_buffer: unable to read from handle.
libvshadow_io_handle_read_ntfs_volume_header: unable to read NTFS backup volume header data.
libvshadow_volume_open_read: unable to read NTFS volume header.
libvshadow_volume_open_file_io_handle: unable to read from file IO handle.
Test 4: VShadow from D as pymsdev.handle
VSS Found for D: Store count -> 11
I created an image of the logical volume C: and I was able to open the volume shadow object. Maybe this gives more support for this issue having to do with libyal/libcfile#2?
Otherwise, here are some more offsets. The backup header is within the size that the smdev handle sees (smdev_handle.media_size).
I cant seem to read outside the file system size with pysmdev. But, this cant be the issue though because I am still able to open the vshadow object for D: and its backup is outside the file system size too.
I think this is the right repository for this issue. I was having an issue in DFVFS where volume shadows are not being opened for some logical volumes and think I have narrowed it down to this library. Here is the exact pysmdev error as shown in the following example (Python 2.7 and 3.6 both produce it):
with libsmdev_handle_read_buffer: offset exceeds media size. being the issue.
This is the same error I am seeing when trying the open the VShadow object in dfvfs.
I understand this will be difficult to reproduce because it is specific to my logical volume and I have not found a test image where the resulting error is reproduced. Maybe you can formulate a hypothesis by seeing what I did, and what the output was?
Whats weird is it works on my D: but not C:.
C: is on a SSD with bitlocker turned on.
D: is on a HD with bitlocker turned on.
More fs and drive info can be found at the bottom of this comment.
Below is the code I used to produce the error followed by the results of it being ran on my system:
Python 2.6 x64 - Library Versions:
Python 3.6 x64 - Library Versions:
Not sure if the following helps or not. But I thought I would include it just in case.
C: Volume info:
D: Volume info:
The text was updated successfully, but these errors were encountered: