-
Notifications
You must be signed in to change notification settings - Fork 17
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
Soundness issue #30
Comments
Did you see this comment? Line 135 in 448d86a
What I understand from this comment is that Lines 324 to 335 in 448d86a
For janus-plugin-rs/src/session.rs Line 25 in 448d86a
I don't know why it is public. We have a getter for it: janus-plugin-rs/src/session.rs Lines 68 to 70 in 448d86a
But yeah this can surely cause Undefined Behavior (UB) if you modify the Did you encounter the issue in your own code using this lib or you were just reviewing this code? |
I did.
Couldn't you also use a getter for
I was specifically looking for this kind of unsoundness issue in crates on crates.io and stumbled upon it. |
I think you're right, And for So I guess that |
Yes, but I'd suggest returning the pointers by value instead of by reference. |
Sdp::get_mlines
andSdp::deref
dereference the user accessible raw pointerSdp::ptr
and pass it to ffi.SessionWrapper::drop
dereferences the user accessible raw pointerSessionWrapper::handle
.This is unsound because a user could safely modify those pointer fields and call on of the methods to cause UB.
The text was updated successfully, but these errors were encountered: