Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Apr 2018 07:54:00 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 227243] getaddrinfo(3): IPv4-only jail on IPv4+6 host gets ipv6 inaddr_any
Message-ID:  <bug-227243-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227243

            Bug ID: 227243
           Summary: getaddrinfo(3): IPv4-only jail on IPv4+6 host gets
                    ipv6 inaddr_any
           Product: Base System
           Version: 11.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: phk@FreeBSD.org

On 11.1-RELEASE-p4 amd64.

The host has both IPv4 and IPv6 addresses configured.

The jail has only an IPv4 address configured.

getaddrinfo(3) with a NULL argument an AI_PASSIVE returns IPv6 address ("::=
")
which cannot used to establish a listen socket because there are no IPv6
addresses in the jail.

As far as I can tell, this happens because IPv6 is before IPv4 in afdl[] and
explore_null() is not smart enough to spot it is in an IPv4-only jail.

I'm not sure if this should be fixed in getaddrinfo.c or in the kernel (to =
make
socket(2) fail in IPv6 in IPv4 only jails).

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-227243-8>