]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Be more cautious about parsing ISO-9660 timestamps (#2330)
authorTim Kientzle <kientzle@acm.org>
Fri, 20 Sep 2024 05:20:02 +0000 (22:20 -0700)
committerGitHub <noreply@github.com>
Fri, 20 Sep 2024 05:20:02 +0000 (22:20 -0700)
commite939c97a579131aa021166ef5876b303bccd8472
tree78416540beb7ad70f6066e989df00d09ec1fe999
parent915c9f83a4f2fd63aa82ae006b6bd9661f42a7a1
Be more cautious about parsing ISO-9660 timestamps (#2330)

Some ISO images don't have valid timestamps for the root directory
entry. Parsing such timestamps can generate nonsensical results, which
in one case showed up as an unexpected overflow on a 32-bit system.

Add some validation logic that can check whether a 7-byte or 17-byte
timestamp is reasonable-looking, and use this to ignore invalid
timestamps in various locations. This also requires us to be a little
more careful about tracking which timestamps are actually known.

Resolves issue #2329
libarchive/archive_read_support_format_iso9660.c
libarchive/test/test_read_format_iso_Z.c