lkml.org 
[lkml]   [2008]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[05/12] tehuti: move ioctl perm check closer to function start (CVE-2008-1675)
2.6.24-stable review patch.  If anyone has any objections, please let us
know.

------------------
From: Jeff Garzik <jeff@garzik.org>

Commit f946dffed6334f08da065a89ed65026ebf8b33b4 upstream

Noticed by davem.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
drivers/net/tehuti.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/net/tehuti.c
+++ b/drivers/net/tehuti.c
@@ -649,6 +649,9 @@ static int bdx_ioctl_priv(struct net_dev
DBG("%d 0x%x 0x%x\n", data[0], data[1], data[2]);
}

+ if (!capable(CAP_NET_ADMIN))
+ return -EPERM;
+
switch (data[0]) {

case BDX_OP_READ:
@@ -664,8 +667,6 @@ static int bdx_ioctl_priv(struct net_dev
break;

case BDX_OP_WRITE:
- if (!capable(CAP_NET_ADMIN))
- return -EPERM;
error = bdx_range_check(priv, data[1]);
if (error < 0)
return error;
--


\
 
 \ /
  Last update: 2008-04-29 20:55    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site