Kitxuuu commited on
Commit
fd07905
·
verified ·
1 Parent(s): 65a5c59

Add files using upload-large-folder tool

Browse files
Files changed (20) hide show
  1. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/external-actions/run_fuzzers/action.yml +97 -0
  2. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/filestore/__init__.py +54 -0
  3. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/filestore/github_actions/upload.js +45 -0
  4. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/platform_config/__init__.py +124 -0
  5. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/platform_config/gcb.py +40 -0
  6. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/platform_config/github.py +146 -0
  7. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/platform_config/github_test.py +87 -0
  8. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/platform_config/gitlab.py +78 -0
  9. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/platform_config/platform_config_test.py +82 -0
  10. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/platform_config/standalone.py +33 -0
  11. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/test_data/TimeoutFuzzer.cpp +36 -0
  12. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/test_data/example_crash_fuzzer_bug_summary.txt +68 -0
  13. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/test_data/example_crash_fuzzer_output.txt +202 -0
  14. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/test_data/msan_crash_fuzzer_bug_summary.txt +22 -0
  15. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/test_data/msan_crash_fuzzer_output.txt +39 -0
  16. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/test_data/sarif_utils_msan_stack.txt +62 -0
  17. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/test_data/sarif_utils_systemd_stack.txt +302 -0
  18. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/experimental/SystemSan/PoEs/pytorch-lightning-1.5.10/Makefile +12 -0
  19. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/experimental/chronos/Dockerfile +18 -0
  20. local-test-tika-full-01-vuln_0/fuzz-tooling/infra/experimental/chronos/chronos.sh +81 -0
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/external-actions/run_fuzzers/action.yml ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # action.yml
2
+ name: 'run-fuzzers'
3
+ description: 'Runs fuzz target binaries for a specified length of time.'
4
+ inputs:
5
+ language:
6
+ description: 'Programming language project is written in.'
7
+ required: false
8
+ default: 'c++'
9
+ fuzz-seconds:
10
+ description: 'The total time allotted for fuzzing in seconds.'
11
+ required: true
12
+ default: 600
13
+ dry-run:
14
+ description: 'If set, run the action without actually reporting a failure.'
15
+ default: false
16
+ sanitizer:
17
+ description: 'The sanitizer to run the fuzzers with.'
18
+ default: 'address'
19
+ mode:
20
+ description: |
21
+ The mode to run the fuzzers with ("code-change", "batch", "coverage", or "prune").
22
+ "code-change" is for fuzzing a pull request or commit.
23
+ "batch" is for non-interactive fuzzing of an entire project.
24
+ "coverage" is for coverage generation.
25
+ "prune" is for corpus pruning.
26
+ required: false
27
+ default: 'code-change'
28
+ github-token:
29
+ description: |
30
+ Token for GitHub API. WARNING: THIS SHOULD NOT BE USED IN PRODUCTION YET
31
+ You should use "secrets.GITHUB_TOKEN" in your workflow file, do not
32
+ hardcode the token.
33
+ TODO(https://github.com/google/oss-fuzz/pull/5841#discussion_r639393361):
34
+ Document locking this down.
35
+ required: true
36
+ storage-repo:
37
+ description: |
38
+ The git repo to use for storing certain artifacts from fuzzing.
39
+ required: false
40
+ storage-repo-branch:
41
+ description: |
42
+ The branch of the git repo to use for storing certain artifacts from
43
+ fuzzing.
44
+ default: main
45
+ required: false
46
+ storage-repo-branch-coverage:
47
+ description: |
48
+ The branch of the git repo to use for storing coverage reports.
49
+ default: gh-pages
50
+ required: false
51
+ report-unreproducible-crashes:
52
+ description: 'If True, then unreproducible crashes will be reported.'
53
+ required: false
54
+ default: false
55
+ minimize-crashes:
56
+ description: 'If True, reportable crashes will be minimized.'
57
+ required: false
58
+ default: False
59
+ parallel-fuzzing:
60
+ description: "Whether to use all available cores for fuzzing."
61
+ required: false
62
+ default: false
63
+ output-sarif:
64
+ description: "Whether to output fuzzing results to SARIF."
65
+ required: false
66
+ default: false
67
+ report-timeouts:
68
+ description: "Whether to report fails due to timeout."
69
+ required: false
70
+ default: true
71
+ report-ooms:
72
+ description: "Whether to report fails due to OOM."
73
+ required: false
74
+ default: true
75
+ runs:
76
+ using: 'docker'
77
+ image: '../../../run_fuzzers.Dockerfile'
78
+ env:
79
+ OSS_FUZZ_PROJECT_NAME: ${{ inputs.oss-fuzz-project-name }}
80
+ LANGUAGE: ${{ inputs.language }}
81
+ FUZZ_SECONDS: ${{ inputs.fuzz-seconds }}
82
+ DRY_RUN: ${{ inputs.dry-run}}
83
+ SANITIZER: ${{ inputs.sanitizer }}
84
+ MODE: ${{ inputs.mode }}
85
+ GITHUB_TOKEN: ${{ inputs.github-token }}
86
+ LOW_DISK_SPACE: 'True'
87
+ GIT_STORE_REPO: ${{ inputs.storage-repo }}
88
+ GIT_STORE_BRANCH: ${{ inputs.storage-repo-branch }}
89
+ GIT_STORE_BRANCH_COVERAGE: ${{ inputs.storage-repo-branch-coverage }}
90
+ REPORT_UNREPRODUCIBLE_CRASHES: ${{ inputs.report-unreproducible-crashes }}
91
+ MINIMIZE_CRASHES: ${{ inputs.minimize-crashes }}
92
+ CIFUZZ_DEBUG: 'True'
93
+ CFL_PLATFORM: 'github'
94
+ PARALLEL_FUZZING: ${{ inputs.parallel-fuzzing }}
95
+ OUTPUT_SARIF: ${{ inputs.output-sarif }}
96
+ REPORT_TIMEOUTS: ${{ inputs.report-timeouts }}
97
+ REPORT_OOMS: ${{ inputs.report-ooms}}
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/filestore/__init__.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2021 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Module for a generic filestore."""
15
+
16
+
17
+ class FilestoreError(Exception):
18
+ """Error using the filestore."""
19
+
20
+
21
+ # pylint: disable=unused-argument,no-self-use
22
+ class BaseFilestore:
23
+ """Base class for a filestore."""
24
+
25
+ def __init__(self, config):
26
+ self.config = config
27
+
28
+ def upload_crashes(self, name, directory):
29
+ """Uploads the crashes at |directory| to |name|."""
30
+ raise NotImplementedError('Child class must implement method.')
31
+
32
+ def upload_corpus(self, name, directory, replace=False):
33
+ """Uploads the corpus at |directory| to |name|."""
34
+ raise NotImplementedError('Child class must implement method.')
35
+
36
+ def upload_build(self, name, directory):
37
+ """Uploads the build at |directory| to |name|."""
38
+ raise NotImplementedError('Child class must implement method.')
39
+
40
+ def upload_coverage(self, name, directory):
41
+ """Uploads the coverage report at |directory| to |name|."""
42
+ raise NotImplementedError('Child class must implement method.')
43
+
44
+ def download_corpus(self, name, dst_directory):
45
+ """Downloads the corpus located at |name| to |dst_directory|."""
46
+ raise NotImplementedError('Child class must implement method.')
47
+
48
+ def download_build(self, name, dst_directory):
49
+ """Downloads the build with |name| to |dst_directory|."""
50
+ raise NotImplementedError('Child class must implement method.')
51
+
52
+ def download_coverage(self, name, dst_directory):
53
+ """Downloads the latest project coverage report."""
54
+ raise NotImplementedError('Child class must implement method.')
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/filestore/github_actions/upload.js ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env node
2
+ // Copyright 2021 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // http://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ // Script for uploading an artifact. Returns 0 on success.
16
+ // Usage: upload.js <artifactName> <rootDirectory> <file 1>...<file N>
17
+
18
+ const fs = require('fs');
19
+ const { DefaultArtifactClient } = require('@actions/artifact');
20
+
21
+ const artifactClient = new DefaultArtifactClient();
22
+ const artifactName = process.argv[2];
23
+ const rootDirectory = process.argv[3]
24
+ const files = process.argv.slice(4);
25
+ const options = {
26
+ continueOnError: true
27
+ };
28
+
29
+ async function uploadArtifact() {
30
+ try {
31
+ const uploadResult = await artifactClient.uploadArtifact(artifactName, files, rootDirectory, options);
32
+ console.log(uploadResult);
33
+ if (uploadResult.failedItems.length > 0) {
34
+ return 1;
35
+ }
36
+ return 0;
37
+ } catch (error) {
38
+ console.error('Error uploading artifact:', error);
39
+ return 1;
40
+ }
41
+ }
42
+
43
+ uploadArtifact().then(exitCode => {
44
+ process.exit(exitCode);
45
+ });
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/platform_config/__init__.py ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2021 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Module for getting the configuration CIFuzz needs to run."""
15
+ import logging
16
+ import os
17
+
18
+ import environment
19
+
20
+
21
+ class BasePlatformConfig:
22
+ """Base class for PlatformConfig subclasses."""
23
+
24
+ @property
25
+ def project_src_path(self):
26
+ """Returns the manually checked out path of the project's source if
27
+ specified or None."""
28
+ path = os.getenv('PROJECT_SRC_PATH')
29
+ if not path:
30
+ logging.debug('No PROJECT_SRC_PATH.')
31
+ return path
32
+
33
+ logging.debug('PROJECT_SRC_PATH: %s.', path)
34
+ return path
35
+
36
+ @property
37
+ def workspace(self):
38
+ """Returns the workspace."""
39
+ return os.getenv('WORKSPACE')
40
+
41
+ # Optional config variables.
42
+
43
+ @property
44
+ def git_sha(self):
45
+ """Returns the Git SHA to checkout and fuzz. This is used only by GitHub
46
+ projects when commit fuzzing. It is not used when PR fuzzing. It is
47
+ definitely needed by OSS-Fuzz on GitHub since they have no copy of the repo
48
+ on the host and the repo on the builder image is a clone from main/master.
49
+ Right now it is needed by external on GitHub because we need to clone a new
50
+ repo because the copy they give us doesn't work for diffing.
51
+
52
+ TODO(metzman): Try to eliminate the need for this by 1. Making the clone
53
+ from external github projects usable. 2. Forcing OSS-Fuzz on Github to clone
54
+ before starting CIFuzz."""
55
+ return None
56
+
57
+ @property
58
+ def base_commit(self):
59
+ """Returns the base commit to diff against (commit fuzzing)."""
60
+ # TODO(metzman) Rename base_commit to git_base_commit.
61
+ return os.getenv('GIT_BASE_COMMIT')
62
+
63
+ @property
64
+ def base_ref(self):
65
+ """Returns the base branch to diff against (pr fuzzing)."""
66
+ # TODO(metzman) Rename base_ref to git_base_ref.
67
+ return os.getenv('GIT_BASE_REF')
68
+
69
+ @property
70
+ def pr_ref(self):
71
+ """Returns the pull request to checkout and fuzz. This is used only by
72
+ GitHub projects when PR fuzzing. It is not used when commit fuzzing. It is
73
+ definitely needed by OSS-Fuzz on GitHub since they have no copy of the repo
74
+ on the host and the repo on the builder image is a clone from main/master.
75
+ Right now it is needed by external on GitHub because we need to clone a new
76
+ repo because the copy they give us doesn't work for diffing.
77
+
78
+ TODO(metzman): Try to eliminate the need for this by 1. Making the clone
79
+ from external github projects usable. 2. Forcing OSS-Fuzz on Github to clone
80
+ before starting CIFuzz."""
81
+ return None
82
+
83
+ @property
84
+ def project_repo_owner(self):
85
+ """Returns the project repo owner (githubism)."""
86
+ return None
87
+
88
+ @property
89
+ def project_repo_name(self):
90
+ """Returns the project repo name."""
91
+ return os.environ.get('REPOSITORY')
92
+
93
+ @property
94
+ def actor(self):
95
+ """Name of the actor for the CI."""
96
+ return None
97
+
98
+ @property
99
+ def token(self):
100
+ """Returns the CI API token."""
101
+ return None
102
+
103
+ @property
104
+ def docker_in_docker(self):
105
+ """Returns whether or not CFL is running using Docker in Docker."""
106
+ return environment.get_bool('DOCKER_IN_DOCKER', False)
107
+
108
+ @property
109
+ def filestore(self):
110
+ """Returns the filestore used to store persistent data."""
111
+ return os.environ.get('FILESTORE')
112
+
113
+ @property
114
+ def git_url(self):
115
+ """Returns the repo URL. This is only used by GitHub users. Right now it is
116
+ needed by external on GitHub because we need to clone a new repo because the
117
+ copy they give us doesn't work for diffing. It isn't used by OSS-Fuzz on
118
+ github users since the Git URL is determined using repo detection.
119
+
120
+ TODO(metzman): Try to eliminate the need for this by making the clone
121
+ from external github projects usable.
122
+ TODO(metzman): As an easier goal, maybe make OSS-Fuzz GitHub use this too
123
+ for: 1. Consistency 2. Maybe it will allow use on forks."""
124
+ return None
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/platform_config/gcb.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2021 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Module for getting the configuration CIFuzz needs to run on Github."""
15
+ import logging
16
+ import os
17
+
18
+ import platform_config
19
+
20
+
21
+ class PlatformConfig(platform_config.BasePlatformConfig):
22
+ """CI environment for Google Cloud Build."""
23
+
24
+ @property
25
+ def project_src_path(self):
26
+ """Returns the manually checked out path of the project's source if
27
+ specified or the default."""
28
+ project_src_path = os.getenv('PROJECT_SRC_PATH', '/workspace')
29
+ logging.debug('PROJECT_SRC_PATH: %s.', project_src_path)
30
+ return project_src_path
31
+
32
+ @property
33
+ def workspace(self):
34
+ """Returns the workspace."""
35
+ return os.getenv('WORKSPACE', '/builder/home')
36
+
37
+ @property
38
+ def filestore(self):
39
+ """Returns the filestore used to store persistent data."""
40
+ return os.environ.get('FILESTORE', 'gsutil')
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/platform_config/github.py ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2021 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Module for getting the configuration CIFuzz needs to run on Github."""
15
+ import json
16
+ import logging
17
+ import os
18
+
19
+ import platform_config
20
+
21
+
22
+ def _get_github_event_path():
23
+ return os.getenv('GITHUB_EVENT_PATH')
24
+
25
+
26
+ def _get_event_data():
27
+ """Returns the GitHub event data."""
28
+ github_event_path = _get_github_event_path()
29
+ with open(github_event_path, encoding='utf-8') as file_handle:
30
+ return json.load(file_handle)
31
+
32
+
33
+ class PlatformConfig(platform_config.BasePlatformConfig):
34
+ """CI environment for GitHub."""
35
+
36
+ def __init__(self):
37
+ self._event_data = _get_event_data()
38
+ self._event = os.getenv('GITHUB_EVENT_NAME')
39
+
40
+ @property
41
+ def workspace(self):
42
+ """Returns the workspace."""
43
+ return os.getenv('GITHUB_WORKSPACE')
44
+
45
+ @property
46
+ def git_sha(self):
47
+ """Returns the Git SHA to checkout and fuzz. This is used only by GitHub
48
+ projects when commit fuzzing. It is not used when PR fuzzing. It is
49
+ definitely needed by OSS-Fuzz on GitHub since they have no copy of the repo
50
+ on the host and the repo on the builder image is a clone from main/master.
51
+ Right now it is needed by external on GitHub because we need to clone a new
52
+ repo because the copy they give us doesn't work for diffing.
53
+
54
+ TODO(metzman): Try to eliminate the need for this by 1. Making the clone
55
+ from external github projects usable. 2. Forcing OSS-Fuzz on Github to clone
56
+ before starting CIFuzz."""
57
+ return os.getenv('GITHUB_SHA')
58
+
59
+ @property
60
+ def actor(self):
61
+ """Name of the actor for the CI."""
62
+ return os.getenv('GITHUB_ACTOR')
63
+
64
+ @property
65
+ def token(self):
66
+ """Returns the CI API token."""
67
+ return os.getenv('GITHUB_TOKEN')
68
+
69
+ @property
70
+ def project_src_path(self):
71
+ """Returns the manually checked out path of the project's source if
72
+ specified or None. The path returned is relative to |self.workspace| since
73
+ on github the checkout will be relative to there."""
74
+ project_src_path = super().project_src_path
75
+ if project_src_path is None:
76
+ # Not set for internal GitHub users.
77
+ return project_src_path
78
+ # On GitHub (external users), this path is relative to |workspace|.
79
+ return os.path.join(self.workspace, project_src_path)
80
+
81
+ @property
82
+ def _project_repo_owner_and_name(self):
83
+ """Returns a tuple containing the project repo owner and the name of the
84
+ repo."""
85
+ # On GitHub this includes owner and repo name.
86
+ repository = os.getenv('GITHUB_REPOSITORY')
87
+ # Use os.path.split to split owner from repo.
88
+ return os.path.split(repository)
89
+
90
+ @property
91
+ def project_repo_owner(self):
92
+ """Returns the project repo owner (githubism)."""
93
+ return self._project_repo_owner_and_name[0]
94
+
95
+ @property
96
+ def project_repo_name(self):
97
+ """Returns the project repo name."""
98
+ return self._project_repo_owner_and_name[1]
99
+
100
+ @property
101
+ def git_url(self):
102
+ """Returns the repo URL. This is only used by GitHub users. Right now it is
103
+ needed by external on GitHub because we need to clone a new repo because the
104
+ copy they give us doesn't work for diffing. It isn't used by OSS-Fuzz on
105
+ github users since the Git URL is determined using repo detection.
106
+
107
+ TODO(metzman): Try to eliminate the need for this by making the clone
108
+ from external github projects usable.
109
+ TODO(metzman): As an easier goal, maybe make OSS-Fuzz GitHub use this too
110
+ for: 1. Consistency 2. Maybe it will allow use on forks."""
111
+ repository = os.getenv('GITHUB_REPOSITORY')
112
+ github_server_url = os.getenv('GITHUB_SERVER_URL', 'https://github.com')
113
+ # TODO(metzman): Probably need to change this to github.server_url.
114
+ return os.path.join(github_server_url, repository)
115
+
116
+ @property
117
+ def base_commit(self):
118
+ """Returns the base commit to diff against (commit fuzzing)."""
119
+ base_commit = None
120
+ if self._event == 'push':
121
+ base_commit = self._event_data['before']
122
+ logging.debug('base_commit: %s', base_commit)
123
+ return base_commit
124
+
125
+ @property
126
+ def pr_ref(self):
127
+ """Returns the pull request to checkout and fuzz. This is used only by
128
+ GitHub projects when PR fuzzing. It is not used when commit fuzzing. It is
129
+ definitely needed by OSS-Fuzz on GitHub since they have no copy of the repo
130
+ on the host and the repo on the builder image is a clone from main/master.
131
+ Right now it is needed by external on GitHub because we need to clone a new
132
+ repo because the copy they give us doesn't work for diffing.
133
+
134
+ TODO(metzman): Try to eliminate the need for this by 1. Making the clone
135
+ from external github projects usable. 2. Forcing OSS-Fuzz on Github to clone
136
+ before starting CIFuzz."""
137
+ if self._event == 'pull_request':
138
+ pr_ref = f'refs/pull/{self._event_data["pull_request"]["number"]}/merge'
139
+ logging.debug('pr_ref: %s', pr_ref)
140
+ return pr_ref
141
+ return None
142
+
143
+ @property
144
+ def base_ref(self):
145
+ """Returns the base branch to diff against (pr fuzzing)."""
146
+ return os.getenv('GITHUB_BASE_REF')
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/platform_config/github_test.py ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2021 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Tests for platform_config.github."""
15
+ import os
16
+ import unittest
17
+ from unittest import mock
18
+
19
+ import platform_config.github
20
+ import test_helpers
21
+
22
+ # pylint: disable=arguments-differ
23
+
24
+
25
+ class GetProjectRepoOwnerAndNameTest(unittest.TestCase):
26
+ """Tests for get_project_repo_owner and get_project_repo_name."""
27
+
28
+ @mock.patch('platform_config.github._get_event_data', return_value={})
29
+ def setUp(self, _):
30
+ test_helpers.patch_environ(self)
31
+ self.repo_owner = 'repo-owner'
32
+ self.repo_name = 'repo-name'
33
+ os.environ['GITHUB_REPOSITORY'] = f'{self.repo_owner}/{self.repo_name}'
34
+ self.platform_conf = platform_config.github.PlatformConfig()
35
+
36
+ def test_github_repository_owner(self):
37
+ """Tests that the correct result is returned when repository contains the
38
+ owner and repo name (as it does on GitHub)."""
39
+ self.assertEqual(self.platform_conf.project_repo_owner, self.repo_owner)
40
+
41
+ def test_github_repository_name(self):
42
+ """Tests that the correct result is returned when repository contains the
43
+ owner and repo name (as it does on GitHub)."""
44
+ os.environ['GITHUB_REPOSITORY'] = f'{self.repo_owner}/{self.repo_name}'
45
+ self.assertEqual(self.platform_conf.project_repo_name, self.repo_name)
46
+
47
+
48
+ class ProjectSrcPathTest(unittest.TestCase):
49
+ """Tests for project_src_path."""
50
+
51
+ def setUp(self):
52
+ test_helpers.patch_environ(self)
53
+ self.workspace = '/workspace'
54
+ os.environ['GITHUB_WORKSPACE'] = self.workspace
55
+ self.project_src_dir_name = 'project-src'
56
+
57
+ @mock.patch('platform_config.github._get_event_data', return_value={})
58
+ def test_github_unset(self, _):
59
+ """Tests that project_src_path returns None when no PROJECT_SRC_PATH is
60
+ set."""
61
+ github_env = platform_config.github.PlatformConfig()
62
+ self.assertIsNone(github_env.project_src_path)
63
+
64
+ @mock.patch('platform_config.github._get_event_data', return_value={})
65
+ def test_github(self, _):
66
+ """Tests that project_src_path returns the correct result on GitHub."""
67
+ os.environ['PROJECT_SRC_PATH'] = self.project_src_dir_name
68
+ expected_project_src_path = os.path.join(self.workspace,
69
+ self.project_src_dir_name)
70
+ github_env = platform_config.github.PlatformConfig()
71
+ self.assertEqual(github_env.project_src_path, expected_project_src_path)
72
+
73
+
74
+ class GetGitUrlTest(unittest.TestCase):
75
+ """Tests for GenericPlatformConfig.git_url."""
76
+
77
+ @mock.patch('platform_config.github._get_event_data', return_value={})
78
+ def setUp(self, _):
79
+ test_helpers.patch_environ(self)
80
+ self.platform_conf = platform_config.github.PlatformConfig()
81
+
82
+ def test_repository(self):
83
+ """Tests that the correct result is returned when repository contains the
84
+ owner and repo name (as it does on GitHub)."""
85
+ os.environ['GITHUB_REPOSITORY'] = 'repo/owner'
86
+ self.assertEqual('https://github.com/repo/owner',
87
+ self.platform_conf.git_url)
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/platform_config/gitlab.py ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2022 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Module for getting the configuration CIFuzz needs to run on GitLab."""
15
+ import logging
16
+ import os
17
+
18
+ import environment
19
+ import platform_config
20
+
21
+
22
+ class PlatformConfig(platform_config.BasePlatformConfig):
23
+ """CI environment for GitLab."""
24
+
25
+ @property
26
+ def workspace(self):
27
+ """Returns the workspace."""
28
+ return os.path.join(os.getenv('CI_BUILDS_DIR'), os.getenv('CI_JOB_ID'))
29
+
30
+ @property
31
+ def git_sha(self):
32
+ """Returns the Git SHA to checkout and fuzz."""
33
+ return os.getenv('CI_COMMIT_SHA')
34
+
35
+ @property
36
+ def project_src_path(self):
37
+ """Returns the directory with the source of the project"""
38
+ return os.getenv('CI_PROJECT_DIR')
39
+
40
+ @property
41
+ def token(self):
42
+ """Returns the job token"""
43
+ return os.getenv('CI_JOB_TOKEN')
44
+
45
+ @property
46
+ def project_repo_name(self):
47
+ """Returns the project's name"""
48
+ return os.getenv('CI_PROJECT_NAME')
49
+
50
+ @property
51
+ def base_commit(self):
52
+ """Returns the previous commit sha for commit-fuzzing"""
53
+ base_commit = None
54
+ if os.getenv('CI_PIPELINE_SOURCE') == 'push':
55
+ base_commit = os.getenv('CI_COMMIT_BEFORE_SHA')
56
+ logging.debug('base_commit: %s.', base_commit)
57
+ return base_commit
58
+
59
+ @property
60
+ def base_ref(self):
61
+ """Returns the base commit sha for a merge request"""
62
+ # Could also be CI_MERGE_REQUEST_TARGET_BRANCH_NAME.
63
+ return os.getenv('CI_MERGE_REQUEST_DIFF_BASE_SHA')
64
+
65
+ @property
66
+ def filestore(self):
67
+ """Returns the filestore used to store persistent data."""
68
+ return os.environ.get('FILESTORE', 'gitlab')
69
+
70
+ @property
71
+ def artifacts_dir(self):
72
+ """Gitlab: returns the directory to put artifacts"""
73
+ return environment.get('CFL_ARTIFACTS_DIR', 'artifacts')
74
+
75
+ @property
76
+ def cache_dir(self):
77
+ """Gitlab: returns the directory to use as cache"""
78
+ return environment.get('CFL_CACHE_DIR', 'cache')
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/platform_config/platform_config_test.py ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2021 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Tests for platform_config."""
15
+ import os
16
+ import unittest
17
+
18
+ import platform_config
19
+ import test_helpers
20
+
21
+
22
+ class GetProjectRepoOwnerAndNameTest(unittest.TestCase):
23
+ """Tests for get_project_repo_owner and get_project_repo_name."""
24
+
25
+ def setUp(self):
26
+ test_helpers.patch_environ(self)
27
+ self.repo_owner = 'repo-owner'
28
+ self.repo_name = 'repo-name'
29
+ self.env = platform_config.BasePlatformConfig()
30
+
31
+ def test_unset_repository(self):
32
+ """Tests that the correct result is returned when repository is not set."""
33
+ self.assertIsNone(self.env.project_repo_name)
34
+
35
+ def test_owner(self):
36
+ """Tests that the correct result is returned for owner."""
37
+ self.assertIsNone(self.env.project_repo_owner)
38
+
39
+ def test_empty_repository(self):
40
+ """Tests that the correct result is returned when repository is an empty
41
+ string."""
42
+ os.environ['REPOSITORY'] = ''
43
+ self.assertEqual(self.env.project_repo_name, '')
44
+
45
+ def test_repository(self):
46
+ """Tests that the correct result is returned when repository contains the
47
+ just the repo name (as it does outside of GitHub)."""
48
+ os.environ['REPOSITORY'] = self.repo_name
49
+ self.assertEqual(self.env.project_repo_name, self.repo_name)
50
+
51
+
52
+ class ProjectSrcPathTest(unittest.TestCase):
53
+ """Tests for project_src_path."""
54
+
55
+ def setUp(self):
56
+ test_helpers.patch_environ(self)
57
+
58
+ def test_not_github(self):
59
+ """Tests that project_src_path returns the correct result not on
60
+ GitHub."""
61
+ project_src_path = 'project-src'
62
+ os.environ['PROJECT_SRC_PATH'] = project_src_path
63
+ generic_ci_env = platform_config.BasePlatformConfig()
64
+ self.assertEqual(generic_ci_env.project_src_path, project_src_path)
65
+
66
+
67
+ class GetGitUrlTest(unittest.TestCase):
68
+ """Tests for BasePlatformConfig.git_url."""
69
+
70
+ def setUp(self):
71
+ test_helpers.patch_environ(self)
72
+ self.env = platform_config.BasePlatformConfig()
73
+
74
+ def test_unset_repository(self):
75
+ """Tests that the correct result is returned when repository is not set."""
76
+ self.assertEqual(self.env.git_url, None)
77
+
78
+ def test_repository(self):
79
+ """Tests that the correct result is returned when GITHUB_REPOSITORY is
80
+ set."""
81
+ os.environ['GITHUB_REPOSITORY'] = 'repo/owner'
82
+ self.assertIsNone(self.env.git_url)
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/platform_config/standalone.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2022 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Module for getting the configuration CIFuzz needs to run standalone."""
15
+ import os
16
+
17
+ import platform_config
18
+
19
+ # pylint: disable=too-few-public-methods
20
+
21
+
22
+ class PlatformConfig(platform_config.BasePlatformConfig):
23
+ """CI environment for Standalone."""
24
+
25
+ @property
26
+ def filestore(self):
27
+ """Returns the filestore used to store persistent data."""
28
+ return os.environ.get('FILESTORE', 'filesystem')
29
+
30
+ @property
31
+ def filestore_root_dir(self):
32
+ """Returns the filestore used to store persistent data."""
33
+ return os.environ['FILESTORE_ROOT_DIR']
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/test_data/TimeoutFuzzer.cpp ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2021 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ // Example of a standalone runner for "fuzz targets".
16
+ // It reads all files passed as parameters and feeds their contents
17
+ // one by one into the fuzz target (LLVMFuzzerTestOneInput).
18
+ // This runner does not do any fuzzing, but allows us to run the fuzz target
19
+ // on the test corpus (e.g. "do_stuff_test_data") or on a single file,
20
+ // e.g. the one that comes from a bug report.
21
+
22
+ // This is a fuzz target that times out on every input by infinite looping.
23
+ // This is used for testing.
24
+ // Build instructions:
25
+ // 1. clang++ -fsanitize=fuzzer TimeoutFuzzer.cpp -o timeout_fuzzer
26
+ // 2. strip timeout_fuzzer
27
+ // The binary is stripped to save space in the git repo.
28
+
29
+ #include <stddef.h>
30
+ #include <stdint.h>
31
+
32
+ extern "C" int LLVMFuzzerTestOneInput(uint8_t* data, size_t size) {
33
+ while (true)
34
+ ;
35
+ return 0;
36
+ }
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/test_data/example_crash_fuzzer_bug_summary.txt ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ AddressSanitizer: heap-buffer-overflow on address 0x62500001b530 at pc 0x00000052138a bp 0x7ffe62db2c10 sp 0x7ffe62db23d8
2
+ READ of size 52 at 0x62500001b530 thread T0
3
+ SCARINESS: 26 (multi-byte-read-heap-buffer-overflow)
4
+ #0 0x521389 in __asan_memcpy /src/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3
5
+ #1 0x567590 in yr_object_set_string /src/yara/libyara/object.c:1122:5
6
+ #2 0x5afced in dex_parse /src/yara/libyara/modules/dex/dex.c:781:5
7
+ #3 0x5b4a8b in dex__load /src/yara/libyara/modules/dex/dex.c:1218:7
8
+ #4 0x56537c in yr_modules_load /src/yara/libyara/modules.c:179:16
9
+ #5 0x5d6583 in yr_execute_code /src/yara/libyara/exec.c:1276:18
10
+ #6 0x56f5c0 in yr_scanner_scan_mem_blocks /src/yara/libyara/scanner.c:444:3
11
+ #7 0x56bf23 in yr_rules_scan_mem_blocks /src/yara/libyara/rules.c:235:12
12
+ #8 0x56c182 in yr_rules_scan_mem /src/yara/libyara/rules.c:285:10
13
+ #9 0x5548d2 in LLVMFuzzerTestOneInput /src/yara/tests/oss-fuzz/dex_fuzzer.cc:40:3
14
+ #10 0x45a3b1 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:556:15
15
+ #11 0x459ad5 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:470:3
16
+ #12 0x45be77 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:698:19
17
+ #13 0x45cc05 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:830:5
18
+ #14 0x44ac88 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:824:6
19
+ #15 0x474ab2 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:19:10
20
+ #16 0x7f4409b7a82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
21
+ #17 0x41e348 in _start (out/dex_fuzzer+0x41e348)
22
+
23
+ 0x62500001b530 is located 0 bytes to the right of 9264-byte region [0x625000019100,0x62500001b530)
24
+ allocated by thread T0 here:
25
+ #0 0x521f4d in malloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
26
+ #1 0x4331b7 in operator new(unsigned long) (out/dex_fuzzer+0x4331b7)
27
+ #2 0x459ad5 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:470:3
28
+ #3 0x45be77 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:698:19
29
+ #4 0x45cc05 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:830:5
30
+ #5 0x44ac88 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:824:6
31
+ #6 0x474ab2 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:19:10
32
+ #7 0x7f4409b7a82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
33
+
34
+ SUMMARY: AddressSanitizer: heap-buffer-overflow /src/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3 in __asan_memcpy
35
+ Shadow bytes around the buggy address:
36
+ 0x0c4a7fffb650: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
37
+ 0x0c4a7fffb660: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
38
+ 0x0c4a7fffb670: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
39
+ 0x0c4a7fffb680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
40
+ 0x0c4a7fffb690: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
41
+ =>0x0c4a7fffb6a0: 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa fa fa
42
+ 0x0c4a7fffb6b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
43
+ 0x0c4a7fffb6c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
44
+ 0x0c4a7fffb6d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
45
+ 0x0c4a7fffb6e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
46
+ 0x0c4a7fffb6f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
47
+
48
+ Shadow byte legend (one shadow byte represents 8 application bytes):
49
+ Addressable: 00
50
+ Partially addressable: 01 02 03 04 05 06 07
51
+ Heap left redzone: fa
52
+ Freed heap region: fd
53
+ Stack left redzone: f1
54
+ Stack mid redzone: f2
55
+ Stack right redzone: f3
56
+ Stack after return: f5
57
+ Stack use after scope: f8
58
+ Global redzone: f9
59
+ Global init order: f6
60
+ Poisoned by user: f7
61
+ Container overflow: fc
62
+ Array cookie: ac
63
+ Intra object redzone: bb
64
+ ASan internal: fe
65
+ Left alloca redzone: ca
66
+ Right alloca redzone: cb
67
+ Shadow gap: cc
68
+ ==12==ABORTING
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/test_data/example_crash_fuzzer_output.txt ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /github/workspace/build-out/do_stuff_fuzzer -timeout=25 -rss_limit_mb=2560 -dict=/github/workspace/build-out/do_stuff_fuzzer.dict -len_control=0 -seed=1337 -artifact_prefix=/tmp/tmp9p1w4p8r/ -max_total_time=600 -print_final_stats=1 /github/workspace/cifuzz-corpus/do_stuff_fuzzer >fuzz-0.log 2>&1
2
+ ================== Job 0 exited with exit code 77 ============
3
+ Dictionary: 3 entries
4
+ INFO: Running with entropic power schedule (0xFF, 100).
5
+ INFO: Seed: 1337
6
+ INFO: Loaded 1 modules (86 inline 8-bit counters): 86 [0x6150e0, 0x615136),
7
+ INFO: Loaded 1 PC tables (86 PCs): 86 [0x5c8b08,0x5c9068),
8
+ INFO: 5 files found in /github/workspace/cifuzz-corpus/do_stuff_fuzzer
9
+ INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
10
+ INFO: seed corpus: files: 5 min: 3b max: 44b total: 64b rss: 31Mb
11
+ #6 INITED cov: 64 ft: 70 corp: 5/64b exec/s: 0 rss: 32Mb
12
+ #9 NEW cov: 64 ft: 72 corp: 6/74b lim: 4096 exec/s: 0 rss: 32Mb L: 10/44 MS: 3 ChangeBit-InsertByte-ManualDict- DE: "foo"-
13
+ #17 NEW cov: 64 ft: 74 corp: 7/86b lim: 4096 exec/s: 0 rss: 32Mb L: 12/44 MS: 3 ChangeBit-ManualDict-PersAutoDict- DE: "ouch"-"foo"-
14
+ #18 NEW cov: 64 ft: 76 corp: 8/100b lim: 4096 exec/s: 0 rss: 32Mb L: 14/44 MS: 1 CrossOver-
15
+ #22 NEW cov: 64 ft: 78 corp: 9/141b lim: 4096 exec/s: 0 rss: 32Mb L: 41/44 MS: 4 InsertRepeatedBytes-CopyPart-ChangeBinInt-ChangeBit-
16
+ #24 NEW cov: 64 ft: 80 corp: 10/151b lim: 4096 exec/s: 0 rss: 32Mb L: 10/44 MS: 2 CrossOver-CopyPart-
17
+ #28 NEW cov: 64 ft: 81 corp: 11/171b lim: 4096 exec/s: 0 rss: 32Mb L: 20/44 MS: 4 InsertByte-PersAutoDict-ShuffleBytes-ManualDict- DE: "foo"-"ouch"-
18
+ #43 NEW cov: 65 ft: 83 corp: 12/175b lim: 4096 exec/s: 0 rss: 32Mb L: 4/44 MS: 5 InsertByte-ChangeBit-ManualDict-ManualDict-EraseBytes- DE: "bar"-"bar"-
19
+ #54 NEW cov: 65 ft: 84 corp: 13/191b lim: 4096 exec/s: 0 rss: 32Mb L: 16/44 MS: 1 CrossOver-
20
+ #64 NEW cov: 65 ft: 86 corp: 14/209b lim: 4096 exec/s: 0 rss: 32Mb L: 18/44 MS: 5 InsertByte-ChangeBinInt-CMP-PersAutoDict-CopyPart- DE: "\000\000"-"foo"-
21
+ #75 REDUCE cov: 65 ft: 86 corp: 14/203b lim: 4096 exec/s: 0 rss: 32Mb L: 35/44 MS: 1 EraseBytes-
22
+ #76 REDUCE cov: 65 ft: 86 corp: 14/195b lim: 4096 exec/s: 0 rss: 32Mb L: 36/36 MS: 1 EraseBytes-
23
+ =================================================================
24
+ ==26==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000003114 at pc 0x00000056d1db bp 0x7fffd6a72bf0 sp 0x7fffd6a72be8
25
+ READ of size 4 at 0x603000003114 thread T0
26
+ SCARINESS: 17 (4-byte-read-heap-buffer-overflow)
27
+ #0 0x56d1da in DoStuff(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /src/cifuzz-example/my_api.cpp:26:10
28
+ #1 0x56c5d6 in LLVMFuzzerTestOneInput /src/cifuzz-example/do_stuff_fuzzer.cpp:15:3
29
+ #2 0x43de23 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
30
+ #3 0x43d60a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
31
+ #4 0x43ecd9 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:757:19
32
+ #5 0x43f9a5 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:895:5
33
+ #6 0x42ed0f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
34
+ #7 0x458362 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
35
+ #8 0x7fcfaa2aa082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
36
+ #9 0x41f74d in _start (build-out/do_stuff_fuzzer+0x41f74d)
37
+
38
+ DEDUP_TOKEN: DoStuff(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)--LLVMFuzzerTestOneInput--fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long)
39
+ 0x603000003114 is located 0 bytes to the right of 20-byte region [0x603000003100,0x603000003114)
40
+ allocated by thread T0 here:
41
+ #0 0x569dfd in operator new(unsigned long) /src/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:95:3
42
+ #1 0x56c9d4 in __libcpp_operator_new<unsigned long> /usr/local/bin/../include/c++/v1/new:245:10
43
+ #2 0x56c9d4 in __libcpp_allocate /usr/local/bin/../include/c++/v1/new:271:10
44
+ #3 0x56c9d4 in allocate /usr/local/bin/../include/c++/v1/__memory/allocator.h:105:38
45
+ #4 0x56c9d4 in allocate /usr/local/bin/../include/c++/v1/__memory/allocator_traits.h:262:20
46
+ #5 0x56c9d4 in __vallocate /usr/local/bin/../include/c++/v1/vector:931:37
47
+ #6 0x56c9d4 in vector /usr/local/bin/../include/c++/v1/vector:1236:9
48
+ #7 0x56c9d4 in DoStuff(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /src/cifuzz-example/my_api.cpp:14:20
49
+ #8 0x56c5d6 in LLVMFuzzerTestOneInput /src/cifuzz-example/do_stuff_fuzzer.cpp:15:3
50
+ #9 0x43de23 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
51
+ #10 0x43d60a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
52
+ #11 0x43ecd9 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:757:19
53
+ #12 0x43f9a5 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:895:5
54
+ #13 0x42ed0f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
55
+ #14 0x458362 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
56
+ #15 0x7fcfaa2aa082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
57
+
58
+ DEDUP_TOKEN: operator new(unsigned long)--__libcpp_operator_new<unsigned long>--__libcpp_allocate
59
+ SUMMARY: AddressSanitizer: heap-buffer-overflow /src/cifuzz-example/my_api.cpp:26:10 in DoStuff(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
60
+ Shadow bytes around the buggy address:
61
+ 0x0c067fff85d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
62
+ 0x0c067fff85e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
63
+ 0x0c067fff85f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
64
+ 0x0c067fff8600: fa fa fd fd fd fa fa fa fd fd fd fa fa fa fd fd
65
+ 0x0c067fff8610: fd fa fa fa fd fd fd fa fa fa 00 00 00 00 fa fa
66
+ =>0x0c067fff8620: 00 00[04]fa fa fa fa fa fa fa fa fa fa fa fa fa
67
+ 0x0c067fff8630: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
68
+ 0x0c067fff8640: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
69
+ 0x0c067fff8650: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
70
+ 0x0c067fff8660: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
71
+ 0x0c067fff8670: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
72
+ Shadow byte legend (one shadow byte represents 8 application bytes):
73
+ Addressable: 00
74
+ Partially addressable: 01 02 03 04 05 06 07
75
+ Heap left redzone: fa
76
+ Freed heap region: fd
77
+ Stack left redzone: f1
78
+ Stack mid redzone: f2
79
+ Stack right redzone: f3
80
+ Stack after return: f5
81
+ Stack use after scope: f8
82
+ Global redzone: f9
83
+ Global init order: f6
84
+ Poisoned by user: f7
85
+ Container overflow: fc
86
+ Array cookie: ac
87
+ Intra object redzone: bb
88
+ ASan internal: fe
89
+ Left alloca redzone: ca
90
+ Right alloca redzone: cb
91
+ ==26==ABORTING
92
+ MS: 4 PersAutoDict-ManualDict-CrossOver-PersAutoDict- DE: "foo"-"ouch"-"bar"-; base unit: 1a25c32303e03f997166aee1c665b5ae9f66ec7d
93
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x66,0x6f,0x6f,0xff,0x1,0x62,0x61,0x72,0x63,0x68,0x6f,0x75,0x63,0x68,0x66,0x6f,0x66,0x6e,0x6f,0x6d,0x67,0x6d,
94
+ \377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377foo\377\001barchouchfofnomgm
95
+ artifact_prefix='/tmp/tmp9p1w4p8r/'; Test unit written to /tmp/tmp9p1w4p8r/crash-1c750df432fe458b738987ba69cd20a598708775
96
+ Base64: //////////////////////9mb2//AWJhcmNob3VjaGZvZm5vbWdt
97
+ stat::number_of_executed_units: 90
98
+ stat::average_exec_per_sec: 0
99
+ stat::new_units_added: 11
100
+ stat::slowest_unit_time_sec: 0
101
+ stat::peak_rss_mb: 33
102
+ /github/workspace/build-out/do_stuff_fuzzer -timeout=25 -rss_limit_mb=2560 -dict=/github/workspace/build-out/do_stuff_fuzzer.dict -len_control=0 -seed=1337 -artifact_prefix=/tmp/tmp9p1w4p8r/ -max_total_time=600 -print_final_stats=1 /github/workspace/cifuzz-corpus/do_stuff_fuzzer >fuzz-1.log 2>&1
103
+ ================== Job 1 exited with exit code 77 ============
104
+ Dictionary: 3 entries
105
+ INFO: Running with entropic power schedule (0xFF, 100).
106
+ INFO: Seed: 1337
107
+ INFO: Loaded 1 modules (86 inline 8-bit counters): 86 [0x6150e0, 0x615136),
108
+ INFO: Loaded 1 PC tables (86 PCs): 86 [0x5c8b08,0x5c9068),
109
+ INFO: 15 files found in /github/workspace/cifuzz-corpus/do_stuff_fuzzer
110
+ INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
111
+ INFO: seed corpus: files: 15 min: 3b max: 44b total: 239b rss: 31Mb
112
+ #16 INITED cov: 65 ft: 86 corp: 13/159b exec/s: 0 rss: 32Mb
113
+ #38 NEW cov: 65 ft: 88 corp: 14/188b lim: 4096 exec/s: 0 rss: 32Mb L: 29/35 MS: 2 InsertByte-CopyPart-
114
+ #43 REDUCE cov: 65 ft: 88 corp: 14/187b lim: 4096 exec/s: 0 rss: 32Mb L: 2/35 MS: 5 InsertByte-ChangeByte-ChangeBinInt-EraseBytes-EraseBytes-
115
+ #64 NEW cov: 66 ft: 89 corp: 15/191b lim: 4096 exec/s: 0 rss: 32Mb L: 4/35 MS: 1 ChangeByte-
116
+ #78 REDUCE cov: 66 ft: 89 corp: 15/190b lim: 4096 exec/s: 0 rss: 32Mb L: 15/35 MS: 4 ChangeBinInt-CopyPart-EraseBytes-EraseBytes-
117
+ #95 REDUCE cov: 66 ft: 89 corp: 15/188b lim: 4096 exec/s: 0 rss: 32Mb L: 16/35 MS: 2 ChangeBinInt-EraseBytes-
118
+ #110 REDUCE cov: 66 ft: 89 corp: 15/184b lim: 4096 exec/s: 0 rss: 32Mb L: 31/31 MS: 5 CrossOver-ChangeByte-ShuffleBytes-InsertByte-EraseBytes-
119
+ #146 REDUCE cov: 66 ft: 89 corp: 15/183b lim: 4096 exec/s: 0 rss: 32Mb L: 1/31 MS: 1 EraseBytes-
120
+ #157 NEW cov: 66 ft: 90 corp: 16/210b lim: 4096 exec/s: 0 rss: 32Mb L: 27/31 MS: 1 CrossOver-
121
+ #230 REDUCE cov: 66 ft: 92 corp: 17/318b lim: 4096 exec/s: 0 rss: 32Mb L: 108/108 MS: 3 CopyPart-InsertRepeatedBytes-CrossOver-
122
+ #277 NEW cov: 66 ft: 94 corp: 18/429b lim: 4096 exec/s: 0 rss: 32Mb L: 111/111 MS: 2 ManualDict-CMP- DE: "bar"-"\000\000\000\000"-
123
+ #337 NEW cov: 67 ft: 95 corp: 19/439b lim: 4096 exec/s: 0 rss: 32Mb L: 10/111 MS: 5 ChangeByte-ChangeBit-ManualDict-CopyPart-EraseBytes- DE: "bar"-
124
+ =================================================================
125
+ ==30==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000007d94 at pc 0x00000056d1db bp 0x7ffdb9da4b50 sp 0x7ffdb9da4b48
126
+ READ of size 4 at 0x603000007d94 thread T0
127
+ SCARINESS: 17 (4-byte-read-heap-buffer-overflow)
128
+ #0 0x56d1da in DoStuff(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /src/cifuzz-example/my_api.cpp:26:10
129
+ #1 0x56c5d6 in LLVMFuzzerTestOneInput /src/cifuzz-example/do_stuff_fuzzer.cpp:15:3
130
+ #2 0x43de23 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
131
+ #3 0x43d60a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
132
+ #4 0x43ecd9 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:757:19
133
+ #5 0x43f9a5 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:895:5
134
+ #6 0x42ed0f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
135
+ #7 0x458362 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
136
+ #8 0x7fc2c6bd3082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
137
+ #9 0x41f74d in _start (build-out/do_stuff_fuzzer+0x41f74d)
138
+
139
+ DEDUP_TOKEN: DoStuff(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)--LLVMFuzzerTestOneInput--fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long)
140
+ 0x603000007d94 is located 0 bytes to the right of 20-byte region [0x603000007d80,0x603000007d94)
141
+ allocated by thread T0 here:
142
+ #0 0x569dfd in operator new(unsigned long) /src/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:95:3
143
+ #1 0x56c9d4 in __libcpp_operator_new<unsigned long> /usr/local/bin/../include/c++/v1/new:245:10
144
+ #2 0x56c9d4 in __libcpp_allocate /usr/local/bin/../include/c++/v1/new:271:10
145
+ #3 0x56c9d4 in allocate /usr/local/bin/../include/c++/v1/__memory/allocator.h:105:38
146
+ #4 0x56c9d4 in allocate /usr/local/bin/../include/c++/v1/__memory/allocator_traits.h:262:20
147
+ #5 0x56c9d4 in __vallocate /usr/local/bin/../include/c++/v1/vector:931:37
148
+ #6 0x56c9d4 in vector /usr/local/bin/../include/c++/v1/vector:1236:9
149
+ #7 0x56c9d4 in DoStuff(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /src/cifuzz-example/my_api.cpp:14:20
150
+ #8 0x56c5d6 in LLVMFuzzerTestOneInput /src/cifuzz-example/do_stuff_fuzzer.cpp:15:3
151
+ #9 0x43de23 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
152
+ #10 0x43d60a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
153
+ #11 0x43ecd9 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:757:19
154
+ #12 0x43f9a5 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:895:5
155
+ #13 0x42ed0f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
156
+ #14 0x458362 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
157
+ #15 0x7fc2c6bd3082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
158
+
159
+ DEDUP_TOKEN: operator new(unsigned long)--__libcpp_operator_new<unsigned long>--__libcpp_allocate
160
+ SUMMARY: AddressSanitizer: heap-buffer-overflow /src/cifuzz-example/my_api.cpp:26:10 in DoStuff(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
161
+ Shadow bytes around the buggy address:
162
+ 0x0c067fff8f60: fa fa fd fd fd fa fa fa fd fd fd fa fa fa fd fd
163
+ 0x0c067fff8f70: fd fa fa fa fd fd fd fa fa fa fd fd fd fa fa fa
164
+ 0x0c067fff8f80: fd fd fd fa fa fa fd fd fd fa fa fa fd fd fd fa
165
+ 0x0c067fff8f90: fa fa fd fd fd fa fa fa fd fd fd fa fa fa fd fd
166
+ 0x0c067fff8fa0: fd fa fa fa fd fd fd fa fa fa fd fd fd fa fa fa
167
+ =>0x0c067fff8fb0: 00 00[04]fa fa fa fa fa fa fa fa fa fa fa fa fa
168
+ 0x0c067fff8fc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
169
+ 0x0c067fff8fd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
170
+ 0x0c067fff8fe0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
171
+ 0x0c067fff8ff0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
172
+ 0x0c067fff9000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
173
+ Shadow byte legend (one shadow byte represents 8 application bytes):
174
+ Addressable: 00
175
+ Partially addressable: 01 02 03 04 05 06 07
176
+ Heap left redzone: fa
177
+ Freed heap region: fd
178
+ Stack left redzone: f1
179
+ Stack mid redzone: f2
180
+ Stack right redzone: f3
181
+ Stack after return: f5
182
+ Stack use after scope: f8
183
+ Global redzone: f9
184
+ Global init order: f6
185
+ Poisoned by user: f7
186
+ Container overflow: fc
187
+ Array cookie: ac
188
+ Intra object redzone: bb
189
+ ASan internal: fe
190
+ Left alloca redzone: ca
191
+ Right alloca redzone: cb
192
+ ==30==ABORTING
193
+ MS: 4 ShuffleBytes-ManualDict-CrossOver-PersAutoDict- DE: "foo"-"bar"-; base unit: 8fc7da8d952ed1aa5c7415e21b3d52b42402973d
194
+ 0x66,0x6f,0x6f,0x63,0x6f,0x75,0x6f,0x75,0x63,0x68,0x63,0x68,0x66,0x62,0x61,0x72,0x6f,0x6f,0x6d,0x67,0x66,0x6f,0x6f,0x2f,0x99,0x6f,0x6f,0x90,0x6f,0x6f,0x6d,0x0,0x0,0x67,0x2f,
195
+ foocououchchfbaroomgfoo/\231oo\220oom\000\000g/
196
+ artifact_prefix='/tmp/tmp9p1w4p8r/'; Test unit written to /tmp/tmp9p1w4p8r/crash-f8a2a1e84f58a2d676e5ad8078119a39b78df901
197
+ Base64: Zm9vY291b3VjaGNoZmJhcm9vbWdmb28vmW9vkG9vbQAAZy8=
198
+ stat::number_of_executed_units: 366
199
+ stat::average_exec_per_sec: 0
200
+ stat::new_units_added: 11
201
+ stat::slowest_unit_time_sec: 0
202
+ stat::peak_rss_mb: 33
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/test_data/msan_crash_fuzzer_bug_summary.txt ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MemorySanitizer: use-of-uninitialized-value
2
+ #0 0x52675f in LLVMFuzzerTestOneInput /src/cifuzz-example/do_stuff_fuzzer.cpp:13:7
3
+ #1 0x45a431 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
4
+ #2 0x45ba46 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:792:3
5
+ #3 0x45bed9 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:845:3
6
+ #4 0x44a4bc in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:906:6
7
+ #5 0x474432 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
8
+ #6 0x7eff5562683f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f)
9
+ #7 0x41eab8 in _start (out/do_stuff_fuzzer+0x41eab8)
10
+
11
+ DEDUP_TOKEN: LLVMFuzzerTestOneInput--fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long)--fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&)
12
+ Uninitialized value was created by a heap allocation
13
+ #0 0x4d57ad in malloc /src/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:901:3
14
+ #1 0x437c07 in operator new(unsigned long) (out/do_stuff_fuzzer+0x437c07)
15
+ #2 0x45ba46 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:792:3
16
+ #3 0x45bed9 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:845:3
17
+ #4 0x44a4bc in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:906:6
18
+ #5 0x474432 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
19
+ #6 0x7eff5562683f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f)
20
+ DEDUP_TOKEN: malloc--operator new(unsigned long)--fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&)
21
+
22
+ SUMMARY:
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/test_data/msan_crash_fuzzer_output.txt ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Dictionary: 3 entries
2
+ INFO: Running with entropic power schedule (0xFF, 100).
3
+ INFO: Seed: 1337
4
+ INFO: Loaded 1 modules (184 inline 8-bit counters): 184 [0x829300, 0x8293b8),
5
+ INFO: Loaded 1 PC tables (184 PCs): 184 [0x5dc910,0x5dd490),
6
+ INFO: 5 files found in /tmp/do_stuff_fuzzer_corpus
7
+ INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
8
+ ==13==WARNING: MemorySanitizer: use-of-uninitialized-value
9
+ #0 0x52675f in LLVMFuzzerTestOneInput /src/cifuzz-example/do_stuff_fuzzer.cpp:13:7
10
+ #1 0x45a431 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
11
+ #2 0x45ba46 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:792:3
12
+ #3 0x45bed9 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:845:3
13
+ #4 0x44a4bc in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:906:6
14
+ #5 0x474432 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
15
+ #6 0x7eff5562683f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f)
16
+ #7 0x41eab8 in _start (out/do_stuff_fuzzer+0x41eab8)
17
+
18
+ DEDUP_TOKEN: LLVMFuzzerTestOneInput--fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long)--fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&)
19
+ Uninitialized value was created by a heap allocation
20
+ #0 0x4d57ad in malloc /src/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:901:3
21
+ #1 0x437c07 in operator new(unsigned long) (out/do_stuff_fuzzer+0x437c07)
22
+ #2 0x45ba46 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:792:3
23
+ #3 0x45bed9 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:845:3
24
+ #4 0x44a4bc in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:906:6
25
+ #5 0x474432 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
26
+ #6 0x7eff5562683f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f)
27
+ DEDUP_TOKEN: malloc--operator new(unsigned long)--fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&)
28
+
29
+ SUMMARY: MemorySanitizer: use-of-uninitialized-value /src/cifuzz-example/do_stuff_fuzzer.cpp:13:7 in LLVMFuzzerTestOneInput
30
+ Unique heap origins: 65
31
+ Stack depot allocated bytes: 4424
32
+ Unique origin histories: 29
33
+ History depot allocated bytes: 696
34
+ Exiting
35
+ MS: 0 ; base unit: 0000000000000000000000000000000000000000
36
+
37
+
38
+ artifact_prefix='./'; Test unit written to ./crash-da39a3ee5e6b4b0d3255bfef95601890afd80709
39
+ Base64:
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/test_data/sarif_utils_msan_stack.txt ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Dictionary: 3 entries
2
+ 2024-05-07 18:49:02,343 - root - INFO - Fuzzer: do_stuff_fuzzer. Detected bug.
3
+ INFO: Running with entropic power schedule (0xFF, 100).
4
+ INFO: Seed: 1337
5
+ INFO: Loaded 1 modules (83 inline 8-bit counters): 83 [0x563ff0e03e98, 0x563ff0e03eeb),
6
+ INFO: Loaded 1 PC tables (83 PCs): 83 [0x563ff0e03ef0,0x563ff0e04420),
7
+ INFO: 0 files found in /github/workspace/cifuzz-corpus/do_stuff_fuzzer
8
+ INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
9
+ INFO: A corpus is not provided, starting from an empty corpus
10
+ #2 INITED cov: 2 ft: 2 corp: 1/1b exec/s: 0 rss: 69Mb
11
+ #4 NEW cov: 3 ft: 3 corp: 2/3b lim: 4096 exec/s: 0 rss: 69Mb L: 2/2 MS: 2 ChangeBit-InsertByte-
12
+ ==23==WARNING: MemorySanitizer: use-of-uninitialized-value
13
+ #0 0x563ff0d278f0 in LLVMFuzzerTestOneInput /src/cifuzz-external-example/do_stuff_fuzzer.cpp:24:1
14
+ #1 0x563ff0c24340 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:614:13
15
+ #2 0x563ff0c23b65 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:516:7
16
+ #3 0x563ff0c25335 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:760:19
17
+ #4 0x563ff0c26125 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile>>&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:905:5
18
+ #5 0x563ff0c14436 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:914:6
19
+ #6 0x563ff0c40962 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
20
+ #7 0x7f4c156ed082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 87b331c034a6458c64ce09c03939e947212e18ce)
21
+ #8 0x563ff0c055ad in _start (build-out/do_stuff_fuzzer+0x4a5ad)
22
+
23
+ DEDUP_TOKEN: LLVMFuzzerTestOneInput--fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long)--fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*)
24
+ Uninitialized value was stored to memory at
25
+ #0 0x563ff0d278e9 in LLVMFuzzerTestOneInput /src/cifuzz-external-example/do_stuff_fuzzer.cpp
26
+ #1 0x563ff0c24340 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:614:13
27
+ #2 0x563ff0c23b65 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:516:7
28
+ #3 0x563ff0c25335 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:760:19
29
+ #4 0x563ff0c26125 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile>>&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:905:5
30
+ #5 0x563ff0c14436 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:914:6
31
+ #6 0x563ff0c40962 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
32
+ #7 0x7f4c156ed082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 87b331c034a6458c64ce09c03939e947212e18ce)
33
+
34
+ DEDUP_TOKEN: LLVMFuzzerTestOneInput--fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long)--fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*)
35
+ Uninitialized value was created by a heap deallocation
36
+ #0 0x563ff0cc7480 in free /src/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:218:3
37
+ #1 0x563ff0d27800 in LLVMFuzzerTestOneInput /src/cifuzz-external-example/do_stuff_fuzzer.cpp:21:5
38
+ #2 0x563ff0c24340 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:614:13
39
+ #3 0x563ff0c23b65 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:516:7
40
+ #4 0x563ff0c25335 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:760:19
41
+ #5 0x563ff0c26125 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile>>&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:905:5
42
+ #6 0x563ff0c14436 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:914:6
43
+ #7 0x563ff0c40962 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
44
+ #8 0x7f4c156ed082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 87b331c034a6458c64ce09c03939e947212e18ce)
45
+
46
+ DEDUP_TOKEN: __interceptor_free--LLVMFuzzerTestOneInput--fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long)
47
+ SUMMARY: MemorySanitizer: use-of-uninitialized-value /src/cifuzz-external-example/do_stuff_fuzzer.cpp:24:1 in LLVMFuzzerTestOneInput
48
+ Unique heap origins: 201
49
+ Stack depot allocated bytes: 9764880
50
+ Unique origin histories: 181
51
+ History depot allocated bytes: 196608
52
+ Exiting
53
+ MS: 5 ShuffleBytes-CopyPart-InsertByte-CopyPart-ManualDict- DE: "bar"-; base unit: adc83b19e793491b1c6ea0fd8b46cd9f32e592fc
54
+ 0xa,0x62,0x61,0x72,0xa,
55
+ \012bar\012
56
+ artifact_prefix='/tmp/tmp1tc5b3m2/'; Test unit written to /tmp/tmp1tc5b3m2/crash-c935b6724d7e27401ac9af3773700ca86ac38dea
57
+ Base64: CmJhcgo=
58
+ stat::number_of_executed_units: 159
59
+ stat::average_exec_per_sec: 0
60
+ stat::new_units_added: 1
61
+ stat::slowest_unit_time_sec: 0
62
+ stat::peak_rss_mb: 69
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/cifuzz/test_data/sarif_utils_systemd_stack.txt ADDED
@@ -0,0 +1,302 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /github/workspace/build-out/fuzz-bus-label -timeout=25 -rss_limit_mb=2560 -len_control=0 -seed=1337 -artifact_prefix=/tmp/tmpsngf52cy/ -max_total_time=13 -print_final_stats=1 /github/workspace/cifuzz-corpus/fuzz-bus-label >fuzz-0.log 2>&1
2
+ ================== Job 0 exited with exit code 0 ============
3
+ INFO: Running with entropic power schedule (0xFF, 100).
4
+ INFO: Seed: 1337
5
+ INFO: Loaded 2 modules (82577 inline 8-bit counters): 82573 [0x7fc55e6bedf0, 0x7fc55e6d307d), 4 [0x5e9c28, 0x5e9c2c),
6
+ 2023-05-04 01:02:55,065 - root - INFO - Not reporting crash in fuzz-bus-label because process timed out.
7
+ 2023-05-04 01:02:55,069 - root - INFO - Deleting corpus and seed corpus of fuzz-bus-label to save disk.
8
+ INFO: Loaded 2 PC tables (82577 PCs): 82573 [0x7fc55e6d3080,0x7fc55e815950), 4 [0x5a6c78,0x5a6cb8),
9
+ INFO: 256 files found in /github/workspace/cifuzz-corpus/fuzz-bus-label
10
+ INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 1048576 bytes
11
+ INFO: seed corpus: files: 256 min: 1b max: 5242880b total: 30968483b rss: 48Mb
12
+ #257 INITED cov: 41 ft: 230 corp: 111/4360b exec/s: 0 rss: 73Mb
13
+ #131072 pulse cov: 41 ft: 230 corp: 111/4360b lim: 1048576 exec/s: 43690 rss: 76Mb
14
+ #262144 pulse cov: 41 ft: 230 corp: 111/4360b lim: 1048576 exec/s: 43690 rss: 76Mb
15
+ #524288 pulse cov: 41 ft: 230 corp: 111/4360b lim: 1048576 exec/s: 43690 rss: 77Mb
16
+ #609082 DONE cov: 41 ft: 230 corp: 111/4360b lim: 1048576 exec/s: 43505 rss: 77Mb
17
+ Done 609082 runs in 14 second(s)
18
+ stat::number_of_executed_units: 609082
19
+ stat::average_exec_per_sec: 43505
20
+ stat::new_units_added: 0
21
+ stat::slowest_unit_time_sec: 0
22
+ stat::peak_rss_mb: 77
23
+ /github/workspace/build-out/fuzz-bus-label -timeout=25 -rss_limit_mb=2560 -len_control=0 -seed=1337 -artifact_prefix=/tmp/tmpsngf52cy/ -max_total_time=13 -print_final_stats=1 /github/workspace/cifuzz-corpus/fuzz-bus-label >fuzz-1.log 2>&1
24
+ 2023-05-04 01:02:55,082 - root - INFO - Deleting fuzz target: fuzz-bus-label.
25
+ 2023-05-04 01:02:55,083 - root - INFO - Done deleting.
26
+ 2023-05-04 01:02:55,084 - root - INFO - Fuzzer fuzz-bus-label finished running without reportable crashes.
27
+ 2023-05-04 01:02:55,084 - root - INFO - Running fuzzer: fuzz-dhcp-server.
28
+ 2023-05-04 01:02:55,085 - root - INFO - Downloading corpus from OSS-Fuzz: https://storage.googleapis.com/systemd-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/systemd_fuzz-dhcp-server/public.zip
29
+ 2023-05-04 01:02:55,088 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): storage.googleapis.com:443
30
+ 2023-05-04 01:02:55,145 - urllib3.connectionpool - DEBUG - https://storage.googleapis.com:443 "GET /systemd-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/systemd_fuzz-dhcp-server/public.zip HTTP/1.1" 200 806749
31
+ 2023-05-04 01:02:55,350 - root - INFO - Starting fuzzing
32
+ Fuzzing logs:
33
+ /github/workspace/build-out/fuzz-dhcp-server -timeout=25 -rss_limit_mb=2560 -len_control=0 -seed=1337 -artifact_prefix=/tmp/tmpyxgwwsvr/ -max_total_time=13 -print_final_stats=1 /github/workspace/cifuzz-corpus/fuzz-dhcp-server >fuzz-0.log 2>&1
34
+ ================== Job 0 exited with exit code 0 ============
35
+ INFO: Running with entropic power schedule (0xFF, 100).
36
+ INFO: Seed: 1337
37
+ INFO: Loaded 2 modules (83640 inline 8-bit counters): 82573 [0x7fe86ff70df0, 0x7fe86ff8507d), 1067 [0x60c638, 0x60ca63),
38
+ INFO: Loaded 2 PC tables (83640 PCs): 82573 [0x7fe86ff85080,0x7fe8700c7950), 1067 [0x60ca68,0x610d18),
39
+ INFO: 1153 files found in /github/workspace/cifuzz-corpus/fuzz-dhcp-server
40
+ INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 1048576 bytes
41
+ INFO: seed corpus: files: 1153 min: 1b max: 5242879b total: 17056071b rss: 50Mb
42
+ #1155 INITED cov: 577 ft: 1116 corp: 203/54Kb exec/s: 0 rss: 86Mb
43
+ #1167 NEW cov: 577 ft: 1117 corp: 204/54Kb lim: 1048576 exec/s: 0 rss: 86Mb L: 243/1071 MS: 2 ChangeASCIIInt-CrossOver-
44
+ #1509 NEW cov: 577 ft: 1118 corp: 205/54Kb lim: 1048576 exec/s: 0 rss: 86Mb L: 243/1071 MS: 2 ChangeBit-CopyPart-
45
+ #63018 NEW cov: 577 ft: 1119 corp: 206/55Kb lim: 1048576 exec/s: 21006 rss: 86Mb L: 245/1071 MS: 4 InsertByte-ChangeByte-CMP-InsertByte- DE: "2\000\000\000\000\000\000\000"-
46
+ #65536 pulse cov: 577 ft: 1119 corp: 206/55Kb lim: 1048576 exec/s: 21845 rss: 86Mb
47
+ Loaded 1024/1155 files from /github/workspace/cifuzz-corpus/fuzz-dhcp-server
48
+ #99784 NEW cov: 577 ft: 1120 corp: 207/55Kb lim: 1048576 exec/s: 19956 rss: 105Mb L: 243/1071 MS: 2 ChangeASCIIInt-ChangeBinInt-
49
+ #131072 pulse cov: 577 ft: 1120 corp: 207/55Kb lim: 1048576 exec/s: 21845 rss: 105Mb
50
+ #262144 pulse cov: 577 ft: 1120 corp: 207/55Kb lim: 1048576 exec/s: 20164 rss: 105Mb
51
+ #275639 DONE cov: 577 ft: 1120 corp: 207/55Kb lim: 1048576 exec/s: 19688 rss: 105Mb
52
+ ###### Recommended dictionary. ######
53
+ "2\000\000\000\000\000\000\000" # Uses: 17879
54
+ ###### End of recommended dictionary. ######
55
+ Done 275639 runs in 14 second(s)
56
+ stat::number_of_executed_units: 275639
57
+ stat::average_exec_per_sec: 19688
58
+ stat::new_units_added: 4
59
+ stat::slowest_unit_time_sec: 0
60
+ stat::peak_rss_mb: 105
61
+ /github/workspace/build-out/fuzz-dhcp-server -timeout=25 -rss_limit_mb=2560 -len_control=0 -seed=1337 -artifact_prefix=/tmp/tmpyxgwwsvr/ -max_total_time=13 -print_final_stats=1 /github/workspace/cifuzz-corpus/fuzz-dhcp-server >fuzz-1.log 2>&1
62
+ 2023-05-04 01:03:18,374 - root - INFO - Not reporting crash in fuzz-dhcp-server because process timed out.
63
+ 2023-05-04 01:03:18,377 - root - INFO - Deleting corpus and seed corpus of fuzz-dhcp-server to save disk.
64
+ 2023-05-04 01:03:18,399 - root - INFO - Deleting fuzz target: fuzz-dhcp-server.
65
+ 2023-05-04 01:03:18,400 - root - INFO - Done deleting.
66
+ 2023-05-04 01:03:18,400 - root - INFO - Fuzzer fuzz-dhcp-server finished running without reportable crashes.
67
+ 2023-05-04 01:03:18,401 - root - INFO - Running fuzzer: fuzz-bcd.
68
+ 2023-05-04 01:03:18,401 - root - INFO - Downloading corpus from OSS-Fuzz: https://storage.googleapis.com/systemd-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/systemd_fuzz-bcd/public.zip
69
+ 2023-05-04 01:03:18,404 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): storage.googleapis.com:443
70
+ 2023-05-04 01:03:18,582 - urllib3.connectionpool - DEBUG - https://storage.googleapis.com:443 "GET /systemd-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/systemd_fuzz-bcd/public.zip HTTP/1.1" 200 2293254
71
+ 2023-05-04 01:03:18,804 - root - INFO - Starting fuzzing
72
+ Fuzzing logs:
73
+ /github/workspace/build-out/fuzz-bcd -timeout=25 -rss_limit_mb=2560 -len_control=0 -seed=1337 -artifact_prefix=/tmp/tmpgvqlyr8q/ -max_total_time=13 -print_final_stats=1 /github/workspace/cifuzz-corpus/fuzz-bcd >fuzz-0.log 2>&1
74
+ ================== Job 0 exited with exit code 0 ============
75
+ INFO: Running with entropic power schedule (0xFF, 100).
76
+ INFO: Seed: 1337
77
+ INFO: Loaded 2 modules (83175 inline 8-bit counters): 82573 [0x7f1b5387edf0, 0x7f1b5389307d), 602 [0x5f8718, 0x5f8972),
78
+ INFO: Loaded 2 PC tables (83175 PCs): 82573 [0x7f1b53893080,0x7f1b539d5950), 602 [0x5f8978,0x5faf18),
79
+ INFO: 1260 files found in /github/workspace/cifuzz-corpus/fuzz-bcd
80
+ INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 946175 bytes
81
+ INFO: seed corpus: files: 1260 min: 1b max: 946175b total: 10373697b rss: 48Mb
82
+ #1261 INITED cov: 137 ft: 653 corp: 282/1416Kb exec/s: 0 rss: 91Mb
83
+ #65536 pulse cov: 137 ft: 653 corp: 282/1416Kb lim: 946175 exec/s: 32768 rss: 98Mb
84
+ #131072 pulse cov: 137 ft: 653 corp: 282/1416Kb lim: 946175 exec/s: 32768 rss: 98Mb
85
+ #262144 pulse cov: 137 ft: 653 corp: 282/1416Kb lim: 946175 exec/s: 37449 rss: 98Mb
86
+ #475081 DONE cov: 137 ft: 653 corp: 282/1416Kb lim: 946175 exec/s: 33934 rss: 98Mb
87
+ Done 475081 runs in 14 second(s)
88
+ stat::number_of_executed_units: 475081
89
+ stat::average_exec_per_sec: 33934
90
+ stat::new_units_added: 0
91
+ stat::slowest_unit_time_sec: 0
92
+ stat::peak_rss_mb: 98
93
+ /github/workspace/build-out/fuzz-bcd -timeout=25 -rss_limit_mb=2560 -len_control=0 -seed=1337 -artifact_prefix=/tmp/tmpgvqlyr8q/ -max_total_time=13 -print_final_stats=1 /github/workspace/cifuzz-corpus/fuzz-bcd >fuzz-1.log 2>&1
94
+ 2023-05-04 01:03:41,821 - root - INFO - Not reporting crash in fuzz-bcd because process timed out.
95
+ 2023-05-04 01:03:41,822 - root - INFO - Deleting corpus and seed corpus of fuzz-bcd to save disk.
96
+ 2023-05-04 01:03:41,848 - root - INFO - Deleting fuzz target: fuzz-bcd.
97
+ 2023-05-04 01:03:41,848 - root - INFO - Done deleting.
98
+ 2023-05-04 01:03:41,848 - root - INFO - Fuzzer fuzz-bcd finished running without reportable crashes.
99
+ 2023-05-04 01:03:41,848 - root - INFO - Running fuzzer: fuzz-varlink.
100
+ 2023-05-04 01:03:41,849 - root - INFO - Downloading corpus from OSS-Fuzz: https://storage.googleapis.com/systemd-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/systemd_fuzz-varlink/public.zip
101
+ 2023-05-04 01:03:41,852 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): storage.googleapis.com:443
102
+ 2023-05-04 01:03:41,906 - urllib3.connectionpool - DEBUG - https://storage.googleapis.com:443 "GET /systemd-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/systemd_fuzz-varlink/public.zip HTTP/1.1" 200 2586434
103
+ 2023-05-04 01:03:42,671 - root - INFO - Starting fuzzing
104
+ 2023-05-04 01:04:05,709 - root - INFO - Not reporting crash in fuzz-varlink because process timed out.
105
+ Fuzzing logs:
106
+ /github/workspace/build-out/fuzz-varlink -timeout=25 -rss_limit_mb=2560 -len_control=0 -seed=1337 -artifact_prefix=/tmp/tmpbtf4f932/ -max_total_time=13 -print_final_stats=1 /github/workspace/cifuzz-corpus/fuzz-varlink >fuzz-0.log 2>&1
107
+ 2023-05-04 01:04:05,709 - root - INFO - Deleting corpus and seed corpus of fuzz-varlink to save disk.
108
+ 2023-05-04 01:04:05,806 - root - INFO - Deleting fuzz target: fuzz-varlink.
109
+ 2023-05-04 01:04:05,806 - root - INFO - Done deleting.
110
+ 2023-05-04 01:04:05,806 - root - INFO - Fuzzer fuzz-varlink finished running without reportable crashes.
111
+ 2023-05-04 01:04:05,806 - root - INFO - Running fuzzer: fuzz-unit-file.
112
+ 2023-05-04 01:04:05,807 - root - INFO - Downloading corpus from OSS-Fuzz: https://storage.googleapis.com/systemd-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/systemd_fuzz-unit-file/public.zip
113
+ 2023-05-04 01:04:05,809 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): storage.googleapis.com:443
114
+ 2023-05-04 01:04:05,897 - urllib3.connectionpool - DEBUG - https://storage.googleapis.com:443 "GET /systemd-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/systemd_fuzz-unit-file/public.zip HTTP/1.1" 200 4999974
115
+ 2023-05-04 01:04:07,869 - root - INFO - Starting fuzzing
116
+ 2023-05-04 01:04:09,516 - root - INFO - Fuzzer: fuzz-unit-file. Detected bug.
117
+ Fuzzing logs:
118
+ /github/workspace/build-out/fuzz-unit-file -timeout=25 -rss_limit_mb=2560 -len_control=0 -seed=1337 -artifact_prefix=/tmp/tmpjhswtxiw/ -max_total_time=13 -print_final_stats=1 /github/workspace/cifuzz-corpus/fuzz-unit-file >fuzz-0.log 2>&1
119
+ 2023-05-04 01:04:09,517 - root - INFO - Trying to reproduce crash using: /tmp/tmpjhswtxiw/crash-7be9e0f3a71d95f8d5e67c5a9d84273d6f4e3c03.
120
+ ================== Job 0 exited with exit code 77 ============
121
+ INFO: Running with entropic power schedule (0xFF, 100).
122
+ INFO: Seed: 1337
123
+ INFO: Loaded 2 modules (82576 inline 8-bit counters): 82573 [0x7f3b0de4cdf0, 0x7f3b0de6107d), 3 [0x5e9b28, 0x5e9b2b),
124
+ INFO: Loaded 2 PC tables (82576 PCs): 82573 [0x7f3b0de61080,0x7f3b0dfa3950), 3 [0x5a6af8,0x5a6b28),
125
+ INFO: 20907 files found in /github/workspace/cifuzz-corpus/fuzz-unit-file
126
+ INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 604973 bytes
127
+ INFO: seed corpus: files: 20907 min: 1b max: 604973b total: 16005340b rss: 61Mb
128
+ =================================================================
129
+ ==74==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000005078 at pc 0x0000004ddffa bp 0x7fffeea64fe0 sp 0x7fffeea64fd8
130
+ READ of size 4 at 0x602000005078 thread T0
131
+ SCARINESS: 27 (4-byte-read-heap-buffer-overflow-far-from-bounds)
132
+ #0 0x4ddff9 in samLLVM2FuzzerTestOneInput /work/build/../../src/systemd/src/core/fuzz-unit-file.c:30:16
133
+ #1 0x4fc653 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
134
+ #2 0x4fbe3a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
135
+ #3 0x4fdca4 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:826:7
136
+ #4 0x4fded9 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:857:3
137
+ #5 0x4ed53f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
138
+ #6 0x516b92 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
139
+ #7 0x7f3b0ce20082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
140
+ #8 0x41f6ed in _start (build-out/fuzz-unit-file+0x41f6ed)
141
+
142
+ DEDUP_TOKEN: samLLVM2FuzzerTestOneInput--fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long)--fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*)
143
+ 0x602000005078 is located 38 bytes to the right of 2-byte region [0x602000005050,0x602000005052)
144
+ freed by thread T0 here:
145
+ #0 0x4a0882 in __interceptor_free /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:52:3
146
+ #1 0x4ddfb7 in samLLVM2FuzzerTestOneInput /work/build/../../src/systemd/src/core/fuzz-unit-file.c:29:9
147
+ #2 0x4fc653 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
148
+ #3 0x4fbe3a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
149
+ #4 0x4fdca4 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:826:7
150
+ #5 0x4fded9 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:857:3
151
+ #6 0x4ed53f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
152
+ #7 0x516b92 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
153
+ #8 0x7f3b0ce20082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
154
+
155
+ DEDUP_TOKEN: __interceptor_free--samLLVM2FuzzerTestOneInput--fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long)
156
+ previously allocated by thread T0 here:
157
+ #0 0x4a0b26 in malloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:69:3
158
+ #1 0x4ddfac in samLLVM2FuzzerTestOneInput /work/build/../../src/systemd/src/core/fuzz-unit-file.c:28:25
159
+ #2 0x4fc653 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
160
+ #3 0x4fbe3a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
161
+ #4 0x4fdca4 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:826:7
162
+ #5 0x4fded9 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:857:3
163
+ #6 0x4ed53f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
164
+ #7 0x516b92 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
165
+ #8 0x7f3b0ce20082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
166
+
167
+ DEDUP_TOKEN: malloc--samLLVM2FuzzerTestOneInput--fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long)
168
+ SUMMARY: AddressSanitizer: heap-buffer-overflow /work/build/../../src/systemd/src/core/fuzz-unit-file.c:30:16 in samLLVM2FuzzerTestOneInput
169
+ Shadow bytes around the buggy address:
170
+ 0x0c047fff89b0: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
171
+ 0x0c047fff89c0: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
172
+ 0x0c047fff89d0: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
173
+ 0x0c047fff89e0: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
174
+ 0x0c047fff89f0: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
175
+ =>0x0c047fff8a00: fa fa 00 02 fa fa 00 02 fa fa fd fa fa fa fa[fa]
176
+ 0x0c047fff8a10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
177
+ 0x0c047fff8a20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
178
+ 0x0c047fff8a30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
179
+ 0x0c047fff8a40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
180
+ 0x0c047fff8a50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
181
+ Shadow byte legend (one shadow byte represents 8 application bytes):
182
+ Addressable: 00
183
+ Partially addressable: 01 02 03 04 05 06 07
184
+ Heap left redzone: fa
185
+ Freed heap region: fd
186
+ Stack left redzone: f1
187
+ Stack mid redzone: f2
188
+ Stack right redzone: f3
189
+ Stack after return: f5
190
+ Stack use after scope: f8
191
+ Global redzone: f9
192
+ Global init order: f6
193
+ Poisoned by user: f7
194
+ Container overflow: fc
195
+ Array cookie: ac
196
+ Intra object redzone: bb
197
+ ASan internal: fe
198
+ Left alloca redzone: ca
199
+ Right alloca redzone: cb
200
+ ==74==ABORTING
201
+ MS: 0 ; base unit: 0000000000000000000000000000000000000000
202
+ 0x61,0x75,0x74,0x6f,0x6d,0x6f,0x75,0x6e,0x74,0x48,
203
+ automountH
204
+ artifact_prefix='/tmp/tmpjhswtxiw/'; Test unit written to /tmp/tmpjhswtxiw/crash-7be9e0f3a71d95f8d5e67c5a9d84273d6f4e3c03
205
+ Base64: YXV0b21vdW50SA==
206
+ stat::number_of_executed_units: 314
207
+ stat::average_exec_per_sec: 0
208
+ stat::new_units_added: 0
209
+ stat::slowest_unit_time_sec: 0
210
+ stat::peak_rss_mb: 67
211
+ /github/workspace/build-out/fuzz-unit-file -timeout=25 -rss_limit_mb=2560 -len_control=0 -seed=1337 -artifact_prefix=/tmp/tmpjhswtxiw/ -max_total_time=13 -print_final_stats=1 /github/workspace/cifuzz-corpus/fuzz-unit-file >fuzz-1.log 2>&1
212
+ ================== Job 1 exited with exit code 77 ============
213
+ INFO: Running with entropic power schedule (0xFF, 100).
214
+ INFO: Seed: 1337
215
+ INFO: Loaded 2 modules (82576 inline 8-bit counters): 82573 [0x7ff1ba038df0, 0x7ff1ba04d07d), 3 [0x5e9b28, 0x5e9b2b),
216
+ INFO: Loaded 2 PC tables (82576 PCs): 82573 [0x7ff1ba04d080,0x7ff1ba18f950), 3 [0x5a6af8,0x5a6b28),
217
+ INFO: 20907 files found in /github/workspace/cifuzz-corpus/fuzz-unit-file
218
+ INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 604973 bytes
219
+ INFO: seed corpus: files: 20907 min: 1b max: 604973b total: 16005340b rss: 61Mb
220
+ =================================================================
221
+ ==78==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000005078 at pc 0x0000004ddffa bp 0x7ffc2e6825c0 sp 0x7ffc2e6825b8
222
+ READ of size 4 at 0x602000005078 thread T0
223
+ SCARINESS: 27 (4-byte-read-heap-buffer-overflow-far-from-bounds)
224
+ #0 0x4ddff9 in samLLVM2FuzzerTestOneInput /work/build/../../src/systemd/src/core/fuzz-unit-file.c:30:16
225
+ #1 0x4fc653 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
226
+ #2 0x4fbe3a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
227
+ #3 0x4fdca4 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:826:7
228
+ #4 0x4fded9 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:857:3
229
+ #5 0x4ed53f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
230
+ #6 0x516b92 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
231
+ #7 0x7ff1b900c082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
232
+ #8 0x41f6ed in _start (build-out/fuzz-unit-file+0x41f6ed)
233
+
234
+ DEDUP_TOKEN: samLLVM2FuzzerTestOneInput--fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long)--fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*)
235
+ 0x602000005078 is located 38 bytes to the right of 2-byte region [0x602000005050,0x602000005052)
236
+ freed by thread T0 here:
237
+ #0 0x4a0882 in __interceptor_free /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:52:3
238
+ #1 0x4ddfb7 in samLLVM2FuzzerTestOneInput /work/build/../../src/systemd/src/core/fuzz-unit-file.c:29:9
239
+ #2 0x4fc653 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
240
+ #3 0x4fbe3a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
241
+ #4 0x4fdca4 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:826:7
242
+ #5 0x4fded9 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:857:3
243
+ #6 0x4ed53f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
244
+ #7 0x516b92 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
245
+ #8 0x7ff1b900c082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
246
+
247
+ DEDUP_TOKEN: __interceptor_free--samLLVM2FuzzerTestOneInput--fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long)
248
+ previously allocated by thread T0 here:
249
+ #0 0x4a0b26 in malloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:69:3
250
+ #1 0x4ddfac in samLLVM2FuzzerTestOneInput /work/build/../../src/systemd/src/core/fuzz-unit-file.c:28:25
251
+ #2 0x4fc653 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
252
+ #3 0x4fbe3a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
253
+ #4 0x4fdca4 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:826:7
254
+ #5 0x4fded9 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:857:3
255
+ #6 0x4ed53f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
256
+ #7 0x516b92 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
257
+ #8 0x7ff1b900c082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
258
+
259
+ DEDUP_TOKEN: malloc--samLLVM2FuzzerTestOneInput--fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long)
260
+ SUMMARY: AddressSanitizer: heap-buffer-overflow /work/build/../../src/systemd/src/core/fuzz-unit-file.c:30:16 in samsamLLVM2FuzzerTestOneInput
261
+ Shadow bytes around the buggy address:
262
+ 0x0c047fff89b0: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
263
+ 0x0c047fff89c0: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
264
+ 0x0c047fff89d0: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
265
+ 0x0c047fff89e0: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
266
+ 0x0c047fff89f0: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
267
+ =>0x0c047fff8a00: fa fa 00 02 fa fa 00 02 fa fa fd fa fa fa fa[fa]
268
+ 0x0c047fff8a10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
269
+ 0x0c047fff8a20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
270
+ 0x0c047fff8a30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
271
+ 0x0c047fff8a40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
272
+ 0x0c047fff8a50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
273
+ Shadow byte legend (one shadow byte represents 8 application bytes):
274
+ Addressable: 00
275
+ Partially addressable: 01 02 03 04 05 06 07
276
+ Heap left redzone: fa
277
+ Freed heap region: fd
278
+ Stack left redzone: f1
279
+ Stack mid redzone: f2
280
+ Stack right redzone: f3
281
+ Stack after return: f5
282
+ Stack use after scope: f8
283
+ Global redzone: f9
284
+ Global init order: f6
285
+ Poisoned by user: f7
286
+ Container overflow: fc
287
+ Array cookie: ac
288
+ Intra object redzone: bb
289
+ ASan internal: fe
290
+ Left alloca redzone: ca
291
+ Right alloca redzone: cb
292
+ ==78==ABORTING
293
+ MS: 0 ; base unit: 0000000000000000000000000000000000000000
294
+ 0x61,0x75,0x74,0x6f,0x6d,0x6f,0x75,0x6e,0x74,0x48,
295
+ automountH
296
+ artifact_prefix='/tmp/tmpjhswtxiw/'; Test unit written to /tmp/tmpjhswtxiw/crash-7be9e0f3a71d95f8d5e67c5a9d84273d6f4e3c03
297
+ Base64: YXV0b21vdW50SA==
298
+ stat::number_of_executed_units: 314
299
+ stat::average_exec_per_sec: 0
300
+ stat::new_units_added: 0
301
+ stat::slowest_unit_time_sec: 0
302
+ stat::peak_rss_mb: 68
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/experimental/SystemSan/PoEs/pytorch-lightning-1.5.10/Makefile ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .POSIX:
2
+ CXX = clang++
3
+ CFLAGS = -std=c++17 -Wall -Wextra -O3 -g3
4
+
5
+ SystemSan: SystemSan.cpp
6
+ $(CXX) $(CFLAGS) -lpthread -o $@ $^
7
+
8
+ run: clean SystemSan fuzz_pytorch_lightning.py
9
+ ./SystemSan ./fuzz_pytorch_lightning.py -dict=vuln.dict
10
+
11
+ clean:
12
+ rm -f SystemSan /tmp/tripwire
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/experimental/chronos/Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2024 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+ ################################################################################
16
+ FROM gcr.io/cloud-builders/gcloud
17
+
18
+ RUN apt-get update && apt-get install -y jq
local-test-tika-full-01-vuln_0/fuzz-tooling/infra/experimental/chronos/chronos.sh ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2024 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+ ################################################################################
16
+
17
+ # This script records the ENV and commands needed for fuzz target recompilation.
18
+ # It intercepts bash commands to save: 1) the ENV variable values before
19
+ # building the fuzz target (`recompile_env.sh`) and 2) all subsequent bash
20
+ # commands from that point (`recompile`). Combined with Docker, this setup
21
+ # allows for recompiling the fuzz target without rebuilding the entire project.
22
+ # Usage:
23
+ # 1. Set FUZZ_TARGET (e.g., in project's Dockerfile)
24
+ # 2. Source this file before compiling the fuzz target (e.g., source chronos.sh
25
+ # at the beginning of project's build.sh).
26
+
27
+ export START_RECORDING="false"
28
+ RECOMPILE_ENV="/usr/local/bin/recompile_env.sh"
29
+
30
+
31
+ # Initialize the recompile script as compile in case Chronos did not trap any
32
+ # command containing the fuzz target.
33
+ initialize_recompile_script() {
34
+ export RECOMPILE_SCRIPT="/usr/local/bin/recompile"
35
+ cp "/usr/local/bin/compile" "$RECOMPILE_SCRIPT"
36
+ }
37
+
38
+ reset_recompile_script() {
39
+ rm "$RECOMPILE_SCRIPT"
40
+ echo "#!/bin/bash" > "$RECOMPILE_SCRIPT"
41
+ echo "source $RECOMPILE_ENV" >> "$RECOMPILE_SCRIPT"
42
+ chmod +x "$RECOMPILE_SCRIPT"
43
+ }
44
+
45
+
46
+ # Execute or record command for recompilation.
47
+ execute_or_record_command() {
48
+ record_command() {
49
+ echo "cd \"$(pwd)\"" >> "$RECOMPILE_SCRIPT"
50
+ echo "$@" >> "$RECOMPILE_SCRIPT"
51
+ }
52
+
53
+ # Check if any element in the command array contains the FUZZ_TARGET.
54
+ if [[ "$BASH_COMMAND" == *"$FUZZ_TARGET"* ]]; then
55
+ export START_RECORDING="true"
56
+ # Save all environment variables, excluding read-only ones
57
+ reset_recompile_script
58
+ declare -p | grep -Ev 'declare -[^ ]*r[^ ]*' > "$RECOMPILE_ENV"
59
+ fi
60
+
61
+ if [[ "$START_RECORDING" == "true" ]]; then
62
+ record_command "$BASH_COMMAND"
63
+ echo "Recorded execution of: $BASH_COMMAND"
64
+ fi
65
+ }
66
+
67
+
68
+ main() {
69
+ # Initialize.
70
+ initialize_recompile_script
71
+
72
+ # Set up trap for DEBUG to intercept commands.
73
+ trap 'execute_or_record_command' DEBUG
74
+
75
+ # Enable extended debugging mode
76
+ shopt -s extdebug
77
+ # Ensure trap works in subshells and functions.
78
+ set -T
79
+ }
80
+
81
+ main