From 8a03cf53f0c6d5dd351f9702953ec7fa232ba074 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Mon, 13 Jan 2020 13:58:35 +0000 Subject: [PATCH] Objects: Ensure templates objects aren't ReferenceTemplates. --- volatility/framework/contexts/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/volatility/framework/contexts/__init__.py b/volatility/framework/contexts/__init__.py index 9daec61e0..ba23847ba 100644 --- a/volatility/framework/contexts/__init__.py +++ b/volatility/framework/contexts/__init__.py @@ -13,6 +13,7 @@ import hashlib from typing import Callable, Dict, Iterable, List, Optional, Set, Tuple, Union from volatility.framework import constants, interfaces, symbols, exceptions +from volatility.framework.objects import templates class Context(interfaces.context.ContextInterface): @@ -104,6 +105,8 @@ class Context(interfaces.context.ContextInterface): except exceptions.SymbolError: object_template = self._symbol_space.get_enumeration(object_type) else: + if isinstance(object_type, templates.ReferenceTemplate): + object_type = self._symbol_space.get_type(object_type.vol.type_name) object_template = object_type # Ensure that if a pre-constructed type is provided we just instantiate it arguments.update(object_template.vol)