You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, we (Rust group @sslab-gatech) are scanning crates on crates.io for potential soundness bugs. We noticed a panic safety issue in the BptreeMapWriteTxn::insert function.
If a key being inserted panics during its clone then it can leave the BptreeMap in an inconsistent state and cause invalid objects to be dropped.
thread 'main' panicked at 'Panic on clone!', src/main.rs:25:9
stack backtrace:
0: std::panicking::begin_panic
at /home/ammar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:505
1: <rudra_poc_0156::DropDetector as core::clone::Clone>::clone
at ./src/main.rs:25
2: concread::bptree::node::Leaf<K,V>::req_clone
at /home/ammar/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/concread-0.2.8/src/bptree/node.rs:589
3: concread::bptree::cursor::clone_and_insert
at /home/ammar/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/concread-0.2.8/src/bptree/cursor.rs:630
4: concread::bptree::cursor::CursorWrite<K,V>::insert
at /home/ammar/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/concread-0.2.8/src/bptree/cursor.rs:250
5: concread::bptree::BptreeMapWriteTxn<K,V>::insert
at /home/ammar/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/concread-0.2.8/src/bptree/mod.rs:301
6: rudra_poc_0156::main
at ./src/main.rs:43
7: core::ops::function::FnOnce::call_once
at /home/ammar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Dropping 32659
Dropping 0
Dropping 1
Notice the weird Dropping 32659 indicating some uninitialized or re-used memory is being dropped.
The text was updated successfully, but these errors were encountered:
Hi there, we (Rust group @sslab-gatech) are scanning crates on crates.io for potential soundness bugs. We noticed a panic safety issue in the
BptreeMapWriteTxn::insert
function.If a key being inserted panics during its clone then it can leave the
BptreeMap
in an inconsistent state and cause invalid objects to be dropped.See this example:
which outputs:
Notice the weird
Dropping 32659
indicating some uninitialized or re-used memory is being dropped.The text was updated successfully, but these errors were encountered: