Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # 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).

@e3krisztian e3krisztian force-pushed the test-all-handlers-chunk-stability branch from 533c4eb to 38c8220 Compare May 12, 2022 15:58
@e3krisztian e3krisztian force-pushed the test-all-handlers-chunk-stability branch from 38c8220 to c7e2212 Compare June 9, 2022 09:17
@qkaiser qkaiser force-pushed the test-all-handlers-chunk-stability branch from c7e2212 to e872387 Compare June 13, 2022 08:54
@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
@vlaci vlaci force-pushed the main branch 4 times, most recently from fe05dec to 064e1ad Compare February 4, 2025 17:10
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants