mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-12 04:37:38 +02:00
Add proper exception handling in file descriptor enumeration
This commit is contained in:
@@ -339,15 +339,23 @@ class LinuxUtilities(interfaces.configuration.VersionableInterface):
|
||||
symbol_table: str,
|
||||
task: interfaces.objects.ObjectInterface,
|
||||
):
|
||||
# task.files can be null
|
||||
if not (task.files and task.files.is_readable()):
|
||||
try:
|
||||
files = task.files
|
||||
except exceptions.InvalidAddressException:
|
||||
return None
|
||||
|
||||
if not files.is_readable():
|
||||
return None
|
||||
|
||||
try:
|
||||
fd_table = files.get_fds()
|
||||
except exceptions.InvalidAddressException:
|
||||
return None
|
||||
|
||||
fd_table = task.files.get_fds()
|
||||
if fd_table == 0:
|
||||
return None
|
||||
|
||||
max_fds = task.files.get_max_fds()
|
||||
max_fds = files.get_max_fds()
|
||||
|
||||
# corruption check
|
||||
if max_fds > 500000:
|
||||
|
||||
Reference in New Issue
Block a user