Skip to content

SocketAncillary doesn't ensure the control buffer is aligned at least as much as cmsghdr #139861

Open
@bjorn3

Description

@bjorn3
Member

SocketAncillary accepts an arbitrary slice as input even if the slice is not correctly aligned to cmsghdr. This is unsound.

Activity

added
C-bugCategory: This is a bug.
O-unixOperating system: Unix-like
requires-nightlyThis issue requires a nightly compiler in some way.
T-libsRelevant to the library team, which will review and decide on the PR/issue.
on Apr 15, 2025
added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Apr 15, 2025
zopsicle

zopsicle commented on Apr 15, 2025

@zopsicle
Contributor

Approaches to solve this were discussed in the tracking issue: #76915

added
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`
and removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
requires-nightlyThis issue requires a nightly compiler in some way.
on Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`C-bugCategory: This is a bug.F-unix_socket_ancillary_data`#![feature(unix_socket_ancillary_data)]`O-unixOperating system: Unix-likeT-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bjorn3@jieyouxu@rustbot@zopsicle

        Issue actions

          SocketAncillary doesn't ensure the control buffer is aligned at least as much as cmsghdr · Issue #139861 · rust-lang/rust