← Files ISA-L ZipARCHIVED FILE
SECURITY-VALIDATION.md
2.45 KB · Nov 30, 2026 · 00:22 UTC
# ISA-L Zip 0.2.1 security validation Copyright (c) 2026 Tarek Wasfy. This note records the fixes made in response to the supplied Linux security validation report for 0.2.0. The report tested the previous Linux executable; it did not test these replacement binaries. ## Findings addressed - Corrupted payloads are written only into a temporary staging directory. Expanded byte count and the ZIP-declared size are checked, then the CRC is checked before the file is eligible for commit. A failed member leaves no corrupt final file. - Backslash-containing names are rejected on every platform. Absolute paths, drive-prefixed paths, traversal components, Windows device names, symlink entries, duplicate paths, case-colliding components, and file-as-parent conflicts are rejected during a full archive preflight. - All entries are validated before extraction begins. Files are staged on the destination filesystem. A previously absent destination is published by directory rename after successful extraction. For an existing destination, conflicts and symlink components are preflighted, and already committed files are rolled back if a later ordinary filesystem operation fails. - The 20 GiB cap applies to both ZIP-declared expanded sizes and bytes actually produced during extraction. ## Verification performed - Windows `go test ./...` passed after the fixes. Regression coverage includes a corrupt stored member, a later backslash traversal after a valid member, case-colliding names, and existing traversal and round-trip checks. - The rebuilt Windows executable passed standalone `pack`, `inspect`, `extract`, `--help`, CRC validation, and byte-for-byte round-trip smoke checks. - The Linux x86_64 musl executable was cross-built from the same source and linked statically. Linux runtime tests remain outstanding because this build host does not have a working Linux/WSL runtime. - ZIP64, large-file stress, and decompression-bomb stress were not run as separate runtime campaigns. The actual expanded-size limit is implemented but those extreme cases still need dedicated Linux and Windows validation before calling this a full security audit. ## Remaining boundary Extraction uses portable path-based filesystem operations. It rejects symlinks found during preflight and rechecks normal destination conflicts, but it cannot guarantee safety against a hostile process racing directory or symlink changes during commit. Extract into a destination directory not writable by untrusted processes.
SHA-256: 7da7cb1e4e09934263a575c7248d697e88a3590562643ce9da122345398c5061