1 minor finding · 1 suggestion
Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.
Findings
[minor] · Broadcast and multicast outbound bind addresses do not pin the source address
On Linux, a misconfigured broadcast or multicast -outboundbind value can pass startup validation, after which direct connections use the OS-selected source address instead of failing closed.
Location: src/init.cpp:2214 (head).
Details and suggested fix
The startup check rejects only the all-zero address and leaves other values to the trial bind. On Linux, binding a TCP socket to 255.255.255.255 or an IPv4 multicast address can succeed without pinning the source address. The subsequent connect() then uses the address selected by the routing table, including for direct IPv4 connections. This contradicts the help text requiring an address assigned to a local interface and the no-fallback guarantee. An operator must misconfigure the option to trigger this behavior; it is Linux-specific, other operating systems were not checked, and no production configuration using such a value was identified. Before the trial bind, reject addresses for which IsValid() is false and multicast ranges, including 224.0.0.0/4 and ff00::/8 for consistency. Add a startup-rejection case to feature_bind_outgoing.py. Detecting subnet-directed broadcasts would require checking against interface addresses gathered by Discover().
Optional improvements
[suggestion] · Name-proxy connections can bypass -outboundbind without a startup warning
With an IPv4 bind and an IPv6-only proxy, or vice versa, hostname-based connections and DNS-seed fetches use the name proxy without a warning that the bind does not apply.
Location: src/init.cpp:2245 (head).
Details and suggested fix
A family-specific -proxy setting also configures the name proxy. When one is set, hostname connections go through ConnectThroughProxy() and do not apply -outboundbind; DNS-seed lookups also use by-name ADDR_FETCH connections. For example, with -outboundbind=<v4> -proxy=X=ipv6, DNS-seed fetches and hostname-based -addnode, -connect, and -seednode peers use the IPv6-family proxy rather than a direct connection bound to the IPv4 source. The startup warning checks only the per-family proxies, so it stays silent. The traffic still goes through the proxy configured by the operator; the issue is that the warning does not explain that some connections ignore the bind. Also warn when HaveNameProxy() is true and any -outboundbind is set, and update the corresponding test case.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Assert bind-before-connect in the recording socket test