# GHSA-G753-GHR7-Q33W: cyfs-base vulnerable to misaligned pointer dereference in ChunkId::new

- Database: GitHub
- Severity: medium (stated by ghsa, no CVSS score)
- Published: 2023-06-22
- Modified: 2023-11-08

## Also published as

- [RUSTSEC-2023-0046](https://cve.now/RUSTSEC-2023-0046.md) (RustSec)

## Affected versions

- cyfs-base (crates.io): through 0.6.12

## 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://github.com/buckyos/CYFS/issues/275
- https://github.com/buckyos/CYFS/commit/e030188895096fd8d91d48753877729f4d37dd24
- https://github.com/buckyos/CYFS
- https://rustsec.org/advisories/RUSTSEC-2023-0046.html

Page: https://cve.now/GHSA-G753-GHR7-Q33W

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