Skip to content

AttributeError: 'NoneType' object has no attribute 'socket' #127

@seth1002

Description

@seth1002

Describe the bug

Hi,

another sample will raise exception, please refer to the sample below.
https://www.virustotal.com/gui/file/c7c281190bc1be69375e32247060748e24d7d917872fd2ef7fa5552302f7497b/detection

thank you

15:06:37:hooks_____:INFO__:Reached entrypoint 0x4001b1
[main] [SYSCALL] arch_prctl ( option=0x1002 (ARCH_SET_FS), addr=0x615718 ) -> 0
[main] [SYSCALL] set_tid_address ( tidptr=0x61591c ) -> 7400
[main] [SYSCALL] clock_gettime ( clk_id=0x2, res=0x7f000008eb10 ) -> 0
15:06:37:kernel_bas:ERROR_:Error in thread main (0x7400), PRI: 0, parent: None, IP: 0x413964, blocks_exec'd: 0x0, ThreadState.RUNNING while executing syscall recvfrom Args: sockfd=0xffffffffffffffff, buf=0x0, len=0x0, flags=0x0, src_addr=0x0, addrlen=0x0
Traceback (most recent call last):
  File "/home/*********/Envs/zelosOrg/bin/zelos", line 33, in <module>
    sys.exit(load_entry_point('zelos', 'console_scripts', 'zelos')())
  File "/home/*********/*****/src/zelos/__main__.py", line 26, in main
    z.start(z.config.timeout)
  File "/home/*********/*****/src/zelos/api/zelos_api.py", line 355, in start
    return self.internal_engine.start(timeout=timeout)
  File "/home/*********/*****/src/zelos/engine.py", line 509, in start
    while self._should_continue():
  File "/home/*********/*****/src/zelos/engine.py", line 580, in _should_continue
    if self.scheduler._resolve_end_reasons() is False:
  File "/home/*********/*****/src/zelos/scheduler.py", line 99, in _resolve_end_reasons
    if action() is False:
  File "/home/*********/*****/src/zelos/ext/platforms/linux/kernel.py", line 261, in handle_syscall
    super().handle_syscall(*args, **kwargs)
  File "/home/*********/*****/src/zelos/ext/platforms/linux/kernel.py", line 133, in handle_syscall
    status = super(LinuxKernel, self).handle_syscall(process)
  File "/home/*********/*****/src/zelos/plugin/kernel_base.py", line 201, in handle_syscall
    raise e
  File "/home/*********/*****/src/zelos/plugin/kernel_base.py", line 192, in handle_syscall
    retval = sys_fn(self, process)
  File "/home/*********/*****/src/zelos/ext/platforms/linux/syscalls/syscalls.py", line 1173, in sys_recvfrom
    return socketcall.recvfrom(k, p, -1)
  File "/home/*********/*****/src/zelos/ext/platforms/linux/syscalls/syscalls_socket.py", line 449, in recvfrom
    sock = socket_handle.socket
AttributeError: 'NoneType' object has no attribute 'socket'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions