From nobody Wed Oct 11 20:09:39 2023 X-Original-To: virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S5P4g4rJjz4wdms for ; Wed, 11 Oct 2023 20:09:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S5P4g3rx4z3HdK for ; Wed, 11 Oct 2023 20:09:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697054979; a=rsa-sha256; cv=none; b=Hd7iSdIWVZjZgn3mBaS/RYRBlHs6F8p+Wb0IGcD4AHQ6Af+5jbGkuJ7JXtRDhjJFDf+nZC zec/L8qlJBJBNblP5jMSTzDOgQiVRHjXldYbFM6yyYW0/odXIk81ipp8b9qBT8iL3Kx2yE q1xkWaIORrBsfYWkenRU7mSHHIxmVMlQDUe/yQYtrj5EIST5DjQ/kH20AlKtJJK7h7yFJx kpL1WKqOcDwkxA4Cgh6Fsfl0C84tDgnXCzi/CgJcH2QCrHYJiYSw6uH7VNRcDrQ/dPdU8E P9xlvCieKb27cXECFXWgfSISEuLuVzKulLijfygtIemTurcJ9mNfRcvJMDS+ZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697054979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6RzkE+z4Nzsqf0Sv+RJ+eujoo8W/5Vqy5auvuRkuLMM=; b=G+h+FViB7+8ssCdkptKqqNfs9COQF7P1MqMpmIJFEAmN3N0T8InNxoJX3gZgw0ma452iUy sCOZJ4RJIrRBs4P2BMBWM8JKmZgKXHi7bVdcxOljLkBro6WtqbdaNq1HTkGFnpSBFd1M9x CBSLIaIqrpJeNLHnBYqBH9NEkcXZ+FGJskrEI2rVB/Z2I5pfX8WdK0AVMD7H7Cv6gHOMNp bExNeFJ5YHKeZBmSWUerYehguo9YKAAXXKJqcIPYT21leiqJc/nuHivoSl35TDFB+tjO2L yU72hM7lyXTgCmF1OEdz21I0O4tWyZKlzsv428+kQx8zFnGvUeteYW5fwB61fQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S5P4g2sGnzZsB for ; Wed, 11 Oct 2023 20:09:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 39BK9dDk051178 for ; Wed, 11 Oct 2023 20:09:39 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 39BK9dPm051176 for virtualization@FreeBSD.org; Wed, 11 Oct 2023 20:09:39 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f 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. Date: Wed, 11 Oct 2023 20:09:39 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: 14.0-STABLE X-Bugzilla-Keywords: bhyve, easy, patch, regression X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: crest@rlwinm.de X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: mfc-stable14? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273557 --- 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 exclus= ive 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 i= s no possible configuration where the existing code works as intended, but the p= atch wouldn't also work. Netlink sockets shouldn't offer any way for a bhyve process attached to a v= net 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 requ= est to change interface state by name or index is also a race condition since t= he interface could've been destroyed and its name or index reused. Using the f= ile descriptor precludes any race condition similar to funlinkat() vs unlinkat(= ). --=20 You are receiving this mail because: You are the assignee for the bug.=