Skip to content

Conversation

@djkoloski
Copy link
Contributor

This adds a new method to SockaddrLikePriv to get a pointer to some underlying libc::sockaddr from a pointer to some type. This avoids dereferencing uninitialized values during pack_mhdr_to_receive, which is called from MultiHeaders::preallocate and recvmsg.

Because this is a private trait, this is not a semver-breaking change.

Fixes #1990

This adds a new method to `SockaddrLikePriv` to get a pointer to some
underlying `libc::sockaddr` from a pointer to some type. This avoids
dereferencing uninitialized values during `pack_mhdr_to_receive`, which
is called from `MultiHeaders::preallocate` and `recvmsg`.

Because this is a private trait, this is not a semver-breaking change.
@aarond10
Copy link
Contributor

Can we get this rolled into a release?

@djkoloski
Copy link
Contributor Author

This UB was introduced in #1684. Maybe @asomers would be interested in reviewing it?

@aarond10
Copy link
Contributor

Ping! @asomers, could we get this merged in?

@Jan561 Jan561 mentioned this pull request Nov 23, 2023
3 tasks
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

Successfully merging this pull request may close these issues.

Multiheader::preallocate causes an uninitialized value to be dereferenced

2 participants