Skip to content

Commit

Permalink
Merge pull request #803 from nyuware/s_log_block_size_fixup
Browse files Browse the repository at this point in the history
fix(handler): introduce upper size limit for s_log_block_size
  • Loading branch information
qkaiser authored Mar 4, 2024
2 parents 7f7ab9a + e5aa15e commit 8eb0f21
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions unblob/handlers/filesystem/extfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ def valid_header(self, header) -> bool:
"ExtFS header major version too high", rev_level=header.s_rev_level
)
return False
if header.s_log_block_size > 6:
logger.debug(
"ExtFS header s_log_block_size is too large",
s_log_block_size=header.s_log_block_size,
)
return False
return True

def calculate_chunk(self, file: File, start_offset: int) -> Optional[ValidChunk]:
Expand Down

0 comments on commit 8eb0f21

Please sign in to comment.