Skip to content

Analysis not finnishing  #676

@StamesJames

Description

@StamesJames
  • I have searched open and closed issues for duplicates
  • I made sure that I am not using an old project version (DO: pull PhASAR, update git submodules, rebuild the project and check if the bug is still there)

Bug description

I try to find a the unchecked passing of a path string in the rust webbrowser crate state here https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-45299
for this I simply wrote the rust program

fn main() {
    webbrowser::open(".").expect("not opened");
}

and tried to analysis this by ifds-taint with the following analysis-config.json

{
    "name": "webbrowser_crate_analysis",
    "version": 1,
    "functions": [
        {
            "name": "_ZN10webbrowser4open17h0e8a15ef1f754f0bE",
            "params": {
                "source": [0]
            },
            "ret": "source"
        },
        {
            "name": "_ZN10webbrowser12open_browser17h8951a27df856dd11E",
            "params": {
                "sink": [1]
            }
        }
    ],
    "variables": []
  }

When I invoke a ifds-taint analysis with phasar-cli it seems to never stop runing

Steps to reproduce

  • download the provided files
  • run cargo build
  • link the generated .ll files into one .bc file with llvm-link
  • analysis the resulting file with
phasar-cli \
	-m path/to/your/llvm.bc \
	-D ifds-taint \
	--analysis-config=analysis-config.json \
	--entry-points _ZN20webbrowser_crate_vul4main17h90a227ee26bda623E

maybe the mangled names for the main and the analysed functions differ when you compile it.

Actual result: The analysis seems to not finish

Expected result: the analysis should find, that the parameter that is passed to the webbrowser open function is given unchecked to the open_browser function

Context (Environment)

Operating System:

  • Linux
  • Windows
  • macOS

Build Type:

  • cmake (in dockerfile)
  • bootstrap.sh
  • custom build

Example files

Files:
webbrowser-crate-vul.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions