Skip to content

table: validate index bounds in sqfs_table_get#155

Merged
vasi merged 1 commit into
vasi:masterfrom
TristanInSec:fix-table-oob-read
Jun 21, 2026
Merged

table: validate index bounds in sqfs_table_get#155
vasi merged 1 commit into
vasi:masterfrom
TristanInSec:fix-table-oob-read

Conversation

@TristanInSec

Copy link
Copy Markdown
Contributor

Store the entry count passed to sqfs_table_init() and validate that idx is within bounds in sqfs_table_get() before indexing into the blocks array. Without this check, a crafted SquashFS image with a large uid, fragment index, or xattr index causes an out-of-bounds read past the heap-allocated blocks array.

Fixes #154

Store the entry count from sqfs_table_init and check that idx is
within bounds before indexing into the blocks array. Without this,
a crafted SquashFS image with a large uid, fragment index, or xattr
index can cause sqfs_table_get to read past the allocated blocks
array.

Fixes vasi#154
@vasi
vasi merged commit df85c4d into vasi:master Jun 21, 2026
8 checks passed
@vasi

vasi commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Thanks!

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

Successfully merging this pull request may close these issues.

Security: Table index OOB read via uncapped entry_count

2 participants