nus-apr / CrashRepair

Security Vulnerability Repair via Concolic Execution and Code Mutations
11 stars 1 forks source link

Unable to parse fix constraint containing UINT_MAX (libtiff/CVE-2016-9532) #135

Closed rshariffdeen closed 1 year ago

rshariffdeen commented 1 year ago

Repair crashed

[2023-03-30 22:26:32.138] [info] parsing expression: ((@var(integer, rowsperstrip) * @var(integer, bytes_per_sample)) <= (UINT_MAX / (@var(integer, width) + 1)))
WARNING: unable to parse constraint string: ((@var(integer, rowsperstrip) * @var(integer, bytes_per_sample)) <= (UINT_MAX / (@var(integer, width) + 1)))
[2023-03-30 22:26:32.139] [warning] skipping fix location: unable to parse constraint: ((@var(integer, rowsperstrip) * @var(integer, bytes_per_sample)) <= (UINT_MAX / (@var(integer, width) + 1)))
[2023-03-30 22:26:32.139] [info] parsing expression: ((@result(integer)) <= (UINT_MAX / (@var(integer, width) + 1)))
WARNING: unable to parse constraint string: ((@result(integer)) <= (UINT_MAX / (@var(integer, width) + 1)))
[2023-03-30 22:26:32.140] [warning] skipping fix location: unable to parse constraint: ((@result(integer)) <= (UINT_MAX / (@var(integer, width) + 1)))
[2023-03-30 22:26:32.546] [info] saving fix localization to disk: /data/vulnloc/libtiff/CVE-2016-9532/analysis/localization.json
[2023-03-30 22:26:32.547] [info] saved fix localization to disk: /data/vulnloc/libtiff/CVE-2016-9532/analysis/localization.json
[2023-03-30 22:26:32.932] [info] writing linter report to disk
[2023-03-30 22:26:32.932] [info] wrote linter report to disk
2023-03-30 22:26:32.937 | INFO     | crashrepair.scenario:generate:418 - generating candidate repairs in implicated files: set()
2023-03-30 22:26:32.938 | DEBUG    | crashrepair.shell:__call__:38 - executing: /opt/crashrepair/bin/crashrepairfix --output-to /data/vulnloc/libtiff/CVE-2016-9532/candidates.json --localization-filename /data/vulnloc/libtiff/CVE-2016-9532/analysis/localization.json -p /data/vulnloc/libtiff/CVE-2016-9532/src/compile_commands.json  -extra-arg=-I/opt/llvm11/lib/clang/11.1.0/include/
LLVM ERROR: CommonOptionsParser: failed to parse command-line arguments. [CommonOptionsParser]: crashrepairfix: Not enough positional command line arguments specified!
Must specify at least 1 positional argument: See: /opt/crashrepair/bin/crashrepairfix --help

Aborted (core dumped)
ERROR: 
Traceback (most recent call last):
  File "shim.py", line 7, in <module>
  File "crashrepair/cli.py", line 139, in main
  File "crashrepair/cli.py", line 132, in main
  File "crashrepair/cli.py", line 19, in do_repair
  File "crashrepair/scenario.py", line 557, in repair
  File "crashrepair/scenario.py", line 433, in generate
AssertionError
[12] Failed to execute script 'shim' due to unhandled exception!
ChrisTimperley commented 1 year ago

FYI, I'm in the process of testing a fix for this issue.