From owner-svn-src-head@freebsd.org Thu Jan 30 16:35:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B73523E033; Thu, 30 Jan 2020 16:35:00 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 487mD35CMyz4Kbw; Thu, 30 Jan 2020 16:34:59 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id 00UGYtTa056077 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 30 Jan 2020 08:34:55 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 00UGYtOB056076; Thu, 30 Jan 2020 08:34:55 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Thu, 30 Jan 2020 08:34:55 -0800 From: Gleb Smirnoff To: Kristof Provost , Ilja Van Sprundel Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357233 - head/sys/net Message-ID: <20200130163455.GH1268@FreeBSD.org> References: <202001282244.00SMiPrb077446@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202001282244.00SMiPrb077446@repo.freebsd.org> User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 487mD35CMyz4Kbw X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.83 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.95)[-0.950,0]; NEURAL_HAM_LONG(-0.88)[-0.884,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jan 2020 16:35:00 -0000 On Tue, Jan 28, 2020 at 10:44:25PM +0000, Kristof Provost wrote: K> Author: kp K> Date: Tue Jan 28 22:44:24 2020 K> New Revision: 357233 K> URL: https://svnweb.freebsd.org/changeset/base/357233 K> K> Log: K> epair: Do not abuse params to register the second interface K> K> if_epair used the 'params' argument to pass a pointer to the b interface K> through if_clone_create(). K> This pointer can be controlled by userspace, which means it could be abused to K> trigger a panic. While this requires PRIV_NET_IFCREATE K> privileges those are assigned to vnet jails, which means that vnet jails K> could panic the system. K> K> Reported by: Ilja Van Sprundel ... K> Modified: head/sys/net/if_clone.h K> ============================================================================== K> --- head/sys/net/if_clone.h Tue Jan 28 21:46:59 2020 (r357232) K> +++ head/sys/net/if_clone.h Tue Jan 28 22:44:24 2020 (r357233) K> @@ -79,7 +79,8 @@ int if_clone_list(struct if_clonereq *); K> struct if_clone *if_clone_findifc(struct ifnet *); K> void if_clone_addgroup(struct ifnet *, struct if_clone *); K> K> -/* The below interface used only by epair(4). */ K> +/* The below interfaces are used only by epair(4). */ K> +void if_clone_addif(struct if_clone *, struct ifnet *); K> int if_clone_destroyif(struct if_clone *, struct ifnet *); IMHO, makes sense to move all these declaration into if_epair.c itself. -- Gleb Smirnoff