Skip to content

Commit 2e57779

Browse files
authored
Merge pull request #962 from gcmoreira/fix_dentry_mem_smear_issue_961
Fix issue #961: Prevent potential dentry pointer memory smear
2 parents b9e5cfb + 0f42f0e commit 2e57779

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

volatility3/framework/symbols/linux/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,11 @@ def path_for_file(cls, context, task, filp) -> str:
200200
Returns:
201201
str: A file (or sock pipe) pathname relative to the task's root directory.
202202
"""
203+
204+
# Memory smear protection: Check that both the file and dentry pointers are valid.
203205
try:
204206
dentry = filp.get_dentry()
207+
dentry.is_root()
205208
except exceptions.InvalidAddressException:
206209
return ""
207210

0 commit comments

Comments
 (0)