[Openstack-security] [Bug 1081795] Re: Nova rootwrap is too permissive with iproute(2) arguments
    Thierry Carrez 
    thierry.carrez+lp at gmail.com
       
    Fri Feb  7 14:35:31 UTC 2014
    
    
  
Rewritten as a oslo.rootwrap bug.
** Project changed: nova => oslo
** Changed in: oslo
   Importance: Wishlist => High
** Changed in: oslo
       Status: In Progress => Triaged
** Changed in: oslo
     Assignee: Mark McClain (markmcclain) => (unassigned)
** Summary changed:
- Nova rootwrap is too permissive with iproute(2) arguments
+ IpFilter fails to prevent ip netns exec
** Summary changed:
- IpFilter fails to prevent ip netns exec
+ oslo.rootwrap IpFilter fails to prevent ip netns exec
** Description changed:
- The Nova rootwrap filters allow the nova user to spawn an unrestricted
- root shell.  This is a problem that we fixed in Quantum over the summer,
- so I've got code to close the hole.
+ This is an oslo.rootwrap bug.
  
+ IpFilter is designed to allow any ip command, unless the second
+ parameter is "netns" (in which case you only allow ip netns
+ {list,add,delete}.
  
- vagrant at vagrant-precise:~/devstack$ sudo /usr/local/bin/nova-rootwrap /etc/nova/rootwrap.conf ip netns add foo
- vagrant at vagrant-precise:~/devstack$ sudo /usr/local/bin/nova-rootwrap /etc/nova/rootwrap.conf ip netns exec foo bash
- root at vagrant-precise:~/devstack# whoami
- root
- root at vagrant-precise:~/devstack# exit
- exit
- vagrant at vagrant-precise:~/devstack$ 
+ The trick is it's trivial to work around this (just run 'ip -s netns
+ exec').
  
- 
- For contrast here's how the Quantum wrapper behaves:
- 
- vagrant at vagrant-precise:~/devstack$ sudo /usr/local/bin/quantum-rootwrap /etc/quantum/rootwrap.conf ip netns add foo
- vagrant at vagrant-precise:~/devstack$ sudo /usr/local/bin/quantum-rootwrap /etc/quantum/rootwrap.conf ip netns exec foo bash
- Unauthorized command: ip netns exec foo bash
- vagrant at vagrant-precise:~/devstack$
+ Once that's fixed, Nova should update from using a CommandFilter to
+ using the IpFilter for calling 'ip'.
-- 
You received this bug notification because you are a member of OpenStack
Security Group, which is subscribed to OpenStack.
https://bugs.launchpad.net/bugs/1081795
Title:
  oslo.rootwrap IpFilter fails to prevent ip netns exec
Status in Oslo - a Library of Common OpenStack Code:
  Triaged
Bug description:
  This is an oslo.rootwrap bug.
  IpFilter is designed to allow any ip command, unless the second
  parameter is "netns" (in which case you only allow ip netns
  {list,add,delete}.
  The trick is it's trivial to work around this (just run 'ip -s netns
  exec').
  Once that's fixed, Nova should update from using a CommandFilter to
  using the IpFilter for calling 'ip'.
To manage notifications about this bug go to:
https://bugs.launchpad.net/oslo/+bug/1081795/+subscriptions
    
    
More information about the Openstack-security
mailing list