Skip to content

Commit 4df047b

Browse files
authored
Merge pull request #1591 from volatilityfoundation/check_sock_access
Fix broken socket retrieval that causes backtrace
2 parents 1f983ac + 4d43ac9 commit 4df047b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

volatility3/framework/plugins/linux/sockstat.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -538,11 +538,14 @@ def list_sockets(
538538
continue
539539
sock = socket.sk.dereference()
540540

541-
sock_type = sock.get_type()
542-
family = sock.get_family()
541+
try:
542+
sock_type = sock.get_type()
543+
family = sock.get_family()
544+
sock_handler = SockHandlers(vmlinux, task)
545+
sock_fields = sock_handler.process_sock(sock)
546+
except exceptions.InvalidAddressException:
547+
continue
543548

544-
sock_handler = SockHandlers(vmlinux, task)
545-
sock_fields = sock_handler.process_sock(sock)
546549
if not sock_fields:
547550
continue
548551

0 commit comments

Comments
 (0)