Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/dev/ic Pull up following revision(s) (requested by ch...



details:   https://anonhg.NetBSD.org/src/rev/6e068189e2e3
branches:  netbsd-8
changeset: 852694:6e068189e2e3
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Dec 17 16:18:50 2019 +0000

description:
Pull up following revision(s) (requested by christos in ticket #1475):

        sys/dev/ic/ath.c: revision 1.129

Protect network ioctls from non-authorized users. (Ilja Van Sprundel)

diffstat:

 sys/dev/ic/ath.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r e0e367b8e77b -r 6e068189e2e3 sys/dev/ic/ath.c
--- a/sys/dev/ic/ath.c  Tue Dec 17 12:22:23 2019 +0000
+++ b/sys/dev/ic/ath.c  Tue Dec 17 16:18:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ath.c,v 1.123 2017/02/02 10:05:35 nonaka Exp $ */
+/*     $NetBSD: ath.c,v 1.123.6.1 2019/12/17 16:18:50 martin Exp $     */
 
 /*-
  * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -41,7 +41,7 @@
 __FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.104 2005/09/16 10:09:23 ru Exp $");
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.123 2017/02/02 10:05:35 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.123.6.1 2019/12/17 16:18:50 martin Exp $");
 #endif
 
 /*
@@ -69,6 +69,7 @@
 #include <sys/callout.h>
 #include <sys/bus.h>
 #include <sys/endian.h>
+#include <sys/kauth.h>
 
 #include <net/if.h>
 #include <net/if_dl.h>
@@ -5435,6 +5436,12 @@
                return copyout(&sc->sc_stats,
                                ifr->ifr_data, sizeof (sc->sc_stats));
        case SIOCGATHDIAG:
+               error = kauth_authorize_network(curlwp->l_cred,
+                   KAUTH_NETWORK_INTERFACE,
+                   KAUTH_REQ_NETWORK_INTERFACE_SETPRIV, ifp, KAUTH_ARG(cmd),
+                   NULL);
+               if (error)
+                       break;
                error = ath_ioctl_diag(sc, (struct ath_diag *) ifr);
                break;
        default:



Home | Main Index | Thread Index | Old Index