lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110302201807.GA31965@albatros>
Date:	Wed, 2 Mar 2011 23:18:07 +0300
From:	Vasiliy Kulikov <segoon@...nwall.com>
To:	Jake Edge <jake@....net>
Cc:	linux-kernel@...r.kernel.org, mjt@....msk.ru, arnd@...db.de,
	mirqus@...il.com, netdev@...r.kernel.org,
	Ben Hutchings <bhutchings@...arflare.com>,
	David Miller <davem@...emloft.net>, kuznet@....inr.ac.ru,
	pekkas@...core.fi, jmorris@...ei.org, yoshfuji@...ux-ipv6.org,
	kaber@...sh.net, eric.dumazet@...il.com, therbert@...gle.com,
	xiaosuo@...il.com, jesse@...ira.com, kees.cook@...onical.com,
	eugene@...hat.com, dan.j.rosenberg@...il.com,
	akpm@...ux-foundation.org
Subject: Re: [PATCH v2] net: don't allow CAP_NET_ADMIN to load non-netdev
 kernel modules

On Wed, Mar 02, 2011 at 12:49 -0700, Jake Edge wrote:
> On Wed, 2 Mar 2011 22:43:54 +0300 Vasiliy Kulikov wrote:
> > On Wed, Mar 02, 2011 at 12:39 -0700, Jake Edge wrote:
> > > > @@ -1765,4 +1765,4 @@ module_exit(ipgre_fini);
> > > >  MODULE_LICENSE("GPL");
> > > >  MODULE_ALIAS_RTNL_LINK("gre");
> > > >  MODULE_ALIAS_RTNL_LINK("gretap");
> > > > -MODULE_ALIAS("gre0");
> > > > +MODULE_ALIAS_NETDEV("gre0");
> > > 
> > > that is, instead of replacing MODULE_ALIAS("gre0") with the NETDEV
> > > version, don't you want both for backward compatibility?
> > 
> > The networking script will run with CAP_NET_ADMIN, this would request
> > netdev-gre0 and load ip_gre.
> 
> and on systems that today use CAP_SYS_MODULE

Since Linux 2.6.32 CAP_SYS_MODULE may not load modules via "ifconfig
gre0".  It was changed to CAP_NET_ADMIN.  So nothing is broken here.

> (or really the full set of
> capabilities cuz they are running as root)?

As root has CAP_NET_ADMIN, the alias netdev-gre0 is tried and it succeeds.

-- 
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ