oce: Disallow the passthrough ioctl for unprivileged users.
A missing check meant that unprivileged users could send passthrough commands to the device firmware. Reported by: Ilja Van Sprundel <ivansprundel@ioactive.com> MFC after: 3 days Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
19352ba5ad
commit
c76ddeeb1c
@ -620,6 +620,9 @@ oce_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
|
||||
break;
|
||||
|
||||
case SIOCGPRIVATE_0:
|
||||
rc = priv_check(curthread, PRIV_DRIVER);
|
||||
if (rc != 0)
|
||||
break;
|
||||
rc = oce_handle_passthrough(ifp, data);
|
||||
break;
|
||||
default:
|
||||
|
@ -48,6 +48,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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user