Skip to content
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

BGD Size Incorrect #7

Open
ayushr2 opened this issue Jul 12, 2019 · 0 comments
Open

BGD Size Incorrect #7

ayushr2 opened this issue Jul 12, 2019 · 0 comments

Comments

@ayushr2
Copy link
Contributor

ayushr2 commented Jul 12, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant