Skip to content

Commit 75b55c3

Browse files
authored
Merge pull request #1593 from volatilityfoundation/mountinfo_superblock_check
Add missing pointer validation check in mountinfo
2 parents 346a5d9 + efbc410 commit 75b55c3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

volatility3/framework/plugins/linux/mountinfo.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,14 @@ def get_mountinfo(
9393
return None
9494

9595
mnt_root_path = mnt_root.path()
96-
superblock = mnt.get_mnt_sb()
9796

9897
mnt_id: int = mnt.mnt_id
9998
parent_id: int = mnt.mnt_parent.mnt_id
10099

100+
superblock = mnt.get_mnt_sb()
101+
if not (superblock and superblock.is_readable()):
102+
return None
103+
101104
st_dev = f"{superblock.major}:{superblock.minor}"
102105

103106
mnt_opts: List[str] = []

0 commit comments

Comments
 (0)