netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* user controllable usermodehelper in br_stp_if.c
@ 2015-11-29 22:43 Richard Weinberger
  2015-11-30 20:14 ` Kees Cook
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Weinberger @ 2015-11-29 22:43 UTC (permalink / raw)
  To: netdev@vger.kernel.org
  Cc: bridge, linux-kernel@vger.kernel.org, keescook@chromium.org,
	kernel-hardening@lists.openwall.com

Hi!

By spawning new network and user namesapces an unprivileged user
is able to execute /sbin/bridge-stp within the initial mount namespace
with global root rights.
While this cannot directly be used to break out of a container or gain
global root rights it could be used by exploit writers as valuable building block.

e.g.
$ unshare -U -r -n /bin/sh
$ brctl addbr br0
$ brctl stp br0 on # this will execute /sbin/bridge-stp

As this mechanism clearly cannot work with containers and seems to be legacy code
I suggest not calling call_usermodehelper() at all if we're not in the initial user namespace.
What do you think?

Thanks,
//richard

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-12-08 20:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-29 22:43 user controllable usermodehelper in br_stp_if.c Richard Weinberger
2015-11-30 20:14 ` Kees Cook
2015-11-30 21:38   ` [PATCH net] bridge: Only call /sbin/bridge-stp for the initial network namespace Eric W. Biederman
2015-11-30 22:12     ` Stephen Hemminger
2015-11-30 22:16       ` Eric W. Biederman
2015-11-30 22:57     ` Richard Weinberger
2015-12-01 14:13     ` Hannes Frederic Sowa
2015-12-03  4:50     ` David Miller
2015-12-08 20:56       ` Kees Cook
2015-11-30 23:03   ` user controllable usermodehelper in br_stp_if.c Richard Weinberger

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).