Skip to content

Commit

Permalink
fix(handler): introduce upper size limit for s_log_block_size
Browse files Browse the repository at this point in the history
  • Loading branch information
nyuware authored and qkaiser committed Mar 4, 2024
1 parent 7f7ab9a commit e5aa15e
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 e5aa15e

Please sign in to comment.