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

OsSocketAddr is unsound in upcoming rustc release #3

Closed
Noah-Kennedy opened this issue Aug 25, 2022 · 4 comments
Closed

OsSocketAddr is unsound in upcoming rustc release #3

Noah-Kennedy opened this issue Aug 25, 2022 · 4 comments

Comments

@Noah-Kennedy
Copy link

This crate assumes that rust's SocketAddr types are implemented with the C layout, which is not guaranteed. It has generally happened to be true in the past, but this is no longer going to be true. I would suggest modifying the conversion trait implementations to get around this.

a-ba added a commit that referenced this issue Aug 26, 2022
upcoming stdlib 1.64 will switch to pure rust types

rust-lang/rust#78802

fix #3
a-ba added a commit that referenced this issue Aug 26, 2022
upcoming stdlib 1.64 will switch to pure rust types

rust-lang/rust#78802

fix #3
a-ba added a commit that referenced this issue Aug 26, 2022
upcoming stdlib 1.64 will switch to pure rust types

rust-lang/rust#78802

fix #3
@a-ba
Copy link
Owner

a-ba commented Aug 26, 2022

thanks for the report

@a-ba a-ba closed this as completed in 1bc7f71 Aug 26, 2022
@Noah-Kennedy
Copy link
Author

Thanks for the response! I would also strongly recommend filing a rustsec advisory for the unpatched versions of this crate and potentially yanking unpatched versions as well, once this fix is released.

@a-ba
Copy link
Owner

a-ba commented Aug 26, 2022

that was already in my todo list ;-)

@Noah-Kennedy
Copy link
Author

Awesome!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants