]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Quickly reject tar entries > 2^60 bytes w/o risking overflow (#2263)
authorTim Kientzle <kientzle@acm.org>
Sat, 6 Jul 2024 07:48:15 +0000 (00:48 -0700)
committerGitHub <noreply@github.com>
Sat, 6 Jul 2024 07:48:15 +0000 (09:48 +0200)
commit808059a01f28977bdb366723dd8d4ab79fb6b0a0
tree92667590174414686cbbeb86e9462061c89d9fe9
parentf71034539e921d0e2b9f7784c4ec63ae9ef14966
Quickly reject tar entries > 2^60 bytes w/o risking overflow (#2263)

In particular, this ensures that we cannot overflow rounding-up
calculations. Recent tar changes put in a lot of sanity limits on the
sizes of particular kinds of data, but the usual behavior in most cases
was to skip over-large values. The skipping behavior required
rounding-up and accumulating values that could potentially overflow
64-bit integers. This adds some coarser checks that fail more directly
when an entry claims to be more than 1 exbibyte (2^60 bytes), avoiding
any possibility of numeric overflow along these paths.

OSS-Fuzz Issue: 70062
libarchive/archive_read_support_format_tar.c