From 3ebbddbd8dce0671e84bc8bddaa812b91e94f2f3 Mon Sep 17 00:00:00 2001 From: iMHLv2 Date: Tue, 30 Mar 2021 21:12:32 -0500 Subject: [PATCH] don't save objects in self they contain a reference to the context, so if we ever pickle that, then it'll cause a massive recursion loop and fail --- volatility3/framework/layers/crash.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/volatility3/framework/layers/crash.py b/volatility3/framework/layers/crash.py index 7f6fe32db..895b4cedf 100644 --- a/volatility3/framework/layers/crash.py +++ b/volatility3/framework/layers/crash.py @@ -58,25 +58,25 @@ class WindowsCrashDump32Layer(segmented.SegmentedLayer): self.check_header(hdr_layer, hdr_offset) # Need to create a header object - self._header = self.context.object(self._crash_table_name + constants.BANG + self.dump_header_name, - offset = hdr_offset, - layer_name = self._base_layer) + header = self.get_header() # Extract the DTB - self.dtb = int(self._header.DirectoryTableBase) + self.dtb = int(header.DirectoryTableBase) - self.dump_type = int(self._header.DumpType) + self.dump_type = int(header.DumpType) # Verify that it is a supported format - if self._header.DumpType not in self.supported_dumptypes: - vollog.log(constants.LOGLEVEL_VVVV, "unsupported dump format 0x{:x}".format(self._header.DumpType)) - raise WindowsCrashDumpFormatException(name, "unsupported dump format 0x{:x}".format(self._header.DumpType)) + if header.DumpType not in self.supported_dumptypes: + vollog.log(constants.LOGLEVEL_VVVV, "unsupported dump format 0x{:x}".format(header.DumpType)) + raise WindowsCrashDumpFormatException(name, "unsupported dump format 0x{:x}".format(header.DumpType)) # Then call the super, which will call load_segments (which needs the base_layer before it'll work) super().__init__(context, config_path, name) def get_header(self) -> interfaces.objects.ObjectInterface: - return self._header + return self.context.object(self._crash_table_name + constants.BANG + self.dump_header_name, + offset=0, + layer_name=self._base_layer) def _load_segments(self) -> None: """Loads up the segments from the meta_layer."""