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

Test that handlers tolerate a non-empty unknown chunk prefix/suffix #372

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

e3krisztian
Copy link
Contributor

No description provided.

@qkaiser
Copy link
Contributor

qkaiser commented May 11, 2022

Given the current test output, we should investigate and open tickets for miscalculation on unaligned chunks in the following handlers:

  • compression.compress
  • compression.lzh
  • executable.elf.elf32
  • filesystem.romfs
  • filesystem.yaffs.yaffs
  • filesystem.yaffs.yaffs2
  • filesystem.jffs2.jffs2_new
  • filesystem.jffs2.jffs2_old

@e3krisztian
Copy link
Contributor Author

There are a couple of problems with this PR:

The real stuff is here e.g.:

Some newer test runs fail due to timeout after 4m (more tests, and they are also of the slower kind).

@qkaiser
Copy link
Contributor

qkaiser commented Jun 13, 2022

The chunk calculation errors on filesystem handlers is due to calls to read_until_past, which is unbounded. We should read the exact padding size whenever possible.

  • romfs: padding alignment is 1024 bytes, fixed in e872387
  • JFFS2: padding size is the erase block size by default, but can be increased by setting it explicitly
  • YAFFS: padding size is the page size by default, but can be increased by setting it explicitly

The chunk calculation error on compress and LZH comes from the fact that a random byte at the end of the compressed stream may be considered valid by the decompressor. Not sure if there is a way to overcome this.

@e3krisztian e3krisztian force-pushed the test-all-handlers-chunk-stability branch from e872387 to 26b0ae7 Compare June 25, 2022 08:58
@e3krisztian e3krisztian force-pushed the test-all-handlers-chunk-stability branch from 26b0ae7 to d1f4ecf Compare July 1, 2022 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants