mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-29 11:19:40 +02:00
Push ELF export limit to a constant
This commit is contained in:
@@ -234,3 +234,5 @@ BLUETOOTH_PROTOCOLS = (
|
||||
"HIDP",
|
||||
"AVDTP",
|
||||
)
|
||||
|
||||
ELF_MAX_EXTRACTION_SIZE = 1024 * 1024 * 1024 * 4 - 1
|
||||
|
||||
@@ -105,8 +105,9 @@ class Elfs(plugins.PluginInterface):
|
||||
|
||||
real_size = end - start
|
||||
|
||||
if real_size < 0 or real_size > 100000000:
|
||||
continue
|
||||
# Check if ELF has a legitimate size
|
||||
if real_size < 0 or real_size > constants.linux.ELF_MAX_EXTRACTION_SIZE:
|
||||
raise ValueError(f"The claimed size of the ELF is invalid: {real_size}")
|
||||
|
||||
sections[start] = real_size
|
||||
|
||||
|
||||
Reference in New Issue
Block a user