Skip to content

Commit

Permalink
Merge branch 'master' into relax-dependency-versions
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Hennick <[email protected]>
  • Loading branch information
Pr0methean authored Nov 19, 2024
2 parents 2b88090 + 8abbf0e commit 66404de
Show file tree
Hide file tree
Showing 7,688 changed files with 564 additions and 1,348 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
194 changes: 142 additions & 52 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ jobs:
override: true
components: rustfmt
- name: fmt
run: cargo fmt --all -- --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

check_minimal_versions:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
Expand Down Expand Up @@ -123,38 +126,61 @@ jobs:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
- name: Install afl
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-fuzz
args: cargo-afl
- name: cargo afl system-config
uses: actions-rs/cargo@v1
with:
command: afl
args: system-config
- name: compile fuzz
uses: actions-rs/cargo@v1
with:
command: fuzz
args: build --all-features fuzz_read
command: afl
args: build --all-features --manifest-path ${{ github.workspace }}/fuzz_read/Cargo.toml
- name: run fuzz
timeout-minutes: 350
timeout-minutes: 70
uses: actions-rs/cargo@v1
with:
command: fuzz
args: run --all-features fuzz_read -- fuzz/corpus/fuzz_read -timeout=10s -rss_limit_mb=8192 -fork=2 -runs=25000000 -max_len=1000 -max_total_time=20700 -dict=fuzz/fuzz.dict
command: afl
args: fuzz -i ${{ github.workspace }}/fuzz_read/in -o out -V 3600 -a binary -- ${{ github.workspace }}/fuzz_read/target/debug/fuzz_read
- name: Minimize corpus
uses: actions-rs/cargo@v1
with:
command: afl
args: cmin -i out/default/queue -o out_cmin -- ${{ github.workspace }}/fuzz_read/target/debug/fuzz_read
- name: Report coverage
uses: actions-rs/cargo@v1
with:
command: afl
args: showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_read/target/debug/fuzz_read
- run: sudo apt install rename
- name: Rename files
run: |
rename 's/:/-/g' map/*
rename 's/:/-/g' out_cmin/*
rename 's/:/-/g' out/default/crashes/*
- name: Upload updated corpus
uses: actions/upload-artifact@v4
with:
name: fuzz_read_corpus
path: out_cmin/*
- name: Upload any failure inputs
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_read_bad_inputs
path: fuzz/artifacts/fuzz_read/crash-*
path: out/default/crashes/*
if-no-files-found: ignore
- name: Minimize seed corpus
if: always()
run: ./recursive-fuzz-cmin.sh read 70000
shell: bash
- name: Upload updated seed corpus
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_read_corpus
path: fuzz/corpus/fuzz_read/*
name: fuzz_read_coverage
path: map

fuzz_read_with_no_features:
runs-on: ubuntu-latest
Expand All @@ -169,28 +195,50 @@ jobs:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
- name: Install afl
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-fuzz
args: cargo-afl
- name: cargo afl system-config
uses: actions-rs/cargo@v1
with:
command: afl
args: system-config
- name: compile fuzz
uses: actions-rs/cargo@v1
with:
command: fuzz
args: build --no-default-features fuzz_read
command: afl
args: build --manifest-path ${{ github.workspace }}/fuzz_read/Cargo.toml
- name: run fuzz
timeout-minutes: 350
timeout-minutes: 70
uses: actions-rs/cargo@v1
with:
command: afl
args: fuzz -i ${{ github.workspace }}/fuzz_read/in -o out -V 3600 -a binary -- ${{ github.workspace }}/fuzz_read/target/debug/fuzz_read
- name: Report coverage
uses: actions-rs/cargo@v1
with:
command: fuzz
args: run --no-default-features fuzz_read fuzz/corpus/fuzz_read -- -rss_limit_mb=8192 -timeout=10s -fork=2 -runs=40000000 -max_total_time=20700 -max_len=70000 -dict=fuzz/fuzz.dict
command: afl
args: showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_read/target/debug/fuzz_read
- run: sudo apt install rename
- name: Rename files
run: |
rename 's/:/-/g' map/*
rename 's/:/-/g' out/default/crashes/*
- name: Upload any failure inputs
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_read_no_features_bad_inputs
path: fuzz/artifacts/fuzz_read/crash-*
name: fuzz_read_bad_inputs_no_features
path: out/default/crashes/*
if-no-files-found: ignore
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_read_coverage_no_features
path: map

fuzz_write:
runs-on: ubuntu-latest
Expand All @@ -205,41 +253,61 @@ jobs:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
- name: Install afl
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-fuzz
args: cargo-afl
- name: cargo afl system-config
uses: actions-rs/cargo@v1
with:
command: afl
args: system-config
- name: compile fuzz
uses: actions-rs/cargo@v1
with:
command: fuzz
args: build --all-features fuzz_write
command: afl
args: build --all-features --manifest-path ${{ github.workspace }}/fuzz_write/Cargo.toml
- name: run fuzz
timeout-minutes: 350
timeout-minutes: 70
uses: actions-rs/cargo@v1
with:
command: afl
args: fuzz -i ${{ github.workspace }}/fuzz_write/in -o out -V 3600 -a binary -x ${{ github.workspace }}/fuzz_write/fuzz.dict -- ${{ github.workspace }}/fuzz_write/target/debug/fuzz_write
- name: Minimize corpus
uses: actions-rs/cargo@v1
with:
command: fuzz
args: run --all-features fuzz_write fuzz/corpus/fuzz_write -- -rss_limit_mb=8192 -timeout=2s -fork=2 -runs=5000000 -max_len=160 -max_total_time=20700 -dict=fuzz/fuzz.dict
command: afl
args: cmin -i out/default/queue -o out_cmin -- ${{ github.workspace }}/fuzz_write/target/debug/fuzz_write
- name: Report coverage
uses: actions-rs/cargo@v1
with:
command: afl
args: showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_write/target/debug/fuzz_write
- run: sudo apt install rename
- name: Rename files
run: |
rename 's/:/-/g' map/*
rename 's/:/-/g' out_cmin/*
rename 's/:/-/g' out/default/crashes/*
- name: Upload updated corpus
uses: actions/upload-artifact@v4
with:
name: fuzz_write_corpus
path: out_cmin/*
- name: Upload any failure inputs
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_write_bad_inputs
path: |
fuzz/artifacts/fuzz_write/crash-*
fuzz/artifacts/fuzz_write/leak-*
fuzz/artifacts/fuzz_write/timeout-*
path: out/default/crashes/*
if-no-files-found: ignore
- name: Minimize seed corpus
if: always()
run: ./recursive-fuzz-cmin.sh write 500
shell: bash
- name: Upload updated seed corpus
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_write_corpus
path: fuzz/corpus/fuzz_write/*
name: fuzz_write_coverage
path: map

fuzz_write_with_no_features:
runs-on: ubuntu-latest
Expand All @@ -254,25 +322,47 @@ jobs:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
- name: Install afl
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-fuzz
args: cargo-afl
- name: cargo afl system-config
uses: actions-rs/cargo@v1
with:
command: afl
args: system-config
- name: compile fuzz
uses: actions-rs/cargo@v1
with:
command: fuzz
args: build --no-default-features fuzz_write
command: afl
args: build --all-features --manifest-path ${{ github.workspace }}/fuzz_write/Cargo.toml
- name: run fuzz
timeout-minutes: 350
timeout-minutes: 70
uses: actions-rs/cargo@v1
with:
command: fuzz
args: run --no-default-features fuzz_write fuzz/corpus/fuzz_write -- -rss_limit_mb=8192 -timeout=10s -fork=2 -runs=40000000 -max_len=256 -max_total_time=20700 -dict=fuzz/fuzz.dict
command: afl
args: fuzz -i ${{ github.workspace }}/fuzz_write/in -o out -V 3600 -a binary -x ${{ github.workspace }}/fuzz_write/fuzz.dict -- ${{ github.workspace }}/fuzz_write/target/debug/fuzz_write
- name: Report coverage
uses: actions-rs/cargo@v1
with:
command: afl
args: showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_write/target/debug/fuzz_write
- run: sudo apt install rename
- name: Rename files
run: |
rename 's/:/-/g' map/*
rename 's/:/-/g' out/default/crashes/*
- name: Upload any failure inputs
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_write_no_features_bad_inputs
path: fuzz/artifacts/fuzz_write/crash-*
name: fuzz_write_bad_inputs_no_features
path: out/default/crashes/*
if-no-files-found: ignore
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_write_coverage_no_features
path: map
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ Cargo.lock
target
.DS_Store
\.idea/
/fuzz_read/out/
/fuzz_write/out/
18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ description = """
Library to support the reading and writing of zip files.
"""
edition = "2021"
exclude = ["tests/**", "examples/**", ".github/**", "fuzz/**"]
exclude = ["tests/**", "examples/**", ".github/**", "fuzz_read/**", "fuzz_write/**"]
build = "src/build.rs"

[package.metadata.docs.rs]
Expand All @@ -26,13 +26,13 @@ rustdoc-args = ["--cfg", "docsrs"]
time = { version = "0.3.1", default-features = false }

[dependencies]
aes = { version = "0.8.0", optional = true }
bzip2 = { version = "0.4.3", optional = true }
chrono = { version = "0.4.0", optional = true }
constant_time_eq = { version = "0.3.0", optional = true }
crc32fast = "1.4.0"
displaydoc = { version = "0.2.0", default-features = false }
flate2 = { version = "1.0.0", default-features = false, optional = true }
aes = { version = "0.8", optional = true }
bzip2 = { version = "0.4", optional = true }
chrono = { version = "0.4", optional = true }
constant_time_eq = { version = "0.3", optional = true }
crc32fast = "1.4"
displaydoc = { version = "0.2", default-features = false }
flate2 = { version = "1.0", default-features = false, optional = true }
indexmap = "2"
hmac = { version = "0.12.0", optional = true, features = ["reset"] }
memchr = "2.7"
Expand Down Expand Up @@ -70,7 +70,7 @@ chrono = ["chrono/default"]
_deflate-any = []
_all-features = [] # Detect when --all-features is used
deflate = ["flate2/rust_backend", "deflate-zopfli", "deflate-flate2"]
deflate-flate2 = ["flate2/any_impl", "_deflate-any"]
deflate-flate2 = ["_deflate-any"]
# DEPRECATED: previously enabled `flate2/miniz_oxide` which is equivalent to `flate2/rust_backend`
deflate-miniz = ["deflate", "deflate-flate2"]
deflate-zlib = ["flate2/zlib", "deflate-flate2"]
Expand Down
60 changes: 0 additions & 60 deletions build-fuzz-corpus-multiple-restarts.sh

This file was deleted.

Loading

0 comments on commit 66404de

Please sign in to comment.