- Fix an off-by-one error that caused uvm_fault when changing the config with ancontrol(8). - Do not allow regular users to change the configuration of the device. Apply by doing: cd /usr/src patch -p0 < 011_an.patch And then rebuild your kernel. Index: sys/dev/ic/an.c =================================================================== RCS file: /cvs/src/sys/dev/ic/an.c,v retrieving revision 1.2 retrieving revision 1.4 diff -u -r1.2 -r1.4 --- sys/dev/ic/an.c 2000/04/06 04:01:49 1.2 +++ sys/dev/ic/an.c 2000/06/18 03:56:07 1.4 @@ -1,4 +1,4 @@ -/* $OpenBSD: an.c,v 1.2 2000/04/06 04:01:49 mickey Exp $ */ +/* $OpenBSD: an.c,v 1.4 2000/06/18 03:56:07 aaron Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -97,6 +97,7 @@ #include #include #include +#include #include #include #ifdef ANCACHE @@ -797,7 +798,7 @@ case AN_RID_GENCONFIG: cfg = (struct an_ltv_genconfig *)areq; - ifa = ifnet_addrs[ifp->if_index - 1]; + ifa = ifnet_addrs[ifp->if_index]; sdl = (struct sockaddr_dl *)ifa->ifa_addr; bcopy((char *)&cfg->an_macaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); @@ -879,6 +880,7 @@ struct an_softc *sc; struct an_req areq; struct ifreq *ifr; + struct proc *p = curproc; struct ifaddr *ifa = (struct ifaddr *)data; s = splimp(); @@ -960,6 +962,9 @@ error = copyout(&areq, ifr->ifr_data, sizeof(areq)); break; case SIOCSAIRONET: + error = suser(p->p_ucred, &p->p_acflag); + if (error) + break; error = copyin(ifr->ifr_data, &areq, sizeof(areq)); if (error) break;