GHSA-f7qj-v3vp-4856 json
libafl has unsound usages of `core::slice::from_raw_parts_mut`
published last yr. modified last yr. also RUSTSEC-2024-0424
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
The library breaks the safety assumptions when using unsafe API `slice::from_raw_parts_mut`. The pointer passed to `from_raw_parts_mut` is misaligned by casting `u8` to `u16` raw pointer directly, which is unsound. The bug is patched by using `align_offset`, which could make sure the memory address is aligned to 2 bytes for `u16`.
This was patched in 0.11.2 in the [commit](https://github.com/AFLplusplus/LibAFL/pull/1530/commits/5a60cb31ef587d71d09d534bba39bd3973c4b35d).
Patch / fix
- crates.io libafl 0.11.2
- github.com/AFLplusplus/LibAFL#1530 commit
- github.com/AFLplusplus/LibAFL@f70a16a commit
- github.com/AFLplusplus/LibAFL#1530 pull request
Is GHSA-f7qj-v3vp-4856 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | libafl | <0.11.2 >=0.0.0-0, <0.11.2 |
0.11.2 |
References
-
github.com
/AFLplusplus/LibAFL/pull/1530
web
-
github.com
/AFLplusplus/LibAFL/pull/1530/commits/5a60cb31ef587d71d09d534bba39bd3973c4b35d
web
-
github.com
/AFLplusplus/LibAFL/commit/f70a16a09a8096d3c50159dd8a912a75c2af157c
web
-
github.com
/AFLplusplus/LibAFL/issues/1526
web, report
-
github.com
/AFLplusplus/LibAFL
package
-
rustsec.org
/advisories/RUSTSEC-2024-0424.html
web, advisory
-
crates.io
/crates/libafl
package
Sources
- GitHub Advisory GHSA-f7qj-v3vp-4856
- OSV RUSTSEC-2024-0424
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.