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

backport: fix uninitialized read when stringifying an addrLocal #1163

Merged
merged 1 commit into from
Feb 9, 2022

Commits on Dec 12, 2021

  1. backport: fix uninitialized read when stringifying an addrLocal

    Manual backport of bitcoin PR 14728
    
    Reachable from either place where SetIP is used when our best-guess
    addrLocal for a peer is IPv4, but the peer tells us it's reaching us at
    an IPv6 address.
    
    In that case, SetIP turns an IPv4 address into an IPv6 address without
    setting the scopeId, which is subsequently read in GetSockAddr during
    CNetAddr::ToStringIP and passed to getnameinfo. Fix by ensuring every
    constructor initializes the scopeId field with something.
    fdoving committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    4ba49a0 View commit details
    Browse the repository at this point in the history