Skip to content
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

Fix UnixAddr::size on Linux and Android #1702

Merged
merged 1 commit into from Apr 22, 2022
Merged

Fix UnixAddr::size on Linux and Android #1702

merged 1 commit into from Apr 22, 2022

Commits on Apr 22, 2022

  1. Fix UnixAddr::size on Linux and Android

    SockaddrLike::size() is meant to return the amount of space that can be
    used to store the sockaddr.  But on Linux-based OSes, UnixAddr contains
    an extra field to store the address's length.  This field is not part of
    the address, and should not contribute to the value of size().
    
    This bug can't cause an out-of-bounds write, and every OS that we test
    on can tolerate the greater-than-expected length, but it might confuse
    applications that implement functions similar to getsockname in
    userland.
    asomers committed Apr 22, 2022
    Copy the full SHA
    db969c5 View commit details
    Browse the repository at this point in the history