gecko-dev/modules/libmar/tests/unit
June Wilde 3dba77a779 Bug 1468556 - Protect against overlapping files in libmar; r=mhowell
Disallows files from referencing the same bytes in the content blocks of a MAR
file by storing a list of structs containing a file's byte offsets and lengths.
A list was chosen since the cap of 256 files wouldn't produce considerable
overhead when extracting/reading/searching/etc through the archive.

Removing the ability for a MAR file to reference the same content block
repeatedly seems like a better solution than what was suggested in the BLRG
report. (limiting the number of files or checking for overly large
decompressed files)

Allows us to prohibit this type of file bomb while only losing an attribute
of the MAR file format that wasn't being leveraged. The fix is applied in
mar_enum_items and mar_find_item so that the manifest the updater uses is
equally safeguarded as the mar host tool.

Differential Revision: https://phabricator.services.mozilla.com/D11706

--HG--
extra : moz-landing-system : lando
2018-11-26 17:25:24 +00:00
..
data Bug 1468556 - Protect against overlapping files in libmar; r=mhowell 2018-11-26 17:25:24 +00:00
.eslintrc.js Bug 1501662 - Add more .eslintrc.js files for test directories (dom, modules, netwerk and parser). r=mossop 2018-10-24 19:11:17 +00:00
head_libmar.js Bug 1468556 - Protect against overlapping files in libmar; r=mhowell 2018-11-26 17:25:24 +00:00
test_create.js
test_extract.js Bug 1468556 - Protect against overlapping files in libmar; r=mhowell 2018-11-26 17:25:24 +00:00
test_sign_verify.js
xpcshell.ini