Thread (44 messages) 44 messages, 13 authors, 2011-03-26

Re: [PATCH v2] net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules

From: Serge E. Hallyn <hidden>
Date: 2011-03-24 20:27:49
Also in: lkml

Quoting Ben Hutchings (bhutchings@solarflare.com):
On Thu, 2011-03-24 at 14:03 -0400, Eric Paris wrote:
quoted
Not quite.  SELinux logs every time an operation is denied.  This patch
means that every time a module is requested which does not exist as
Ah.  I see.

...
quoted
I think there are 3 possibilities:
...(3)
quoted
Figure out a way to stop the calls to "reg" "wifi0" and "virbr0" if they
don't exist.

I feel like the last one is the best way, but I don't know what a
solution could look like....
This really has to be done in userland, where these names are being
invented.  Though I suspect the usual way to check whether an interface
exists would be SIOCGIFINDEX, which calls dev_load()!  An alternate
would be to check whether /sys/class/net/<name> exists, but I seem to
recall that /sys/class is somewhat deprecated.
Of course this will mean pain for users until distributions have
updated to userspace which is doing this, but yeah, this clearly seems
like the best way.  (And the only sane one.)

thanks,
-serge

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help