Skip to content

Commit d24ed87

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents c2b2a14 + 89342b2 commit d24ed87

File tree

362 files changed

+6289
-4829
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

362 files changed

+6289
-4829
lines changed

.github/workflows/build_and_test.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ jobs:
120120
# ---- build normal and examples ----
121121
- name: Run a normal build
122122
run: cargo build --verbose
123+
# - name: Run libafl_qemu usermode tests
124+
# run: cd libafl_qemu && cargo test
125+
# - name: Run libafl_qemu systemmode tests
126+
# run: cd libafl_qemu && cargo test --no-default-features --features x86_64,systemmode
123127
- name: Build examples
124128
run: cargo build --examples --verbose
125129

@@ -223,6 +227,7 @@ jobs:
223227
steps:
224228
- uses: actions/checkout@v4
225229
- uses: taiki-e/install-action@cargo-hack
230+
- run: rustup upgrade
226231
# Note: We currently only specify minimum rust versions for the default workspace members
227232
- run: cargo hack check --rust-version -p libafl -p libafl_bolts -p libafl_derive -p libafl_cc -p libafl_targets
228233

@@ -378,10 +383,11 @@ jobs:
378383
- ./fuzzers/binary_only/qemu_coverage
379384
- ./fuzzers/binary_only/qemu_launcher
380385
arch:
381-
- aarch64
382-
- arm
383-
- i386
384-
- ppc
386+
# unless somebody pays us for the servers.
387+
# - aarch64
388+
# - arm
389+
# - i386
390+
# - ppc
385391
- x86_64
386392

387393
runs-on: [ self-hosted, qemu ]

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ libafl_nyx/packer
7474
harness
7575
program
7676
fuzzer_libpng*
77-
forkserver_simple
7877

7978
*.patch
79+
80+
# Sometimes this happens
81+
rustc-ice-*
82+
83+
# perf files
84+
*.mm_profdata
85+
86+
# backup files
87+
*.bak

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ all = { level = "deny", priority = -1 }
148148
pedantic = { level = "deny", priority = -1 }
149149
cargo_common_metadata = "deny"
150150

151+
alloc_instead_of_core = "deny"
152+
std_instead_of_alloc = "deny"
153+
std_instead_of_core = "deny"
154+
151155
# Warn
152156
cargo = { level = "warn", priority = -1 }
153157

bindings/pylibafl/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version = "0.15.1"
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/AFLplusplus/LibAFL/"
77
keywords = ["fuzzing", "testing", "security", "python"]
8-
edition = "2021"
8+
edition = "2024"
99
categories = ["development-tools::testing", "emulators", "embedded", "os"]
1010

1111
[dependencies]

docs/src/advanced_features/no_std.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Here, we use it in Rust. `external_current_millis` is then called from LibAFL.
3131
Note that it needs to be `no_mangle` in order to get picked up by LibAFL at linktime:
3232
3333
```rust,ignore
34-
#[no_mangle]
34+
#[unsafe(no_mangle)]
3535
pub extern "C" fn external_current_millis() -> u64 {
3636
unsafe { my_real_seconds()*1000 }
3737
}

docs/src/core_concepts/executor.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ As you can see from the forkserver example,
3232
//Coverage map shared between observer and executor
3333
let mut shmem = StdShMemProvider::new().unwrap().new_shmem(MAP_SIZE).unwrap();
3434
//let the forkserver know the shmid
35-
shmem.write_to_env("__AFL_SHM_ID").unwrap();
35+
unsafe {
36+
shmem.write_to_env("__AFL_SHM_ID").unwrap();
37+
}
3638
let mut shmem_buf = shmem.as_slice_mut();
3739
```
3840

fuzzers/baby/baby_fuzzer_swap_differential/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ debug = true
2121

2222
[build-dependencies]
2323
anyhow = "1.0.89"
24-
bindgen = "0.70.1"
24+
bindgen = "0.71.1"
2525
cc = "=1.2.7" # fix me later
2626

2727
[dependencies]

fuzzers/baby/backtrace_baby_fuzzers/forkserver_executor/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ pub fn main() {
4040

4141
let mut shmem = shmem_provider.new_shmem(MAP_SIZE).unwrap();
4242
//let the forkserver know the shmid
43-
shmem.write_to_env("__AFL_SHM_ID").unwrap();
43+
unsafe {
44+
shmem.write_to_env("__AFL_SHM_ID").unwrap();
45+
}
4446
let shmem_map: &mut [u8; MAP_SIZE] = shmem
4547
.as_slice_mut()
4648
.try_into()
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
injection_test
2+
static

fuzzers/forkserver/forkserver_libafl_cc/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ pub fn main() {
9797
// The coverage map shared between observer and executor
9898
let mut shmem = shmem_provider.new_shmem(MAP_SIZE).unwrap();
9999
// let the forkserver know the shmid
100-
shmem.write_to_env("__AFL_SHM_ID").unwrap();
100+
unsafe {
101+
shmem.write_to_env("__AFL_SHM_ID").unwrap();
102+
}
101103
let shmem_buf = shmem.as_slice_mut();
102104
// the next line is not needed
103105
// unsafe { EDGES_MAP_PTR = shmem_buf.as_mut_ptr() };

0 commit comments

Comments
 (0)