GHSA-f7qj-v3vp-4856

Suggest an improvement
Source
https://github.com/advisories/GHSA-f7qj-v3vp-4856
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-f7qj-v3vp-4856/GHSA-f7qj-v3vp-4856.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-f7qj-v3vp-4856
Published
2024-12-23T19:28:19Z
Modified
2024-12-23T19:30:20Z
Severity
  • 6.9 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N CVSS Calculator
Summary
libafl has unsound usages of `core::slice::from_raw_parts_mut`
Details

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.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2024-12-23T19:28:19Z"
}
References

Affected packages

crates.io / libafl

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.11.2