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

Check for UB using krabcake #342

Open
divergentdave opened this issue Aug 15, 2023 · 1 comment
Open

Check for UB using krabcake #342

divergentdave opened this issue Aug 15, 2023 · 1 comment

Comments

@divergentdave
Copy link
Contributor

There is a new tool under development called krabcake for checking adherence to Stacked Borrows at runtime. It is akin to Miri, but with a different architecture that supports codebases that use FFI and inline assembly. (using a combination of a custom Valgrind tool, and annotations inserted by rustc) Once this tool is ready, we could rebuild rustls-ffi with it, and try running various C programs under dynamic instrumentation to check for soundness bugs in the FFI API, or misuses by specific library consumers.

@jsha
Copy link
Collaborator

jsha commented Aug 16, 2023

This is great! Also worth mentioning that work is underway in rustls to allow pluggable crypto backends. That would let us sub in a pure-Rust crypto backend, which in turn would allow us to run more of our test cases under Miri. Right now we can run almost none under Miri because as soon as any *ring* FFI code is hit, it errors out.

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

2 participants