* [PATCH] cxgb3: Use CAP_SYS_RAWIO for firmware
@ 2008-04-29 13:29 Alan Cox
2008-05-06 16:28 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2008-04-29 13:29 UTC (permalink / raw)
To: jeff, netdev
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>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.25-mm1/drivers/net/cxgb3/cxgb3_main.c linux-2.6.25-mm1/drivers/net/cxgb3/cxgb3_main.c
--- linux.vanilla-2.6.25-mm1/drivers/net/cxgb3/cxgb3_main.c 2008-04-28 11:36:42.000000000 +0100
+++ linux-2.6.25-mm1/drivers/net/cxgb3/cxgb3_main.c 2008-04-18 17:14:44.000000000 +0100
@@ -1894,11 +1894,11 @@
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] cxgb3: Use CAP_SYS_RAWIO for firmware
2008-04-29 13:29 [PATCH] cxgb3: Use CAP_SYS_RAWIO for firmware Alan Cox
@ 2008-05-06 16:28 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2008-05-06 16:28 UTC (permalink / raw)
To: Alan Cox; +Cc: netdev
Alan Cox wrote:
> 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>
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-06 16:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-29 13:29 [PATCH] cxgb3: Use CAP_SYS_RAWIO for firmware Alan Cox
2008-05-06 16:28 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).