]> git.ipfire.org Git - thirdparty/libarchive.git/commit
7zip: Limit amount of properties (#2131)
authorTobias Stoeckmann <stoeckmann@users.noreply.github.com>
Sat, 20 Apr 2024 22:39:38 +0000 (22:39 +0000)
committerGitHub <noreply@github.com>
Sat, 20 Apr 2024 22:39:38 +0000 (15:39 -0700)
commitae4e3d2f0d98e1195975cc7ef8e56c1cc4b13d97
treeb49ae34c7669b9425ac0dbad1ab02781801cc2e7
parent27d2ff3b6bf68c09d8d232c0362648fd231e730b
7zip: Limit amount of properties (#2131)

The uint64_t variable propertiesSize is eventually casted to size_t
which, on 32 bit systems, can result in integer truncation.

In such a situation, it is possible that less than the minimum of 5
properties are parsed and processed, which will result in out of
boundary reads in init_decompression because the error check `if
(coder1->propertiesSize < 5)` still takes the uint64_t variable into
account.
libarchive/archive_read_support_format_7zip.c