From fc79cff3d2c73dd76132968f6516affee8bb2af9 Mon Sep 17 00:00:00 2001 From: Zeyang Zhuang <1330315641@qq.com> Date: Wed, 21 Aug 2024 14:25:04 +0800 Subject: [PATCH] report unsound issue in bcc --- crates/bcc/RUSTSEC-0000-0000.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 crates/bcc/RUSTSEC-0000-0000.md diff --git a/crates/bcc/RUSTSEC-0000-0000.md b/crates/bcc/RUSTSEC-0000-0000.md new file mode 100644 index 000000000..5ef9613af --- /dev/null +++ b/crates/bcc/RUSTSEC-0000-0000.md @@ -0,0 +1,20 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "bcc" +date = "2024-08-21" +url = "https://github.com/rust-bpf/rust-bcc/issues/200" +#informational = "unmaintained" +categories = ["memory-corruption"] +keywords = ["misalignment"] + +[versions] +patched = [] +``` + +# Unsound usage of unsafe implementation from `Vec` to `T` + +Unsafe misaligned conversion found at function `null_or_mut_ptr`. The pointer to 'Vec' is converted to a struct `T`. This unsound implementation would create a misalignment issues if the type size of `Vec` is smaller than the type size of struct `T`. +If we further manipulate the problematic converted types, it would potentially lead to different undefined behavior such as access out-of-bound. + +In the meantime, bcc will no longer be maintained. Users are encouraged to migrate to libbpf-rs. \ No newline at end of file