Re: [PATCH -v2] capabilites: allow the application of capabilitylimits to usermode helpers

From: Vasiliy Kulikov
Date: Wed Mar 09 2011 - 14:46:38 EST


Eric,

On Wed, Mar 09, 2011 at 14:33 -0500, Eric Paris wrote:
> someone complained that any user with
> cap_net_admin was able to load arbitrary kernel modules, even though the user
> didn't have cap_sys_module. The reason is because the actual load is done by
> a usermode helper and those always have the full cap set.

AFAIU, your patch sets system-wide caps for _all_ usermode helpers,
right? Then it does nothing with cap_net_admin's problem as it should
restrict caps of specific helpers spawned from specific networking code,
but not touching anything related to another helpers.

> sysctls which allow us to bound the permissions of usermode helpers.
>
> /proc/sys/kernel/usermodehelper/bset
> /proc/sys/kernel/usermodehelper/inheritable
>
> You must have CAP_SYS_MODULE to change these (changes are &= ONLY).
> When the kernel launches a usermodehelper it will do so with these as
> the bset and pI.

Thanks,

--
Vasiliy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/