Increase limits in ElfParser

PiperOrigin-RevId: 561621211
Change-Id: I3bbe8aecd3e3044251b67145927ee3a04bc56532
This commit is contained in:
Sandboxed API Team 2023-08-31 05:00:56 -07:00 committed by Copybara-Service
parent dc25251af9
commit a0eb8d4445

View File

@ -102,10 +102,10 @@ class ElfParser {
// Arbitrary cut-off values, so we can parse safely. // Arbitrary cut-off values, so we can parse safely.
static constexpr int kMaxProgramHeaderEntries = 500; static constexpr int kMaxProgramHeaderEntries = 500;
static constexpr int kMaxSectionHeaderEntries = 500; static constexpr int kMaxSectionHeaderEntries = 500;
static constexpr size_t kMaxSectionSize = 200 * 1024 * 1024; static constexpr size_t kMaxSectionSize = 500 * 1024 * 1024;
static constexpr size_t kMaxStrtabSize = 500 * 1024 * 1024; static constexpr size_t kMaxStrtabSize = 500 * 1024 * 1024;
static constexpr size_t kMaxLibPathSize = 1024; static constexpr size_t kMaxLibPathSize = 1024;
static constexpr int kMaxSymbolEntries = 2 * 1000 * 1000; static constexpr int kMaxSymbolEntries = 4 * 1000 * 1000;
static constexpr int kMaxDynamicEntries = 10000; static constexpr int kMaxDynamicEntries = 10000;
static constexpr size_t kMaxInterpreterSize = 1000; static constexpr size_t kMaxInterpreterSize = 1000;