diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-04-29 09:29:30 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-05-06 12:27:53 -0400 |
commit | 1b3aa7afb60d34867eea5e73ee943b2a026fc47c (patch) | |
tree | b3be54db2b92251ba06c3d5155750f4ce0c593c8 | |
parent | 01935d7d2c544a5dfc8313f79ed164d45115aa33 (diff) |
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>
-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) | |||
1894 | u8 *fw_data; | 1894 | u8 *fw_data; |
1895 | struct ch_mem_range t; | 1895 | struct ch_mem_range t; |
1896 | 1896 | ||
1897 | if (!capable(CAP_NET_ADMIN)) | 1897 | if (!capable(CAP_SYS_RAWIO)) |
1898 | return -EPERM; | 1898 | return -EPERM; |
1899 | if (copy_from_user(&t, useraddr, sizeof(t))) | 1899 | if (copy_from_user(&t, useraddr, sizeof(t))) |
1900 | return -EFAULT; | 1900 | return -EFAULT; |
1901 | 1901 | /* Check t.len sanity ? */ | |
1902 | fw_data = kmalloc(t.len, GFP_KERNEL); | 1902 | fw_data = kmalloc(t.len, GFP_KERNEL); |
1903 | if (!fw_data) | 1903 | if (!fw_data) |
1904 | return -ENOMEM; | 1904 | return -ENOMEM; |