You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P2] PNG and UF2 LZMA decompression has no memory or output-size bounds #13
The embedded-source decoder calls lzma.decompress without a decoder memory limit or a bound on decompressed output. The resulting data is then copied into UTF-16 and parsed as JSON, further increasing peak memory usage.
The UF2 image-size limit bounds the compressed input image, not the expanded source. ZIP's uncompressed-size limit does not apply to PNG/UF2 imports.
A bounded review probe constructed a valid 1,458-byte MakeCode project PNG that successfully extracted 16 MiB of source. Larger compressed payloads can exhaust a build worker's memory despite the other import limits.
Expected behavior: bound both the LZMA decoder's dictionary allocation and the total expanded output before decoding/copying/parsing the complete project, and report an import error when the limits are exceeded. A decoder memory limit alone does not cap the expanded output.
Found while reviewing PR #7, toolchain at ce12c48.
changed the title [-][P2] PNG and UF2 LZMA decompression has no memory or output-size bounds[/-][+]PNG and UF2 LZMA decompression has no memory or output-size bounds[/+]on Nov 4, 2026
changed the title [-]PNG and UF2 LZMA decompression has no memory or output-size bounds[/-][+][P2] PNG and UF2 LZMA decompression has no memory or output-size bounds [found by chatgpt codex][/+]on Nov 4, 2026
changed the title [-][P2] PNG and UF2 LZMA decompression has no memory or output-size bounds [found by chatgpt codex][/-][+][P2] PNG and UF2 LZMA decompression has no memory or output-size bounds[/+]on Nov 4, 2026
Activity
[-][P2] PNG and UF2 LZMA decompression has no memory or output-size bounds[/-][+]PNG and UF2 LZMA decompression has no memory or output-size bounds[/+][-]PNG and UF2 LZMA decompression has no memory or output-size bounds[/-][+][P2] PNG and UF2 LZMA decompression has no memory or output-size bounds [found by chatgpt codex][/+][-][P2] PNG and UF2 LZMA decompression has no memory or output-size bounds [found by chatgpt codex][/-][+][P2] PNG and UF2 LZMA decompression has no memory or output-size bounds[/+]