Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index should have its Send and Sync traits be bounded. #6

Closed
ammaraskar opened this issue Nov 15, 2020 · 2 comments
Closed

Index should have its Send and Sync traits be bounded. #6

ammaraskar opened this issue Nov 15, 2020 · 2 comments

Comments

@ammaraskar
Copy link

Hi there, we (Rust group @sslab-gatech) are scanning crates on crates.io for potential soundness bugs. We noticed that the Index object implements the Send and Sync traits for all types:

appendix/src/lib.rs

Lines 61 to 62 in b279bc2

unsafe impl<K, V> Send for Index<K, V> {}
unsafe impl<K, V> Sync for Index<K, V> {}

This should likely be bounded when both K and V are Send and Sync respectively, otherwise it makes it possible to send an Index object across threads containing non-Sendable types such as an Rc object or a Cell.

@Shnatsel
Copy link

Heads up: this issue has been included in the RustSec advisory database. It will be surfaced by tools such as cargo-audit or cargo-deny from now on.

Once a fix is released to crates.io, please open a pull request to update the advisory with the patched version, or file an issue on the advisory database repository.

@krl
Copy link
Owner

krl commented Aug 21, 2021

Thank you for your checkup! This has been fixed in 0.2.1

@krl krl closed this as completed Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants