utils.execute uses potentially insecure shell=True

Bug #726359 reported by Erica Windisch
258
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Erica Windisch

Bug Description

The shell=True argument to subprocess.Popen allows the execution of strings, passed to a sub-shell rather than executing programs directly via execvp. This can cause potential security vulnerabilities due to untrusted input. While it is not known if this is resulting in any current vulnerabilities, it would be practical and advisable to follow best practices, especially as many of the executed commands are run within a EUID=0 context (albeit, largely via 'sudo').

For these reasons, the subprocess module documentation itself advocates using the default, shell=False, as a best-practice.

I have marked this as a vulnerability, as it is potentially exploitable or could cause a vulnerability. I am currently working on a patch, which is approximately 75% complete (and untested).

Thierry Carrez (ttx)
visibility: private → public
Changed in nova:
assignee: nobody → Eric Windisch (ewindisch)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Erica Windisch (ewindisch) wrote :

Action: Pushed branch, code untested.
Status: Suitable for testing.
Known bugs: Breaks AJAX console.

Revision history for this message
Erica Windisch (ewindisch) wrote :

Unit tests succeed. No known issues. Recommending merge.

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.2
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.