Skip to content

BGD Size Incorrect #7

Open
Open
@ayushr2

Description

@ayushr2

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions