# RUSTSEC-2023-0046: Misaligned pointer dereference in ChunkId::new

- Database: RustSec
- Published: 2023-06-15
- Modified: 2023-11-08

## Also published as

- [GHSA-G753-GHR7-Q33W](https://cve.now/GHSA-G753-GHR7-Q33W.md) (GitHub)

## Affected versions

- cyfs-base (crates.io): all versions

## Description

The function `ChunkId::new` creates a misaligned pointer by casting mutable pointer of `u8` slice which has alignment 1 to the mutable pointer of `u32` which has alignment 4, and dereference the misaligned pointer leading UB, which should not be allowed in safe function.

## References

- https://crates.io/crates/cyfs-base
- https://rustsec.org/advisories/RUSTSEC-2023-0046.html
- https://github.com/buckyos/CYFS/issues/275

Page: https://cve.now/RUSTSEC-2023-0046

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
