AssertionError: Can't find displacement in lexp
- Dominant language
- Python
- Stars
- 750
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Description
Tried to run kernel fuzzing campaign using kretrowrite, but I cannot proceed with the following error.
```
(retro) ➜ retrowrite git:(master) ✗ ./fuzzing/kernel/fuzz-module.sh ext4
scripts/kconfig/conf --syncconfig Kconfig
...
Added function num_clusters_in_group
...
[*] ext4_destroy_inline_data_nolock needs redzone stack
[*] trace_event_raw_event_ext4_discard_preallocations needs redzone stack
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/user/retrowrite/rwtools/kasan/asantool.py", line 136, in
instrumenter.do_instrument()
File "/home/user/retrowrite/rwtools/kasan/instrument.py", line 685, in do_instrument
self.instrument_mem_accesses()
File "/home/user/retrowrite/rwtools/kasan/instrument.py", line 382, in instrument_mem_accesses
acsz, instruction, midx, free_registers, is_leaf)
File "/home/user/retrowrite/rwtools/kasan/instrument.py", line 263, in get_mem_instrumentation
assert False, 'Can\'t find displacement in lexp'
AssertionError: Can't find displacement in lexp
```
I tried to with not only ext4 but also several default kernel modules, but I cannot proceed with the same error.
I would appreciate it if you could tell me how to fix it.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running fuzzing/kernel/fuzz-module.sh with the ext4 module and reproduce the traceback in rwtools/kasan/asantool.py. Read instrument.py around do_instrument(), instrument_mem_accesses(), and get_mem_instrumentation(), especially the assertion at line 263. Done means the instrumentation run no longer fails at the displacement assertion and the kernel fuzzing campaign proceeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python
- Domain
- operating-systems, reverse-engineering, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100