Re: [BUG] ZIP timestamp conversion and strict fast-import date validation
- From
- Matthew E. Luallen <m@sph3r3.com>
- Date
- Oct 5, 2026, 20:32 UTC
- Message-ID
- <CA+h9NxQEJaKrbTXUeryEhNMfOfuU0EykiJRi3PaJE9dRFo5tWw@mail.gmail.com>
- In-Reply-To
- <f8dc40a4-920d-4dc5-9f71-7686bfc6255b@web.de>
Hi René,
Thank you for the thoughtful response. I appreciate your help.
- Reader example: Python 3.14.7's ZipInfo.date_time reports 2100 for the 1972 ZIP despite its correct Unix timestamp. Our tested UnZip and bsdtar restored 1972 correctly; this is a metadata-reading example.
- Separate consequence: the 2106-to-1970 wrap caused UnZip update mode to retain different existing 2025 content. The 2038 control updated correctly. No deployed security bypass has been demonstrated.
- Fix direction: would you prefer clamping or rejecting ZIP timestamps beyond the Unix field's range? Our candidate rejects them. Would rejecting negative dates in strict raw import be a useful first step?
Attached is brief guidance on misinterpretation risks, clearer date labels, and safer downstream decisions. These suggestions complement the ordinary bug fixes without asserting a security classification.
Best, Matt
GIT TIMESTAMP GUIDANCE: INTERPRETATION, INTEGRITY AND REMEDIATION 5 October 2026 | Companion to the public Git date-handling discussion
WHY IT MATTERS
- Interpretation: dates can be mistaken for creation, publication or approval times. Conversion errors can mislead without malicious intent. - Scale: repeated reliance on dates across update, review and audit pipelines could multiply errors. Prevalence has not been measured. - Security impact requires attacker-influenced metadata to affect a security decision without independent checks. A local update decision changed; a production security bypass has not been demonstrated.
OBSERVED, WITH CONTROLS
- Python 3.14.7 reads the 1972 ZIP's DOS date as 2100 despite the correct Unix extra field. UnZip 6.00 and bsdtar 3.5.3 restored 1972; Python's ordinary extraction used a current local modification time. - A 2106 commit's ZIP Unix timestamp wrapped to 1970; UnZip update mode kept different existing 2025 bytes. A 2038 control replaced them; TAR preserved 2106. Strict raw import also accepted a negative date subsequently rejected by strict fsck. Reader behavior varies by platform.
PRACTICAL OPTIONS
- Exporters: validate ranges before encoding. Clamp pre-1980 DOS dates while preserving representable Unix dates. For Unix-field overflow, choose rejection or documented clamping; clamping loses the original value. Our candidate rejects overflow. These are proposed policies. - Importers: align strict parsing with validation; check negative values, complete numeric input and overflow. Keep permissive modes explicit. Test boundaries across timezones and archive readers. - Consumers: decide updates using expected content/version information from a trusted source, not modification time alone. For change review, retain a trusted baseline commit and compare reachable changes; handle missing or rewritten history explicitly. Date windows do not establish complete coverage of newly received content. - Displays: distinguish 'committer-supplied date', 'archive modification time' and 'server observed at'. Explain clamping and missing evidence. Server receipt is not original creation or first publication elsewhere. - Evidence: preserve original bytes and independent receipt records. Commit signatures bind signed content to a key under a trust policy; they do not independently prove its claimed creation time. A validated trusted timestamp can support existence by a time, not exact creation.
RISK TAXONOMY, NOT A VULNERABILITY ASSIGNMENT
- Numeric representation/truncation: CWE-197; wraparound: CWE-190. - Validation: CWE-20 (broad category). Downstream trust: CWE-807 only where a security decision relies on untrusted input. Display confusion alone does not establish it. These labels do not establish severity.
REFERENCES AND EVIDENCE
Git date controls: https://git-scm.com/docs/git-commit#_commit_information Archive behavior: https://git-scm.com/docs/git-archive#_description CWE taxonomy: https://cwe.mitre.org/data/definitions/197.html https://cwe.mitre.org/data/definitions/190.html https://cwe.mitre.org/data/definitions/20.html https://cwe.mitre.org/data/definitions/807.html Trusted timestamp semantics: https://www.rfc-editor.org/rfc/rfc3161 Evidence: recorded 2026-10-01 consumer-date-impact results and Git matrix; no new experiment is claimed by this guidance.
Matthew E. Luallen (@meluallen), with research, reproduction and drafting assistance from OpenAI Codex.