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
The function NewBlockGroupDescriptorListWithReadSeeker seems to be assuming that the block group descriptor is 64 bytes in length. However, that is not always true according to docs.
You need to read only half of that struct if the 64-bit feature is not set and not use the rest of the fields. For the next entry you only increment offset by 32, not 64.
If the 64-bit feature is set, the BGD size could be larger than 64 bytes also sometimes. You need to increment the offset by that amount (>= 64).
Impact:
32-bit ext4 filesystems would not work with this library since block group descriptors are one of the most important metadata besides the superblock.
The text was updated successfully, but these errors were encountered:
The function
NewBlockGroupDescriptorListWithReadSeeker
seems to be assuming that the block group descriptor is64
bytes in length. However, that is not always true according to docs.You need to read only half of that struct if the 64-bit feature is not set and not use the rest of the fields. For the next entry you only increment offset by 32, not 64.
If the 64-bit feature is set, the BGD size could be larger than 64 bytes also sometimes. You need to increment the offset by that amount (>= 64).
Impact:
32-bit ext4 filesystems would not work with this library since block group descriptors are one of the most important metadata besides the superblock.
The text was updated successfully, but these errors were encountered: