Skip to content
New issue

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

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

Already on GitHub? # to your account

crayon: Misbehaving HandleLike implementation can lead to memory safety violation #371

Merged
merged 1 commit into from
Aug 31, 2020

Conversation

Qwaz
Copy link
Contributor

@Qwaz Qwaz commented Aug 31, 2020

Unsafe code in ObjectPool has time-of-check to time-of-use (TOCTOU) bug that can eventually lead to a memory safety violation. ObjectPool and HandlePool implicitly assumes that HandleLike trait methods are pure, i.e., they always return the same value. However, this assumption is unsound since HandleLike is a safe, public trait that allows a custom implementation.

Original issue report: shawnscode/crayon#87

@Shnatsel Shnatsel merged commit 8acfb6a into rustsec:master Aug 31, 2020
@Qwaz Qwaz deleted the 0010-crayon branch January 13, 2021 16:38
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants