diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-04-29 14:29:30 +0100 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-05-06 12:27:53 -0400 |
commit | 1b3aa7afb60d34867eea5e73ee943b2a026fc47c (patch) | |
tree | b3be54db2b92251ba06c3d5155750f4ce0c593c8 /drivers/net/cxgb3 | |
parent | 01935d7d2c544a5dfc8313f79ed164d45115aa33 (diff) | |
download | blackbird-op-linux-1b3aa7afb60d34867eea5e73ee943b2a026fc47c.tar.gz blackbird-op-linux-1b3aa7afb60d34867eea5e73ee943b2a026fc47c.zip |
cxgb3: Use CAP_SYS_RAWIO for firmware
Otherwise theoretically at least
CAP_NET_ADMIN
Reload new firmware
Wait..
Firmware patches kernel
So it should be CAY_SYS_RAWIO - not that I suspect this is in fact a
credible attack vector!
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/cxgb3')
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index 05e5f59e87fa..ce949d5fae39 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c @@ -1894,11 +1894,11 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr) u8 *fw_data; struct ch_mem_range t; - if (!capable(CAP_NET_ADMIN)) + if (!capable(CAP_SYS_RAWIO)) return -EPERM; if (copy_from_user(&t, useraddr, sizeof(t))) return -EFAULT; - + /* Check t.len sanity ? */ fw_data = kmalloc(t.len, GFP_KERNEL); if (!fw_data) return -ENOMEM; |