From owner-svn-src-head@freebsd.org Wed Nov 29 10:51:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38444DFFD2F; Wed, 29 Nov 2017 10:51:46 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AD3A66F278; Wed, 29 Nov 2017 10:51:45 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from hermann ([78.52.117.12]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M9fLX-1ePGsb2GCN-00D2OM; Wed, 29 Nov 2017 11:51:42 +0100 Date: Wed, 29 Nov 2017 11:51:31 +0100 From: "Hartmann, O." To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326362 - in head: share/man/man4 sys/net Message-ID: <20171129115125.24dd4aa0@hermann> In-Reply-To: <201711290940.vAT9eBWV096246@repo.freebsd.org> References: <201711290940.vAT9eBWV096246@repo.freebsd.org> Organization: walstatt.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:c+F/nrtVeltbTZqygBgk0z25WE2MOBv4Z7foiwbEaTS1alUlLoh W+I17Vzenz+q/CXcf+12u4wIw4MS4RpVRHfez99PTdMdWy1rg9Be//kErkEcAx3CQG1HgXf /rF+V0t1CuM7ppKiOfVrie5G5L7rdG+i7++DwaPj2ttTOsDwUuaVDiIqlNlMXVctYNado7n IdfmBmttAFn8mKCjWm3Jg== X-UI-Out-Filterresults: notjunk:1;V01:K0:JxYsDd82wmE=:BDEQAWDYQKgMGHb+RNTBox S11UUJePIy1iAJXUr5L371pe7xMaVKzadwjgKmglKLDcfBAuz9Utm+Q1il0q8sR7dWRJbUb1S cLLRr+cdRQa4xib9mNh7EIFHJrC0lQM3e2dMjEFAdnfyADf2rDh4trsq/A4eSmemJq5u200JP 1U5S9I51lVZX77cL5rfPbWBCkzl7W0rju8imqDevTc/TclRojjfwc7MTsQs4Yglh3M2I3Hh/s 3/cQnXjeTY0K/Bms41BN2tEO6B9xfmtRlMXEVMp9iUWVTNZNYWGa59X7NO++DSxIOs5/LLcUN mXJDLqvtktZ152UA3QTIQLZBUkgD0bI5I34tlAEq5dn1tLQDtt1pD3435ZwpsXPjKO+Nv5A5Q NDXTneswjkqwhazUB3m5s7CUoR3lnZuBsgWPHQIqDzsDo+HSJvNUBq03LD0o8iq824vobQwp0 sznLgFW1P72/uZfETS/LuRHNkLYptJkMTk6pHw+a4wHMcSvgzSonMkTt4V3m/SuwkMmNmiKNh RPcDwevL29PW+tLa5M794/84Anw7WWH1xd9AiJt09pxTJzPCHbbTUEjus4JiEAqelPnn9KnOJ f+bB5CU2gaxPHsMqA1TFcWpTcbbfMj8rUzqNUlvMsfMzh8Wp2YYpweSN+yQoBponLFqKdALlZ 2lcBHv3ChaW9ioX1oyfxqThEjw+l/psAbD53qnmHHnoBWXJzU8rV3uaaNKf0XFSJkvi0lq4nG GjiC3HBKp+J0daxGf+ohmFSesGw6jonjWH/BEZJpB1OEL2uwizzqfV+y1XIlJuKeX+zYYJIaU 0ld2vKqEGsBkSmoml5K4g/x3Vm4iqHrrRjewI/r/HvrF0CtX7Y= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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: Wed, 29 Nov 2017 10:51:46 -0000 On Wed, 29 Nov 2017 09:40:11 +0000 (UTC) Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Nov 29 09:40:11 2017 > New Revision: 326362 > URL: https://svnweb.freebsd.org/changeset/base/326362 > > Log: > Disallow TUN and TAP character device IOCTLs to modify the network > device type to any value. This can cause page faults and panics due > to accessing uninitialized fields in the "struct ifnet" which are > specific to the network device type. > > MFC after: 1 week > Found by: jau@iki.fi > PR: 223767 > Sponsored by: Mellanox Technologies > > Modified: > head/share/man/man4/tap.4 > head/share/man/man4/tun.4 > head/sys/net/if_tap.c > head/sys/net/if_tun.c > > Modified: head/share/man/man4/tap.4 > ============================================================================== > --- head/share/man/man4/tap.4 Wed Nov 29 09:18:24 2017 > (r326361) +++ head/share/man/man4/tap.4 Wed Nov 29 09:40:11 > 2017 (r326362) @@ -1,7 +1,7 @@ > .\" $FreeBSD$ > .\" Based on PR#2411 > .\" > -.Dd April 10, 2015 > +.Dd November 29, 2017 > .Dt TAP 4 > .Os > .Sh NAME > @@ -171,7 +171,14 @@ calls are supported > .In net/if_tap.h ) : > .Bl -tag -width VMIO_SIOCSETMACADDR > .It Dv TAPSIFINFO > -Set network interface information (line speed, MTU and type). > +Set network interface information (line speed and MTU). > +The type must be the same as returned by > +.Dv TAPGIFINFO > +or set to > +.Dv IFT_ETHER > +else the > +.Xr ioctl 2 > +call will fail. > The argument should be a pointer to a > .Va struct tapinfo . > .It Dv TAPGIFINFO > > Modified: head/share/man/man4/tun.4 > ============================================================================== > --- head/share/man/man4/tun.4 Wed Nov 29 09:18:24 2017 > (r326361) +++ head/share/man/man4/tun.4 Wed Nov 29 09:40:11 > 2017 (r326362) @@ -2,7 +2,7 @@ > .\" $FreeBSD$ > .\" Based on PR#2411 > .\" > -.Dd November 30, 2014 > +.Dd November 29, 2017 > .Dt TUN 4 > .Os > .Sh NAME > @@ -208,8 +208,15 @@ this stores the internal debugging variable's > value in .It Dv TUNSIFINFO > The argument should be a pointer to an > .Vt struct tuninfo > -and allows setting the MTU, the type, and the baudrate of the tunnel > +and allows setting the MTU and the baudrate of the tunnel > device. > +The type must be the same as returned by > +.Dv TUNGIFINFO > +or set to > +.Dv IFT_PPP > +else the > +.Xr ioctl 2 > +call will fail. > The > .Vt struct tuninfo > is declared in > > Modified: head/sys/net/if_tap.c > ============================================================================== > --- head/sys/net/if_tap.c Wed Nov 29 09:18:24 2017 > (r326361) +++ head/sys/net/if_tap.c Wed Nov 29 09:40:11 > 2017 (r326362) @@ -737,9 +737,10 @@ tapioctl(struct cdev *dev, > u_long cmd, caddr_t data, i switch (cmd) { > case TAPSIFINFO: > tapp = (struct tapinfo *)data; > + if (ifp->if_type != tapp->type) > + return (EPROTOTYPE); > mtx_lock(&tp->tap_mtx); > ifp->if_mtu = tapp->mtu; > - ifp->if_type = tapp->type; > ifp->if_baudrate = tapp->baudrate; > mtx_unlock(&tp->tap_mtx); > break; > > Modified: head/sys/net/if_tun.c > ============================================================================== > --- head/sys/net/if_tun.c Wed Nov 29 09:18:24 2017 > (r326361) +++ head/sys/net/if_tun.c Wed Nov 29 09:40:11 > 2017 (r326362) @@ -676,9 +676,10 @@ tunioctl(struct cdev *dev, > u_long cmd, caddr_t data, i if (error) > return (error); > } > + if (TUN2IFP(tp)->if_type != tunp->type) > + return (EPROTOTYPE); > mtx_lock(&tp->tun_mtx); > TUN2IFP(tp)->if_mtu = tunp->mtu; > - TUN2IFP(tp)->if_type = tunp->type; > TUN2IFP(tp)->if_baudrate = tunp->baudrate; > mtx_unlock(&tp->tun_mtx); > break; > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to > "svn-src-head-unsubscribe@freebsd.org" after updating from r325893 to r326362, FreeBSD CURRENT crashes while booting the kernel. I'm sorry having no further informations, it happens on a laptop with reduced space. At the moment, it seems that a lot of boxes running most recent CURRENT tend to crash spontanously. In a more severe case, after upgrading to r326347, the kernel doesn't boot further - i gets stuck after printing attached USB devices and then remains frozen forver. USB keyboard works. I tried to boot the old kernel, but its the same bahaviour. The last few changes within the vm system tend to crash FreeBSD also while installing world. If someone, like me, is sometimes sloppy and lazy and doing installkernel installworld from multiuser, which worked for a long time and is, I know, not recommended, will be highly the victim of a crash while installing! I do not know wether this is worth a warning (again, within the summertime of this year we had a similkar saituation). oh