From a64182cf0f6ad5ee07a67639b8c364e3e59e2db1 Mon Sep 17 00:00:00 2001 From: Rafael Date: Thu, 22 Jun 2023 11:42:06 -0400 Subject: [PATCH] report misaligned pointer dereference in cyfs-base (#1718) --- crates/cyfs-base/RUSTSEC-0000-0000.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 crates/cyfs-base/RUSTSEC-0000-0000.md diff --git a/crates/cyfs-base/RUSTSEC-0000-0000.md b/crates/cyfs-base/RUSTSEC-0000-0000.md new file mode 100644 index 0000000..c455d72 --- /dev/null +++ b/crates/cyfs-base/RUSTSEC-0000-0000.md @@ -0,0 +1,15 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "cyfs-base" +date = "2023-06-15" +informational = "unsound" +url = "https://github.com/buckyos/CYFS/issues/275" +keywords = ["alignment", "unsound"] + +[versions] +patched = [] +``` + +# Misaligned pointer dereference in `ChunkId::new` +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. \ No newline at end of file