nix icon indicating copy to clipboard operation
nix copied to clipboard

Don't deref uninit addrs in `pack_mhdr_to_receive`

Open djkoloski opened this issue 2 years ago • 3 comments
trafficstars

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

djkoloski avatar Jan 31 '23 15:01 djkoloski

Can we get this rolled into a release?

aarond10 avatar Feb 13 '23 05:02 aarond10

This UB was introduced in https://github.com/nix-rust/nix/pull/1684. Maybe @asomers would be interested in reviewing it?

djkoloski avatar Mar 06 '23 21:03 djkoloski

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

aarond10 avatar Mar 23 '23 03:03 aarond10