HomeFreeBSD

netinet: Explicitly disallow connections to the unspecified address

Description

netinet: Explicitly disallow connections to the unspecified address

If the V_connect_ifaddr_wild sysctl says that we shouldn't infer a
destination address, return an error. Otherwise it's possible for use
of an unspecified foreign address to trigger a subsequent assertion
failure, for example in in_pcblookup_hash_locked().

Similarly, if no interface addresses are assigned, fail quickly upon an
attempt to connect to the unspecified address.

Reported by: Shawn Webb <shawn.webb@hardenedbsd.org>
MFC after: 2 weeks
Reviewed by: zlei, allanjude, emaste
Differential Revision: https://reviews.freebsd.org/D46454

Details

Provenance
markjAuthored on Aug 29 2024, 1:11 PM
Reviewer
zlei
Differential Revision
D46454: netinet: Explicitly disallow connections to the unspecified address
Parents
rG8b017284319c: arm64: Fix the ESR_EL1_op2 value
Branches
Unknown
Tags
Unknown