Skip to content

Commit e5e4d30

Browse files
authored
Merge pull request #1514 from volatilityfoundation/file_descriptors_exception_handling
Add proper exception handling in file descriptor enumeration
2 parents bf03ecd + 4c2d21d commit e5e4d30

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

volatility3/framework/constants/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# We use the SemVer 2.0.0 versioning scheme
22
VERSION_MAJOR = 2 # Number of releases of the library with a breaking change
33
VERSION_MINOR = 20 # Number of changes that only add to the interface
4-
VERSION_PATCH = 0 # Number of changes that do not change the interface
4+
VERSION_PATCH = 1 # Number of changes that do not change the interface
55
VERSION_SUFFIX = ""
66

77
PACKAGE_VERSION = (

volatility3/framework/symbols/linux/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -339,16 +339,16 @@ def files_descriptors_for_process(
339339
symbol_table: str,
340340
task: interfaces.objects.ObjectInterface,
341341
):
342-
# task.files can be null
343-
if not (task.files and task.files.is_readable()):
344-
return None
342+
try:
343+
files = task.files
344+
fd_table = files.get_fds()
345+
if fd_table == 0:
346+
return None
345347

346-
fd_table = task.files.get_fds()
347-
if fd_table == 0:
348+
max_fds = files.get_max_fds()
349+
except exceptions.InvalidAddressException:
348350
return None
349351

350-
max_fds = task.files.get_max_fds()
351-
352352
# corruption check
353353
if max_fds > 500000:
354354
return None

0 commit comments

Comments
 (0)