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

(cherry picked from commit 0c605af3f9d9e66be6af0a3bbc36dbedc5dfe516)

Details

Provenance
markjAuthored on Aug 29 2024, 1:11 PM
Reviewer
zlei
Differential Revision
D46454: netinet: Explicitly disallow connections to the unspecified address
Parents
rG6f636541a3b1: capsicum tests: Serialize functional tests
Branches
Unknown
Tags
Unknown