Date: Thu, 26 Dec 2019 16:58:11 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r356090 - stable/11/sys/dev/oce Message-ID: <201912261658.xBQGwBiu058397@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Thu Dec 26 16:58:11 2019 New Revision: 356090 URL: https://svnweb.freebsd.org/changeset/base/356090 Log: MFC r356047: oce: Disallow the passthrough ioctl for unprivileged users. Modified: stable/11/sys/dev/oce/oce_if.c stable/11/sys/dev/oce/oce_if.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/oce/oce_if.c ============================================================================== --- stable/11/sys/dev/oce/oce_if.c Thu Dec 26 16:56:42 2019 (r356089) +++ stable/11/sys/dev/oce/oce_if.c Thu Dec 26 16:58:11 2019 (r356090) @@ -616,6 +616,9 @@ oce_ioctl(struct ifnet *ifp, u_long command, caddr_t d break; case SIOCGPRIVATE_0: + rc = priv_check(curthread, PRIV_DRIVER); + if (rc != 0) + break; rc = oce_handle_passthrough(ifp, data); break; default: Modified: stable/11/sys/dev/oce/oce_if.h ============================================================================== --- stable/11/sys/dev/oce/oce_if.h Thu Dec 26 16:56:42 2019 (r356089) +++ stable/11/sys/dev/oce/oce_if.h Thu Dec 26 16:58:11 2019 (r356090) @@ -46,6 +46,7 @@ #include <sys/kernel.h> #include <sys/bus.h> #include <sys/mbuf.h> +#include <sys/priv.h> #include <sys/rman.h> #include <sys/socket.h> #include <sys/sockio.h>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912261658.xBQGwBiu058397>