mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-26 19:44:50 +02:00
Windows Handles: Work in fixes from @attrc
These changes fix bugs encountered during regression testing related to virtual offset validation and string length checks.
This commit is contained in:
@@ -226,6 +226,14 @@ class Handles(interfaces.plugins.PluginInterface):
|
||||
masked_offset = offset & layer_object.maximum_address
|
||||
|
||||
for entry in table:
|
||||
# This triggered a backtrace in many testing samples
|
||||
# in the level == 0 path
|
||||
# The code above this calls `is_valid` on the `offset`
|
||||
# It is sent but then does not validate `entry` before
|
||||
# sending it to `_get_item`
|
||||
if not self.context.layers[virtual].is_valid(entry.vol.offset):
|
||||
continue
|
||||
|
||||
if level > 0:
|
||||
yield from self._make_handle_array(entry, level - 1, depth)
|
||||
depth += 1
|
||||
|
||||
@@ -376,7 +376,16 @@ class OBJECT_HEADER(objects.StructType):
|
||||
|
||||
try:
|
||||
# vista and earlier have a Type member
|
||||
self._vol["object_header_object_type"] = self.Type.Name.String
|
||||
length = self.Type.member("Name").Length
|
||||
if length == 0 or length > 128:
|
||||
string = None
|
||||
else:
|
||||
string = self.Type.Name.String
|
||||
if len(string) == 0 or len(string) > 128:
|
||||
string = None
|
||||
|
||||
self._vol["object_header_object_type"] = string
|
||||
|
||||
except AttributeError:
|
||||
# windows 7 and later have a TypeIndex, but windows 10
|
||||
# further encodes the index value with nt1!ObHeaderCookie
|
||||
|
||||
Reference in New Issue
Block a user