libyal / libbde

Library and tools to access the BitLocker Drive Encryption (BDE) encrypted volumes
GNU Lesser General Public License v3.0
214 stars 52 forks source link

Unable to read past 1TiB? #58

Closed gregfreemyer closed 2 years ago

gregfreemyer commented 2 years ago

libbde version 20220121

For perhaps the first time I have a bunch of 2TB external USB drives I'm trying to image. after decrypting.

I used bdemount to create a virtual fille (/mnt/bde1). It works great for the first 1,000 GB, but then it fails.

In troubleshooting I tried a simple "od -c -j $((1024 1024 1024 * 1000)) /mnt/bde1 | less" and it works as expected.

That is a 1000 GB offset -- no problem.

But "od -c -j $((1024 1024 1024 * 1024) /mnt/bde1" fails.

This is a 1024 GB offset and it fails with an i/o error

joachimmetz commented 2 years ago

Can you check if int is 32-bit for your compilation? Also see: https://github.com/libyal/libbde/issues/47

gregfreemyer commented 2 years ago

sizeof(int) is 4 bytes for the compilation.

I will try setting libfdata_vector_get_element_index_at_offset to int64.

joachimmetz commented 2 years ago

Made some changes in https://github.com/libyal/libbde/commit/bc60762ca72e5366f9ca4d13903399f13f82b107 in case the 64-bit int does not work.