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

CallbackSigner is unsound #672

Closed
kornelski opened this issue Nov 14, 2024 · 1 comment
Closed

CallbackSigner is unsound #672

kornelski opened this issue Nov 14, 2024 · 1 comment

Comments

@kornelski
Copy link
Contributor

It implements Send and Sync, but allows use of non-Send non-Sync callback functions. This can be used to create a data race in safe Rust code. CallbackFunc should be defined as:

pub type CallbackFunc = dyn Fn(*const (), &[u8]) -> std::result::Result<Vec<u8>, Error> + Send + Sync;
@gpeacock
Copy link
Collaborator

Thank you for this! fixed in b190464

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants