Repository: angr/angr

Issue:
Error being raised while exploring ls
This error is being thrown after a simple exploration:


```
Traceback (most recent call last):
  File "try.py", line 5, in <module>
    sm.explore()
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/sim_manager.py", line 239, in explore
    self.run(stash=stash, n=n, **kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/sim_manager.py", line 261, in run
    self.step(stash=stash, **kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/misc/hookset.py", line 75, in __call__
    result = current_hook(self.func.__self__, *args, **kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/exploration_techniques/explorer.py", line 96, in step
    return simgr.step(stash=stash, extra_stop_points=base_extra_stop_points | self._extra_stop_points, **kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/misc/hookset.py", line 80, in __call__
    return self.func(*args, **kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/sim_manager.py", line 346, in step
    successors = self.step_state(state, successor_func=successor_func, **run_args)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/sim_manager.py", line 383, in step_state
    successors = self.successors(state, successor_func=successor_func, **run_args)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/sim_manager.py", line 422, in successors
    return self._project.factory.successors(state, **run_args)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/factory.py", line 60, in successors
    return self.default_engine.process(*args, **kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/engines/vex/light/slicing.py", line 19, in process
    return super().process(*args, **kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/engines/engine.py", line 149, in process
    self.process_successors(self.successors, **kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/engines/failure.py", line 21, in process_successors
    return super().process_successors(successors, **kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/engines/syscall.py", line 38, in process_successors
    return self.process_procedure(state, successors, sys_procedure, **kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/engines/procedure.py", line 37, in process_procedure
    inst = procedure.execute(state, successors, ret_to=ret_to, arguments=arguments)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/sim_procedure.py", line 230, in execute
    r = getattr(inst, inst.run_func)(*sim_args, **inst.kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/procedures/linux_kernel/iovec.py", line 21, in run
    if self.state.solver.is_true(self.state.solver.SLT(tmpres, 0)):
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/state_plugins/solver.py", line 126, in concrete_shortcut_bool
    return f(self, *args, **kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/state_plugins/sim_action_object.py", line 57, in ast_stripper
    return f(*new_args, **new_kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/state_plugins/solver.py", line 89, in wrapped_f
    return f(*args, **kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/angr/state_plugins/solver.py", line 585, in is_true
    return self._solver.is_true(e, extra_constraints=self._adjust_constraint_list(extra_constraints), exact=exact)
  File "/home/berlinm/.local/lib/python3.7/site-packages/claripy/frontend_mixins/concrete_handler_mixin.py", line 53, in is_true
    return super(ConcreteHandlerMixin, self).is_true(e, **kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/claripy/frontend_mixins/constraint_filter_mixin.py", line 60, in is_true
    return super(ConstraintFilterMixin, self).is_true(e, extra_constraints=ec, **kwargs)
  File "/home/berlinm/.local/lib/python3.7/site-packages/claripy/frontends/composite_frontend.py", line 349, in is_true
    r = ms.is_true(e, extra_constraints=extra_constraints, exact=exact)
  File "/home/berlinm/.local/lib/python3.7/site-packages/claripy/frontends/full_frontend.py", line 184, in is_true
    return e.is_true()
AttributeError: 'NotImplementedType' object has no attribute 'is_true'
```

**Environment Information.**
angr environment report
=============================
Date: 2020-12-30 12:39:53.872698
Running in virtual environment at /home/berlinm/.virtualenvs/angr
Platform: linux-x86_64
Python version: 3.7.9 (7e6e2bb30ac5, Nov 18 2020, 10:55:52)
[PyPy 7.3.3-beta0 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)]
######## angr #########
Python found it in /home/berlinm/.local/lib/python3.7/site-packages/angr
Pip version angr 9.0.5034
Couldn't find git info
######## ailment #########
Python found it in /home/berlinm/.local/lib/python3.7/site-packages/ailment
Pip version ailment 9.0.5034
Couldn't find git info
######## cle #########
Python found it in /home/berlinm/.local/lib/python3.7/site-packages/cle
Pip version cle 9.0.5034
Couldn't find git info
######## pyvex #########
Python found it in /home/berlinm/.local/lib/python3.7/site-packages/pyvex
Pip version pyvex 9.0.5034
Couldn't find git info
######## claripy #########
Python found it in /home/berlinm/.local/lib/python3.7/site-packages/claripy
Pip version claripy 9.0.5034
Couldn't find git info
######## archinfo #########
Python found it in /home/berlinm/.local/lib/python3.7/site-packages/archinfo
Pip version archinfo 9.0.5034
Couldn't find git info
######## z3 #########
Python found it in /home/berlinm/.local/lib/python3.7/site-packages/z3
Pip version z3-solver 4.8.9.0
Couldn't find git info
######## unicorn #########
Python found it in /home/berlinm/.local/lib/python3.7/site-packages/unicorn
Pip version unicorn 1.0.2rc4
Couldn't find git info
######### Native Module Info ##########
angr: <CDLL '/home/berlinm/.local/lib/python3.7/site-packages/angr/lib/angr_native.so', handle 61bfe90 at 0x638ebb8>
unicorn: <CDLL '/home/berlinm/.local/lib/python3.7/site-packages/unicorn/lib/libunicorn.so', handle 2393fd0 at 0x7fcacfae5da8>
pyvex: <cffi.api._make_ffi_library.<locals>.FFILibrary object at 0x00007fcad0b9b398>
z3: <CDLL '/home/berlinm/.local/lib/python3.7/site-packages/z3/lib/libz3.so', handle 2fc8df0 at 0x3206758>


**To Reproduce.**

project = angr.Project('ls')

sm = project.factory.simulation_manager(project.factory.call_state(0x404a70)) # Some function's address
sm.explore()


# The binary (inside the zip):
[ls.zip](https://github.com/angr/angr/files/5753958/ls.zip)







Discussion:

Resolving patch:
diff --git a/angr/procedures/linux_kernel/iovec.py b/angr/procedures/linux_kernel/iovec.py
--- a/angr/procedures/linux_kernel/iovec.py
+++ b/angr/procedures/linux_kernel/iovec.py
@@ -17,7 +17,7 @@ def run(self, fd, iovec, iovcnt):
         iovcnt = self.state.solver.eval(iovcnt)
         res = 0
         for element in self.state.mem[iovec].struct.iovec.array(iovcnt).resolved:
-            tmpres = self.inline_call(read, fd, element.iov_base, element.iov_len)
+            tmpres = self.inline_call(read, fd, element.iov_base, element.iov_len).ret_expr
             if self.state.solver.is_true(self.state.solver.SLT(tmpres, 0)):
                 return tmpres
 


Test patch: