Summary: | www-client/chromium[-suid] doesn't work properly on kernels with GRSEC enabled | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Rasmus Thomsen <Rasmus.thomsen> |
Component: | Current packages | Assignee: | Chromium Project <chromium> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | anton.bugs, sandino |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Rasmus Thomsen
2017-03-23 18:44:53 UTC
Could you identify a specific kernel .config option responsible for this? We should probably add it to https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/chromium-2.eclass?id=61b861acd7b49083dab687e133f30f3331cb7480#n25 . Here's the relevant section from the grsecurity kernel patch. diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c index 86b7854..0c3cfe2 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c @@ -76,6 +76,21 @@ int create_user_ns(struct cred *new) struct ucounts *ucounts; int ret, i; +#ifdef CONFIG_GRKERNSEC + /* + * This doesn't really inspire confidence: + * http://marc.info/?l=linux-kernel&m=135543612731939&w=2 + * http://marc.info/?l=linux-kernel&m=135545831607095&w=2 + * Increases kernel attack surface in areas developers + * previously cared little about ("low importance due + * to requiring "root" capability") + * To be removed when this code receives *proper* review + */ + if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SETUID) || + !capable(CAP_SETGID)) + return -EPERM; +#endif + ret = -ENOSPC; if (parent_ns->level > 32) goto fail; We could probably warn if CONFIG_GRKERNSEC is enabled and suid is disabled. Added a check for this to chromium-2.eclass . Guys, can you clarify if google-chrome is affected by this bug? I'm getting the same warning with it as well because chromium-2.eclass is inherited. if yes, how one should configure it (there is no suid USE flag with google-chrome). (In reply to Anton Bolshakov from comment #4) > Guys, can you clarify if google-chrome is affected by this bug? > I'm getting the same warning with it as well because chromium-2.eclass is > inherited. google-chrome always installs chrome-sandbox with the suid bit set, so you do not need to enable any USE flag for it. grsec still breaks the user namespace sandbox, so the warning message is valid. |