Date: Wed, 11 Oct 2023 20:09:39 +0000 From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 273557] Regression preventing bhyve from running inside a jail without IP after f74147e26999838e03a522bf59ea33bef470d356) breaks support for jailing bhyve with IPv4 and IPv6 disabled. Patch included. Message-ID: <bug-273557-27103-8gPzK3tIxF@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-273557-27103@https.bugs.freebsd.org/bugzilla/> References: <bug-273557-27103@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273557 --- Comment #13 from crest@rlwinm.de --- The patch changes the bhyve tap network backend code invoked to open devices with names starting with "tap" or "vmnet". Since the code is already exclusive to the if_tuntap driver in tap or vmnet mode I can't see any problem with relying on one *more* driver specific ioctl(). As far as I can tell there is no possible configuration where the existing code works as intended, but the patch wouldn't also work. Netlink sockets shouldn't offer any way for a bhyve process attached to a vnet enabled jail to even address network interface in its parent jail (normally the unjailed host) to bring it up (or down). Anything else would be a security problem. The device file descriptor is the natural API endpoint to bring an interface up. It is the capability to manipulate a tap device through the single opening allowed per tap device (at a time). Having to query the tap device for its interface name or index to reference the interface in a request to change interface state by name or index is also a race condition since the interface could've been destroyed and its name or index reused. Using the file descriptor precludes any race condition similar to funlinkat() vs unlinkat(). -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-273557-27103-8gPzK3tIxF>
