diff --git a/crates/toodee/RUSTSEC-0000-0000.md b/crates/toodee/RUSTSEC-0000-0000.md new file mode 100644 index 0000000000..42da37af71 --- /dev/null +++ b/crates/toodee/RUSTSEC-0000-0000.md @@ -0,0 +1,30 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "toodee" +date = "2025-05-22" + +url = "https://github.com/antonmarsden/toodee/issues/26" +categories = ["memory-corruption", "memory-exposure"] +keywords = ["memory-safety", "buffer-overflow"] + +[versions] +patched = [">= 0.6.0"] +unaffected = ["< 0.2.0"] + +[affected.functions] +"toodee::DrainCol::drop" = [">= 0.2.0, <= 0.5.0"] +``` + +# Heap Buffer Overflow in the DrainCol Destructor + +An off-by-one error in the `DrainCol::drop` destructor could cause an unsafe memory copy +operation to exceed the bounds of the associated vector. + +The error was related to the size of the data being copied in one of the `ptr::copy` +invocations inside the destructor. + +When removing the first column from a TooDee object, the DrainCol return object could cause +a heap buffer overflow vulnerability when it is dropped. + +The issue was fixed in commit `e6e16d5` by reducing the copied size by one.