When I ran fuzzable create-harness examples/binaries/libbasic.so --symbol_name vulnerable_parse_buf --out_harness harness.c in the root directory, I got a TypeError which prevented further execution. I will submit a PR which I think fixes this issue.
Transcript:
❯ fuzzable create-harness examples/binaries/libbasic.so --symbol_name vulnerable_parse_buf --out_harness harness.c
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/benjis/code/trace-modeling-oss-fuzz-c/misc/fuzzable/fuzzable/__main__.py:313 in │
│ create_harness │
│ │
│ 310 │ │
│ 311 │ # if a binary, check if executable or library. if executable, use LIEF to │
│ 312 │ # copy, export the symbol and transform to shared object. │
│ ❱ 313 │ binary = lief.parse(target) │
│ 314 │ if binary is None: │
│ 315 │ │ error( │
│ 316 │ │ │ "Wrong filetype, or does not support synthesizing harnesses for C/C++ source │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ lief = <module 'lief' from │ │
│ │ '/home/benjis/code/trace-modeling-oss-fuzz-c/venv/lib64/python3.8/site-packag… │ │
│ │ out_harness = PosixPath('harness.c') │ │
│ │ out_so_name = None │ │
│ │ symbol_name = 'vulnerable_parse_buf' │ │
│ │ target = PosixPath('examples/binaries/libbasic.so') │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: PosixPath('examples/binaries/libbasic.so')
When I ran
fuzzable create-harness examples/binaries/libbasic.so --symbol_name vulnerable_parse_buf --out_harness harness.c
in the root directory, I got aTypeError
which prevented further execution. I will submit a PR which I think fixes this issue.Transcript: